@zaip-ai/cli 2.0.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/README.md +33 -14
  2. package/dist/services/adapters.d.ts +1 -1
  3. package/dist/services/adapters.d.ts.map +1 -1
  4. package/dist/services/adapters.js +8 -17
  5. package/dist/services/adapters.js.map +1 -1
  6. package/dist/services/agent-adapters.js +20 -6
  7. package/dist/services/agent-adapters.js.map +1 -1
  8. package/dist/services/agent-adapters.test.js +13 -7
  9. package/dist/services/agent-adapters.test.js.map +1 -1
  10. package/dist/services/logger.test.js +2 -2
  11. package/dist/services/runtime-template.test.js +9 -1
  12. package/dist/services/runtime-template.test.js.map +1 -1
  13. package/package.json +1 -1
  14. package/templates/.agents/README-ENG.md +19 -2
  15. package/templates/.agents/README.md +8 -2
  16. package/templates/.agents/config/agents/catalog.yaml +18 -18
  17. package/templates/.agents/config/clients/codex/agents/zaip-agent-analyst.toml +3 -6
  18. package/templates/.agents/config/clients/codex/agents/zaip-agent-auditor.toml +3 -6
  19. package/templates/.agents/config/clients/codex/agents/zaip-agent-backend.toml +3 -6
  20. package/templates/.agents/config/clients/codex/agents/zaip-agent-brand-strategist.toml +6 -8
  21. package/templates/.agents/config/clients/codex/agents/zaip-agent-builder.toml +3 -6
  22. package/templates/.agents/config/clients/codex/agents/zaip-agent-cloud-engineer.toml +3 -6
  23. package/templates/.agents/config/clients/codex/agents/zaip-agent-data-analyst.toml +5 -7
  24. package/templates/.agents/config/clients/codex/agents/zaip-agent-designer.toml +3 -6
  25. package/templates/.agents/config/clients/codex/agents/zaip-agent-finalizer.toml +3 -6
  26. package/templates/.agents/config/clients/codex/agents/zaip-agent-frontend.toml +3 -6
  27. package/templates/.agents/config/clients/codex/agents/zaip-agent-general-operations.toml +6 -8
  28. package/templates/.agents/config/clients/codex/agents/zaip-agent-governance-compliance.toml +3 -6
  29. package/templates/.agents/config/clients/codex/agents/zaip-agent-growth-strategist.toml +6 -8
  30. package/templates/.agents/config/clients/codex/agents/zaip-agent-integrator.toml +3 -6
  31. package/templates/.agents/config/clients/codex/agents/zaip-agent-marketing-analyst.toml +6 -8
  32. package/templates/.agents/config/clients/codex/agents/zaip-agent-orchestrator.toml +4 -5
  33. package/templates/.agents/config/clients/codex/agents/zaip-agent-refactoring-specialist.toml +3 -6
  34. package/templates/.agents/config/clients/codex/agents/zaip-agent-reviewer.toml +3 -6
  35. package/templates/.agents/config/clients/codex/agents/zaip-agent-sales-specialist.toml +6 -8
  36. package/templates/.agents/config/clients/codex/agents/zaip-agent-security-auditor.toml +3 -6
  37. package/templates/.agents/config/clients/codex/agents/zaip-agent-task-executor.toml +3 -6
  38. package/templates/.agents/config/clients/codex/agents/zaip-agent-website-developer.toml +3 -6
  39. package/templates/.agents/config/clients/codex/agents/zaip-agent-writer.toml +3 -6
  40. package/templates/.agents/config/pricing/models.json +53 -33
  41. package/templates/.agents/dashboard/.zaip-managed.json +30 -30
  42. package/templates/.agents/dashboard/apps/frontend/dist/assets/{DashboardHelpDialog-CYfpYsTr.js → DashboardHelpDialog-DaSllaJp.js} +118 -16
  43. package/templates/.agents/dashboard/apps/frontend/dist/assets/{TraceabilityWorkspace-DHDrd5rE.js → TraceabilityWorkspace-BCvZFMEf.js} +1 -1
  44. package/templates/.agents/dashboard/apps/frontend/dist/assets/{index-BYbpmqmM.js → index-_MEktQNM.js} +2 -2
  45. package/templates/.agents/dashboard/apps/frontend/dist/index.html +1 -1
  46. package/templates/.agents/dashboard/apps/frontend/package.json +1 -1
  47. package/templates/.agents/dashboard/apps/frontend/src/project-settings.test.ts +2 -2
  48. package/templates/.agents/dashboard/modules/cost-monitor/package.json +1 -1
  49. package/templates/.agents/dashboard/modules/operations/package.json +1 -1
  50. package/templates/.agents/dashboard/modules/traceability/package.json +1 -1
  51. package/templates/.agents/dashboard/packages/branding/package.json +1 -1
  52. package/templates/.agents/dashboard/packages/branding/src/index.ts +1 -1
  53. package/templates/.agents/dashboard/packages/contracts/package.json +1 -1
  54. package/templates/.agents/dashboard/packages/data-export/package.json +1 -1
  55. package/templates/.agents/dashboard/packages/local-runtime/dist/server.cjs +189 -189
  56. package/templates/.agents/dashboard/packages/local-runtime/dist/sqlite-read-model.cjs +153 -153
  57. package/templates/.agents/dashboard/packages/local-runtime/package.json +1 -1
  58. package/templates/.agents/dashboard/packages/local-runtime/server.mjs +189 -189
  59. package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot.test.ts +1 -1
  60. package/templates/.agents/dashboard/packages/local-runtime/src/server-sqlite-task-trace.ts +1 -1
  61. package/templates/.agents/dashboard/packages/local-runtime/src/server.test-fixtures.ts +1 -1
  62. package/templates/.agents/dashboard/packages/local-runtime/src/server.test.ts +1 -1
  63. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.test.ts +1 -1
  64. package/templates/.agents/dashboard/packages/ui/package.json +1 -1
  65. package/templates/.agents/dashboard/tests/e2e/package.json +1 -1
  66. package/templates/.agents/design/.zaip-managed.json +3 -3
  67. package/templates/.agents/design/apps/catalog/package.json +1 -1
  68. package/templates/.agents/design/packages/local-runtime/package.json +1 -1
  69. package/templates/.agents/requirements/autonomous-assurance.md +1 -1
  70. package/templates/.agents/requirements/cloud-hostinger-autonomy.md +1 -1
  71. package/templates/.agents/requirements/comparative-audit.md +1 -1
  72. package/templates/.agents/requirements/context-engine.md +1 -1
  73. package/templates/.agents/requirements/cost-observability.md +1 -1
  74. package/templates/.agents/requirements/dashboard-launch.md +1 -1
  75. package/templates/.agents/requirements/data-export.md +1 -1
  76. package/templates/.agents/requirements/design-system.md +1 -1
  77. package/templates/.agents/requirements/execution-engine.md +1 -1
  78. package/templates/.agents/requirements/kanban-dashboard.md +1 -1
  79. package/templates/.agents/requirements/model-orchestration.md +15 -5
  80. package/templates/.agents/requirements/public-distribution.md +3 -3
  81. package/templates/.agents/requirements/software-architecture.md +1 -1
  82. package/templates/.agents/requirements/strategic-improvements.md +1 -1
  83. package/templates/.agents/requirements/work-lifecycle.md +1 -1
  84. package/templates/.agents/requirements/zaip-strategic-95.md +1 -1
  85. package/templates/.agents/rules/astra-diagnostic.md +20 -0
  86. package/templates/.agents/rules/core.md +9 -14
  87. package/templates/.agents/rules/meta-mcp.md +1 -0
  88. package/templates/.agents/rules/run-lifecycle-closure.md +1 -1
  89. package/templates/.agents/rules/specialist-routing.md +3 -1
  90. package/templates/.agents/runtime/VERSION +1 -1
  91. package/templates/.agents/runtime/bin/zaip.mjs +50 -54
  92. package/templates/.agents/runtime/checksums.sha256 +6 -6
  93. package/templates/.agents/runtime/manifest.json +1 -1
  94. package/templates/.agents/runtime/pnpm-lock.sha256 +1 -1
  95. package/templates/.agents/runtime/provenance.json +5 -5
  96. package/templates/.agents/runtime/sbom.cdx.json +1 -1
  97. package/templates/.agents/skills/zaip-aios/SKILL.md +1 -1
  98. package/templates/.agents/skills/zaip-skill-execution/SKILL.md +2 -0
  99. package/templates/.agents/skills/zaip-skill-execution/references/runtime-governance.md +17 -0
  100. package/templates/.agents/skills/zaip-skill-general-operations/SKILL.md +6 -7
  101. package/templates/.agents/skills/zaip-skill-general-operations/references/extended-workflow.md +7 -0
  102. package/templates/.agents/skills/zaip-skill-github-setup/SKILL.md +5 -0
  103. package/templates/.agents/skills/zaip-skill-github-setup-ssh-folder/SKILL.md +54 -0
  104. package/templates/.agents/skills/zaip-skill-github-setup-ssh-folder/agents/openai.yaml +4 -0
  105. package/templates/.agents/skills/zaip-skill-github-setup-ssh-folder/assets/.env.example +9 -0
  106. package/templates/.agents/skills/zaip-skill-github-setup-ssh-folder/references/operational-procedure.md +137 -0
  107. package/templates/.agents/skills/zaip-skill-growth-strategy-revops/SKILL.md +7 -19
  108. package/templates/.agents/skills/zaip-skill-growth-strategy-revops/references/extended-workflow.md +21 -0
  109. package/templates/.agents/skills/zaip-skill-marketing/SKILL.md +7 -14
  110. package/templates/.agents/skills/zaip-skill-marketing/references/extended-workflow.md +16 -0
  111. package/templates/.agents/skills/zaip-skill-meta-ads-setup/SKILL.md +2 -0
  112. package/templates/.agents/skills/zaip-skill-meta-token-onboarding/SKILL.md +17 -0
  113. package/templates/.agents/skills/zaip-skill-meta-token-onboarding/agents/openai.yaml +4 -0
  114. package/templates/.agents/skills/zaip-skill-meta-token-onboarding/references/onboarding-manual.md +96 -0
  115. package/templates/.agents/skills/zaip-skill-release-qualification/SKILL.md +4 -0
  116. package/templates/.agents/skills/zaip-skill-sales-methodology/SKILL.md +8 -18
  117. package/templates/.agents/skills/zaip-skill-sales-methodology/references/extended-workflow.md +20 -0
  118. package/templates/.agents/skills/zaip-skill-setup/SKILL.md +3 -0
  119. package/templates/.agents/skills/zaip-skill-text-encoding/SKILL.md +1 -1
  120. package/templates/.agents/zaip-aios/INDEX.md +1 -1
  121. package/templates/.agents/zaip-aios/README.md +6 -0
  122. package/templates/.agents/zaip-aios/guides/08-contexto-e-tokens.md +19 -3
  123. package/templates/.agents/zaip-aios/guides/12-instalacao-e-upgrade.md +37 -7
  124. package/templates/.agents/zaip-aios/guides/20-instalacao-detalhada.md +14 -1
  125. package/templates/.agents/zaip-aios/guides/23-orquestracao-de-modelos.md +32 -3
  126. package/templates/.agents/zaip-aios/guides/26-qualidade-e-release.md +21 -0
  127. package/templates/template-manifest.json +159 -107
@@ -1,46 +1,46 @@
1
- "use strict";var Vv=Object.create;var uo=Object.defineProperty;var Wv=Object.getOwnPropertyDescriptor;var Bv=Object.getOwnPropertyNames;var Hv=Object.getPrototypeOf,Jv=Object.prototype.hasOwnProperty;var w=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Kv=(e,t)=>{for(var n in t)uo(e,n,{get:t[n],enumerable:!0})},Ed=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Bv(t))!Jv.call(e,r)&&r!==n&&uo(e,r,{get:()=>t[r],enumerable:!(i=Wv(t,r))||i.enumerable});return e};var ut=(e,t,n)=>(n=e!=null?Vv(Hv(e)):{},Ed(t||!e||!e.__esModule?uo(n,"default",{value:e,enumerable:!0}):n,e)),Gv=e=>Ed(uo({},"__esModule",{value:!0}),e);var Sr=w(mt=>{"use strict";var kd;Object.defineProperty(mt,"__esModule",{value:!0});mt.globalConfig=mt.$ZodEncodeError=mt.$ZodAsyncError=mt.$brand=mt.NEVER=void 0;mt.$constructor=Xv;mt.config=Yv;mt.NEVER=Object.freeze({status:"aborted"});function Xv(e,t,n){function i(s,l){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:l,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,l);let c=a.prototype,u=Object.keys(c);for(let d=0;d<u.length;d++){let p=u[d];p in s||(s[p]=c[p].bind(s))}}let r=n?.Parent??Object;class o extends r{}Object.defineProperty(o,"name",{value:e});function a(s){var l;let c=n?.Parent?new o:this;i(c,s),(l=c._zod).deferred??(l.deferred=[]);for(let u of c._zod.deferred)u();return c}return Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>n?.Parent&&s instanceof n.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}mt.$brand=Symbol("zod_brand");var gc=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};mt.$ZodAsyncError=gc;var yc=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};mt.$ZodEncodeError=yc;(kd=globalThis).__zod_globalConfig??(kd.__zod_globalConfig={});mt.globalConfig=globalThis.__zod_globalConfig;function Yv(e){return e&&Object.assign(mt.globalConfig,e),mt.globalConfig}});var le=w(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.Class=ne.BIGINT_FORMAT_RANGES=ne.NUMBER_FORMAT_RANGES=ne.primitiveTypes=ne.propertyKeyTypes=ne.getParsedType=ne.allowsEval=ne.captureStackTrace=void 0;ne.assertEqual=eS;ne.assertNotEqual=tS;ne.assertIs=nS;ne.assertNever=rS;ne.assert=iS;ne.getEnumValues=oS;ne.joinValues=aS;ne.jsonStringifyReplacer=sS;ne.cached=wd;ne.nullish=cS;ne.cleanRegex=lS;ne.floatSafeRemainder=uS;ne.defineLazy=dS;ne.objectClone=_S;ne.assignProp=sr;ne.mergeDefs=Yn;ne.cloneDef=pS;ne.getElementAtPath=fS;ne.promiseAllObject=mS;ne.randomString=gS;ne.esc=yS;ne.slugify=hS;ne.isObject=hc;ne.isPlainObject=_o;ne.shallowClone=vS;ne.numKeys=SS;ne.escapeRegex=ES;ne.clone=cr;ne.normalizeParams=kS;ne.createTransparentProxy=OS;ne.stringifyPrimitive=Ad;ne.optionalKeys=wS;ne.pick=AS;ne.omit=TS;ne.extend=NS;ne.safeExtend=IS;ne.merge=RS;ne.partial=$S;ne.required=CS;ne.aborted=LS;ne.explicitlyAborted=MS;ne.prefixIssues=US;ne.unwrapMessage=oi;ne.finalizeIssue=xS;ne.getSizableOrigin=PS;ne.getLengthableOrigin=DS;ne.parsedType=jS;ne.issue=zS;ne.cleanEnum=FS;ne.base64ToUint8Array=Td;ne.uint8ArrayToBase64=Nd;ne.base64urlToUint8Array=ZS;ne.uint8ArrayToBase64url=qS;ne.hexToUint8Array=VS;ne.uint8ArrayToHex=WS;var Qv=Sr();function eS(e){return e}function tS(e){return e}function nS(e){}function rS(e){throw new Error("Unexpected value in exhaustive check")}function iS(e){}function oS(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,r])=>t.indexOf(+i)===-1).map(([i,r])=>r)}function aS(e,t="|"){return e.map(n=>Ad(n)).join(t)}function sS(e,t){return typeof t=="bigint"?t.toString():t}function wd(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function cS(e){return e==null}function lS(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function uS(e,t){let n=e/t,i=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-i)<r?0:n-i}var Od=Symbol("evaluating");function dS(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==Od)return i===void 0&&(i=Od,i=n()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function _S(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function sr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Yn(...e){let t={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function pS(e){return Yn(e._zod.def)}function fS(e,t){return t?t.reduce((n,i)=>n?.[i],e):e}function mS(e){let t=Object.keys(e),n=t.map(i=>e[i]);return Promise.all(n).then(i=>{let r={};for(let o=0;o<t.length;o++)r[t[o]]=i[o];return r})}function gS(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=t[Math.floor(Math.random()*t.length)];return n}function yS(e){return JSON.stringify(e)}function hS(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}ne.captureStackTrace="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function hc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}ne.allowsEval=wd(()=>{if(Qv.globalConfig.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function _o(e){if(hc(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(hc(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function vS(e){return _o(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function SS(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var bS=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}};ne.getParsedType=bS;ne.propertyKeyTypes=new Set(["string","number","symbol"]);ne.primitiveTypes=new Set(["string","number","bigint","boolean","symbol","undefined"]);function ES(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function cr(e,t,n){let i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function kS(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function OS(e){let t;return new Proxy({},{get(n,i,r){return t??(t=e()),Reflect.get(t,i,r)},set(n,i,r,o){return t??(t=e()),Reflect.set(t,i,r,o)},has(n,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(n,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(n,i,r){return t??(t=e()),Reflect.defineProperty(t,i,r)}})}function Ad(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function wS(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}ne.NUMBER_FORMAT_RANGES={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};ne.BIGINT_FORMAT_RANGES={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function AS(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=Yn(e._zod.def,{get shape(){let a={};for(let s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(a[s]=n.shape[s])}return sr(this,"shape",a),a},checks:[]});return cr(e,o)}function TS(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=Yn(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete a[s]}return sr(this,"shape",a),a},checks:[]});return cr(e,o)}function NS(e,t){if(!_o(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let o=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=Yn(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return sr(this,"shape",o),o}});return cr(e,r)}function IS(e,t){if(!_o(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Yn(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return sr(this,"shape",i),i}});return cr(e,n)}function RS(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=Yn(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return sr(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return cr(e,n)}function $S(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=Yn(t._zod.def,{get shape(){let s=t._zod.def.shape,l={...s};if(n)for(let c in n){if(!(c in s))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(l[c]=e?new e({type:"optional",innerType:s[c]}):s[c])}else for(let c in s)l[c]=e?new e({type:"optional",innerType:s[c]}):s[c];return sr(this,"shape",l),l},checks:[]});return cr(t,a)}function CS(e,t,n){let i=Yn(t._zod.def,{get shape(){let r=t._zod.def.shape,o={...r};if(n)for(let a in n){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(o[a]=new e({type:"nonoptional",innerType:r[a]}))}else for(let a in r)o[a]=new e({type:"nonoptional",innerType:r[a]});return sr(this,"shape",o),o}});return cr(t,i)}function LS(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function MS(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function US(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function oi(e){return typeof e=="string"?e:e?.message}function xS(e,t,n){let i=e.message?e.message:oi(e.inst?._zod.def?.error?.(e))??oi(t?.error?.(e))??oi(n.customError?.(e))??oi(n.localeError?.(e))??"Invalid input",{inst:r,continue:o,input:a,...s}=e;return s.path??(s.path=[]),s.message=i,t?.reportInput&&(s.input=a),s}function PS(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function DS(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function jS(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function zS(...e){let[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}function FS(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Td(e){let t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}function Nd(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function ZS(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return Td(t+n)}function qS(e){return Nd(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function VS(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)n[i/2]=Number.parseInt(t.slice(i,i+2),16);return n}function WS(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var vc=class{constructor(...t){}};ne.Class=vc});var Sc=w(_t=>{"use strict";var BS=_t&&_t.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),HS=_t&&_t.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),JS=_t&&_t.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&BS(t,e,n);return HS(t,e),t};Object.defineProperty(_t,"__esModule",{value:!0});_t.$ZodRealError=_t.$ZodError=void 0;_t.flattenError=GS;_t.formatError=XS;_t.treeifyError=YS;_t.toDotPath=$d;_t.prettifyError=QS;var Id=Sr(),KS=JS(le()),Rd=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,KS.jsonStringifyReplacer,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})};_t.$ZodError=(0,Id.$constructor)("$ZodError",Rd);_t.$ZodRealError=(0,Id.$constructor)("$ZodError",Rd,{Parent:Error});function GS(e,t=n=>n.message){let n={},i=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):i.push(t(r));return{formErrors:i,fieldErrors:n}}function XS(e,t=n=>n.message){let n={_errors:[]},i=(r,o=[])=>{for(let a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>i({issues:s},[...o,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...o,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...o,...a.path]);else{let s=[...o,...a.path];if(s.length===0)n._errors.push(t(a));else{let l=n,c=0;for(;c<s.length;){let u=s[c];c===s.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(t(a))):l[u]=l[u]||{_errors:[]},l=l[u],c++}}}};return i(e),n}function YS(e,t=n=>n.message){let n={errors:[]},i=(r,o=[])=>{var a,s;for(let l of r.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(c=>i({issues:c},[...o,...l.path]));else if(l.code==="invalid_key")i({issues:l.issues},[...o,...l.path]);else if(l.code==="invalid_element")i({issues:l.issues},[...o,...l.path]);else{let c=[...o,...l.path];if(c.length===0){n.errors.push(t(l));continue}let u=n,d=0;for(;d<c.length;){let p=c[d],f=d===c.length-1;typeof p=="string"?(u.properties??(u.properties={}),(a=u.properties)[p]??(a[p]={errors:[]}),u=u.properties[p]):(u.items??(u.items=[]),(s=u.items)[p]??(s[p]={errors:[]}),u=u.items[p]),f&&u.errors.push(t(l)),d++}}};return i(e),n}function $d(e){let t=[],n=e.map(i=>typeof i=="object"?i.key:i);for(let i of n)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function QS(e){let t=[],n=[...e.issues].sort((i,r)=>(i.path??[]).length-(r.path??[]).length);for(let i of n)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${$d(i.path)}`);return t.join(`
2
- `)}});var Ec=w(Q=>{"use strict";var eb=Q&&Q.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),tb=Q&&Q.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),bc=Q&&Q.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&eb(t,e,n);return tb(t,e),t};Object.defineProperty(Q,"__esModule",{value:!0});Q.safeDecodeAsync=Q._safeDecodeAsync=Q.safeEncodeAsync=Q._safeEncodeAsync=Q.safeDecode=Q._safeDecode=Q.safeEncode=Q._safeEncode=Q.decodeAsync=Q._decodeAsync=Q.encodeAsync=Q._encodeAsync=Q.decode=Q._decode=Q.encode=Q._encode=Q.safeParseAsync=Q._safeParseAsync=Q.safeParse=Q._safeParse=Q.parseAsync=Q._parseAsync=Q.parse=Q._parse=void 0;var Ur=bc(Sr()),Tt=bc(Sc()),xr=bc(le()),nb=e=>(t,n,i,r)=>{let o=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise)throw new Ur.$ZodAsyncError;if(a.issues.length){let s=new(r?.Err??e)(a.issues.map(l=>xr.finalizeIssue(l,o,Ur.config())));throw xr.captureStackTrace(s,r?.callee),s}return a.value};Q._parse=nb;Q.parse=(0,Q._parse)(Tt.$ZodRealError);var rb=e=>async(t,n,i,r)=>{let o=i?{...i,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(r?.Err??e)(a.issues.map(l=>xr.finalizeIssue(l,o,Ur.config())));throw xr.captureStackTrace(s,r?.callee),s}return a.value};Q._parseAsync=rb;Q.parseAsync=(0,Q._parseAsync)(Tt.$ZodRealError);var ib=e=>(t,n,i)=>{let r=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new Ur.$ZodAsyncError;return o.issues.length?{success:!1,error:new(e??Tt.$ZodError)(o.issues.map(a=>xr.finalizeIssue(a,r,Ur.config())))}:{success:!0,data:o.value}};Q._safeParse=ib;Q.safeParse=(0,Q._safeParse)(Tt.$ZodRealError);var ob=e=>async(t,n,i)=>{let r=i?{...i,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(a=>xr.finalizeIssue(a,r,Ur.config())))}:{success:!0,data:o.value}};Q._safeParseAsync=ob;Q.safeParseAsync=(0,Q._safeParseAsync)(Tt.$ZodRealError);var ab=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return(0,Q._parse)(e)(t,n,r)};Q._encode=ab;Q.encode=(0,Q._encode)(Tt.$ZodRealError);var sb=e=>(t,n,i)=>(0,Q._parse)(e)(t,n,i);Q._decode=sb;Q.decode=(0,Q._decode)(Tt.$ZodRealError);var cb=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return(0,Q._parseAsync)(e)(t,n,r)};Q._encodeAsync=cb;Q.encodeAsync=(0,Q._encodeAsync)(Tt.$ZodRealError);var lb=e=>async(t,n,i)=>(0,Q._parseAsync)(e)(t,n,i);Q._decodeAsync=lb;Q.decodeAsync=(0,Q._decodeAsync)(Tt.$ZodRealError);var ub=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return(0,Q._safeParse)(e)(t,n,r)};Q._safeEncode=ub;Q.safeEncode=(0,Q._safeEncode)(Tt.$ZodRealError);var db=e=>(t,n,i)=>(0,Q._safeParse)(e)(t,n,i);Q._safeDecode=db;Q.safeDecode=(0,Q._safeDecode)(Tt.$ZodRealError);var _b=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return(0,Q._safeParseAsync)(e)(t,n,r)};Q._safeEncodeAsync=_b;Q.safeEncodeAsync=(0,Q._safeEncodeAsync)(Tt.$ZodRealError);var pb=e=>async(t,n,i)=>(0,Q._safeParseAsync)(e)(t,n,i);Q._safeDecodeAsync=pb;Q.safeDecodeAsync=(0,Q._safeDecodeAsync)(Tt.$ZodRealError)});var po=w(I=>{"use strict";var fb=I&&I.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),mb=I&&I.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),gb=I&&I.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&fb(t,e,n);return mb(t,e),t};Object.defineProperty(I,"__esModule",{value:!0});I.sha256_base64url=I.sha256_base64=I.sha256_hex=I.sha1_base64url=I.sha1_base64=I.sha1_hex=I.md5_base64url=I.md5_base64=I.md5_hex=I.hex=I.uppercase=I.lowercase=I.undefined=I.null=I.boolean=I.number=I.integer=I.bigint=I.string=I.date=I.e164=I.httpProtocol=I.domain=I.hostname=I.base64url=I.base64=I.cidrv6=I.cidrv4=I.mac=I.ipv6=I.ipv4=I.browserEmail=I.idnEmail=I.unicodeEmail=I.rfc5322Email=I.html5Email=I.email=I.uuid7=I.uuid6=I.uuid4=I.uuid=I.guid=I.extendedDuration=I.duration=I.nanoid=I.ksuid=I.xid=I.ulid=I.cuid2=I.cuid=void 0;I.sha512_base64url=I.sha512_base64=I.sha512_hex=I.sha384_base64url=I.sha384_base64=I.sha384_hex=void 0;I.emoji=Sb;I.time=Eb;I.datetime=kb;var yb=gb(le());I.cuid=/^[cC][0-9a-z]{6,}$/;I.cuid2=/^[0-9a-z]+$/;I.ulid=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;I.xid=/^[0-9a-vA-V]{20}$/;I.ksuid=/^[A-Za-z0-9]{27}$/;I.nanoid=/^[a-zA-Z0-9_-]{21}$/;I.duration=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;I.extendedDuration=/^[-+]?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)?)??$/;I.guid=/^([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})$/;var hb=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[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)$/;I.uuid=hb;I.uuid4=(0,I.uuid)(4);I.uuid6=(0,I.uuid)(6);I.uuid7=(0,I.uuid)(7);I.email=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;I.html5Email=/^[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])?)*$/;I.rfc5322Email=/^(([^<>()\[\]\\.,;:\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,}))$/;I.unicodeEmail=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u;I.idnEmail=I.unicodeEmail;I.browserEmail=/^[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])?)*$/;var vb="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Sb(){return new RegExp(vb,"u")}I.ipv4=/^(?:(?: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])$/;I.ipv6=/^(([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}|:))$/;var bb=e=>{let t=yb.escapeRegex(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)};I.mac=bb;I.cidrv4=/^((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])$/;I.cidrv6=/^(([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])$/;I.base64=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;I.base64url=/^[A-Za-z0-9_-]*$/;I.hostname=/^(?=.{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])?)*\.?$/;I.domain=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;I.httpProtocol=/^https?$/;I.e164=/^\+[1-9]\d{6,14}$/;var Cd="(?:(?:\\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])))";I.date=new RegExp(`^${Cd}$`);function Ld(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Eb(e){return new RegExp(`^${Ld(e)}$`)}function kb(e){let t=Ld({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${n.join("|")})`;return new RegExp(`^${Cd}T(?:${i})$`)}var Ob=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)};I.string=Ob;I.bigint=/^-?\d+n?$/;I.integer=/^-?\d+$/;I.number=/^-?\d+(?:\.\d+)?$/;I.boolean=/^(?:true|false)$/i;var wb=/^null$/i;I.null=wb;var Ab=/^undefined$/i;I.undefined=Ab;I.lowercase=/^[^A-Z]*$/;I.uppercase=/^[^a-z]*$/;I.hex=/^[0-9a-fA-F]*$/;function ai(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function si(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}I.md5_hex=/^[0-9a-fA-F]{32}$/;I.md5_base64=ai(22,"==");I.md5_base64url=si(22);I.sha1_hex=/^[0-9a-fA-F]{40}$/;I.sha1_base64=ai(27,"=");I.sha1_base64url=si(27);I.sha256_hex=/^[0-9a-fA-F]{64}$/;I.sha256_base64=ai(43,"=");I.sha256_base64url=si(43);I.sha384_hex=/^[0-9a-fA-F]{96}$/;I.sha384_base64=ai(64,"");I.sha384_base64url=si(64);I.sha512_hex=/^[0-9a-fA-F]{128}$/;I.sha512_base64=ai(86,"==");I.sha512_base64url=si(86)});var fo=w(re=>{"use strict";var Tb=re&&re.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Nb=re&&re.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),kc=re&&re.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Tb(t,e,n);return Nb(t,e),t};Object.defineProperty(re,"__esModule",{value:!0});re.$ZodCheckOverwrite=re.$ZodCheckMimeType=re.$ZodCheckProperty=re.$ZodCheckEndsWith=re.$ZodCheckStartsWith=re.$ZodCheckIncludes=re.$ZodCheckUpperCase=re.$ZodCheckLowerCase=re.$ZodCheckRegex=re.$ZodCheckStringFormat=re.$ZodCheckLengthEquals=re.$ZodCheckMinLength=re.$ZodCheckMaxLength=re.$ZodCheckSizeEquals=re.$ZodCheckMinSize=re.$ZodCheckMaxSize=re.$ZodCheckBigIntFormat=re.$ZodCheckNumberFormat=re.$ZodCheckMultipleOf=re.$ZodCheckGreaterThan=re.$ZodCheckLessThan=re.$ZodCheck=void 0;var Je=kc(Sr()),Oc=kc(po()),ot=kc(le());re.$ZodCheck=Je.$constructor("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])});var Ud={number:"number",bigint:"bigint",object:"date"};re.$ZodCheckLessThan=Je.$constructor("$ZodCheckLessThan",(e,t)=>{re.$ZodCheck.init(e,t);let n=Ud[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}});re.$ZodCheckGreaterThan=Je.$constructor("$ZodCheckGreaterThan",(e,t)=>{re.$ZodCheck.init(e,t);let n=Ud[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}});re.$ZodCheckMultipleOf=Je.$constructor("$ZodCheckMultipleOf",(e,t)=>{re.$ZodCheck.init(e,t),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):ot.floatSafeRemainder(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}});re.$ZodCheckNumberFormat=Je.$constructor("$ZodCheckNumberFormat",(e,t)=>{re.$ZodCheck.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),i=n?"int":"number",[r,o]=ot.NUMBER_FORMAT_RANGES[t.format];e._zod.onattach.push(a=>{let s=a._zod.bag;s.format=t.format,s.minimum=r,s.maximum=o,n&&(s.pattern=Oc.integer)}),e._zod.check=a=>{let s=a.value;if(n){if(!Number.isInteger(s)){a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}s<r&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}});re.$ZodCheckBigIntFormat=Je.$constructor("$ZodCheckBigIntFormat",(e,t)=>{re.$ZodCheck.init(e,t);let[n,i]=ot.BIGINT_FORMAT_RANGES[t.format];e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,o.minimum=n,o.maximum=i}),e._zod.check=r=>{let o=r.value;o<n&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>i&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}});re.$ZodCheckMaxSize=Je.$constructor("$ZodCheckMaxSize",(e,t)=>{var n;re.$ZodCheck.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!ot.nullish(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;r.size<=t.maximum||i.issues.push({origin:ot.getSizableOrigin(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}});re.$ZodCheckMinSize=Je.$constructor("$ZodCheckMinSize",(e,t)=>{var n;re.$ZodCheck.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!ot.nullish(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;r.size>=t.minimum||i.issues.push({origin:ot.getSizableOrigin(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}});re.$ZodCheckSizeEquals=Je.$constructor("$ZodCheckSizeEquals",(e,t)=>{var n;re.$ZodCheck.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!ot.nullish(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=i=>{let r=i.value,o=r.size;if(o===t.size)return;let a=o>t.size;i.issues.push({origin:ot.getSizableOrigin(r),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}});re.$ZodCheckMaxLength=Je.$constructor("$ZodCheckMaxLength",(e,t)=>{var n;re.$ZodCheck.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!ot.nullish(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;if(r.length<=t.maximum)return;let a=ot.getLengthableOrigin(r);i.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}});re.$ZodCheckMinLength=Je.$constructor("$ZodCheckMinLength",(e,t)=>{var n;re.$ZodCheck.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!ot.nullish(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;if(r.length>=t.minimum)return;let a=ot.getLengthableOrigin(r);i.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}});re.$ZodCheckLengthEquals=Je.$constructor("$ZodCheckLengthEquals",(e,t)=>{var n;re.$ZodCheck.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!ot.nullish(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=i=>{let r=i.value,o=r.length;if(o===t.length)return;let a=ot.getLengthableOrigin(r),s=o>t.length;i.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}});re.$ZodCheckStringFormat=Je.$constructor("$ZodCheckStringFormat",(e,t)=>{var n,i;re.$ZodCheck.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})});re.$ZodCheckRegex=Je.$constructor("$ZodCheckRegex",(e,t)=>{re.$ZodCheckStringFormat.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}});re.$ZodCheckLowerCase=Je.$constructor("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Oc.lowercase),re.$ZodCheckStringFormat.init(e,t)});re.$ZodCheckUpperCase=Je.$constructor("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Oc.uppercase),re.$ZodCheckStringFormat.init(e,t)});re.$ZodCheckIncludes=Je.$constructor("$ZodCheckIncludes",(e,t)=>{re.$ZodCheck.init(e,t);let n=ot.escapeRegex(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}});re.$ZodCheckStartsWith=Je.$constructor("$ZodCheckStartsWith",(e,t)=>{re.$ZodCheck.init(e,t);let n=new RegExp(`^${ot.escapeRegex(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}});re.$ZodCheckEndsWith=Je.$constructor("$ZodCheckEndsWith",(e,t)=>{re.$ZodCheck.init(e,t);let n=new RegExp(`.*${ot.escapeRegex(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function Md(e,t,n){e.issues.length&&t.issues.push(...ot.prefixIssues(n,e.issues))}re.$ZodCheckProperty=Je.$constructor("$ZodCheckProperty",(e,t)=>{re.$ZodCheck.init(e,t),e._zod.check=n=>{let i=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(r=>Md(r,n,t.property));Md(i,n,t.property)}});re.$ZodCheckMimeType=Je.$constructor("$ZodCheckMimeType",(e,t)=>{re.$ZodCheck.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}});re.$ZodCheckOverwrite=Je.$constructor("$ZodCheckOverwrite",(e,t)=>{re.$ZodCheck.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}})});var Ac=w(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.Doc=void 0;var wc=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let i=t.split(`
1
+ "use strict";var Wv=Object.create;var _o=Object.defineProperty;var Bv=Object.getOwnPropertyDescriptor;var Hv=Object.getOwnPropertyNames;var Jv=Object.getPrototypeOf,Kv=Object.prototype.hasOwnProperty;var w=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Gv=(e,t)=>{for(var n in t)_o(e,n,{get:t[n],enumerable:!0})},kd=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Hv(t))!Kv.call(e,r)&&r!==n&&_o(e,r,{get:()=>t[r],enumerable:!(i=Bv(t,r))||i.enumerable});return e};var ut=(e,t,n)=>(n=e!=null?Wv(Jv(e)):{},kd(t||!e||!e.__esModule?_o(n,"default",{value:e,enumerable:!0}):n,e)),Xv=e=>kd(_o({},"__esModule",{value:!0}),e);var br=w(mt=>{"use strict";var Od;Object.defineProperty(mt,"__esModule",{value:!0});mt.globalConfig=mt.$ZodEncodeError=mt.$ZodAsyncError=mt.$brand=mt.NEVER=void 0;mt.$constructor=Yv;mt.config=Qv;mt.NEVER=Object.freeze({status:"aborted"});function Yv(e,t,n){function i(s,l){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:l,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,l);let c=a.prototype,u=Object.keys(c);for(let d=0;d<u.length;d++){let p=u[d];p in s||(s[p]=c[p].bind(s))}}let r=n?.Parent??Object;class o extends r{}Object.defineProperty(o,"name",{value:e});function a(s){var l;let c=n?.Parent?new o:this;i(c,s),(l=c._zod).deferred??(l.deferred=[]);for(let u of c._zod.deferred)u();return c}return Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>n?.Parent&&s instanceof n.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}mt.$brand=Symbol("zod_brand");var hc=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};mt.$ZodAsyncError=hc;var vc=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};mt.$ZodEncodeError=vc;(Od=globalThis).__zod_globalConfig??(Od.__zod_globalConfig={});mt.globalConfig=globalThis.__zod_globalConfig;function Qv(e){return e&&Object.assign(mt.globalConfig,e),mt.globalConfig}});var le=w(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.Class=re.BIGINT_FORMAT_RANGES=re.NUMBER_FORMAT_RANGES=re.primitiveTypes=re.propertyKeyTypes=re.getParsedType=re.allowsEval=re.captureStackTrace=void 0;re.assertEqual=tS;re.assertNotEqual=nS;re.assertIs=rS;re.assertNever=iS;re.assert=oS;re.getEnumValues=aS;re.joinValues=sS;re.jsonStringifyReplacer=cS;re.cached=Ad;re.nullish=lS;re.cleanRegex=uS;re.floatSafeRemainder=dS;re.defineLazy=_S;re.objectClone=pS;re.assignProp=sr;re.mergeDefs=Yn;re.cloneDef=fS;re.getElementAtPath=mS;re.promiseAllObject=gS;re.randomString=yS;re.esc=hS;re.slugify=vS;re.isObject=Sc;re.isPlainObject=po;re.shallowClone=SS;re.numKeys=bS;re.escapeRegex=kS;re.clone=cr;re.normalizeParams=OS;re.createTransparentProxy=wS;re.stringifyPrimitive=Td;re.optionalKeys=AS;re.pick=TS;re.omit=NS;re.extend=IS;re.safeExtend=RS;re.merge=$S;re.partial=CS;re.required=LS;re.aborted=MS;re.explicitlyAborted=US;re.prefixIssues=xS;re.unwrapMessage=oi;re.finalizeIssue=DS;re.getSizableOrigin=PS;re.getLengthableOrigin=jS;re.parsedType=zS;re.issue=FS;re.cleanEnum=ZS;re.base64ToUint8Array=Nd;re.uint8ArrayToBase64=Id;re.base64urlToUint8Array=qS;re.uint8ArrayToBase64url=VS;re.hexToUint8Array=WS;re.uint8ArrayToHex=BS;var eS=br();function tS(e){return e}function nS(e){return e}function rS(e){}function iS(e){throw new Error("Unexpected value in exhaustive check")}function oS(e){}function aS(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,r])=>t.indexOf(+i)===-1).map(([i,r])=>r)}function sS(e,t="|"){return e.map(n=>Td(n)).join(t)}function cS(e,t){return typeof t=="bigint"?t.toString():t}function Ad(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function lS(e){return e==null}function uS(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function dS(e,t){let n=e/t,i=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-i)<r?0:n-i}var wd=Symbol("evaluating");function _S(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==wd)return i===void 0&&(i=wd,i=n()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function pS(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function sr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Yn(...e){let t={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function fS(e){return Yn(e._zod.def)}function mS(e,t){return t?t.reduce((n,i)=>n?.[i],e):e}function gS(e){let t=Object.keys(e),n=t.map(i=>e[i]);return Promise.all(n).then(i=>{let r={};for(let o=0;o<t.length;o++)r[t[o]]=i[o];return r})}function yS(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=t[Math.floor(Math.random()*t.length)];return n}function hS(e){return JSON.stringify(e)}function vS(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}re.captureStackTrace="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Sc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}re.allowsEval=Ad(()=>{if(eS.globalConfig.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function po(e){if(Sc(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(Sc(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function SS(e){return po(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function bS(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var ES=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}};re.getParsedType=ES;re.propertyKeyTypes=new Set(["string","number","symbol"]);re.primitiveTypes=new Set(["string","number","bigint","boolean","symbol","undefined"]);function kS(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function cr(e,t,n){let i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function OS(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function wS(e){let t;return new Proxy({},{get(n,i,r){return t??(t=e()),Reflect.get(t,i,r)},set(n,i,r,o){return t??(t=e()),Reflect.set(t,i,r,o)},has(n,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(n,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(n,i,r){return t??(t=e()),Reflect.defineProperty(t,i,r)}})}function Td(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function AS(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}re.NUMBER_FORMAT_RANGES={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};re.BIGINT_FORMAT_RANGES={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function TS(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=Yn(e._zod.def,{get shape(){let a={};for(let s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(a[s]=n.shape[s])}return sr(this,"shape",a),a},checks:[]});return cr(e,o)}function NS(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=Yn(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete a[s]}return sr(this,"shape",a),a},checks:[]});return cr(e,o)}function IS(e,t){if(!po(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let o=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=Yn(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return sr(this,"shape",o),o}});return cr(e,r)}function RS(e,t){if(!po(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Yn(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return sr(this,"shape",i),i}});return cr(e,n)}function $S(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=Yn(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return sr(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return cr(e,n)}function CS(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=Yn(t._zod.def,{get shape(){let s=t._zod.def.shape,l={...s};if(n)for(let c in n){if(!(c in s))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(l[c]=e?new e({type:"optional",innerType:s[c]}):s[c])}else for(let c in s)l[c]=e?new e({type:"optional",innerType:s[c]}):s[c];return sr(this,"shape",l),l},checks:[]});return cr(t,a)}function LS(e,t,n){let i=Yn(t._zod.def,{get shape(){let r=t._zod.def.shape,o={...r};if(n)for(let a in n){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(o[a]=new e({type:"nonoptional",innerType:r[a]}))}else for(let a in r)o[a]=new e({type:"nonoptional",innerType:r[a]});return sr(this,"shape",o),o}});return cr(t,i)}function MS(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function US(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function xS(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function oi(e){return typeof e=="string"?e:e?.message}function DS(e,t,n){let i=e.message?e.message:oi(e.inst?._zod.def?.error?.(e))??oi(t?.error?.(e))??oi(n.customError?.(e))??oi(n.localeError?.(e))??"Invalid input",{inst:r,continue:o,input:a,...s}=e;return s.path??(s.path=[]),s.message=i,t?.reportInput&&(s.input=a),s}function PS(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function jS(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function zS(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function FS(...e){let[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}function ZS(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Nd(e){let t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}function Id(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function qS(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return Nd(t+n)}function VS(e){return Id(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function WS(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)n[i/2]=Number.parseInt(t.slice(i,i+2),16);return n}function BS(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var bc=class{constructor(...t){}};re.Class=bc});var Ec=w(_t=>{"use strict";var HS=_t&&_t.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),JS=_t&&_t.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),KS=_t&&_t.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&HS(t,e,n);return JS(t,e),t};Object.defineProperty(_t,"__esModule",{value:!0});_t.$ZodRealError=_t.$ZodError=void 0;_t.flattenError=XS;_t.formatError=YS;_t.treeifyError=QS;_t.toDotPath=Cd;_t.prettifyError=eb;var Rd=br(),GS=KS(le()),$d=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,GS.jsonStringifyReplacer,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})};_t.$ZodError=(0,Rd.$constructor)("$ZodError",$d);_t.$ZodRealError=(0,Rd.$constructor)("$ZodError",$d,{Parent:Error});function XS(e,t=n=>n.message){let n={},i=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):i.push(t(r));return{formErrors:i,fieldErrors:n}}function YS(e,t=n=>n.message){let n={_errors:[]},i=(r,o=[])=>{for(let a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>i({issues:s},[...o,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...o,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...o,...a.path]);else{let s=[...o,...a.path];if(s.length===0)n._errors.push(t(a));else{let l=n,c=0;for(;c<s.length;){let u=s[c];c===s.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(t(a))):l[u]=l[u]||{_errors:[]},l=l[u],c++}}}};return i(e),n}function QS(e,t=n=>n.message){let n={errors:[]},i=(r,o=[])=>{var a,s;for(let l of r.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(c=>i({issues:c},[...o,...l.path]));else if(l.code==="invalid_key")i({issues:l.issues},[...o,...l.path]);else if(l.code==="invalid_element")i({issues:l.issues},[...o,...l.path]);else{let c=[...o,...l.path];if(c.length===0){n.errors.push(t(l));continue}let u=n,d=0;for(;d<c.length;){let p=c[d],f=d===c.length-1;typeof p=="string"?(u.properties??(u.properties={}),(a=u.properties)[p]??(a[p]={errors:[]}),u=u.properties[p]):(u.items??(u.items=[]),(s=u.items)[p]??(s[p]={errors:[]}),u=u.items[p]),f&&u.errors.push(t(l)),d++}}};return i(e),n}function Cd(e){let t=[],n=e.map(i=>typeof i=="object"?i.key:i);for(let i of n)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function eb(e){let t=[],n=[...e.issues].sort((i,r)=>(i.path??[]).length-(r.path??[]).length);for(let i of n)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${Cd(i.path)}`);return t.join(`
2
+ `)}});var Oc=w(ee=>{"use strict";var tb=ee&&ee.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),nb=ee&&ee.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),kc=ee&&ee.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&tb(t,e,n);return nb(t,e),t};Object.defineProperty(ee,"__esModule",{value:!0});ee.safeDecodeAsync=ee._safeDecodeAsync=ee.safeEncodeAsync=ee._safeEncodeAsync=ee.safeDecode=ee._safeDecode=ee.safeEncode=ee._safeEncode=ee.decodeAsync=ee._decodeAsync=ee.encodeAsync=ee._encodeAsync=ee.decode=ee._decode=ee.encode=ee._encode=ee.safeParseAsync=ee._safeParseAsync=ee.safeParse=ee._safeParse=ee.parseAsync=ee._parseAsync=ee.parse=ee._parse=void 0;var Ur=kc(br()),Nt=kc(Ec()),xr=kc(le()),rb=e=>(t,n,i,r)=>{let o=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise)throw new Ur.$ZodAsyncError;if(a.issues.length){let s=new(r?.Err??e)(a.issues.map(l=>xr.finalizeIssue(l,o,Ur.config())));throw xr.captureStackTrace(s,r?.callee),s}return a.value};ee._parse=rb;ee.parse=(0,ee._parse)(Nt.$ZodRealError);var ib=e=>async(t,n,i,r)=>{let o=i?{...i,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(r?.Err??e)(a.issues.map(l=>xr.finalizeIssue(l,o,Ur.config())));throw xr.captureStackTrace(s,r?.callee),s}return a.value};ee._parseAsync=ib;ee.parseAsync=(0,ee._parseAsync)(Nt.$ZodRealError);var ob=e=>(t,n,i)=>{let r=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new Ur.$ZodAsyncError;return o.issues.length?{success:!1,error:new(e??Nt.$ZodError)(o.issues.map(a=>xr.finalizeIssue(a,r,Ur.config())))}:{success:!0,data:o.value}};ee._safeParse=ob;ee.safeParse=(0,ee._safeParse)(Nt.$ZodRealError);var ab=e=>async(t,n,i)=>{let r=i?{...i,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(a=>xr.finalizeIssue(a,r,Ur.config())))}:{success:!0,data:o.value}};ee._safeParseAsync=ab;ee.safeParseAsync=(0,ee._safeParseAsync)(Nt.$ZodRealError);var sb=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return(0,ee._parse)(e)(t,n,r)};ee._encode=sb;ee.encode=(0,ee._encode)(Nt.$ZodRealError);var cb=e=>(t,n,i)=>(0,ee._parse)(e)(t,n,i);ee._decode=cb;ee.decode=(0,ee._decode)(Nt.$ZodRealError);var lb=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return(0,ee._parseAsync)(e)(t,n,r)};ee._encodeAsync=lb;ee.encodeAsync=(0,ee._encodeAsync)(Nt.$ZodRealError);var ub=e=>async(t,n,i)=>(0,ee._parseAsync)(e)(t,n,i);ee._decodeAsync=ub;ee.decodeAsync=(0,ee._decodeAsync)(Nt.$ZodRealError);var db=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return(0,ee._safeParse)(e)(t,n,r)};ee._safeEncode=db;ee.safeEncode=(0,ee._safeEncode)(Nt.$ZodRealError);var _b=e=>(t,n,i)=>(0,ee._safeParse)(e)(t,n,i);ee._safeDecode=_b;ee.safeDecode=(0,ee._safeDecode)(Nt.$ZodRealError);var pb=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return(0,ee._safeParseAsync)(e)(t,n,r)};ee._safeEncodeAsync=pb;ee.safeEncodeAsync=(0,ee._safeEncodeAsync)(Nt.$ZodRealError);var fb=e=>async(t,n,i)=>(0,ee._safeParseAsync)(e)(t,n,i);ee._safeDecodeAsync=fb;ee.safeDecodeAsync=(0,ee._safeDecodeAsync)(Nt.$ZodRealError)});var fo=w(I=>{"use strict";var mb=I&&I.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),gb=I&&I.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),yb=I&&I.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&mb(t,e,n);return gb(t,e),t};Object.defineProperty(I,"__esModule",{value:!0});I.sha256_base64url=I.sha256_base64=I.sha256_hex=I.sha1_base64url=I.sha1_base64=I.sha1_hex=I.md5_base64url=I.md5_base64=I.md5_hex=I.hex=I.uppercase=I.lowercase=I.undefined=I.null=I.boolean=I.number=I.integer=I.bigint=I.string=I.date=I.e164=I.httpProtocol=I.domain=I.hostname=I.base64url=I.base64=I.cidrv6=I.cidrv4=I.mac=I.ipv6=I.ipv4=I.browserEmail=I.idnEmail=I.unicodeEmail=I.rfc5322Email=I.html5Email=I.email=I.uuid7=I.uuid6=I.uuid4=I.uuid=I.guid=I.extendedDuration=I.duration=I.nanoid=I.ksuid=I.xid=I.ulid=I.cuid2=I.cuid=void 0;I.sha512_base64url=I.sha512_base64=I.sha512_hex=I.sha384_base64url=I.sha384_base64=I.sha384_hex=void 0;I.emoji=bb;I.time=kb;I.datetime=Ob;var hb=yb(le());I.cuid=/^[cC][0-9a-z]{6,}$/;I.cuid2=/^[0-9a-z]+$/;I.ulid=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;I.xid=/^[0-9a-vA-V]{20}$/;I.ksuid=/^[A-Za-z0-9]{27}$/;I.nanoid=/^[a-zA-Z0-9_-]{21}$/;I.duration=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;I.extendedDuration=/^[-+]?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)?)??$/;I.guid=/^([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})$/;var vb=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[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)$/;I.uuid=vb;I.uuid4=(0,I.uuid)(4);I.uuid6=(0,I.uuid)(6);I.uuid7=(0,I.uuid)(7);I.email=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;I.html5Email=/^[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])?)*$/;I.rfc5322Email=/^(([^<>()\[\]\\.,;:\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,}))$/;I.unicodeEmail=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u;I.idnEmail=I.unicodeEmail;I.browserEmail=/^[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])?)*$/;var Sb="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function bb(){return new RegExp(Sb,"u")}I.ipv4=/^(?:(?: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])$/;I.ipv6=/^(([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}|:))$/;var Eb=e=>{let t=hb.escapeRegex(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)};I.mac=Eb;I.cidrv4=/^((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])$/;I.cidrv6=/^(([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])$/;I.base64=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;I.base64url=/^[A-Za-z0-9_-]*$/;I.hostname=/^(?=.{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])?)*\.?$/;I.domain=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;I.httpProtocol=/^https?$/;I.e164=/^\+[1-9]\d{6,14}$/;var Ld="(?:(?:\\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])))";I.date=new RegExp(`^${Ld}$`);function Md(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function kb(e){return new RegExp(`^${Md(e)}$`)}function Ob(e){let t=Md({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${n.join("|")})`;return new RegExp(`^${Ld}T(?:${i})$`)}var wb=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)};I.string=wb;I.bigint=/^-?\d+n?$/;I.integer=/^-?\d+$/;I.number=/^-?\d+(?:\.\d+)?$/;I.boolean=/^(?:true|false)$/i;var Ab=/^null$/i;I.null=Ab;var Tb=/^undefined$/i;I.undefined=Tb;I.lowercase=/^[^A-Z]*$/;I.uppercase=/^[^a-z]*$/;I.hex=/^[0-9a-fA-F]*$/;function ai(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function si(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}I.md5_hex=/^[0-9a-fA-F]{32}$/;I.md5_base64=ai(22,"==");I.md5_base64url=si(22);I.sha1_hex=/^[0-9a-fA-F]{40}$/;I.sha1_base64=ai(27,"=");I.sha1_base64url=si(27);I.sha256_hex=/^[0-9a-fA-F]{64}$/;I.sha256_base64=ai(43,"=");I.sha256_base64url=si(43);I.sha384_hex=/^[0-9a-fA-F]{96}$/;I.sha384_base64=ai(64,"");I.sha384_base64url=si(64);I.sha512_hex=/^[0-9a-fA-F]{128}$/;I.sha512_base64=ai(86,"==");I.sha512_base64url=si(86)});var mo=w(ie=>{"use strict";var Nb=ie&&ie.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Ib=ie&&ie.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),wc=ie&&ie.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Nb(t,e,n);return Ib(t,e),t};Object.defineProperty(ie,"__esModule",{value:!0});ie.$ZodCheckOverwrite=ie.$ZodCheckMimeType=ie.$ZodCheckProperty=ie.$ZodCheckEndsWith=ie.$ZodCheckStartsWith=ie.$ZodCheckIncludes=ie.$ZodCheckUpperCase=ie.$ZodCheckLowerCase=ie.$ZodCheckRegex=ie.$ZodCheckStringFormat=ie.$ZodCheckLengthEquals=ie.$ZodCheckMinLength=ie.$ZodCheckMaxLength=ie.$ZodCheckSizeEquals=ie.$ZodCheckMinSize=ie.$ZodCheckMaxSize=ie.$ZodCheckBigIntFormat=ie.$ZodCheckNumberFormat=ie.$ZodCheckMultipleOf=ie.$ZodCheckGreaterThan=ie.$ZodCheckLessThan=ie.$ZodCheck=void 0;var Je=wc(br()),Ac=wc(fo()),ot=wc(le());ie.$ZodCheck=Je.$constructor("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])});var xd={number:"number",bigint:"bigint",object:"date"};ie.$ZodCheckLessThan=Je.$constructor("$ZodCheckLessThan",(e,t)=>{ie.$ZodCheck.init(e,t);let n=xd[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}});ie.$ZodCheckGreaterThan=Je.$constructor("$ZodCheckGreaterThan",(e,t)=>{ie.$ZodCheck.init(e,t);let n=xd[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}});ie.$ZodCheckMultipleOf=Je.$constructor("$ZodCheckMultipleOf",(e,t)=>{ie.$ZodCheck.init(e,t),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):ot.floatSafeRemainder(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}});ie.$ZodCheckNumberFormat=Je.$constructor("$ZodCheckNumberFormat",(e,t)=>{ie.$ZodCheck.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),i=n?"int":"number",[r,o]=ot.NUMBER_FORMAT_RANGES[t.format];e._zod.onattach.push(a=>{let s=a._zod.bag;s.format=t.format,s.minimum=r,s.maximum=o,n&&(s.pattern=Ac.integer)}),e._zod.check=a=>{let s=a.value;if(n){if(!Number.isInteger(s)){a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}s<r&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}});ie.$ZodCheckBigIntFormat=Je.$constructor("$ZodCheckBigIntFormat",(e,t)=>{ie.$ZodCheck.init(e,t);let[n,i]=ot.BIGINT_FORMAT_RANGES[t.format];e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,o.minimum=n,o.maximum=i}),e._zod.check=r=>{let o=r.value;o<n&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>i&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}});ie.$ZodCheckMaxSize=Je.$constructor("$ZodCheckMaxSize",(e,t)=>{var n;ie.$ZodCheck.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!ot.nullish(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;r.size<=t.maximum||i.issues.push({origin:ot.getSizableOrigin(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}});ie.$ZodCheckMinSize=Je.$constructor("$ZodCheckMinSize",(e,t)=>{var n;ie.$ZodCheck.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!ot.nullish(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;r.size>=t.minimum||i.issues.push({origin:ot.getSizableOrigin(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}});ie.$ZodCheckSizeEquals=Je.$constructor("$ZodCheckSizeEquals",(e,t)=>{var n;ie.$ZodCheck.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!ot.nullish(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=i=>{let r=i.value,o=r.size;if(o===t.size)return;let a=o>t.size;i.issues.push({origin:ot.getSizableOrigin(r),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}});ie.$ZodCheckMaxLength=Je.$constructor("$ZodCheckMaxLength",(e,t)=>{var n;ie.$ZodCheck.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!ot.nullish(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;if(r.length<=t.maximum)return;let a=ot.getLengthableOrigin(r);i.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}});ie.$ZodCheckMinLength=Je.$constructor("$ZodCheckMinLength",(e,t)=>{var n;ie.$ZodCheck.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!ot.nullish(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;if(r.length>=t.minimum)return;let a=ot.getLengthableOrigin(r);i.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}});ie.$ZodCheckLengthEquals=Je.$constructor("$ZodCheckLengthEquals",(e,t)=>{var n;ie.$ZodCheck.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!ot.nullish(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=i=>{let r=i.value,o=r.length;if(o===t.length)return;let a=ot.getLengthableOrigin(r),s=o>t.length;i.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}});ie.$ZodCheckStringFormat=Je.$constructor("$ZodCheckStringFormat",(e,t)=>{var n,i;ie.$ZodCheck.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})});ie.$ZodCheckRegex=Je.$constructor("$ZodCheckRegex",(e,t)=>{ie.$ZodCheckStringFormat.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}});ie.$ZodCheckLowerCase=Je.$constructor("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Ac.lowercase),ie.$ZodCheckStringFormat.init(e,t)});ie.$ZodCheckUpperCase=Je.$constructor("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Ac.uppercase),ie.$ZodCheckStringFormat.init(e,t)});ie.$ZodCheckIncludes=Je.$constructor("$ZodCheckIncludes",(e,t)=>{ie.$ZodCheck.init(e,t);let n=ot.escapeRegex(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}});ie.$ZodCheckStartsWith=Je.$constructor("$ZodCheckStartsWith",(e,t)=>{ie.$ZodCheck.init(e,t);let n=new RegExp(`^${ot.escapeRegex(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}});ie.$ZodCheckEndsWith=Je.$constructor("$ZodCheckEndsWith",(e,t)=>{ie.$ZodCheck.init(e,t);let n=new RegExp(`.*${ot.escapeRegex(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function Ud(e,t,n){e.issues.length&&t.issues.push(...ot.prefixIssues(n,e.issues))}ie.$ZodCheckProperty=Je.$constructor("$ZodCheckProperty",(e,t)=>{ie.$ZodCheck.init(e,t),e._zod.check=n=>{let i=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(r=>Ud(r,n,t.property));Ud(i,n,t.property)}});ie.$ZodCheckMimeType=Je.$constructor("$ZodCheckMimeType",(e,t)=>{ie.$ZodCheck.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}});ie.$ZodCheckOverwrite=Je.$constructor("$ZodCheckOverwrite",(e,t)=>{ie.$ZodCheck.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}})});var Nc=w(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.Doc=void 0;var Tc=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let i=t.split(`
3
3
  `).filter(a=>a),r=Math.min(...i.map(a=>a.length-a.trimStart().length)),o=i.map(a=>a.slice(r)).map(a=>" ".repeat(this.indent*2)+a);for(let a of o)this.content.push(a)}compile(){let t=Function,n=this?.args,r=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...n,r.join(`
4
- `))}};mo.Doc=wc});var Tc=w(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.version=void 0;go.version={major:4,minor:4,patch:3}});var Rc=w(y=>{"use strict";var Ib=y&&y.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Rb=y&&y.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),bo=y&&y.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Ib(t,e,n);return Rb(t,e),t};Object.defineProperty(y,"__esModule",{value:!0});y.$ZodTuple=y.$ZodIntersection=y.$ZodDiscriminatedUnion=y.$ZodXor=y.$ZodUnion=y.$ZodObjectJIT=y.$ZodObject=y.$ZodArray=y.$ZodDate=y.$ZodVoid=y.$ZodNever=y.$ZodUnknown=y.$ZodAny=y.$ZodNull=y.$ZodUndefined=y.$ZodSymbol=y.$ZodBigIntFormat=y.$ZodBigInt=y.$ZodBoolean=y.$ZodNumberFormat=y.$ZodNumber=y.$ZodCustomStringFormat=y.$ZodJWT=y.$ZodE164=y.$ZodBase64URL=y.$ZodBase64=y.$ZodCIDRv6=y.$ZodCIDRv4=y.$ZodMAC=y.$ZodIPv6=y.$ZodIPv4=y.$ZodISODuration=y.$ZodISOTime=y.$ZodISODate=y.$ZodISODateTime=y.$ZodKSUID=y.$ZodXID=y.$ZodULID=y.$ZodCUID2=y.$ZodCUID=y.$ZodNanoID=y.$ZodEmoji=y.$ZodURL=y.$ZodEmail=y.$ZodUUID=y.$ZodGUID=y.$ZodStringFormat=y.$ZodString=y.clone=y.$ZodType=void 0;y.$ZodCustom=y.$ZodLazy=y.$ZodPromise=y.$ZodFunction=y.$ZodTemplateLiteral=y.$ZodReadonly=y.$ZodPreprocess=y.$ZodCodec=y.$ZodPipe=y.$ZodNaN=y.$ZodCatch=y.$ZodSuccess=y.$ZodNonOptional=y.$ZodPrefault=y.$ZodDefault=y.$ZodNullable=y.$ZodExactOptional=y.$ZodOptional=y.$ZodTransform=y.$ZodFile=y.$ZodLiteral=y.$ZodEnum=y.$ZodSet=y.$ZodMap=y.$ZodRecord=void 0;y.isValidBase64=Ic;y.isValidBase64URL=Gd;y.isValidJWT=Xd;var Eo=bo(fo()),G=bo(Sr()),$b=Ac(),Pr=Ec(),Ce=bo(po()),X=bo(le()),Cb=Tc();y.$ZodType=G.$constructor("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Cb.version;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let r of i)for(let o of r._zod.onattach)o(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(a,s,l)=>{let c=X.aborted(a),u;for(let d of s){if(d._zod.def.when){if(X.explicitlyAborted(a)||!d._zod.def.when(a))continue}else if(c)continue;let p=a.issues.length,f=d._zod.check(a);if(f instanceof Promise&&l?.async===!1)throw new G.$ZodAsyncError;if(u||f instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await f,a.issues.length!==p&&(c||(c=X.aborted(a,p)))});else{if(a.issues.length===p)continue;c||(c=X.aborted(a,p))}}return u?u.then(()=>a):a},o=(a,s,l)=>{if(X.aborted(a))return a.aborted=!0,a;let c=r(s,i,l);if(c instanceof Promise){if(l.async===!1)throw new G.$ZodAsyncError;return c.then(u=>e._zod.parse(u,l))}return e._zod.parse(c,l)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let c=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return c instanceof Promise?c.then(u=>o(u,a,s)):o(c,a,s)}let l=e._zod.parse(a,s);if(l instanceof Promise){if(s.async===!1)throw new G.$ZodAsyncError;return l.then(c=>r(c,i,s))}return r(l,i,s)}}X.defineLazy(e,"~standard",()=>({validate:r=>{try{let o=(0,Pr.safeParse)(e,r);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return(0,Pr.safeParseAsync)(e,r).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))});var Lb=le();Object.defineProperty(y,"clone",{enumerable:!0,get:function(){return Lb.clone}});y.$ZodString=G.$constructor("$ZodString",(e,t)=>{y.$ZodType.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Ce.string(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}});y.$ZodStringFormat=G.$constructor("$ZodStringFormat",(e,t)=>{Eo.$ZodCheckStringFormat.init(e,t),y.$ZodString.init(e,t)});y.$ZodGUID=G.$constructor("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Ce.guid),y.$ZodStringFormat.init(e,t)});y.$ZodUUID=G.$constructor("$ZodUUID",(e,t)=>{if(t.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ce.uuid(i))}else t.pattern??(t.pattern=Ce.uuid());y.$ZodStringFormat.init(e,t)});y.$ZodEmail=G.$constructor("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Ce.email),y.$ZodStringFormat.init(e,t)});y.$ZodURL=G.$constructor("$ZodURL",(e,t)=>{y.$ZodStringFormat.init(e,t),e._zod.check=n=>{try{let i=n.value.trim();if(!t.normalize&&t.protocol?.source===Ce.httpProtocol.source&&!/^https?:\/\//i.test(i)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}let r=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}});y.$ZodEmoji=G.$constructor("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ce.emoji()),y.$ZodStringFormat.init(e,t)});y.$ZodNanoID=G.$constructor("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Ce.nanoid),y.$ZodStringFormat.init(e,t)});y.$ZodCUID=G.$constructor("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Ce.cuid),y.$ZodStringFormat.init(e,t)});y.$ZodCUID2=G.$constructor("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ce.cuid2),y.$ZodStringFormat.init(e,t)});y.$ZodULID=G.$constructor("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ce.ulid),y.$ZodStringFormat.init(e,t)});y.$ZodXID=G.$constructor("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ce.xid),y.$ZodStringFormat.init(e,t)});y.$ZodKSUID=G.$constructor("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Ce.ksuid),y.$ZodStringFormat.init(e,t)});y.$ZodISODateTime=G.$constructor("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Ce.datetime(t)),y.$ZodStringFormat.init(e,t)});y.$ZodISODate=G.$constructor("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Ce.date),y.$ZodStringFormat.init(e,t)});y.$ZodISOTime=G.$constructor("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ce.time(t)),y.$ZodStringFormat.init(e,t)});y.$ZodISODuration=G.$constructor("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Ce.duration),y.$ZodStringFormat.init(e,t)});y.$ZodIPv4=G.$constructor("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Ce.ipv4),y.$ZodStringFormat.init(e,t),e._zod.bag.format="ipv4"});y.$ZodIPv6=G.$constructor("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Ce.ipv6),y.$ZodStringFormat.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}});y.$ZodMAC=G.$constructor("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Ce.mac(t.delimiter)),y.$ZodStringFormat.init(e,t),e._zod.bag.format="mac"});y.$ZodCIDRv4=G.$constructor("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Ce.cidrv4),y.$ZodStringFormat.init(e,t)});y.$ZodCIDRv6=G.$constructor("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ce.cidrv6),y.$ZodStringFormat.init(e,t),e._zod.check=n=>{let i=n.value.split("/");try{if(i.length!==2)throw new Error;let[r,o]=i;if(!o)throw new Error;let a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Ic(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}y.$ZodBase64=G.$constructor("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Ce.base64),y.$ZodStringFormat.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Ic(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Gd(e){if(!Ce.base64url.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Ic(n)}y.$ZodBase64URL=G.$constructor("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ce.base64url),y.$ZodStringFormat.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Gd(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}});y.$ZodE164=G.$constructor("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Ce.e164),y.$ZodStringFormat.init(e,t)});function Xd(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let r=JSON.parse(atob(i));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}y.$ZodJWT=G.$constructor("$ZodJWT",(e,t)=>{y.$ZodStringFormat.init(e,t),e._zod.check=n=>{Xd(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}});y.$ZodCustomStringFormat=G.$constructor("$ZodCustomStringFormat",(e,t)=>{y.$ZodStringFormat.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}});y.$ZodNumber=G.$constructor("$ZodNumber",(e,t)=>{y.$ZodType.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ce.number,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let o=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...o?{received:o}:{}}),n}});y.$ZodNumberFormat=G.$constructor("$ZodNumberFormat",(e,t)=>{Eo.$ZodCheckNumberFormat.init(e,t),y.$ZodNumber.init(e,t)});y.$ZodBoolean=G.$constructor("$ZodBoolean",(e,t)=>{y.$ZodType.init(e,t),e._zod.pattern=Ce.boolean,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}});y.$ZodBigInt=G.$constructor("$ZodBigInt",(e,t)=>{y.$ZodType.init(e,t),e._zod.pattern=Ce.bigint,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}});y.$ZodBigIntFormat=G.$constructor("$ZodBigIntFormat",(e,t)=>{Eo.$ZodCheckBigIntFormat.init(e,t),y.$ZodBigInt.init(e,t)});y.$ZodSymbol=G.$constructor("$ZodSymbol",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}});y.$ZodUndefined=G.$constructor("$ZodUndefined",(e,t)=>{y.$ZodType.init(e,t),e._zod.pattern=Ce.undefined,e._zod.values=new Set([void 0]),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}});y.$ZodNull=G.$constructor("$ZodNull",(e,t)=>{y.$ZodType.init(e,t),e._zod.pattern=Ce.null,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}});y.$ZodAny=G.$constructor("$ZodAny",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=n=>n});y.$ZodUnknown=G.$constructor("$ZodUnknown",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=n=>n});y.$ZodNever=G.$constructor("$ZodNever",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});y.$ZodVoid=G.$constructor("$ZodVoid",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}});y.$ZodDate=G.$constructor("$ZodDate",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:e}),n}});function xd(e,t,n){e.issues.length&&t.issues.push(...X.prefixIssues(n,e.issues)),t.value[n]=e.value}y.$ZodArray=G.$constructor("$ZodArray",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let o=[];for(let a=0;a<r.length;a++){let s=r[a],l=t.element._zod.run({value:s,issues:[]},i);l instanceof Promise?o.push(l.then(c=>xd(c,n,a))):xd(l,n,a)}return o.length?Promise.all(o).then(()=>n):n}});function So(e,t,n,i,r,o){let a=n in i;if(e.issues.length){if(r&&o&&!a)return;t.issues.push(...X.prefixIssues(n,e.issues))}if(!a&&!r){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?a&&(t.value[n]=void 0):t.value[n]=e.value}function Yd(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let n=X.optionalKeys(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Qd(e,t,n,i,r,o){let a=[],s=r.keySet,l=r.catchall._zod,c=l.def.type,u=l.optin==="optional",d=l.optout==="optional";for(let p in t){if(p==="__proto__"||s.has(p))continue;if(c==="never"){a.push(p);continue}let f=l.run({value:t[p],issues:[]},i);f instanceof Promise?e.push(f.then(S=>So(S,n,p,t,u,d))):So(f,n,p,t,u,d)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}y.$ZodObject=G.$constructor("$ZodObject",(e,t)=>{if(y.$ZodType.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let l={...s};return Object.defineProperty(t,"shape",{value:l}),l}})}let i=X.cached(()=>Yd(t));X.defineLazy(e._zod,"propValues",()=>{let s=t.shape,l={};for(let c in s){let u=s[c]._zod;if(u.values){l[c]??(l[c]=new Set);for(let d of u.values)l[c].add(d)}}return l});let r=X.isObject,o=t.catchall,a;e._zod.parse=(s,l)=>{a??(a=i.value);let c=s.value;if(!r(c))return s.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),s;s.value={};let u=[],d=a.shape;for(let p of a.keys){let f=d[p],S=f._zod.optin==="optional",h=f._zod.optout==="optional",v=f._zod.run({value:c[p],issues:[]},l);v instanceof Promise?u.push(v.then(E=>So(E,s,p,c,S,h))):So(v,s,p,c,S,h)}return o?Qd(u,c,s,l,i.value,e):u.length?Promise.all(u).then(()=>s):s}});y.$ZodObjectJIT=G.$constructor("$ZodObjectJIT",(e,t)=>{y.$ZodObject.init(e,t);let n=e._zod.parse,i=X.cached(()=>Yd(t)),r=p=>{let f=new $b.Doc(["shape","payload","ctx"]),S=i.value,h=F=>{let Z=X.esc(F);return`shape[${Z}]._zod.run({ value: input[${Z}], issues: [] }, ctx)`};f.write("const input = payload.value;");let v=Object.create(null),E=0;for(let F of S.keys)v[F]=`key_${E++}`;f.write("const newResult = {};");for(let F of S.keys){let Z=v[F],V=X.esc(F),ce=p[F],Se=ce?._zod?.optin==="optional",O=ce?._zod?.optout==="optional";f.write(`const ${Z} = ${h(F)};`),Se&&O?f.write(`
4
+ `))}};go.Doc=Tc});var Ic=w(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.version=void 0;yo.version={major:4,minor:4,patch:3}});var Cc=w(y=>{"use strict";var Rb=y&&y.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),$b=y&&y.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Eo=y&&y.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Rb(t,e,n);return $b(t,e),t};Object.defineProperty(y,"__esModule",{value:!0});y.$ZodTuple=y.$ZodIntersection=y.$ZodDiscriminatedUnion=y.$ZodXor=y.$ZodUnion=y.$ZodObjectJIT=y.$ZodObject=y.$ZodArray=y.$ZodDate=y.$ZodVoid=y.$ZodNever=y.$ZodUnknown=y.$ZodAny=y.$ZodNull=y.$ZodUndefined=y.$ZodSymbol=y.$ZodBigIntFormat=y.$ZodBigInt=y.$ZodBoolean=y.$ZodNumberFormat=y.$ZodNumber=y.$ZodCustomStringFormat=y.$ZodJWT=y.$ZodE164=y.$ZodBase64URL=y.$ZodBase64=y.$ZodCIDRv6=y.$ZodCIDRv4=y.$ZodMAC=y.$ZodIPv6=y.$ZodIPv4=y.$ZodISODuration=y.$ZodISOTime=y.$ZodISODate=y.$ZodISODateTime=y.$ZodKSUID=y.$ZodXID=y.$ZodULID=y.$ZodCUID2=y.$ZodCUID=y.$ZodNanoID=y.$ZodEmoji=y.$ZodURL=y.$ZodEmail=y.$ZodUUID=y.$ZodGUID=y.$ZodStringFormat=y.$ZodString=y.clone=y.$ZodType=void 0;y.$ZodCustom=y.$ZodLazy=y.$ZodPromise=y.$ZodFunction=y.$ZodTemplateLiteral=y.$ZodReadonly=y.$ZodPreprocess=y.$ZodCodec=y.$ZodPipe=y.$ZodNaN=y.$ZodCatch=y.$ZodSuccess=y.$ZodNonOptional=y.$ZodPrefault=y.$ZodDefault=y.$ZodNullable=y.$ZodExactOptional=y.$ZodOptional=y.$ZodTransform=y.$ZodFile=y.$ZodLiteral=y.$ZodEnum=y.$ZodSet=y.$ZodMap=y.$ZodRecord=void 0;y.isValidBase64=$c;y.isValidBase64URL=Xd;y.isValidJWT=Yd;var ko=Eo(mo()),G=Eo(br()),Cb=Nc(),Dr=Oc(),Ce=Eo(fo()),X=Eo(le()),Lb=Ic();y.$ZodType=G.$constructor("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Lb.version;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let r of i)for(let o of r._zod.onattach)o(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(a,s,l)=>{let c=X.aborted(a),u;for(let d of s){if(d._zod.def.when){if(X.explicitlyAborted(a)||!d._zod.def.when(a))continue}else if(c)continue;let p=a.issues.length,f=d._zod.check(a);if(f instanceof Promise&&l?.async===!1)throw new G.$ZodAsyncError;if(u||f instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await f,a.issues.length!==p&&(c||(c=X.aborted(a,p)))});else{if(a.issues.length===p)continue;c||(c=X.aborted(a,p))}}return u?u.then(()=>a):a},o=(a,s,l)=>{if(X.aborted(a))return a.aborted=!0,a;let c=r(s,i,l);if(c instanceof Promise){if(l.async===!1)throw new G.$ZodAsyncError;return c.then(u=>e._zod.parse(u,l))}return e._zod.parse(c,l)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let c=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return c instanceof Promise?c.then(u=>o(u,a,s)):o(c,a,s)}let l=e._zod.parse(a,s);if(l instanceof Promise){if(s.async===!1)throw new G.$ZodAsyncError;return l.then(c=>r(c,i,s))}return r(l,i,s)}}X.defineLazy(e,"~standard",()=>({validate:r=>{try{let o=(0,Dr.safeParse)(e,r);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return(0,Dr.safeParseAsync)(e,r).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))});var Mb=le();Object.defineProperty(y,"clone",{enumerable:!0,get:function(){return Mb.clone}});y.$ZodString=G.$constructor("$ZodString",(e,t)=>{y.$ZodType.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Ce.string(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}});y.$ZodStringFormat=G.$constructor("$ZodStringFormat",(e,t)=>{ko.$ZodCheckStringFormat.init(e,t),y.$ZodString.init(e,t)});y.$ZodGUID=G.$constructor("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Ce.guid),y.$ZodStringFormat.init(e,t)});y.$ZodUUID=G.$constructor("$ZodUUID",(e,t)=>{if(t.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Ce.uuid(i))}else t.pattern??(t.pattern=Ce.uuid());y.$ZodStringFormat.init(e,t)});y.$ZodEmail=G.$constructor("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Ce.email),y.$ZodStringFormat.init(e,t)});y.$ZodURL=G.$constructor("$ZodURL",(e,t)=>{y.$ZodStringFormat.init(e,t),e._zod.check=n=>{try{let i=n.value.trim();if(!t.normalize&&t.protocol?.source===Ce.httpProtocol.source&&!/^https?:\/\//i.test(i)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}let r=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}});y.$ZodEmoji=G.$constructor("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ce.emoji()),y.$ZodStringFormat.init(e,t)});y.$ZodNanoID=G.$constructor("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Ce.nanoid),y.$ZodStringFormat.init(e,t)});y.$ZodCUID=G.$constructor("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Ce.cuid),y.$ZodStringFormat.init(e,t)});y.$ZodCUID2=G.$constructor("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ce.cuid2),y.$ZodStringFormat.init(e,t)});y.$ZodULID=G.$constructor("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ce.ulid),y.$ZodStringFormat.init(e,t)});y.$ZodXID=G.$constructor("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ce.xid),y.$ZodStringFormat.init(e,t)});y.$ZodKSUID=G.$constructor("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Ce.ksuid),y.$ZodStringFormat.init(e,t)});y.$ZodISODateTime=G.$constructor("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Ce.datetime(t)),y.$ZodStringFormat.init(e,t)});y.$ZodISODate=G.$constructor("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Ce.date),y.$ZodStringFormat.init(e,t)});y.$ZodISOTime=G.$constructor("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ce.time(t)),y.$ZodStringFormat.init(e,t)});y.$ZodISODuration=G.$constructor("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Ce.duration),y.$ZodStringFormat.init(e,t)});y.$ZodIPv4=G.$constructor("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Ce.ipv4),y.$ZodStringFormat.init(e,t),e._zod.bag.format="ipv4"});y.$ZodIPv6=G.$constructor("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Ce.ipv6),y.$ZodStringFormat.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}});y.$ZodMAC=G.$constructor("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Ce.mac(t.delimiter)),y.$ZodStringFormat.init(e,t),e._zod.bag.format="mac"});y.$ZodCIDRv4=G.$constructor("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Ce.cidrv4),y.$ZodStringFormat.init(e,t)});y.$ZodCIDRv6=G.$constructor("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ce.cidrv6),y.$ZodStringFormat.init(e,t),e._zod.check=n=>{let i=n.value.split("/");try{if(i.length!==2)throw new Error;let[r,o]=i;if(!o)throw new Error;let a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function $c(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}y.$ZodBase64=G.$constructor("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Ce.base64),y.$ZodStringFormat.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{$c(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Xd(e){if(!Ce.base64url.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return $c(n)}y.$ZodBase64URL=G.$constructor("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ce.base64url),y.$ZodStringFormat.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Xd(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}});y.$ZodE164=G.$constructor("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Ce.e164),y.$ZodStringFormat.init(e,t)});function Yd(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let r=JSON.parse(atob(i));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}y.$ZodJWT=G.$constructor("$ZodJWT",(e,t)=>{y.$ZodStringFormat.init(e,t),e._zod.check=n=>{Yd(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}});y.$ZodCustomStringFormat=G.$constructor("$ZodCustomStringFormat",(e,t)=>{y.$ZodStringFormat.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}});y.$ZodNumber=G.$constructor("$ZodNumber",(e,t)=>{y.$ZodType.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ce.number,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let o=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...o?{received:o}:{}}),n}});y.$ZodNumberFormat=G.$constructor("$ZodNumberFormat",(e,t)=>{ko.$ZodCheckNumberFormat.init(e,t),y.$ZodNumber.init(e,t)});y.$ZodBoolean=G.$constructor("$ZodBoolean",(e,t)=>{y.$ZodType.init(e,t),e._zod.pattern=Ce.boolean,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}});y.$ZodBigInt=G.$constructor("$ZodBigInt",(e,t)=>{y.$ZodType.init(e,t),e._zod.pattern=Ce.bigint,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}});y.$ZodBigIntFormat=G.$constructor("$ZodBigIntFormat",(e,t)=>{ko.$ZodCheckBigIntFormat.init(e,t),y.$ZodBigInt.init(e,t)});y.$ZodSymbol=G.$constructor("$ZodSymbol",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}});y.$ZodUndefined=G.$constructor("$ZodUndefined",(e,t)=>{y.$ZodType.init(e,t),e._zod.pattern=Ce.undefined,e._zod.values=new Set([void 0]),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}});y.$ZodNull=G.$constructor("$ZodNull",(e,t)=>{y.$ZodType.init(e,t),e._zod.pattern=Ce.null,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}});y.$ZodAny=G.$constructor("$ZodAny",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=n=>n});y.$ZodUnknown=G.$constructor("$ZodUnknown",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=n=>n});y.$ZodNever=G.$constructor("$ZodNever",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});y.$ZodVoid=G.$constructor("$ZodVoid",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}});y.$ZodDate=G.$constructor("$ZodDate",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:e}),n}});function Dd(e,t,n){e.issues.length&&t.issues.push(...X.prefixIssues(n,e.issues)),t.value[n]=e.value}y.$ZodArray=G.$constructor("$ZodArray",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let o=[];for(let a=0;a<r.length;a++){let s=r[a],l=t.element._zod.run({value:s,issues:[]},i);l instanceof Promise?o.push(l.then(c=>Dd(c,n,a))):Dd(l,n,a)}return o.length?Promise.all(o).then(()=>n):n}});function bo(e,t,n,i,r,o){let a=n in i;if(e.issues.length){if(r&&o&&!a)return;t.issues.push(...X.prefixIssues(n,e.issues))}if(!a&&!r){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?a&&(t.value[n]=void 0):t.value[n]=e.value}function Qd(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let n=X.optionalKeys(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function e_(e,t,n,i,r,o){let a=[],s=r.keySet,l=r.catchall._zod,c=l.def.type,u=l.optin==="optional",d=l.optout==="optional";for(let p in t){if(p==="__proto__"||s.has(p))continue;if(c==="never"){a.push(p);continue}let f=l.run({value:t[p],issues:[]},i);f instanceof Promise?e.push(f.then(S=>bo(S,n,p,t,u,d))):bo(f,n,p,t,u,d)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}y.$ZodObject=G.$constructor("$ZodObject",(e,t)=>{if(y.$ZodType.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let l={...s};return Object.defineProperty(t,"shape",{value:l}),l}})}let i=X.cached(()=>Qd(t));X.defineLazy(e._zod,"propValues",()=>{let s=t.shape,l={};for(let c in s){let u=s[c]._zod;if(u.values){l[c]??(l[c]=new Set);for(let d of u.values)l[c].add(d)}}return l});let r=X.isObject,o=t.catchall,a;e._zod.parse=(s,l)=>{a??(a=i.value);let c=s.value;if(!r(c))return s.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),s;s.value={};let u=[],d=a.shape;for(let p of a.keys){let f=d[p],S=f._zod.optin==="optional",h=f._zod.optout==="optional",v=f._zod.run({value:c[p],issues:[]},l);v instanceof Promise?u.push(v.then(E=>bo(E,s,p,c,S,h))):bo(v,s,p,c,S,h)}return o?e_(u,c,s,l,i.value,e):u.length?Promise.all(u).then(()=>s):s}});y.$ZodObjectJIT=G.$constructor("$ZodObjectJIT",(e,t)=>{y.$ZodObject.init(e,t);let n=e._zod.parse,i=X.cached(()=>Qd(t)),r=p=>{let f=new Cb.Doc(["shape","payload","ctx"]),S=i.value,h=F=>{let Z=X.esc(F);return`shape[${Z}]._zod.run({ value: input[${Z}], issues: [] }, ctx)`};f.write("const input = payload.value;");let v=Object.create(null),E=0;for(let F of S.keys)v[F]=`key_${E++}`;f.write("const newResult = {};");for(let F of S.keys){let Z=v[F],W=X.esc(F),ue=p[F],be=ue?._zod?.optin==="optional",O=ue?._zod?.optout==="optional";f.write(`const ${Z} = ${h(F)};`),be&&O?f.write(`
5
5
  if (${Z}.issues.length) {
6
- if (${V} in input) {
6
+ if (${W} in input) {
7
7
  payload.issues = payload.issues.concat(${Z}.issues.map(iss => ({
8
8
  ...iss,
9
- path: iss.path ? [${V}, ...iss.path] : [${V}]
9
+ path: iss.path ? [${W}, ...iss.path] : [${W}]
10
10
  })));
11
11
  }
12
12
  }
13
13
 
14
14
  if (${Z}.value === undefined) {
15
- if (${V} in input) {
16
- newResult[${V}] = undefined;
15
+ if (${W} in input) {
16
+ newResult[${W}] = undefined;
17
17
  }
18
18
  } else {
19
- newResult[${V}] = ${Z}.value;
19
+ newResult[${W}] = ${Z}.value;
20
20
  }
21
21
 
22
- `):Se?f.write(`
22
+ `):be?f.write(`
23
23
  if (${Z}.issues.length) {
24
24
  payload.issues = payload.issues.concat(${Z}.issues.map(iss => ({
25
25
  ...iss,
26
- path: iss.path ? [${V}, ...iss.path] : [${V}]
26
+ path: iss.path ? [${W}, ...iss.path] : [${W}]
27
27
  })));
28
28
  }
29
29
 
30
30
  if (${Z}.value === undefined) {
31
- if (${V} in input) {
32
- newResult[${V}] = undefined;
31
+ if (${W} in input) {
32
+ newResult[${W}] = undefined;
33
33
  }
34
34
  } else {
35
- newResult[${V}] = ${Z}.value;
35
+ newResult[${W}] = ${Z}.value;
36
36
  }
37
37
 
38
38
  `):f.write(`
39
- const ${Z}_present = ${V} in input;
39
+ const ${Z}_present = ${W} in input;
40
40
  if (${Z}.issues.length) {
41
41
  payload.issues = payload.issues.concat(${Z}.issues.map(iss => ({
42
42
  ...iss,
43
- path: iss.path ? [${V}, ...iss.path] : [${V}]
43
+ path: iss.path ? [${W}, ...iss.path] : [${W}]
44
44
  })));
45
45
  }
46
46
  if (!${Z}_present && !${Z}.issues.length) {
@@ -48,91 +48,91 @@
48
48
  code: "invalid_type",
49
49
  expected: "nonoptional",
50
50
  input: undefined,
51
- path: [${V}]
51
+ path: [${W}]
52
52
  });
53
53
  }
54
54
 
55
55
  if (${Z}_present) {
56
56
  if (${Z}.value === undefined) {
57
- newResult[${V}] = undefined;
57
+ newResult[${W}] = undefined;
58
58
  } else {
59
- newResult[${V}] = ${Z}.value;
59
+ newResult[${W}] = ${Z}.value;
60
60
  }
61
61
  }
62
62
 
63
- `)}f.write("payload.value = newResult;"),f.write("return payload;");let U=f.compile();return(F,Z)=>U(p,F,Z)},o,a=X.isObject,s=!G.globalConfig.jitless,l=X.allowsEval,c=s&&l.value,u=t.catchall,d;e._zod.parse=(p,f)=>{d??(d=i.value);let S=p.value;return a(S)?s&&c&&f?.async===!1&&f.jitless!==!0?(o||(o=r(t.shape)),p=o(p,f),u?Qd([],S,p,f,d,e):p):n(p,f):(p.issues.push({expected:"object",code:"invalid_type",input:S,inst:e}),p)}});function Pd(e,t,n,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let r=e.filter(o=>!X.aborted(o));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>X.finalizeIssue(a,i,G.config())))}),t)}y.$ZodUnion=G.$constructor("$ZodUnion",(e,t)=>{y.$ZodType.init(e,t),X.defineLazy(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),X.defineLazy(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),X.defineLazy(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),X.defineLazy(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(r=>r._zod.pattern);return new RegExp(`^(${i.map(r=>X.cleanRegex(r.source)).join("|")})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,a=[];for(let s of t.options){let l=s._zod.run({value:i.value,issues:[]},r);if(l instanceof Promise)a.push(l),o=!0;else{if(l.issues.length===0)return l;a.push(l)}}return o?Promise.all(a).then(s=>Pd(s,i,e,r)):Pd(a,i,e,r)}});function Dd(e,t,n,i){let r=e.filter(o=>o.issues.length===0);return r.length===1?(t.value=r[0].value,t):(r.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>X.finalizeIssue(a,i,G.config())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}y.$ZodXor=G.$constructor("$ZodXor",(e,t)=>{y.$ZodUnion.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,a=[];for(let s of t.options){let l=s._zod.run({value:i.value,issues:[]},r);l instanceof Promise?(a.push(l),o=!0):a.push(l)}return o?Promise.all(a).then(s=>Dd(s,i,e,r)):Dd(a,i,e,r)}});y.$ZodDiscriminatedUnion=G.$constructor("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,y.$ZodUnion.init(e,t);let n=e._zod.parse;X.defineLazy(e._zod,"propValues",()=>{let r={};for(let o of t.options){let a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let[s,l]of Object.entries(a)){r[s]||(r[s]=new Set);for(let c of l)r[s].add(c)}}return r});let i=X.cached(()=>{let r=t.options,o=new Map;for(let a of r){let s=a._zod.propValues?.[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let l of s){if(o.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);o.set(l,a)}}return o});e._zod.parse=(r,o)=>{let a=r.value;if(!X.isObject(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;let s=i.value.get(a?.[t.discriminator]);return s?s._zod.run(r,o):t.unionFallback||o.direction==="backward"?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:a,path:[t.discriminator],inst:e}),r)}});y.$ZodIntersection=G.$constructor("$ZodIntersection",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>{let r=n.value,o=t.left._zod.run({value:r,issues:[]},i),a=t.right._zod.run({value:r,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([l,c])=>jd(n,l,c)):jd(n,o,a)}});function Nc(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(X.isPlainObject(e)&&X.isPlainObject(t)){let n=Object.keys(t),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),r={...e,...t};for(let o of i){let a=Nc(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r[o]=a.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let r=e[i],o=t[i],a=Nc(r,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function jd(e,t,n){let i=new Map,r;for(let s of t.issues)if(s.code==="unrecognized_keys"){r??(r=s);for(let l of s.keys)i.has(l)||i.set(l,{}),i.get(l).l=!0}else e.issues.push(s);for(let s of n.issues)if(s.code==="unrecognized_keys")for(let l of s.keys)i.has(l)||i.set(l,{}),i.get(l).r=!0;else e.issues.push(s);let o=[...i].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(o.length&&r&&e.issues.push({...r,keys:o}),X.aborted(e))return e;let a=Nc(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}y.$ZodTuple=G.$constructor("$ZodTuple",(e,t)=>{y.$ZodType.init(e,t);let n=t.items;e._zod.parse=(i,r)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let a=[],s=zd(n,"optin"),l=zd(n,"optout");if(!t.rest){if(o.length<s)return i.issues.push({code:"too_small",minimum:s,inclusive:!0,input:o,inst:e,origin:"array"}),i;o.length>n.length&&i.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:o,inst:e,origin:"array"})}let c=new Array(n.length);for(let u=0;u<n.length;u++){let d=n[u]._zod.run({value:o[u],issues:[]},r);d instanceof Promise?a.push(d.then(p=>{c[u]=p})):c[u]=d}if(t.rest){let u=n.length-1,d=o.slice(n.length);for(let p of d){u++;let f=t.rest._zod.run({value:p,issues:[]},r);f instanceof Promise?a.push(f.then(S=>Fd(S,i,u))):Fd(f,i,u)}}return a.length?Promise.all(a).then(()=>Zd(c,i,n,o,l)):Zd(c,i,n,o,l)}});function zd(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function Fd(e,t,n){e.issues.length&&t.issues.push(...X.prefixIssues(n,e.issues)),t.value[n]=e.value}function Zd(e,t,n,i,r){for(let o=0;o<n.length;o++){let a=e[o],s=o<i.length;if(a.issues.length){if(!s&&o>=r){t.value.length=o;break}t.issues.push(...X.prefixIssues(o,a.issues))}t.value[o]=a.value}for(let o=t.value.length-1;o>=i.length&&(n[o]._zod.optout==="optional"&&t.value[o]===void 0);o--)t.value.length=o;return t}y.$ZodRecord=G.$constructor("$ZodRecord",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!X.isPlainObject(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let o=[],a=t.keyType._zod.values;if(a){n.value={};let s=new Set;for(let c of a)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){s.add(typeof c=="number"?c.toString():c);let u=t.keyType._zod.run({value:c,issues:[]},i);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(f=>X.finalizeIssue(f,i,G.config())),input:c,path:[c],inst:e});continue}let d=u.value,p=t.valueType._zod.run({value:r[c],issues:[]},i);p instanceof Promise?o.push(p.then(f=>{f.issues.length&&n.issues.push(...X.prefixIssues(c,f.issues)),n.value[d]=f.value})):(p.issues.length&&n.issues.push(...X.prefixIssues(c,p.issues)),n.value[d]=p.value)}let l;for(let c in r)s.has(c)||(l=l??[],l.push(c));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:l})}else{n.value={};for(let s of Reflect.ownKeys(r)){if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(r,s))continue;let l=t.keyType._zod.run({value:s,issues:[]},i);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&Ce.number.test(s)&&l.issues.length){let d=t.keyType._zod.run({value:Number(s),issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(l=d)}if(l.issues.length){t.mode==="loose"?n.value[s]=r[s]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(d=>X.finalizeIssue(d,i,G.config())),input:s,path:[s],inst:e});continue}let u=t.valueType._zod.run({value:r[s],issues:[]},i);u instanceof Promise?o.push(u.then(d=>{d.issues.length&&n.issues.push(...X.prefixIssues(s,d.issues)),n.value[l.value]=d.value})):(u.issues.length&&n.issues.push(...X.prefixIssues(s,u.issues)),n.value[l.value]=u.value)}}return o.length?Promise.all(o).then(()=>n):n}});y.$ZodMap=G.$constructor("$ZodMap",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let o=[];n.value=new Map;for(let[a,s]of r){let l=t.keyType._zod.run({value:a,issues:[]},i),c=t.valueType._zod.run({value:s,issues:[]},i);l instanceof Promise||c instanceof Promise?o.push(Promise.all([l,c]).then(([u,d])=>{qd(u,d,n,a,r,e,i)})):qd(l,c,n,a,r,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function qd(e,t,n,i,r,o,a){e.issues.length&&(X.propertyKeyTypes.has(typeof i)?n.issues.push(...X.prefixIssues(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(s=>X.finalizeIssue(s,a,G.config()))})),t.issues.length&&(X.propertyKeyTypes.has(typeof i)?n.issues.push(...X.prefixIssues(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(s=>X.finalizeIssue(s,a,G.config()))})),n.value.set(e.value,t.value)}y.$ZodSet=G.$constructor("$ZodSet",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let o=[];n.value=new Set;for(let a of r){let s=t.valueType._zod.run({value:a,issues:[]},i);s instanceof Promise?o.push(s.then(l=>Vd(l,n))):Vd(s,n)}return o.length?Promise.all(o).then(()=>n):n}});function Vd(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}y.$ZodEnum=G.$constructor("$ZodEnum",(e,t)=>{y.$ZodType.init(e,t);let n=X.getEnumValues(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(r=>X.propertyKeyTypes.has(typeof r)).map(r=>typeof r=="string"?X.escapeRegex(r):r.toString()).join("|")})$`),e._zod.parse=(r,o)=>{let a=r.value;return i.has(a)||r.issues.push({code:"invalid_value",values:n,input:a,inst:e}),r}});y.$ZodLiteral=G.$constructor("$ZodLiteral",(e,t)=>{if(y.$ZodType.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?X.escapeRegex(i):i?X.escapeRegex(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,r)=>{let o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}});y.$ZodFile=G.$constructor("$ZodFile",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}});y.$ZodTransform=G.$constructor("$ZodTransform",(e,t)=>{y.$ZodType.init(e,t),e._zod.optin="optional",e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new G.$ZodEncodeError(e.constructor.name);let r=t.transform(n.value,n);if(i.async)return(r instanceof Promise?r:Promise.resolve(r)).then(a=>(n.value=a,n.fallback=!0,n));if(r instanceof Promise)throw new G.$ZodAsyncError;return n.value=r,n.fallback=!0,n}});function Wd(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}y.$ZodOptional=G.$constructor("$ZodOptional",(e,t)=>{y.$ZodType.init(e,t),e._zod.optin="optional",e._zod.optout="optional",X.defineLazy(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),X.defineLazy(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${X.cleanRegex(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){let r=n.value,o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(a=>Wd(a,r)):Wd(o,r)}return n.value===void 0?n:t.innerType._zod.run(n,i)}});y.$ZodExactOptional=G.$constructor("$ZodExactOptional",(e,t)=>{y.$ZodOptional.init(e,t),X.defineLazy(e._zod,"values",()=>t.innerType._zod.values),X.defineLazy(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)});y.$ZodNullable=G.$constructor("$ZodNullable",(e,t)=>{y.$ZodType.init(e,t),X.defineLazy(e._zod,"optin",()=>t.innerType._zod.optin),X.defineLazy(e._zod,"optout",()=>t.innerType._zod.optout),X.defineLazy(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${X.cleanRegex(n.source)}|null)$`):void 0}),X.defineLazy(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)});y.$ZodDefault=G.$constructor("$ZodDefault",(e,t)=>{y.$ZodType.init(e,t),e._zod.optin="optional",X.defineLazy(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>Bd(o,t)):Bd(r,t)}});function Bd(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}y.$ZodPrefault=G.$constructor("$ZodPrefault",(e,t)=>{y.$ZodType.init(e,t),e._zod.optin="optional",X.defineLazy(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))});y.$ZodNonOptional=G.$constructor("$ZodNonOptional",(e,t)=>{y.$ZodType.init(e,t),X.defineLazy(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>Hd(o,e)):Hd(r,e)}});function Hd(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}y.$ZodSuccess=G.$constructor("$ZodSuccess",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new G.$ZodEncodeError("ZodSuccess");let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.issues.length===0,n)):(n.value=r.issues.length===0,n)}});y.$ZodCatch=G.$constructor("$ZodCatch",(e,t)=>{y.$ZodType.init(e,t),e._zod.optin="optional",X.defineLazy(e._zod,"optout",()=>t.innerType._zod.optout),X.defineLazy(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(a=>X.finalizeIssue(a,i,G.config()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(o=>X.finalizeIssue(o,i,G.config()))},input:n.value}),n.issues=[],n.fallback=!0),n)}});y.$ZodNaN=G.$constructor("$ZodNaN",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)});y.$ZodPipe=G.$constructor("$ZodPipe",(e,t)=>{y.$ZodType.init(e,t),X.defineLazy(e._zod,"values",()=>t.in._zod.values),X.defineLazy(e._zod,"optin",()=>t.in._zod.optin),X.defineLazy(e._zod,"optout",()=>t.out._zod.optout),X.defineLazy(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(a=>yo(a,t.in,i)):yo(o,t.in,i)}let r=t.in._zod.run(n,i);return r instanceof Promise?r.then(o=>yo(o,t.out,i)):yo(r,t.out,i)}});function yo(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}y.$ZodCodec=G.$constructor("$ZodCodec",(e,t)=>{y.$ZodType.init(e,t),X.defineLazy(e._zod,"values",()=>t.in._zod.values),X.defineLazy(e._zod,"optin",()=>t.in._zod.optin),X.defineLazy(e._zod,"optout",()=>t.out._zod.optout),X.defineLazy(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let o=t.in._zod.run(n,i);return o instanceof Promise?o.then(a=>ho(a,t,i)):ho(o,t,i)}else{let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(a=>ho(a,t,i)):ho(o,t,i)}}});function ho(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(o=>vo(e,o,t.out,n)):vo(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(o=>vo(e,o,t.in,n)):vo(e,r,t.in,n)}}function vo(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}y.$ZodPreprocess=G.$constructor("$ZodPreprocess",(e,t)=>{y.$ZodPipe.init(e,t)});y.$ZodReadonly=G.$constructor("$ZodReadonly",(e,t)=>{y.$ZodType.init(e,t),X.defineLazy(e._zod,"propValues",()=>t.innerType._zod.propValues),X.defineLazy(e._zod,"values",()=>t.innerType._zod.values),X.defineLazy(e._zod,"optin",()=>t.innerType?._zod?.optin),X.defineLazy(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(Jd):Jd(r)}});function Jd(e){return e.value=Object.freeze(e.value),e}y.$ZodTemplateLiteral=G.$constructor("$ZodTemplateLiteral",(e,t)=>{y.$ZodType.init(e,t);let n=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let r=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let o=r.startsWith("^")?1:0,a=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(o,a))}else if(i===null||X.primitiveTypes.has(typeof i))n.push(X.escapeRegex(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(i,r)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)});y.$ZodFunction=G.$constructor("$ZodFunction",(e,t)=>(y.$ZodType.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...i){let r=e._def.input?(0,Pr.parse)(e._def.input,i):i,o=Reflect.apply(n,this,r);return e._def.output?(0,Pr.parse)(e._def.output,o):o}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let r=e._def.input?await(0,Pr.parseAsync)(e._def.input,i):i,o=await Reflect.apply(n,this,r);return e._def.output?await(0,Pr.parseAsync)(e._def.output,o):o}},e._zod.parse=(n,i)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let i=e.constructor;return Array.isArray(n[0])?new i({type:"function",input:new y.$ZodTuple({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new i({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:n})},e));y.$ZodPromise=G.$constructor("$ZodPromise",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},i))});y.$ZodLazy=G.$constructor("$ZodLazy",(e,t)=>{y.$ZodType.init(e,t),X.defineLazy(e._zod,"innerType",()=>{let n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),X.defineLazy(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),X.defineLazy(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),X.defineLazy(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),X.defineLazy(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)});y.$ZodCustom=G.$constructor("$ZodCustom",(e,t)=>{Eo.$ZodCheck.init(e,t),y.$ZodType.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{let i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then(o=>Kd(o,n,i,e));Kd(r,n,i,e)}});function Kd(e,t,n,i){if(!e){let r={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(r.params=i._zod.def.params),t.issues.push(X.issue(r))}}});var t_=w((Gt,e_)=>{"use strict";var Mb=Gt&&Gt.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Ub=Gt&&Gt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),xb=Gt&&Gt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Mb(t,e,n);return Ub(t,e),t};Object.defineProperty(Gt,"__esModule",{value:!0});Gt.default=Db;var ko=xb(le()),Pb=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=ko.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return r.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${ko.stringifyPrimitive(r.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${ko.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${r.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${n[o.format]??r.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${ko.joinValues(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function Db(){return{localeError:Pb()}}e_.exports=Gt.default});var r_=w((Xt,n_)=>{"use strict";var jb=Xt&&Xt.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),zb=Xt&&Xt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Fb=Xt&&Xt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&jb(t,e,n);return zb(t,e),t};Object.defineProperty(Xt,"__esModule",{value:!0});Xt.default=qb;var Oo=Fb(le()),Zb=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={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",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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Oo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${s}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${Oo.stringifyPrimitive(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${Oo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[o.format]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${Oo.joinValues(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function qb(){return{localeError:Zb()}}n_.exports=Xt.default});var a_=w((Yt,o_)=>{"use strict";var Vb=Yt&&Yt.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Wb=Yt&&Yt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Bb=Yt&&Yt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Vb(t,e,n);return Wb(t,e),t};Object.defineProperty(Yt,"__esModule",{value:!0});Yt.default=Jb;var wo=Bb(le());function i_(e,t,n,i){let r=Math.abs(e),o=r%10,a=r%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?n:i}var Hb=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=wo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${wo.stringifyPrimitive(r.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${wo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),l=i_(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${r.maximum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),l=i_(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${r.minimum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${wo.joinValues(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function Jb(){return{localeError:Hb()}}o_.exports=Yt.default});var c_=w((Qt,s_)=>{"use strict";var Kb=Qt&&Qt.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Gb=Qt&&Qt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Xb=Qt&&Qt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Kb(t,e,n);return Gb(t,e),t};Object.defineProperty(Qt,"__esModule",{value:!0});Qt.default=Qb;var Ao=Xb(le()),Yb=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Ao.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${Ao.stringifyPrimitive(r.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${Ao.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${Ao.joinValues(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function Qb(){return{localeError:Yb()}}s_.exports=Qt.default});var u_=w((en,l_)=>{"use strict";var eE=en&&en.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),tE=en&&en.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),nE=en&&en.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&eE(t,e,n);return tE(t,e),t};Object.defineProperty(en,"__esModule",{value:!0});en.default=iE;var To=nE(le()),rE=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",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:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=To.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${s}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${To.stringifyPrimitive(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${To.joinValues(r.values," o ")}`;case"too_big":{let o=r.inclusive?"com a m\xE0xim":"menys de",a=t(r.origin);return a?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${o} ${r.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(r.origin);return a?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${o} ${r.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${To.joinValues(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}};function iE(){return{localeError:rE()}}l_.exports=en.default});var __=w((tn,d_)=>{"use strict";var oE=tn&&tn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),aE=tn&&tn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),sE=tn&&tn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&oE(t,e,n);return aE(t,e),t};Object.defineProperty(tn,"__esModule",{value:!0});tn.default=lE;var No=sE(le()),cE=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(r){return e[r]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",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:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=No.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${s}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${No.stringifyPrimitive(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${No.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${No.joinValues(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}};function lE(){return{localeError:cE()}}d_.exports=tn.default});var f_=w((nn,p_)=>{"use strict";var uE=nn&&nn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),dE=nn&&nn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),_E=nn&&nn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&uE(t,e,n);return dE(t,e),t};Object.defineProperty(nn,"__esModule",{value:!0});nn.default=fE;var Io=_E(le()),pE=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-mailadresse",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 dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Io.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${s}`:`Ugyldigt input: forventede ${o}, fik ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${Io.stringifyPrimitive(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${Io.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),s=i[r.origin]??r.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${o} ${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),s=i[r.origin]??r.origin;return a?`For lille: forventede ${s} ${a.verb} ${o} ${r.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${Io.joinValues(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${r.origin}`;default:return"Ugyldigt input"}}};function fE(){return{localeError:pE()}}p_.exports=nn.default});var g_=w((rn,m_)=>{"use strict";var mE=rn&&rn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),gE=rn&&rn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),yE=rn&&rn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&mE(t,e,n);return gE(t,e),t};Object.defineProperty(rn,"__esModule",{value:!0});rn.default=vE;var Ro=yE(le()),hE=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(r){return e[r]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",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-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Ro.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${s}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${Ro.stringifyPrimitive(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${Ro.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ist`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ist`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${Ro.joinValues(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}};function vE(){return{localeError:hE()}}m_.exports=rn.default});var h_=w((on,y_)=>{"use strict";var SE=on&&on.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),bE=on&&on.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),EE=on&&on.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&SE(t,e,n);return bE(t,e),t};Object.defineProperty(on,"__esModule",{value:!0});on.default=OE;var $o=EE(le()),kE=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(r){return e[r]??null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",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 \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=$o.parsedType(r.input),s=i[a]??a;return typeof r.expected=="string"&&/^[A-Z]/.test(r.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${r.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return r.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${$o.stringifyPrimitive(r.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${$o.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${r.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${r.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${o.prefix}"`:o.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${o.suffix}"`:o.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${o.includes}"`:o.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${o.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[o.format]??r.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${r.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${r.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${r.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${$o.joinValues(r.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${r.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${r.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function OE(){return{localeError:kE()}}y_.exports=on.default});var $c=w((an,v_)=>{"use strict";var wE=an&&an.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),AE=an&&an.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),TE=an&&an.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&wE(t,e,n);return AE(t,e),t};Object.defineProperty(an,"__esModule",{value:!0});an.default=IE;var Co=TE(le()),NE=()=>{let e={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"}};function t(r){return e[r]??null}let n={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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Co.parsedType(r.input),s=i[a]??a;return`Invalid input: expected ${o}, received ${s}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${Co.stringifyPrimitive(r.values[0])}`:`Invalid option: expected one of ${Co.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Too big: expected ${r.origin??"value"} to have ${o}${r.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Too small: expected ${r.origin} to have ${o}${r.minimum.toString()} ${a.unit}`:`Too small: expected ${r.origin} to be ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${Co.joinValues(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`Invalid discriminator value. Expected ${r.options.map(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}};function IE(){return{localeError:NE()}}v_.exports=an.default});var b_=w((sn,S_)=>{"use strict";var RE=sn&&sn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),$E=sn&&sn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),CE=sn&&sn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&RE(t,e,n);return $E(t,e),t};Object.defineProperty(sn,"__esModule",{value:!0});sn.default=ME;var Lo=CE(le()),LE=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Lo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${s}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${Lo.stringifyPrimitive(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${Lo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${o}${r.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${n[o.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${Lo.joinValues(r.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}};function ME(){return{localeError:LE()}}S_.exports=sn.default});var k_=w((cn,E_)=>{"use strict";var UE=cn&&cn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),xE=cn&&cn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),PE=cn&&cn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&UE(t,e,n);return xE(t,e),t};Object.defineProperty(cn,"__esModule",{value:!0});cn.default=jE;var Mo=PE(le()),DE=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",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:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Mo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${s}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${Mo.stringifyPrimitive(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${Mo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),s=i[r.origin]??r.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${o}${r.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),s=i[r.origin]??r.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${o}${r.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${Mo.joinValues(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}};function jE(){return{localeError:DE()}}E_.exports=cn.default});var w_=w((ln,O_)=>{"use strict";var zE=ln&&ln.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),FE=ln&&ln.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ZE=ln&&ln.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&zE(t,e,n);return FE(t,e),t};Object.defineProperty(ln,"__esModule",{value:!0});ln.default=VE;var Uo=ZE(le()),qE=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Uo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${Uo.stringifyPrimitive(r.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${Uo.joinValues(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[o.format]??r.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${Uo.joinValues(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function VE(){return{localeError:qE()}}O_.exports=ln.default});var T_=w((un,A_)=>{"use strict";var WE=un&&un.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),BE=un&&un.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),HE=un&&un.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&WE(t,e,n);return BE(t,e),t};Object.defineProperty(un,"__esModule",{value:!0});un.default=KE;var xo=HE(le()),JE=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(r){return e[r]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=xo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${s}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${xo.stringifyPrimitive(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${xo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${o}${r.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${o}${r.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${n[o.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${xo.joinValues(r.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function KE(){return{localeError:JE()}}A_.exports=un.default});var I_=w((dn,N_)=>{"use strict";var GE=dn&&dn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),XE=dn&&dn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),YE=dn&&dn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&GE(t,e,n);return XE(t,e),t};Object.defineProperty(dn,"__esModule",{value:!0});dn.default=ek;var Po=YE(le()),QE=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse e-mail",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:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Po.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${s} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${Po.stringifyPrimitive(r.values[0])} attendu`:`Option invalide : une valeur parmi ${Po.joinValues(r.values,"|")} attendue`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Trop grand : ${i[r.origin]??"valeur"} doit ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Trop petit : ${i[r.origin]??"valeur"} doit ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Trop petit : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${Po.joinValues(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function ek(){return{localeError:QE()}}N_.exports=dn.default});var $_=w((_n,R_)=>{"use strict";var tk=_n&&_n.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),nk=_n&&_n.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),rk=_n&&_n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&tk(t,e,n);return nk(t,e),t};Object.defineProperty(_n,"__esModule",{value:!0});_n.default=ok;var Do=rk(le()),ik=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse courriel",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:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Do.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${s}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${Do.stringifyPrimitive(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${Do.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u2264":"<",a=t(r.origin);return a?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${o}${r.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u2265":">",a=t(r.origin);return a?`Trop petit : attendu que ${r.origin} ait ${o}${r.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${r.origin} soit ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${Do.joinValues(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function ok(){return{localeError:ik()}}R_.exports=_n.default});var L_=w((pn,C_)=>{"use strict";var ak=pn&&pn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),sk=pn&&pn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ck=pn&&pn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&ak(t,e,n);return sk(t,e),t};Object.defineProperty(pn,"__esModule",{value:!0});pn.default=uk;var jo=ck(le()),lk=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=c=>c?e[c]:void 0,i=c=>{let u=n(c);return u?u.label:c??e.unknown.label},r=c=>`\u05D4${i(c)}`,o=c=>(n(c)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=c=>c?t[c]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},l={nan:"NaN"};return c=>{switch(c.code){case"invalid_type":{let u=c.expected,d=l[u??""]??i(u),p=jo.parsedType(c.input),f=l[p]??e[p]?.label??p;return/^[A-Z]/.test(c.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${c.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`}case"invalid_value":{if(c.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${jo.stringifyPrimitive(c.values[0])}`;let u=c.values.map(f=>jo.stringifyPrimitive(f));if(c.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u[0]} \u05D0\u05D5 ${u[1]}`;let d=u[u.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let u=a(c.origin),d=r(c.origin??"value");if(c.origin==="string")return`${u?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.maximum.toString()} ${u?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(c.origin==="number"){let S=c.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${c.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${S}`}if(c.origin==="array"||c.origin==="set"){let S=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",h=c.inclusive?`${c.maximum} ${u?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${c.maximum} ${u?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let p=c.inclusive?"<=":"<",f=o(c.origin??"value");return u?.unit?`${u.longLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${p}${c.maximum.toString()} ${u.unit}`:`${u?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${f} ${p}${c.maximum.toString()}`}case"too_small":{let u=a(c.origin),d=r(c.origin??"value");if(c.origin==="string")return`${u?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.minimum.toString()} ${u?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(c.origin==="number"){let S=c.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${c.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${S}`}if(c.origin==="array"||c.origin==="set"){let S=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(c.minimum===1&&c.inclusive){let v=(c.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${v}`}let h=c.inclusive?`${c.minimum} ${u?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${c.minimum} ${u?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let p=c.inclusive?">=":">",f=o(c.origin??"value");return u?.unit?`${u.shortLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${p}${c.minimum.toString()} ${u.unit}`:`${u?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${f} ${p}${c.minimum.toString()}`}case"invalid_format":{let u=c;if(u.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${u.prefix}"`;if(u.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${u.suffix}"`;if(u.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${u.includes}"`;if(u.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${u.pattern}`;let d=s[u.format],p=d?.label??u.format,S=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${p} \u05DC\u05D0 ${S}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${c.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${c.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${c.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${jo.joinValues(c.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${r(c.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function uk(){return{localeError:lk()}}C_.exports=pn.default});var U_=w((fn,M_)=>{"use strict";var dk=fn&&fn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),_k=fn&&fn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),pk=fn&&fn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&dk(t,e,n);return _k(t,e),t};Object.defineProperty(fn,"__esModule",{value:!0});fn.default=mk;var zo=pk(le()),fk=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(r){return e[r]??null}let n={regex:"unos",email:"email adresa",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 datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},i={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=zo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${r.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${o}, a primljeno je ${s}`}case"invalid_value":return r.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${zo.stringifyPrimitive(r.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${zo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),s=i[r.origin]??r.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${o}${r.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),s=i[r.origin]??r.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${o}${r.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${o.prefix}"`:o.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${o.suffix}"`:o.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${o.includes}"`:o.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`:`Neispravna ${n[o.format]??r.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${r.divisor}`;case"unrecognized_keys":return`Neprepoznat${r.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${zo.joinValues(r.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[r.origin]??r.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[r.origin]??r.origin}`;default:return"Neispravan unos"}}};function mk(){return{localeError:fk()}}M_.exports=fn.default});var P_=w((mn,x_)=>{"use strict";var gk=mn&&mn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),yk=mn&&mn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),hk=mn&&mn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&gk(t,e,n);return yk(t,e),t};Object.defineProperty(mn,"__esModule",{value:!0});mn.default=Sk;var Fo=hk(le()),vk=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}let n={regex:"bemenet",email:"email c\xEDm",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 id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Fo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${Fo.stringifyPrimitive(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${Fo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${r.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${o}${r.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[o.format]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${Fo.joinValues(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function Sk(){return{localeError:vk()}}x_.exports=mn.default});var z_=w((gn,j_)=>{"use strict";var bk=gn&&gn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Ek=gn&&gn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),kk=gn&&gn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&bk(t,e,n);return Ek(t,e),t};Object.defineProperty(gn,"__esModule",{value:!0});gn.default=wk;var Zo=kk(le());function D_(e,t,n){return Math.abs(e)===1?t:n}function Dr(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}var Ok=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(r){return e[r]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Zo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return r.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${Zo.stringifyPrimitive(r.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${Zo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),l=D_(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Dr(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.maximum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Dr(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),l=D_(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Dr(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.minimum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Dr(r.origin)} \u056C\u056B\u0576\u056B ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[o.format]??r.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${r.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${Zo.joinValues(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Dr(r.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Dr(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function wk(){return{localeError:Ok()}}j_.exports=gn.default});var Z_=w((yn,F_)=>{"use strict";var Ak=yn&&yn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Tk=yn&&yn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Nk=yn&&yn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Ak(t,e,n);return Tk(t,e),t};Object.defineProperty(yn,"__esModule",{value:!0});yn.default=Rk;var qo=Nk(le()),Ik=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat email",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:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=qo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${o}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${qo.stringifyPrimitive(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${qo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${o}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: diharapkan ${r.origin} memiliki ${o}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${n[o.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${qo.joinValues(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}};function Rk(){return{localeError:Ik()}}F_.exports=yn.default});var V_=w((hn,q_)=>{"use strict";var $k=hn&&hn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Ck=hn&&hn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Lk=hn&&hn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&$k(t,e,n);return Ck(t,e),t};Object.defineProperty(hn,"__esModule",{value:!0});hn.default=Uk;var Vo=Lk(le()),Mk=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(r){return e[r]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Vo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${Vo.stringifyPrimitive(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${Vo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${o}${r.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${o}${r.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${n[o.format]??r.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${Vo.joinValues(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${r.origin}`;default:return"Rangt gildi"}}};function Uk(){return{localeError:Mk()}}q_.exports=hn.default});var B_=w((vn,W_)=>{"use strict";var xk=vn&&vn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Pk=vn&&vn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Dk=vn&&vn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&xk(t,e,n);return Pk(t,e),t};Object.defineProperty(vn,"__esModule",{value:!0});vn.default=zk;var Wo=Dk(le()),jk=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}let n={regex:"input",email:"indirizzo email",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:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Wo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${s}`:`Input non valido: atteso ${o}, ricevuto ${s}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${Wo.stringifyPrimitive(r.values[0])}`:`Opzione non valida: atteso uno tra ${Wo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Troppo grande: ${r.origin??"valore"} deve avere ${o}${r.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Troppo piccolo: ${r.origin} deve avere ${o}${r.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${r.origin} deve essere ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Input non valido: ${n[o.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${Wo.joinValues(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}};function zk(){return{localeError:jk()}}W_.exports=vn.default});var J_=w((Sn,H_)=>{"use strict";var Fk=Sn&&Sn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Zk=Sn&&Sn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),qk=Sn&&Sn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Fk(t,e,n);return Zk(t,e),t};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.default=Wk;var Bo=qk(le()),Vk=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(r){return e[r]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Bo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${Bo.stringifyPrimitive(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${Bo.joinValues(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(r.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${a.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(r.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${a.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${r.keys.length>1?"\u7FA4":""}: ${Bo.joinValues(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function Wk(){return{localeError:Vk()}}H_.exports=Sn.default});var G_=w((bn,K_)=>{"use strict";var Bk=bn&&bn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Hk=bn&&bn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Jk=bn&&bn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Bk(t,e,n);return Hk(t,e),t};Object.defineProperty(bn,"__esModule",{value:!0});bn.default=Gk;var Ho=Jk(le()),Kk=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(r){return e[r]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Ho.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return r.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${Ho.stringifyPrimitive(r.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${Ho.joinValues(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${r.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${Ho.joinValues(r.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${r.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function Gk(){return{localeError:Kk()}}K_.exports=bn.default});var Cc=w((En,X_)=>{"use strict";var Xk=En&&En.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Yk=En&&En.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Qk=En&&En.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Xk(t,e,n);return Yk(t,e),t};Object.defineProperty(En,"__esModule",{value:!0});En.default=tO;var Jo=Qk(le()),eO=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(r){return e[r]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Jo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return r.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${Jo.stringifyPrimitive(r.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${Jo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${Jo.joinValues(r.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function tO(){return{localeError:eO()}}X_.exports=En.default});var Q_=w((jr,Y_)=>{"use strict";var nO=jr&&jr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jr,"__esModule",{value:!0});jr.default=iO;var rO=nO(Cc());function iO(){return(0,rO.default)()}Y_.exports=jr.default});var tp=w((kn,ep)=>{"use strict";var oO=kn&&kn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),aO=kn&&kn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),sO=kn&&kn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&oO(t,e,n);return aO(t,e),t};Object.defineProperty(kn,"__esModule",{value:!0});kn.default=lO;var Ko=sO(le()),cO=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Ko.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${Ko.stringifyPrimitive(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${Ko.joinValues(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(r.origin),l=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${l} ${o}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${o}${a}`}case"too_small":{let o=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(r.origin),l=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${l} ${o}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${o}${a}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[o.format]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${Ko.joinValues(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function lO(){return{localeError:cO()}}ep.exports=kn.default});var ip=w((On,rp)=>{"use strict";var uO=On&&On.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),dO=On&&On.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),_O=On&&On.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&uO(t,e,n);return dO(t,e),t};Object.defineProperty(On,"__esModule",{value:!0});On.default=fO;var Go=_O(le()),ci=e=>e.charAt(0).toUpperCase()+e.slice(1);function np(e){let t=Math.abs(e),n=t%10,i=t%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}var pO=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(r,o,a,s){let l=e[r]??null;return l===null?l:{unit:l.unit[o],verb:l.verb[s][a?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Go.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${o}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${Go.stringifyPrimitive(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${Go.joinValues(r.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[r.origin]??r.origin,a=t(r.origin,np(Number(r.maximum)),r.inclusive??!1,"smaller");if(a?.verb)return`${ci(o??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.maximum.toString()} ${a.unit??"element\u0173"}`;let s=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${ci(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.maximum.toString()} ${a?.unit}`}case"too_small":{let o=i[r.origin]??r.origin,a=t(r.origin,np(Number(r.minimum)),r.inclusive??!1,"bigger");if(a?.verb)return`${ci(o??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.minimum.toString()} ${a.unit??"element\u0173"}`;let s=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${ci(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.minimum.toString()} ${a?.unit}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${n[o.format]??r.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${Go.joinValues(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[r.origin]??r.origin;return`${ci(o??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function fO(){return{localeError:pO()}}rp.exports=On.default});var ap=w((wn,op)=>{"use strict";var mO=wn&&wn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),gO=wn&&wn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),yO=wn&&wn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&mO(t,e,n);return gO(t,e),t};Object.defineProperty(wn,"__esModule",{value:!0});wn.default=vO;var Xo=yO(le()),hO=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(r){return e[r]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Xo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${Xo.stringifyPrimitive(r.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${Xo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${Xo.joinValues(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function vO(){return{localeError:hO()}}op.exports=wn.default});var cp=w((An,sp)=>{"use strict";var SO=An&&An.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),bO=An&&An.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),EO=An&&An.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&SO(t,e,n);return bO(t,e),t};Object.defineProperty(An,"__esModule",{value:!0});An.default=OO;var Yo=EO(le()),kO=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat e-mel",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:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Yo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${s}`:`Input tidak sah: dijangka ${o}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${Yo.stringifyPrimitive(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${Yo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: dijangka ${r.origin??"nilai"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: dijangka ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${n[o.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${Yo.joinValues(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}};function OO(){return{localeError:kO()}}sp.exports=An.default});var up=w((Tn,lp)=>{"use strict";var wO=Tn&&Tn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),AO=Tn&&Tn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),TO=Tn&&Tn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&wO(t,e,n);return AO(t,e),t};Object.defineProperty(Tn,"__esModule",{value:!0});Tn.default=IO;var Qo=TO(le()),NO=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(r){return e[r]??null}let n={regex:"invoer",email:"emailadres",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 datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Qo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${o}, ontving ${s}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${Qo.stringifyPrimitive(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${Qo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),s=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} is`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),s=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} is`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${Qo.joinValues(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}};function IO(){return{localeError:NO()}}lp.exports=Tn.default});var _p=w((Nn,dp)=>{"use strict";var RO=Nn&&Nn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),$O=Nn&&Nn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),CO=Nn&&Nn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&RO(t,e,n);return $O(t,e),t};Object.defineProperty(Nn,"__esModule",{value:!0});Nn.default=MO;var ea=CO(le()),LO=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-postadresse",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 dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=ea.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${s}`:`Ugyldig input: forventet ${o}, fikk ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${ea.stringifyPrimitive(r.values[0])}`:`Ugyldig valg: forventet en av ${ea.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${ea.joinValues(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}};function MO(){return{localeError:LO()}}dp.exports=Nn.default});var fp=w((In,pp)=>{"use strict";var UO=In&&In.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),xO=In&&In.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),PO=In&&In.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&UO(t,e,n);return xO(t,e),t};Object.defineProperty(In,"__esModule",{value:!0});In.default=jO;var ta=PO(le()),DO=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"giren",email:"epostag\xE2h",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 heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=ta.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${ta.stringifyPrimitive(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${ta.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=r;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[o.format]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${ta.joinValues(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function jO(){return{localeError:DO()}}pp.exports=In.default});var gp=w((Rn,mp)=>{"use strict";var zO=Rn&&Rn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),FO=Rn&&Rn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ZO=Rn&&Rn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&zO(t,e,n);return FO(t,e),t};Object.defineProperty(Rn,"__esModule",{value:!0});Rn.default=VO;var na=ZO(le()),qO=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=na.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${na.stringifyPrimitive(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${na.joinValues(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[o.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${na.joinValues(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function VO(){return{localeError:qO()}}mp.exports=Rn.default});var hp=w(($n,yp)=>{"use strict";var WO=$n&&$n.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),BO=$n&&$n.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),HO=$n&&$n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&WO(t,e,n);return BO(t,e),t};Object.defineProperty($n,"__esModule",{value:!0});$n.default=KO;var ra=HO(le()),JO=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(r){return e[r]??null}let n={regex:"wyra\u017Cenie",email:"adres email",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:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=ra.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${s}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${ra.stringifyPrimitive(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${ra.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[o.format]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${ra.joinValues(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function KO(){return{localeError:JO()}}yp.exports=$n.default});var Sp=w((Cn,vp)=>{"use strict";var GO=Cn&&Cn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),XO=Cn&&Cn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),YO=Cn&&Cn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&GO(t,e,n);return XO(t,e),t};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.default=ew;var ia=YO(le()),QO=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){return e[r]??null}let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",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:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=ia.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${s}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${ia.stringifyPrimitive(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${ia.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${o}${r.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Muito pequeno: esperado que ${r.origin} tivesse ${o}${r.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${n[o.format]??r.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${ia.joinValues(r.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${r.origin}`;default:return"Campo inv\xE1lido"}}};function ew(){return{localeError:QO()}}vp.exports=Cn.default});var Ep=w((Ln,bp)=>{"use strict";var tw=Ln&&Ln.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),nw=Ln&&Ln.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),rw=Ln&&Ln.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&tw(t,e,n);return nw(t,e),t};Object.defineProperty(Ln,"__esModule",{value:!0});Ln.default=ow;var oa=rw(le()),iw=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(r){return e[r]??null}let n={regex:"intrare",email:"adres\u0103 de email",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:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},i={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=oa.parsedType(r.input),s=i[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${s}`}case"invalid_value":return r.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${oa.stringifyPrimitive(r.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${oa.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} s\u0103 fie ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Prea mic: a\u0219teptat ca ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${r.origin} s\u0103 fie ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${o.prefix}"`:o.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${o.suffix}"`:o.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${o.includes}"`:o.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${o.pattern}`:`Format invalid: ${n[o.format]??r.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${r.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${oa.joinValues(r.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${r.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${r.origin}`;default:return"Intrare invalid\u0103"}}};function ow(){return{localeError:iw()}}bp.exports=Ln.default});var wp=w((Mn,Op)=>{"use strict";var aw=Mn&&Mn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),sw=Mn&&Mn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),cw=Mn&&Mn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&aw(t,e,n);return sw(t,e),t};Object.defineProperty(Mn,"__esModule",{value:!0});Mn.default=uw;var aa=cw(le());function kp(e,t,n,i){let r=Math.abs(e),o=r%10,a=r%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?n:i}var lw=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=aa.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${aa.stringifyPrimitive(r.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${aa.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),l=kp(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.maximum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),l=kp(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.minimum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${aa.joinValues(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function uw(){return{localeError:lw()}}Op.exports=Mn.default});var Tp=w((Un,Ap)=>{"use strict";var dw=Un&&Un.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),_w=Un&&Un.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),pw=Un&&Un.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&dw(t,e,n);return _w(t,e),t};Object.defineProperty(Un,"__esModule",{value:!0});Un.default=mw;var sa=pw(le()),fw=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}let n={regex:"vnos",email:"e-po\u0161tni naslov",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 datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=sa.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${s}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${sa.stringifyPrimitive(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${sa.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${o}${r.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${o}${r.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${n[o.format]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${sa.joinValues(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}};function mw(){return{localeError:fw()}}Ap.exports=Un.default});var Ip=w((xn,Np)=>{"use strict";var gw=xn&&xn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),yw=xn&&xn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),hw=xn&&xn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&gw(t,e,n);return yw(t,e),t};Object.defineProperty(xn,"__esModule",{value:!0});xn.default=Sw;var ca=hw(le()),vw=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(r){return e[r]??null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",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-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=ca.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${s}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${ca.stringifyPrimitive(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${ca.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${n[o.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${ca.joinValues(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function Sw(){return{localeError:vw()}}Np.exports=xn.default});var $p=w((Pn,Rp)=>{"use strict";var bw=Pn&&Pn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Ew=Pn&&Pn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),kw=Pn&&Pn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&bw(t,e,n);return Ew(t,e),t};Object.defineProperty(Pn,"__esModule",{value:!0});Pn.default=ww;var la=kw(le()),Ow=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(r){return e[r]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",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 \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=la.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return r.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${la.stringifyPrimitive(r.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${la.joinValues(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${la.joinValues(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function ww(){return{localeError:Ow()}}Rp.exports=Pn.default});var Lp=w((Dn,Cp)=>{"use strict";var Aw=Dn&&Dn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Tw=Dn&&Dn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Nw=Dn&&Dn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Aw(t,e,n);return Tw(t,e),t};Object.defineProperty(Dn,"__esModule",{value:!0});Dn.default=Rw;var ua=Nw(le()),Iw=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(r){return e[r]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=ua.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${ua.stringifyPrimitive(r.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${ua.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${r.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${ua.joinValues(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function Rw(){return{localeError:Iw()}}Cp.exports=Dn.default});var Up=w((jn,Mp)=>{"use strict";var $w=jn&&jn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Cw=jn&&jn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Lw=jn&&jn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&$w(t,e,n);return Cw(t,e),t};Object.defineProperty(jn,"__esModule",{value:!0});jn.default=Uw;var da=Lw(le()),Mw=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(r){return e[r]??null}let n={regex:"girdi",email:"e-posta adresi",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 tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=da.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${da.stringifyPrimitive(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${da.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[o.format]??r.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${da.joinValues(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function Uw(){return{localeError:Mw()}}Mp.exports=jn.default});var Lc=w((zn,xp)=>{"use strict";var xw=zn&&zn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Pw=zn&&zn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Dw=zn&&zn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&xw(t,e,n);return Pw(t,e),t};Object.defineProperty(zn,"__esModule",{value:!0});zn.default=zw;var _a=Dw(le()),jw=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=_a.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${_a.stringifyPrimitive(r.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${_a.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${_a.joinValues(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${r.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function zw(){return{localeError:jw()}}xp.exports=zn.default});var Dp=w((zr,Pp)=>{"use strict";var Fw=zr&&zr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zr,"__esModule",{value:!0});zr.default=qw;var Zw=Fw(Lc());function qw(){return(0,Zw.default)()}Pp.exports=zr.default});var zp=w((Fn,jp)=>{"use strict";var Vw=Fn&&Fn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Ww=Fn&&Fn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Bw=Fn&&Fn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Vw(t,e,n);return Ww(t,e),t};Object.defineProperty(Fn,"__esModule",{value:!0});Fn.default=Jw;var pa=Bw(le()),Hw=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(r){return e[r]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=pa.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${pa.stringifyPrimitive(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${pa.joinValues(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${o}${r.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${o}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${r.keys.length>1?"\u0632":""}: ${pa.joinValues(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function Jw(){return{localeError:Hw()}}jp.exports=Fn.default});var Zp=w((Zn,Fp)=>{"use strict";var Kw=Zn&&Zn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Gw=Zn&&Zn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Xw=Zn&&Zn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Kw(t,e,n);return Gw(t,e),t};Object.defineProperty(Zn,"__esModule",{value:!0});Zn.default=Qw;var fa=Xw(le()),Yw=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(r){return e[r]??null}let n={regex:"kirish",email:"elektron pochta manzili",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 sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=fa.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${s}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${fa.stringifyPrimitive(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${fa.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[o.format]??r.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${fa.joinValues(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${r.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function Qw(){return{localeError:Yw()}}Fp.exports=Zn.default});var Vp=w((qn,qp)=>{"use strict";var eA=qn&&qn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),tA=qn&&qn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),nA=qn&&qn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&eA(t,e,n);return tA(t,e),t};Object.defineProperty(qn,"__esModule",{value:!0});qn.default=iA;var ma=nA(le()),rA=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(r){return e[r]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",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:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=ma.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${ma.stringifyPrimitive(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${ma.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${n[o.format]??r.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${ma.joinValues(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function iA(){return{localeError:rA()}}qp.exports=qn.default});var Bp=w((Vn,Wp)=>{"use strict";var oA=Vn&&Vn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),aA=Vn&&Vn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),sA=Vn&&Vn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&oA(t,e,n);return aA(t,e),t};Object.defineProperty(Vn,"__esModule",{value:!0});Vn.default=lA;var ga=sA(le()),cA=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(r){return e[r]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=ga.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${ga.stringifyPrimitive(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${ga.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${n[o.format]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${ga.joinValues(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function lA(){return{localeError:cA()}}Wp.exports=Vn.default});var Jp=w((Wn,Hp)=>{"use strict";var uA=Wn&&Wn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),dA=Wn&&Wn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),_A=Wn&&Wn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&uA(t,e,n);return dA(t,e),t};Object.defineProperty(Wn,"__esModule",{value:!0});Wn.default=fA;var ya=_A(le()),pA=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(r){return e[r]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",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 \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=ya.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${ya.stringifyPrimitive(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${ya.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${ya.joinValues(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function fA(){return{localeError:pA()}}Hp.exports=Wn.default});var Gp=w((Bn,Kp)=>{"use strict";var mA=Bn&&Bn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),gA=Bn&&Bn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),yA=Bn&&Bn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&mA(t,e,n);return gA(t,e),t};Object.defineProperty(Bn,"__esModule",{value:!0});Bn.default=vA;var ha=yA(le()),hA=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(r){return e[r]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",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:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=ha.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${ha.stringifyPrimitive(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${ha.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${a.verb} ${o}${r.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.maximum}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${a.verb} ${o}${r.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.minimum}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${n[o.format]??r.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${ha.joinValues(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function vA(){return{localeError:hA()}}Kp.exports=Bn.default});var Mc=w(j=>{"use strict";var me=j&&j.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(j,"__esModule",{value:!0});j.zhCN=j.vi=j.uz=j.ur=j.uk=j.ua=j.tr=j.th=j.ta=j.sv=j.sl=j.ru=j.ro=j.pt=j.pl=j.ps=j.ota=j.no=j.nl=j.ms=j.mk=j.lt=j.ko=j.km=j.kh=j.ka=j.ja=j.it=j.is=j.id=j.hy=j.hu=j.hr=j.he=j.frCA=j.fr=j.fi=j.fa=j.es=j.eo=j.en=j.el=j.de=j.da=j.cs=j.ca=j.bg=j.be=j.az=j.ar=void 0;j.yo=j.zhTW=void 0;var SA=t_();Object.defineProperty(j,"ar",{enumerable:!0,get:function(){return me(SA).default}});var bA=r_();Object.defineProperty(j,"az",{enumerable:!0,get:function(){return me(bA).default}});var EA=a_();Object.defineProperty(j,"be",{enumerable:!0,get:function(){return me(EA).default}});var kA=c_();Object.defineProperty(j,"bg",{enumerable:!0,get:function(){return me(kA).default}});var OA=u_();Object.defineProperty(j,"ca",{enumerable:!0,get:function(){return me(OA).default}});var wA=__();Object.defineProperty(j,"cs",{enumerable:!0,get:function(){return me(wA).default}});var AA=f_();Object.defineProperty(j,"da",{enumerable:!0,get:function(){return me(AA).default}});var TA=g_();Object.defineProperty(j,"de",{enumerable:!0,get:function(){return me(TA).default}});var NA=h_();Object.defineProperty(j,"el",{enumerable:!0,get:function(){return me(NA).default}});var IA=$c();Object.defineProperty(j,"en",{enumerable:!0,get:function(){return me(IA).default}});var RA=b_();Object.defineProperty(j,"eo",{enumerable:!0,get:function(){return me(RA).default}});var $A=k_();Object.defineProperty(j,"es",{enumerable:!0,get:function(){return me($A).default}});var CA=w_();Object.defineProperty(j,"fa",{enumerable:!0,get:function(){return me(CA).default}});var LA=T_();Object.defineProperty(j,"fi",{enumerable:!0,get:function(){return me(LA).default}});var MA=I_();Object.defineProperty(j,"fr",{enumerable:!0,get:function(){return me(MA).default}});var UA=$_();Object.defineProperty(j,"frCA",{enumerable:!0,get:function(){return me(UA).default}});var xA=L_();Object.defineProperty(j,"he",{enumerable:!0,get:function(){return me(xA).default}});var PA=U_();Object.defineProperty(j,"hr",{enumerable:!0,get:function(){return me(PA).default}});var DA=P_();Object.defineProperty(j,"hu",{enumerable:!0,get:function(){return me(DA).default}});var jA=z_();Object.defineProperty(j,"hy",{enumerable:!0,get:function(){return me(jA).default}});var zA=Z_();Object.defineProperty(j,"id",{enumerable:!0,get:function(){return me(zA).default}});var FA=V_();Object.defineProperty(j,"is",{enumerable:!0,get:function(){return me(FA).default}});var ZA=B_();Object.defineProperty(j,"it",{enumerable:!0,get:function(){return me(ZA).default}});var qA=J_();Object.defineProperty(j,"ja",{enumerable:!0,get:function(){return me(qA).default}});var VA=G_();Object.defineProperty(j,"ka",{enumerable:!0,get:function(){return me(VA).default}});var WA=Q_();Object.defineProperty(j,"kh",{enumerable:!0,get:function(){return me(WA).default}});var BA=Cc();Object.defineProperty(j,"km",{enumerable:!0,get:function(){return me(BA).default}});var HA=tp();Object.defineProperty(j,"ko",{enumerable:!0,get:function(){return me(HA).default}});var JA=ip();Object.defineProperty(j,"lt",{enumerable:!0,get:function(){return me(JA).default}});var KA=ap();Object.defineProperty(j,"mk",{enumerable:!0,get:function(){return me(KA).default}});var GA=cp();Object.defineProperty(j,"ms",{enumerable:!0,get:function(){return me(GA).default}});var XA=up();Object.defineProperty(j,"nl",{enumerable:!0,get:function(){return me(XA).default}});var YA=_p();Object.defineProperty(j,"no",{enumerable:!0,get:function(){return me(YA).default}});var QA=fp();Object.defineProperty(j,"ota",{enumerable:!0,get:function(){return me(QA).default}});var eT=gp();Object.defineProperty(j,"ps",{enumerable:!0,get:function(){return me(eT).default}});var tT=hp();Object.defineProperty(j,"pl",{enumerable:!0,get:function(){return me(tT).default}});var nT=Sp();Object.defineProperty(j,"pt",{enumerable:!0,get:function(){return me(nT).default}});var rT=Ep();Object.defineProperty(j,"ro",{enumerable:!0,get:function(){return me(rT).default}});var iT=wp();Object.defineProperty(j,"ru",{enumerable:!0,get:function(){return me(iT).default}});var oT=Tp();Object.defineProperty(j,"sl",{enumerable:!0,get:function(){return me(oT).default}});var aT=Ip();Object.defineProperty(j,"sv",{enumerable:!0,get:function(){return me(aT).default}});var sT=$p();Object.defineProperty(j,"ta",{enumerable:!0,get:function(){return me(sT).default}});var cT=Lp();Object.defineProperty(j,"th",{enumerable:!0,get:function(){return me(cT).default}});var lT=Up();Object.defineProperty(j,"tr",{enumerable:!0,get:function(){return me(lT).default}});var uT=Dp();Object.defineProperty(j,"ua",{enumerable:!0,get:function(){return me(uT).default}});var dT=Lc();Object.defineProperty(j,"uk",{enumerable:!0,get:function(){return me(dT).default}});var _T=zp();Object.defineProperty(j,"ur",{enumerable:!0,get:function(){return me(_T).default}});var pT=Zp();Object.defineProperty(j,"uz",{enumerable:!0,get:function(){return me(pT).default}});var fT=Vp();Object.defineProperty(j,"vi",{enumerable:!0,get:function(){return me(fT).default}});var mT=Bp();Object.defineProperty(j,"zhCN",{enumerable:!0,get:function(){return me(mT).default}});var gT=Jp();Object.defineProperty(j,"zhTW",{enumerable:!0,get:function(){return me(gT).default}});var yT=Gp();Object.defineProperty(j,"yo",{enumerable:!0,get:function(){return me(yT).default}})});var li=w(Bt=>{"use strict";var Xp;Object.defineProperty(Bt,"__esModule",{value:!0});Bt.globalRegistry=Bt.$ZodRegistry=Bt.$input=Bt.$output=void 0;Bt.registry=Yp;Bt.$output=Symbol("ZodOutput");Bt.$input=Symbol("ZodInput");var va=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let i={...this.get(n)??{}};delete i.id;let r={...i,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};Bt.$ZodRegistry=va;function Yp(){return new va}(Xp=globalThis).__zod_globalRegistry??(Xp.__zod_globalRegistry=Yp());Bt.globalRegistry=globalThis.__zod_globalRegistry});var nf=w(T=>{"use strict";var hT=T&&T.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),vT=T&&T.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Ea=T&&T.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&hT(t,e,n);return vT(t,e),t};Object.defineProperty(T,"__esModule",{value:!0});T.TimePrecision=void 0;T._string=ST;T._coercedString=bT;T._email=ET;T._guid=kT;T._uuid=OT;T._uuidv4=wT;T._uuidv6=AT;T._uuidv7=TT;T._url=NT;T._emoji=IT;T._nanoid=RT;T._cuid=$T;T._cuid2=CT;T._ulid=LT;T._xid=MT;T._ksuid=UT;T._ipv4=xT;T._ipv6=PT;T._mac=DT;T._cidrv4=jT;T._cidrv6=zT;T._base64=FT;T._base64url=ZT;T._e164=qT;T._jwt=VT;T._isoDateTime=WT;T._isoDate=BT;T._isoTime=HT;T._isoDuration=JT;T._number=KT;T._coercedNumber=GT;T._int=XT;T._float32=YT;T._float64=QT;T._int32=eN;T._uint32=tN;T._boolean=nN;T._coercedBoolean=rN;T._bigint=iN;T._coercedBigint=oN;T._int64=aN;T._uint64=sN;T._symbol=cN;T._undefined=lN;T._null=uN;T._any=dN;T._unknown=_N;T._never=pN;T._void=fN;T._date=mN;T._coercedDate=gN;T._nan=yN;T._lt=Qp;T._lte=ui;T._max=ui;T._lte=ui;T._max=ui;T._gt=ef;T._gte=di;T._min=di;T._gte=di;T._min=di;T._positive=hN;T._negative=vN;T._nonpositive=SN;T._nonnegative=bN;T._multipleOf=EN;T._maxSize=kN;T._minSize=ON;T._size=wN;T._maxLength=AN;T._minLength=TN;T._length=NN;T._regex=IN;T._lowercase=RN;T._uppercase=$N;T._includes=CN;T._startsWith=LN;T._endsWith=MN;T._property=UN;T._mime=xN;T._overwrite=Fr;T._normalize=PN;T._trim=DN;T._toLowerCase=jN;T._toUpperCase=zN;T._slugify=FN;T._array=ZN;T._union=qN;T._xor=VN;T._discriminatedUnion=WN;T._intersection=BN;T._tuple=HN;T._record=JN;T._map=KN;T._set=GN;T._enum=XN;T._nativeEnum=YN;T._literal=QN;T._file=eI;T._transform=tI;T._optional=nI;T._nullable=rI;T._default=iI;T._nonoptional=oI;T._success=aI;T._catch=sI;T._pipe=cI;T._readonly=lI;T._templateLiteral=uI;T._lazy=dI;T._promise=_I;T._custom=pI;T._refine=fI;T._superRefine=mI;T._check=tf;T.describe=gI;T.meta=yI;T._stringbool=hI;T._stringFormat=vI;var He=Ea(fo()),ba=Ea(li()),Sa=Ea(Rc()),H=Ea(le());function ST(e,t){return new e({type:"string",...H.normalizeParams(t)})}function bT(e,t){return new e({type:"string",coerce:!0,...H.normalizeParams(t)})}function ET(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...H.normalizeParams(t)})}function kT(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...H.normalizeParams(t)})}function OT(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...H.normalizeParams(t)})}function wT(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...H.normalizeParams(t)})}function AT(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...H.normalizeParams(t)})}function TT(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...H.normalizeParams(t)})}function NT(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...H.normalizeParams(t)})}function IT(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...H.normalizeParams(t)})}function RT(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...H.normalizeParams(t)})}function $T(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...H.normalizeParams(t)})}function CT(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...H.normalizeParams(t)})}function LT(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...H.normalizeParams(t)})}function MT(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...H.normalizeParams(t)})}function UT(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...H.normalizeParams(t)})}function xT(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...H.normalizeParams(t)})}function PT(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...H.normalizeParams(t)})}function DT(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...H.normalizeParams(t)})}function jT(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...H.normalizeParams(t)})}function zT(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...H.normalizeParams(t)})}function FT(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...H.normalizeParams(t)})}function ZT(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...H.normalizeParams(t)})}function qT(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...H.normalizeParams(t)})}function VT(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...H.normalizeParams(t)})}T.TimePrecision={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function WT(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...H.normalizeParams(t)})}function BT(e,t){return new e({type:"string",format:"date",check:"string_format",...H.normalizeParams(t)})}function HT(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...H.normalizeParams(t)})}function JT(e,t){return new e({type:"string",format:"duration",check:"string_format",...H.normalizeParams(t)})}function KT(e,t){return new e({type:"number",checks:[],...H.normalizeParams(t)})}function GT(e,t){return new e({type:"number",coerce:!0,checks:[],...H.normalizeParams(t)})}function XT(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...H.normalizeParams(t)})}function YT(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...H.normalizeParams(t)})}function QT(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...H.normalizeParams(t)})}function eN(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...H.normalizeParams(t)})}function tN(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...H.normalizeParams(t)})}function nN(e,t){return new e({type:"boolean",...H.normalizeParams(t)})}function rN(e,t){return new e({type:"boolean",coerce:!0,...H.normalizeParams(t)})}function iN(e,t){return new e({type:"bigint",...H.normalizeParams(t)})}function oN(e,t){return new e({type:"bigint",coerce:!0,...H.normalizeParams(t)})}function aN(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...H.normalizeParams(t)})}function sN(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...H.normalizeParams(t)})}function cN(e,t){return new e({type:"symbol",...H.normalizeParams(t)})}function lN(e,t){return new e({type:"undefined",...H.normalizeParams(t)})}function uN(e,t){return new e({type:"null",...H.normalizeParams(t)})}function dN(e){return new e({type:"any"})}function _N(e){return new e({type:"unknown"})}function pN(e,t){return new e({type:"never",...H.normalizeParams(t)})}function fN(e,t){return new e({type:"void",...H.normalizeParams(t)})}function mN(e,t){return new e({type:"date",...H.normalizeParams(t)})}function gN(e,t){return new e({type:"date",coerce:!0,...H.normalizeParams(t)})}function yN(e,t){return new e({type:"nan",...H.normalizeParams(t)})}function Qp(e,t){return new He.$ZodCheckLessThan({check:"less_than",...H.normalizeParams(t),value:e,inclusive:!1})}function ui(e,t){return new He.$ZodCheckLessThan({check:"less_than",...H.normalizeParams(t),value:e,inclusive:!0})}function ef(e,t){return new He.$ZodCheckGreaterThan({check:"greater_than",...H.normalizeParams(t),value:e,inclusive:!1})}function di(e,t){return new He.$ZodCheckGreaterThan({check:"greater_than",...H.normalizeParams(t),value:e,inclusive:!0})}function hN(e){return ef(0,e)}function vN(e){return Qp(0,e)}function SN(e){return ui(0,e)}function bN(e){return di(0,e)}function EN(e,t){return new He.$ZodCheckMultipleOf({check:"multiple_of",...H.normalizeParams(t),value:e})}function kN(e,t){return new He.$ZodCheckMaxSize({check:"max_size",...H.normalizeParams(t),maximum:e})}function ON(e,t){return new He.$ZodCheckMinSize({check:"min_size",...H.normalizeParams(t),minimum:e})}function wN(e,t){return new He.$ZodCheckSizeEquals({check:"size_equals",...H.normalizeParams(t),size:e})}function AN(e,t){return new He.$ZodCheckMaxLength({check:"max_length",...H.normalizeParams(t),maximum:e})}function TN(e,t){return new He.$ZodCheckMinLength({check:"min_length",...H.normalizeParams(t),minimum:e})}function NN(e,t){return new He.$ZodCheckLengthEquals({check:"length_equals",...H.normalizeParams(t),length:e})}function IN(e,t){return new He.$ZodCheckRegex({check:"string_format",format:"regex",...H.normalizeParams(t),pattern:e})}function RN(e){return new He.$ZodCheckLowerCase({check:"string_format",format:"lowercase",...H.normalizeParams(e)})}function $N(e){return new He.$ZodCheckUpperCase({check:"string_format",format:"uppercase",...H.normalizeParams(e)})}function CN(e,t){return new He.$ZodCheckIncludes({check:"string_format",format:"includes",...H.normalizeParams(t),includes:e})}function LN(e,t){return new He.$ZodCheckStartsWith({check:"string_format",format:"starts_with",...H.normalizeParams(t),prefix:e})}function MN(e,t){return new He.$ZodCheckEndsWith({check:"string_format",format:"ends_with",...H.normalizeParams(t),suffix:e})}function UN(e,t,n){return new He.$ZodCheckProperty({check:"property",property:e,schema:t,...H.normalizeParams(n)})}function xN(e,t){return new He.$ZodCheckMimeType({check:"mime_type",mime:e,...H.normalizeParams(t)})}function Fr(e){return new He.$ZodCheckOverwrite({check:"overwrite",tx:e})}function PN(e){return Fr(t=>t.normalize(e))}function DN(){return Fr(e=>e.trim())}function jN(){return Fr(e=>e.toLowerCase())}function zN(){return Fr(e=>e.toUpperCase())}function FN(){return Fr(e=>H.slugify(e))}function ZN(e,t,n){return new e({type:"array",element:t,...H.normalizeParams(n)})}function qN(e,t,n){return new e({type:"union",options:t,...H.normalizeParams(n)})}function VN(e,t,n){return new e({type:"union",options:t,inclusive:!1,...H.normalizeParams(n)})}function WN(e,t,n,i){return new e({type:"union",options:n,discriminator:t,...H.normalizeParams(i)})}function BN(e,t,n){return new e({type:"intersection",left:t,right:n})}function HN(e,t,n,i){let r=n instanceof Sa.$ZodType,o=r?i:n,a=r?n:null;return new e({type:"tuple",items:t,rest:a,...H.normalizeParams(o)})}function JN(e,t,n,i){return new e({type:"record",keyType:t,valueType:n,...H.normalizeParams(i)})}function KN(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...H.normalizeParams(i)})}function GN(e,t,n){return new e({type:"set",valueType:t,...H.normalizeParams(n)})}function XN(e,t,n){let i=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:i,...H.normalizeParams(n)})}function YN(e,t,n){return new e({type:"enum",entries:t,...H.normalizeParams(n)})}function QN(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...H.normalizeParams(n)})}function eI(e,t){return new e({type:"file",...H.normalizeParams(t)})}function tI(e,t){return new e({type:"transform",transform:t})}function nI(e,t){return new e({type:"optional",innerType:t})}function rI(e,t){return new e({type:"nullable",innerType:t})}function iI(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():H.shallowClone(n)}})}function oI(e,t,n){return new e({type:"nonoptional",innerType:t,...H.normalizeParams(n)})}function aI(e,t){return new e({type:"success",innerType:t})}function sI(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function cI(e,t,n){return new e({type:"pipe",in:t,out:n})}function lI(e,t){return new e({type:"readonly",innerType:t})}function uI(e,t,n){return new e({type:"template_literal",parts:t,...H.normalizeParams(n)})}function dI(e,t){return new e({type:"lazy",getter:t})}function _I(e,t){return new e({type:"promise",innerType:t})}function pI(e,t,n){let i=H.normalizeParams(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function fI(e,t,n){return new e({type:"custom",check:"custom",fn:t,...H.normalizeParams(n)})}function mI(e,t){let n=tf(i=>(i.addIssue=r=>{if(typeof r=="string")i.issues.push(H.issue(r,i.value,n._zod.def));else{let o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=i.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),i.issues.push(H.issue(o))}},e(i.value,i)),t);return n}function tf(e,t){let n=new He.$ZodCheck({check:"custom",...H.normalizeParams(t)});return n._zod.check=e,n}function gI(e){let t=new He.$ZodCheck({check:"describe"});return t._zod.onattach=[n=>{let i=ba.globalRegistry.get(n)??{};ba.globalRegistry.add(n,{...i,description:e})}],t._zod.check=()=>{},t}function yI(e){let t=new He.$ZodCheck({check:"meta"});return t._zod.onattach=[n=>{let i=ba.globalRegistry.get(n)??{};ba.globalRegistry.add(n,{...i,...e})}],t._zod.check=()=>{},t}function hI(e,t){let n=H.normalizeParams(t),i=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(f=>typeof f=="string"?f.toLowerCase():f),r=r.map(f=>typeof f=="string"?f.toLowerCase():f));let o=new Set(i),a=new Set(r),s=e.Codec??Sa.$ZodCodec,l=e.Boolean??Sa.$ZodBoolean,c=e.String??Sa.$ZodString,u=new c({type:"string",error:n.error}),d=new l({type:"boolean",error:n.error}),p=new s({type:"pipe",in:u,out:d,transform:((f,S)=>{let h=f;return n.case!=="sensitive"&&(h=h.toLowerCase()),o.has(h)?!0:a.has(h)?!1:(S.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:S.value,inst:p,continue:!1}),{})}),reverseTransform:((f,S)=>f===!0?i[0]||"true":r[0]||"false"),error:n.error});return p}function vI(e,t,n,i={}){let r=H.normalizeParams(i),o={...H.normalizeParams(i),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:s=>n.test(s),...r};return n instanceof RegExp&&(o.pattern=n),new e(o)}});var _i=w(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.createStandardJSONSchemaMethod=Lt.createToJSONSchemaMethod=void 0;Lt.initializeContext=Uc;Lt.process=ka;Lt.extractDefs=xc;Lt.finalize=Pc;var SI=li();function Uc(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??SI.globalRegistry,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function ka(e,t,n={path:[],schemaPath:[]}){var i;let r=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let u={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,u);else{let p=a.schema,f=t.processors[r.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);f(e,t,p,u)}let d=e._zod.parent;d&&(a.ref||(a.ref=d),ka(d,t,u),t.seen.get(d).isParent=!0)}let l=t.metadataRegistry.get(e);return l&&Object.assign(a.schema,l),t.io==="input"&&vt(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function xc(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let l=i.get(s);if(l&&l!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(s,a[0])}}let r=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let d=e.external.registry.get(a[0])?.id,p=e.external.uri??(S=>S);if(d)return{ref:p(d)};let f=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=f,{defId:f,ref:`${p("__shared")}#/${s}/${f}`}}if(a[1]===n)return{ref:"#"};let c=`#/${s}/`,u=a[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:c+u}},o=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:l,defId:c}=r(a);s.def={...s.schema},c&&(s.defId=c);let u=s.schema;for(let d in u)delete u[d];u.$ref=l};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
63
+ `)}f.write("payload.value = newResult;"),f.write("return payload;");let x=f.compile();return(F,Z)=>x(p,F,Z)},o,a=X.isObject,s=!G.globalConfig.jitless,l=X.allowsEval,c=s&&l.value,u=t.catchall,d;e._zod.parse=(p,f)=>{d??(d=i.value);let S=p.value;return a(S)?s&&c&&f?.async===!1&&f.jitless!==!0?(o||(o=r(t.shape)),p=o(p,f),u?e_([],S,p,f,d,e):p):n(p,f):(p.issues.push({expected:"object",code:"invalid_type",input:S,inst:e}),p)}});function Pd(e,t,n,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let r=e.filter(o=>!X.aborted(o));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>X.finalizeIssue(a,i,G.config())))}),t)}y.$ZodUnion=G.$constructor("$ZodUnion",(e,t)=>{y.$ZodType.init(e,t),X.defineLazy(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),X.defineLazy(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),X.defineLazy(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),X.defineLazy(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(r=>r._zod.pattern);return new RegExp(`^(${i.map(r=>X.cleanRegex(r.source)).join("|")})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,a=[];for(let s of t.options){let l=s._zod.run({value:i.value,issues:[]},r);if(l instanceof Promise)a.push(l),o=!0;else{if(l.issues.length===0)return l;a.push(l)}}return o?Promise.all(a).then(s=>Pd(s,i,e,r)):Pd(a,i,e,r)}});function jd(e,t,n,i){let r=e.filter(o=>o.issues.length===0);return r.length===1?(t.value=r[0].value,t):(r.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>X.finalizeIssue(a,i,G.config())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}y.$ZodXor=G.$constructor("$ZodXor",(e,t)=>{y.$ZodUnion.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,a=[];for(let s of t.options){let l=s._zod.run({value:i.value,issues:[]},r);l instanceof Promise?(a.push(l),o=!0):a.push(l)}return o?Promise.all(a).then(s=>jd(s,i,e,r)):jd(a,i,e,r)}});y.$ZodDiscriminatedUnion=G.$constructor("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,y.$ZodUnion.init(e,t);let n=e._zod.parse;X.defineLazy(e._zod,"propValues",()=>{let r={};for(let o of t.options){let a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let[s,l]of Object.entries(a)){r[s]||(r[s]=new Set);for(let c of l)r[s].add(c)}}return r});let i=X.cached(()=>{let r=t.options,o=new Map;for(let a of r){let s=a._zod.propValues?.[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let l of s){if(o.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);o.set(l,a)}}return o});e._zod.parse=(r,o)=>{let a=r.value;if(!X.isObject(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;let s=i.value.get(a?.[t.discriminator]);return s?s._zod.run(r,o):t.unionFallback||o.direction==="backward"?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:a,path:[t.discriminator],inst:e}),r)}});y.$ZodIntersection=G.$constructor("$ZodIntersection",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>{let r=n.value,o=t.left._zod.run({value:r,issues:[]},i),a=t.right._zod.run({value:r,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([l,c])=>zd(n,l,c)):zd(n,o,a)}});function Rc(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(X.isPlainObject(e)&&X.isPlainObject(t)){let n=Object.keys(t),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),r={...e,...t};for(let o of i){let a=Rc(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r[o]=a.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let r=e[i],o=t[i],a=Rc(r,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function zd(e,t,n){let i=new Map,r;for(let s of t.issues)if(s.code==="unrecognized_keys"){r??(r=s);for(let l of s.keys)i.has(l)||i.set(l,{}),i.get(l).l=!0}else e.issues.push(s);for(let s of n.issues)if(s.code==="unrecognized_keys")for(let l of s.keys)i.has(l)||i.set(l,{}),i.get(l).r=!0;else e.issues.push(s);let o=[...i].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(o.length&&r&&e.issues.push({...r,keys:o}),X.aborted(e))return e;let a=Rc(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}y.$ZodTuple=G.$constructor("$ZodTuple",(e,t)=>{y.$ZodType.init(e,t);let n=t.items;e._zod.parse=(i,r)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let a=[],s=Fd(n,"optin"),l=Fd(n,"optout");if(!t.rest){if(o.length<s)return i.issues.push({code:"too_small",minimum:s,inclusive:!0,input:o,inst:e,origin:"array"}),i;o.length>n.length&&i.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:o,inst:e,origin:"array"})}let c=new Array(n.length);for(let u=0;u<n.length;u++){let d=n[u]._zod.run({value:o[u],issues:[]},r);d instanceof Promise?a.push(d.then(p=>{c[u]=p})):c[u]=d}if(t.rest){let u=n.length-1,d=o.slice(n.length);for(let p of d){u++;let f=t.rest._zod.run({value:p,issues:[]},r);f instanceof Promise?a.push(f.then(S=>Zd(S,i,u))):Zd(f,i,u)}}return a.length?Promise.all(a).then(()=>qd(c,i,n,o,l)):qd(c,i,n,o,l)}});function Fd(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function Zd(e,t,n){e.issues.length&&t.issues.push(...X.prefixIssues(n,e.issues)),t.value[n]=e.value}function qd(e,t,n,i,r){for(let o=0;o<n.length;o++){let a=e[o],s=o<i.length;if(a.issues.length){if(!s&&o>=r){t.value.length=o;break}t.issues.push(...X.prefixIssues(o,a.issues))}t.value[o]=a.value}for(let o=t.value.length-1;o>=i.length&&(n[o]._zod.optout==="optional"&&t.value[o]===void 0);o--)t.value.length=o;return t}y.$ZodRecord=G.$constructor("$ZodRecord",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!X.isPlainObject(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let o=[],a=t.keyType._zod.values;if(a){n.value={};let s=new Set;for(let c of a)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){s.add(typeof c=="number"?c.toString():c);let u=t.keyType._zod.run({value:c,issues:[]},i);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(f=>X.finalizeIssue(f,i,G.config())),input:c,path:[c],inst:e});continue}let d=u.value,p=t.valueType._zod.run({value:r[c],issues:[]},i);p instanceof Promise?o.push(p.then(f=>{f.issues.length&&n.issues.push(...X.prefixIssues(c,f.issues)),n.value[d]=f.value})):(p.issues.length&&n.issues.push(...X.prefixIssues(c,p.issues)),n.value[d]=p.value)}let l;for(let c in r)s.has(c)||(l=l??[],l.push(c));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:l})}else{n.value={};for(let s of Reflect.ownKeys(r)){if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(r,s))continue;let l=t.keyType._zod.run({value:s,issues:[]},i);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&Ce.number.test(s)&&l.issues.length){let d=t.keyType._zod.run({value:Number(s),issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(l=d)}if(l.issues.length){t.mode==="loose"?n.value[s]=r[s]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(d=>X.finalizeIssue(d,i,G.config())),input:s,path:[s],inst:e});continue}let u=t.valueType._zod.run({value:r[s],issues:[]},i);u instanceof Promise?o.push(u.then(d=>{d.issues.length&&n.issues.push(...X.prefixIssues(s,d.issues)),n.value[l.value]=d.value})):(u.issues.length&&n.issues.push(...X.prefixIssues(s,u.issues)),n.value[l.value]=u.value)}}return o.length?Promise.all(o).then(()=>n):n}});y.$ZodMap=G.$constructor("$ZodMap",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let o=[];n.value=new Map;for(let[a,s]of r){let l=t.keyType._zod.run({value:a,issues:[]},i),c=t.valueType._zod.run({value:s,issues:[]},i);l instanceof Promise||c instanceof Promise?o.push(Promise.all([l,c]).then(([u,d])=>{Vd(u,d,n,a,r,e,i)})):Vd(l,c,n,a,r,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function Vd(e,t,n,i,r,o,a){e.issues.length&&(X.propertyKeyTypes.has(typeof i)?n.issues.push(...X.prefixIssues(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(s=>X.finalizeIssue(s,a,G.config()))})),t.issues.length&&(X.propertyKeyTypes.has(typeof i)?n.issues.push(...X.prefixIssues(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(s=>X.finalizeIssue(s,a,G.config()))})),n.value.set(e.value,t.value)}y.$ZodSet=G.$constructor("$ZodSet",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let o=[];n.value=new Set;for(let a of r){let s=t.valueType._zod.run({value:a,issues:[]},i);s instanceof Promise?o.push(s.then(l=>Wd(l,n))):Wd(s,n)}return o.length?Promise.all(o).then(()=>n):n}});function Wd(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}y.$ZodEnum=G.$constructor("$ZodEnum",(e,t)=>{y.$ZodType.init(e,t);let n=X.getEnumValues(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(r=>X.propertyKeyTypes.has(typeof r)).map(r=>typeof r=="string"?X.escapeRegex(r):r.toString()).join("|")})$`),e._zod.parse=(r,o)=>{let a=r.value;return i.has(a)||r.issues.push({code:"invalid_value",values:n,input:a,inst:e}),r}});y.$ZodLiteral=G.$constructor("$ZodLiteral",(e,t)=>{if(y.$ZodType.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?X.escapeRegex(i):i?X.escapeRegex(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,r)=>{let o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}});y.$ZodFile=G.$constructor("$ZodFile",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}});y.$ZodTransform=G.$constructor("$ZodTransform",(e,t)=>{y.$ZodType.init(e,t),e._zod.optin="optional",e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new G.$ZodEncodeError(e.constructor.name);let r=t.transform(n.value,n);if(i.async)return(r instanceof Promise?r:Promise.resolve(r)).then(a=>(n.value=a,n.fallback=!0,n));if(r instanceof Promise)throw new G.$ZodAsyncError;return n.value=r,n.fallback=!0,n}});function Bd(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}y.$ZodOptional=G.$constructor("$ZodOptional",(e,t)=>{y.$ZodType.init(e,t),e._zod.optin="optional",e._zod.optout="optional",X.defineLazy(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),X.defineLazy(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${X.cleanRegex(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){let r=n.value,o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(a=>Bd(a,r)):Bd(o,r)}return n.value===void 0?n:t.innerType._zod.run(n,i)}});y.$ZodExactOptional=G.$constructor("$ZodExactOptional",(e,t)=>{y.$ZodOptional.init(e,t),X.defineLazy(e._zod,"values",()=>t.innerType._zod.values),X.defineLazy(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)});y.$ZodNullable=G.$constructor("$ZodNullable",(e,t)=>{y.$ZodType.init(e,t),X.defineLazy(e._zod,"optin",()=>t.innerType._zod.optin),X.defineLazy(e._zod,"optout",()=>t.innerType._zod.optout),X.defineLazy(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${X.cleanRegex(n.source)}|null)$`):void 0}),X.defineLazy(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)});y.$ZodDefault=G.$constructor("$ZodDefault",(e,t)=>{y.$ZodType.init(e,t),e._zod.optin="optional",X.defineLazy(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>Hd(o,t)):Hd(r,t)}});function Hd(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}y.$ZodPrefault=G.$constructor("$ZodPrefault",(e,t)=>{y.$ZodType.init(e,t),e._zod.optin="optional",X.defineLazy(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))});y.$ZodNonOptional=G.$constructor("$ZodNonOptional",(e,t)=>{y.$ZodType.init(e,t),X.defineLazy(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>Jd(o,e)):Jd(r,e)}});function Jd(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}y.$ZodSuccess=G.$constructor("$ZodSuccess",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new G.$ZodEncodeError("ZodSuccess");let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.issues.length===0,n)):(n.value=r.issues.length===0,n)}});y.$ZodCatch=G.$constructor("$ZodCatch",(e,t)=>{y.$ZodType.init(e,t),e._zod.optin="optional",X.defineLazy(e._zod,"optout",()=>t.innerType._zod.optout),X.defineLazy(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(a=>X.finalizeIssue(a,i,G.config()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(o=>X.finalizeIssue(o,i,G.config()))},input:n.value}),n.issues=[],n.fallback=!0),n)}});y.$ZodNaN=G.$constructor("$ZodNaN",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)});y.$ZodPipe=G.$constructor("$ZodPipe",(e,t)=>{y.$ZodType.init(e,t),X.defineLazy(e._zod,"values",()=>t.in._zod.values),X.defineLazy(e._zod,"optin",()=>t.in._zod.optin),X.defineLazy(e._zod,"optout",()=>t.out._zod.optout),X.defineLazy(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(a=>ho(a,t.in,i)):ho(o,t.in,i)}let r=t.in._zod.run(n,i);return r instanceof Promise?r.then(o=>ho(o,t.out,i)):ho(r,t.out,i)}});function ho(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}y.$ZodCodec=G.$constructor("$ZodCodec",(e,t)=>{y.$ZodType.init(e,t),X.defineLazy(e._zod,"values",()=>t.in._zod.values),X.defineLazy(e._zod,"optin",()=>t.in._zod.optin),X.defineLazy(e._zod,"optout",()=>t.out._zod.optout),X.defineLazy(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let o=t.in._zod.run(n,i);return o instanceof Promise?o.then(a=>vo(a,t,i)):vo(o,t,i)}else{let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(a=>vo(a,t,i)):vo(o,t,i)}}});function vo(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(o=>So(e,o,t.out,n)):So(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(o=>So(e,o,t.in,n)):So(e,r,t.in,n)}}function So(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}y.$ZodPreprocess=G.$constructor("$ZodPreprocess",(e,t)=>{y.$ZodPipe.init(e,t)});y.$ZodReadonly=G.$constructor("$ZodReadonly",(e,t)=>{y.$ZodType.init(e,t),X.defineLazy(e._zod,"propValues",()=>t.innerType._zod.propValues),X.defineLazy(e._zod,"values",()=>t.innerType._zod.values),X.defineLazy(e._zod,"optin",()=>t.innerType?._zod?.optin),X.defineLazy(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(Kd):Kd(r)}});function Kd(e){return e.value=Object.freeze(e.value),e}y.$ZodTemplateLiteral=G.$constructor("$ZodTemplateLiteral",(e,t)=>{y.$ZodType.init(e,t);let n=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let r=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let o=r.startsWith("^")?1:0,a=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(o,a))}else if(i===null||X.primitiveTypes.has(typeof i))n.push(X.escapeRegex(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(i,r)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)});y.$ZodFunction=G.$constructor("$ZodFunction",(e,t)=>(y.$ZodType.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...i){let r=e._def.input?(0,Dr.parse)(e._def.input,i):i,o=Reflect.apply(n,this,r);return e._def.output?(0,Dr.parse)(e._def.output,o):o}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let r=e._def.input?await(0,Dr.parseAsync)(e._def.input,i):i,o=await Reflect.apply(n,this,r);return e._def.output?await(0,Dr.parseAsync)(e._def.output,o):o}},e._zod.parse=(n,i)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let i=e.constructor;return Array.isArray(n[0])?new i({type:"function",input:new y.$ZodTuple({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new i({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:n})},e));y.$ZodPromise=G.$constructor("$ZodPromise",(e,t)=>{y.$ZodType.init(e,t),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},i))});y.$ZodLazy=G.$constructor("$ZodLazy",(e,t)=>{y.$ZodType.init(e,t),X.defineLazy(e._zod,"innerType",()=>{let n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),X.defineLazy(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),X.defineLazy(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),X.defineLazy(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),X.defineLazy(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)});y.$ZodCustom=G.$constructor("$ZodCustom",(e,t)=>{ko.$ZodCheck.init(e,t),y.$ZodType.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{let i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then(o=>Gd(o,n,i,e));Gd(r,n,i,e)}});function Gd(e,t,n,i){if(!e){let r={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(r.params=i._zod.def.params),t.issues.push(X.issue(r))}}});var n_=w((Gt,t_)=>{"use strict";var Ub=Gt&&Gt.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),xb=Gt&&Gt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Db=Gt&&Gt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Ub(t,e,n);return xb(t,e),t};Object.defineProperty(Gt,"__esModule",{value:!0});Gt.default=jb;var Oo=Db(le()),Pb=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Oo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return r.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${Oo.stringifyPrimitive(r.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${Oo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${r.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${n[o.format]??r.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${Oo.joinValues(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function jb(){return{localeError:Pb()}}t_.exports=Gt.default});var i_=w((Xt,r_)=>{"use strict";var zb=Xt&&Xt.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Fb=Xt&&Xt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Zb=Xt&&Xt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&zb(t,e,n);return Fb(t,e),t};Object.defineProperty(Xt,"__esModule",{value:!0});Xt.default=Vb;var wo=Zb(le()),qb=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={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",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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=wo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${s}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${wo.stringifyPrimitive(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${wo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[o.format]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${wo.joinValues(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function Vb(){return{localeError:qb()}}r_.exports=Xt.default});var s_=w((Yt,a_)=>{"use strict";var Wb=Yt&&Yt.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Bb=Yt&&Yt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Hb=Yt&&Yt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Wb(t,e,n);return Bb(t,e),t};Object.defineProperty(Yt,"__esModule",{value:!0});Yt.default=Kb;var Ao=Hb(le());function o_(e,t,n,i){let r=Math.abs(e),o=r%10,a=r%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?n:i}var Jb=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Ao.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${Ao.stringifyPrimitive(r.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${Ao.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),l=o_(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${r.maximum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),l=o_(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${r.minimum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${Ao.joinValues(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function Kb(){return{localeError:Jb()}}a_.exports=Yt.default});var l_=w((Qt,c_)=>{"use strict";var Gb=Qt&&Qt.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Xb=Qt&&Qt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Yb=Qt&&Qt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Gb(t,e,n);return Xb(t,e),t};Object.defineProperty(Qt,"__esModule",{value:!0});Qt.default=eE;var To=Yb(le()),Qb=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=To.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${To.stringifyPrimitive(r.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${To.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${To.joinValues(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function eE(){return{localeError:Qb()}}c_.exports=Qt.default});var d_=w((en,u_)=>{"use strict";var tE=en&&en.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),nE=en&&en.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),rE=en&&en.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&tE(t,e,n);return nE(t,e),t};Object.defineProperty(en,"__esModule",{value:!0});en.default=oE;var No=rE(le()),iE=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",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:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=No.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${s}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${No.stringifyPrimitive(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${No.joinValues(r.values," o ")}`;case"too_big":{let o=r.inclusive?"com a m\xE0xim":"menys de",a=t(r.origin);return a?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${o} ${r.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(r.origin);return a?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${o} ${r.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${No.joinValues(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}};function oE(){return{localeError:iE()}}u_.exports=en.default});var p_=w((tn,__)=>{"use strict";var aE=tn&&tn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),sE=tn&&tn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),cE=tn&&tn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&aE(t,e,n);return sE(t,e),t};Object.defineProperty(tn,"__esModule",{value:!0});tn.default=uE;var Io=cE(le()),lE=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(r){return e[r]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",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:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Io.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${s}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${Io.stringifyPrimitive(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${Io.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${Io.joinValues(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}};function uE(){return{localeError:lE()}}__.exports=tn.default});var m_=w((nn,f_)=>{"use strict";var dE=nn&&nn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),_E=nn&&nn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),pE=nn&&nn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&dE(t,e,n);return _E(t,e),t};Object.defineProperty(nn,"__esModule",{value:!0});nn.default=mE;var Ro=pE(le()),fE=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-mailadresse",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 dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Ro.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${s}`:`Ugyldigt input: forventede ${o}, fik ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${Ro.stringifyPrimitive(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${Ro.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),s=i[r.origin]??r.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${o} ${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),s=i[r.origin]??r.origin;return a?`For lille: forventede ${s} ${a.verb} ${o} ${r.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${Ro.joinValues(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${r.origin}`;default:return"Ugyldigt input"}}};function mE(){return{localeError:fE()}}f_.exports=nn.default});var y_=w((rn,g_)=>{"use strict";var gE=rn&&rn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),yE=rn&&rn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),hE=rn&&rn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&gE(t,e,n);return yE(t,e),t};Object.defineProperty(rn,"__esModule",{value:!0});rn.default=SE;var $o=hE(le()),vE=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(r){return e[r]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",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-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=$o.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${s}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${$o.stringifyPrimitive(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${$o.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ist`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ist`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${$o.joinValues(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}};function SE(){return{localeError:vE()}}g_.exports=rn.default});var v_=w((on,h_)=>{"use strict";var bE=on&&on.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),EE=on&&on.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),kE=on&&on.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&bE(t,e,n);return EE(t,e),t};Object.defineProperty(on,"__esModule",{value:!0});on.default=wE;var Co=kE(le()),OE=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(r){return e[r]??null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",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 \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Co.parsedType(r.input),s=i[a]??a;return typeof r.expected=="string"&&/^[A-Z]/.test(r.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${r.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return r.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${Co.stringifyPrimitive(r.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${Co.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${r.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${r.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${o.prefix}"`:o.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${o.suffix}"`:o.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${o.includes}"`:o.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${o.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[o.format]??r.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${r.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${r.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${r.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${Co.joinValues(r.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${r.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${r.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function wE(){return{localeError:OE()}}h_.exports=on.default});var Lc=w((an,S_)=>{"use strict";var AE=an&&an.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),TE=an&&an.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),NE=an&&an.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&AE(t,e,n);return TE(t,e),t};Object.defineProperty(an,"__esModule",{value:!0});an.default=RE;var Lo=NE(le()),IE=()=>{let e={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"}};function t(r){return e[r]??null}let n={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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Lo.parsedType(r.input),s=i[a]??a;return`Invalid input: expected ${o}, received ${s}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${Lo.stringifyPrimitive(r.values[0])}`:`Invalid option: expected one of ${Lo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Too big: expected ${r.origin??"value"} to have ${o}${r.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Too small: expected ${r.origin} to have ${o}${r.minimum.toString()} ${a.unit}`:`Too small: expected ${r.origin} to be ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${Lo.joinValues(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`Invalid discriminator value. Expected ${r.options.map(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}};function RE(){return{localeError:IE()}}S_.exports=an.default});var E_=w((sn,b_)=>{"use strict";var $E=sn&&sn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),CE=sn&&sn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),LE=sn&&sn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&$E(t,e,n);return CE(t,e),t};Object.defineProperty(sn,"__esModule",{value:!0});sn.default=UE;var Mo=LE(le()),ME=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Mo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${s}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${Mo.stringifyPrimitive(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${Mo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${o}${r.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${n[o.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${Mo.joinValues(r.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}};function UE(){return{localeError:ME()}}b_.exports=sn.default});var O_=w((cn,k_)=>{"use strict";var xE=cn&&cn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),DE=cn&&cn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),PE=cn&&cn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&xE(t,e,n);return DE(t,e),t};Object.defineProperty(cn,"__esModule",{value:!0});cn.default=zE;var Uo=PE(le()),jE=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",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:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Uo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${s}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${Uo.stringifyPrimitive(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${Uo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),s=i[r.origin]??r.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${o}${r.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),s=i[r.origin]??r.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${o}${r.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${Uo.joinValues(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}};function zE(){return{localeError:jE()}}k_.exports=cn.default});var A_=w((ln,w_)=>{"use strict";var FE=ln&&ln.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),ZE=ln&&ln.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),qE=ln&&ln.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&FE(t,e,n);return ZE(t,e),t};Object.defineProperty(ln,"__esModule",{value:!0});ln.default=WE;var xo=qE(le()),VE=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=xo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${xo.stringifyPrimitive(r.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${xo.joinValues(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[o.format]??r.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${xo.joinValues(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function WE(){return{localeError:VE()}}w_.exports=ln.default});var N_=w((un,T_)=>{"use strict";var BE=un&&un.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),HE=un&&un.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),JE=un&&un.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&BE(t,e,n);return HE(t,e),t};Object.defineProperty(un,"__esModule",{value:!0});un.default=GE;var Do=JE(le()),KE=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(r){return e[r]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Do.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${s}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${Do.stringifyPrimitive(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${Do.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${o}${r.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${o}${r.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${n[o.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${Do.joinValues(r.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function GE(){return{localeError:KE()}}T_.exports=un.default});var R_=w((dn,I_)=>{"use strict";var XE=dn&&dn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),YE=dn&&dn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),QE=dn&&dn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&XE(t,e,n);return YE(t,e),t};Object.defineProperty(dn,"__esModule",{value:!0});dn.default=tk;var Po=QE(le()),ek=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse e-mail",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:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Po.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${s} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${Po.stringifyPrimitive(r.values[0])} attendu`:`Option invalide : une valeur parmi ${Po.joinValues(r.values,"|")} attendue`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Trop grand : ${i[r.origin]??"valeur"} doit ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Trop petit : ${i[r.origin]??"valeur"} doit ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Trop petit : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${Po.joinValues(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function tk(){return{localeError:ek()}}I_.exports=dn.default});var C_=w((_n,$_)=>{"use strict";var nk=_n&&_n.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),rk=_n&&_n.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ik=_n&&_n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&nk(t,e,n);return rk(t,e),t};Object.defineProperty(_n,"__esModule",{value:!0});_n.default=ak;var jo=ik(le()),ok=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse courriel",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:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=jo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${s}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${jo.stringifyPrimitive(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${jo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u2264":"<",a=t(r.origin);return a?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${o}${r.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u2265":">",a=t(r.origin);return a?`Trop petit : attendu que ${r.origin} ait ${o}${r.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${r.origin} soit ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${jo.joinValues(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function ak(){return{localeError:ok()}}$_.exports=_n.default});var M_=w((pn,L_)=>{"use strict";var sk=pn&&pn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),ck=pn&&pn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),lk=pn&&pn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&sk(t,e,n);return ck(t,e),t};Object.defineProperty(pn,"__esModule",{value:!0});pn.default=dk;var zo=lk(le()),uk=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=c=>c?e[c]:void 0,i=c=>{let u=n(c);return u?u.label:c??e.unknown.label},r=c=>`\u05D4${i(c)}`,o=c=>(n(c)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=c=>c?t[c]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},l={nan:"NaN"};return c=>{switch(c.code){case"invalid_type":{let u=c.expected,d=l[u??""]??i(u),p=zo.parsedType(c.input),f=l[p]??e[p]?.label??p;return/^[A-Z]/.test(c.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${c.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`}case"invalid_value":{if(c.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${zo.stringifyPrimitive(c.values[0])}`;let u=c.values.map(f=>zo.stringifyPrimitive(f));if(c.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u[0]} \u05D0\u05D5 ${u[1]}`;let d=u[u.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let u=a(c.origin),d=r(c.origin??"value");if(c.origin==="string")return`${u?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.maximum.toString()} ${u?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(c.origin==="number"){let S=c.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${c.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${S}`}if(c.origin==="array"||c.origin==="set"){let S=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",h=c.inclusive?`${c.maximum} ${u?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${c.maximum} ${u?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let p=c.inclusive?"<=":"<",f=o(c.origin??"value");return u?.unit?`${u.longLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${p}${c.maximum.toString()} ${u.unit}`:`${u?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${f} ${p}${c.maximum.toString()}`}case"too_small":{let u=a(c.origin),d=r(c.origin??"value");if(c.origin==="string")return`${u?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.minimum.toString()} ${u?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(c.origin==="number"){let S=c.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${c.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${S}`}if(c.origin==="array"||c.origin==="set"){let S=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(c.minimum===1&&c.inclusive){let v=(c.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${v}`}let h=c.inclusive?`${c.minimum} ${u?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${c.minimum} ${u?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${S} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let p=c.inclusive?">=":">",f=o(c.origin??"value");return u?.unit?`${u.shortLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${p}${c.minimum.toString()} ${u.unit}`:`${u?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${f} ${p}${c.minimum.toString()}`}case"invalid_format":{let u=c;if(u.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${u.prefix}"`;if(u.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${u.suffix}"`;if(u.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${u.includes}"`;if(u.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${u.pattern}`;let d=s[u.format],p=d?.label??u.format,S=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${p} \u05DC\u05D0 ${S}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${c.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${c.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${c.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${zo.joinValues(c.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${r(c.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function dk(){return{localeError:uk()}}L_.exports=pn.default});var x_=w((fn,U_)=>{"use strict";var _k=fn&&fn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),pk=fn&&fn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),fk=fn&&fn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&_k(t,e,n);return pk(t,e),t};Object.defineProperty(fn,"__esModule",{value:!0});fn.default=gk;var Fo=fk(le()),mk=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(r){return e[r]??null}let n={regex:"unos",email:"email adresa",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 datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},i={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Fo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${r.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${o}, a primljeno je ${s}`}case"invalid_value":return r.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${Fo.stringifyPrimitive(r.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${Fo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),s=i[r.origin]??r.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${o}${r.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),s=i[r.origin]??r.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${o}${r.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${o.prefix}"`:o.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${o.suffix}"`:o.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${o.includes}"`:o.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`:`Neispravna ${n[o.format]??r.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${r.divisor}`;case"unrecognized_keys":return`Neprepoznat${r.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${Fo.joinValues(r.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[r.origin]??r.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[r.origin]??r.origin}`;default:return"Neispravan unos"}}};function gk(){return{localeError:mk()}}U_.exports=fn.default});var P_=w((mn,D_)=>{"use strict";var yk=mn&&mn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),hk=mn&&mn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),vk=mn&&mn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&yk(t,e,n);return hk(t,e),t};Object.defineProperty(mn,"__esModule",{value:!0});mn.default=bk;var Zo=vk(le()),Sk=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}let n={regex:"bemenet",email:"email c\xEDm",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 id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Zo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${Zo.stringifyPrimitive(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${Zo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${r.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${o}${r.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[o.format]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${Zo.joinValues(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function bk(){return{localeError:Sk()}}D_.exports=mn.default});var F_=w((gn,z_)=>{"use strict";var Ek=gn&&gn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),kk=gn&&gn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Ok=gn&&gn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Ek(t,e,n);return kk(t,e),t};Object.defineProperty(gn,"__esModule",{value:!0});gn.default=Ak;var qo=Ok(le());function j_(e,t,n){return Math.abs(e)===1?t:n}function Pr(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}var wk=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(r){return e[r]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=qo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return r.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${qo.stringifyPrimitive(r.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${qo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),l=j_(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Pr(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.maximum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Pr(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),l=j_(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Pr(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.minimum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Pr(r.origin)} \u056C\u056B\u0576\u056B ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[o.format]??r.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${r.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${qo.joinValues(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Pr(r.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Pr(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Ak(){return{localeError:wk()}}z_.exports=gn.default});var q_=w((yn,Z_)=>{"use strict";var Tk=yn&&yn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Nk=yn&&yn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Ik=yn&&yn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Tk(t,e,n);return Nk(t,e),t};Object.defineProperty(yn,"__esModule",{value:!0});yn.default=$k;var Vo=Ik(le()),Rk=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat email",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:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Vo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${o}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${Vo.stringifyPrimitive(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${Vo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${o}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: diharapkan ${r.origin} memiliki ${o}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${n[o.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${Vo.joinValues(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}};function $k(){return{localeError:Rk()}}Z_.exports=yn.default});var W_=w((hn,V_)=>{"use strict";var Ck=hn&&hn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Lk=hn&&hn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Mk=hn&&hn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Ck(t,e,n);return Lk(t,e),t};Object.defineProperty(hn,"__esModule",{value:!0});hn.default=xk;var Wo=Mk(le()),Uk=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(r){return e[r]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Wo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${Wo.stringifyPrimitive(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${Wo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${o}${r.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${o}${r.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${n[o.format]??r.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${Wo.joinValues(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${r.origin}`;default:return"Rangt gildi"}}};function xk(){return{localeError:Uk()}}V_.exports=hn.default});var H_=w((vn,B_)=>{"use strict";var Dk=vn&&vn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Pk=vn&&vn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),jk=vn&&vn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Dk(t,e,n);return Pk(t,e),t};Object.defineProperty(vn,"__esModule",{value:!0});vn.default=Fk;var Bo=jk(le()),zk=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}let n={regex:"input",email:"indirizzo email",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:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Bo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${s}`:`Input non valido: atteso ${o}, ricevuto ${s}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${Bo.stringifyPrimitive(r.values[0])}`:`Opzione non valida: atteso uno tra ${Bo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Troppo grande: ${r.origin??"valore"} deve avere ${o}${r.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Troppo piccolo: ${r.origin} deve avere ${o}${r.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${r.origin} deve essere ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Input non valido: ${n[o.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${Bo.joinValues(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}};function Fk(){return{localeError:zk()}}B_.exports=vn.default});var K_=w((Sn,J_)=>{"use strict";var Zk=Sn&&Sn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),qk=Sn&&Sn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Vk=Sn&&Sn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Zk(t,e,n);return qk(t,e),t};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.default=Bk;var Ho=Vk(le()),Wk=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(r){return e[r]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Ho.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${Ho.stringifyPrimitive(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${Ho.joinValues(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(r.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${a.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(r.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${a.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${r.keys.length>1?"\u7FA4":""}: ${Ho.joinValues(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function Bk(){return{localeError:Wk()}}J_.exports=Sn.default});var X_=w((bn,G_)=>{"use strict";var Hk=bn&&bn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Jk=bn&&bn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Kk=bn&&bn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Hk(t,e,n);return Jk(t,e),t};Object.defineProperty(bn,"__esModule",{value:!0});bn.default=Xk;var Jo=Kk(le()),Gk=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(r){return e[r]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Jo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return r.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${Jo.stringifyPrimitive(r.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${Jo.joinValues(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${r.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${Jo.joinValues(r.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${r.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function Xk(){return{localeError:Gk()}}G_.exports=bn.default});var Mc=w((En,Y_)=>{"use strict";var Yk=En&&En.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Qk=En&&En.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),eO=En&&En.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Yk(t,e,n);return Qk(t,e),t};Object.defineProperty(En,"__esModule",{value:!0});En.default=nO;var Ko=eO(le()),tO=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(r){return e[r]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Ko.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return r.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${Ko.stringifyPrimitive(r.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${Ko.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${Ko.joinValues(r.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function nO(){return{localeError:tO()}}Y_.exports=En.default});var ep=w((jr,Q_)=>{"use strict";var rO=jr&&jr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jr,"__esModule",{value:!0});jr.default=oO;var iO=rO(Mc());function oO(){return(0,iO.default)()}Q_.exports=jr.default});var np=w((kn,tp)=>{"use strict";var aO=kn&&kn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),sO=kn&&kn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),cO=kn&&kn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&aO(t,e,n);return sO(t,e),t};Object.defineProperty(kn,"__esModule",{value:!0});kn.default=uO;var Go=cO(le()),lO=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Go.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${Go.stringifyPrimitive(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${Go.joinValues(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(r.origin),l=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${l} ${o}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${o}${a}`}case"too_small":{let o=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(r.origin),l=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${l} ${o}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${o}${a}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[o.format]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${Go.joinValues(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function uO(){return{localeError:lO()}}tp.exports=kn.default});var op=w((On,ip)=>{"use strict";var dO=On&&On.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),_O=On&&On.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),pO=On&&On.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&dO(t,e,n);return _O(t,e),t};Object.defineProperty(On,"__esModule",{value:!0});On.default=mO;var Xo=pO(le()),ci=e=>e.charAt(0).toUpperCase()+e.slice(1);function rp(e){let t=Math.abs(e),n=t%10,i=t%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}var fO=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(r,o,a,s){let l=e[r]??null;return l===null?l:{unit:l.unit[o],verb:l.verb[s][a?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Xo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${o}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${Xo.stringifyPrimitive(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${Xo.joinValues(r.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[r.origin]??r.origin,a=t(r.origin,rp(Number(r.maximum)),r.inclusive??!1,"smaller");if(a?.verb)return`${ci(o??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.maximum.toString()} ${a.unit??"element\u0173"}`;let s=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${ci(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.maximum.toString()} ${a?.unit}`}case"too_small":{let o=i[r.origin]??r.origin,a=t(r.origin,rp(Number(r.minimum)),r.inclusive??!1,"bigger");if(a?.verb)return`${ci(o??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.minimum.toString()} ${a.unit??"element\u0173"}`;let s=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${ci(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.minimum.toString()} ${a?.unit}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${n[o.format]??r.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${Xo.joinValues(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[r.origin]??r.origin;return`${ci(o??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function mO(){return{localeError:fO()}}ip.exports=On.default});var sp=w((wn,ap)=>{"use strict";var gO=wn&&wn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),yO=wn&&wn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),hO=wn&&wn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&gO(t,e,n);return yO(t,e),t};Object.defineProperty(wn,"__esModule",{value:!0});wn.default=SO;var Yo=hO(le()),vO=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(r){return e[r]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Yo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${Yo.stringifyPrimitive(r.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${Yo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${Yo.joinValues(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function SO(){return{localeError:vO()}}ap.exports=wn.default});var lp=w((An,cp)=>{"use strict";var bO=An&&An.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),EO=An&&An.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),kO=An&&An.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&bO(t,e,n);return EO(t,e),t};Object.defineProperty(An,"__esModule",{value:!0});An.default=wO;var Qo=kO(le()),OO=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat e-mel",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:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=Qo.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${s}`:`Input tidak sah: dijangka ${o}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${Qo.stringifyPrimitive(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${Qo.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: dijangka ${r.origin??"nilai"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: dijangka ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${n[o.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${Qo.joinValues(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}};function wO(){return{localeError:OO()}}cp.exports=An.default});var dp=w((Tn,up)=>{"use strict";var AO=Tn&&Tn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),TO=Tn&&Tn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),NO=Tn&&Tn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&AO(t,e,n);return TO(t,e),t};Object.defineProperty(Tn,"__esModule",{value:!0});Tn.default=RO;var ea=NO(le()),IO=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(r){return e[r]??null}let n={regex:"invoer",email:"emailadres",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 datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=ea.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${o}, ontving ${s}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${ea.stringifyPrimitive(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${ea.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),s=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} is`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),s=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} is`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${ea.joinValues(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}};function RO(){return{localeError:IO()}}up.exports=Tn.default});var pp=w((Nn,_p)=>{"use strict";var $O=Nn&&Nn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),CO=Nn&&Nn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),LO=Nn&&Nn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&$O(t,e,n);return CO(t,e),t};Object.defineProperty(Nn,"__esModule",{value:!0});Nn.default=UO;var ta=LO(le()),MO=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-postadresse",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 dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=ta.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${s}`:`Ugyldig input: forventet ${o}, fikk ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${ta.stringifyPrimitive(r.values[0])}`:`Ugyldig valg: forventet en av ${ta.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${ta.joinValues(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}};function UO(){return{localeError:MO()}}_p.exports=Nn.default});var mp=w((In,fp)=>{"use strict";var xO=In&&In.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),DO=In&&In.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),PO=In&&In.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&xO(t,e,n);return DO(t,e),t};Object.defineProperty(In,"__esModule",{value:!0});In.default=zO;var na=PO(le()),jO=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"giren",email:"epostag\xE2h",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 heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=na.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${na.stringifyPrimitive(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${na.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=r;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[o.format]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${na.joinValues(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function zO(){return{localeError:jO()}}fp.exports=In.default});var yp=w((Rn,gp)=>{"use strict";var FO=Rn&&Rn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),ZO=Rn&&Rn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),qO=Rn&&Rn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&FO(t,e,n);return ZO(t,e),t};Object.defineProperty(Rn,"__esModule",{value:!0});Rn.default=WO;var ra=qO(le()),VO=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=ra.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${ra.stringifyPrimitive(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${ra.joinValues(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[o.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${ra.joinValues(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function WO(){return{localeError:VO()}}gp.exports=Rn.default});var vp=w(($n,hp)=>{"use strict";var BO=$n&&$n.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),HO=$n&&$n.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),JO=$n&&$n.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&BO(t,e,n);return HO(t,e),t};Object.defineProperty($n,"__esModule",{value:!0});$n.default=GO;var ia=JO(le()),KO=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(r){return e[r]??null}let n={regex:"wyra\u017Cenie",email:"adres email",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:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=ia.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${s}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${ia.stringifyPrimitive(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${ia.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[o.format]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${ia.joinValues(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function GO(){return{localeError:KO()}}hp.exports=$n.default});var bp=w((Cn,Sp)=>{"use strict";var XO=Cn&&Cn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),YO=Cn&&Cn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),QO=Cn&&Cn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&XO(t,e,n);return YO(t,e),t};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.default=tw;var oa=QO(le()),ew=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){return e[r]??null}let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",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:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=oa.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${s}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${oa.stringifyPrimitive(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${oa.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${o}${r.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Muito pequeno: esperado que ${r.origin} tivesse ${o}${r.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${n[o.format]??r.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${oa.joinValues(r.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${r.origin}`;default:return"Campo inv\xE1lido"}}};function tw(){return{localeError:ew()}}Sp.exports=Cn.default});var kp=w((Ln,Ep)=>{"use strict";var nw=Ln&&Ln.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),rw=Ln&&Ln.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),iw=Ln&&Ln.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&nw(t,e,n);return rw(t,e),t};Object.defineProperty(Ln,"__esModule",{value:!0});Ln.default=aw;var aa=iw(le()),ow=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(r){return e[r]??null}let n={regex:"intrare",email:"adres\u0103 de email",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:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},i={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=aa.parsedType(r.input),s=i[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${s}`}case"invalid_value":return r.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${aa.stringifyPrimitive(r.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${aa.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} s\u0103 fie ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Prea mic: a\u0219teptat ca ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${r.origin} s\u0103 fie ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${o.prefix}"`:o.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${o.suffix}"`:o.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${o.includes}"`:o.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${o.pattern}`:`Format invalid: ${n[o.format]??r.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${r.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${aa.joinValues(r.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${r.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${r.origin}`;default:return"Intrare invalid\u0103"}}};function aw(){return{localeError:ow()}}Ep.exports=Ln.default});var Ap=w((Mn,wp)=>{"use strict";var sw=Mn&&Mn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),cw=Mn&&Mn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),lw=Mn&&Mn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&sw(t,e,n);return cw(t,e),t};Object.defineProperty(Mn,"__esModule",{value:!0});Mn.default=dw;var sa=lw(le());function Op(e,t,n,i){let r=Math.abs(e),o=r%10,a=r%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?n:i}var uw=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=sa.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${sa.stringifyPrimitive(r.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${sa.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),l=Op(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.maximum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),l=Op(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.minimum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${sa.joinValues(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function dw(){return{localeError:uw()}}wp.exports=Mn.default});var Np=w((Un,Tp)=>{"use strict";var _w=Un&&Un.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),pw=Un&&Un.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),fw=Un&&Un.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&_w(t,e,n);return pw(t,e),t};Object.defineProperty(Un,"__esModule",{value:!0});Un.default=gw;var ca=fw(le()),mw=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}let n={regex:"vnos",email:"e-po\u0161tni naslov",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 datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=ca.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${s}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${ca.stringifyPrimitive(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${ca.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${o}${r.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${o}${r.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${n[o.format]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${ca.joinValues(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}};function gw(){return{localeError:mw()}}Tp.exports=Un.default});var Rp=w((xn,Ip)=>{"use strict";var yw=xn&&xn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),hw=xn&&xn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),vw=xn&&xn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&yw(t,e,n);return hw(t,e),t};Object.defineProperty(xn,"__esModule",{value:!0});xn.default=bw;var la=vw(le()),Sw=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(r){return e[r]??null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",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-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=la.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${s}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${la.stringifyPrimitive(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${la.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${n[o.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${la.joinValues(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function bw(){return{localeError:Sw()}}Ip.exports=xn.default});var Cp=w((Dn,$p)=>{"use strict";var Ew=Dn&&Dn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),kw=Dn&&Dn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Ow=Dn&&Dn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Ew(t,e,n);return kw(t,e),t};Object.defineProperty(Dn,"__esModule",{value:!0});Dn.default=Aw;var ua=Ow(le()),ww=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(r){return e[r]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",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 \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=ua.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return r.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${ua.stringifyPrimitive(r.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${ua.joinValues(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${ua.joinValues(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function Aw(){return{localeError:ww()}}$p.exports=Dn.default});var Mp=w((Pn,Lp)=>{"use strict";var Tw=Pn&&Pn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Nw=Pn&&Pn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Iw=Pn&&Pn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Tw(t,e,n);return Nw(t,e),t};Object.defineProperty(Pn,"__esModule",{value:!0});Pn.default=$w;var da=Iw(le()),Rw=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(r){return e[r]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=da.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${da.stringifyPrimitive(r.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${da.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${r.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${da.joinValues(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function $w(){return{localeError:Rw()}}Lp.exports=Pn.default});var xp=w((jn,Up)=>{"use strict";var Cw=jn&&jn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Lw=jn&&jn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Mw=jn&&jn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Cw(t,e,n);return Lw(t,e),t};Object.defineProperty(jn,"__esModule",{value:!0});jn.default=xw;var _a=Mw(le()),Uw=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(r){return e[r]??null}let n={regex:"girdi",email:"e-posta adresi",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 tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=_a.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${_a.stringifyPrimitive(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${_a.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[o.format]??r.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${_a.joinValues(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function xw(){return{localeError:Uw()}}Up.exports=jn.default});var Uc=w((zn,Dp)=>{"use strict";var Dw=zn&&zn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Pw=zn&&zn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),jw=zn&&zn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Dw(t,e,n);return Pw(t,e),t};Object.defineProperty(zn,"__esModule",{value:!0});zn.default=Fw;var pa=jw(le()),zw=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=pa.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${pa.stringifyPrimitive(r.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${pa.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${pa.joinValues(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${r.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function Fw(){return{localeError:zw()}}Dp.exports=zn.default});var jp=w((zr,Pp)=>{"use strict";var Zw=zr&&zr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zr,"__esModule",{value:!0});zr.default=Vw;var qw=Zw(Uc());function Vw(){return(0,qw.default)()}Pp.exports=zr.default});var Fp=w((Fn,zp)=>{"use strict";var Ww=Fn&&Fn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Bw=Fn&&Fn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Hw=Fn&&Fn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Ww(t,e,n);return Bw(t,e),t};Object.defineProperty(Fn,"__esModule",{value:!0});Fn.default=Kw;var fa=Hw(le()),Jw=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(r){return e[r]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=fa.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${fa.stringifyPrimitive(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${fa.joinValues(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${o}${r.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${o}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${r.keys.length>1?"\u0632":""}: ${fa.joinValues(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function Kw(){return{localeError:Jw()}}zp.exports=Fn.default});var qp=w((Zn,Zp)=>{"use strict";var Gw=Zn&&Zn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Xw=Zn&&Zn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Yw=Zn&&Zn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Gw(t,e,n);return Xw(t,e),t};Object.defineProperty(Zn,"__esModule",{value:!0});Zn.default=eA;var ma=Yw(le()),Qw=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(r){return e[r]??null}let n={regex:"kirish",email:"elektron pochta manzili",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 sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=ma.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${s}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${ma.stringifyPrimitive(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${ma.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[o.format]??r.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${ma.joinValues(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${r.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function eA(){return{localeError:Qw()}}Zp.exports=Zn.default});var Wp=w((qn,Vp)=>{"use strict";var tA=qn&&qn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),nA=qn&&qn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),rA=qn&&qn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&tA(t,e,n);return nA(t,e),t};Object.defineProperty(qn,"__esModule",{value:!0});qn.default=oA;var ga=rA(le()),iA=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(r){return e[r]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",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:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=ga.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${ga.stringifyPrimitive(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${ga.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${n[o.format]??r.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${ga.joinValues(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function oA(){return{localeError:iA()}}Vp.exports=qn.default});var Hp=w((Vn,Bp)=>{"use strict";var aA=Vn&&Vn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),sA=Vn&&Vn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),cA=Vn&&Vn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&aA(t,e,n);return sA(t,e),t};Object.defineProperty(Vn,"__esModule",{value:!0});Vn.default=uA;var ya=cA(le()),lA=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(r){return e[r]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=ya.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${ya.stringifyPrimitive(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${ya.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${n[o.format]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${ya.joinValues(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function uA(){return{localeError:lA()}}Bp.exports=Vn.default});var Kp=w((Wn,Jp)=>{"use strict";var dA=Wn&&Wn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),_A=Wn&&Wn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),pA=Wn&&Wn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&dA(t,e,n);return _A(t,e),t};Object.defineProperty(Wn,"__esModule",{value:!0});Wn.default=mA;var ha=pA(le()),fA=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(r){return e[r]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",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 \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=ha.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${ha.stringifyPrimitive(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${ha.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${ha.joinValues(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function mA(){return{localeError:fA()}}Jp.exports=Wn.default});var Xp=w((Bn,Gp)=>{"use strict";var gA=Bn&&Bn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),yA=Bn&&Bn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),hA=Bn&&Bn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&gA(t,e,n);return yA(t,e),t};Object.defineProperty(Bn,"__esModule",{value:!0});Bn.default=SA;var va=hA(le()),vA=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(r){return e[r]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",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:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=va.parsedType(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${va.stringifyPrimitive(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${va.joinValues(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${a.verb} ${o}${r.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.maximum}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${a.verb} ${o}${r.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.minimum}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${n[o.format]??r.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${va.joinValues(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function SA(){return{localeError:vA()}}Gp.exports=Bn.default});var xc=w(j=>{"use strict";var me=j&&j.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(j,"__esModule",{value:!0});j.zhCN=j.vi=j.uz=j.ur=j.uk=j.ua=j.tr=j.th=j.ta=j.sv=j.sl=j.ru=j.ro=j.pt=j.pl=j.ps=j.ota=j.no=j.nl=j.ms=j.mk=j.lt=j.ko=j.km=j.kh=j.ka=j.ja=j.it=j.is=j.id=j.hy=j.hu=j.hr=j.he=j.frCA=j.fr=j.fi=j.fa=j.es=j.eo=j.en=j.el=j.de=j.da=j.cs=j.ca=j.bg=j.be=j.az=j.ar=void 0;j.yo=j.zhTW=void 0;var bA=n_();Object.defineProperty(j,"ar",{enumerable:!0,get:function(){return me(bA).default}});var EA=i_();Object.defineProperty(j,"az",{enumerable:!0,get:function(){return me(EA).default}});var kA=s_();Object.defineProperty(j,"be",{enumerable:!0,get:function(){return me(kA).default}});var OA=l_();Object.defineProperty(j,"bg",{enumerable:!0,get:function(){return me(OA).default}});var wA=d_();Object.defineProperty(j,"ca",{enumerable:!0,get:function(){return me(wA).default}});var AA=p_();Object.defineProperty(j,"cs",{enumerable:!0,get:function(){return me(AA).default}});var TA=m_();Object.defineProperty(j,"da",{enumerable:!0,get:function(){return me(TA).default}});var NA=y_();Object.defineProperty(j,"de",{enumerable:!0,get:function(){return me(NA).default}});var IA=v_();Object.defineProperty(j,"el",{enumerable:!0,get:function(){return me(IA).default}});var RA=Lc();Object.defineProperty(j,"en",{enumerable:!0,get:function(){return me(RA).default}});var $A=E_();Object.defineProperty(j,"eo",{enumerable:!0,get:function(){return me($A).default}});var CA=O_();Object.defineProperty(j,"es",{enumerable:!0,get:function(){return me(CA).default}});var LA=A_();Object.defineProperty(j,"fa",{enumerable:!0,get:function(){return me(LA).default}});var MA=N_();Object.defineProperty(j,"fi",{enumerable:!0,get:function(){return me(MA).default}});var UA=R_();Object.defineProperty(j,"fr",{enumerable:!0,get:function(){return me(UA).default}});var xA=C_();Object.defineProperty(j,"frCA",{enumerable:!0,get:function(){return me(xA).default}});var DA=M_();Object.defineProperty(j,"he",{enumerable:!0,get:function(){return me(DA).default}});var PA=x_();Object.defineProperty(j,"hr",{enumerable:!0,get:function(){return me(PA).default}});var jA=P_();Object.defineProperty(j,"hu",{enumerable:!0,get:function(){return me(jA).default}});var zA=F_();Object.defineProperty(j,"hy",{enumerable:!0,get:function(){return me(zA).default}});var FA=q_();Object.defineProperty(j,"id",{enumerable:!0,get:function(){return me(FA).default}});var ZA=W_();Object.defineProperty(j,"is",{enumerable:!0,get:function(){return me(ZA).default}});var qA=H_();Object.defineProperty(j,"it",{enumerable:!0,get:function(){return me(qA).default}});var VA=K_();Object.defineProperty(j,"ja",{enumerable:!0,get:function(){return me(VA).default}});var WA=X_();Object.defineProperty(j,"ka",{enumerable:!0,get:function(){return me(WA).default}});var BA=ep();Object.defineProperty(j,"kh",{enumerable:!0,get:function(){return me(BA).default}});var HA=Mc();Object.defineProperty(j,"km",{enumerable:!0,get:function(){return me(HA).default}});var JA=np();Object.defineProperty(j,"ko",{enumerable:!0,get:function(){return me(JA).default}});var KA=op();Object.defineProperty(j,"lt",{enumerable:!0,get:function(){return me(KA).default}});var GA=sp();Object.defineProperty(j,"mk",{enumerable:!0,get:function(){return me(GA).default}});var XA=lp();Object.defineProperty(j,"ms",{enumerable:!0,get:function(){return me(XA).default}});var YA=dp();Object.defineProperty(j,"nl",{enumerable:!0,get:function(){return me(YA).default}});var QA=pp();Object.defineProperty(j,"no",{enumerable:!0,get:function(){return me(QA).default}});var eT=mp();Object.defineProperty(j,"ota",{enumerable:!0,get:function(){return me(eT).default}});var tT=yp();Object.defineProperty(j,"ps",{enumerable:!0,get:function(){return me(tT).default}});var nT=vp();Object.defineProperty(j,"pl",{enumerable:!0,get:function(){return me(nT).default}});var rT=bp();Object.defineProperty(j,"pt",{enumerable:!0,get:function(){return me(rT).default}});var iT=kp();Object.defineProperty(j,"ro",{enumerable:!0,get:function(){return me(iT).default}});var oT=Ap();Object.defineProperty(j,"ru",{enumerable:!0,get:function(){return me(oT).default}});var aT=Np();Object.defineProperty(j,"sl",{enumerable:!0,get:function(){return me(aT).default}});var sT=Rp();Object.defineProperty(j,"sv",{enumerable:!0,get:function(){return me(sT).default}});var cT=Cp();Object.defineProperty(j,"ta",{enumerable:!0,get:function(){return me(cT).default}});var lT=Mp();Object.defineProperty(j,"th",{enumerable:!0,get:function(){return me(lT).default}});var uT=xp();Object.defineProperty(j,"tr",{enumerable:!0,get:function(){return me(uT).default}});var dT=jp();Object.defineProperty(j,"ua",{enumerable:!0,get:function(){return me(dT).default}});var _T=Uc();Object.defineProperty(j,"uk",{enumerable:!0,get:function(){return me(_T).default}});var pT=Fp();Object.defineProperty(j,"ur",{enumerable:!0,get:function(){return me(pT).default}});var fT=qp();Object.defineProperty(j,"uz",{enumerable:!0,get:function(){return me(fT).default}});var mT=Wp();Object.defineProperty(j,"vi",{enumerable:!0,get:function(){return me(mT).default}});var gT=Hp();Object.defineProperty(j,"zhCN",{enumerable:!0,get:function(){return me(gT).default}});var yT=Kp();Object.defineProperty(j,"zhTW",{enumerable:!0,get:function(){return me(yT).default}});var hT=Xp();Object.defineProperty(j,"yo",{enumerable:!0,get:function(){return me(hT).default}})});var li=w(Bt=>{"use strict";var Yp;Object.defineProperty(Bt,"__esModule",{value:!0});Bt.globalRegistry=Bt.$ZodRegistry=Bt.$input=Bt.$output=void 0;Bt.registry=Qp;Bt.$output=Symbol("ZodOutput");Bt.$input=Symbol("ZodInput");var Sa=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let i={...this.get(n)??{}};delete i.id;let r={...i,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};Bt.$ZodRegistry=Sa;function Qp(){return new Sa}(Yp=globalThis).__zod_globalRegistry??(Yp.__zod_globalRegistry=Qp());Bt.globalRegistry=globalThis.__zod_globalRegistry});var rf=w(T=>{"use strict";var vT=T&&T.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),ST=T&&T.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ka=T&&T.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&vT(t,e,n);return ST(t,e),t};Object.defineProperty(T,"__esModule",{value:!0});T.TimePrecision=void 0;T._string=bT;T._coercedString=ET;T._email=kT;T._guid=OT;T._uuid=wT;T._uuidv4=AT;T._uuidv6=TT;T._uuidv7=NT;T._url=IT;T._emoji=RT;T._nanoid=$T;T._cuid=CT;T._cuid2=LT;T._ulid=MT;T._xid=UT;T._ksuid=xT;T._ipv4=DT;T._ipv6=PT;T._mac=jT;T._cidrv4=zT;T._cidrv6=FT;T._base64=ZT;T._base64url=qT;T._e164=VT;T._jwt=WT;T._isoDateTime=BT;T._isoDate=HT;T._isoTime=JT;T._isoDuration=KT;T._number=GT;T._coercedNumber=XT;T._int=YT;T._float32=QT;T._float64=eN;T._int32=tN;T._uint32=nN;T._boolean=rN;T._coercedBoolean=iN;T._bigint=oN;T._coercedBigint=aN;T._int64=sN;T._uint64=cN;T._symbol=lN;T._undefined=uN;T._null=dN;T._any=_N;T._unknown=pN;T._never=fN;T._void=mN;T._date=gN;T._coercedDate=yN;T._nan=hN;T._lt=ef;T._lte=ui;T._max=ui;T._lte=ui;T._max=ui;T._gt=tf;T._gte=di;T._min=di;T._gte=di;T._min=di;T._positive=vN;T._negative=SN;T._nonpositive=bN;T._nonnegative=EN;T._multipleOf=kN;T._maxSize=ON;T._minSize=wN;T._size=AN;T._maxLength=TN;T._minLength=NN;T._length=IN;T._regex=RN;T._lowercase=$N;T._uppercase=CN;T._includes=LN;T._startsWith=MN;T._endsWith=UN;T._property=xN;T._mime=DN;T._overwrite=Fr;T._normalize=PN;T._trim=jN;T._toLowerCase=zN;T._toUpperCase=FN;T._slugify=ZN;T._array=qN;T._union=VN;T._xor=WN;T._discriminatedUnion=BN;T._intersection=HN;T._tuple=JN;T._record=KN;T._map=GN;T._set=XN;T._enum=YN;T._nativeEnum=QN;T._literal=eI;T._file=tI;T._transform=nI;T._optional=rI;T._nullable=iI;T._default=oI;T._nonoptional=aI;T._success=sI;T._catch=cI;T._pipe=lI;T._readonly=uI;T._templateLiteral=dI;T._lazy=_I;T._promise=pI;T._custom=fI;T._refine=mI;T._superRefine=gI;T._check=nf;T.describe=yI;T.meta=hI;T._stringbool=vI;T._stringFormat=SI;var He=ka(mo()),Ea=ka(li()),ba=ka(Cc()),H=ka(le());function bT(e,t){return new e({type:"string",...H.normalizeParams(t)})}function ET(e,t){return new e({type:"string",coerce:!0,...H.normalizeParams(t)})}function kT(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...H.normalizeParams(t)})}function OT(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...H.normalizeParams(t)})}function wT(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...H.normalizeParams(t)})}function AT(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...H.normalizeParams(t)})}function TT(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...H.normalizeParams(t)})}function NT(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...H.normalizeParams(t)})}function IT(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...H.normalizeParams(t)})}function RT(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...H.normalizeParams(t)})}function $T(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...H.normalizeParams(t)})}function CT(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...H.normalizeParams(t)})}function LT(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...H.normalizeParams(t)})}function MT(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...H.normalizeParams(t)})}function UT(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...H.normalizeParams(t)})}function xT(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...H.normalizeParams(t)})}function DT(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...H.normalizeParams(t)})}function PT(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...H.normalizeParams(t)})}function jT(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...H.normalizeParams(t)})}function zT(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...H.normalizeParams(t)})}function FT(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...H.normalizeParams(t)})}function ZT(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...H.normalizeParams(t)})}function qT(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...H.normalizeParams(t)})}function VT(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...H.normalizeParams(t)})}function WT(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...H.normalizeParams(t)})}T.TimePrecision={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function BT(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...H.normalizeParams(t)})}function HT(e,t){return new e({type:"string",format:"date",check:"string_format",...H.normalizeParams(t)})}function JT(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...H.normalizeParams(t)})}function KT(e,t){return new e({type:"string",format:"duration",check:"string_format",...H.normalizeParams(t)})}function GT(e,t){return new e({type:"number",checks:[],...H.normalizeParams(t)})}function XT(e,t){return new e({type:"number",coerce:!0,checks:[],...H.normalizeParams(t)})}function YT(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...H.normalizeParams(t)})}function QT(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...H.normalizeParams(t)})}function eN(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...H.normalizeParams(t)})}function tN(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...H.normalizeParams(t)})}function nN(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...H.normalizeParams(t)})}function rN(e,t){return new e({type:"boolean",...H.normalizeParams(t)})}function iN(e,t){return new e({type:"boolean",coerce:!0,...H.normalizeParams(t)})}function oN(e,t){return new e({type:"bigint",...H.normalizeParams(t)})}function aN(e,t){return new e({type:"bigint",coerce:!0,...H.normalizeParams(t)})}function sN(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...H.normalizeParams(t)})}function cN(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...H.normalizeParams(t)})}function lN(e,t){return new e({type:"symbol",...H.normalizeParams(t)})}function uN(e,t){return new e({type:"undefined",...H.normalizeParams(t)})}function dN(e,t){return new e({type:"null",...H.normalizeParams(t)})}function _N(e){return new e({type:"any"})}function pN(e){return new e({type:"unknown"})}function fN(e,t){return new e({type:"never",...H.normalizeParams(t)})}function mN(e,t){return new e({type:"void",...H.normalizeParams(t)})}function gN(e,t){return new e({type:"date",...H.normalizeParams(t)})}function yN(e,t){return new e({type:"date",coerce:!0,...H.normalizeParams(t)})}function hN(e,t){return new e({type:"nan",...H.normalizeParams(t)})}function ef(e,t){return new He.$ZodCheckLessThan({check:"less_than",...H.normalizeParams(t),value:e,inclusive:!1})}function ui(e,t){return new He.$ZodCheckLessThan({check:"less_than",...H.normalizeParams(t),value:e,inclusive:!0})}function tf(e,t){return new He.$ZodCheckGreaterThan({check:"greater_than",...H.normalizeParams(t),value:e,inclusive:!1})}function di(e,t){return new He.$ZodCheckGreaterThan({check:"greater_than",...H.normalizeParams(t),value:e,inclusive:!0})}function vN(e){return tf(0,e)}function SN(e){return ef(0,e)}function bN(e){return ui(0,e)}function EN(e){return di(0,e)}function kN(e,t){return new He.$ZodCheckMultipleOf({check:"multiple_of",...H.normalizeParams(t),value:e})}function ON(e,t){return new He.$ZodCheckMaxSize({check:"max_size",...H.normalizeParams(t),maximum:e})}function wN(e,t){return new He.$ZodCheckMinSize({check:"min_size",...H.normalizeParams(t),minimum:e})}function AN(e,t){return new He.$ZodCheckSizeEquals({check:"size_equals",...H.normalizeParams(t),size:e})}function TN(e,t){return new He.$ZodCheckMaxLength({check:"max_length",...H.normalizeParams(t),maximum:e})}function NN(e,t){return new He.$ZodCheckMinLength({check:"min_length",...H.normalizeParams(t),minimum:e})}function IN(e,t){return new He.$ZodCheckLengthEquals({check:"length_equals",...H.normalizeParams(t),length:e})}function RN(e,t){return new He.$ZodCheckRegex({check:"string_format",format:"regex",...H.normalizeParams(t),pattern:e})}function $N(e){return new He.$ZodCheckLowerCase({check:"string_format",format:"lowercase",...H.normalizeParams(e)})}function CN(e){return new He.$ZodCheckUpperCase({check:"string_format",format:"uppercase",...H.normalizeParams(e)})}function LN(e,t){return new He.$ZodCheckIncludes({check:"string_format",format:"includes",...H.normalizeParams(t),includes:e})}function MN(e,t){return new He.$ZodCheckStartsWith({check:"string_format",format:"starts_with",...H.normalizeParams(t),prefix:e})}function UN(e,t){return new He.$ZodCheckEndsWith({check:"string_format",format:"ends_with",...H.normalizeParams(t),suffix:e})}function xN(e,t,n){return new He.$ZodCheckProperty({check:"property",property:e,schema:t,...H.normalizeParams(n)})}function DN(e,t){return new He.$ZodCheckMimeType({check:"mime_type",mime:e,...H.normalizeParams(t)})}function Fr(e){return new He.$ZodCheckOverwrite({check:"overwrite",tx:e})}function PN(e){return Fr(t=>t.normalize(e))}function jN(){return Fr(e=>e.trim())}function zN(){return Fr(e=>e.toLowerCase())}function FN(){return Fr(e=>e.toUpperCase())}function ZN(){return Fr(e=>H.slugify(e))}function qN(e,t,n){return new e({type:"array",element:t,...H.normalizeParams(n)})}function VN(e,t,n){return new e({type:"union",options:t,...H.normalizeParams(n)})}function WN(e,t,n){return new e({type:"union",options:t,inclusive:!1,...H.normalizeParams(n)})}function BN(e,t,n,i){return new e({type:"union",options:n,discriminator:t,...H.normalizeParams(i)})}function HN(e,t,n){return new e({type:"intersection",left:t,right:n})}function JN(e,t,n,i){let r=n instanceof ba.$ZodType,o=r?i:n,a=r?n:null;return new e({type:"tuple",items:t,rest:a,...H.normalizeParams(o)})}function KN(e,t,n,i){return new e({type:"record",keyType:t,valueType:n,...H.normalizeParams(i)})}function GN(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...H.normalizeParams(i)})}function XN(e,t,n){return new e({type:"set",valueType:t,...H.normalizeParams(n)})}function YN(e,t,n){let i=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:i,...H.normalizeParams(n)})}function QN(e,t,n){return new e({type:"enum",entries:t,...H.normalizeParams(n)})}function eI(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...H.normalizeParams(n)})}function tI(e,t){return new e({type:"file",...H.normalizeParams(t)})}function nI(e,t){return new e({type:"transform",transform:t})}function rI(e,t){return new e({type:"optional",innerType:t})}function iI(e,t){return new e({type:"nullable",innerType:t})}function oI(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():H.shallowClone(n)}})}function aI(e,t,n){return new e({type:"nonoptional",innerType:t,...H.normalizeParams(n)})}function sI(e,t){return new e({type:"success",innerType:t})}function cI(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function lI(e,t,n){return new e({type:"pipe",in:t,out:n})}function uI(e,t){return new e({type:"readonly",innerType:t})}function dI(e,t,n){return new e({type:"template_literal",parts:t,...H.normalizeParams(n)})}function _I(e,t){return new e({type:"lazy",getter:t})}function pI(e,t){return new e({type:"promise",innerType:t})}function fI(e,t,n){let i=H.normalizeParams(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function mI(e,t,n){return new e({type:"custom",check:"custom",fn:t,...H.normalizeParams(n)})}function gI(e,t){let n=nf(i=>(i.addIssue=r=>{if(typeof r=="string")i.issues.push(H.issue(r,i.value,n._zod.def));else{let o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=i.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),i.issues.push(H.issue(o))}},e(i.value,i)),t);return n}function nf(e,t){let n=new He.$ZodCheck({check:"custom",...H.normalizeParams(t)});return n._zod.check=e,n}function yI(e){let t=new He.$ZodCheck({check:"describe"});return t._zod.onattach=[n=>{let i=Ea.globalRegistry.get(n)??{};Ea.globalRegistry.add(n,{...i,description:e})}],t._zod.check=()=>{},t}function hI(e){let t=new He.$ZodCheck({check:"meta"});return t._zod.onattach=[n=>{let i=Ea.globalRegistry.get(n)??{};Ea.globalRegistry.add(n,{...i,...e})}],t._zod.check=()=>{},t}function vI(e,t){let n=H.normalizeParams(t),i=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(f=>typeof f=="string"?f.toLowerCase():f),r=r.map(f=>typeof f=="string"?f.toLowerCase():f));let o=new Set(i),a=new Set(r),s=e.Codec??ba.$ZodCodec,l=e.Boolean??ba.$ZodBoolean,c=e.String??ba.$ZodString,u=new c({type:"string",error:n.error}),d=new l({type:"boolean",error:n.error}),p=new s({type:"pipe",in:u,out:d,transform:((f,S)=>{let h=f;return n.case!=="sensitive"&&(h=h.toLowerCase()),o.has(h)?!0:a.has(h)?!1:(S.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:S.value,inst:p,continue:!1}),{})}),reverseTransform:((f,S)=>f===!0?i[0]||"true":r[0]||"false"),error:n.error});return p}function SI(e,t,n,i={}){let r=H.normalizeParams(i),o={...H.normalizeParams(i),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:s=>n.test(s),...r};return n instanceof RegExp&&(o.pattern=n),new e(o)}});var _i=w(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.createStandardJSONSchemaMethod=Lt.createToJSONSchemaMethod=void 0;Lt.initializeContext=Dc;Lt.process=Oa;Lt.extractDefs=Pc;Lt.finalize=jc;var bI=li();function Dc(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??bI.globalRegistry,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Oa(e,t,n={path:[],schemaPath:[]}){var i;let r=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let u={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,u);else{let p=a.schema,f=t.processors[r.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);f(e,t,p,u)}let d=e._zod.parent;d&&(a.ref||(a.ref=d),Oa(d,t,u),t.seen.get(d).isParent=!0)}let l=t.metadataRegistry.get(e);return l&&Object.assign(a.schema,l),t.io==="input"&&vt(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function Pc(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let l=i.get(s);if(l&&l!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(s,a[0])}}let r=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let d=e.external.registry.get(a[0])?.id,p=e.external.uri??(S=>S);if(d)return{ref:p(d)};let f=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=f,{defId:f,ref:`${p("__shared")}#/${s}/${f}`}}if(a[1]===n)return{ref:"#"};let c=`#/${s}/`,u=a[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:c+u}},o=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:l,defId:c}=r(a);s.def={...s.schema},c&&(s.defId=c);let u=s.schema;for(let d in u)delete u[d];u.$ref=l};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
64
64
 
65
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){o(a);continue}if(e.external){let c=e.external.registry.get(a[0])?.id;if(t!==a[0]&&c){o(a);continue}}if(e.metadataRegistry.get(a[0])?.id){o(a);continue}if(s.cycle){o(a);continue}if(s.count>1&&e.reused==="ref"){o(a);continue}}}function Pc(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=s=>{let l=e.seen.get(s);if(l.ref===null)return;let c=l.def??l.schema,u={...c},d=l.ref;if(l.ref=null,d){i(d);let f=e.seen.get(d),S=f.schema;if(S.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(S)):Object.assign(c,S),Object.assign(c,u),s._zod.parent===d)for(let v in c)v==="$ref"||v==="allOf"||v in u||delete c[v];if(S.$ref&&f.def)for(let v in c)v==="$ref"||v==="allOf"||v in f.def&&JSON.stringify(c[v])===JSON.stringify(f.def[v])&&delete c[v]}let p=s._zod.parent;if(p&&p!==d){i(p);let f=e.seen.get(p);if(f?.schema.$ref&&(c.$ref=f.schema.$ref,f.def))for(let S in c)S==="$ref"||S==="allOf"||S in f.def&&JSON.stringify(c[S])===JSON.stringify(f.def[S])&&delete c[S]}e.override({zodSchema:s,jsonSchema:c,path:l.path??[]})};for(let s of[...e.seen.entries()].reverse())i(s[0]);let r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(s)}Object.assign(r,n.def??n.schema);let o=e.metadataRegistry.get(t)?.id;o!==void 0&&r.id===o&&delete r.id;let a=e.external?.defs??{};for(let s of e.seen.entries()){let l=s[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,a[l.defId]=l.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?r.$defs=a:r.definitions=a);try{let s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:(0,Lt.createStandardJSONSchemaMethod)(t,"input",e.processors),output:(0,Lt.createStandardJSONSchemaMethod)(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function vt(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return vt(i.element,n);if(i.type==="set")return vt(i.valueType,n);if(i.type==="lazy")return vt(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return vt(i.innerType,n);if(i.type==="intersection")return vt(i.left,n)||vt(i.right,n);if(i.type==="record"||i.type==="map")return vt(i.keyType,n)||vt(i.valueType,n);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:vt(i.in,n)||vt(i.out,n);if(i.type==="object"){for(let r in i.shape)if(vt(i.shape[r],n))return!0;return!1}if(i.type==="union"){for(let r of i.options)if(vt(r,n))return!0;return!1}if(i.type==="tuple"){for(let r of i.items)if(vt(r,n))return!0;return!!(i.rest&&vt(i.rest,n))}return!1}var bI=(e,t={})=>n=>{let i=Uc({...n,processors:t});return ka(e,i),xc(i,e),Pc(i,e)};Lt.createToJSONSchemaMethod=bI;var EI=(e,t,n={})=>i=>{let{libraryOptions:r,target:o}=i??{},a=Uc({...r??{},target:o,io:t,processors:n});return ka(e,a),xc(a,e),Pc(a,e)};Lt.createStandardJSONSchemaMethod=EI});var pi=w(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.allProcessors=R.lazyProcessor=R.optionalProcessor=R.promiseProcessor=R.readonlyProcessor=R.pipeProcessor=R.catchProcessor=R.prefaultProcessor=R.defaultProcessor=R.nonoptionalProcessor=R.nullableProcessor=R.recordProcessor=R.tupleProcessor=R.intersectionProcessor=R.unionProcessor=R.objectProcessor=R.arrayProcessor=R.setProcessor=R.mapProcessor=R.transformProcessor=R.functionProcessor=R.customProcessor=R.successProcessor=R.fileProcessor=R.templateLiteralProcessor=R.nanProcessor=R.literalProcessor=R.enumProcessor=R.dateProcessor=R.unknownProcessor=R.anyProcessor=R.neverProcessor=R.voidProcessor=R.undefinedProcessor=R.nullProcessor=R.symbolProcessor=R.bigintProcessor=R.booleanProcessor=R.numberProcessor=R.stringProcessor=void 0;R.toJSONSchema=uR;var De=_i(),kI=le(),OI={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},wI=(e,t,n,i)=>{let r=n;r.type="string";let{minimum:o,maximum:a,format:s,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof o=="number"&&(r.minLength=o),typeof a=="number"&&(r.maxLength=a),s&&(r.format=OI[s]??s,r.format===""&&delete r.format,s==="time"&&delete r.format),c&&(r.contentEncoding=c),l&&l.size>0){let u=[...l];u.length===1?r.pattern=u[0].source:u.length>1&&(r.allOf=[...u.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}};R.stringProcessor=wI;var AI=(e,t,n,i)=>{let r=n,{minimum:o,maximum:a,format:s,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;typeof s=="string"&&s.includes("int")?r.type="integer":r.type="number";let d=typeof u=="number"&&u>=(o??Number.NEGATIVE_INFINITY),p=typeof c=="number"&&c<=(a??Number.POSITIVE_INFINITY),f=t.target==="draft-04"||t.target==="openapi-3.0";d?f?(r.minimum=u,r.exclusiveMinimum=!0):r.exclusiveMinimum=u:typeof o=="number"&&(r.minimum=o),p?f?(r.maximum=c,r.exclusiveMaximum=!0):r.exclusiveMaximum=c:typeof a=="number"&&(r.maximum=a),typeof l=="number"&&(r.multipleOf=l)};R.numberProcessor=AI;var TI=(e,t,n,i)=>{n.type="boolean"};R.booleanProcessor=TI;var NI=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")};R.bigintProcessor=NI;var II=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")};R.symbolProcessor=II;var RI=(e,t,n,i)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"};R.nullProcessor=RI;var $I=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")};R.undefinedProcessor=$I;var CI=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")};R.voidProcessor=CI;var LI=(e,t,n,i)=>{n.not={}};R.neverProcessor=LI;var MI=(e,t,n,i)=>{};R.anyProcessor=MI;var UI=(e,t,n,i)=>{};R.unknownProcessor=UI;var xI=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")};R.dateProcessor=xI;var PI=(e,t,n,i)=>{let r=e._zod.def,o=(0,kI.getEnumValues)(r.entries);o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),n.enum=o};R.enumProcessor=PI;var DI=(e,t,n,i)=>{let r=e._zod.def,o=[];for(let a of r.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){let a=o[0];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),o.every(a=>typeof a=="boolean")&&(n.type="boolean"),o.every(a=>a===null)&&(n.type="null"),n.enum=o};R.literalProcessor=DI;var jI=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")};R.nanProcessor=jI;var zI=(e,t,n,i)=>{let r=n,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=o.source};R.templateLiteralProcessor=zI;var FI=(e,t,n,i)=>{let r=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:l}=e._zod.bag;a!==void 0&&(o.minLength=a),s!==void 0&&(o.maxLength=s),l?l.length===1?(o.contentMediaType=l[0],Object.assign(r,o)):(Object.assign(r,o),r.anyOf=l.map(c=>({contentMediaType:c}))):Object.assign(r,o)};R.fileProcessor=FI;var ZI=(e,t,n,i)=>{n.type="boolean"};R.successProcessor=ZI;var qI=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")};R.customProcessor=qI;var VI=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")};R.functionProcessor=VI;var WI=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")};R.transformProcessor=WI;var BI=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")};R.mapProcessor=BI;var HI=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")};R.setProcessor=HI;var JI=(e,t,n,i)=>{let r=n,o=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(r.minItems=a),typeof s=="number"&&(r.maxItems=s),r.type="array",r.items=(0,De.process)(o.element,t,{...i,path:[...i.path,"items"]})};R.arrayProcessor=JI;var KI=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object",r.properties={};let a=o.shape;for(let c in a)r.properties[c]=(0,De.process)(a[c],t,{...i,path:[...i.path,"properties",c]});let s=new Set(Object.keys(a)),l=new Set([...s].filter(c=>{let u=o.shape[c]._zod;return t.io==="input"?u.optin===void 0:u.optout===void 0}));l.size>0&&(r.required=Array.from(l)),o.catchall?._zod.def.type==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=(0,De.process)(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)};R.objectProcessor=KI;var GI=(e,t,n,i)=>{let r=e._zod.def,o=r.inclusive===!1,a=r.options.map((s,l)=>(0,De.process)(s,t,{...i,path:[...i.path,o?"oneOf":"anyOf",l]}));o?n.oneOf=a:n.anyOf=a};R.unionProcessor=GI;var XI=(e,t,n,i)=>{let r=e._zod.def,o=(0,De.process)(r.left,t,{...i,path:[...i.path,"allOf",0]}),a=(0,De.process)(r.right,t,{...i,path:[...i.path,"allOf",1]}),s=c=>"allOf"in c&&Object.keys(c).length===1,l=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]];n.allOf=l};R.intersectionProcessor=XI;var YI=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",l=o.items.map((p,f)=>(0,De.process)(p,t,{...i,path:[...i.path,a,f]})),c=o.rest?(0,De.process)(o.rest,t,{...i,path:[...i.path,s,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=l,c&&(r.items=c)):t.target==="openapi-3.0"?(r.items={anyOf:l},c&&r.items.anyOf.push(c),r.minItems=l.length,c||(r.maxItems=l.length)):(r.items=l,c&&(r.additionalItems=c));let{minimum:u,maximum:d}=e._zod.bag;typeof u=="number"&&(r.minItems=u),typeof d=="number"&&(r.maxItems=d)};R.tupleProcessor=YI;var QI=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object";let a=o.keyType,l=a._zod.bag?.patterns;if(o.mode==="loose"&&l&&l.size>0){let u=(0,De.process)(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(let d of l)r.patternProperties[d.source]=u}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=(0,De.process)(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),r.additionalProperties=(0,De.process)(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let c=a._zod.values;if(c){let u=[...c].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(r.required=u)}};R.recordProcessor=QI;var eR=(e,t,n,i)=>{let r=e._zod.def,o=(0,De.process)(r.innerType,t,i),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=r.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]};R.nullableProcessor=eR;var tR=(e,t,n,i)=>{let r=e._zod.def;(0,De.process)(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType};R.nonoptionalProcessor=tR;var nR=(e,t,n,i)=>{let r=e._zod.def;(0,De.process)(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))};R.defaultProcessor=nR;var rR=(e,t,n,i)=>{let r=e._zod.def;(0,De.process)(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))};R.prefaultProcessor=rR;var iR=(e,t,n,i)=>{let r=e._zod.def;(0,De.process)(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType;let a;try{a=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a};R.catchProcessor=iR;var oR=(e,t,n,i)=>{let r=e._zod.def,o=r.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?o?r.out:r.in:r.out;(0,De.process)(a,t,i);let s=t.seen.get(e);s.ref=a};R.pipeProcessor=oR;var aR=(e,t,n,i)=>{let r=e._zod.def;(0,De.process)(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.readOnly=!0};R.readonlyProcessor=aR;var sR=(e,t,n,i)=>{let r=e._zod.def;(0,De.process)(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType};R.promiseProcessor=sR;var cR=(e,t,n,i)=>{let r=e._zod.def;(0,De.process)(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType};R.optionalProcessor=cR;var lR=(e,t,n,i)=>{let r=e._zod.innerType;(0,De.process)(r,t,i);let o=t.seen.get(e);o.ref=r};R.lazyProcessor=lR;R.allProcessors={string:R.stringProcessor,number:R.numberProcessor,boolean:R.booleanProcessor,bigint:R.bigintProcessor,symbol:R.symbolProcessor,null:R.nullProcessor,undefined:R.undefinedProcessor,void:R.voidProcessor,never:R.neverProcessor,any:R.anyProcessor,unknown:R.unknownProcessor,date:R.dateProcessor,enum:R.enumProcessor,literal:R.literalProcessor,nan:R.nanProcessor,template_literal:R.templateLiteralProcessor,file:R.fileProcessor,success:R.successProcessor,custom:R.customProcessor,function:R.functionProcessor,transform:R.transformProcessor,map:R.mapProcessor,set:R.setProcessor,array:R.arrayProcessor,object:R.objectProcessor,union:R.unionProcessor,intersection:R.intersectionProcessor,tuple:R.tupleProcessor,record:R.recordProcessor,nullable:R.nullableProcessor,nonoptional:R.nonoptionalProcessor,default:R.defaultProcessor,prefault:R.prefaultProcessor,catch:R.catchProcessor,pipe:R.pipeProcessor,readonly:R.readonlyProcessor,promise:R.promiseProcessor,optional:R.optionalProcessor,lazy:R.lazyProcessor};function uR(e,t){if("_idmap"in e){let i=e,r=(0,De.initializeContext)({...t,processors:R.allProcessors}),o={};for(let l of i._idmap.entries()){let[c,u]=l;(0,De.process)(u,r)}let a={},s={registry:i,uri:t?.uri,defs:o};r.external=s;for(let l of i._idmap.entries()){let[c,u]=l;(0,De.extractDefs)(r,u),a[c]=(0,De.finalize)(r,u)}if(Object.keys(o).length>0){let l=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[l]:o}}return{schemas:a}}let n=(0,De.initializeContext)({...t,processors:R.allProcessors});return(0,De.process)(e,n),(0,De.extractDefs)(n,e),(0,De.finalize)(n,e)}});var rf=w(wa=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});wa.JSONSchemaGenerator=void 0;var dR=pi(),Oa=_i(),Dc=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=(0,Oa.initializeContext)({processors:dR.allProcessors,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return(0,Oa.process)(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),(0,Oa.extractDefs)(this.ctx,t);let i=(0,Oa.finalize)(this.ctx,t),{"~standard":r,...o}=i;return o}};wa.JSONSchemaGenerator=Dc});var af=w(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0})});var Et=w(Le=>{"use strict";var sf=Le&&Le.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),_R=Le&&Le.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Hn=Le&&Le.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&sf(t,e,n)},Aa=Le&&Le.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&sf(t,e,n);return _R(t,e),t};Object.defineProperty(Le,"__esModule",{value:!0});Le.JSONSchema=Le.JSONSchemaGenerator=Le.toJSONSchema=Le.locales=Le.regexes=Le.util=void 0;Hn(Sr(),Le);Hn(Ec(),Le);Hn(Sc(),Le);Hn(Rc(),Le);Hn(fo(),Le);Hn(Tc(),Le);Le.util=Aa(le());Le.regexes=Aa(po());Le.locales=Aa(Mc());Hn(li(),Le);Hn(Ac(),Le);Hn(nf(),Le);Hn(_i(),Le);var pR=pi();Object.defineProperty(Le,"toJSONSchema",{enumerable:!0,get:function(){return pR.toJSONSchema}});var fR=rf();Object.defineProperty(Le,"JSONSchemaGenerator",{enumerable:!0,get:function(){return fR.JSONSchemaGenerator}});Le.JSONSchema=Aa(af())});var Ta=w(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.slugify=ue.toUpperCase=ue.toLowerCase=ue.trim=ue.normalize=ue.overwrite=ue.mime=ue.property=ue.endsWith=ue.startsWith=ue.includes=ue.uppercase=ue.lowercase=ue.regex=ue.length=ue.minLength=ue.maxLength=ue.size=ue.minSize=ue.maxSize=ue.multipleOf=ue.nonnegative=ue.nonpositive=ue.negative=ue.positive=ue.gte=ue.gt=ue.lte=ue.lt=void 0;var je=Et();Object.defineProperty(ue,"lt",{enumerable:!0,get:function(){return je._lt}});Object.defineProperty(ue,"lte",{enumerable:!0,get:function(){return je._lte}});Object.defineProperty(ue,"gt",{enumerable:!0,get:function(){return je._gt}});Object.defineProperty(ue,"gte",{enumerable:!0,get:function(){return je._gte}});Object.defineProperty(ue,"positive",{enumerable:!0,get:function(){return je._positive}});Object.defineProperty(ue,"negative",{enumerable:!0,get:function(){return je._negative}});Object.defineProperty(ue,"nonpositive",{enumerable:!0,get:function(){return je._nonpositive}});Object.defineProperty(ue,"nonnegative",{enumerable:!0,get:function(){return je._nonnegative}});Object.defineProperty(ue,"multipleOf",{enumerable:!0,get:function(){return je._multipleOf}});Object.defineProperty(ue,"maxSize",{enumerable:!0,get:function(){return je._maxSize}});Object.defineProperty(ue,"minSize",{enumerable:!0,get:function(){return je._minSize}});Object.defineProperty(ue,"size",{enumerable:!0,get:function(){return je._size}});Object.defineProperty(ue,"maxLength",{enumerable:!0,get:function(){return je._maxLength}});Object.defineProperty(ue,"minLength",{enumerable:!0,get:function(){return je._minLength}});Object.defineProperty(ue,"length",{enumerable:!0,get:function(){return je._length}});Object.defineProperty(ue,"regex",{enumerable:!0,get:function(){return je._regex}});Object.defineProperty(ue,"lowercase",{enumerable:!0,get:function(){return je._lowercase}});Object.defineProperty(ue,"uppercase",{enumerable:!0,get:function(){return je._uppercase}});Object.defineProperty(ue,"includes",{enumerable:!0,get:function(){return je._includes}});Object.defineProperty(ue,"startsWith",{enumerable:!0,get:function(){return je._startsWith}});Object.defineProperty(ue,"endsWith",{enumerable:!0,get:function(){return je._endsWith}});Object.defineProperty(ue,"property",{enumerable:!0,get:function(){return je._property}});Object.defineProperty(ue,"mime",{enumerable:!0,get:function(){return je._mime}});Object.defineProperty(ue,"overwrite",{enumerable:!0,get:function(){return je._overwrite}});Object.defineProperty(ue,"normalize",{enumerable:!0,get:function(){return je._normalize}});Object.defineProperty(ue,"trim",{enumerable:!0,get:function(){return je._trim}});Object.defineProperty(ue,"toLowerCase",{enumerable:!0,get:function(){return je._toLowerCase}});Object.defineProperty(ue,"toUpperCase",{enumerable:!0,get:function(){return je._toUpperCase}});Object.defineProperty(ue,"slugify",{enumerable:!0,get:function(){return je._slugify}})});var fi=w(Ve=>{"use strict";var mR=Ve&&Ve.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),gR=Ve&&Ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),cf=Ve&&Ve.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&mR(t,e,n);return gR(t,e),t};Object.defineProperty(Ve,"__esModule",{value:!0});Ve.ZodISODuration=Ve.ZodISOTime=Ve.ZodISODate=Ve.ZodISODateTime=void 0;Ve.datetime=yR;Ve.date=hR;Ve.time=vR;Ve.duration=SR;var Mt=cf(Et()),Na=cf(mi());Ve.ZodISODateTime=Mt.$constructor("ZodISODateTime",(e,t)=>{Mt.$ZodISODateTime.init(e,t),Na.ZodStringFormat.init(e,t)});function yR(e){return Mt._isoDateTime(Ve.ZodISODateTime,e)}Ve.ZodISODate=Mt.$constructor("ZodISODate",(e,t)=>{Mt.$ZodISODate.init(e,t),Na.ZodStringFormat.init(e,t)});function hR(e){return Mt._isoDate(Ve.ZodISODate,e)}Ve.ZodISOTime=Mt.$constructor("ZodISOTime",(e,t)=>{Mt.$ZodISOTime.init(e,t),Na.ZodStringFormat.init(e,t)});function vR(e){return Mt._isoTime(Ve.ZodISOTime,e)}Ve.ZodISODuration=Mt.$constructor("ZodISODuration",(e,t)=>{Mt.$ZodISODuration.init(e,t),Na.ZodStringFormat.init(e,t)});function SR(e){return Mt._isoDuration(Ve.ZodISODuration,e)}});var jc=w(Ut=>{"use strict";var bR=Ut&&Ut.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),ER=Ut&&Ut.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),uf=Ut&&Ut.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&bR(t,e,n);return ER(t,e),t};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.ZodRealError=Ut.ZodError=void 0;var Ia=uf(Et()),kR=Et(),lf=uf(le()),df=(e,t)=>{kR.$ZodError.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Ia.formatError(e,n)},flatten:{value:n=>Ia.flattenError(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,lf.jsonStringifyReplacer,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,lf.jsonStringifyReplacer,2)}},isEmpty:{get(){return e.issues.length===0}}})};Ut.ZodError=Ia.$constructor("ZodError",df);Ut.ZodRealError=Ia.$constructor("ZodError",df,{Parent:Error})});var zc=w(Me=>{"use strict";var OR=Me&&Me.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),wR=Me&&Me.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),AR=Me&&Me.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&OR(t,e,n);return wR(t,e),t};Object.defineProperty(Me,"__esModule",{value:!0});Me.safeDecodeAsync=Me.safeEncodeAsync=Me.safeDecode=Me.safeEncode=Me.decodeAsync=Me.encodeAsync=Me.decode=Me.encode=Me.safeParseAsync=Me.safeParse=Me.parseAsync=Me.parse=void 0;var xt=AR(Et()),Pt=jc();Me.parse=xt._parse(Pt.ZodRealError);Me.parseAsync=xt._parseAsync(Pt.ZodRealError);Me.safeParse=xt._safeParse(Pt.ZodRealError);Me.safeParseAsync=xt._safeParseAsync(Pt.ZodRealError);Me.encode=xt._encode(Pt.ZodRealError);Me.decode=xt._decode(Pt.ZodRealError);Me.encodeAsync=xt._encodeAsync(Pt.ZodRealError);Me.decodeAsync=xt._decodeAsync(Pt.ZodRealError);Me.safeEncode=xt._safeEncode(Pt.ZodRealError);Me.safeDecode=xt._safeDecode(Pt.ZodRealError);Me.safeEncodeAsync=xt._safeEncodeAsync(Pt.ZodRealError);Me.safeDecodeAsync=xt._safeDecodeAsync(Pt.ZodRealError)});var mi=w(_=>{"use strict";var TR=_&&_.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),NR=_&&_.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),gi=_&&_.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&TR(t,e,n);return NR(t,e),t};Object.defineProperty(_,"__esModule",{value:!0});_.ZodLiteral=_.ZodEnum=_.ZodSet=_.ZodMap=_.ZodRecord=_.ZodTuple=_.ZodIntersection=_.ZodDiscriminatedUnion=_.ZodXor=_.ZodUnion=_.ZodObject=_.ZodArray=_.ZodDate=_.ZodVoid=_.ZodNever=_.ZodUnknown=_.ZodAny=_.ZodNull=_.ZodUndefined=_.ZodSymbol=_.ZodBigIntFormat=_.ZodBigInt=_.ZodBoolean=_.ZodNumberFormat=_.ZodNumber=_.ZodCustomStringFormat=_.ZodJWT=_.ZodE164=_.ZodBase64URL=_.ZodBase64=_.ZodCIDRv6=_.ZodCIDRv4=_.ZodIPv6=_.ZodMAC=_.ZodIPv4=_.ZodKSUID=_.ZodXID=_.ZodULID=_.ZodCUID2=_.ZodCUID=_.ZodNanoID=_.ZodEmoji=_.ZodURL=_.ZodUUID=_.ZodGUID=_.ZodEmail=_.ZodStringFormat=_.ZodString=_._ZodString=_.ZodType=void 0;_.stringbool=_.meta=_.describe=_.ZodCustom=_.ZodFunction=_.ZodPromise=_.ZodLazy=_.ZodTemplateLiteral=_.ZodReadonly=_.ZodPreprocess=_.ZodCodec=_.ZodPipe=_.ZodNaN=_.ZodCatch=_.ZodSuccess=_.ZodNonOptional=_.ZodPrefault=_.ZodDefault=_.ZodNullable=_.ZodExactOptional=_.ZodOptional=_.ZodTransform=_.ZodFile=void 0;_.string=$a;_.email=IR;_.guid=RR;_.uuid=$R;_.uuidv4=CR;_.uuidv6=LR;_.uuidv7=MR;_.url=UR;_.httpUrl=xR;_.emoji=PR;_.nanoid=DR;_.cuid=jR;_.cuid2=zR;_.ulid=FR;_.xid=ZR;_.ksuid=qR;_.ipv4=VR;_.mac=WR;_.ipv6=BR;_.cidrv4=HR;_.cidrv6=JR;_.base64=KR;_.base64url=GR;_.e164=XR;_.jwt=YR;_.stringFormat=QR;_.hostname=e$;_.hex=t$;_.hash=n$;_.number=pf;_.int=Zc;_.float32=r$;_.float64=i$;_.int32=o$;_.uint32=a$;_.boolean=ff;_.bigint=s$;_.int64=c$;_.uint64=l$;_.symbol=u$;_.undefined=d$;_.null=mf;_.any=_$;_.unknown=Zr;_.never=Vc;_.void=p$;_.date=f$;_.array=Ma;_.keyof=m$;_.object=g$;_.strictObject=y$;_.looseObject=h$;_.union=Wc;_.xor=v$;_.discriminatedUnion=S$;_.intersection=gf;_.tuple=yf;_.record=hf;_.partialRecord=b$;_.looseRecord=E$;_.map=k$;_.set=O$;_.enum=Bc;_.nativeEnum=w$;_.literal=A$;_.file=T$;_.transform=Hc;_.optional=Ca;_.exactOptional=vf;_.nullable=La;_.nullish=N$;_._default=Sf;_.prefault=bf;_.nonoptional=Ef;_.success=I$;_.catch=kf;_.nan=R$;_.pipe=qc;_.codec=$$;_.invertCodec=C$;_.readonly=Of;_.templateLiteral=L$;_.lazy=wf;_.promise=M$;_._function=Ua;_.function=Ua;_._function=Ua;_.function=Ua;_.check=U$;_.custom=x$;_.refine=Af;_.superRefine=Tf;_.instanceof=P$;_.json=j$;_.preprocess=z$;var g=gi(Et()),Ie=Et(),ke=gi(pi()),Fc=_i(),ve=gi(Ta()),Ra=gi(fi()),Dt=gi(zc()),_f=new WeakMap;function yi(e,t,n){let i=Object.getPrototypeOf(e),r=_f.get(i);if(r||(r=new Set,_f.set(i,r)),!r.has(t)){r.add(t);for(let o in n){let a=n[o];Object.defineProperty(i,o,{configurable:!0,enumerable:!1,get(){let s=a.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}_.ZodType=g.$constructor("ZodType",(e,t)=>(g.$ZodType.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:(0,Fc.createStandardJSONSchemaMethod)(e,"input"),output:(0,Fc.createStandardJSONSchemaMethod)(e,"output")}}),e.toJSONSchema=(0,Fc.createToJSONSchemaMethod)(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,i)=>Dt.parse(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>Dt.safeParse(e,n,i),e.parseAsync=async(n,i)=>Dt.parseAsync(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>Dt.safeParseAsync(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>Dt.encode(e,n,i),e.decode=(n,i)=>Dt.decode(e,n,i),e.encodeAsync=async(n,i)=>Dt.encodeAsync(e,n,i),e.decodeAsync=async(n,i)=>Dt.decodeAsync(e,n,i),e.safeEncode=(n,i)=>Dt.safeEncode(e,n,i),e.safeDecode=(n,i)=>Dt.safeDecode(e,n,i),e.safeEncodeAsync=async(n,i)=>Dt.safeEncodeAsync(e,n,i),e.safeDecodeAsync=async(n,i)=>Dt.safeDecodeAsync(e,n,i),yi(e,"ZodType",{check(...n){let i=this.def;return this.clone(Ie.util.mergeDefs(i,{checks:[...i.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,i){return g.clone(this,n,i)},brand(){return this},register(n,i){return n.add(this,i),this},refine(n,i){return this.check(Af(n,i))},superRefine(n,i){return this.check(Tf(n,i))},overwrite(n){return this.check(ve.overwrite(n))},optional(){return Ca(this)},exactOptional(){return vf(this)},nullable(){return La(this)},nullish(){return Ca(La(this))},nonoptional(n){return Ef(this,n)},array(){return Ma(this)},or(n){return Wc([this,n])},and(n){return gf(this,n)},transform(n){return qc(this,Hc(n))},default(n){return Sf(this,n)},prefault(n){return bf(this,n)},catch(n){return kf(this,n)},pipe(n){return qc(this,n)},readonly(){return Of(this)},describe(n){let i=this.clone();return g.globalRegistry.add(i,{description:n}),i},meta(...n){if(n.length===0)return g.globalRegistry.get(this);let i=this.clone();return g.globalRegistry.add(i,n[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return g.globalRegistry.get(e)?.description},configurable:!0}),e));_._ZodString=g.$constructor("_ZodString",(e,t)=>{g.$ZodString.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(i,r,o)=>ke.stringProcessor(e,i,r,o);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,yi(e,"_ZodString",{regex(...i){return this.check(ve.regex(...i))},includes(...i){return this.check(ve.includes(...i))},startsWith(...i){return this.check(ve.startsWith(...i))},endsWith(...i){return this.check(ve.endsWith(...i))},min(...i){return this.check(ve.minLength(...i))},max(...i){return this.check(ve.maxLength(...i))},length(...i){return this.check(ve.length(...i))},nonempty(...i){return this.check(ve.minLength(1,...i))},lowercase(i){return this.check(ve.lowercase(i))},uppercase(i){return this.check(ve.uppercase(i))},trim(){return this.check(ve.trim())},normalize(...i){return this.check(ve.normalize(...i))},toLowerCase(){return this.check(ve.toLowerCase())},toUpperCase(){return this.check(ve.toUpperCase())},slugify(){return this.check(ve.slugify())}})});_.ZodString=g.$constructor("ZodString",(e,t)=>{g.$ZodString.init(e,t),_._ZodString.init(e,t),e.email=n=>e.check(g._email(_.ZodEmail,n)),e.url=n=>e.check(g._url(_.ZodURL,n)),e.jwt=n=>e.check(g._jwt(_.ZodJWT,n)),e.emoji=n=>e.check(g._emoji(_.ZodEmoji,n)),e.guid=n=>e.check(g._guid(_.ZodGUID,n)),e.uuid=n=>e.check(g._uuid(_.ZodUUID,n)),e.uuidv4=n=>e.check(g._uuidv4(_.ZodUUID,n)),e.uuidv6=n=>e.check(g._uuidv6(_.ZodUUID,n)),e.uuidv7=n=>e.check(g._uuidv7(_.ZodUUID,n)),e.nanoid=n=>e.check(g._nanoid(_.ZodNanoID,n)),e.guid=n=>e.check(g._guid(_.ZodGUID,n)),e.cuid=n=>e.check(g._cuid(_.ZodCUID,n)),e.cuid2=n=>e.check(g._cuid2(_.ZodCUID2,n)),e.ulid=n=>e.check(g._ulid(_.ZodULID,n)),e.base64=n=>e.check(g._base64(_.ZodBase64,n)),e.base64url=n=>e.check(g._base64url(_.ZodBase64URL,n)),e.xid=n=>e.check(g._xid(_.ZodXID,n)),e.ksuid=n=>e.check(g._ksuid(_.ZodKSUID,n)),e.ipv4=n=>e.check(g._ipv4(_.ZodIPv4,n)),e.ipv6=n=>e.check(g._ipv6(_.ZodIPv6,n)),e.cidrv4=n=>e.check(g._cidrv4(_.ZodCIDRv4,n)),e.cidrv6=n=>e.check(g._cidrv6(_.ZodCIDRv6,n)),e.e164=n=>e.check(g._e164(_.ZodE164,n)),e.datetime=n=>e.check(Ra.datetime(n)),e.date=n=>e.check(Ra.date(n)),e.time=n=>e.check(Ra.time(n)),e.duration=n=>e.check(Ra.duration(n))});function $a(e){return g._string(_.ZodString,e)}_.ZodStringFormat=g.$constructor("ZodStringFormat",(e,t)=>{g.$ZodStringFormat.init(e,t),_._ZodString.init(e,t)});_.ZodEmail=g.$constructor("ZodEmail",(e,t)=>{g.$ZodEmail.init(e,t),_.ZodStringFormat.init(e,t)});function IR(e){return g._email(_.ZodEmail,e)}_.ZodGUID=g.$constructor("ZodGUID",(e,t)=>{g.$ZodGUID.init(e,t),_.ZodStringFormat.init(e,t)});function RR(e){return g._guid(_.ZodGUID,e)}_.ZodUUID=g.$constructor("ZodUUID",(e,t)=>{g.$ZodUUID.init(e,t),_.ZodStringFormat.init(e,t)});function $R(e){return g._uuid(_.ZodUUID,e)}function CR(e){return g._uuidv4(_.ZodUUID,e)}function LR(e){return g._uuidv6(_.ZodUUID,e)}function MR(e){return g._uuidv7(_.ZodUUID,e)}_.ZodURL=g.$constructor("ZodURL",(e,t)=>{g.$ZodURL.init(e,t),_.ZodStringFormat.init(e,t)});function UR(e){return g._url(_.ZodURL,e)}function xR(e){return g._url(_.ZodURL,{protocol:g.regexes.httpProtocol,hostname:g.regexes.domain,...Ie.util.normalizeParams(e)})}_.ZodEmoji=g.$constructor("ZodEmoji",(e,t)=>{g.$ZodEmoji.init(e,t),_.ZodStringFormat.init(e,t)});function PR(e){return g._emoji(_.ZodEmoji,e)}_.ZodNanoID=g.$constructor("ZodNanoID",(e,t)=>{g.$ZodNanoID.init(e,t),_.ZodStringFormat.init(e,t)});function DR(e){return g._nanoid(_.ZodNanoID,e)}_.ZodCUID=g.$constructor("ZodCUID",(e,t)=>{g.$ZodCUID.init(e,t),_.ZodStringFormat.init(e,t)});function jR(e){return g._cuid(_.ZodCUID,e)}_.ZodCUID2=g.$constructor("ZodCUID2",(e,t)=>{g.$ZodCUID2.init(e,t),_.ZodStringFormat.init(e,t)});function zR(e){return g._cuid2(_.ZodCUID2,e)}_.ZodULID=g.$constructor("ZodULID",(e,t)=>{g.$ZodULID.init(e,t),_.ZodStringFormat.init(e,t)});function FR(e){return g._ulid(_.ZodULID,e)}_.ZodXID=g.$constructor("ZodXID",(e,t)=>{g.$ZodXID.init(e,t),_.ZodStringFormat.init(e,t)});function ZR(e){return g._xid(_.ZodXID,e)}_.ZodKSUID=g.$constructor("ZodKSUID",(e,t)=>{g.$ZodKSUID.init(e,t),_.ZodStringFormat.init(e,t)});function qR(e){return g._ksuid(_.ZodKSUID,e)}_.ZodIPv4=g.$constructor("ZodIPv4",(e,t)=>{g.$ZodIPv4.init(e,t),_.ZodStringFormat.init(e,t)});function VR(e){return g._ipv4(_.ZodIPv4,e)}_.ZodMAC=g.$constructor("ZodMAC",(e,t)=>{g.$ZodMAC.init(e,t),_.ZodStringFormat.init(e,t)});function WR(e){return g._mac(_.ZodMAC,e)}_.ZodIPv6=g.$constructor("ZodIPv6",(e,t)=>{g.$ZodIPv6.init(e,t),_.ZodStringFormat.init(e,t)});function BR(e){return g._ipv6(_.ZodIPv6,e)}_.ZodCIDRv4=g.$constructor("ZodCIDRv4",(e,t)=>{g.$ZodCIDRv4.init(e,t),_.ZodStringFormat.init(e,t)});function HR(e){return g._cidrv4(_.ZodCIDRv4,e)}_.ZodCIDRv6=g.$constructor("ZodCIDRv6",(e,t)=>{g.$ZodCIDRv6.init(e,t),_.ZodStringFormat.init(e,t)});function JR(e){return g._cidrv6(_.ZodCIDRv6,e)}_.ZodBase64=g.$constructor("ZodBase64",(e,t)=>{g.$ZodBase64.init(e,t),_.ZodStringFormat.init(e,t)});function KR(e){return g._base64(_.ZodBase64,e)}_.ZodBase64URL=g.$constructor("ZodBase64URL",(e,t)=>{g.$ZodBase64URL.init(e,t),_.ZodStringFormat.init(e,t)});function GR(e){return g._base64url(_.ZodBase64URL,e)}_.ZodE164=g.$constructor("ZodE164",(e,t)=>{g.$ZodE164.init(e,t),_.ZodStringFormat.init(e,t)});function XR(e){return g._e164(_.ZodE164,e)}_.ZodJWT=g.$constructor("ZodJWT",(e,t)=>{g.$ZodJWT.init(e,t),_.ZodStringFormat.init(e,t)});function YR(e){return g._jwt(_.ZodJWT,e)}_.ZodCustomStringFormat=g.$constructor("ZodCustomStringFormat",(e,t)=>{g.$ZodCustomStringFormat.init(e,t),_.ZodStringFormat.init(e,t)});function QR(e,t,n={}){return g._stringFormat(_.ZodCustomStringFormat,e,t,n)}function e$(e){return g._stringFormat(_.ZodCustomStringFormat,"hostname",g.regexes.hostname,e)}function t$(e){return g._stringFormat(_.ZodCustomStringFormat,"hex",g.regexes.hex,e)}function n$(e,t){let n=t?.enc??"hex",i=`${e}_${n}`,r=g.regexes[i];if(!r)throw new Error(`Unrecognized hash format: ${i}`);return g._stringFormat(_.ZodCustomStringFormat,i,r,t)}_.ZodNumber=g.$constructor("ZodNumber",(e,t)=>{g.$ZodNumber.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(i,r,o)=>ke.numberProcessor(e,i,r,o),yi(e,"ZodNumber",{gt(i,r){return this.check(ve.gt(i,r))},gte(i,r){return this.check(ve.gte(i,r))},min(i,r){return this.check(ve.gte(i,r))},lt(i,r){return this.check(ve.lt(i,r))},lte(i,r){return this.check(ve.lte(i,r))},max(i,r){return this.check(ve.lte(i,r))},int(i){return this.check(Zc(i))},safe(i){return this.check(Zc(i))},positive(i){return this.check(ve.gt(0,i))},nonnegative(i){return this.check(ve.gte(0,i))},negative(i){return this.check(ve.lt(0,i))},nonpositive(i){return this.check(ve.lte(0,i))},multipleOf(i,r){return this.check(ve.multipleOf(i,r))},step(i,r){return this.check(ve.multipleOf(i,r))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function pf(e){return g._number(_.ZodNumber,e)}_.ZodNumberFormat=g.$constructor("ZodNumberFormat",(e,t)=>{g.$ZodNumberFormat.init(e,t),_.ZodNumber.init(e,t)});function Zc(e){return g._int(_.ZodNumberFormat,e)}function r$(e){return g._float32(_.ZodNumberFormat,e)}function i$(e){return g._float64(_.ZodNumberFormat,e)}function o$(e){return g._int32(_.ZodNumberFormat,e)}function a$(e){return g._uint32(_.ZodNumberFormat,e)}_.ZodBoolean=g.$constructor("ZodBoolean",(e,t)=>{g.$ZodBoolean.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.booleanProcessor(e,n,i,r)});function ff(e){return g._boolean(_.ZodBoolean,e)}_.ZodBigInt=g.$constructor("ZodBigInt",(e,t)=>{g.$ZodBigInt.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(i,r,o)=>ke.bigintProcessor(e,i,r,o),e.gte=(i,r)=>e.check(ve.gte(i,r)),e.min=(i,r)=>e.check(ve.gte(i,r)),e.gt=(i,r)=>e.check(ve.gt(i,r)),e.gte=(i,r)=>e.check(ve.gte(i,r)),e.min=(i,r)=>e.check(ve.gte(i,r)),e.lt=(i,r)=>e.check(ve.lt(i,r)),e.lte=(i,r)=>e.check(ve.lte(i,r)),e.max=(i,r)=>e.check(ve.lte(i,r)),e.positive=i=>e.check(ve.gt(BigInt(0),i)),e.negative=i=>e.check(ve.lt(BigInt(0),i)),e.nonpositive=i=>e.check(ve.lte(BigInt(0),i)),e.nonnegative=i=>e.check(ve.gte(BigInt(0),i)),e.multipleOf=(i,r)=>e.check(ve.multipleOf(i,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function s$(e){return g._bigint(_.ZodBigInt,e)}_.ZodBigIntFormat=g.$constructor("ZodBigIntFormat",(e,t)=>{g.$ZodBigIntFormat.init(e,t),_.ZodBigInt.init(e,t)});function c$(e){return g._int64(_.ZodBigIntFormat,e)}function l$(e){return g._uint64(_.ZodBigIntFormat,e)}_.ZodSymbol=g.$constructor("ZodSymbol",(e,t)=>{g.$ZodSymbol.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.symbolProcessor(e,n,i,r)});function u$(e){return g._symbol(_.ZodSymbol,e)}_.ZodUndefined=g.$constructor("ZodUndefined",(e,t)=>{g.$ZodUndefined.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.undefinedProcessor(e,n,i,r)});function d$(e){return g._undefined(_.ZodUndefined,e)}_.ZodNull=g.$constructor("ZodNull",(e,t)=>{g.$ZodNull.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.nullProcessor(e,n,i,r)});function mf(e){return g._null(_.ZodNull,e)}_.ZodAny=g.$constructor("ZodAny",(e,t)=>{g.$ZodAny.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.anyProcessor(e,n,i,r)});function _$(){return g._any(_.ZodAny)}_.ZodUnknown=g.$constructor("ZodUnknown",(e,t)=>{g.$ZodUnknown.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.unknownProcessor(e,n,i,r)});function Zr(){return g._unknown(_.ZodUnknown)}_.ZodNever=g.$constructor("ZodNever",(e,t)=>{g.$ZodNever.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.neverProcessor(e,n,i,r)});function Vc(e){return g._never(_.ZodNever,e)}_.ZodVoid=g.$constructor("ZodVoid",(e,t)=>{g.$ZodVoid.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.voidProcessor(e,n,i,r)});function p$(e){return g._void(_.ZodVoid,e)}_.ZodDate=g.$constructor("ZodDate",(e,t)=>{g.$ZodDate.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(i,r,o)=>ke.dateProcessor(e,i,r,o),e.min=(i,r)=>e.check(ve.gte(i,r)),e.max=(i,r)=>e.check(ve.lte(i,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function f$(e){return g._date(_.ZodDate,e)}_.ZodArray=g.$constructor("ZodArray",(e,t)=>{g.$ZodArray.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.arrayProcessor(e,n,i,r),e.element=t.element,yi(e,"ZodArray",{min(n,i){return this.check(ve.minLength(n,i))},nonempty(n){return this.check(ve.minLength(1,n))},max(n,i){return this.check(ve.maxLength(n,i))},length(n,i){return this.check(ve.length(n,i))},unwrap(){return this.element}})});function Ma(e,t){return g._array(_.ZodArray,e,t)}function m$(e){let t=e._zod.def.shape;return Bc(Object.keys(t))}_.ZodObject=g.$constructor("ZodObject",(e,t)=>{g.$ZodObjectJIT.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.objectProcessor(e,n,i,r),Ie.util.defineLazy(e,"shape",()=>t.shape),yi(e,"ZodObject",{keyof(){return Bc(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:Zr()})},loose(){return this.clone({...this._zod.def,catchall:Zr()})},strict(){return this.clone({...this._zod.def,catchall:Vc()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return Ie.util.extend(this,n)},safeExtend(n){return Ie.util.safeExtend(this,n)},merge(n){return Ie.util.merge(this,n)},pick(n){return Ie.util.pick(this,n)},omit(n){return Ie.util.omit(this,n)},partial(...n){return Ie.util.partial(_.ZodOptional,this,n[0])},required(...n){return Ie.util.required(_.ZodNonOptional,this,n[0])}})});function g$(e,t){let n={type:"object",shape:e??{},...Ie.util.normalizeParams(t)};return new _.ZodObject(n)}function y$(e,t){return new _.ZodObject({type:"object",shape:e,catchall:Vc(),...Ie.util.normalizeParams(t)})}function h$(e,t){return new _.ZodObject({type:"object",shape:e,catchall:Zr(),...Ie.util.normalizeParams(t)})}_.ZodUnion=g.$constructor("ZodUnion",(e,t)=>{g.$ZodUnion.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.unionProcessor(e,n,i,r),e.options=t.options});function Wc(e,t){return new _.ZodUnion({type:"union",options:e,...Ie.util.normalizeParams(t)})}_.ZodXor=g.$constructor("ZodXor",(e,t)=>{_.ZodUnion.init(e,t),g.$ZodXor.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.unionProcessor(e,n,i,r),e.options=t.options});function v$(e,t){return new _.ZodXor({type:"union",options:e,inclusive:!1,...Ie.util.normalizeParams(t)})}_.ZodDiscriminatedUnion=g.$constructor("ZodDiscriminatedUnion",(e,t)=>{_.ZodUnion.init(e,t),g.$ZodDiscriminatedUnion.init(e,t)});function S$(e,t,n){return new _.ZodDiscriminatedUnion({type:"union",options:t,discriminator:e,...Ie.util.normalizeParams(n)})}_.ZodIntersection=g.$constructor("ZodIntersection",(e,t)=>{g.$ZodIntersection.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.intersectionProcessor(e,n,i,r)});function gf(e,t){return new _.ZodIntersection({type:"intersection",left:e,right:t})}_.ZodTuple=g.$constructor("ZodTuple",(e,t)=>{g.$ZodTuple.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.tupleProcessor(e,n,i,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});function yf(e,t,n){let i=t instanceof g.$ZodType,r=i?n:t,o=i?t:null;return new _.ZodTuple({type:"tuple",items:e,rest:o,...Ie.util.normalizeParams(r)})}_.ZodRecord=g.$constructor("ZodRecord",(e,t)=>{g.$ZodRecord.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.recordProcessor(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType});function hf(e,t,n){return!t||!t._zod?new _.ZodRecord({type:"record",keyType:$a(),valueType:e,...Ie.util.normalizeParams(t)}):new _.ZodRecord({type:"record",keyType:e,valueType:t,...Ie.util.normalizeParams(n)})}function b$(e,t,n){let i=g.clone(e);return i._zod.values=void 0,new _.ZodRecord({type:"record",keyType:i,valueType:t,...Ie.util.normalizeParams(n)})}function E$(e,t,n){return new _.ZodRecord({type:"record",keyType:e,valueType:t,mode:"loose",...Ie.util.normalizeParams(n)})}_.ZodMap=g.$constructor("ZodMap",(e,t)=>{g.$ZodMap.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.mapProcessor(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(g._minSize(...n)),e.nonempty=n=>e.check(g._minSize(1,n)),e.max=(...n)=>e.check(g._maxSize(...n)),e.size=(...n)=>e.check(g._size(...n))});function k$(e,t,n){return new _.ZodMap({type:"map",keyType:e,valueType:t,...Ie.util.normalizeParams(n)})}_.ZodSet=g.$constructor("ZodSet",(e,t)=>{g.$ZodSet.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.setProcessor(e,n,i,r),e.min=(...n)=>e.check(g._minSize(...n)),e.nonempty=n=>e.check(g._minSize(1,n)),e.max=(...n)=>e.check(g._maxSize(...n)),e.size=(...n)=>e.check(g._size(...n))});function O$(e,t){return new _.ZodSet({type:"set",valueType:e,...Ie.util.normalizeParams(t)})}_.ZodEnum=g.$constructor("ZodEnum",(e,t)=>{g.$ZodEnum.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(i,r,o)=>ke.enumProcessor(e,i,r,o),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(i,r)=>{let o={};for(let a of i)if(n.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new _.ZodEnum({...t,checks:[],...Ie.util.normalizeParams(r),entries:o})},e.exclude=(i,r)=>{let o={...t.entries};for(let a of i)if(n.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new _.ZodEnum({...t,checks:[],...Ie.util.normalizeParams(r),entries:o})}});function Bc(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new _.ZodEnum({type:"enum",entries:n,...Ie.util.normalizeParams(t)})}function w$(e,t){return new _.ZodEnum({type:"enum",entries:e,...Ie.util.normalizeParams(t)})}_.ZodLiteral=g.$constructor("ZodLiteral",(e,t)=>{g.$ZodLiteral.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.literalProcessor(e,n,i,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function A$(e,t){return new _.ZodLiteral({type:"literal",values:Array.isArray(e)?e:[e],...Ie.util.normalizeParams(t)})}_.ZodFile=g.$constructor("ZodFile",(e,t)=>{g.$ZodFile.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.fileProcessor(e,n,i,r),e.min=(n,i)=>e.check(g._minSize(n,i)),e.max=(n,i)=>e.check(g._maxSize(n,i)),e.mime=(n,i)=>e.check(g._mime(Array.isArray(n)?n:[n],i))});function T$(e){return g._file(_.ZodFile,e)}_.ZodTransform=g.$constructor("ZodTransform",(e,t)=>{g.$ZodTransform.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.transformProcessor(e,n,i,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new g.$ZodEncodeError(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(Ie.util.issue(o,n.value,t));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(Ie.util.issue(a))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(o=>(n.value=o,n.fallback=!0,n)):(n.value=r,n.fallback=!0,n)}});function Hc(e){return new _.ZodTransform({type:"transform",transform:e})}_.ZodOptional=g.$constructor("ZodOptional",(e,t)=>{g.$ZodOptional.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.optionalProcessor(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Ca(e){return new _.ZodOptional({type:"optional",innerType:e})}_.ZodExactOptional=g.$constructor("ZodExactOptional",(e,t)=>{g.$ZodExactOptional.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.optionalProcessor(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function vf(e){return new _.ZodExactOptional({type:"optional",innerType:e})}_.ZodNullable=g.$constructor("ZodNullable",(e,t)=>{g.$ZodNullable.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.nullableProcessor(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function La(e){return new _.ZodNullable({type:"nullable",innerType:e})}function N$(e){return Ca(La(e))}_.ZodDefault=g.$constructor("ZodDefault",(e,t)=>{g.$ZodDefault.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.defaultProcessor(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Sf(e,t){return new _.ZodDefault({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ie.util.shallowClone(t)}})}_.ZodPrefault=g.$constructor("ZodPrefault",(e,t)=>{g.$ZodPrefault.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.prefaultProcessor(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function bf(e,t){return new _.ZodPrefault({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ie.util.shallowClone(t)}})}_.ZodNonOptional=g.$constructor("ZodNonOptional",(e,t)=>{g.$ZodNonOptional.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.nonoptionalProcessor(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Ef(e,t){return new _.ZodNonOptional({type:"nonoptional",innerType:e,...Ie.util.normalizeParams(t)})}_.ZodSuccess=g.$constructor("ZodSuccess",(e,t)=>{g.$ZodSuccess.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.successProcessor(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function I$(e){return new _.ZodSuccess({type:"success",innerType:e})}_.ZodCatch=g.$constructor("ZodCatch",(e,t)=>{g.$ZodCatch.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.catchProcessor(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function kf(e,t){return new _.ZodCatch({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}_.ZodNaN=g.$constructor("ZodNaN",(e,t)=>{g.$ZodNaN.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.nanProcessor(e,n,i,r)});function R$(e){return g._nan(_.ZodNaN,e)}_.ZodPipe=g.$constructor("ZodPipe",(e,t)=>{g.$ZodPipe.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.pipeProcessor(e,n,i,r),e.in=t.in,e.out=t.out});function qc(e,t){return new _.ZodPipe({type:"pipe",in:e,out:t})}_.ZodCodec=g.$constructor("ZodCodec",(e,t)=>{_.ZodPipe.init(e,t),g.$ZodCodec.init(e,t)});function $$(e,t,n){return new _.ZodCodec({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function C$(e){let t=e._zod.def;return new _.ZodCodec({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}_.ZodPreprocess=g.$constructor("ZodPreprocess",(e,t)=>{_.ZodPipe.init(e,t),g.$ZodPreprocess.init(e,t)});_.ZodReadonly=g.$constructor("ZodReadonly",(e,t)=>{g.$ZodReadonly.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.readonlyProcessor(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Of(e){return new _.ZodReadonly({type:"readonly",innerType:e})}_.ZodTemplateLiteral=g.$constructor("ZodTemplateLiteral",(e,t)=>{g.$ZodTemplateLiteral.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.templateLiteralProcessor(e,n,i,r)});function L$(e,t){return new _.ZodTemplateLiteral({type:"template_literal",parts:e,...Ie.util.normalizeParams(t)})}_.ZodLazy=g.$constructor("ZodLazy",(e,t)=>{g.$ZodLazy.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.lazyProcessor(e,n,i,r),e.unwrap=()=>e._zod.def.getter()});function wf(e){return new _.ZodLazy({type:"lazy",getter:e})}_.ZodPromise=g.$constructor("ZodPromise",(e,t)=>{g.$ZodPromise.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.promiseProcessor(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function M$(e){return new _.ZodPromise({type:"promise",innerType:e})}_.ZodFunction=g.$constructor("ZodFunction",(e,t)=>{g.$ZodFunction.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.functionProcessor(e,n,i,r)});function Ua(e){return new _.ZodFunction({type:"function",input:Array.isArray(e?.input)?yf(e?.input):e?.input??Ma(Zr()),output:e?.output??Zr()})}_.ZodCustom=g.$constructor("ZodCustom",(e,t)=>{g.$ZodCustom.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.customProcessor(e,n,i,r)});function U$(e){let t=new g.$ZodCheck({check:"custom"});return t._zod.check=e,t}function x$(e,t){return g._custom(_.ZodCustom,e??(()=>!0),t)}function Af(e,t={}){return g._refine(_.ZodCustom,e,t)}function Tf(e,t){return g._superRefine(e,t)}_.describe=g.describe;_.meta=g.meta;function P$(e,t={}){let n=new _.ZodCustom({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...Ie.util.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:n,path:[...n._zod.def.path??[]]})},n}var D$=(...e)=>g._stringbool({Codec:_.ZodCodec,Boolean:_.ZodBoolean,String:_.ZodString},...e);_.stringbool=D$;function j$(e){let t=wf(()=>Wc([$a(e),pf(),ff(),mf(),Ma(t),hf($a(),t)]));return t}function z$(e,t){return new _.ZodPreprocess({type:"pipe",in:Hc(e),out:t})}});var $f=w(dt=>{"use strict";var F$=dt&&dt.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),Z$=dt&&dt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),q$=dt&&dt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&F$(t,e,n);return Z$(t,e),t};Object.defineProperty(dt,"__esModule",{value:!0});dt.ZodFirstPartyTypeKind=dt.config=dt.$brand=dt.ZodIssueCode=void 0;dt.setErrorMap=V$;dt.getErrorMap=W$;var If=q$(Et());dt.ZodIssueCode={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};var Rf=Et();Object.defineProperty(dt,"$brand",{enumerable:!0,get:function(){return Rf.$brand}});Object.defineProperty(dt,"config",{enumerable:!0,get:function(){return Rf.config}});function V$(e){If.config({customError:e})}function W$(){return If.config().customError}var Nf;Nf||(dt.ZodFirstPartyTypeKind=Nf={})});var Lf=w(Qn=>{"use strict";var B$=Qn&&Qn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),H$=Qn&&Qn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Jc=Qn&&Qn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&B$(t,e,n);return H$(t,e),t};Object.defineProperty(Qn,"__esModule",{value:!0});Qn.fromJSONSchema=tC;var J$=li(),K$=Jc(Ta()),G$=Jc(fi()),X$=Jc(mi()),ee={...X$,...K$,iso:G$},Y$=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function Q$(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function eC(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===i){let r=n[1];if(!r||!t.defs[r])throw new Error(`Reference not found: ${e}`);return t.defs[r]}throw new Error(`Reference not found: ${e}`)}function Cf(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return ee.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return ee.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let o=eC(r,t),a=gt(o,t);return t.refs.set(r,a),t.processing.delete(r),a}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return ee.null();if(r.length===0)return ee.never();if(r.length===1)return ee.literal(r[0]);if(r.every(a=>typeof a=="string"))return ee.enum(r);let o=r.map(a=>ee.literal(a));return o.length<2?o[0]:ee.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return ee.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(o=>{let a={...e,type:o};return Cf(a,t)});return r.length===0?ee.never():r.length===1?r[0]:ee.union(r)}if(!n)return ee.any();let i;switch(n){case"string":{let r=ee.string();if(e.format){let o=e.format;o==="email"?r=r.check(ee.email()):o==="uri"||o==="uri-reference"?r=r.check(ee.url()):o==="uuid"||o==="guid"?r=r.check(ee.uuid()):o==="date-time"?r=r.check(ee.iso.datetime()):o==="date"?r=r.check(ee.iso.date()):o==="time"?r=r.check(ee.iso.time()):o==="duration"?r=r.check(ee.iso.duration()):o==="ipv4"?r=r.check(ee.ipv4()):o==="ipv6"?r=r.check(ee.ipv6()):o==="mac"?r=r.check(ee.mac()):o==="cidr"?r=r.check(ee.cidrv4()):o==="cidr-v6"?r=r.check(ee.cidrv6()):o==="base64"?r=r.check(ee.base64()):o==="base64url"?r=r.check(ee.base64url()):o==="e164"?r=r.check(ee.e164()):o==="jwt"?r=r.check(ee.jwt()):o==="emoji"?r=r.check(ee.emoji()):o==="nanoid"?r=r.check(ee.nanoid()):o==="cuid"?r=r.check(ee.cuid()):o==="cuid2"?r=r.check(ee.cuid2()):o==="ulid"?r=r.check(ee.ulid()):o==="xid"?r=r.check(ee.xid()):o==="ksuid"&&(r=r.check(ee.ksuid()))}typeof e.minLength=="number"&&(r=r.min(e.minLength)),typeof e.maxLength=="number"&&(r=r.max(e.maxLength)),e.pattern&&(r=r.regex(new RegExp(e.pattern))),i=r;break}case"number":case"integer":{let r=n==="integer"?ee.number().int():ee.number();typeof e.minimum=="number"&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&(r=r.max(e.maximum)),typeof e.exclusiveMinimum=="number"?r=r.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),i=r;break}case"boolean":{i=ee.boolean();break}case"null":{i=ee.null();break}case"object":{let r={},o=e.properties||{},a=new Set(e.required||[]);for(let[l,c]of Object.entries(o)){let u=gt(c,t);r[l]=a.has(l)?u:u.optional()}if(e.propertyNames){let l=gt(e.propertyNames,t),c=e.additionalProperties&&typeof e.additionalProperties=="object"?gt(e.additionalProperties,t):ee.any();if(Object.keys(r).length===0){i=ee.record(l,c);break}let u=ee.object(r).passthrough(),d=ee.looseRecord(l,c);i=ee.intersection(u,d);break}if(e.patternProperties){let l=e.patternProperties,c=Object.keys(l),u=[];for(let p of c){let f=gt(l[p],t),S=ee.string().regex(new RegExp(p));u.push(ee.looseRecord(S,f))}let d=[];if(Object.keys(r).length>0&&d.push(ee.object(r).passthrough()),d.push(...u),d.length===0)i=ee.object({}).passthrough();else if(d.length===1)i=d[0];else{let p=ee.intersection(d[0],d[1]);for(let f=2;f<d.length;f++)p=ee.intersection(p,d[f]);i=p}break}let s=ee.object(r);e.additionalProperties===!1?i=s.strict():typeof e.additionalProperties=="object"?i=s.catchall(gt(e.additionalProperties,t)):i=s.passthrough();break}case"array":{let r=e.prefixItems,o=e.items;if(r&&Array.isArray(r)){let a=r.map(l=>gt(l,t)),s=o&&typeof o=="object"&&!Array.isArray(o)?gt(o,t):void 0;s?i=ee.tuple(a).rest(s):i=ee.tuple(a),typeof e.minItems=="number"&&(i=i.check(ee.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(ee.maxLength(e.maxItems)))}else if(Array.isArray(o)){let a=o.map(l=>gt(l,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?gt(e.additionalItems,t):void 0;s?i=ee.tuple(a).rest(s):i=ee.tuple(a),typeof e.minItems=="number"&&(i=i.check(ee.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(ee.maxLength(e.maxItems)))}else if(o!==void 0){let a=gt(o,t),s=ee.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),i=s}else i=ee.array(ee.any());break}default:throw new Error(`Unsupported type: ${n}`)}return i}function gt(e,t){if(typeof e=="boolean")return e?ee.any():ee.never();let n=Cf(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(c=>gt(c,t)),l=ee.union(s);n=i?ee.intersection(n,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(c=>gt(c,t)),l=ee.xor(s);n=i?ee.intersection(n,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=i?n:ee.any();else{let s=i?n:gt(e.allOf[0],t),l=i?0:1;for(let c=l;c<e.allOf.length;c++)s=ee.intersection(s,gt(e.allOf[c],t));n=s}e.nullable===!0&&t.version==="openapi-3.0"&&(n=ee.nullable(n)),e.readOnly===!0&&(n=ee.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let r={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of o)s in e&&(r[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(r[s]=e[s]);for(let s of Object.keys(e))Y$.has(s)||(r[s]=e[s]);return Object.keys(r).length>0&&t.registry.add(n,r),e.description&&(n=n.describe(e.description)),n}function tC(e,t){if(typeof e=="boolean")return e?ee.any():ee.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=Q$(n,t?.defaultTarget),r=n.$defs||n.definitions||{},o={version:i,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??J$.globalRegistry};return gt(n,o)}});var Uf=w(Nt=>{"use strict";var nC=Nt&&Nt.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),rC=Nt&&Nt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Mf=Nt&&Nt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&nC(t,e,n);return rC(t,e),t};Object.defineProperty(Nt,"__esModule",{value:!0});Nt.string=iC;Nt.number=oC;Nt.boolean=aC;Nt.bigint=sC;Nt.date=cC;var hi=Mf(Et()),vi=Mf(mi());function iC(e){return hi._coercedString(vi.ZodString,e)}function oC(e){return hi._coercedNumber(vi.ZodNumber,e)}function aC(e){return hi._coercedBoolean(vi.ZodBoolean,e)}function sC(e){return hi._coercedBigint(vi.ZodBigInt,e)}function cC(e){return hi._coercedDate(vi.ZodDate,e)}});var Kc=w(ae=>{"use strict";var xf=ae&&ae.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),lC=ae&&ae.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),xa=ae&&ae.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&xf(t,e,n);return lC(t,e),t},Si=ae&&ae.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&xf(t,e,n)},uC=ae&&ae.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ae,"__esModule",{value:!0});ae.coerce=ae.iso=ae.ZodISODuration=ae.ZodISOTime=ae.ZodISODate=ae.ZodISODateTime=ae.locales=ae.fromJSONSchema=ae.toJSONSchema=ae.NEVER=ae.util=ae.TimePrecision=ae.flattenError=ae.formatError=ae.prettifyError=ae.treeifyError=ae.regexes=ae.clone=ae.$brand=ae.$input=ae.$output=ae.config=ae.registry=ae.globalRegistry=ae.core=void 0;ae.core=xa(Et());Si(mi(),ae);Si(Ta(),ae);Si(jc(),ae);Si(zc(),ae);Si($f(),ae);var dC=Et(),_C=uC($c());(0,dC.config)((0,_C.default)());var St=Et();Object.defineProperty(ae,"globalRegistry",{enumerable:!0,get:function(){return St.globalRegistry}});Object.defineProperty(ae,"registry",{enumerable:!0,get:function(){return St.registry}});Object.defineProperty(ae,"config",{enumerable:!0,get:function(){return St.config}});Object.defineProperty(ae,"$output",{enumerable:!0,get:function(){return St.$output}});Object.defineProperty(ae,"$input",{enumerable:!0,get:function(){return St.$input}});Object.defineProperty(ae,"$brand",{enumerable:!0,get:function(){return St.$brand}});Object.defineProperty(ae,"clone",{enumerable:!0,get:function(){return St.clone}});Object.defineProperty(ae,"regexes",{enumerable:!0,get:function(){return St.regexes}});Object.defineProperty(ae,"treeifyError",{enumerable:!0,get:function(){return St.treeifyError}});Object.defineProperty(ae,"prettifyError",{enumerable:!0,get:function(){return St.prettifyError}});Object.defineProperty(ae,"formatError",{enumerable:!0,get:function(){return St.formatError}});Object.defineProperty(ae,"flattenError",{enumerable:!0,get:function(){return St.flattenError}});Object.defineProperty(ae,"TimePrecision",{enumerable:!0,get:function(){return St.TimePrecision}});Object.defineProperty(ae,"util",{enumerable:!0,get:function(){return St.util}});Object.defineProperty(ae,"NEVER",{enumerable:!0,get:function(){return St.NEVER}});var pC=pi();Object.defineProperty(ae,"toJSONSchema",{enumerable:!0,get:function(){return pC.toJSONSchema}});var fC=Lf();Object.defineProperty(ae,"fromJSONSchema",{enumerable:!0,get:function(){return fC.fromJSONSchema}});ae.locales=xa(Mc());var Pa=fi();Object.defineProperty(ae,"ZodISODateTime",{enumerable:!0,get:function(){return Pa.ZodISODateTime}});Object.defineProperty(ae,"ZodISODate",{enumerable:!0,get:function(){return Pa.ZodISODate}});Object.defineProperty(ae,"ZodISOTime",{enumerable:!0,get:function(){return Pa.ZodISOTime}});Object.defineProperty(ae,"ZodISODuration",{enumerable:!0,get:function(){return Pa.ZodISODuration}});ae.iso=xa(fi());ae.coerce=xa(Uf())});var pt=w(kt=>{"use strict";var Pf=kt&&kt.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),mC=kt&&kt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),gC=kt&&kt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Pf(t,e,n);return mC(t,e),t},yC=kt&&kt.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Pf(t,e,n)};Object.defineProperty(kt,"__esModule",{value:!0});kt.z=void 0;var Df=gC(Kc());kt.z=Df;yC(Kc(),kt);kt.default=Df});var Re=w(ft=>{"use strict";var Xc=Symbol.for("yaml.alias"),Vf=Symbol.for("yaml.document"),ja=Symbol.for("yaml.map"),Wf=Symbol.for("yaml.pair"),Yc=Symbol.for("yaml.scalar"),za=Symbol.for("yaml.seq"),tr=Symbol.for("yaml.node.type"),jC=e=>!!e&&typeof e=="object"&&e[tr]===Xc,zC=e=>!!e&&typeof e=="object"&&e[tr]===Vf,FC=e=>!!e&&typeof e=="object"&&e[tr]===ja,ZC=e=>!!e&&typeof e=="object"&&e[tr]===Wf,Bf=e=>!!e&&typeof e=="object"&&e[tr]===Yc,qC=e=>!!e&&typeof e=="object"&&e[tr]===za;function Hf(e){if(e&&typeof e=="object")switch(e[tr]){case ja:case za:return!0}return!1}function VC(e){if(e&&typeof e=="object")switch(e[tr]){case Xc:case ja:case Yc:case za:return!0}return!1}var WC=e=>(Bf(e)||Hf(e))&&!!e.anchor;ft.ALIAS=Xc;ft.DOC=Vf;ft.MAP=ja;ft.NODE_TYPE=tr;ft.PAIR=Wf;ft.SCALAR=Yc;ft.SEQ=za;ft.hasAnchor=WC;ft.isAlias=jC;ft.isCollection=Hf;ft.isDocument=zC;ft.isMap=FC;ft.isNode=VC;ft.isPair=ZC;ft.isScalar=Bf;ft.isSeq=qC});var bi=w(Qc=>{"use strict";var at=Re(),Ot=Symbol("break visit"),Jf=Symbol("skip children"),Jn=Symbol("remove node");function Fa(e,t){let n=Kf(t);at.isDocument(e)?Vr(null,e.contents,n,Object.freeze([e]))===Jn&&(e.contents=null):Vr(null,e,n,Object.freeze([]))}Fa.BREAK=Ot;Fa.SKIP=Jf;Fa.REMOVE=Jn;function Vr(e,t,n,i){let r=Gf(e,t,n,i);if(at.isNode(r)||at.isPair(r))return Xf(e,i,r),Vr(e,r,n,i);if(typeof r!="symbol"){if(at.isCollection(t)){i=Object.freeze(i.concat(t));for(let o=0;o<t.items.length;++o){let a=Vr(o,t.items[o],n,i);if(typeof a=="number")o=a-1;else{if(a===Ot)return Ot;a===Jn&&(t.items.splice(o,1),o-=1)}}}else if(at.isPair(t)){i=Object.freeze(i.concat(t));let o=Vr("key",t.key,n,i);if(o===Ot)return Ot;o===Jn&&(t.key=null);let a=Vr("value",t.value,n,i);if(a===Ot)return Ot;a===Jn&&(t.value=null)}}return r}async function Za(e,t){let n=Kf(t);at.isDocument(e)?await Wr(null,e.contents,n,Object.freeze([e]))===Jn&&(e.contents=null):await Wr(null,e,n,Object.freeze([]))}Za.BREAK=Ot;Za.SKIP=Jf;Za.REMOVE=Jn;async function Wr(e,t,n,i){let r=await Gf(e,t,n,i);if(at.isNode(r)||at.isPair(r))return Xf(e,i,r),Wr(e,r,n,i);if(typeof r!="symbol"){if(at.isCollection(t)){i=Object.freeze(i.concat(t));for(let o=0;o<t.items.length;++o){let a=await Wr(o,t.items[o],n,i);if(typeof a=="number")o=a-1;else{if(a===Ot)return Ot;a===Jn&&(t.items.splice(o,1),o-=1)}}}else if(at.isPair(t)){i=Object.freeze(i.concat(t));let o=await Wr("key",t.key,n,i);if(o===Ot)return Ot;o===Jn&&(t.key=null);let a=await Wr("value",t.value,n,i);if(a===Ot)return Ot;a===Jn&&(t.value=null)}}return r}function Kf(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function Gf(e,t,n,i){if(typeof n=="function")return n(e,t,i);if(at.isMap(t))return n.Map?.(e,t,i);if(at.isSeq(t))return n.Seq?.(e,t,i);if(at.isPair(t))return n.Pair?.(e,t,i);if(at.isScalar(t))return n.Scalar?.(e,t,i);if(at.isAlias(t))return n.Alias?.(e,t,i)}function Xf(e,t,n){let i=t[t.length-1];if(at.isCollection(i))i.items[e]=n;else if(at.isPair(i))e==="key"?i.key=n:i.value=n;else if(at.isDocument(i))i.contents=n;else{let r=at.isAlias(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${r} parent`)}}Qc.visit=Fa;Qc.visitAsync=Za});var el=w(Qf=>{"use strict";var Yf=Re(),BC=bi(),HC={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},JC=e=>e.replace(/[!,[\]{}]/g,t=>HC[t]),Ei=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:e.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},e.defaultTags),this.atNextDocument=!1);let i=t.trim().split(/[ \t]+/),r=i.shift();switch(r){case"%TAG":{if(i.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),i.length<2))return!1;let[o,a]=i;return this.tags[o]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,i.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;let[o]=i;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{let a=/^\d+\.\d+$/.test(o);return n(6,`Unsupported YAML version ${o}`,a),!1}}default:return n(0,`Unknown directive ${r}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){let a=t.slice(2,-1);return a==="!"||a==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),a)}let[,i,r]=t.match(/^(.*!)([^!]*)$/s);r||n(`The ${t} tag has no suffix`);let o=this.tags[i];if(o)try{return o+decodeURIComponent(r)}catch(a){return n(String(a)),null}return i==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(let[n,i]of Object.entries(this.tags))if(t.startsWith(i))return n+JC(t.substring(i.length));return t[0]==="!"?t:`!<${t}>`}toString(t){let n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags),r;if(t&&i.length>0&&Yf.isNode(t.contents)){let o={};BC.visit(t.contents,(a,s)=>{Yf.isNode(s)&&s.tag&&(o[s.tag]=!0)}),r=Object.keys(o)}else r=[];for(let[o,a]of i)o==="!!"&&a==="tag:yaml.org,2002:"||(!t||r.some(s=>s.startsWith(a)))&&n.push(`%TAG ${o} ${a}`);return n.join(`
66
- `)}};Ei.defaultYaml={explicit:!1,version:"1.2"};Ei.defaultTags={"!!":"tag:yaml.org,2002:"};Qf.Directives=Ei});var qa=w(ki=>{"use strict";var em=Re(),KC=bi();function GC(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function tm(e){let t=new Set;return KC.visit(e,{Value(n,i){i.anchor&&t.add(i.anchor)}}),t}function nm(e,t){for(let n=1;;++n){let i=`${e}${n}`;if(!t.has(i))return i}}function XC(e,t){let n=[],i=new Map,r=null;return{onAnchor:o=>{n.push(o),r??(r=tm(e));let a=nm(t,r);return r.add(a),a},setAnchors:()=>{for(let o of n){let a=i.get(o);if(typeof a=="object"&&a.anchor&&(em.isScalar(a.node)||em.isCollection(a.node)))a.node.anchor=a.anchor;else{let s=new Error("Failed to resolve repeated object (this should not happen)");throw s.source=o,s}}},sourceObjects:i}}ki.anchorIsValid=GC;ki.anchorNames=tm;ki.createNodeAnchors=XC;ki.findNewAnchor=nm});var tl=w(rm=>{"use strict";function Oi(e,t,n,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let r=0,o=i.length;r<o;++r){let a=i[r],s=Oi(e,i,String(r),a);s===void 0?delete i[r]:s!==a&&(i[r]=s)}else if(i instanceof Map)for(let r of Array.from(i.keys())){let o=i.get(r),a=Oi(e,i,r,o);a===void 0?i.delete(r):a!==o&&i.set(r,a)}else if(i instanceof Set)for(let r of Array.from(i)){let o=Oi(e,i,r,r);o===void 0?i.delete(r):o!==r&&(i.delete(r),i.add(o))}else for(let[r,o]of Object.entries(i)){let a=Oi(e,i,r,o);a===void 0?delete i[r]:a!==o&&(i[r]=a)}return e.call(t,n,i)}rm.applyReviver=Oi});var lr=w(om=>{"use strict";var YC=Re();function im(e,t,n){if(Array.isArray(e))return e.map((i,r)=>im(i,String(r),n));if(e&&typeof e.toJSON=="function"){if(!n||!YC.hasAnchor(e))return e.toJSON(t,n);let i={aliasCount:0,count:1,res:void 0};n.anchors.set(e,i),n.onCreate=o=>{i.res=o,delete n.onCreate};let r=e.toJSON(t,n);return n.onCreate&&n.onCreate(r),r}return typeof e=="bigint"&&!n?.keep?Number(e):e}om.toJS=im});var Va=w(sm=>{"use strict";var QC=tl(),am=Re(),eL=lr(),nl=class{constructor(t){Object.defineProperty(this,am.NODE_TYPE,{value:t})}clone(){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:i,onAnchor:r,reviver:o}={}){if(!am.isDocument(t))throw new TypeError("A document argument is required");let a={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},s=eL.toJS(this,"",a);if(typeof r=="function")for(let{count:l,res:c}of a.anchors.values())r(c,l);return typeof o=="function"?QC.applyReviver(o,{"":s},"",s):s}};sm.NodeBase=nl});var wi=w(cm=>{"use strict";var tL=qa(),nL=bi(),Br=Re(),rL=Va(),iL=lr(),rl=class extends rL.NodeBase{constructor(t){super(Br.ALIAS),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){if(n?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let i;n?.aliasResolveCache?i=n.aliasResolveCache:(i=[],nL.visit(t,{Node:(o,a)=>{(Br.isAlias(a)||Br.hasAnchor(a))&&i.push(a)}}),n&&(n.aliasResolveCache=i));let r;for(let o of i){if(o===this)break;o.anchor===this.source&&(r=o)}return r}toJSON(t,n){if(!n)return{source:this.source};let{anchors:i,doc:r,maxAliasCount:o}=n,a=this.resolve(r,n);if(!a){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let s=i.get(a);if(s||(iL.toJS(a,null,n),s=i.get(a)),s?.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(o>=0&&(s.count+=1,s.aliasCount===0&&(s.aliasCount=Wa(r,a,i)),s.count*s.aliasCount>o)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return s.res}toString(t,n,i){let r=`*${this.source}`;if(t){if(tL.anchorIsValid(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){let o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(t.implicitKey)return`${r} `}return r}};function Wa(e,t,n){if(Br.isAlias(t)){let i=t.resolve(e),r=n&&i&&n.get(i);return r?r.count*r.aliasCount:0}else if(Br.isCollection(t)){let i=0;for(let r of t.items){let o=Wa(e,r,n);o>i&&(i=o)}return i}else if(Br.isPair(t)){let i=Wa(e,t.key,n),r=Wa(e,t.value,n);return Math.max(i,r)}return 1}cm.Alias=rl});var rt=w(il=>{"use strict";var oL=Re(),aL=Va(),sL=lr(),cL=e=>!e||typeof e!="function"&&typeof e!="object",ur=class extends aL.NodeBase{constructor(t){super(oL.SCALAR),this.value=t}toJSON(t,n){return n?.keep?this.value:sL.toJS(this.value,t,n)}toString(){return String(this.value)}};ur.BLOCK_FOLDED="BLOCK_FOLDED";ur.BLOCK_LITERAL="BLOCK_LITERAL";ur.PLAIN="PLAIN";ur.QUOTE_DOUBLE="QUOTE_DOUBLE";ur.QUOTE_SINGLE="QUOTE_SINGLE";il.Scalar=ur;il.isScalarValue=cL});var Ai=w(um=>{"use strict";var lL=wi(),br=Re(),lm=rt(),uL="tag:yaml.org,2002:";function dL(e,t,n){if(t){let i=n.filter(o=>o.tag===t),r=i.find(o=>!o.format)??i[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return n.find(i=>i.identify?.(e)&&!i.format)}function _L(e,t,n){if(br.isDocument(e)&&(e=e.contents),br.isNode(e))return e;if(br.isPair(e)){let d=n.schema[br.MAP].createNode?.(n.schema,null,n);return d.items.push(e),d}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:i,onAnchor:r,onTagObj:o,schema:a,sourceObjects:s}=n,l;if(i&&e&&typeof e=="object"){if(l=s.get(e),l)return l.anchor??(l.anchor=r(e)),new lL.Alias(l.anchor);l={anchor:null,node:null},s.set(e,l)}t?.startsWith("!!")&&(t=uL+t.slice(2));let c=dL(e,t,a.tags);if(!c){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){let d=new lm.Scalar(e);return l&&(l.node=d),d}c=e instanceof Map?a[br.MAP]:Symbol.iterator in Object(e)?a[br.SEQ]:a[br.MAP]}o&&(o(c),delete n.onTagObj);let u=c?.createNode?c.createNode(n.schema,e,n):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(n.schema,e,n):new lm.Scalar(e);return t?u.tag=t:c.default||(u.tag=c.tag),l&&(l.node=u),u}um.createNode=_L});var Ha=w(Ba=>{"use strict";var pL=Ai(),Kn=Re(),fL=Va();function ol(e,t,n){let i=n;for(let r=t.length-1;r>=0;--r){let o=t[r];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){let a=[];a[o]=i,i=a}else i=new Map([[o,i]])}return pL.createNode(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var dm=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done,al=class extends fL.NodeBase{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){let n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(i=>Kn.isNode(i)||Kn.isPair(i)?i.clone(t):i),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(dm(t))this.add(n);else{let[i,...r]=t,o=this.get(i,!0);if(Kn.isCollection(o))o.addIn(r,n);else if(o===void 0&&this.schema)this.set(i,ol(this.schema,r,n));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${r}`)}}deleteIn(t){let[n,...i]=t;if(i.length===0)return this.delete(n);let r=this.get(n,!0);if(Kn.isCollection(r))return r.deleteIn(i);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}getIn(t,n){let[i,...r]=t,o=this.get(i,!0);return r.length===0?!n&&Kn.isScalar(o)?o.value:o:Kn.isCollection(o)?o.getIn(r,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!Kn.isPair(n))return!1;let i=n.value;return i==null||t&&Kn.isScalar(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(t){let[n,...i]=t;if(i.length===0)return this.has(n);let r=this.get(n,!0);return Kn.isCollection(r)?r.hasIn(i):!1}setIn(t,n){let[i,...r]=t;if(r.length===0)this.set(i,n);else{let o=this.get(i,!0);if(Kn.isCollection(o))o.setIn(r,n);else if(o===void 0&&this.schema)this.set(i,ol(this.schema,r,n));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${r}`)}}};Ba.Collection=al;Ba.collectionFromPath=ol;Ba.isEmptyPath=dm});var Ti=w(Ja=>{"use strict";var mL=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function sl(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var gL=(e,t,n)=>e.endsWith(`
67
- `)?sl(n,t):n.includes(`
65
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){o(a);continue}if(e.external){let c=e.external.registry.get(a[0])?.id;if(t!==a[0]&&c){o(a);continue}}if(e.metadataRegistry.get(a[0])?.id){o(a);continue}if(s.cycle){o(a);continue}if(s.count>1&&e.reused==="ref"){o(a);continue}}}function jc(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=s=>{let l=e.seen.get(s);if(l.ref===null)return;let c=l.def??l.schema,u={...c},d=l.ref;if(l.ref=null,d){i(d);let f=e.seen.get(d),S=f.schema;if(S.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(S)):Object.assign(c,S),Object.assign(c,u),s._zod.parent===d)for(let v in c)v==="$ref"||v==="allOf"||v in u||delete c[v];if(S.$ref&&f.def)for(let v in c)v==="$ref"||v==="allOf"||v in f.def&&JSON.stringify(c[v])===JSON.stringify(f.def[v])&&delete c[v]}let p=s._zod.parent;if(p&&p!==d){i(p);let f=e.seen.get(p);if(f?.schema.$ref&&(c.$ref=f.schema.$ref,f.def))for(let S in c)S==="$ref"||S==="allOf"||S in f.def&&JSON.stringify(c[S])===JSON.stringify(f.def[S])&&delete c[S]}e.override({zodSchema:s,jsonSchema:c,path:l.path??[]})};for(let s of[...e.seen.entries()].reverse())i(s[0]);let r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(s)}Object.assign(r,n.def??n.schema);let o=e.metadataRegistry.get(t)?.id;o!==void 0&&r.id===o&&delete r.id;let a=e.external?.defs??{};for(let s of e.seen.entries()){let l=s[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,a[l.defId]=l.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?r.$defs=a:r.definitions=a);try{let s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:(0,Lt.createStandardJSONSchemaMethod)(t,"input",e.processors),output:(0,Lt.createStandardJSONSchemaMethod)(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function vt(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return vt(i.element,n);if(i.type==="set")return vt(i.valueType,n);if(i.type==="lazy")return vt(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return vt(i.innerType,n);if(i.type==="intersection")return vt(i.left,n)||vt(i.right,n);if(i.type==="record"||i.type==="map")return vt(i.keyType,n)||vt(i.valueType,n);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:vt(i.in,n)||vt(i.out,n);if(i.type==="object"){for(let r in i.shape)if(vt(i.shape[r],n))return!0;return!1}if(i.type==="union"){for(let r of i.options)if(vt(r,n))return!0;return!1}if(i.type==="tuple"){for(let r of i.items)if(vt(r,n))return!0;return!!(i.rest&&vt(i.rest,n))}return!1}var EI=(e,t={})=>n=>{let i=Dc({...n,processors:t});return Oa(e,i),Pc(i,e),jc(i,e)};Lt.createToJSONSchemaMethod=EI;var kI=(e,t,n={})=>i=>{let{libraryOptions:r,target:o}=i??{},a=Dc({...r??{},target:o,io:t,processors:n});return Oa(e,a),Pc(a,e),jc(a,e)};Lt.createStandardJSONSchemaMethod=kI});var pi=w(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.allProcessors=R.lazyProcessor=R.optionalProcessor=R.promiseProcessor=R.readonlyProcessor=R.pipeProcessor=R.catchProcessor=R.prefaultProcessor=R.defaultProcessor=R.nonoptionalProcessor=R.nullableProcessor=R.recordProcessor=R.tupleProcessor=R.intersectionProcessor=R.unionProcessor=R.objectProcessor=R.arrayProcessor=R.setProcessor=R.mapProcessor=R.transformProcessor=R.functionProcessor=R.customProcessor=R.successProcessor=R.fileProcessor=R.templateLiteralProcessor=R.nanProcessor=R.literalProcessor=R.enumProcessor=R.dateProcessor=R.unknownProcessor=R.anyProcessor=R.neverProcessor=R.voidProcessor=R.undefinedProcessor=R.nullProcessor=R.symbolProcessor=R.bigintProcessor=R.booleanProcessor=R.numberProcessor=R.stringProcessor=void 0;R.toJSONSchema=dR;var Pe=_i(),OI=le(),wI={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},AI=(e,t,n,i)=>{let r=n;r.type="string";let{minimum:o,maximum:a,format:s,patterns:l,contentEncoding:c}=e._zod.bag;if(typeof o=="number"&&(r.minLength=o),typeof a=="number"&&(r.maxLength=a),s&&(r.format=wI[s]??s,r.format===""&&delete r.format,s==="time"&&delete r.format),c&&(r.contentEncoding=c),l&&l.size>0){let u=[...l];u.length===1?r.pattern=u[0].source:u.length>1&&(r.allOf=[...u.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}};R.stringProcessor=AI;var TI=(e,t,n,i)=>{let r=n,{minimum:o,maximum:a,format:s,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:u}=e._zod.bag;typeof s=="string"&&s.includes("int")?r.type="integer":r.type="number";let d=typeof u=="number"&&u>=(o??Number.NEGATIVE_INFINITY),p=typeof c=="number"&&c<=(a??Number.POSITIVE_INFINITY),f=t.target==="draft-04"||t.target==="openapi-3.0";d?f?(r.minimum=u,r.exclusiveMinimum=!0):r.exclusiveMinimum=u:typeof o=="number"&&(r.minimum=o),p?f?(r.maximum=c,r.exclusiveMaximum=!0):r.exclusiveMaximum=c:typeof a=="number"&&(r.maximum=a),typeof l=="number"&&(r.multipleOf=l)};R.numberProcessor=TI;var NI=(e,t,n,i)=>{n.type="boolean"};R.booleanProcessor=NI;var II=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")};R.bigintProcessor=II;var RI=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")};R.symbolProcessor=RI;var $I=(e,t,n,i)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"};R.nullProcessor=$I;var CI=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")};R.undefinedProcessor=CI;var LI=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")};R.voidProcessor=LI;var MI=(e,t,n,i)=>{n.not={}};R.neverProcessor=MI;var UI=(e,t,n,i)=>{};R.anyProcessor=UI;var xI=(e,t,n,i)=>{};R.unknownProcessor=xI;var DI=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")};R.dateProcessor=DI;var PI=(e,t,n,i)=>{let r=e._zod.def,o=(0,OI.getEnumValues)(r.entries);o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),n.enum=o};R.enumProcessor=PI;var jI=(e,t,n,i)=>{let r=e._zod.def,o=[];for(let a of r.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){let a=o[0];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),o.every(a=>typeof a=="boolean")&&(n.type="boolean"),o.every(a=>a===null)&&(n.type="null"),n.enum=o};R.literalProcessor=jI;var zI=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")};R.nanProcessor=zI;var FI=(e,t,n,i)=>{let r=n,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=o.source};R.templateLiteralProcessor=FI;var ZI=(e,t,n,i)=>{let r=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:l}=e._zod.bag;a!==void 0&&(o.minLength=a),s!==void 0&&(o.maxLength=s),l?l.length===1?(o.contentMediaType=l[0],Object.assign(r,o)):(Object.assign(r,o),r.anyOf=l.map(c=>({contentMediaType:c}))):Object.assign(r,o)};R.fileProcessor=ZI;var qI=(e,t,n,i)=>{n.type="boolean"};R.successProcessor=qI;var VI=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")};R.customProcessor=VI;var WI=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")};R.functionProcessor=WI;var BI=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")};R.transformProcessor=BI;var HI=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")};R.mapProcessor=HI;var JI=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")};R.setProcessor=JI;var KI=(e,t,n,i)=>{let r=n,o=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(r.minItems=a),typeof s=="number"&&(r.maxItems=s),r.type="array",r.items=(0,Pe.process)(o.element,t,{...i,path:[...i.path,"items"]})};R.arrayProcessor=KI;var GI=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object",r.properties={};let a=o.shape;for(let c in a)r.properties[c]=(0,Pe.process)(a[c],t,{...i,path:[...i.path,"properties",c]});let s=new Set(Object.keys(a)),l=new Set([...s].filter(c=>{let u=o.shape[c]._zod;return t.io==="input"?u.optin===void 0:u.optout===void 0}));l.size>0&&(r.required=Array.from(l)),o.catchall?._zod.def.type==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=(0,Pe.process)(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)};R.objectProcessor=GI;var XI=(e,t,n,i)=>{let r=e._zod.def,o=r.inclusive===!1,a=r.options.map((s,l)=>(0,Pe.process)(s,t,{...i,path:[...i.path,o?"oneOf":"anyOf",l]}));o?n.oneOf=a:n.anyOf=a};R.unionProcessor=XI;var YI=(e,t,n,i)=>{let r=e._zod.def,o=(0,Pe.process)(r.left,t,{...i,path:[...i.path,"allOf",0]}),a=(0,Pe.process)(r.right,t,{...i,path:[...i.path,"allOf",1]}),s=c=>"allOf"in c&&Object.keys(c).length===1,l=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]];n.allOf=l};R.intersectionProcessor=YI;var QI=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",l=o.items.map((p,f)=>(0,Pe.process)(p,t,{...i,path:[...i.path,a,f]})),c=o.rest?(0,Pe.process)(o.rest,t,{...i,path:[...i.path,s,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=l,c&&(r.items=c)):t.target==="openapi-3.0"?(r.items={anyOf:l},c&&r.items.anyOf.push(c),r.minItems=l.length,c||(r.maxItems=l.length)):(r.items=l,c&&(r.additionalItems=c));let{minimum:u,maximum:d}=e._zod.bag;typeof u=="number"&&(r.minItems=u),typeof d=="number"&&(r.maxItems=d)};R.tupleProcessor=QI;var eR=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object";let a=o.keyType,l=a._zod.bag?.patterns;if(o.mode==="loose"&&l&&l.size>0){let u=(0,Pe.process)(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(let d of l)r.patternProperties[d.source]=u}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=(0,Pe.process)(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),r.additionalProperties=(0,Pe.process)(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let c=a._zod.values;if(c){let u=[...c].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(r.required=u)}};R.recordProcessor=eR;var tR=(e,t,n,i)=>{let r=e._zod.def,o=(0,Pe.process)(r.innerType,t,i),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=r.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]};R.nullableProcessor=tR;var nR=(e,t,n,i)=>{let r=e._zod.def;(0,Pe.process)(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType};R.nonoptionalProcessor=nR;var rR=(e,t,n,i)=>{let r=e._zod.def;(0,Pe.process)(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))};R.defaultProcessor=rR;var iR=(e,t,n,i)=>{let r=e._zod.def;(0,Pe.process)(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))};R.prefaultProcessor=iR;var oR=(e,t,n,i)=>{let r=e._zod.def;(0,Pe.process)(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType;let a;try{a=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a};R.catchProcessor=oR;var aR=(e,t,n,i)=>{let r=e._zod.def,o=r.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?o?r.out:r.in:r.out;(0,Pe.process)(a,t,i);let s=t.seen.get(e);s.ref=a};R.pipeProcessor=aR;var sR=(e,t,n,i)=>{let r=e._zod.def;(0,Pe.process)(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.readOnly=!0};R.readonlyProcessor=sR;var cR=(e,t,n,i)=>{let r=e._zod.def;(0,Pe.process)(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType};R.promiseProcessor=cR;var lR=(e,t,n,i)=>{let r=e._zod.def;(0,Pe.process)(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType};R.optionalProcessor=lR;var uR=(e,t,n,i)=>{let r=e._zod.innerType;(0,Pe.process)(r,t,i);let o=t.seen.get(e);o.ref=r};R.lazyProcessor=uR;R.allProcessors={string:R.stringProcessor,number:R.numberProcessor,boolean:R.booleanProcessor,bigint:R.bigintProcessor,symbol:R.symbolProcessor,null:R.nullProcessor,undefined:R.undefinedProcessor,void:R.voidProcessor,never:R.neverProcessor,any:R.anyProcessor,unknown:R.unknownProcessor,date:R.dateProcessor,enum:R.enumProcessor,literal:R.literalProcessor,nan:R.nanProcessor,template_literal:R.templateLiteralProcessor,file:R.fileProcessor,success:R.successProcessor,custom:R.customProcessor,function:R.functionProcessor,transform:R.transformProcessor,map:R.mapProcessor,set:R.setProcessor,array:R.arrayProcessor,object:R.objectProcessor,union:R.unionProcessor,intersection:R.intersectionProcessor,tuple:R.tupleProcessor,record:R.recordProcessor,nullable:R.nullableProcessor,nonoptional:R.nonoptionalProcessor,default:R.defaultProcessor,prefault:R.prefaultProcessor,catch:R.catchProcessor,pipe:R.pipeProcessor,readonly:R.readonlyProcessor,promise:R.promiseProcessor,optional:R.optionalProcessor,lazy:R.lazyProcessor};function dR(e,t){if("_idmap"in e){let i=e,r=(0,Pe.initializeContext)({...t,processors:R.allProcessors}),o={};for(let l of i._idmap.entries()){let[c,u]=l;(0,Pe.process)(u,r)}let a={},s={registry:i,uri:t?.uri,defs:o};r.external=s;for(let l of i._idmap.entries()){let[c,u]=l;(0,Pe.extractDefs)(r,u),a[c]=(0,Pe.finalize)(r,u)}if(Object.keys(o).length>0){let l=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[l]:o}}return{schemas:a}}let n=(0,Pe.initializeContext)({...t,processors:R.allProcessors});return(0,Pe.process)(e,n),(0,Pe.extractDefs)(n,e),(0,Pe.finalize)(n,e)}});var of=w(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});Aa.JSONSchemaGenerator=void 0;var _R=pi(),wa=_i(),zc=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=(0,wa.initializeContext)({processors:_R.allProcessors,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return(0,wa.process)(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),(0,wa.extractDefs)(this.ctx,t);let i=(0,wa.finalize)(this.ctx,t),{"~standard":r,...o}=i;return o}};Aa.JSONSchemaGenerator=zc});var sf=w(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0})});var Et=w(Le=>{"use strict";var cf=Le&&Le.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),pR=Le&&Le.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Hn=Le&&Le.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&cf(t,e,n)},Ta=Le&&Le.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&cf(t,e,n);return pR(t,e),t};Object.defineProperty(Le,"__esModule",{value:!0});Le.JSONSchema=Le.JSONSchemaGenerator=Le.toJSONSchema=Le.locales=Le.regexes=Le.util=void 0;Hn(br(),Le);Hn(Oc(),Le);Hn(Ec(),Le);Hn(Cc(),Le);Hn(mo(),Le);Hn(Ic(),Le);Le.util=Ta(le());Le.regexes=Ta(fo());Le.locales=Ta(xc());Hn(li(),Le);Hn(Nc(),Le);Hn(rf(),Le);Hn(_i(),Le);var fR=pi();Object.defineProperty(Le,"toJSONSchema",{enumerable:!0,get:function(){return fR.toJSONSchema}});var mR=of();Object.defineProperty(Le,"JSONSchemaGenerator",{enumerable:!0,get:function(){return mR.JSONSchemaGenerator}});Le.JSONSchema=Ta(sf())});var Na=w(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.slugify=de.toUpperCase=de.toLowerCase=de.trim=de.normalize=de.overwrite=de.mime=de.property=de.endsWith=de.startsWith=de.includes=de.uppercase=de.lowercase=de.regex=de.length=de.minLength=de.maxLength=de.size=de.minSize=de.maxSize=de.multipleOf=de.nonnegative=de.nonpositive=de.negative=de.positive=de.gte=de.gt=de.lte=de.lt=void 0;var je=Et();Object.defineProperty(de,"lt",{enumerable:!0,get:function(){return je._lt}});Object.defineProperty(de,"lte",{enumerable:!0,get:function(){return je._lte}});Object.defineProperty(de,"gt",{enumerable:!0,get:function(){return je._gt}});Object.defineProperty(de,"gte",{enumerable:!0,get:function(){return je._gte}});Object.defineProperty(de,"positive",{enumerable:!0,get:function(){return je._positive}});Object.defineProperty(de,"negative",{enumerable:!0,get:function(){return je._negative}});Object.defineProperty(de,"nonpositive",{enumerable:!0,get:function(){return je._nonpositive}});Object.defineProperty(de,"nonnegative",{enumerable:!0,get:function(){return je._nonnegative}});Object.defineProperty(de,"multipleOf",{enumerable:!0,get:function(){return je._multipleOf}});Object.defineProperty(de,"maxSize",{enumerable:!0,get:function(){return je._maxSize}});Object.defineProperty(de,"minSize",{enumerable:!0,get:function(){return je._minSize}});Object.defineProperty(de,"size",{enumerable:!0,get:function(){return je._size}});Object.defineProperty(de,"maxLength",{enumerable:!0,get:function(){return je._maxLength}});Object.defineProperty(de,"minLength",{enumerable:!0,get:function(){return je._minLength}});Object.defineProperty(de,"length",{enumerable:!0,get:function(){return je._length}});Object.defineProperty(de,"regex",{enumerable:!0,get:function(){return je._regex}});Object.defineProperty(de,"lowercase",{enumerable:!0,get:function(){return je._lowercase}});Object.defineProperty(de,"uppercase",{enumerable:!0,get:function(){return je._uppercase}});Object.defineProperty(de,"includes",{enumerable:!0,get:function(){return je._includes}});Object.defineProperty(de,"startsWith",{enumerable:!0,get:function(){return je._startsWith}});Object.defineProperty(de,"endsWith",{enumerable:!0,get:function(){return je._endsWith}});Object.defineProperty(de,"property",{enumerable:!0,get:function(){return je._property}});Object.defineProperty(de,"mime",{enumerable:!0,get:function(){return je._mime}});Object.defineProperty(de,"overwrite",{enumerable:!0,get:function(){return je._overwrite}});Object.defineProperty(de,"normalize",{enumerable:!0,get:function(){return je._normalize}});Object.defineProperty(de,"trim",{enumerable:!0,get:function(){return je._trim}});Object.defineProperty(de,"toLowerCase",{enumerable:!0,get:function(){return je._toLowerCase}});Object.defineProperty(de,"toUpperCase",{enumerable:!0,get:function(){return je._toUpperCase}});Object.defineProperty(de,"slugify",{enumerable:!0,get:function(){return je._slugify}})});var fi=w(Ve=>{"use strict";var gR=Ve&&Ve.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),yR=Ve&&Ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),lf=Ve&&Ve.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&gR(t,e,n);return yR(t,e),t};Object.defineProperty(Ve,"__esModule",{value:!0});Ve.ZodISODuration=Ve.ZodISOTime=Ve.ZodISODate=Ve.ZodISODateTime=void 0;Ve.datetime=hR;Ve.date=vR;Ve.time=SR;Ve.duration=bR;var Mt=lf(Et()),Ia=lf(mi());Ve.ZodISODateTime=Mt.$constructor("ZodISODateTime",(e,t)=>{Mt.$ZodISODateTime.init(e,t),Ia.ZodStringFormat.init(e,t)});function hR(e){return Mt._isoDateTime(Ve.ZodISODateTime,e)}Ve.ZodISODate=Mt.$constructor("ZodISODate",(e,t)=>{Mt.$ZodISODate.init(e,t),Ia.ZodStringFormat.init(e,t)});function vR(e){return Mt._isoDate(Ve.ZodISODate,e)}Ve.ZodISOTime=Mt.$constructor("ZodISOTime",(e,t)=>{Mt.$ZodISOTime.init(e,t),Ia.ZodStringFormat.init(e,t)});function SR(e){return Mt._isoTime(Ve.ZodISOTime,e)}Ve.ZodISODuration=Mt.$constructor("ZodISODuration",(e,t)=>{Mt.$ZodISODuration.init(e,t),Ia.ZodStringFormat.init(e,t)});function bR(e){return Mt._isoDuration(Ve.ZodISODuration,e)}});var Fc=w(Ut=>{"use strict";var ER=Ut&&Ut.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),kR=Ut&&Ut.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),df=Ut&&Ut.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&ER(t,e,n);return kR(t,e),t};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.ZodRealError=Ut.ZodError=void 0;var Ra=df(Et()),OR=Et(),uf=df(le()),_f=(e,t)=>{OR.$ZodError.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Ra.formatError(e,n)},flatten:{value:n=>Ra.flattenError(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,uf.jsonStringifyReplacer,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,uf.jsonStringifyReplacer,2)}},isEmpty:{get(){return e.issues.length===0}}})};Ut.ZodError=Ra.$constructor("ZodError",_f);Ut.ZodRealError=Ra.$constructor("ZodError",_f,{Parent:Error})});var Zc=w(Me=>{"use strict";var wR=Me&&Me.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),AR=Me&&Me.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),TR=Me&&Me.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&wR(t,e,n);return AR(t,e),t};Object.defineProperty(Me,"__esModule",{value:!0});Me.safeDecodeAsync=Me.safeEncodeAsync=Me.safeDecode=Me.safeEncode=Me.decodeAsync=Me.encodeAsync=Me.decode=Me.encode=Me.safeParseAsync=Me.safeParse=Me.parseAsync=Me.parse=void 0;var xt=TR(Et()),Dt=Fc();Me.parse=xt._parse(Dt.ZodRealError);Me.parseAsync=xt._parseAsync(Dt.ZodRealError);Me.safeParse=xt._safeParse(Dt.ZodRealError);Me.safeParseAsync=xt._safeParseAsync(Dt.ZodRealError);Me.encode=xt._encode(Dt.ZodRealError);Me.decode=xt._decode(Dt.ZodRealError);Me.encodeAsync=xt._encodeAsync(Dt.ZodRealError);Me.decodeAsync=xt._decodeAsync(Dt.ZodRealError);Me.safeEncode=xt._safeEncode(Dt.ZodRealError);Me.safeDecode=xt._safeDecode(Dt.ZodRealError);Me.safeEncodeAsync=xt._safeEncodeAsync(Dt.ZodRealError);Me.safeDecodeAsync=xt._safeDecodeAsync(Dt.ZodRealError)});var mi=w(_=>{"use strict";var NR=_&&_.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),IR=_&&_.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),gi=_&&_.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&NR(t,e,n);return IR(t,e),t};Object.defineProperty(_,"__esModule",{value:!0});_.ZodLiteral=_.ZodEnum=_.ZodSet=_.ZodMap=_.ZodRecord=_.ZodTuple=_.ZodIntersection=_.ZodDiscriminatedUnion=_.ZodXor=_.ZodUnion=_.ZodObject=_.ZodArray=_.ZodDate=_.ZodVoid=_.ZodNever=_.ZodUnknown=_.ZodAny=_.ZodNull=_.ZodUndefined=_.ZodSymbol=_.ZodBigIntFormat=_.ZodBigInt=_.ZodBoolean=_.ZodNumberFormat=_.ZodNumber=_.ZodCustomStringFormat=_.ZodJWT=_.ZodE164=_.ZodBase64URL=_.ZodBase64=_.ZodCIDRv6=_.ZodCIDRv4=_.ZodIPv6=_.ZodMAC=_.ZodIPv4=_.ZodKSUID=_.ZodXID=_.ZodULID=_.ZodCUID2=_.ZodCUID=_.ZodNanoID=_.ZodEmoji=_.ZodURL=_.ZodUUID=_.ZodGUID=_.ZodEmail=_.ZodStringFormat=_.ZodString=_._ZodString=_.ZodType=void 0;_.stringbool=_.meta=_.describe=_.ZodCustom=_.ZodFunction=_.ZodPromise=_.ZodLazy=_.ZodTemplateLiteral=_.ZodReadonly=_.ZodPreprocess=_.ZodCodec=_.ZodPipe=_.ZodNaN=_.ZodCatch=_.ZodSuccess=_.ZodNonOptional=_.ZodPrefault=_.ZodDefault=_.ZodNullable=_.ZodExactOptional=_.ZodOptional=_.ZodTransform=_.ZodFile=void 0;_.string=Ca;_.email=RR;_.guid=$R;_.uuid=CR;_.uuidv4=LR;_.uuidv6=MR;_.uuidv7=UR;_.url=xR;_.httpUrl=DR;_.emoji=PR;_.nanoid=jR;_.cuid=zR;_.cuid2=FR;_.ulid=ZR;_.xid=qR;_.ksuid=VR;_.ipv4=WR;_.mac=BR;_.ipv6=HR;_.cidrv4=JR;_.cidrv6=KR;_.base64=GR;_.base64url=XR;_.e164=YR;_.jwt=QR;_.stringFormat=e$;_.hostname=t$;_.hex=n$;_.hash=r$;_.number=ff;_.int=Vc;_.float32=i$;_.float64=o$;_.int32=a$;_.uint32=s$;_.boolean=mf;_.bigint=c$;_.int64=l$;_.uint64=u$;_.symbol=d$;_.undefined=_$;_.null=gf;_.any=p$;_.unknown=Zr;_.never=Bc;_.void=f$;_.date=m$;_.array=Ua;_.keyof=g$;_.object=y$;_.strictObject=h$;_.looseObject=v$;_.union=Hc;_.xor=S$;_.discriminatedUnion=b$;_.intersection=yf;_.tuple=hf;_.record=vf;_.partialRecord=E$;_.looseRecord=k$;_.map=O$;_.set=w$;_.enum=Jc;_.nativeEnum=A$;_.literal=T$;_.file=N$;_.transform=Kc;_.optional=La;_.exactOptional=Sf;_.nullable=Ma;_.nullish=I$;_._default=bf;_.prefault=Ef;_.nonoptional=kf;_.success=R$;_.catch=Of;_.nan=$$;_.pipe=Wc;_.codec=C$;_.invertCodec=L$;_.readonly=wf;_.templateLiteral=M$;_.lazy=Af;_.promise=U$;_._function=xa;_.function=xa;_._function=xa;_.function=xa;_.check=x$;_.custom=D$;_.refine=Tf;_.superRefine=Nf;_.instanceof=P$;_.json=z$;_.preprocess=F$;var g=gi(Et()),Ie=Et(),ke=gi(pi()),qc=_i(),ve=gi(Na()),$a=gi(fi()),Pt=gi(Zc()),pf=new WeakMap;function yi(e,t,n){let i=Object.getPrototypeOf(e),r=pf.get(i);if(r||(r=new Set,pf.set(i,r)),!r.has(t)){r.add(t);for(let o in n){let a=n[o];Object.defineProperty(i,o,{configurable:!0,enumerable:!1,get(){let s=a.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}_.ZodType=g.$constructor("ZodType",(e,t)=>(g.$ZodType.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:(0,qc.createStandardJSONSchemaMethod)(e,"input"),output:(0,qc.createStandardJSONSchemaMethod)(e,"output")}}),e.toJSONSchema=(0,qc.createToJSONSchemaMethod)(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,i)=>Pt.parse(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>Pt.safeParse(e,n,i),e.parseAsync=async(n,i)=>Pt.parseAsync(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>Pt.safeParseAsync(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>Pt.encode(e,n,i),e.decode=(n,i)=>Pt.decode(e,n,i),e.encodeAsync=async(n,i)=>Pt.encodeAsync(e,n,i),e.decodeAsync=async(n,i)=>Pt.decodeAsync(e,n,i),e.safeEncode=(n,i)=>Pt.safeEncode(e,n,i),e.safeDecode=(n,i)=>Pt.safeDecode(e,n,i),e.safeEncodeAsync=async(n,i)=>Pt.safeEncodeAsync(e,n,i),e.safeDecodeAsync=async(n,i)=>Pt.safeDecodeAsync(e,n,i),yi(e,"ZodType",{check(...n){let i=this.def;return this.clone(Ie.util.mergeDefs(i,{checks:[...i.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,i){return g.clone(this,n,i)},brand(){return this},register(n,i){return n.add(this,i),this},refine(n,i){return this.check(Tf(n,i))},superRefine(n,i){return this.check(Nf(n,i))},overwrite(n){return this.check(ve.overwrite(n))},optional(){return La(this)},exactOptional(){return Sf(this)},nullable(){return Ma(this)},nullish(){return La(Ma(this))},nonoptional(n){return kf(this,n)},array(){return Ua(this)},or(n){return Hc([this,n])},and(n){return yf(this,n)},transform(n){return Wc(this,Kc(n))},default(n){return bf(this,n)},prefault(n){return Ef(this,n)},catch(n){return Of(this,n)},pipe(n){return Wc(this,n)},readonly(){return wf(this)},describe(n){let i=this.clone();return g.globalRegistry.add(i,{description:n}),i},meta(...n){if(n.length===0)return g.globalRegistry.get(this);let i=this.clone();return g.globalRegistry.add(i,n[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return g.globalRegistry.get(e)?.description},configurable:!0}),e));_._ZodString=g.$constructor("_ZodString",(e,t)=>{g.$ZodString.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(i,r,o)=>ke.stringProcessor(e,i,r,o);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,yi(e,"_ZodString",{regex(...i){return this.check(ve.regex(...i))},includes(...i){return this.check(ve.includes(...i))},startsWith(...i){return this.check(ve.startsWith(...i))},endsWith(...i){return this.check(ve.endsWith(...i))},min(...i){return this.check(ve.minLength(...i))},max(...i){return this.check(ve.maxLength(...i))},length(...i){return this.check(ve.length(...i))},nonempty(...i){return this.check(ve.minLength(1,...i))},lowercase(i){return this.check(ve.lowercase(i))},uppercase(i){return this.check(ve.uppercase(i))},trim(){return this.check(ve.trim())},normalize(...i){return this.check(ve.normalize(...i))},toLowerCase(){return this.check(ve.toLowerCase())},toUpperCase(){return this.check(ve.toUpperCase())},slugify(){return this.check(ve.slugify())}})});_.ZodString=g.$constructor("ZodString",(e,t)=>{g.$ZodString.init(e,t),_._ZodString.init(e,t),e.email=n=>e.check(g._email(_.ZodEmail,n)),e.url=n=>e.check(g._url(_.ZodURL,n)),e.jwt=n=>e.check(g._jwt(_.ZodJWT,n)),e.emoji=n=>e.check(g._emoji(_.ZodEmoji,n)),e.guid=n=>e.check(g._guid(_.ZodGUID,n)),e.uuid=n=>e.check(g._uuid(_.ZodUUID,n)),e.uuidv4=n=>e.check(g._uuidv4(_.ZodUUID,n)),e.uuidv6=n=>e.check(g._uuidv6(_.ZodUUID,n)),e.uuidv7=n=>e.check(g._uuidv7(_.ZodUUID,n)),e.nanoid=n=>e.check(g._nanoid(_.ZodNanoID,n)),e.guid=n=>e.check(g._guid(_.ZodGUID,n)),e.cuid=n=>e.check(g._cuid(_.ZodCUID,n)),e.cuid2=n=>e.check(g._cuid2(_.ZodCUID2,n)),e.ulid=n=>e.check(g._ulid(_.ZodULID,n)),e.base64=n=>e.check(g._base64(_.ZodBase64,n)),e.base64url=n=>e.check(g._base64url(_.ZodBase64URL,n)),e.xid=n=>e.check(g._xid(_.ZodXID,n)),e.ksuid=n=>e.check(g._ksuid(_.ZodKSUID,n)),e.ipv4=n=>e.check(g._ipv4(_.ZodIPv4,n)),e.ipv6=n=>e.check(g._ipv6(_.ZodIPv6,n)),e.cidrv4=n=>e.check(g._cidrv4(_.ZodCIDRv4,n)),e.cidrv6=n=>e.check(g._cidrv6(_.ZodCIDRv6,n)),e.e164=n=>e.check(g._e164(_.ZodE164,n)),e.datetime=n=>e.check($a.datetime(n)),e.date=n=>e.check($a.date(n)),e.time=n=>e.check($a.time(n)),e.duration=n=>e.check($a.duration(n))});function Ca(e){return g._string(_.ZodString,e)}_.ZodStringFormat=g.$constructor("ZodStringFormat",(e,t)=>{g.$ZodStringFormat.init(e,t),_._ZodString.init(e,t)});_.ZodEmail=g.$constructor("ZodEmail",(e,t)=>{g.$ZodEmail.init(e,t),_.ZodStringFormat.init(e,t)});function RR(e){return g._email(_.ZodEmail,e)}_.ZodGUID=g.$constructor("ZodGUID",(e,t)=>{g.$ZodGUID.init(e,t),_.ZodStringFormat.init(e,t)});function $R(e){return g._guid(_.ZodGUID,e)}_.ZodUUID=g.$constructor("ZodUUID",(e,t)=>{g.$ZodUUID.init(e,t),_.ZodStringFormat.init(e,t)});function CR(e){return g._uuid(_.ZodUUID,e)}function LR(e){return g._uuidv4(_.ZodUUID,e)}function MR(e){return g._uuidv6(_.ZodUUID,e)}function UR(e){return g._uuidv7(_.ZodUUID,e)}_.ZodURL=g.$constructor("ZodURL",(e,t)=>{g.$ZodURL.init(e,t),_.ZodStringFormat.init(e,t)});function xR(e){return g._url(_.ZodURL,e)}function DR(e){return g._url(_.ZodURL,{protocol:g.regexes.httpProtocol,hostname:g.regexes.domain,...Ie.util.normalizeParams(e)})}_.ZodEmoji=g.$constructor("ZodEmoji",(e,t)=>{g.$ZodEmoji.init(e,t),_.ZodStringFormat.init(e,t)});function PR(e){return g._emoji(_.ZodEmoji,e)}_.ZodNanoID=g.$constructor("ZodNanoID",(e,t)=>{g.$ZodNanoID.init(e,t),_.ZodStringFormat.init(e,t)});function jR(e){return g._nanoid(_.ZodNanoID,e)}_.ZodCUID=g.$constructor("ZodCUID",(e,t)=>{g.$ZodCUID.init(e,t),_.ZodStringFormat.init(e,t)});function zR(e){return g._cuid(_.ZodCUID,e)}_.ZodCUID2=g.$constructor("ZodCUID2",(e,t)=>{g.$ZodCUID2.init(e,t),_.ZodStringFormat.init(e,t)});function FR(e){return g._cuid2(_.ZodCUID2,e)}_.ZodULID=g.$constructor("ZodULID",(e,t)=>{g.$ZodULID.init(e,t),_.ZodStringFormat.init(e,t)});function ZR(e){return g._ulid(_.ZodULID,e)}_.ZodXID=g.$constructor("ZodXID",(e,t)=>{g.$ZodXID.init(e,t),_.ZodStringFormat.init(e,t)});function qR(e){return g._xid(_.ZodXID,e)}_.ZodKSUID=g.$constructor("ZodKSUID",(e,t)=>{g.$ZodKSUID.init(e,t),_.ZodStringFormat.init(e,t)});function VR(e){return g._ksuid(_.ZodKSUID,e)}_.ZodIPv4=g.$constructor("ZodIPv4",(e,t)=>{g.$ZodIPv4.init(e,t),_.ZodStringFormat.init(e,t)});function WR(e){return g._ipv4(_.ZodIPv4,e)}_.ZodMAC=g.$constructor("ZodMAC",(e,t)=>{g.$ZodMAC.init(e,t),_.ZodStringFormat.init(e,t)});function BR(e){return g._mac(_.ZodMAC,e)}_.ZodIPv6=g.$constructor("ZodIPv6",(e,t)=>{g.$ZodIPv6.init(e,t),_.ZodStringFormat.init(e,t)});function HR(e){return g._ipv6(_.ZodIPv6,e)}_.ZodCIDRv4=g.$constructor("ZodCIDRv4",(e,t)=>{g.$ZodCIDRv4.init(e,t),_.ZodStringFormat.init(e,t)});function JR(e){return g._cidrv4(_.ZodCIDRv4,e)}_.ZodCIDRv6=g.$constructor("ZodCIDRv6",(e,t)=>{g.$ZodCIDRv6.init(e,t),_.ZodStringFormat.init(e,t)});function KR(e){return g._cidrv6(_.ZodCIDRv6,e)}_.ZodBase64=g.$constructor("ZodBase64",(e,t)=>{g.$ZodBase64.init(e,t),_.ZodStringFormat.init(e,t)});function GR(e){return g._base64(_.ZodBase64,e)}_.ZodBase64URL=g.$constructor("ZodBase64URL",(e,t)=>{g.$ZodBase64URL.init(e,t),_.ZodStringFormat.init(e,t)});function XR(e){return g._base64url(_.ZodBase64URL,e)}_.ZodE164=g.$constructor("ZodE164",(e,t)=>{g.$ZodE164.init(e,t),_.ZodStringFormat.init(e,t)});function YR(e){return g._e164(_.ZodE164,e)}_.ZodJWT=g.$constructor("ZodJWT",(e,t)=>{g.$ZodJWT.init(e,t),_.ZodStringFormat.init(e,t)});function QR(e){return g._jwt(_.ZodJWT,e)}_.ZodCustomStringFormat=g.$constructor("ZodCustomStringFormat",(e,t)=>{g.$ZodCustomStringFormat.init(e,t),_.ZodStringFormat.init(e,t)});function e$(e,t,n={}){return g._stringFormat(_.ZodCustomStringFormat,e,t,n)}function t$(e){return g._stringFormat(_.ZodCustomStringFormat,"hostname",g.regexes.hostname,e)}function n$(e){return g._stringFormat(_.ZodCustomStringFormat,"hex",g.regexes.hex,e)}function r$(e,t){let n=t?.enc??"hex",i=`${e}_${n}`,r=g.regexes[i];if(!r)throw new Error(`Unrecognized hash format: ${i}`);return g._stringFormat(_.ZodCustomStringFormat,i,r,t)}_.ZodNumber=g.$constructor("ZodNumber",(e,t)=>{g.$ZodNumber.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(i,r,o)=>ke.numberProcessor(e,i,r,o),yi(e,"ZodNumber",{gt(i,r){return this.check(ve.gt(i,r))},gte(i,r){return this.check(ve.gte(i,r))},min(i,r){return this.check(ve.gte(i,r))},lt(i,r){return this.check(ve.lt(i,r))},lte(i,r){return this.check(ve.lte(i,r))},max(i,r){return this.check(ve.lte(i,r))},int(i){return this.check(Vc(i))},safe(i){return this.check(Vc(i))},positive(i){return this.check(ve.gt(0,i))},nonnegative(i){return this.check(ve.gte(0,i))},negative(i){return this.check(ve.lt(0,i))},nonpositive(i){return this.check(ve.lte(0,i))},multipleOf(i,r){return this.check(ve.multipleOf(i,r))},step(i,r){return this.check(ve.multipleOf(i,r))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function ff(e){return g._number(_.ZodNumber,e)}_.ZodNumberFormat=g.$constructor("ZodNumberFormat",(e,t)=>{g.$ZodNumberFormat.init(e,t),_.ZodNumber.init(e,t)});function Vc(e){return g._int(_.ZodNumberFormat,e)}function i$(e){return g._float32(_.ZodNumberFormat,e)}function o$(e){return g._float64(_.ZodNumberFormat,e)}function a$(e){return g._int32(_.ZodNumberFormat,e)}function s$(e){return g._uint32(_.ZodNumberFormat,e)}_.ZodBoolean=g.$constructor("ZodBoolean",(e,t)=>{g.$ZodBoolean.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.booleanProcessor(e,n,i,r)});function mf(e){return g._boolean(_.ZodBoolean,e)}_.ZodBigInt=g.$constructor("ZodBigInt",(e,t)=>{g.$ZodBigInt.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(i,r,o)=>ke.bigintProcessor(e,i,r,o),e.gte=(i,r)=>e.check(ve.gte(i,r)),e.min=(i,r)=>e.check(ve.gte(i,r)),e.gt=(i,r)=>e.check(ve.gt(i,r)),e.gte=(i,r)=>e.check(ve.gte(i,r)),e.min=(i,r)=>e.check(ve.gte(i,r)),e.lt=(i,r)=>e.check(ve.lt(i,r)),e.lte=(i,r)=>e.check(ve.lte(i,r)),e.max=(i,r)=>e.check(ve.lte(i,r)),e.positive=i=>e.check(ve.gt(BigInt(0),i)),e.negative=i=>e.check(ve.lt(BigInt(0),i)),e.nonpositive=i=>e.check(ve.lte(BigInt(0),i)),e.nonnegative=i=>e.check(ve.gte(BigInt(0),i)),e.multipleOf=(i,r)=>e.check(ve.multipleOf(i,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function c$(e){return g._bigint(_.ZodBigInt,e)}_.ZodBigIntFormat=g.$constructor("ZodBigIntFormat",(e,t)=>{g.$ZodBigIntFormat.init(e,t),_.ZodBigInt.init(e,t)});function l$(e){return g._int64(_.ZodBigIntFormat,e)}function u$(e){return g._uint64(_.ZodBigIntFormat,e)}_.ZodSymbol=g.$constructor("ZodSymbol",(e,t)=>{g.$ZodSymbol.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.symbolProcessor(e,n,i,r)});function d$(e){return g._symbol(_.ZodSymbol,e)}_.ZodUndefined=g.$constructor("ZodUndefined",(e,t)=>{g.$ZodUndefined.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.undefinedProcessor(e,n,i,r)});function _$(e){return g._undefined(_.ZodUndefined,e)}_.ZodNull=g.$constructor("ZodNull",(e,t)=>{g.$ZodNull.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.nullProcessor(e,n,i,r)});function gf(e){return g._null(_.ZodNull,e)}_.ZodAny=g.$constructor("ZodAny",(e,t)=>{g.$ZodAny.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.anyProcessor(e,n,i,r)});function p$(){return g._any(_.ZodAny)}_.ZodUnknown=g.$constructor("ZodUnknown",(e,t)=>{g.$ZodUnknown.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.unknownProcessor(e,n,i,r)});function Zr(){return g._unknown(_.ZodUnknown)}_.ZodNever=g.$constructor("ZodNever",(e,t)=>{g.$ZodNever.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.neverProcessor(e,n,i,r)});function Bc(e){return g._never(_.ZodNever,e)}_.ZodVoid=g.$constructor("ZodVoid",(e,t)=>{g.$ZodVoid.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.voidProcessor(e,n,i,r)});function f$(e){return g._void(_.ZodVoid,e)}_.ZodDate=g.$constructor("ZodDate",(e,t)=>{g.$ZodDate.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(i,r,o)=>ke.dateProcessor(e,i,r,o),e.min=(i,r)=>e.check(ve.gte(i,r)),e.max=(i,r)=>e.check(ve.lte(i,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function m$(e){return g._date(_.ZodDate,e)}_.ZodArray=g.$constructor("ZodArray",(e,t)=>{g.$ZodArray.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.arrayProcessor(e,n,i,r),e.element=t.element,yi(e,"ZodArray",{min(n,i){return this.check(ve.minLength(n,i))},nonempty(n){return this.check(ve.minLength(1,n))},max(n,i){return this.check(ve.maxLength(n,i))},length(n,i){return this.check(ve.length(n,i))},unwrap(){return this.element}})});function Ua(e,t){return g._array(_.ZodArray,e,t)}function g$(e){let t=e._zod.def.shape;return Jc(Object.keys(t))}_.ZodObject=g.$constructor("ZodObject",(e,t)=>{g.$ZodObjectJIT.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.objectProcessor(e,n,i,r),Ie.util.defineLazy(e,"shape",()=>t.shape),yi(e,"ZodObject",{keyof(){return Jc(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:Zr()})},loose(){return this.clone({...this._zod.def,catchall:Zr()})},strict(){return this.clone({...this._zod.def,catchall:Bc()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return Ie.util.extend(this,n)},safeExtend(n){return Ie.util.safeExtend(this,n)},merge(n){return Ie.util.merge(this,n)},pick(n){return Ie.util.pick(this,n)},omit(n){return Ie.util.omit(this,n)},partial(...n){return Ie.util.partial(_.ZodOptional,this,n[0])},required(...n){return Ie.util.required(_.ZodNonOptional,this,n[0])}})});function y$(e,t){let n={type:"object",shape:e??{},...Ie.util.normalizeParams(t)};return new _.ZodObject(n)}function h$(e,t){return new _.ZodObject({type:"object",shape:e,catchall:Bc(),...Ie.util.normalizeParams(t)})}function v$(e,t){return new _.ZodObject({type:"object",shape:e,catchall:Zr(),...Ie.util.normalizeParams(t)})}_.ZodUnion=g.$constructor("ZodUnion",(e,t)=>{g.$ZodUnion.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.unionProcessor(e,n,i,r),e.options=t.options});function Hc(e,t){return new _.ZodUnion({type:"union",options:e,...Ie.util.normalizeParams(t)})}_.ZodXor=g.$constructor("ZodXor",(e,t)=>{_.ZodUnion.init(e,t),g.$ZodXor.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.unionProcessor(e,n,i,r),e.options=t.options});function S$(e,t){return new _.ZodXor({type:"union",options:e,inclusive:!1,...Ie.util.normalizeParams(t)})}_.ZodDiscriminatedUnion=g.$constructor("ZodDiscriminatedUnion",(e,t)=>{_.ZodUnion.init(e,t),g.$ZodDiscriminatedUnion.init(e,t)});function b$(e,t,n){return new _.ZodDiscriminatedUnion({type:"union",options:t,discriminator:e,...Ie.util.normalizeParams(n)})}_.ZodIntersection=g.$constructor("ZodIntersection",(e,t)=>{g.$ZodIntersection.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.intersectionProcessor(e,n,i,r)});function yf(e,t){return new _.ZodIntersection({type:"intersection",left:e,right:t})}_.ZodTuple=g.$constructor("ZodTuple",(e,t)=>{g.$ZodTuple.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.tupleProcessor(e,n,i,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});function hf(e,t,n){let i=t instanceof g.$ZodType,r=i?n:t,o=i?t:null;return new _.ZodTuple({type:"tuple",items:e,rest:o,...Ie.util.normalizeParams(r)})}_.ZodRecord=g.$constructor("ZodRecord",(e,t)=>{g.$ZodRecord.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.recordProcessor(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType});function vf(e,t,n){return!t||!t._zod?new _.ZodRecord({type:"record",keyType:Ca(),valueType:e,...Ie.util.normalizeParams(t)}):new _.ZodRecord({type:"record",keyType:e,valueType:t,...Ie.util.normalizeParams(n)})}function E$(e,t,n){let i=g.clone(e);return i._zod.values=void 0,new _.ZodRecord({type:"record",keyType:i,valueType:t,...Ie.util.normalizeParams(n)})}function k$(e,t,n){return new _.ZodRecord({type:"record",keyType:e,valueType:t,mode:"loose",...Ie.util.normalizeParams(n)})}_.ZodMap=g.$constructor("ZodMap",(e,t)=>{g.$ZodMap.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.mapProcessor(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(g._minSize(...n)),e.nonempty=n=>e.check(g._minSize(1,n)),e.max=(...n)=>e.check(g._maxSize(...n)),e.size=(...n)=>e.check(g._size(...n))});function O$(e,t,n){return new _.ZodMap({type:"map",keyType:e,valueType:t,...Ie.util.normalizeParams(n)})}_.ZodSet=g.$constructor("ZodSet",(e,t)=>{g.$ZodSet.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.setProcessor(e,n,i,r),e.min=(...n)=>e.check(g._minSize(...n)),e.nonempty=n=>e.check(g._minSize(1,n)),e.max=(...n)=>e.check(g._maxSize(...n)),e.size=(...n)=>e.check(g._size(...n))});function w$(e,t){return new _.ZodSet({type:"set",valueType:e,...Ie.util.normalizeParams(t)})}_.ZodEnum=g.$constructor("ZodEnum",(e,t)=>{g.$ZodEnum.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(i,r,o)=>ke.enumProcessor(e,i,r,o),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(i,r)=>{let o={};for(let a of i)if(n.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new _.ZodEnum({...t,checks:[],...Ie.util.normalizeParams(r),entries:o})},e.exclude=(i,r)=>{let o={...t.entries};for(let a of i)if(n.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new _.ZodEnum({...t,checks:[],...Ie.util.normalizeParams(r),entries:o})}});function Jc(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new _.ZodEnum({type:"enum",entries:n,...Ie.util.normalizeParams(t)})}function A$(e,t){return new _.ZodEnum({type:"enum",entries:e,...Ie.util.normalizeParams(t)})}_.ZodLiteral=g.$constructor("ZodLiteral",(e,t)=>{g.$ZodLiteral.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.literalProcessor(e,n,i,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function T$(e,t){return new _.ZodLiteral({type:"literal",values:Array.isArray(e)?e:[e],...Ie.util.normalizeParams(t)})}_.ZodFile=g.$constructor("ZodFile",(e,t)=>{g.$ZodFile.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.fileProcessor(e,n,i,r),e.min=(n,i)=>e.check(g._minSize(n,i)),e.max=(n,i)=>e.check(g._maxSize(n,i)),e.mime=(n,i)=>e.check(g._mime(Array.isArray(n)?n:[n],i))});function N$(e){return g._file(_.ZodFile,e)}_.ZodTransform=g.$constructor("ZodTransform",(e,t)=>{g.$ZodTransform.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.transformProcessor(e,n,i,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new g.$ZodEncodeError(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(Ie.util.issue(o,n.value,t));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(Ie.util.issue(a))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(o=>(n.value=o,n.fallback=!0,n)):(n.value=r,n.fallback=!0,n)}});function Kc(e){return new _.ZodTransform({type:"transform",transform:e})}_.ZodOptional=g.$constructor("ZodOptional",(e,t)=>{g.$ZodOptional.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.optionalProcessor(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function La(e){return new _.ZodOptional({type:"optional",innerType:e})}_.ZodExactOptional=g.$constructor("ZodExactOptional",(e,t)=>{g.$ZodExactOptional.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.optionalProcessor(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Sf(e){return new _.ZodExactOptional({type:"optional",innerType:e})}_.ZodNullable=g.$constructor("ZodNullable",(e,t)=>{g.$ZodNullable.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.nullableProcessor(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Ma(e){return new _.ZodNullable({type:"nullable",innerType:e})}function I$(e){return La(Ma(e))}_.ZodDefault=g.$constructor("ZodDefault",(e,t)=>{g.$ZodDefault.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.defaultProcessor(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function bf(e,t){return new _.ZodDefault({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Ie.util.shallowClone(t)}})}_.ZodPrefault=g.$constructor("ZodPrefault",(e,t)=>{g.$ZodPrefault.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.prefaultProcessor(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Ef(e,t){return new _.ZodPrefault({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Ie.util.shallowClone(t)}})}_.ZodNonOptional=g.$constructor("ZodNonOptional",(e,t)=>{g.$ZodNonOptional.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.nonoptionalProcessor(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function kf(e,t){return new _.ZodNonOptional({type:"nonoptional",innerType:e,...Ie.util.normalizeParams(t)})}_.ZodSuccess=g.$constructor("ZodSuccess",(e,t)=>{g.$ZodSuccess.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.successProcessor(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function R$(e){return new _.ZodSuccess({type:"success",innerType:e})}_.ZodCatch=g.$constructor("ZodCatch",(e,t)=>{g.$ZodCatch.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.catchProcessor(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Of(e,t){return new _.ZodCatch({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}_.ZodNaN=g.$constructor("ZodNaN",(e,t)=>{g.$ZodNaN.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.nanProcessor(e,n,i,r)});function $$(e){return g._nan(_.ZodNaN,e)}_.ZodPipe=g.$constructor("ZodPipe",(e,t)=>{g.$ZodPipe.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.pipeProcessor(e,n,i,r),e.in=t.in,e.out=t.out});function Wc(e,t){return new _.ZodPipe({type:"pipe",in:e,out:t})}_.ZodCodec=g.$constructor("ZodCodec",(e,t)=>{_.ZodPipe.init(e,t),g.$ZodCodec.init(e,t)});function C$(e,t,n){return new _.ZodCodec({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function L$(e){let t=e._zod.def;return new _.ZodCodec({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}_.ZodPreprocess=g.$constructor("ZodPreprocess",(e,t)=>{_.ZodPipe.init(e,t),g.$ZodPreprocess.init(e,t)});_.ZodReadonly=g.$constructor("ZodReadonly",(e,t)=>{g.$ZodReadonly.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.readonlyProcessor(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function wf(e){return new _.ZodReadonly({type:"readonly",innerType:e})}_.ZodTemplateLiteral=g.$constructor("ZodTemplateLiteral",(e,t)=>{g.$ZodTemplateLiteral.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.templateLiteralProcessor(e,n,i,r)});function M$(e,t){return new _.ZodTemplateLiteral({type:"template_literal",parts:e,...Ie.util.normalizeParams(t)})}_.ZodLazy=g.$constructor("ZodLazy",(e,t)=>{g.$ZodLazy.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.lazyProcessor(e,n,i,r),e.unwrap=()=>e._zod.def.getter()});function Af(e){return new _.ZodLazy({type:"lazy",getter:e})}_.ZodPromise=g.$constructor("ZodPromise",(e,t)=>{g.$ZodPromise.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.promiseProcessor(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function U$(e){return new _.ZodPromise({type:"promise",innerType:e})}_.ZodFunction=g.$constructor("ZodFunction",(e,t)=>{g.$ZodFunction.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.functionProcessor(e,n,i,r)});function xa(e){return new _.ZodFunction({type:"function",input:Array.isArray(e?.input)?hf(e?.input):e?.input??Ua(Zr()),output:e?.output??Zr()})}_.ZodCustom=g.$constructor("ZodCustom",(e,t)=>{g.$ZodCustom.init(e,t),_.ZodType.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ke.customProcessor(e,n,i,r)});function x$(e){let t=new g.$ZodCheck({check:"custom"});return t._zod.check=e,t}function D$(e,t){return g._custom(_.ZodCustom,e??(()=>!0),t)}function Tf(e,t={}){return g._refine(_.ZodCustom,e,t)}function Nf(e,t){return g._superRefine(e,t)}_.describe=g.describe;_.meta=g.meta;function P$(e,t={}){let n=new _.ZodCustom({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...Ie.util.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:n,path:[...n._zod.def.path??[]]})},n}var j$=(...e)=>g._stringbool({Codec:_.ZodCodec,Boolean:_.ZodBoolean,String:_.ZodString},...e);_.stringbool=j$;function z$(e){let t=Af(()=>Hc([Ca(e),ff(),mf(),gf(),Ua(t),vf(Ca(),t)]));return t}function F$(e,t){return new _.ZodPreprocess({type:"pipe",in:Kc(e),out:t})}});var Cf=w(dt=>{"use strict";var Z$=dt&&dt.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),q$=dt&&dt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),V$=dt&&dt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Z$(t,e,n);return q$(t,e),t};Object.defineProperty(dt,"__esModule",{value:!0});dt.ZodFirstPartyTypeKind=dt.config=dt.$brand=dt.ZodIssueCode=void 0;dt.setErrorMap=W$;dt.getErrorMap=B$;var Rf=V$(Et());dt.ZodIssueCode={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};var $f=Et();Object.defineProperty(dt,"$brand",{enumerable:!0,get:function(){return $f.$brand}});Object.defineProperty(dt,"config",{enumerable:!0,get:function(){return $f.config}});function W$(e){Rf.config({customError:e})}function B$(){return Rf.config().customError}var If;If||(dt.ZodFirstPartyTypeKind=If={})});var Mf=w(Qn=>{"use strict";var H$=Qn&&Qn.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),J$=Qn&&Qn.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Gc=Qn&&Qn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&H$(t,e,n);return J$(t,e),t};Object.defineProperty(Qn,"__esModule",{value:!0});Qn.fromJSONSchema=nC;var K$=li(),G$=Gc(Na()),X$=Gc(fi()),Y$=Gc(mi()),te={...Y$,...G$,iso:X$},Q$=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function eC(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function tC(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===i){let r=n[1];if(!r||!t.defs[r])throw new Error(`Reference not found: ${e}`);return t.defs[r]}throw new Error(`Reference not found: ${e}`)}function Lf(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return te.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return te.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let o=tC(r,t),a=gt(o,t);return t.refs.set(r,a),t.processing.delete(r),a}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return te.null();if(r.length===0)return te.never();if(r.length===1)return te.literal(r[0]);if(r.every(a=>typeof a=="string"))return te.enum(r);let o=r.map(a=>te.literal(a));return o.length<2?o[0]:te.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return te.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(o=>{let a={...e,type:o};return Lf(a,t)});return r.length===0?te.never():r.length===1?r[0]:te.union(r)}if(!n)return te.any();let i;switch(n){case"string":{let r=te.string();if(e.format){let o=e.format;o==="email"?r=r.check(te.email()):o==="uri"||o==="uri-reference"?r=r.check(te.url()):o==="uuid"||o==="guid"?r=r.check(te.uuid()):o==="date-time"?r=r.check(te.iso.datetime()):o==="date"?r=r.check(te.iso.date()):o==="time"?r=r.check(te.iso.time()):o==="duration"?r=r.check(te.iso.duration()):o==="ipv4"?r=r.check(te.ipv4()):o==="ipv6"?r=r.check(te.ipv6()):o==="mac"?r=r.check(te.mac()):o==="cidr"?r=r.check(te.cidrv4()):o==="cidr-v6"?r=r.check(te.cidrv6()):o==="base64"?r=r.check(te.base64()):o==="base64url"?r=r.check(te.base64url()):o==="e164"?r=r.check(te.e164()):o==="jwt"?r=r.check(te.jwt()):o==="emoji"?r=r.check(te.emoji()):o==="nanoid"?r=r.check(te.nanoid()):o==="cuid"?r=r.check(te.cuid()):o==="cuid2"?r=r.check(te.cuid2()):o==="ulid"?r=r.check(te.ulid()):o==="xid"?r=r.check(te.xid()):o==="ksuid"&&(r=r.check(te.ksuid()))}typeof e.minLength=="number"&&(r=r.min(e.minLength)),typeof e.maxLength=="number"&&(r=r.max(e.maxLength)),e.pattern&&(r=r.regex(new RegExp(e.pattern))),i=r;break}case"number":case"integer":{let r=n==="integer"?te.number().int():te.number();typeof e.minimum=="number"&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&(r=r.max(e.maximum)),typeof e.exclusiveMinimum=="number"?r=r.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),i=r;break}case"boolean":{i=te.boolean();break}case"null":{i=te.null();break}case"object":{let r={},o=e.properties||{},a=new Set(e.required||[]);for(let[l,c]of Object.entries(o)){let u=gt(c,t);r[l]=a.has(l)?u:u.optional()}if(e.propertyNames){let l=gt(e.propertyNames,t),c=e.additionalProperties&&typeof e.additionalProperties=="object"?gt(e.additionalProperties,t):te.any();if(Object.keys(r).length===0){i=te.record(l,c);break}let u=te.object(r).passthrough(),d=te.looseRecord(l,c);i=te.intersection(u,d);break}if(e.patternProperties){let l=e.patternProperties,c=Object.keys(l),u=[];for(let p of c){let f=gt(l[p],t),S=te.string().regex(new RegExp(p));u.push(te.looseRecord(S,f))}let d=[];if(Object.keys(r).length>0&&d.push(te.object(r).passthrough()),d.push(...u),d.length===0)i=te.object({}).passthrough();else if(d.length===1)i=d[0];else{let p=te.intersection(d[0],d[1]);for(let f=2;f<d.length;f++)p=te.intersection(p,d[f]);i=p}break}let s=te.object(r);e.additionalProperties===!1?i=s.strict():typeof e.additionalProperties=="object"?i=s.catchall(gt(e.additionalProperties,t)):i=s.passthrough();break}case"array":{let r=e.prefixItems,o=e.items;if(r&&Array.isArray(r)){let a=r.map(l=>gt(l,t)),s=o&&typeof o=="object"&&!Array.isArray(o)?gt(o,t):void 0;s?i=te.tuple(a).rest(s):i=te.tuple(a),typeof e.minItems=="number"&&(i=i.check(te.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(te.maxLength(e.maxItems)))}else if(Array.isArray(o)){let a=o.map(l=>gt(l,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?gt(e.additionalItems,t):void 0;s?i=te.tuple(a).rest(s):i=te.tuple(a),typeof e.minItems=="number"&&(i=i.check(te.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(te.maxLength(e.maxItems)))}else if(o!==void 0){let a=gt(o,t),s=te.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),i=s}else i=te.array(te.any());break}default:throw new Error(`Unsupported type: ${n}`)}return i}function gt(e,t){if(typeof e=="boolean")return e?te.any():te.never();let n=Lf(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(c=>gt(c,t)),l=te.union(s);n=i?te.intersection(n,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(c=>gt(c,t)),l=te.xor(s);n=i?te.intersection(n,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=i?n:te.any();else{let s=i?n:gt(e.allOf[0],t),l=i?0:1;for(let c=l;c<e.allOf.length;c++)s=te.intersection(s,gt(e.allOf[c],t));n=s}e.nullable===!0&&t.version==="openapi-3.0"&&(n=te.nullable(n)),e.readOnly===!0&&(n=te.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let r={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of o)s in e&&(r[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(r[s]=e[s]);for(let s of Object.keys(e))Q$.has(s)||(r[s]=e[s]);return Object.keys(r).length>0&&t.registry.add(n,r),e.description&&(n=n.describe(e.description)),n}function nC(e,t){if(typeof e=="boolean")return e?te.any():te.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=eC(n,t?.defaultTarget),r=n.$defs||n.definitions||{},o={version:i,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??K$.globalRegistry};return gt(n,o)}});var xf=w(It=>{"use strict";var rC=It&&It.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),iC=It&&It.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Uf=It&&It.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&rC(t,e,n);return iC(t,e),t};Object.defineProperty(It,"__esModule",{value:!0});It.string=oC;It.number=aC;It.boolean=sC;It.bigint=cC;It.date=lC;var hi=Uf(Et()),vi=Uf(mi());function oC(e){return hi._coercedString(vi.ZodString,e)}function aC(e){return hi._coercedNumber(vi.ZodNumber,e)}function sC(e){return hi._coercedBoolean(vi.ZodBoolean,e)}function cC(e){return hi._coercedBigint(vi.ZodBigInt,e)}function lC(e){return hi._coercedDate(vi.ZodDate,e)}});var Xc=w(se=>{"use strict";var Df=se&&se.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),uC=se&&se.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Da=se&&se.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Df(t,e,n);return uC(t,e),t},Si=se&&se.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Df(t,e,n)},dC=se&&se.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(se,"__esModule",{value:!0});se.coerce=se.iso=se.ZodISODuration=se.ZodISOTime=se.ZodISODate=se.ZodISODateTime=se.locales=se.fromJSONSchema=se.toJSONSchema=se.NEVER=se.util=se.TimePrecision=se.flattenError=se.formatError=se.prettifyError=se.treeifyError=se.regexes=se.clone=se.$brand=se.$input=se.$output=se.config=se.registry=se.globalRegistry=se.core=void 0;se.core=Da(Et());Si(mi(),se);Si(Na(),se);Si(Fc(),se);Si(Zc(),se);Si(Cf(),se);var _C=Et(),pC=dC(Lc());(0,_C.config)((0,pC.default)());var St=Et();Object.defineProperty(se,"globalRegistry",{enumerable:!0,get:function(){return St.globalRegistry}});Object.defineProperty(se,"registry",{enumerable:!0,get:function(){return St.registry}});Object.defineProperty(se,"config",{enumerable:!0,get:function(){return St.config}});Object.defineProperty(se,"$output",{enumerable:!0,get:function(){return St.$output}});Object.defineProperty(se,"$input",{enumerable:!0,get:function(){return St.$input}});Object.defineProperty(se,"$brand",{enumerable:!0,get:function(){return St.$brand}});Object.defineProperty(se,"clone",{enumerable:!0,get:function(){return St.clone}});Object.defineProperty(se,"regexes",{enumerable:!0,get:function(){return St.regexes}});Object.defineProperty(se,"treeifyError",{enumerable:!0,get:function(){return St.treeifyError}});Object.defineProperty(se,"prettifyError",{enumerable:!0,get:function(){return St.prettifyError}});Object.defineProperty(se,"formatError",{enumerable:!0,get:function(){return St.formatError}});Object.defineProperty(se,"flattenError",{enumerable:!0,get:function(){return St.flattenError}});Object.defineProperty(se,"TimePrecision",{enumerable:!0,get:function(){return St.TimePrecision}});Object.defineProperty(se,"util",{enumerable:!0,get:function(){return St.util}});Object.defineProperty(se,"NEVER",{enumerable:!0,get:function(){return St.NEVER}});var fC=pi();Object.defineProperty(se,"toJSONSchema",{enumerable:!0,get:function(){return fC.toJSONSchema}});var mC=Mf();Object.defineProperty(se,"fromJSONSchema",{enumerable:!0,get:function(){return mC.fromJSONSchema}});se.locales=Da(xc());var Pa=fi();Object.defineProperty(se,"ZodISODateTime",{enumerable:!0,get:function(){return Pa.ZodISODateTime}});Object.defineProperty(se,"ZodISODate",{enumerable:!0,get:function(){return Pa.ZodISODate}});Object.defineProperty(se,"ZodISOTime",{enumerable:!0,get:function(){return Pa.ZodISOTime}});Object.defineProperty(se,"ZodISODuration",{enumerable:!0,get:function(){return Pa.ZodISODuration}});se.iso=Da(fi());se.coerce=Da(xf())});var pt=w(kt=>{"use strict";var Pf=kt&&kt.__createBinding||(Object.create?(function(e,t,n,i){i===void 0&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}):(function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]})),gC=kt&&kt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),yC=kt&&kt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&Pf(t,e,n);return gC(t,e),t},hC=kt&&kt.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Pf(t,e,n)};Object.defineProperty(kt,"__esModule",{value:!0});kt.z=void 0;var jf=yC(Xc());kt.z=jf;hC(Xc(),kt);kt.default=jf});var Re=w(ft=>{"use strict";var Qc=Symbol.for("yaml.alias"),Wf=Symbol.for("yaml.document"),za=Symbol.for("yaml.map"),Bf=Symbol.for("yaml.pair"),el=Symbol.for("yaml.scalar"),Fa=Symbol.for("yaml.seq"),tr=Symbol.for("yaml.node.type"),ZC=e=>!!e&&typeof e=="object"&&e[tr]===Qc,qC=e=>!!e&&typeof e=="object"&&e[tr]===Wf,VC=e=>!!e&&typeof e=="object"&&e[tr]===za,WC=e=>!!e&&typeof e=="object"&&e[tr]===Bf,Hf=e=>!!e&&typeof e=="object"&&e[tr]===el,BC=e=>!!e&&typeof e=="object"&&e[tr]===Fa;function Jf(e){if(e&&typeof e=="object")switch(e[tr]){case za:case Fa:return!0}return!1}function HC(e){if(e&&typeof e=="object")switch(e[tr]){case Qc:case za:case el:case Fa:return!0}return!1}var JC=e=>(Hf(e)||Jf(e))&&!!e.anchor;ft.ALIAS=Qc;ft.DOC=Wf;ft.MAP=za;ft.NODE_TYPE=tr;ft.PAIR=Bf;ft.SCALAR=el;ft.SEQ=Fa;ft.hasAnchor=JC;ft.isAlias=ZC;ft.isCollection=Jf;ft.isDocument=qC;ft.isMap=VC;ft.isNode=HC;ft.isPair=WC;ft.isScalar=Hf;ft.isSeq=BC});var bi=w(tl=>{"use strict";var at=Re(),Ot=Symbol("break visit"),Kf=Symbol("skip children"),Jn=Symbol("remove node");function Za(e,t){let n=Gf(t);at.isDocument(e)?Vr(null,e.contents,n,Object.freeze([e]))===Jn&&(e.contents=null):Vr(null,e,n,Object.freeze([]))}Za.BREAK=Ot;Za.SKIP=Kf;Za.REMOVE=Jn;function Vr(e,t,n,i){let r=Xf(e,t,n,i);if(at.isNode(r)||at.isPair(r))return Yf(e,i,r),Vr(e,r,n,i);if(typeof r!="symbol"){if(at.isCollection(t)){i=Object.freeze(i.concat(t));for(let o=0;o<t.items.length;++o){let a=Vr(o,t.items[o],n,i);if(typeof a=="number")o=a-1;else{if(a===Ot)return Ot;a===Jn&&(t.items.splice(o,1),o-=1)}}}else if(at.isPair(t)){i=Object.freeze(i.concat(t));let o=Vr("key",t.key,n,i);if(o===Ot)return Ot;o===Jn&&(t.key=null);let a=Vr("value",t.value,n,i);if(a===Ot)return Ot;a===Jn&&(t.value=null)}}return r}async function qa(e,t){let n=Gf(t);at.isDocument(e)?await Wr(null,e.contents,n,Object.freeze([e]))===Jn&&(e.contents=null):await Wr(null,e,n,Object.freeze([]))}qa.BREAK=Ot;qa.SKIP=Kf;qa.REMOVE=Jn;async function Wr(e,t,n,i){let r=await Xf(e,t,n,i);if(at.isNode(r)||at.isPair(r))return Yf(e,i,r),Wr(e,r,n,i);if(typeof r!="symbol"){if(at.isCollection(t)){i=Object.freeze(i.concat(t));for(let o=0;o<t.items.length;++o){let a=await Wr(o,t.items[o],n,i);if(typeof a=="number")o=a-1;else{if(a===Ot)return Ot;a===Jn&&(t.items.splice(o,1),o-=1)}}}else if(at.isPair(t)){i=Object.freeze(i.concat(t));let o=await Wr("key",t.key,n,i);if(o===Ot)return Ot;o===Jn&&(t.key=null);let a=await Wr("value",t.value,n,i);if(a===Ot)return Ot;a===Jn&&(t.value=null)}}return r}function Gf(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function Xf(e,t,n,i){if(typeof n=="function")return n(e,t,i);if(at.isMap(t))return n.Map?.(e,t,i);if(at.isSeq(t))return n.Seq?.(e,t,i);if(at.isPair(t))return n.Pair?.(e,t,i);if(at.isScalar(t))return n.Scalar?.(e,t,i);if(at.isAlias(t))return n.Alias?.(e,t,i)}function Yf(e,t,n){let i=t[t.length-1];if(at.isCollection(i))i.items[e]=n;else if(at.isPair(i))e==="key"?i.key=n:i.value=n;else if(at.isDocument(i))i.contents=n;else{let r=at.isAlias(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${r} parent`)}}tl.visit=Za;tl.visitAsync=qa});var nl=w(em=>{"use strict";var Qf=Re(),KC=bi(),GC={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},XC=e=>e.replace(/[!,[\]{}]/g,t=>GC[t]),Ei=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},e.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:e.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},e.defaultTags),this.atNextDocument=!1);let i=t.trim().split(/[ \t]+/),r=i.shift();switch(r){case"%TAG":{if(i.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),i.length<2))return!1;let[o,a]=i;return this.tags[o]=a,!0}case"%YAML":{if(this.yaml.explicit=!0,i.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;let[o]=i;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{let a=/^\d+\.\d+$/.test(o);return n(6,`Unsupported YAML version ${o}`,a),!1}}default:return n(0,`Unknown directive ${r}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){let a=t.slice(2,-1);return a==="!"||a==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),a)}let[,i,r]=t.match(/^(.*!)([^!]*)$/s);r||n(`The ${t} tag has no suffix`);let o=this.tags[i];if(o)try{return o+decodeURIComponent(r)}catch(a){return n(String(a)),null}return i==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(let[n,i]of Object.entries(this.tags))if(t.startsWith(i))return n+XC(t.substring(i.length));return t[0]==="!"?t:`!<${t}>`}toString(t){let n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],i=Object.entries(this.tags),r;if(t&&i.length>0&&Qf.isNode(t.contents)){let o={};KC.visit(t.contents,(a,s)=>{Qf.isNode(s)&&s.tag&&(o[s.tag]=!0)}),r=Object.keys(o)}else r=[];for(let[o,a]of i)o==="!!"&&a==="tag:yaml.org,2002:"||(!t||r.some(s=>s.startsWith(a)))&&n.push(`%TAG ${o} ${a}`);return n.join(`
66
+ `)}};Ei.defaultYaml={explicit:!1,version:"1.2"};Ei.defaultTags={"!!":"tag:yaml.org,2002:"};em.Directives=Ei});var Va=w(ki=>{"use strict";var tm=Re(),YC=bi();function QC(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function nm(e){let t=new Set;return YC.visit(e,{Value(n,i){i.anchor&&t.add(i.anchor)}}),t}function rm(e,t){for(let n=1;;++n){let i=`${e}${n}`;if(!t.has(i))return i}}function eL(e,t){let n=[],i=new Map,r=null;return{onAnchor:o=>{n.push(o),r??(r=nm(e));let a=rm(t,r);return r.add(a),a},setAnchors:()=>{for(let o of n){let a=i.get(o);if(typeof a=="object"&&a.anchor&&(tm.isScalar(a.node)||tm.isCollection(a.node)))a.node.anchor=a.anchor;else{let s=new Error("Failed to resolve repeated object (this should not happen)");throw s.source=o,s}}},sourceObjects:i}}ki.anchorIsValid=QC;ki.anchorNames=nm;ki.createNodeAnchors=eL;ki.findNewAnchor=rm});var rl=w(im=>{"use strict";function Oi(e,t,n,i){if(i&&typeof i=="object")if(Array.isArray(i))for(let r=0,o=i.length;r<o;++r){let a=i[r],s=Oi(e,i,String(r),a);s===void 0?delete i[r]:s!==a&&(i[r]=s)}else if(i instanceof Map)for(let r of Array.from(i.keys())){let o=i.get(r),a=Oi(e,i,r,o);a===void 0?i.delete(r):a!==o&&i.set(r,a)}else if(i instanceof Set)for(let r of Array.from(i)){let o=Oi(e,i,r,r);o===void 0?i.delete(r):o!==r&&(i.delete(r),i.add(o))}else for(let[r,o]of Object.entries(i)){let a=Oi(e,i,r,o);a===void 0?delete i[r]:a!==o&&(i[r]=a)}return e.call(t,n,i)}im.applyReviver=Oi});var lr=w(am=>{"use strict";var tL=Re();function om(e,t,n){if(Array.isArray(e))return e.map((i,r)=>om(i,String(r),n));if(e&&typeof e.toJSON=="function"){if(!n||!tL.hasAnchor(e))return e.toJSON(t,n);let i={aliasCount:0,count:1,res:void 0};n.anchors.set(e,i),n.onCreate=o=>{i.res=o,delete n.onCreate};let r=e.toJSON(t,n);return n.onCreate&&n.onCreate(r),r}return typeof e=="bigint"&&!n?.keep?Number(e):e}am.toJS=om});var Wa=w(cm=>{"use strict";var nL=rl(),sm=Re(),rL=lr(),il=class{constructor(t){Object.defineProperty(this,sm.NODE_TYPE,{value:t})}clone(){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:i,onAnchor:r,reviver:o}={}){if(!sm.isDocument(t))throw new TypeError("A document argument is required");let a={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},s=rL.toJS(this,"",a);if(typeof r=="function")for(let{count:l,res:c}of a.anchors.values())r(c,l);return typeof o=="function"?nL.applyReviver(o,{"":s},"",s):s}};cm.NodeBase=il});var wi=w(lm=>{"use strict";var iL=Va(),oL=bi(),Br=Re(),aL=Wa(),sL=lr(),ol=class extends aL.NodeBase{constructor(t){super(Br.ALIAS),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){if(n?.maxAliasCount===0)throw new ReferenceError("Alias resolution is disabled");let i;n?.aliasResolveCache?i=n.aliasResolveCache:(i=[],oL.visit(t,{Node:(o,a)=>{(Br.isAlias(a)||Br.hasAnchor(a))&&i.push(a)}}),n&&(n.aliasResolveCache=i));let r;for(let o of i){if(o===this)break;o.anchor===this.source&&(r=o)}return r}toJSON(t,n){if(!n)return{source:this.source};let{anchors:i,doc:r,maxAliasCount:o}=n,a=this.resolve(r,n);if(!a){let l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let s=i.get(a);if(s||(sL.toJS(a,null,n),s=i.get(a)),s?.res===void 0){let l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(o>=0&&(s.count+=1,s.aliasCount===0&&(s.aliasCount=Ba(r,a,i)),s.count*s.aliasCount>o)){let l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return s.res}toString(t,n,i){let r=`*${this.source}`;if(t){if(iL.anchorIsValid(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){let o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(t.implicitKey)return`${r} `}return r}};function Ba(e,t,n){if(Br.isAlias(t)){let i=t.resolve(e),r=n&&i&&n.get(i);return r?r.count*r.aliasCount:0}else if(Br.isCollection(t)){let i=0;for(let r of t.items){let o=Ba(e,r,n);o>i&&(i=o)}return i}else if(Br.isPair(t)){let i=Ba(e,t.key,n),r=Ba(e,t.value,n);return Math.max(i,r)}return 1}lm.Alias=ol});var rt=w(al=>{"use strict";var cL=Re(),lL=Wa(),uL=lr(),dL=e=>!e||typeof e!="function"&&typeof e!="object",ur=class extends lL.NodeBase{constructor(t){super(cL.SCALAR),this.value=t}toJSON(t,n){return n?.keep?this.value:uL.toJS(this.value,t,n)}toString(){return String(this.value)}};ur.BLOCK_FOLDED="BLOCK_FOLDED";ur.BLOCK_LITERAL="BLOCK_LITERAL";ur.PLAIN="PLAIN";ur.QUOTE_DOUBLE="QUOTE_DOUBLE";ur.QUOTE_SINGLE="QUOTE_SINGLE";al.Scalar=ur;al.isScalarValue=dL});var Ai=w(dm=>{"use strict";var _L=wi(),Er=Re(),um=rt(),pL="tag:yaml.org,2002:";function fL(e,t,n){if(t){let i=n.filter(o=>o.tag===t),r=i.find(o=>!o.format)??i[0];if(!r)throw new Error(`Tag ${t} not found`);return r}return n.find(i=>i.identify?.(e)&&!i.format)}function mL(e,t,n){if(Er.isDocument(e)&&(e=e.contents),Er.isNode(e))return e;if(Er.isPair(e)){let d=n.schema[Er.MAP].createNode?.(n.schema,null,n);return d.items.push(e),d}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:i,onAnchor:r,onTagObj:o,schema:a,sourceObjects:s}=n,l;if(i&&e&&typeof e=="object"){if(l=s.get(e),l)return l.anchor??(l.anchor=r(e)),new _L.Alias(l.anchor);l={anchor:null,node:null},s.set(e,l)}t?.startsWith("!!")&&(t=pL+t.slice(2));let c=fL(e,t,a.tags);if(!c){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){let d=new um.Scalar(e);return l&&(l.node=d),d}c=e instanceof Map?a[Er.MAP]:Symbol.iterator in Object(e)?a[Er.SEQ]:a[Er.MAP]}o&&(o(c),delete n.onTagObj);let u=c?.createNode?c.createNode(n.schema,e,n):typeof c?.nodeClass?.from=="function"?c.nodeClass.from(n.schema,e,n):new um.Scalar(e);return t?u.tag=t:c.default||(u.tag=c.tag),l&&(l.node=u),u}dm.createNode=mL});var Ja=w(Ha=>{"use strict";var gL=Ai(),Kn=Re(),yL=Wa();function sl(e,t,n){let i=n;for(let r=t.length-1;r>=0;--r){let o=t[r];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){let a=[];a[o]=i,i=a}else i=new Map([[o,i]])}return gL.createNode(i,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}var _m=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done,cl=class extends yL.NodeBase{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){let n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(i=>Kn.isNode(i)||Kn.isPair(i)?i.clone(t):i),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(_m(t))this.add(n);else{let[i,...r]=t,o=this.get(i,!0);if(Kn.isCollection(o))o.addIn(r,n);else if(o===void 0&&this.schema)this.set(i,sl(this.schema,r,n));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${r}`)}}deleteIn(t){let[n,...i]=t;if(i.length===0)return this.delete(n);let r=this.get(n,!0);if(Kn.isCollection(r))return r.deleteIn(i);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}getIn(t,n){let[i,...r]=t,o=this.get(i,!0);return r.length===0?!n&&Kn.isScalar(o)?o.value:o:Kn.isCollection(o)?o.getIn(r,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!Kn.isPair(n))return!1;let i=n.value;return i==null||t&&Kn.isScalar(i)&&i.value==null&&!i.commentBefore&&!i.comment&&!i.tag})}hasIn(t){let[n,...i]=t;if(i.length===0)return this.has(n);let r=this.get(n,!0);return Kn.isCollection(r)?r.hasIn(i):!1}setIn(t,n){let[i,...r]=t;if(r.length===0)this.set(i,n);else{let o=this.get(i,!0);if(Kn.isCollection(o))o.setIn(r,n);else if(o===void 0&&this.schema)this.set(i,sl(this.schema,r,n));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${r}`)}}};Ha.Collection=cl;Ha.collectionFromPath=sl;Ha.isEmptyPath=_m});var Ti=w(Ka=>{"use strict";var hL=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function ll(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var vL=(e,t,n)=>e.endsWith(`
67
+ `)?ll(n,t):n.includes(`
68
68
  `)?`
69
- `+sl(n,t):(e.endsWith(" ")?"":" ")+n;Ja.indentComment=sl;Ja.lineComment=gL;Ja.stringifyComment=mL});var pm=w(Ni=>{"use strict";var yL="flow",cl="block",Ka="quoted";function hL(e,t,n="flow",{indentAtStart:i,lineWidth:r=80,minContentWidth:o=20,onFold:a,onOverflow:s}={}){if(!r||r<0)return e;r<o&&(o=0);let l=Math.max(1+o,1+r-t.length);if(e.length<=l)return e;let c=[],u={},d=r-t.length;typeof i=="number"&&(i>r-Math.max(2,o)?c.push(0):d=r-i);let p,f,S=!1,h=-1,v=-1,E=-1;n===cl&&(h=_m(e,h,t.length),h!==-1&&(d=h+l));for(let F;F=e[h+=1];){if(n===Ka&&F==="\\"){switch(v=h,e[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}E=h}if(F===`
70
- `)n===cl&&(h=_m(e,h,t.length)),d=h+t.length+l,p=void 0;else{if(F===" "&&f&&f!==" "&&f!==`
69
+ `+ll(n,t):(e.endsWith(" ")?"":" ")+n;Ka.indentComment=ll;Ka.lineComment=vL;Ka.stringifyComment=hL});var fm=w(Ni=>{"use strict";var SL="flow",ul="block",Ga="quoted";function bL(e,t,n="flow",{indentAtStart:i,lineWidth:r=80,minContentWidth:o=20,onFold:a,onOverflow:s}={}){if(!r||r<0)return e;r<o&&(o=0);let l=Math.max(1+o,1+r-t.length);if(e.length<=l)return e;let c=[],u={},d=r-t.length;typeof i=="number"&&(i>r-Math.max(2,o)?c.push(0):d=r-i);let p,f,S=!1,h=-1,v=-1,E=-1;n===ul&&(h=pm(e,h,t.length),h!==-1&&(d=h+l));for(let F;F=e[h+=1];){if(n===Ga&&F==="\\"){switch(v=h,e[h+1]){case"x":h+=3;break;case"u":h+=5;break;case"U":h+=9;break;default:h+=1}E=h}if(F===`
70
+ `)n===ul&&(h=pm(e,h,t.length)),d=h+t.length+l,p=void 0;else{if(F===" "&&f&&f!==" "&&f!==`
71
71
  `&&f!==" "){let Z=e[h+1];Z&&Z!==" "&&Z!==`
72
- `&&Z!==" "&&(p=h)}if(h>=d)if(p)c.push(p),d=p+l,p=void 0;else if(n===Ka){for(;f===" "||f===" ";)f=F,F=e[h+=1],S=!0;let Z=h>E+1?h-2:v-1;if(u[Z])return e;c.push(Z),u[Z]=!0,d=Z+l,p=void 0}else S=!0}f=F}if(S&&s&&s(),c.length===0)return e;a&&a();let U=e.slice(0,c[0]);for(let F=0;F<c.length;++F){let Z=c[F],V=c[F+1]||e.length;Z===0?U=`
73
- ${t}${e.slice(0,V)}`:(n===Ka&&u[Z]&&(U+=`${e[Z]}\\`),U+=`
74
- ${t}${e.slice(Z+1,V)}`)}return U}function _m(e,t,n){let i=t,r=t+1,o=e[r];for(;o===" "||o===" ";)if(t<r+n)o=e[++t];else{do o=e[++t];while(o&&o!==`
75
- `);i=t,r=t+1,o=e[r]}return i}Ni.FOLD_BLOCK=cl;Ni.FOLD_FLOW=yL;Ni.FOLD_QUOTED=Ka;Ni.foldFlowLines=hL});var Ri=w(fm=>{"use strict";var Ht=rt(),dr=pm(),Xa=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Ya=e=>/^(%|---|\.\.\.)/m.test(e);function vL(e,t,n){if(!t||t<0)return!1;let i=t-n,r=e.length;if(r<=i)return!1;for(let o=0,a=0;o<r;++o)if(e[o]===`
76
- `){if(o-a>i)return!0;if(a=o+1,r-a<=i)return!1}return!0}function Ii(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:i}=t,r=t.options.doubleQuotedMinMultiLineLength,o=t.indent||(Ya(e)?" ":""),a="",s=0;for(let l=0,c=n[l];c;c=n[++l])if(c===" "&&n[l+1]==="\\"&&n[l+2]==="n"&&(a+=n.slice(s,l)+"\\ ",l+=1,s=l,c="\\"),c==="\\")switch(n[l+1]){case"u":{a+=n.slice(s,l);let u=n.substr(l+2,4);switch(u){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:u.substr(0,2)==="00"?a+="\\x"+u.substr(2):a+=n.substr(l,6)}l+=5,s=l+1}break;case"n":if(i||n[l+2]==='"'||n.length<r)l+=1;else{for(a+=n.slice(s,l)+`
72
+ `&&Z!==" "&&(p=h)}if(h>=d)if(p)c.push(p),d=p+l,p=void 0;else if(n===Ga){for(;f===" "||f===" ";)f=F,F=e[h+=1],S=!0;let Z=h>E+1?h-2:v-1;if(u[Z])return e;c.push(Z),u[Z]=!0,d=Z+l,p=void 0}else S=!0}f=F}if(S&&s&&s(),c.length===0)return e;a&&a();let x=e.slice(0,c[0]);for(let F=0;F<c.length;++F){let Z=c[F],W=c[F+1]||e.length;Z===0?x=`
73
+ ${t}${e.slice(0,W)}`:(n===Ga&&u[Z]&&(x+=`${e[Z]}\\`),x+=`
74
+ ${t}${e.slice(Z+1,W)}`)}return x}function pm(e,t,n){let i=t,r=t+1,o=e[r];for(;o===" "||o===" ";)if(t<r+n)o=e[++t];else{do o=e[++t];while(o&&o!==`
75
+ `);i=t,r=t+1,o=e[r]}return i}Ni.FOLD_BLOCK=ul;Ni.FOLD_FLOW=SL;Ni.FOLD_QUOTED=Ga;Ni.foldFlowLines=bL});var Ri=w(mm=>{"use strict";var Ht=rt(),dr=fm(),Ya=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Qa=e=>/^(%|---|\.\.\.)/m.test(e);function EL(e,t,n){if(!t||t<0)return!1;let i=t-n,r=e.length;if(r<=i)return!1;for(let o=0,a=0;o<r;++o)if(e[o]===`
76
+ `){if(o-a>i)return!0;if(a=o+1,r-a<=i)return!1}return!0}function Ii(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:i}=t,r=t.options.doubleQuotedMinMultiLineLength,o=t.indent||(Qa(e)?" ":""),a="",s=0;for(let l=0,c=n[l];c;c=n[++l])if(c===" "&&n[l+1]==="\\"&&n[l+2]==="n"&&(a+=n.slice(s,l)+"\\ ",l+=1,s=l,c="\\"),c==="\\")switch(n[l+1]){case"u":{a+=n.slice(s,l);let u=n.substr(l+2,4);switch(u){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:u.substr(0,2)==="00"?a+="\\x"+u.substr(2):a+=n.substr(l,6)}l+=5,s=l+1}break;case"n":if(i||n[l+2]==='"'||n.length<r)l+=1;else{for(a+=n.slice(s,l)+`
77
77
 
78
78
  `;n[l+2]==="\\"&&n[l+3]==="n"&&n[l+4]!=='"';)a+=`
79
- `,l+=2;a+=o,n[l+2]===" "&&(a+="\\"),l+=1,s=l+1}break;default:l+=1}return a=s?a+n.slice(s):n,i?a:dr.foldFlowLines(a,o,dr.FOLD_QUOTED,Xa(t,!1))}function ll(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
80
- `)||/[ \t]\n|\n[ \t]/.test(e))return Ii(e,t);let n=t.indent||(Ya(e)?" ":""),i="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
81
- ${n}`)+"'";return t.implicitKey?i:dr.foldFlowLines(i,n,dr.FOLD_FLOW,Xa(t,!1))}function Hr(e,t){let{singleQuote:n}=t.options,i;if(n===!1)i=Ii;else{let r=e.includes('"'),o=e.includes("'");r&&!o?i=ll:o&&!r?i=Ii:i=n?ll:Ii}return i(e,t)}var ul;try{ul=new RegExp(`(^|(?<!
79
+ `,l+=2;a+=o,n[l+2]===" "&&(a+="\\"),l+=1,s=l+1}break;default:l+=1}return a=s?a+n.slice(s):n,i?a:dr.foldFlowLines(a,o,dr.FOLD_QUOTED,Ya(t,!1))}function dl(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
80
+ `)||/[ \t]\n|\n[ \t]/.test(e))return Ii(e,t);let n=t.indent||(Qa(e)?" ":""),i="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
81
+ ${n}`)+"'";return t.implicitKey?i:dr.foldFlowLines(i,n,dr.FOLD_FLOW,Ya(t,!1))}function Hr(e,t){let{singleQuote:n}=t.options,i;if(n===!1)i=Ii;else{let r=e.includes('"'),o=e.includes("'");r&&!o?i=dl:o&&!r?i=Ii:i=n?dl:Ii}return i(e,t)}var _l;try{_l=new RegExp(`(^|(?<!
82
82
  ))
83
83
  +(?!
84
- |$)`,"g")}catch{ul=/\n+(?!\n|$)/g}function Ga({comment:e,type:t,value:n},i,r,o){let{blockQuote:a,commentString:s,lineWidth:l}=i.options;if(!a||/\n[\t ]+$/.test(n))return Hr(n,i);let c=i.indent||(i.forceBlockIndent||Ya(n)?" ":""),u=a==="literal"?!0:a==="folded"||t===Ht.Scalar.BLOCK_FOLDED?!1:t===Ht.Scalar.BLOCK_LITERAL?!0:!vL(n,l,c.length);if(!n)return u?`|
84
+ |$)`,"g")}catch{_l=/\n+(?!\n|$)/g}function Xa({comment:e,type:t,value:n},i,r,o){let{blockQuote:a,commentString:s,lineWidth:l}=i.options;if(!a||/\n[\t ]+$/.test(n))return Hr(n,i);let c=i.indent||(i.forceBlockIndent||Qa(n)?" ":""),u=a==="literal"?!0:a==="folded"||t===Ht.Scalar.BLOCK_FOLDED?!1:t===Ht.Scalar.BLOCK_LITERAL?!0:!EL(n,l,c.length);if(!n)return u?`|
85
85
  `:`>
86
- `;let d,p;for(p=n.length;p>0;--p){let V=n[p-1];if(V!==`
87
- `&&V!==" "&&V!==" ")break}let f=n.substring(p),S=f.indexOf(`
86
+ `;let d,p;for(p=n.length;p>0;--p){let W=n[p-1];if(W!==`
87
+ `&&W!==" "&&W!==" ")break}let f=n.substring(p),S=f.indexOf(`
88
88
  `);S===-1?d="-":n===f||S!==f.length-1?(d="+",o&&o()):d="",f&&(n=n.slice(0,-f.length),f[f.length-1]===`
89
- `&&(f=f.slice(0,-1)),f=f.replace(ul,`$&${c}`));let h=!1,v,E=-1;for(v=0;v<n.length;++v){let V=n[v];if(V===" ")h=!0;else if(V===`
90
- `)E=v;else break}let U=n.substring(0,E<v?E+1:v);U&&(n=n.substring(U.length),U=U.replace(/\n+/g,`$&${c}`));let Z=(h?c?"2":"1":"")+d;if(e&&(Z+=" "+s(e.replace(/ ?[\r\n]+/g," ")),r&&r()),!u){let V=n.replace(/\n+/g,`
91
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),ce=!1,Se=Xa(i,!0);a!=="folded"&&t!==Ht.Scalar.BLOCK_FOLDED&&(Se.onOverflow=()=>{ce=!0});let O=dr.foldFlowLines(`${U}${V}${f}`,c,dr.FOLD_BLOCK,Se);if(!ce)return`>${Z}
89
+ `&&(f=f.slice(0,-1)),f=f.replace(_l,`$&${c}`));let h=!1,v,E=-1;for(v=0;v<n.length;++v){let W=n[v];if(W===" ")h=!0;else if(W===`
90
+ `)E=v;else break}let x=n.substring(0,E<v?E+1:v);x&&(n=n.substring(x.length),x=x.replace(/\n+/g,`$&${c}`));let Z=(h?c?"2":"1":"")+d;if(e&&(Z+=" "+s(e.replace(/ ?[\r\n]+/g," ")),r&&r()),!u){let W=n.replace(/\n+/g,`
91
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`),ue=!1,be=Ya(i,!0);a!=="folded"&&t!==Ht.Scalar.BLOCK_FOLDED&&(be.onOverflow=()=>{ue=!0});let O=dr.foldFlowLines(`${x}${W}${f}`,c,dr.FOLD_BLOCK,be);if(!ue)return`>${Z}
92
92
  ${c}${O}`}return n=n.replace(/\n+/g,`$&${c}`),`|${Z}
93
- ${c}${U}${n}${f}`}function SL(e,t,n,i){let{type:r,value:o}=e,{actualString:a,implicitKey:s,indent:l,indentStep:c,inFlow:u}=t;if(s&&o.includes(`
93
+ ${c}${x}${n}${f}`}function kL(e,t,n,i){let{type:r,value:o}=e,{actualString:a,implicitKey:s,indent:l,indentStep:c,inFlow:u}=t;if(s&&o.includes(`
94
94
  `)||u&&/[[\]{},]/.test(o))return Hr(o,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return s||u||!o.includes(`
95
- `)?Hr(o,t):Ga(e,t,n,i);if(!s&&!u&&r!==Ht.Scalar.PLAIN&&o.includes(`
96
- `))return Ga(e,t,n,i);if(Ya(o)){if(l==="")return t.forceBlockIndent=!0,Ga(e,t,n,i);if(s&&l===c)return Hr(o,t)}let d=o.replace(/\n+/g,`$&
97
- ${l}`);if(a){let p=h=>h.default&&h.tag!=="tag:yaml.org,2002:str"&&h.test?.test(d),{compat:f,tags:S}=t.doc.schema;if(S.some(p)||f?.some(p))return Hr(o,t)}return s?d:dr.foldFlowLines(d,l,dr.FOLD_FLOW,Xa(t,!1))}function bL(e,t,n,i){let{implicitKey:r,inFlow:o}=t,a=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==Ht.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(s=Ht.Scalar.QUOTE_DOUBLE);let l=u=>{switch(u){case Ht.Scalar.BLOCK_FOLDED:case Ht.Scalar.BLOCK_LITERAL:return r||o?Hr(a.value,t):Ga(a,t,n,i);case Ht.Scalar.QUOTE_DOUBLE:return Ii(a.value,t);case Ht.Scalar.QUOTE_SINGLE:return ll(a.value,t);case Ht.Scalar.PLAIN:return SL(a,t,n,i);default:return null}},c=l(s);if(c===null){let{defaultKeyType:u,defaultStringType:d}=t.options,p=r&&u||d;if(c=l(p),c===null)throw new Error(`Unsupported default string type ${p}`)}return c}fm.stringifyString=bL});var $i=w(dl=>{"use strict";var EL=qa(),_r=Re(),kL=Ti(),OL=Ri();function wL(e,t){let n=Object.assign({blockQuote:!0,commentString:kL.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t),i;switch(n.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:i,options:n}}function AL(e,t){if(t.tag){let r=e.filter(o=>o.tag===t.tag);if(r.length>0)return r.find(o=>o.format===t.format)??r[0]}let n,i;if(_r.isScalar(t)){i=t.value;let r=e.filter(o=>o.identify?.(i));if(r.length>1){let o=r.filter(a=>a.test);o.length>0&&(r=o)}n=r.find(o=>o.format===t.format)??r.find(o=>!o.format)}else i=t,n=e.find(r=>r.nodeClass&&i instanceof r.nodeClass);if(!n){let r=i?.constructor?.name??(i===null?"null":typeof i);throw new Error(`Tag not resolved for ${r} value`)}return n}function TL(e,t,{anchors:n,doc:i}){if(!i.directives)return"";let r=[],o=(_r.isScalar(e)||_r.isCollection(e))&&e.anchor;o&&EL.anchorIsValid(o)&&(n.add(o),r.push(`&${o}`));let a=e.tag??(t.default?null:t.tag);return a&&r.push(i.directives.tagString(a)),r.join(" ")}function NL(e,t,n,i){if(_r.isPair(e))return e.toString(t,n,i);if(_r.isAlias(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let r,o=_r.isNode(e)?e:t.doc.createNode(e,{onTagObj:l=>r=l});r??(r=AL(t.doc.schema.tags,o));let a=TL(o,r,t);a.length>0&&(t.indentAtStart=(t.indentAtStart??0)+a.length+1);let s=typeof r.stringify=="function"?r.stringify(o,t,n,i):_r.isScalar(o)?OL.stringifyString(o,t,n,i):o.toString(t,n,i);return a?_r.isScalar(o)||s[0]==="{"||s[0]==="["?`${a} ${s}`:`${a}
98
- ${t.indent}${s}`:s}dl.createStringifyContext=wL;dl.stringify=NL});var hm=w(ym=>{"use strict";var nr=Re(),mm=rt(),gm=$i(),Ci=Ti();function IL({key:e,value:t},n,i,r){let{allNullValues:o,doc:a,indent:s,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:d}}=n,p=nr.isNode(e)&&e.comment||null;if(d){if(p)throw new Error("With simple keys, key nodes cannot have comments");if(nr.isCollection(e)||!nr.isNode(e)&&typeof e=="object"){let Se="With simple keys, collection cannot be used as a key value";throw new Error(Se)}}let f=!d&&(!e||p&&t==null&&!n.inFlow||nr.isCollection(e)||(nr.isScalar(e)?e.type===mm.Scalar.BLOCK_FOLDED||e.type===mm.Scalar.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!f&&(d||!o),indent:s+l});let S=!1,h=!1,v=gm.stringify(e,n,()=>S=!0,()=>h=!0);if(!f&&!n.inFlow&&v.length>1024){if(d)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(n.inFlow){if(o||t==null)return S&&i&&i(),v===""?"?":f?`? ${v}`:v}else if(o&&!d||t==null&&f)return v=`? ${v}`,p&&!S?v+=Ci.lineComment(v,n.indent,c(p)):h&&r&&r(),v;S&&(p=null),f?(p&&(v+=Ci.lineComment(v,n.indent,c(p))),v=`? ${v}
99
- ${s}:`):(v=`${v}:`,p&&(v+=Ci.lineComment(v,n.indent,c(p))));let E,U,F;nr.isNode(t)?(E=!!t.spaceBefore,U=t.commentBefore,F=t.comment):(E=!1,U=null,F=null,t&&typeof t=="object"&&(t=a.createNode(t))),n.implicitKey=!1,!f&&!p&&nr.isScalar(t)&&(n.indentAtStart=v.length+1),h=!1,!u&&l.length>=2&&!n.inFlow&&!f&&nr.isSeq(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let Z=!1,V=gm.stringify(t,n,()=>Z=!0,()=>h=!0),ce=" ";if(p||E||U){if(ce=E?`
100
- `:"",U){let Se=c(U);ce+=`
101
- ${Ci.indentComment(Se,n.indent)}`}V===""&&!n.inFlow?ce===`
102
- `&&F&&(ce=`
95
+ `)?Hr(o,t):Xa(e,t,n,i);if(!s&&!u&&r!==Ht.Scalar.PLAIN&&o.includes(`
96
+ `))return Xa(e,t,n,i);if(Qa(o)){if(l==="")return t.forceBlockIndent=!0,Xa(e,t,n,i);if(s&&l===c)return Hr(o,t)}let d=o.replace(/\n+/g,`$&
97
+ ${l}`);if(a){let p=h=>h.default&&h.tag!=="tag:yaml.org,2002:str"&&h.test?.test(d),{compat:f,tags:S}=t.doc.schema;if(S.some(p)||f?.some(p))return Hr(o,t)}return s?d:dr.foldFlowLines(d,l,dr.FOLD_FLOW,Ya(t,!1))}function OL(e,t,n,i){let{implicitKey:r,inFlow:o}=t,a=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==Ht.Scalar.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(s=Ht.Scalar.QUOTE_DOUBLE);let l=u=>{switch(u){case Ht.Scalar.BLOCK_FOLDED:case Ht.Scalar.BLOCK_LITERAL:return r||o?Hr(a.value,t):Xa(a,t,n,i);case Ht.Scalar.QUOTE_DOUBLE:return Ii(a.value,t);case Ht.Scalar.QUOTE_SINGLE:return dl(a.value,t);case Ht.Scalar.PLAIN:return kL(a,t,n,i);default:return null}},c=l(s);if(c===null){let{defaultKeyType:u,defaultStringType:d}=t.options,p=r&&u||d;if(c=l(p),c===null)throw new Error(`Unsupported default string type ${p}`)}return c}mm.stringifyString=OL});var $i=w(pl=>{"use strict";var wL=Va(),_r=Re(),AL=Ti(),TL=Ri();function NL(e,t){let n=Object.assign({blockQuote:!0,commentString:AL.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t),i;switch(n.collectionStyle){case"block":i=!1;break;case"flow":i=!0;break;default:i=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:i,options:n}}function IL(e,t){if(t.tag){let r=e.filter(o=>o.tag===t.tag);if(r.length>0)return r.find(o=>o.format===t.format)??r[0]}let n,i;if(_r.isScalar(t)){i=t.value;let r=e.filter(o=>o.identify?.(i));if(r.length>1){let o=r.filter(a=>a.test);o.length>0&&(r=o)}n=r.find(o=>o.format===t.format)??r.find(o=>!o.format)}else i=t,n=e.find(r=>r.nodeClass&&i instanceof r.nodeClass);if(!n){let r=i?.constructor?.name??(i===null?"null":typeof i);throw new Error(`Tag not resolved for ${r} value`)}return n}function RL(e,t,{anchors:n,doc:i}){if(!i.directives)return"";let r=[],o=(_r.isScalar(e)||_r.isCollection(e))&&e.anchor;o&&wL.anchorIsValid(o)&&(n.add(o),r.push(`&${o}`));let a=e.tag??(t.default?null:t.tag);return a&&r.push(i.directives.tagString(a)),r.join(" ")}function $L(e,t,n,i){if(_r.isPair(e))return e.toString(t,n,i);if(_r.isAlias(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let r,o=_r.isNode(e)?e:t.doc.createNode(e,{onTagObj:l=>r=l});r??(r=IL(t.doc.schema.tags,o));let a=RL(o,r,t);a.length>0&&(t.indentAtStart=(t.indentAtStart??0)+a.length+1);let s=typeof r.stringify=="function"?r.stringify(o,t,n,i):_r.isScalar(o)?TL.stringifyString(o,t,n,i):o.toString(t,n,i);return a?_r.isScalar(o)||s[0]==="{"||s[0]==="["?`${a} ${s}`:`${a}
98
+ ${t.indent}${s}`:s}pl.createStringifyContext=NL;pl.stringify=$L});var vm=w(hm=>{"use strict";var nr=Re(),gm=rt(),ym=$i(),Ci=Ti();function CL({key:e,value:t},n,i,r){let{allNullValues:o,doc:a,indent:s,indentStep:l,options:{commentString:c,indentSeq:u,simpleKeys:d}}=n,p=nr.isNode(e)&&e.comment||null;if(d){if(p)throw new Error("With simple keys, key nodes cannot have comments");if(nr.isCollection(e)||!nr.isNode(e)&&typeof e=="object"){let be="With simple keys, collection cannot be used as a key value";throw new Error(be)}}let f=!d&&(!e||p&&t==null&&!n.inFlow||nr.isCollection(e)||(nr.isScalar(e)?e.type===gm.Scalar.BLOCK_FOLDED||e.type===gm.Scalar.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!f&&(d||!o),indent:s+l});let S=!1,h=!1,v=ym.stringify(e,n,()=>S=!0,()=>h=!0);if(!f&&!n.inFlow&&v.length>1024){if(d)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");f=!0}if(n.inFlow){if(o||t==null)return S&&i&&i(),v===""?"?":f?`? ${v}`:v}else if(o&&!d||t==null&&f)return v=`? ${v}`,p&&!S?v+=Ci.lineComment(v,n.indent,c(p)):h&&r&&r(),v;S&&(p=null),f?(p&&(v+=Ci.lineComment(v,n.indent,c(p))),v=`? ${v}
99
+ ${s}:`):(v=`${v}:`,p&&(v+=Ci.lineComment(v,n.indent,c(p))));let E,x,F;nr.isNode(t)?(E=!!t.spaceBefore,x=t.commentBefore,F=t.comment):(E=!1,x=null,F=null,t&&typeof t=="object"&&(t=a.createNode(t))),n.implicitKey=!1,!f&&!p&&nr.isScalar(t)&&(n.indentAtStart=v.length+1),h=!1,!u&&l.length>=2&&!n.inFlow&&!f&&nr.isSeq(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let Z=!1,W=ym.stringify(t,n,()=>Z=!0,()=>h=!0),ue=" ";if(p||E||x){if(ue=E?`
100
+ `:"",x){let be=c(x);ue+=`
101
+ ${Ci.indentComment(be,n.indent)}`}W===""&&!n.inFlow?ue===`
102
+ `&&F&&(ue=`
103
103
 
104
- `):ce+=`
105
- ${n.indent}`}else if(!f&&nr.isCollection(t)){let Se=V[0],O=V.indexOf(`
106
- `),D=O!==-1,M=n.inFlow??t.flow??t.items.length===0;if(D||!M){let C=!1;if(D&&(Se==="&"||Se==="!")){let z=V.indexOf(" ");Se==="&"&&z!==-1&&z<O&&V[z+1]==="!"&&(z=V.indexOf(" ",z+1)),(z===-1||O<z)&&(C=!0)}C||(ce=`
107
- ${n.indent}`)}}else(V===""||V[0]===`
108
- `)&&(ce="");return v+=ce+V,n.inFlow?Z&&i&&i():F&&!Z?v+=Ci.lineComment(v,n.indent,c(F)):h&&r&&r(),v}ym.stringifyPair=IL});var pl=w(_l=>{"use strict";var vm=require("process");function RL(e,...t){e==="debug"&&console.log(...t)}function $L(e,t){(e==="debug"||e==="warn")&&(typeof vm.emitWarning=="function"?vm.emitWarning(t):console.warn(t))}_l.debug=RL;_l.warn=$L});var rs=w(ns=>{"use strict";var ts=Re(),Sm=rt(),Qa="<<",es={identify:e=>e===Qa||typeof e=="symbol"&&e.description===Qa,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Sm.Scalar(Symbol(Qa)),{addToJSMap:bm}),stringify:()=>Qa},CL=(e,t)=>(es.identify(t)||ts.isScalar(t)&&(!t.type||t.type===Sm.Scalar.PLAIN)&&es.identify(t.value))&&e?.doc.schema.tags.some(n=>n.tag===es.tag&&n.default);function bm(e,t,n){let i=Em(e,n);if(ts.isSeq(i))for(let r of i.items)fl(e,t,r);else if(Array.isArray(i))for(let r of i)fl(e,t,r);else fl(e,t,i)}function fl(e,t,n){let i=Em(e,n);if(!ts.isMap(i))throw new Error("Merge sources must be maps or map aliases");let r=i.toJSON(null,e,Map);for(let[o,a]of r)t instanceof Map?t.has(o)||t.set(o,a):t instanceof Set?t.add(o):Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{value:a,writable:!0,enumerable:!0,configurable:!0});return t}function Em(e,t){return e&&ts.isAlias(t)?t.resolve(e.doc,e):t}ns.addMergeToJSMap=bm;ns.isMergeKey=CL;ns.merge=es});var gl=w(wm=>{"use strict";var LL=pl(),km=rs(),ML=$i(),Om=Re(),ml=lr();function UL(e,t,{key:n,value:i}){if(Om.isNode(n)&&n.addToJSMap)n.addToJSMap(e,t,i);else if(km.isMergeKey(e,n))km.addMergeToJSMap(e,t,i);else{let r=ml.toJS(n,"",e);if(t instanceof Map)t.set(r,ml.toJS(i,r,e));else if(t instanceof Set)t.add(r);else{let o=xL(n,r,e),a=ml.toJS(i,o,e);o in t?Object.defineProperty(t,o,{value:a,writable:!0,enumerable:!0,configurable:!0}):t[o]=a}}return t}function xL(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(Om.isNode(e)&&n?.doc){let i=ML.createStringifyContext(n.doc,{});i.anchors=new Set;for(let o of n.anchors.keys())i.anchors.add(o.anchor);i.inFlow=!0,i.inStringifyKey=!0;let r=e.toString(i);if(!n.mapKeyWarned){let o=JSON.stringify(r);o.length>40&&(o=o.substring(0,36)+'..."'),LL.warn(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}wm.addPairToJSMap=UL});var pr=w(yl=>{"use strict";var Am=Ai(),PL=hm(),DL=gl(),is=Re();function jL(e,t,n){let i=Am.createNode(e,void 0,n),r=Am.createNode(t,void 0,n);return new os(i,r)}var os=class e{constructor(t,n=null){Object.defineProperty(this,is.NODE_TYPE,{value:is.PAIR}),this.key=t,this.value=n}clone(t){let{key:n,value:i}=this;return is.isNode(n)&&(n=n.clone(t)),is.isNode(i)&&(i=i.clone(t)),new e(n,i)}toJSON(t,n){let i=n?.mapAsMap?new Map:{};return DL.addPairToJSMap(n,i,this)}toString(t,n,i){return t?.doc?PL.stringifyPair(this,t,n,i):JSON.stringify(this)}};yl.Pair=os;yl.createPair=jL});var hl=w(Nm=>{"use strict";var Er=Re(),Tm=$i(),as=Ti();function zL(e,t,n){return(t.inFlow??e.flow?ZL:FL)(e,t,n)}function FL({comment:e,items:t},n,{blockItemPrefix:i,flowChars:r,itemIndent:o,onChompKeep:a,onComment:s}){let{indent:l,options:{commentString:c}}=n,u=Object.assign({},n,{indent:o,type:null}),d=!1,p=[];for(let S=0;S<t.length;++S){let h=t[S],v=null;if(Er.isNode(h))!d&&h.spaceBefore&&p.push(""),ss(n,p,h.commentBefore,d),h.comment&&(v=h.comment);else if(Er.isPair(h)){let U=Er.isNode(h.key)?h.key:null;U&&(!d&&U.spaceBefore&&p.push(""),ss(n,p,U.commentBefore,d))}d=!1;let E=Tm.stringify(h,u,()=>v=null,()=>d=!0);v&&(E+=as.lineComment(E,o,c(v))),d&&v&&(d=!1),p.push(i+E)}let f;if(p.length===0)f=r.start+r.end;else{f=p[0];for(let S=1;S<p.length;++S){let h=p[S];f+=h?`
104
+ `):ue+=`
105
+ ${n.indent}`}else if(!f&&nr.isCollection(t)){let be=W[0],O=W.indexOf(`
106
+ `),U=O!==-1,M=n.inFlow??t.flow??t.items.length===0;if(U||!M){let C=!1;if(U&&(be==="&"||be==="!")){let z=W.indexOf(" ");be==="&"&&z!==-1&&z<O&&W[z+1]==="!"&&(z=W.indexOf(" ",z+1)),(z===-1||O<z)&&(C=!0)}C||(ue=`
107
+ ${n.indent}`)}}else(W===""||W[0]===`
108
+ `)&&(ue="");return v+=ue+W,n.inFlow?Z&&i&&i():F&&!Z?v+=Ci.lineComment(v,n.indent,c(F)):h&&r&&r(),v}hm.stringifyPair=CL});var ml=w(fl=>{"use strict";var Sm=require("process");function LL(e,...t){e==="debug"&&console.log(...t)}function ML(e,t){(e==="debug"||e==="warn")&&(typeof Sm.emitWarning=="function"?Sm.emitWarning(t):console.warn(t))}fl.debug=LL;fl.warn=ML});var is=w(rs=>{"use strict";var ns=Re(),bm=rt(),es="<<",ts={identify:e=>e===es||typeof e=="symbol"&&e.description===es,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new bm.Scalar(Symbol(es)),{addToJSMap:Em}),stringify:()=>es},UL=(e,t)=>(ts.identify(t)||ns.isScalar(t)&&(!t.type||t.type===bm.Scalar.PLAIN)&&ts.identify(t.value))&&e?.doc.schema.tags.some(n=>n.tag===ts.tag&&n.default);function Em(e,t,n){let i=km(e,n);if(ns.isSeq(i))for(let r of i.items)gl(e,t,r);else if(Array.isArray(i))for(let r of i)gl(e,t,r);else gl(e,t,i)}function gl(e,t,n){let i=km(e,n);if(!ns.isMap(i))throw new Error("Merge sources must be maps or map aliases");let r=i.toJSON(null,e,Map);for(let[o,a]of r)t instanceof Map?t.has(o)||t.set(o,a):t instanceof Set?t.add(o):Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{value:a,writable:!0,enumerable:!0,configurable:!0});return t}function km(e,t){return e&&ns.isAlias(t)?t.resolve(e.doc,e):t}rs.addMergeToJSMap=Em;rs.isMergeKey=UL;rs.merge=ts});var hl=w(Am=>{"use strict";var xL=ml(),Om=is(),DL=$i(),wm=Re(),yl=lr();function PL(e,t,{key:n,value:i}){if(wm.isNode(n)&&n.addToJSMap)n.addToJSMap(e,t,i);else if(Om.isMergeKey(e,n))Om.addMergeToJSMap(e,t,i);else{let r=yl.toJS(n,"",e);if(t instanceof Map)t.set(r,yl.toJS(i,r,e));else if(t instanceof Set)t.add(r);else{let o=jL(n,r,e),a=yl.toJS(i,o,e);o in t?Object.defineProperty(t,o,{value:a,writable:!0,enumerable:!0,configurable:!0}):t[o]=a}}return t}function jL(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(wm.isNode(e)&&n?.doc){let i=DL.createStringifyContext(n.doc,{});i.anchors=new Set;for(let o of n.anchors.keys())i.anchors.add(o.anchor);i.inFlow=!0,i.inStringifyKey=!0;let r=e.toString(i);if(!n.mapKeyWarned){let o=JSON.stringify(r);o.length>40&&(o=o.substring(0,36)+'..."'),xL.warn(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}Am.addPairToJSMap=PL});var pr=w(vl=>{"use strict";var Tm=Ai(),zL=vm(),FL=hl(),os=Re();function ZL(e,t,n){let i=Tm.createNode(e,void 0,n),r=Tm.createNode(t,void 0,n);return new as(i,r)}var as=class e{constructor(t,n=null){Object.defineProperty(this,os.NODE_TYPE,{value:os.PAIR}),this.key=t,this.value=n}clone(t){let{key:n,value:i}=this;return os.isNode(n)&&(n=n.clone(t)),os.isNode(i)&&(i=i.clone(t)),new e(n,i)}toJSON(t,n){let i=n?.mapAsMap?new Map:{};return FL.addPairToJSMap(n,i,this)}toString(t,n,i){return t?.doc?zL.stringifyPair(this,t,n,i):JSON.stringify(this)}};vl.Pair=as;vl.createPair=ZL});var Sl=w(Im=>{"use strict";var kr=Re(),Nm=$i(),ss=Ti();function qL(e,t,n){return(t.inFlow??e.flow?WL:VL)(e,t,n)}function VL({comment:e,items:t},n,{blockItemPrefix:i,flowChars:r,itemIndent:o,onChompKeep:a,onComment:s}){let{indent:l,options:{commentString:c}}=n,u=Object.assign({},n,{indent:o,type:null}),d=!1,p=[];for(let S=0;S<t.length;++S){let h=t[S],v=null;if(kr.isNode(h))!d&&h.spaceBefore&&p.push(""),cs(n,p,h.commentBefore,d),h.comment&&(v=h.comment);else if(kr.isPair(h)){let x=kr.isNode(h.key)?h.key:null;x&&(!d&&x.spaceBefore&&p.push(""),cs(n,p,x.commentBefore,d))}d=!1;let E=Nm.stringify(h,u,()=>v=null,()=>d=!0);v&&(E+=ss.lineComment(E,o,c(v))),d&&v&&(d=!1),p.push(i+E)}let f;if(p.length===0)f=r.start+r.end;else{f=p[0];for(let S=1;S<p.length;++S){let h=p[S];f+=h?`
109
109
  ${l}${h}`:`
110
110
  `}}return e?(f+=`
111
- `+as.indentComment(c(e),l),s&&s()):d&&a&&a(),f}function ZL({items:e},t,{flowChars:n,itemIndent:i}){let{indent:r,indentStep:o,flowCollectionPadding:a,options:{commentString:s}}=t;i+=o;let l=Object.assign({},t,{indent:i,inFlow:!0,type:null}),c=!1,u=0,d=[];for(let S=0;S<e.length;++S){let h=e[S],v=null;if(Er.isNode(h))h.spaceBefore&&d.push(""),ss(t,d,h.commentBefore,!1),h.comment&&(v=h.comment);else if(Er.isPair(h)){let U=Er.isNode(h.key)?h.key:null;U&&(U.spaceBefore&&d.push(""),ss(t,d,U.commentBefore,!1),U.comment&&(c=!0));let F=Er.isNode(h.value)?h.value:null;F?(F.comment&&(v=F.comment),F.commentBefore&&(c=!0)):h.value==null&&U?.comment&&(v=U.comment)}v&&(c=!0);let E=Tm.stringify(h,l,()=>v=null);c||(c=d.length>u||E.includes(`
112
- `)),S<e.length-1?E+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(c||(c=d.reduce((U,F)=>U+F.length+2,2)+(E.length+2)>t.options.lineWidth)),c&&(E+=",")),v&&(E+=as.lineComment(E,i,s(v))),d.push(E),u=d.length}let{start:p,end:f}=n;if(d.length===0)return p+f;if(!c){let S=d.reduce((h,v)=>h+v.length+2,2);c=t.options.lineWidth>0&&S>t.options.lineWidth}if(c){let S=p;for(let h of d)S+=h?`
111
+ `+ss.indentComment(c(e),l),s&&s()):d&&a&&a(),f}function WL({items:e},t,{flowChars:n,itemIndent:i}){let{indent:r,indentStep:o,flowCollectionPadding:a,options:{commentString:s}}=t;i+=o;let l=Object.assign({},t,{indent:i,inFlow:!0,type:null}),c=!1,u=0,d=[];for(let S=0;S<e.length;++S){let h=e[S],v=null;if(kr.isNode(h))h.spaceBefore&&d.push(""),cs(t,d,h.commentBefore,!1),h.comment&&(v=h.comment);else if(kr.isPair(h)){let x=kr.isNode(h.key)?h.key:null;x&&(x.spaceBefore&&d.push(""),cs(t,d,x.commentBefore,!1),x.comment&&(c=!0));let F=kr.isNode(h.value)?h.value:null;F?(F.comment&&(v=F.comment),F.commentBefore&&(c=!0)):h.value==null&&x?.comment&&(v=x.comment)}v&&(c=!0);let E=Nm.stringify(h,l,()=>v=null);c||(c=d.length>u||E.includes(`
112
+ `)),S<e.length-1?E+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(c||(c=d.reduce((x,F)=>x+F.length+2,2)+(E.length+2)>t.options.lineWidth)),c&&(E+=",")),v&&(E+=ss.lineComment(E,i,s(v))),d.push(E),u=d.length}let{start:p,end:f}=n;if(d.length===0)return p+f;if(!c){let S=d.reduce((h,v)=>h+v.length+2,2);c=t.options.lineWidth>0&&S>t.options.lineWidth}if(c){let S=p;for(let h of d)S+=h?`
113
113
  ${o}${r}${h}`:`
114
114
  `;return`${S}
115
- ${r}${f}`}else return`${p}${a}${d.join(" ")}${a}${f}`}function ss({indent:e,options:{commentString:t}},n,i,r){if(i&&r&&(i=i.replace(/^\n+/,"")),i){let o=as.indentComment(t(i),e);n.push(o.trimStart())}}Nm.stringifyCollection=zL});var mr=w(Sl=>{"use strict";var qL=hl(),VL=gl(),WL=Ha(),fr=Re(),cs=pr(),BL=rt();function Li(e,t){let n=fr.isScalar(t)?t.value:t;for(let i of e)if(fr.isPair(i)&&(i.key===t||i.key===n||fr.isScalar(i.key)&&i.key.value===n))return i}var vl=class extends WL.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(fr.MAP,t),this.items=[]}static from(t,n,i){let{keepUndefined:r,replacer:o}=i,a=new this(t),s=(l,c)=>{if(typeof o=="function")c=o.call(n,l,c);else if(Array.isArray(o)&&!o.includes(l))return;(c!==void 0||r)&&a.items.push(cs.createPair(l,c,i))};if(n instanceof Map)for(let[l,c]of n)s(l,c);else if(n&&typeof n=="object")for(let l of Object.keys(n))s(l,n[l]);return typeof t.sortMapEntries=="function"&&a.items.sort(t.sortMapEntries),a}add(t,n){let i;fr.isPair(t)?i=t:!t||typeof t!="object"||!("key"in t)?i=new cs.Pair(t,t?.value):i=new cs.Pair(t.key,t.value);let r=Li(this.items,i.key),o=this.schema?.sortMapEntries;if(r){if(!n)throw new Error(`Key ${i.key} already set`);fr.isScalar(r.value)&&BL.isScalarValue(i.value)?r.value.value=i.value:r.value=i.value}else if(o){let a=this.items.findIndex(s=>o(i,s)<0);a===-1?this.items.push(i):this.items.splice(a,0,i)}else this.items.push(i)}delete(t){let n=Li(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){let r=Li(this.items,t)?.value;return(!n&&fr.isScalar(r)?r.value:r)??void 0}has(t){return!!Li(this.items,t)}set(t,n){this.add(new cs.Pair(t,n),!0)}toJSON(t,n,i){let r=i?new i:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(r);for(let o of this.items)VL.addPairToJSMap(n,r,o);return r}toString(t,n,i){if(!t)return JSON.stringify(this);for(let r of this.items)if(!fr.isPair(r))throw new Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),qL.stringifyCollection(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:i,onComment:n})}};Sl.YAMLMap=vl;Sl.findPair=Li});var Jr=w(Rm=>{"use strict";var HL=Re(),Im=mr(),JL={collection:"map",default:!0,nodeClass:Im.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(e,t){return HL.isMap(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>Im.YAMLMap.from(e,t,n)};Rm.map=JL});var gr=w($m=>{"use strict";var KL=Ai(),GL=hl(),XL=Ha(),us=Re(),YL=rt(),QL=lr(),bl=class extends XL.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(us.SEQ,t),this.items=[]}add(t){this.items.push(t)}delete(t){let n=ls(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){let i=ls(t);if(typeof i!="number")return;let r=this.items[i];return!n&&us.isScalar(r)?r.value:r}has(t){let n=ls(t);return typeof n=="number"&&n<this.items.length}set(t,n){let i=ls(t);if(typeof i!="number")throw new Error(`Expected a valid index, not ${t}.`);let r=this.items[i];us.isScalar(r)&&YL.isScalarValue(n)?r.value=n:this.items[i]=n}toJSON(t,n){let i=[];n?.onCreate&&n.onCreate(i);let r=0;for(let o of this.items)i.push(QL.toJS(o,String(r++),n));return i}toString(t,n,i){return t?GL.stringifyCollection(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:i,onComment:n}):JSON.stringify(this)}static from(t,n,i){let{replacer:r}=i,o=new this(t);if(n&&Symbol.iterator in Object(n)){let a=0;for(let s of n){if(typeof r=="function"){let l=n instanceof Set?s:String(a++);s=r.call(n,l,s)}o.items.push(KL.createNode(s,void 0,i))}}return o}};function ls(e){let t=us.isScalar(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}$m.YAMLSeq=bl});var Kr=w(Lm=>{"use strict";var eM=Re(),Cm=gr(),tM={collection:"seq",default:!0,nodeClass:Cm.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(e,t){return eM.isSeq(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>Cm.YAMLSeq.from(e,t,n)};Lm.seq=tM});var Mi=w(Mm=>{"use strict";var nM=Ri(),rM={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,i){return t=Object.assign({actualString:!0},t),nM.stringifyString(e,t,n,i)}};Mm.string=rM});var ds=w(Pm=>{"use strict";var Um=rt(),xm={identify:e=>e==null,createNode:()=>new Um.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Um.Scalar(null),stringify:({source:e},t)=>typeof e=="string"&&xm.test.test(e)?e:t.options.nullStr};Pm.nullTag=xm});var El=w(jm=>{"use strict";var iM=rt(),Dm={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new iM.Scalar(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&Dm.test.test(e)){let i=e[0]==="t"||e[0]==="T";if(t===i)return e}return t?n.options.trueStr:n.options.falseStr}};jm.boolTag=Dm});var Gr=w(zm=>{"use strict";function oM({format:e,minFractionDigits:t,tag:n,value:i}){if(typeof i=="bigint")return String(i);let r=typeof i=="number"?i:Number(i);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let o=Object.is(i,-0)?"-0":JSON.stringify(i);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^-?\d/.test(o)&&!o.includes("e")){let a=o.indexOf(".");a<0&&(a=o.length,o+=".");let s=t-(o.length-a-1);for(;s-- >0;)o+="0"}return o}zm.stringifyNumber=oM});var Ol=w(_s=>{"use strict";var aM=rt(),kl=Gr(),sM={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:kl.stringifyNumber},cM={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():kl.stringifyNumber(e)}},lM={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new aM.Scalar(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:kl.stringifyNumber};_s.float=lM;_s.floatExp=cM;_s.floatNaN=sM});var Al=w(fs=>{"use strict";var Fm=Gr(),ps=e=>typeof e=="bigint"||Number.isInteger(e),wl=(e,t,n,{intAsBigInt:i})=>i?BigInt(e):parseInt(e.substring(t),n);function Zm(e,t,n){let{value:i}=e;return ps(i)&&i>=0?n+i.toString(t):Fm.stringifyNumber(e)}var uM={identify:e=>ps(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>wl(e,2,8,n),stringify:e=>Zm(e,8,"0o")},dM={identify:ps,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>wl(e,0,10,n),stringify:Fm.stringifyNumber},_M={identify:e=>ps(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>wl(e,2,16,n),stringify:e=>Zm(e,16,"0x")};fs.int=dM;fs.intHex=_M;fs.intOct=uM});var Vm=w(qm=>{"use strict";var pM=Jr(),fM=ds(),mM=Kr(),gM=Mi(),yM=El(),Tl=Ol(),Nl=Al(),hM=[pM.map,mM.seq,gM.string,fM.nullTag,yM.boolTag,Nl.intOct,Nl.int,Nl.intHex,Tl.floatNaN,Tl.floatExp,Tl.float];qm.schema=hM});var Hm=w(Bm=>{"use strict";var vM=rt(),SM=Jr(),bM=Kr();function Wm(e){return typeof e=="bigint"||Number.isInteger(e)}var ms=({value:e})=>JSON.stringify(e),EM=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:ms},{identify:e=>e==null,createNode:()=>new vM.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:ms},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:ms},{identify:Wm,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>Wm(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:ms}],kM={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},OM=[SM.map,bM.seq].concat(EM,kM);Bm.schema=OM});var Rl=w(Jm=>{"use strict";var Ui=require("buffer"),Il=rt(),wM=Ri(),AM={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof Ui.Buffer=="function")return Ui.Buffer.from(e,"base64");if(typeof atob=="function"){let n=atob(e.replace(/[\n\r]/g,"")),i=new Uint8Array(n.length);for(let r=0;r<n.length;++r)i[r]=n.charCodeAt(r);return i}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:n},i,r,o){if(!n)return"";let a=n,s;if(typeof Ui.Buffer=="function")s=a instanceof Ui.Buffer?a.toString("base64"):Ui.Buffer.from(a.buffer).toString("base64");else if(typeof btoa=="function"){let l="";for(let c=0;c<a.length;++c)l+=String.fromCharCode(a[c]);s=btoa(l)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=Il.Scalar.BLOCK_LITERAL),t!==Il.Scalar.QUOTE_DOUBLE){let l=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),c=Math.ceil(s.length/l),u=new Array(c);for(let d=0,p=0;d<c;++d,p+=l)u[d]=s.substr(p,l);s=u.join(t===Il.Scalar.BLOCK_LITERAL?`
116
- `:" ")}return wM.stringifyString({comment:e,type:t,value:s},i,r,o)}};Jm.binary=AM});var hs=w(ys=>{"use strict";var gs=Re(),$l=pr(),TM=rt(),NM=gr();function Km(e,t){if(gs.isSeq(e))for(let n=0;n<e.items.length;++n){let i=e.items[n];if(!gs.isPair(i)){if(gs.isMap(i)){i.items.length>1&&t("Each pair must have its own sequence indicator");let r=i.items[0]||new $l.Pair(new TM.Scalar(null));if(i.commentBefore&&(r.key.commentBefore=r.key.commentBefore?`${i.commentBefore}
115
+ ${r}${f}`}else return`${p}${a}${d.join(" ")}${a}${f}`}function cs({indent:e,options:{commentString:t}},n,i,r){if(i&&r&&(i=i.replace(/^\n+/,"")),i){let o=ss.indentComment(t(i),e);n.push(o.trimStart())}}Im.stringifyCollection=qL});var mr=w(El=>{"use strict";var BL=Sl(),HL=hl(),JL=Ja(),fr=Re(),ls=pr(),KL=rt();function Li(e,t){let n=fr.isScalar(t)?t.value:t;for(let i of e)if(fr.isPair(i)&&(i.key===t||i.key===n||fr.isScalar(i.key)&&i.key.value===n))return i}var bl=class extends JL.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(fr.MAP,t),this.items=[]}static from(t,n,i){let{keepUndefined:r,replacer:o}=i,a=new this(t),s=(l,c)=>{if(typeof o=="function")c=o.call(n,l,c);else if(Array.isArray(o)&&!o.includes(l))return;(c!==void 0||r)&&a.items.push(ls.createPair(l,c,i))};if(n instanceof Map)for(let[l,c]of n)s(l,c);else if(n&&typeof n=="object")for(let l of Object.keys(n))s(l,n[l]);return typeof t.sortMapEntries=="function"&&a.items.sort(t.sortMapEntries),a}add(t,n){let i;fr.isPair(t)?i=t:!t||typeof t!="object"||!("key"in t)?i=new ls.Pair(t,t?.value):i=new ls.Pair(t.key,t.value);let r=Li(this.items,i.key),o=this.schema?.sortMapEntries;if(r){if(!n)throw new Error(`Key ${i.key} already set`);fr.isScalar(r.value)&&KL.isScalarValue(i.value)?r.value.value=i.value:r.value=i.value}else if(o){let a=this.items.findIndex(s=>o(i,s)<0);a===-1?this.items.push(i):this.items.splice(a,0,i)}else this.items.push(i)}delete(t){let n=Li(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){let r=Li(this.items,t)?.value;return(!n&&fr.isScalar(r)?r.value:r)??void 0}has(t){return!!Li(this.items,t)}set(t,n){this.add(new ls.Pair(t,n),!0)}toJSON(t,n,i){let r=i?new i:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(r);for(let o of this.items)HL.addPairToJSMap(n,r,o);return r}toString(t,n,i){if(!t)return JSON.stringify(this);for(let r of this.items)if(!fr.isPair(r))throw new Error(`Map items must all be pairs; found ${JSON.stringify(r)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),BL.stringifyCollection(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:i,onComment:n})}};El.YAMLMap=bl;El.findPair=Li});var Jr=w($m=>{"use strict";var GL=Re(),Rm=mr(),XL={collection:"map",default:!0,nodeClass:Rm.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(e,t){return GL.isMap(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>Rm.YAMLMap.from(e,t,n)};$m.map=XL});var gr=w(Cm=>{"use strict";var YL=Ai(),QL=Sl(),eM=Ja(),ds=Re(),tM=rt(),nM=lr(),kl=class extends eM.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(ds.SEQ,t),this.items=[]}add(t){this.items.push(t)}delete(t){let n=us(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){let i=us(t);if(typeof i!="number")return;let r=this.items[i];return!n&&ds.isScalar(r)?r.value:r}has(t){let n=us(t);return typeof n=="number"&&n<this.items.length}set(t,n){let i=us(t);if(typeof i!="number")throw new Error(`Expected a valid index, not ${t}.`);let r=this.items[i];ds.isScalar(r)&&tM.isScalarValue(n)?r.value=n:this.items[i]=n}toJSON(t,n){let i=[];n?.onCreate&&n.onCreate(i);let r=0;for(let o of this.items)i.push(nM.toJS(o,String(r++),n));return i}toString(t,n,i){return t?QL.stringifyCollection(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:i,onComment:n}):JSON.stringify(this)}static from(t,n,i){let{replacer:r}=i,o=new this(t);if(n&&Symbol.iterator in Object(n)){let a=0;for(let s of n){if(typeof r=="function"){let l=n instanceof Set?s:String(a++);s=r.call(n,l,s)}o.items.push(YL.createNode(s,void 0,i))}}return o}};function us(e){let t=ds.isScalar(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}Cm.YAMLSeq=kl});var Kr=w(Mm=>{"use strict";var rM=Re(),Lm=gr(),iM={collection:"seq",default:!0,nodeClass:Lm.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(e,t){return rM.isSeq(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>Lm.YAMLSeq.from(e,t,n)};Mm.seq=iM});var Mi=w(Um=>{"use strict";var oM=Ri(),aM={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,i){return t=Object.assign({actualString:!0},t),oM.stringifyString(e,t,n,i)}};Um.string=aM});var _s=w(Pm=>{"use strict";var xm=rt(),Dm={identify:e=>e==null,createNode:()=>new xm.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new xm.Scalar(null),stringify:({source:e},t)=>typeof e=="string"&&Dm.test.test(e)?e:t.options.nullStr};Pm.nullTag=Dm});var Ol=w(zm=>{"use strict";var sM=rt(),jm={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new sM.Scalar(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&jm.test.test(e)){let i=e[0]==="t"||e[0]==="T";if(t===i)return e}return t?n.options.trueStr:n.options.falseStr}};zm.boolTag=jm});var Gr=w(Fm=>{"use strict";function cM({format:e,minFractionDigits:t,tag:n,value:i}){if(typeof i=="bigint")return String(i);let r=typeof i=="number"?i:Number(i);if(!isFinite(r))return isNaN(r)?".nan":r<0?"-.inf":".inf";let o=Object.is(i,-0)?"-0":JSON.stringify(i);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^-?\d/.test(o)&&!o.includes("e")){let a=o.indexOf(".");a<0&&(a=o.length,o+=".");let s=t-(o.length-a-1);for(;s-- >0;)o+="0"}return o}Fm.stringifyNumber=cM});var Al=w(ps=>{"use strict";var lM=rt(),wl=Gr(),uM={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:wl.stringifyNumber},dM={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():wl.stringifyNumber(e)}},_M={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){let t=new lM.Scalar(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:wl.stringifyNumber};ps.float=_M;ps.floatExp=dM;ps.floatNaN=uM});var Nl=w(ms=>{"use strict";var Zm=Gr(),fs=e=>typeof e=="bigint"||Number.isInteger(e),Tl=(e,t,n,{intAsBigInt:i})=>i?BigInt(e):parseInt(e.substring(t),n);function qm(e,t,n){let{value:i}=e;return fs(i)&&i>=0?n+i.toString(t):Zm.stringifyNumber(e)}var pM={identify:e=>fs(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>Tl(e,2,8,n),stringify:e=>qm(e,8,"0o")},fM={identify:fs,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>Tl(e,0,10,n),stringify:Zm.stringifyNumber},mM={identify:e=>fs(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>Tl(e,2,16,n),stringify:e=>qm(e,16,"0x")};ms.int=fM;ms.intHex=mM;ms.intOct=pM});var Wm=w(Vm=>{"use strict";var gM=Jr(),yM=_s(),hM=Kr(),vM=Mi(),SM=Ol(),Il=Al(),Rl=Nl(),bM=[gM.map,hM.seq,vM.string,yM.nullTag,SM.boolTag,Rl.intOct,Rl.int,Rl.intHex,Il.floatNaN,Il.floatExp,Il.float];Vm.schema=bM});var Jm=w(Hm=>{"use strict";var EM=rt(),kM=Jr(),OM=Kr();function Bm(e){return typeof e=="bigint"||Number.isInteger(e)}var gs=({value:e})=>JSON.stringify(e),wM=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:gs},{identify:e=>e==null,createNode:()=>new EM.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:gs},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:gs},{identify:Bm,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>Bm(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:gs}],AM={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},TM=[kM.map,OM.seq].concat(wM,AM);Hm.schema=TM});var Cl=w(Km=>{"use strict";var Ui=require("buffer"),$l=rt(),NM=Ri(),IM={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof Ui.Buffer=="function")return Ui.Buffer.from(e,"base64");if(typeof atob=="function"){let n=atob(e.replace(/[\n\r]/g,"")),i=new Uint8Array(n.length);for(let r=0;r<n.length;++r)i[r]=n.charCodeAt(r);return i}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:n},i,r,o){if(!n)return"";let a=n,s;if(typeof Ui.Buffer=="function")s=a instanceof Ui.Buffer?a.toString("base64"):Ui.Buffer.from(a.buffer).toString("base64");else if(typeof btoa=="function"){let l="";for(let c=0;c<a.length;++c)l+=String.fromCharCode(a[c]);s=btoa(l)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=$l.Scalar.BLOCK_LITERAL),t!==$l.Scalar.QUOTE_DOUBLE){let l=Math.max(i.options.lineWidth-i.indent.length,i.options.minContentWidth),c=Math.ceil(s.length/l),u=new Array(c);for(let d=0,p=0;d<c;++d,p+=l)u[d]=s.substr(p,l);s=u.join(t===$l.Scalar.BLOCK_LITERAL?`
116
+ `:" ")}return NM.stringifyString({comment:e,type:t,value:s},i,r,o)}};Km.binary=IM});var vs=w(hs=>{"use strict";var ys=Re(),Ll=pr(),RM=rt(),$M=gr();function Gm(e,t){if(ys.isSeq(e))for(let n=0;n<e.items.length;++n){let i=e.items[n];if(!ys.isPair(i)){if(ys.isMap(i)){i.items.length>1&&t("Each pair must have its own sequence indicator");let r=i.items[0]||new Ll.Pair(new RM.Scalar(null));if(i.commentBefore&&(r.key.commentBefore=r.key.commentBefore?`${i.commentBefore}
117
117
  ${r.key.commentBefore}`:i.commentBefore),i.comment){let o=r.value??r.key;o.comment=o.comment?`${i.comment}
118
- ${o.comment}`:i.comment}i=r}e.items[n]=gs.isPair(i)?i:new $l.Pair(i)}}else t("Expected a sequence for this tag");return e}function Gm(e,t,n){let{replacer:i}=n,r=new NM.YAMLSeq(e);r.tag="tag:yaml.org,2002:pairs";let o=0;if(t&&Symbol.iterator in Object(t))for(let a of t){typeof i=="function"&&(a=i.call(t,String(o++),a));let s,l;if(Array.isArray(a))if(a.length===2)s=a[0],l=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){let c=Object.keys(a);if(c.length===1)s=c[0],l=a[s];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else s=a;r.items.push($l.createPair(s,l,n))}return r}var IM={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Km,createNode:Gm};ys.createPairs=Gm;ys.pairs=IM;ys.resolvePairs=Km});var Ml=w(Ll=>{"use strict";var Xm=Re(),Cl=lr(),xi=mr(),RM=gr(),Ym=hs(),kr=class e extends RM.YAMLSeq{constructor(){super(),this.add=xi.YAMLMap.prototype.add.bind(this),this.delete=xi.YAMLMap.prototype.delete.bind(this),this.get=xi.YAMLMap.prototype.get.bind(this),this.has=xi.YAMLMap.prototype.has.bind(this),this.set=xi.YAMLMap.prototype.set.bind(this),this.tag=e.tag}toJSON(t,n){if(!n)return super.toJSON(t);let i=new Map;n?.onCreate&&n.onCreate(i);for(let r of this.items){let o,a;if(Xm.isPair(r)?(o=Cl.toJS(r.key,"",n),a=Cl.toJS(r.value,o,n)):o=Cl.toJS(r,"",n),i.has(o))throw new Error("Ordered maps must not include duplicate keys");i.set(o,a)}return i}static from(t,n,i){let r=Ym.createPairs(t,n,i),o=new this;return o.items=r.items,o}};kr.tag="tag:yaml.org,2002:omap";var $M={collection:"seq",identify:e=>e instanceof Map,nodeClass:kr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let n=Ym.resolvePairs(e,t),i=[];for(let{key:r}of n.items)Xm.isScalar(r)&&(i.includes(r.value)?t(`Ordered maps must not include duplicate keys: ${r.value}`):i.push(r.value));return Object.assign(new kr,n)},createNode:(e,t,n)=>kr.from(e,t,n)};Ll.YAMLOMap=kr;Ll.omap=$M});var rg=w(Ul=>{"use strict";var Qm=rt();function eg({value:e,source:t},n){return t&&(e?tg:ng).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var tg={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Qm.Scalar(!0),stringify:eg},ng={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Qm.Scalar(!1),stringify:eg};Ul.falseTag=ng;Ul.trueTag=tg});var ig=w(vs=>{"use strict";var CM=rt(),xl=Gr(),LM={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:xl.stringifyNumber},MM={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():xl.stringifyNumber(e)}},UM={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new CM.Scalar(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(n!==-1){let i=e.substring(n+1).replace(/_/g,"");i[i.length-1]==="0"&&(t.minFractionDigits=i.length)}return t},stringify:xl.stringifyNumber};vs.float=UM;vs.floatExp=MM;vs.floatNaN=LM});var ag=w(Di=>{"use strict";var og=Gr(),Pi=e=>typeof e=="bigint"||Number.isInteger(e);function Ss(e,t,n,{intAsBigInt:i}){let r=e[0];if((r==="-"||r==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),i){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let a=BigInt(e);return r==="-"?BigInt(-1)*a:a}let o=parseInt(e,n);return r==="-"?-1*o:o}function Pl(e,t,n){let{value:i}=e;if(Pi(i)){let r=i.toString(t);return i<0?"-"+n+r.substr(1):n+r}return og.stringifyNumber(e)}var xM={identify:Pi,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Ss(e,2,2,n),stringify:e=>Pl(e,2,"0b")},PM={identify:Pi,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Ss(e,1,8,n),stringify:e=>Pl(e,8,"0")},DM={identify:Pi,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Ss(e,0,10,n),stringify:og.stringifyNumber},jM={identify:Pi,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Ss(e,2,16,n),stringify:e=>Pl(e,16,"0x")};Di.int=DM;Di.intBin=xM;Di.intHex=jM;Di.intOct=PM});var jl=w(Dl=>{"use strict";var ks=Re(),bs=pr(),Es=mr(),Or=class e extends Es.YAMLMap{constructor(t){super(t),this.tag=e.tag}add(t){let n;ks.isPair(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new bs.Pair(t.key,null):n=new bs.Pair(t,null),Es.findPair(this.items,n.key)||this.items.push(n)}get(t,n){let i=Es.findPair(this.items,t);return!n&&ks.isPair(i)?ks.isScalar(i.key)?i.key.value:i.key:i}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let i=Es.findPair(this.items,t);i&&!n?this.items.splice(this.items.indexOf(i),1):!i&&n&&this.items.push(new bs.Pair(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,i){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,i);throw new Error("Set items must all have null values")}static from(t,n,i){let{replacer:r}=i,o=new this(t);if(n&&Symbol.iterator in Object(n))for(let a of n)typeof r=="function"&&(a=r.call(n,a,a)),o.items.push(bs.createPair(a,null,i));return o}};Or.tag="tag:yaml.org,2002:set";var zM={collection:"map",identify:e=>e instanceof Set,nodeClass:Or,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>Or.from(e,t,n),resolve(e,t){if(ks.isMap(e)){if(e.hasAllNullValues(!0))return Object.assign(new Or,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};Dl.YAMLSet=Or;Dl.set=zM});var Fl=w(Os=>{"use strict";var FM=Gr();function zl(e,t){let n=e[0],i=n==="-"||n==="+"?e.substring(1):e,r=a=>t?BigInt(a):Number(a),o=i.replace(/_/g,"").split(":").reduce((a,s)=>a*r(60)+r(s),r(0));return n==="-"?r(-1)*o:o}function sg(e){let{value:t}=e,n=a=>a;if(typeof t=="bigint")n=a=>BigInt(a);else if(isNaN(t)||!isFinite(t))return FM.stringifyNumber(e);let i="";t<0&&(i="-",t*=n(-1));let r=n(60),o=[t%r];return t<60?o.unshift(0):(t=(t-o[0])/r,o.unshift(t%r),t>=60&&(t=(t-o[0])/r,o.unshift(t))),i+o.map(a=>String(a).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var ZM={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>zl(e,n),stringify:sg},qM={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>zl(e,!1),stringify:sg},cg={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){let t=e.match(cg.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,n,i,r,o,a,s]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0,c=Date.UTC(n,i-1,r,o||0,a||0,s||0,l),u=t[8];if(u&&u!=="Z"){let d=zl(u,!1);Math.abs(d)<30&&(d*=60),c-=6e4*d}return new Date(c)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};Os.floatTime=qM;Os.intTime=ZM;Os.timestamp=cg});var dg=w(ug=>{"use strict";var VM=Jr(),WM=ds(),BM=Kr(),HM=Mi(),JM=Rl(),lg=rg(),Zl=ig(),ws=ag(),KM=rs(),GM=Ml(),XM=hs(),YM=jl(),ql=Fl(),QM=[VM.map,BM.seq,HM.string,WM.nullTag,lg.trueTag,lg.falseTag,ws.intBin,ws.intOct,ws.int,ws.intHex,Zl.floatNaN,Zl.floatExp,Zl.float,JM.binary,KM.merge,GM.omap,XM.pairs,YM.set,ql.intTime,ql.floatTime,ql.timestamp];ug.schema=QM});var bg=w(Bl=>{"use strict";var mg=Jr(),e0=ds(),gg=Kr(),t0=Mi(),n0=El(),Vl=Ol(),Wl=Al(),r0=Vm(),i0=Hm(),yg=Rl(),ji=rs(),hg=Ml(),vg=hs(),_g=dg(),Sg=jl(),As=Fl(),pg=new Map([["core",r0.schema],["failsafe",[mg.map,gg.seq,t0.string]],["json",i0.schema],["yaml11",_g.schema],["yaml-1.1",_g.schema]]),fg={binary:yg.binary,bool:n0.boolTag,float:Vl.float,floatExp:Vl.floatExp,floatNaN:Vl.floatNaN,floatTime:As.floatTime,int:Wl.int,intHex:Wl.intHex,intOct:Wl.intOct,intTime:As.intTime,map:mg.map,merge:ji.merge,null:e0.nullTag,omap:hg.omap,pairs:vg.pairs,seq:gg.seq,set:Sg.set,timestamp:As.timestamp},o0={"tag:yaml.org,2002:binary":yg.binary,"tag:yaml.org,2002:merge":ji.merge,"tag:yaml.org,2002:omap":hg.omap,"tag:yaml.org,2002:pairs":vg.pairs,"tag:yaml.org,2002:set":Sg.set,"tag:yaml.org,2002:timestamp":As.timestamp};function a0(e,t,n){let i=pg.get(t);if(i&&!e)return n&&!i.includes(ji.merge)?i.concat(ji.merge):i.slice();let r=i;if(!r)if(Array.isArray(e))r=[];else{let o=Array.from(pg.keys()).filter(a=>a!=="yaml11").map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${o} or define customTags array`)}if(Array.isArray(e))for(let o of e)r=r.concat(o);else typeof e=="function"&&(r=e(r.slice()));return n&&(r=r.concat(ji.merge)),r.reduce((o,a)=>{let s=typeof a=="string"?fg[a]:a;if(!s){let l=JSON.stringify(a),c=Object.keys(fg).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return o.includes(s)||o.push(s),o},[])}Bl.coreKnownTags=o0;Bl.getTags=a0});var Kl=w(Eg=>{"use strict";var Hl=Re(),s0=Jr(),c0=Kr(),l0=Mi(),Ts=bg(),u0=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0,Jl=class e{constructor({compat:t,customTags:n,merge:i,resolveKnownTags:r,schema:o,sortMapEntries:a,toStringDefaults:s}){this.compat=Array.isArray(t)?Ts.getTags(t,"compat"):t?Ts.getTags(null,t):null,this.name=typeof o=="string"&&o||"core",this.knownTags=r?Ts.coreKnownTags:{},this.tags=Ts.getTags(n,this.name,i),this.toStringOptions=s??null,Object.defineProperty(this,Hl.MAP,{value:s0.map}),Object.defineProperty(this,Hl.SCALAR,{value:l0.string}),Object.defineProperty(this,Hl.SEQ,{value:c0.seq}),this.sortMapEntries=typeof a=="function"?a:a===!0?u0:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};Eg.Schema=Jl});var Og=w(kg=>{"use strict";var d0=Re(),Gl=$i(),zi=Ti();function _0(e,t){let n=[],i=t.directives===!0;if(t.directives!==!1&&e.directives){let l=e.directives.toString(e);l?(n.push(l),i=!0):e.directives.docStart&&(i=!0)}i&&n.push("---");let r=Gl.createStringifyContext(e,t),{commentString:o}=r.options;if(e.commentBefore){n.length!==1&&n.unshift("");let l=o(e.commentBefore);n.unshift(zi.indentComment(l,""))}let a=!1,s=null;if(e.contents){if(d0.isNode(e.contents)){if(e.contents.spaceBefore&&i&&n.push(""),e.contents.commentBefore){let u=o(e.contents.commentBefore);n.push(zi.indentComment(u,""))}r.forceBlockIndent=!!e.comment,s=e.contents.comment}let l=s?void 0:()=>a=!0,c=Gl.stringify(e.contents,r,()=>s=null,l);s&&(c+=zi.lineComment(c,"",o(s))),(c[0]==="|"||c[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(Gl.stringify(e.contents,r));if(e.directives?.docEnd)if(e.comment){let l=o(e.comment);l.includes(`
118
+ ${o.comment}`:i.comment}i=r}e.items[n]=ys.isPair(i)?i:new Ll.Pair(i)}}else t("Expected a sequence for this tag");return e}function Xm(e,t,n){let{replacer:i}=n,r=new $M.YAMLSeq(e);r.tag="tag:yaml.org,2002:pairs";let o=0;if(t&&Symbol.iterator in Object(t))for(let a of t){typeof i=="function"&&(a=i.call(t,String(o++),a));let s,l;if(Array.isArray(a))if(a.length===2)s=a[0],l=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){let c=Object.keys(a);if(c.length===1)s=c[0],l=a[s];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else s=a;r.items.push(Ll.createPair(s,l,n))}return r}var CM={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Gm,createNode:Xm};hs.createPairs=Xm;hs.pairs=CM;hs.resolvePairs=Gm});var xl=w(Ul=>{"use strict";var Ym=Re(),Ml=lr(),xi=mr(),LM=gr(),Qm=vs(),Or=class e extends LM.YAMLSeq{constructor(){super(),this.add=xi.YAMLMap.prototype.add.bind(this),this.delete=xi.YAMLMap.prototype.delete.bind(this),this.get=xi.YAMLMap.prototype.get.bind(this),this.has=xi.YAMLMap.prototype.has.bind(this),this.set=xi.YAMLMap.prototype.set.bind(this),this.tag=e.tag}toJSON(t,n){if(!n)return super.toJSON(t);let i=new Map;n?.onCreate&&n.onCreate(i);for(let r of this.items){let o,a;if(Ym.isPair(r)?(o=Ml.toJS(r.key,"",n),a=Ml.toJS(r.value,o,n)):o=Ml.toJS(r,"",n),i.has(o))throw new Error("Ordered maps must not include duplicate keys");i.set(o,a)}return i}static from(t,n,i){let r=Qm.createPairs(t,n,i),o=new this;return o.items=r.items,o}};Or.tag="tag:yaml.org,2002:omap";var MM={collection:"seq",identify:e=>e instanceof Map,nodeClass:Or,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){let n=Qm.resolvePairs(e,t),i=[];for(let{key:r}of n.items)Ym.isScalar(r)&&(i.includes(r.value)?t(`Ordered maps must not include duplicate keys: ${r.value}`):i.push(r.value));return Object.assign(new Or,n)},createNode:(e,t,n)=>Or.from(e,t,n)};Ul.YAMLOMap=Or;Ul.omap=MM});var ig=w(Dl=>{"use strict";var eg=rt();function tg({value:e,source:t},n){return t&&(e?ng:rg).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}var ng={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new eg.Scalar(!0),stringify:tg},rg={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new eg.Scalar(!1),stringify:tg};Dl.falseTag=rg;Dl.trueTag=ng});var og=w(Ss=>{"use strict";var UM=rt(),Pl=Gr(),xM={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Pl.stringifyNumber},DM={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){let t=Number(e.value);return isFinite(t)?t.toExponential():Pl.stringifyNumber(e)}},PM={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){let t=new UM.Scalar(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(n!==-1){let i=e.substring(n+1).replace(/_/g,"");i[i.length-1]==="0"&&(t.minFractionDigits=i.length)}return t},stringify:Pl.stringifyNumber};Ss.float=PM;Ss.floatExp=DM;Ss.floatNaN=xM});var sg=w(Pi=>{"use strict";var ag=Gr(),Di=e=>typeof e=="bigint"||Number.isInteger(e);function bs(e,t,n,{intAsBigInt:i}){let r=e[0];if((r==="-"||r==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),i){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}let a=BigInt(e);return r==="-"?BigInt(-1)*a:a}let o=parseInt(e,n);return r==="-"?-1*o:o}function jl(e,t,n){let{value:i}=e;if(Di(i)){let r=i.toString(t);return i<0?"-"+n+r.substr(1):n+r}return ag.stringifyNumber(e)}var jM={identify:Di,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>bs(e,2,2,n),stringify:e=>jl(e,2,"0b")},zM={identify:Di,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>bs(e,1,8,n),stringify:e=>jl(e,8,"0")},FM={identify:Di,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>bs(e,0,10,n),stringify:ag.stringifyNumber},ZM={identify:Di,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>bs(e,2,16,n),stringify:e=>jl(e,16,"0x")};Pi.int=FM;Pi.intBin=jM;Pi.intHex=ZM;Pi.intOct=zM});var Fl=w(zl=>{"use strict";var Os=Re(),Es=pr(),ks=mr(),wr=class e extends ks.YAMLMap{constructor(t){super(t),this.tag=e.tag}add(t){let n;Os.isPair(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new Es.Pair(t.key,null):n=new Es.Pair(t,null),ks.findPair(this.items,n.key)||this.items.push(n)}get(t,n){let i=ks.findPair(this.items,t);return!n&&Os.isPair(i)?Os.isScalar(i.key)?i.key.value:i.key:i}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);let i=ks.findPair(this.items,t);i&&!n?this.items.splice(this.items.indexOf(i),1):!i&&n&&this.items.push(new Es.Pair(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,i){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,i);throw new Error("Set items must all have null values")}static from(t,n,i){let{replacer:r}=i,o=new this(t);if(n&&Symbol.iterator in Object(n))for(let a of n)typeof r=="function"&&(a=r.call(n,a,a)),o.items.push(Es.createPair(a,null,i));return o}};wr.tag="tag:yaml.org,2002:set";var qM={collection:"map",identify:e=>e instanceof Set,nodeClass:wr,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>wr.from(e,t,n),resolve(e,t){if(Os.isMap(e)){if(e.hasAllNullValues(!0))return Object.assign(new wr,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};zl.YAMLSet=wr;zl.set=qM});var ql=w(ws=>{"use strict";var VM=Gr();function Zl(e,t){let n=e[0],i=n==="-"||n==="+"?e.substring(1):e,r=a=>t?BigInt(a):Number(a),o=i.replace(/_/g,"").split(":").reduce((a,s)=>a*r(60)+r(s),r(0));return n==="-"?r(-1)*o:o}function cg(e){let{value:t}=e,n=a=>a;if(typeof t=="bigint")n=a=>BigInt(a);else if(isNaN(t)||!isFinite(t))return VM.stringifyNumber(e);let i="";t<0&&(i="-",t*=n(-1));let r=n(60),o=[t%r];return t<60?o.unshift(0):(t=(t-o[0])/r,o.unshift(t%r),t>=60&&(t=(t-o[0])/r,o.unshift(t))),i+o.map(a=>String(a).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var WM={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>Zl(e,n),stringify:cg},BM={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>Zl(e,!1),stringify:cg},lg={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){let t=e.match(lg.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,n,i,r,o,a,s]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0,c=Date.UTC(n,i-1,r,o||0,a||0,s||0,l),u=t[8];if(u&&u!=="Z"){let d=Zl(u,!1);Math.abs(d)<30&&(d*=60),c-=6e4*d}return new Date(c)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};ws.floatTime=BM;ws.intTime=WM;ws.timestamp=lg});var _g=w(dg=>{"use strict";var HM=Jr(),JM=_s(),KM=Kr(),GM=Mi(),XM=Cl(),ug=ig(),Vl=og(),As=sg(),YM=is(),QM=xl(),e0=vs(),t0=Fl(),Wl=ql(),n0=[HM.map,KM.seq,GM.string,JM.nullTag,ug.trueTag,ug.falseTag,As.intBin,As.intOct,As.int,As.intHex,Vl.floatNaN,Vl.floatExp,Vl.float,XM.binary,YM.merge,QM.omap,e0.pairs,t0.set,Wl.intTime,Wl.floatTime,Wl.timestamp];dg.schema=n0});var Eg=w(Jl=>{"use strict";var gg=Jr(),r0=_s(),yg=Kr(),i0=Mi(),o0=Ol(),Bl=Al(),Hl=Nl(),a0=Wm(),s0=Jm(),hg=Cl(),ji=is(),vg=xl(),Sg=vs(),pg=_g(),bg=Fl(),Ts=ql(),fg=new Map([["core",a0.schema],["failsafe",[gg.map,yg.seq,i0.string]],["json",s0.schema],["yaml11",pg.schema],["yaml-1.1",pg.schema]]),mg={binary:hg.binary,bool:o0.boolTag,float:Bl.float,floatExp:Bl.floatExp,floatNaN:Bl.floatNaN,floatTime:Ts.floatTime,int:Hl.int,intHex:Hl.intHex,intOct:Hl.intOct,intTime:Ts.intTime,map:gg.map,merge:ji.merge,null:r0.nullTag,omap:vg.omap,pairs:Sg.pairs,seq:yg.seq,set:bg.set,timestamp:Ts.timestamp},c0={"tag:yaml.org,2002:binary":hg.binary,"tag:yaml.org,2002:merge":ji.merge,"tag:yaml.org,2002:omap":vg.omap,"tag:yaml.org,2002:pairs":Sg.pairs,"tag:yaml.org,2002:set":bg.set,"tag:yaml.org,2002:timestamp":Ts.timestamp};function l0(e,t,n){let i=fg.get(t);if(i&&!e)return n&&!i.includes(ji.merge)?i.concat(ji.merge):i.slice();let r=i;if(!r)if(Array.isArray(e))r=[];else{let o=Array.from(fg.keys()).filter(a=>a!=="yaml11").map(a=>JSON.stringify(a)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${o} or define customTags array`)}if(Array.isArray(e))for(let o of e)r=r.concat(o);else typeof e=="function"&&(r=e(r.slice()));return n&&(r=r.concat(ji.merge)),r.reduce((o,a)=>{let s=typeof a=="string"?mg[a]:a;if(!s){let l=JSON.stringify(a),c=Object.keys(mg).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${l}; use one of ${c}`)}return o.includes(s)||o.push(s),o},[])}Jl.coreKnownTags=c0;Jl.getTags=l0});var Xl=w(kg=>{"use strict";var Kl=Re(),u0=Jr(),d0=Kr(),_0=Mi(),Ns=Eg(),p0=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0,Gl=class e{constructor({compat:t,customTags:n,merge:i,resolveKnownTags:r,schema:o,sortMapEntries:a,toStringDefaults:s}){this.compat=Array.isArray(t)?Ns.getTags(t,"compat"):t?Ns.getTags(null,t):null,this.name=typeof o=="string"&&o||"core",this.knownTags=r?Ns.coreKnownTags:{},this.tags=Ns.getTags(n,this.name,i),this.toStringOptions=s??null,Object.defineProperty(this,Kl.MAP,{value:u0.map}),Object.defineProperty(this,Kl.SCALAR,{value:_0.string}),Object.defineProperty(this,Kl.SEQ,{value:d0.seq}),this.sortMapEntries=typeof a=="function"?a:a===!0?p0:null}clone(){let t=Object.create(e.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};kg.Schema=Gl});var wg=w(Og=>{"use strict";var f0=Re(),Yl=$i(),zi=Ti();function m0(e,t){let n=[],i=t.directives===!0;if(t.directives!==!1&&e.directives){let l=e.directives.toString(e);l?(n.push(l),i=!0):e.directives.docStart&&(i=!0)}i&&n.push("---");let r=Yl.createStringifyContext(e,t),{commentString:o}=r.options;if(e.commentBefore){n.length!==1&&n.unshift("");let l=o(e.commentBefore);n.unshift(zi.indentComment(l,""))}let a=!1,s=null;if(e.contents){if(f0.isNode(e.contents)){if(e.contents.spaceBefore&&i&&n.push(""),e.contents.commentBefore){let u=o(e.contents.commentBefore);n.push(zi.indentComment(u,""))}r.forceBlockIndent=!!e.comment,s=e.contents.comment}let l=s?void 0:()=>a=!0,c=Yl.stringify(e.contents,r,()=>s=null,l);s&&(c+=zi.lineComment(c,"",o(s))),(c[0]==="|"||c[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${c}`:n.push(c)}else n.push(Yl.stringify(e.contents,r));if(e.directives?.docEnd)if(e.comment){let l=o(e.comment);l.includes(`
119
119
  `)?(n.push("..."),n.push(zi.indentComment(l,""))):n.push(`... ${l}`)}else n.push("...");else{let l=e.comment;l&&a&&(l=l.replace(/^\n+/,"")),l&&((!a||s)&&n[n.length-1]!==""&&n.push(""),n.push(zi.indentComment(o(l),"")))}return n.join(`
120
120
  `)+`
121
- `}kg.stringifyDocument=_0});var Fi=w(wg=>{"use strict";var p0=wi(),Xr=Ha(),jt=Re(),f0=pr(),m0=lr(),g0=Kl(),y0=Og(),Xl=qa(),h0=tl(),v0=Ai(),Yl=el(),Ql=class e{constructor(t,n,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,jt.NODE_TYPE,{value:jt.DOC});let r=null;typeof n=="function"||Array.isArray(n)?r=n:i===void 0&&n&&(i=n,n=void 0);let o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},i);this.options=o;let{version:a}=o;i?._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new Yl.Directives({version:a}),this.setSchema(a,i),this.contents=t===void 0?null:this.createNode(t,r,i)}clone(){let t=Object.create(e.prototype,{[jt.NODE_TYPE]:{value:jt.DOC}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=jt.isNode(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){Yr(this.contents)&&this.contents.add(t)}addIn(t,n){Yr(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){let i=Xl.anchorNames(this);t.anchor=!n||i.has(n)?Xl.findNewAnchor(n||"a",i):n}return new p0.Alias(t.anchor)}createNode(t,n,i){let r;if(typeof n=="function")t=n.call({"":t},"",t),r=n;else if(Array.isArray(n)){let v=U=>typeof U=="number"||U instanceof String||U instanceof Number,E=n.filter(v).map(String);E.length>0&&(n=n.concat(E)),r=n}else i===void 0&&n&&(i=n,n=void 0);let{aliasDuplicateObjects:o,anchorPrefix:a,flow:s,keepUndefined:l,onTagObj:c,tag:u}=i??{},{onAnchor:d,setAnchors:p,sourceObjects:f}=Xl.createNodeAnchors(this,a||"a"),S={aliasDuplicateObjects:o??!0,keepUndefined:l??!1,onAnchor:d,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},h=v0.createNode(t,u,S);return s&&jt.isCollection(h)&&(h.flow=!0),p(),h}createPair(t,n,i={}){let r=this.createNode(t,null,i),o=this.createNode(n,null,i);return new f0.Pair(r,o)}delete(t){return Yr(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Xr.isEmptyPath(t)?this.contents==null?!1:(this.contents=null,!0):Yr(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return jt.isCollection(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return Xr.isEmptyPath(t)?!n&&jt.isScalar(this.contents)?this.contents.value:this.contents:jt.isCollection(this.contents)?this.contents.getIn(t,n):void 0}has(t){return jt.isCollection(this.contents)?this.contents.has(t):!1}hasIn(t){return Xr.isEmptyPath(t)?this.contents!==void 0:jt.isCollection(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=Xr.collectionFromPath(this.schema,[t],n):Yr(this.contents)&&this.contents.set(t,n)}setIn(t,n){Xr.isEmptyPath(t)?this.contents=n:this.contents==null?this.contents=Xr.collectionFromPath(this.schema,Array.from(t),n):Yr(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t=="number"&&(t=String(t));let i;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Yl.Directives({version:"1.1"}),i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new Yl.Directives({version:t}),i={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{let r=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${r}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(i)this.schema=new g0.Schema(Object.assign(i,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:n,mapAsMap:i,maxAliasCount:r,onAnchor:o,reviver:a}={}){let s={anchors:new Map,doc:this,keep:!t,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},l=m0.toJS(this.contents,n??"",s);if(typeof o=="function")for(let{count:c,res:u}of s.anchors.values())o(u,c);return typeof a=="function"?h0.applyReviver(a,{"":l},"",l):l}toJSON(t,n){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:n})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){let n=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return y0.stringifyDocument(this,t)}};function Yr(e){if(jt.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}wg.Document=Ql});var Vi=w(qi=>{"use strict";var Zi=class extends Error{constructor(t,n,i,r){super(),this.name=t,this.code=i,this.message=r,this.pos=n}},eu=class extends Zi{constructor(t,n,i){super("YAMLParseError",t,n,i)}},tu=class extends Zi{constructor(t,n,i){super("YAMLWarning",t,n,i)}},S0=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(s=>t.linePos(s));let{line:i,col:r}=n.linePos[0];n.message+=` at line ${i}, column ${r}`;let o=r-1,a=e.substring(t.lineStarts[i-1],t.lineStarts[i]).replace(/[\n\r]+$/,"");if(o>=60&&a.length>80){let s=Math.min(o-39,a.length-79);a="\u2026"+a.substring(s),o-=s-1}if(a.length>80&&(a=a.substring(0,79)+"\u2026"),i>1&&/^ *$/.test(a.substring(0,o))){let s=e.substring(t.lineStarts[i-2],t.lineStarts[i-1]);s.length>80&&(s=s.substring(0,79)+`\u2026
121
+ `}Og.stringifyDocument=m0});var Fi=w(Ag=>{"use strict";var g0=wi(),Xr=Ja(),jt=Re(),y0=pr(),h0=lr(),v0=Xl(),S0=wg(),Ql=Va(),b0=rl(),E0=Ai(),eu=nl(),tu=class e{constructor(t,n,i){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,jt.NODE_TYPE,{value:jt.DOC});let r=null;typeof n=="function"||Array.isArray(n)?r=n:i===void 0&&n&&(i=n,n=void 0);let o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},i);this.options=o;let{version:a}=o;i?._directives?(this.directives=i._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new eu.Directives({version:a}),this.setSchema(a,i),this.contents=t===void 0?null:this.createNode(t,r,i)}clone(){let t=Object.create(e.prototype,{[jt.NODE_TYPE]:{value:jt.DOC}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=jt.isNode(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){Yr(this.contents)&&this.contents.add(t)}addIn(t,n){Yr(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){let i=Ql.anchorNames(this);t.anchor=!n||i.has(n)?Ql.findNewAnchor(n||"a",i):n}return new g0.Alias(t.anchor)}createNode(t,n,i){let r;if(typeof n=="function")t=n.call({"":t},"",t),r=n;else if(Array.isArray(n)){let v=x=>typeof x=="number"||x instanceof String||x instanceof Number,E=n.filter(v).map(String);E.length>0&&(n=n.concat(E)),r=n}else i===void 0&&n&&(i=n,n=void 0);let{aliasDuplicateObjects:o,anchorPrefix:a,flow:s,keepUndefined:l,onTagObj:c,tag:u}=i??{},{onAnchor:d,setAnchors:p,sourceObjects:f}=Ql.createNodeAnchors(this,a||"a"),S={aliasDuplicateObjects:o??!0,keepUndefined:l??!1,onAnchor:d,onTagObj:c,replacer:r,schema:this.schema,sourceObjects:f},h=E0.createNode(t,u,S);return s&&jt.isCollection(h)&&(h.flow=!0),p(),h}createPair(t,n,i={}){let r=this.createNode(t,null,i),o=this.createNode(n,null,i);return new y0.Pair(r,o)}delete(t){return Yr(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Xr.isEmptyPath(t)?this.contents==null?!1:(this.contents=null,!0):Yr(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return jt.isCollection(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return Xr.isEmptyPath(t)?!n&&jt.isScalar(this.contents)?this.contents.value:this.contents:jt.isCollection(this.contents)?this.contents.getIn(t,n):void 0}has(t){return jt.isCollection(this.contents)?this.contents.has(t):!1}hasIn(t){return Xr.isEmptyPath(t)?this.contents!==void 0:jt.isCollection(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=Xr.collectionFromPath(this.schema,[t],n):Yr(this.contents)&&this.contents.set(t,n)}setIn(t,n){Xr.isEmptyPath(t)?this.contents=n:this.contents==null?this.contents=Xr.collectionFromPath(this.schema,Array.from(t),n):Yr(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t=="number"&&(t=String(t));let i;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new eu.Directives({version:"1.1"}),i={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new eu.Directives({version:t}),i={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,i=null;break;default:{let r=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${r}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(i)this.schema=new v0.Schema(Object.assign(i,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:n,mapAsMap:i,maxAliasCount:r,onAnchor:o,reviver:a}={}){let s={anchors:new Map,doc:this,keep:!t,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},l=h0.toJS(this.contents,n??"",s);if(typeof o=="function")for(let{count:c,res:u}of s.anchors.values())o(u,c);return typeof a=="function"?b0.applyReviver(a,{"":l},"",l):l}toJSON(t,n){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:n})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){let n=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return S0.stringifyDocument(this,t)}};function Yr(e){if(jt.isCollection(e))return!0;throw new Error("Expected a YAML collection as document contents")}Ag.Document=tu});var Vi=w(qi=>{"use strict";var Zi=class extends Error{constructor(t,n,i,r){super(),this.name=t,this.code=i,this.message=r,this.pos=n}},nu=class extends Zi{constructor(t,n,i){super("YAMLParseError",t,n,i)}},ru=class extends Zi{constructor(t,n,i){super("YAMLWarning",t,n,i)}},k0=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(s=>t.linePos(s));let{line:i,col:r}=n.linePos[0];n.message+=` at line ${i}, column ${r}`;let o=r-1,a=e.substring(t.lineStarts[i-1],t.lineStarts[i]).replace(/[\n\r]+$/,"");if(o>=60&&a.length>80){let s=Math.min(o-39,a.length-79);a="\u2026"+a.substring(s),o-=s-1}if(a.length>80&&(a=a.substring(0,79)+"\u2026"),i>1&&/^ *$/.test(a.substring(0,o))){let s=e.substring(t.lineStarts[i-2],t.lineStarts[i-1]);s.length>80&&(s=s.substring(0,79)+`\u2026
122
122
  `),a=s+a}if(/[^ ]/.test(a)){let s=1,l=n.linePos[1];l?.line===i&&l.col>r&&(s=Math.max(1,Math.min(l.col-r,80-o)));let c=" ".repeat(o)+"^".repeat(s);n.message+=`:
123
123
 
124
124
  ${a}
125
125
  ${c}
126
- `}};qi.YAMLError=Zi;qi.YAMLParseError=eu;qi.YAMLWarning=tu;qi.prettifyError=S0});var Wi=w(Ag=>{"use strict";function b0(e,{flow:t,indicator:n,next:i,offset:r,onError:o,parentIndent:a,startOnNewline:s}){let l=!1,c=s,u=s,d="",p="",f=!1,S=!1,h=null,v=null,E=null,U=null,F=null,Z=null,V=null;for(let O of e)switch(S&&(O.type!=="space"&&O.type!=="newline"&&O.type!=="comma"&&o(O.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),S=!1),h&&(c&&O.type!=="comment"&&O.type!=="newline"&&o(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),h=null),O.type){case"space":!t&&(n!=="doc-start"||i?.type!=="flow-collection")&&O.source.includes(" ")&&(h=O),u=!0;break;case"comment":{u||o(O,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let D=O.source.substring(1)||" ";d?d+=p+D:d=D,p="",c=!1;break}case"newline":c?d?d+=O.source:(!Z||n!=="seq-item-ind")&&(l=!0):p+=O.source,c=!0,f=!0,(v||E)&&(U=O),u=!0;break;case"anchor":v&&o(O,"MULTIPLE_ANCHORS","A node can have at most one anchor"),O.source.endsWith(":")&&o(O.offset+O.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),v=O,V??(V=O.offset),c=!1,u=!1,S=!0;break;case"tag":{E&&o(O,"MULTIPLE_TAGS","A node can have at most one tag"),E=O,V??(V=O.offset),c=!1,u=!1,S=!0;break}case n:(v||E)&&o(O,"BAD_PROP_ORDER",`Anchors and tags must be after the ${O.source} indicator`),Z&&o(O,"UNEXPECTED_TOKEN",`Unexpected ${O.source} in ${t??"collection"}`),Z=O,c=n==="seq-item-ind"||n==="explicit-key-ind",u=!1;break;case"comma":if(t){F&&o(O,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),F=O,c=!1,u=!1;break}default:o(O,"UNEXPECTED_TOKEN",`Unexpected ${O.type} token`),c=!1,u=!1}let ce=e[e.length-1],Se=ce?ce.offset+ce.source.length:r;return S&&i&&i.type!=="space"&&i.type!=="newline"&&i.type!=="comma"&&(i.type!=="scalar"||i.source!=="")&&o(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h&&(c&&h.indent<=a||i?.type==="block-map"||i?.type==="block-seq")&&o(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:F,found:Z,spaceBefore:l,comment:d,hasNewline:f,anchor:v,tag:E,newlineAfterProp:U,end:Se,start:V??Se}}Ag.resolveProps=b0});var Ns=w(Tg=>{"use strict";function nu(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
127
- `))return!0;if(e.end){for(let t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(let t of e.items){for(let n of t.start)if(n.type==="newline")return!0;if(t.sep){for(let n of t.sep)if(n.type==="newline")return!0}if(nu(t.key)||nu(t.value))return!0}return!1;default:return!0}}Tg.containsNewline=nu});var ru=w(Ng=>{"use strict";var E0=Ns();function k0(e,t,n){if(t?.type==="flow-collection"){let i=t.end[0];i.indent===e&&(i.source==="]"||i.source==="}")&&E0.containsNewline(t)&&n(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}Ng.flowIndentCheck=k0});var iu=w(Rg=>{"use strict";var Ig=Re();function O0(e,t,n){let{uniqueKeys:i}=e.options;if(i===!1)return!1;let r=typeof i=="function"?i:(o,a)=>o===a||Ig.isScalar(o)&&Ig.isScalar(a)&&o.value===a.value;return t.some(o=>r(o.key,n))}Rg.mapIncludes=O0});var xg=w(Ug=>{"use strict";var $g=pr(),w0=mr(),Cg=Wi(),A0=Ns(),Lg=ru(),T0=iu(),Mg="All mapping items must start at the same column";function N0({composeNode:e,composeEmptyNode:t},n,i,r,o){let a=o?.nodeClass??w0.YAMLMap,s=new a(n.schema);n.atRoot&&(n.atRoot=!1);let l=i.offset,c=null;for(let u of i.items){let{start:d,key:p,sep:f,value:S}=u,h=Cg.resolveProps(d,{indicator:"explicit-key-ind",next:p??f?.[0],offset:l,onError:r,parentIndent:i.indent,startOnNewline:!0}),v=!h.found;if(v){if(p&&(p.type==="block-seq"?r(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==i.indent&&r(l,"BAD_INDENT",Mg)),!h.anchor&&!h.tag&&!f){c=h.end,h.comment&&(s.comment?s.comment+=`
128
- `+h.comment:s.comment=h.comment);continue}(h.newlineAfterProp||A0.containsNewline(p))&&r(p??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else h.found?.indent!==i.indent&&r(l,"BAD_INDENT",Mg);n.atKey=!0;let E=h.end,U=p?e(n,p,h,r):t(n,E,d,null,h,r);n.schema.compat&&Lg.flowIndentCheck(i.indent,p,r),n.atKey=!1,T0.mapIncludes(n,s.items,U)&&r(E,"DUPLICATE_KEY","Map keys must be unique");let F=Cg.resolveProps(f??[],{indicator:"map-value-ind",next:S,offset:U.range[2],onError:r,parentIndent:i.indent,startOnNewline:!p||p.type==="block-scalar"});if(l=F.end,F.found){v&&(S?.type==="block-map"&&!F.hasNewline&&r(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&h.start<F.found.offset-1024&&r(U.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let Z=S?e(n,S,F,r):t(n,l,f,null,F,r);n.schema.compat&&Lg.flowIndentCheck(i.indent,S,r),l=Z.range[2];let V=new $g.Pair(U,Z);n.options.keepSourceTokens&&(V.srcToken=u),s.items.push(V)}else{v&&r(U.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),F.comment&&(U.comment?U.comment+=`
129
- `+F.comment:U.comment=F.comment);let Z=new $g.Pair(U);n.options.keepSourceTokens&&(Z.srcToken=u),s.items.push(Z)}}return c&&c<l&&r(c,"IMPOSSIBLE","Map comment with trailing content"),s.range=[i.offset,l,c??l],s}Ug.resolveBlockMap=N0});var Dg=w(Pg=>{"use strict";var I0=gr(),R0=Wi(),$0=ru();function C0({composeNode:e,composeEmptyNode:t},n,i,r,o){let a=o?.nodeClass??I0.YAMLSeq,s=new a(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let l=i.offset,c=null;for(let{start:u,value:d}of i.items){let p=R0.resolveProps(u,{indicator:"seq-item-ind",next:d,offset:l,onError:r,parentIndent:i.indent,startOnNewline:!0});if(!p.found)if(p.anchor||p.tag||d)d?.type==="block-seq"?r(p.end,"BAD_INDENT","All sequence items must start at the same column"):r(l,"MISSING_CHAR","Sequence item without - indicator");else{c=p.end,p.comment&&(s.comment=p.comment);continue}let f=d?e(n,d,p,r):t(n,p.end,u,null,p,r);n.schema.compat&&$0.flowIndentCheck(i.indent,d,r),l=f.range[2],s.items.push(f)}return s.range=[i.offset,l,c??l],s}Pg.resolveBlockSeq=C0});var Qr=w(jg=>{"use strict";function L0(e,t,n,i){let r="";if(e){let o=!1,a="";for(let s of e){let{source:l,type:c}=s;switch(c){case"space":o=!0;break;case"comment":{n&&!o&&i(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=l.substring(1)||" ";r?r+=a+u:r=u,a="";break}case"newline":r&&(a+=l),o=!0;break;default:i(s,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=l.length}}return{comment:r,offset:t}}jg.resolveEnd=L0});var qg=w(Zg=>{"use strict";var M0=Re(),U0=pr(),zg=mr(),x0=gr(),P0=Qr(),Fg=Wi(),D0=Ns(),j0=iu(),ou="Block collections are not allowed within flow collections",au=e=>e&&(e.type==="block-map"||e.type==="block-seq");function z0({composeNode:e,composeEmptyNode:t},n,i,r,o){let a=i.start.source==="{",s=a?"flow map":"flow sequence",l=o?.nodeClass??(a?zg.YAMLMap:x0.YAMLSeq),c=new l(n.schema);c.flow=!0;let u=n.atRoot;u&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let d=i.offset+i.start.source.length;for(let v=0;v<i.items.length;++v){let E=i.items[v],{start:U,key:F,sep:Z,value:V}=E,ce=Fg.resolveProps(U,{flow:s,indicator:"explicit-key-ind",next:F??Z?.[0],offset:d,onError:r,parentIndent:i.indent,startOnNewline:!1});if(!ce.found){if(!ce.anchor&&!ce.tag&&!Z&&!V){v===0&&ce.comma?r(ce.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${s}`):v<i.items.length-1&&r(ce.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${s}`),ce.comment&&(c.comment?c.comment+=`
130
- `+ce.comment:c.comment=ce.comment),d=ce.end;continue}!a&&n.options.strict&&D0.containsNewline(F)&&r(F,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(v===0)ce.comma&&r(ce.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${s}`);else if(ce.comma||r(ce.start,"MISSING_CHAR",`Missing , between ${s} items`),ce.comment){let Se="";e:for(let O of U)switch(O.type){case"comma":case"space":break;case"comment":Se=O.source.substring(1);break e;default:break e}if(Se){let O=c.items[c.items.length-1];M0.isPair(O)&&(O=O.value??O.key),O.comment?O.comment+=`
131
- `+Se:O.comment=Se,ce.comment=ce.comment.substring(Se.length+1)}}if(!a&&!Z&&!ce.found){let Se=V?e(n,V,ce,r):t(n,ce.end,Z,null,ce,r);c.items.push(Se),d=Se.range[2],au(V)&&r(Se.range,"BLOCK_IN_FLOW",ou)}else{n.atKey=!0;let Se=ce.end,O=F?e(n,F,ce,r):t(n,Se,U,null,ce,r);au(F)&&r(O.range,"BLOCK_IN_FLOW",ou),n.atKey=!1;let D=Fg.resolveProps(Z??[],{flow:s,indicator:"map-value-ind",next:V,offset:O.range[2],onError:r,parentIndent:i.indent,startOnNewline:!1});if(D.found){if(!a&&!ce.found&&n.options.strict){if(Z)for(let z of Z){if(z===D.found)break;if(z.type==="newline"){r(z,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}ce.start<D.found.offset-1024&&r(D.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else V&&("source"in V&&V.source?.[0]===":"?r(V,"MISSING_CHAR",`Missing space after : in ${s}`):r(D.start,"MISSING_CHAR",`Missing , or : between ${s} items`));let M=V?e(n,V,D,r):D.found?t(n,D.end,Z,null,D,r):null;M?au(V)&&r(M.range,"BLOCK_IN_FLOW",ou):D.comment&&(O.comment?O.comment+=`
132
- `+D.comment:O.comment=D.comment);let C=new U0.Pair(O,M);if(n.options.keepSourceTokens&&(C.srcToken=E),a){let z=c;j0.mapIncludes(n,z.items,O)&&r(Se,"DUPLICATE_KEY","Map keys must be unique"),z.items.push(C)}else{let z=new zg.YAMLMap(n.schema);z.flow=!0,z.items.push(C);let W=(M??O).range;z.range=[O.range[0],W[1],W[2]],c.items.push(z)}d=M?M.range[2]:D.end}}let p=a?"}":"]",[f,...S]=i.end,h=d;if(f?.source===p)h=f.offset+f.source.length;else{let v=s[0].toUpperCase()+s.substring(1),E=u?`${v} must end with a ${p}`:`${v} in block collection must be sufficiently indented and end with a ${p}`;r(d,u?"MISSING_CHAR":"BAD_INDENT",E),f&&f.source.length!==1&&S.unshift(f)}if(S.length>0){let v=P0.resolveEnd(S,h,n.options.strict,r);v.comment&&(c.comment?c.comment+=`
133
- `+v.comment:c.comment=v.comment),c.range=[i.offset,h,v.offset]}else c.range=[i.offset,h,h];return c}Zg.resolveFlowCollection=z0});var Wg=w(Vg=>{"use strict";var F0=Re(),Z0=rt(),q0=mr(),V0=gr(),W0=xg(),B0=Dg(),H0=qg();function su(e,t,n,i,r,o){let a=n.type==="block-map"?W0.resolveBlockMap(e,t,n,i,o):n.type==="block-seq"?B0.resolveBlockSeq(e,t,n,i,o):H0.resolveFlowCollection(e,t,n,i,o),s=a.constructor;return r==="!"||r===s.tagName?(a.tag=s.tagName,a):(r&&(a.tag=r),a)}function J0(e,t,n,i,r){let o=i.tag,a=o?t.directives.tagName(o.source,p=>r(o,"TAG_RESOLVE_FAILED",p)):null;if(n.type==="block-seq"){let{anchor:p,newlineAfterProp:f}=i,S=p&&o?p.offset>o.offset?p:o:p??o;S&&(!f||f.offset<S.offset)&&r(S,"MISSING_CHAR","Missing newline after block sequence props")}let s=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!o||!a||a==="!"||a===q0.YAMLMap.tagName&&s==="map"||a===V0.YAMLSeq.tagName&&s==="seq")return su(e,t,n,r,a);let l=t.schema.tags.find(p=>p.tag===a&&p.collection===s);if(!l){let p=t.schema.knownTags[a];if(p?.collection===s)t.schema.tags.push(Object.assign({},p,{default:!1})),l=p;else return p?r(o,"BAD_COLLECTION_TYPE",`${p.tag} used for ${s} collection, but expects ${p.collection??"scalar"}`,!0):r(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),su(e,t,n,r,a)}let c=su(e,t,n,r,a,l),u=l.resolve?.(c,p=>r(o,"TAG_RESOLVE_FAILED",p),t.options)??c,d=F0.isNode(u)?u:new Z0.Scalar(u);return d.range=c.range,d.tag=a,l?.format&&(d.format=l.format),d}Vg.composeCollection=J0});var lu=w(Bg=>{"use strict";var cu=rt();function K0(e,t,n){let i=t.offset,r=G0(t,e.options.strict,n);if(!r)return{value:"",type:null,comment:"",range:[i,i,i]};let o=r.mode===">"?cu.Scalar.BLOCK_FOLDED:cu.Scalar.BLOCK_LITERAL,a=t.source?X0(t.source):[],s=a.length;for(let h=a.length-1;h>=0;--h){let v=a[h][1];if(v===""||v==="\r")s=h;else break}if(s===0){let h=r.chomp==="+"&&a.length>0?`
126
+ `}};qi.YAMLError=Zi;qi.YAMLParseError=nu;qi.YAMLWarning=ru;qi.prettifyError=k0});var Wi=w(Tg=>{"use strict";function O0(e,{flow:t,indicator:n,next:i,offset:r,onError:o,parentIndent:a,startOnNewline:s}){let l=!1,c=s,u=s,d="",p="",f=!1,S=!1,h=null,v=null,E=null,x=null,F=null,Z=null,W=null;for(let O of e)switch(S&&(O.type!=="space"&&O.type!=="newline"&&O.type!=="comma"&&o(O.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),S=!1),h&&(c&&O.type!=="comment"&&O.type!=="newline"&&o(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),h=null),O.type){case"space":!t&&(n!=="doc-start"||i?.type!=="flow-collection")&&O.source.includes(" ")&&(h=O),u=!0;break;case"comment":{u||o(O,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let U=O.source.substring(1)||" ";d?d+=p+U:d=U,p="",c=!1;break}case"newline":c?d?d+=O.source:(!Z||n!=="seq-item-ind")&&(l=!0):p+=O.source,c=!0,f=!0,(v||E)&&(x=O),u=!0;break;case"anchor":v&&o(O,"MULTIPLE_ANCHORS","A node can have at most one anchor"),O.source.endsWith(":")&&o(O.offset+O.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),v=O,W??(W=O.offset),c=!1,u=!1,S=!0;break;case"tag":{E&&o(O,"MULTIPLE_TAGS","A node can have at most one tag"),E=O,W??(W=O.offset),c=!1,u=!1,S=!0;break}case n:(v||E)&&o(O,"BAD_PROP_ORDER",`Anchors and tags must be after the ${O.source} indicator`),Z&&o(O,"UNEXPECTED_TOKEN",`Unexpected ${O.source} in ${t??"collection"}`),Z=O,c=n==="seq-item-ind"||n==="explicit-key-ind",u=!1;break;case"comma":if(t){F&&o(O,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),F=O,c=!1,u=!1;break}default:o(O,"UNEXPECTED_TOKEN",`Unexpected ${O.type} token`),c=!1,u=!1}let ue=e[e.length-1],be=ue?ue.offset+ue.source.length:r;return S&&i&&i.type!=="space"&&i.type!=="newline"&&i.type!=="comma"&&(i.type!=="scalar"||i.source!=="")&&o(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h&&(c&&h.indent<=a||i?.type==="block-map"||i?.type==="block-seq")&&o(h,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:F,found:Z,spaceBefore:l,comment:d,hasNewline:f,anchor:v,tag:E,newlineAfterProp:x,end:be,start:W??be}}Tg.resolveProps=O0});var Is=w(Ng=>{"use strict";function iu(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
127
+ `))return!0;if(e.end){for(let t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(let t of e.items){for(let n of t.start)if(n.type==="newline")return!0;if(t.sep){for(let n of t.sep)if(n.type==="newline")return!0}if(iu(t.key)||iu(t.value))return!0}return!1;default:return!0}}Ng.containsNewline=iu});var ou=w(Ig=>{"use strict";var w0=Is();function A0(e,t,n){if(t?.type==="flow-collection"){let i=t.end[0];i.indent===e&&(i.source==="]"||i.source==="}")&&w0.containsNewline(t)&&n(i,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}Ig.flowIndentCheck=A0});var au=w($g=>{"use strict";var Rg=Re();function T0(e,t,n){let{uniqueKeys:i}=e.options;if(i===!1)return!1;let r=typeof i=="function"?i:(o,a)=>o===a||Rg.isScalar(o)&&Rg.isScalar(a)&&o.value===a.value;return t.some(o=>r(o.key,n))}$g.mapIncludes=T0});var Dg=w(xg=>{"use strict";var Cg=pr(),N0=mr(),Lg=Wi(),I0=Is(),Mg=ou(),R0=au(),Ug="All mapping items must start at the same column";function $0({composeNode:e,composeEmptyNode:t},n,i,r,o){let a=o?.nodeClass??N0.YAMLMap,s=new a(n.schema);n.atRoot&&(n.atRoot=!1);let l=i.offset,c=null;for(let u of i.items){let{start:d,key:p,sep:f,value:S}=u,h=Lg.resolveProps(d,{indicator:"explicit-key-ind",next:p??f?.[0],offset:l,onError:r,parentIndent:i.indent,startOnNewline:!0}),v=!h.found;if(v){if(p&&(p.type==="block-seq"?r(l,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==i.indent&&r(l,"BAD_INDENT",Ug)),!h.anchor&&!h.tag&&!f){c=h.end,h.comment&&(s.comment?s.comment+=`
128
+ `+h.comment:s.comment=h.comment);continue}(h.newlineAfterProp||I0.containsNewline(p))&&r(p??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else h.found?.indent!==i.indent&&r(l,"BAD_INDENT",Ug);n.atKey=!0;let E=h.end,x=p?e(n,p,h,r):t(n,E,d,null,h,r);n.schema.compat&&Mg.flowIndentCheck(i.indent,p,r),n.atKey=!1,R0.mapIncludes(n,s.items,x)&&r(E,"DUPLICATE_KEY","Map keys must be unique");let F=Lg.resolveProps(f??[],{indicator:"map-value-ind",next:S,offset:x.range[2],onError:r,parentIndent:i.indent,startOnNewline:!p||p.type==="block-scalar"});if(l=F.end,F.found){v&&(S?.type==="block-map"&&!F.hasNewline&&r(l,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&h.start<F.found.offset-1024&&r(x.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));let Z=S?e(n,S,F,r):t(n,l,f,null,F,r);n.schema.compat&&Mg.flowIndentCheck(i.indent,S,r),l=Z.range[2];let W=new Cg.Pair(x,Z);n.options.keepSourceTokens&&(W.srcToken=u),s.items.push(W)}else{v&&r(x.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),F.comment&&(x.comment?x.comment+=`
129
+ `+F.comment:x.comment=F.comment);let Z=new Cg.Pair(x);n.options.keepSourceTokens&&(Z.srcToken=u),s.items.push(Z)}}return c&&c<l&&r(c,"IMPOSSIBLE","Map comment with trailing content"),s.range=[i.offset,l,c??l],s}xg.resolveBlockMap=$0});var jg=w(Pg=>{"use strict";var C0=gr(),L0=Wi(),M0=ou();function U0({composeNode:e,composeEmptyNode:t},n,i,r,o){let a=o?.nodeClass??C0.YAMLSeq,s=new a(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let l=i.offset,c=null;for(let{start:u,value:d}of i.items){let p=L0.resolveProps(u,{indicator:"seq-item-ind",next:d,offset:l,onError:r,parentIndent:i.indent,startOnNewline:!0});if(!p.found)if(p.anchor||p.tag||d)d?.type==="block-seq"?r(p.end,"BAD_INDENT","All sequence items must start at the same column"):r(l,"MISSING_CHAR","Sequence item without - indicator");else{c=p.end,p.comment&&(s.comment=p.comment);continue}let f=d?e(n,d,p,r):t(n,p.end,u,null,p,r);n.schema.compat&&M0.flowIndentCheck(i.indent,d,r),l=f.range[2],s.items.push(f)}return s.range=[i.offset,l,c??l],s}Pg.resolveBlockSeq=U0});var Qr=w(zg=>{"use strict";function x0(e,t,n,i){let r="";if(e){let o=!1,a="";for(let s of e){let{source:l,type:c}=s;switch(c){case"space":o=!0;break;case"comment":{n&&!o&&i(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let u=l.substring(1)||" ";r?r+=a+u:r=u,a="";break}case"newline":r&&(a+=l),o=!0;break;default:i(s,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}t+=l.length}}return{comment:r,offset:t}}zg.resolveEnd=x0});var Vg=w(qg=>{"use strict";var D0=Re(),P0=pr(),Fg=mr(),j0=gr(),z0=Qr(),Zg=Wi(),F0=Is(),Z0=au(),su="Block collections are not allowed within flow collections",cu=e=>e&&(e.type==="block-map"||e.type==="block-seq");function q0({composeNode:e,composeEmptyNode:t},n,i,r,o){let a=i.start.source==="{",s=a?"flow map":"flow sequence",l=o?.nodeClass??(a?Fg.YAMLMap:j0.YAMLSeq),c=new l(n.schema);c.flow=!0;let u=n.atRoot;u&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let d=i.offset+i.start.source.length;for(let v=0;v<i.items.length;++v){let E=i.items[v],{start:x,key:F,sep:Z,value:W}=E,ue=Zg.resolveProps(x,{flow:s,indicator:"explicit-key-ind",next:F??Z?.[0],offset:d,onError:r,parentIndent:i.indent,startOnNewline:!1});if(!ue.found){if(!ue.anchor&&!ue.tag&&!Z&&!W){v===0&&ue.comma?r(ue.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${s}`):v<i.items.length-1&&r(ue.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${s}`),ue.comment&&(c.comment?c.comment+=`
130
+ `+ue.comment:c.comment=ue.comment),d=ue.end;continue}!a&&n.options.strict&&F0.containsNewline(F)&&r(F,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(v===0)ue.comma&&r(ue.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${s}`);else if(ue.comma||r(ue.start,"MISSING_CHAR",`Missing , between ${s} items`),ue.comment){let be="";e:for(let O of x)switch(O.type){case"comma":case"space":break;case"comment":be=O.source.substring(1);break e;default:break e}if(be){let O=c.items[c.items.length-1];D0.isPair(O)&&(O=O.value??O.key),O.comment?O.comment+=`
131
+ `+be:O.comment=be,ue.comment=ue.comment.substring(be.length+1)}}if(!a&&!Z&&!ue.found){let be=W?e(n,W,ue,r):t(n,ue.end,Z,null,ue,r);c.items.push(be),d=be.range[2],cu(W)&&r(be.range,"BLOCK_IN_FLOW",su)}else{n.atKey=!0;let be=ue.end,O=F?e(n,F,ue,r):t(n,be,x,null,ue,r);cu(F)&&r(O.range,"BLOCK_IN_FLOW",su),n.atKey=!1;let U=Zg.resolveProps(Z??[],{flow:s,indicator:"map-value-ind",next:W,offset:O.range[2],onError:r,parentIndent:i.indent,startOnNewline:!1});if(U.found){if(!a&&!ue.found&&n.options.strict){if(Z)for(let z of Z){if(z===U.found)break;if(z.type==="newline"){r(z,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}ue.start<U.found.offset-1024&&r(U.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else W&&("source"in W&&W.source?.[0]===":"?r(W,"MISSING_CHAR",`Missing space after : in ${s}`):r(U.start,"MISSING_CHAR",`Missing , or : between ${s} items`));let M=W?e(n,W,U,r):U.found?t(n,U.end,Z,null,U,r):null;M?cu(W)&&r(M.range,"BLOCK_IN_FLOW",su):U.comment&&(O.comment?O.comment+=`
132
+ `+U.comment:O.comment=U.comment);let C=new P0.Pair(O,M);if(n.options.keepSourceTokens&&(C.srcToken=E),a){let z=c;Z0.mapIncludes(n,z.items,O)&&r(be,"DUPLICATE_KEY","Map keys must be unique"),z.items.push(C)}else{let z=new Fg.YAMLMap(n.schema);z.flow=!0,z.items.push(C);let V=(M??O).range;z.range=[O.range[0],V[1],V[2]],c.items.push(z)}d=M?M.range[2]:U.end}}let p=a?"}":"]",[f,...S]=i.end,h=d;if(f?.source===p)h=f.offset+f.source.length;else{let v=s[0].toUpperCase()+s.substring(1),E=u?`${v} must end with a ${p}`:`${v} in block collection must be sufficiently indented and end with a ${p}`;r(d,u?"MISSING_CHAR":"BAD_INDENT",E),f&&f.source.length!==1&&S.unshift(f)}if(S.length>0){let v=z0.resolveEnd(S,h,n.options.strict,r);v.comment&&(c.comment?c.comment+=`
133
+ `+v.comment:c.comment=v.comment),c.range=[i.offset,h,v.offset]}else c.range=[i.offset,h,h];return c}qg.resolveFlowCollection=q0});var Bg=w(Wg=>{"use strict";var V0=Re(),W0=rt(),B0=mr(),H0=gr(),J0=Dg(),K0=jg(),G0=Vg();function lu(e,t,n,i,r,o){let a=n.type==="block-map"?J0.resolveBlockMap(e,t,n,i,o):n.type==="block-seq"?K0.resolveBlockSeq(e,t,n,i,o):G0.resolveFlowCollection(e,t,n,i,o),s=a.constructor;return r==="!"||r===s.tagName?(a.tag=s.tagName,a):(r&&(a.tag=r),a)}function X0(e,t,n,i,r){let o=i.tag,a=o?t.directives.tagName(o.source,p=>r(o,"TAG_RESOLVE_FAILED",p)):null;if(n.type==="block-seq"){let{anchor:p,newlineAfterProp:f}=i,S=p&&o?p.offset>o.offset?p:o:p??o;S&&(!f||f.offset<S.offset)&&r(S,"MISSING_CHAR","Missing newline after block sequence props")}let s=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!o||!a||a==="!"||a===B0.YAMLMap.tagName&&s==="map"||a===H0.YAMLSeq.tagName&&s==="seq")return lu(e,t,n,r,a);let l=t.schema.tags.find(p=>p.tag===a&&p.collection===s);if(!l){let p=t.schema.knownTags[a];if(p?.collection===s)t.schema.tags.push(Object.assign({},p,{default:!1})),l=p;else return p?r(o,"BAD_COLLECTION_TYPE",`${p.tag} used for ${s} collection, but expects ${p.collection??"scalar"}`,!0):r(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,!0),lu(e,t,n,r,a)}let c=lu(e,t,n,r,a,l),u=l.resolve?.(c,p=>r(o,"TAG_RESOLVE_FAILED",p),t.options)??c,d=V0.isNode(u)?u:new W0.Scalar(u);return d.range=c.range,d.tag=a,l?.format&&(d.format=l.format),d}Wg.composeCollection=X0});var du=w(Hg=>{"use strict";var uu=rt();function Y0(e,t,n){let i=t.offset,r=Q0(t,e.options.strict,n);if(!r)return{value:"",type:null,comment:"",range:[i,i,i]};let o=r.mode===">"?uu.Scalar.BLOCK_FOLDED:uu.Scalar.BLOCK_LITERAL,a=t.source?eU(t.source):[],s=a.length;for(let h=a.length-1;h>=0;--h){let v=a[h][1];if(v===""||v==="\r")s=h;else break}if(s===0){let h=r.chomp==="+"&&a.length>0?`
134
134
  `.repeat(Math.max(1,a.length-1)):"",v=i+r.length;return t.source&&(v+=t.source.length),{value:h,type:o,comment:r.comment,range:[i,v,v]}}let l=t.indent+r.indent,c=t.offset+r.length,u=0;for(let h=0;h<s;++h){let[v,E]=a[h];if(E===""||E==="\r")r.indent===0&&v.length>l&&(l=v.length);else{v.length<l&&n(c+v.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),r.indent===0&&(l=v.length),u=h,l===0&&!e.atRoot&&n(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=v.length+E.length+1}for(let h=a.length-1;h>=s;--h)a[h][0].length>l&&(s=h+1);let d="",p="",f=!1;for(let h=0;h<u;++h)d+=a[h][0].slice(l)+`
135
- `;for(let h=u;h<s;++h){let[v,E]=a[h];c+=v.length+E.length+1;let U=E[E.length-1]==="\r";if(U&&(E=E.slice(0,-1)),E&&v.length<l){let Z=`Block scalar lines must not be less indented than their ${r.indent?"explicit indentation indicator":"first line"}`;n(c-E.length-(U?2:1),"BAD_INDENT",Z),v=""}o===cu.Scalar.BLOCK_LITERAL?(d+=p+v.slice(l)+E,p=`
135
+ `;for(let h=u;h<s;++h){let[v,E]=a[h];c+=v.length+E.length+1;let x=E[E.length-1]==="\r";if(x&&(E=E.slice(0,-1)),E&&v.length<l){let Z=`Block scalar lines must not be less indented than their ${r.indent?"explicit indentation indicator":"first line"}`;n(c-E.length-(x?2:1),"BAD_INDENT",Z),v=""}o===uu.Scalar.BLOCK_LITERAL?(d+=p+v.slice(l)+E,p=`
136
136
  `):v.length>l||E[0]===" "?(p===" "?p=`
137
137
  `:!f&&p===`
138
138
  `&&(p=`
@@ -145,62 +145,62 @@ ${c}
145
145
  `+a[h][0].slice(l);d[d.length-1]!==`
146
146
  `&&(d+=`
147
147
  `);break;default:d+=`
148
- `}let S=i+r.length+t.source.length;return{value:d,type:o,comment:r.comment,range:[i,S,S]}}function G0({offset:e,props:t},n,i){if(t[0].type!=="block-scalar-header")return i(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:r}=t[0],o=r[0],a=0,s="",l=-1;for(let p=1;p<r.length;++p){let f=r[p];if(!s&&(f==="-"||f==="+"))s=f;else{let S=Number(f);!a&&S?a=S:l===-1&&(l=e+p)}}l!==-1&&i(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${r}`);let c=!1,u="",d=r.length;for(let p=1;p<t.length;++p){let f=t[p];switch(f.type){case"space":c=!0;case"newline":d+=f.source.length;break;case"comment":n&&!c&&i(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),d+=f.source.length,u=f.source.substring(1);break;case"error":i(f,"UNEXPECTED_TOKEN",f.message),d+=f.source.length;break;default:{let S=`Unexpected token in block scalar header: ${f.type}`;i(f,"UNEXPECTED_TOKEN",S);let h=f.source;h&&typeof h=="string"&&(d+=h.length)}}}return{mode:o,indent:a,chomp:s,comment:u,length:d}}function X0(e){let t=e.split(/\n( *)/),n=t[0],i=n.match(/^( *)/),o=[i?.[1]?[i[1],n.slice(i[1].length)]:["",n]];for(let a=1;a<t.length;a+=2)o.push([t[a],t[a+1]]);return o}Bg.resolveBlockScalar=K0});var du=w(Jg=>{"use strict";var uu=rt(),Y0=Qr();function Q0(e,t,n){let{offset:i,type:r,source:o,end:a}=e,s,l,c=(p,f,S)=>n(i+p,f,S);switch(r){case"scalar":s=uu.Scalar.PLAIN,l=eU(o,c);break;case"single-quoted-scalar":s=uu.Scalar.QUOTE_SINGLE,l=tU(o,c);break;case"double-quoted-scalar":s=uu.Scalar.QUOTE_DOUBLE,l=nU(o,c);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${r}`),{value:"",type:null,comment:"",range:[i,i+o.length,i+o.length]}}let u=i+o.length,d=Y0.resolveEnd(a,u,t,n);return{value:l,type:s,comment:d.comment,range:[i,u,d.offset]}}function eU(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${e[0]}`;break}case"@":case"`":{n=`reserved character ${e[0]}`;break}}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),Hg(e)}function tU(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),Hg(e.slice(1,-1)).replace(/''/g,"'")}function Hg(e){let t,n;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
148
+ `}let S=i+r.length+t.source.length;return{value:d,type:o,comment:r.comment,range:[i,S,S]}}function Q0({offset:e,props:t},n,i){if(t[0].type!=="block-scalar-header")return i(t[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:r}=t[0],o=r[0],a=0,s="",l=-1;for(let p=1;p<r.length;++p){let f=r[p];if(!s&&(f==="-"||f==="+"))s=f;else{let S=Number(f);!a&&S?a=S:l===-1&&(l=e+p)}}l!==-1&&i(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${r}`);let c=!1,u="",d=r.length;for(let p=1;p<t.length;++p){let f=t[p];switch(f.type){case"space":c=!0;case"newline":d+=f.source.length;break;case"comment":n&&!c&&i(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),d+=f.source.length,u=f.source.substring(1);break;case"error":i(f,"UNEXPECTED_TOKEN",f.message),d+=f.source.length;break;default:{let S=`Unexpected token in block scalar header: ${f.type}`;i(f,"UNEXPECTED_TOKEN",S);let h=f.source;h&&typeof h=="string"&&(d+=h.length)}}}return{mode:o,indent:a,chomp:s,comment:u,length:d}}function eU(e){let t=e.split(/\n( *)/),n=t[0],i=n.match(/^( *)/),o=[i?.[1]?[i[1],n.slice(i[1].length)]:["",n]];for(let a=1;a<t.length;a+=2)o.push([t[a],t[a+1]]);return o}Hg.resolveBlockScalar=Y0});var pu=w(Kg=>{"use strict";var _u=rt(),tU=Qr();function nU(e,t,n){let{offset:i,type:r,source:o,end:a}=e,s,l,c=(p,f,S)=>n(i+p,f,S);switch(r){case"scalar":s=_u.Scalar.PLAIN,l=rU(o,c);break;case"single-quoted-scalar":s=_u.Scalar.QUOTE_SINGLE,l=iU(o,c);break;case"double-quoted-scalar":s=_u.Scalar.QUOTE_DOUBLE,l=oU(o,c);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${r}`),{value:"",type:null,comment:"",range:[i,i+o.length,i+o.length]}}let u=i+o.length,d=tU.resolveEnd(a,u,t,n);return{value:l,type:s,comment:d.comment,range:[i,u,d.offset]}}function rU(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${e[0]}`;break}case"@":case"`":{n=`reserved character ${e[0]}`;break}}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),Jg(e)}function iU(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),Jg(e.slice(1,-1)).replace(/''/g,"'")}function Jg(e){let t,n;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
149
149
  `,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
150
150
  `,"sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let i=t.exec(e);if(!i)return e;let r=i[1],o=" ",a=t.lastIndex;for(n.lastIndex=a;i=n.exec(e);)i[1]===""?o===`
151
151
  `?r+=o:o=`
152
- `:(r+=o+i[1],o=" "),a=n.lastIndex;let s=/[ \t]*(.*)/sy;return s.lastIndex=a,i=s.exec(e),r+o+(i?.[1]??"")}function nU(e,t){let n="";for(let i=1;i<e.length-1;++i){let r=e[i];if(!(r==="\r"&&e[i+1]===`
152
+ `:(r+=o+i[1],o=" "),a=n.lastIndex;let s=/[ \t]*(.*)/sy;return s.lastIndex=a,i=s.exec(e),r+o+(i?.[1]??"")}function oU(e,t){let n="";for(let i=1;i<e.length-1;++i){let r=e[i];if(!(r==="\r"&&e[i+1]===`
153
153
  `))if(r===`
154
- `){let{fold:o,offset:a}=rU(e,i);n+=o,i=a}else if(r==="\\"){let o=e[++i],a=iU[o];if(a)n+=a;else if(o===`
154
+ `){let{fold:o,offset:a}=aU(e,i);n+=o,i=a}else if(r==="\\"){let o=e[++i],a=sU[o];if(a)n+=a;else if(o===`
155
155
  `)for(o=e[i+1];o===" "||o===" ";)o=e[++i+1];else if(o==="\r"&&e[i+1]===`
156
- `)for(o=e[++i+1];o===" "||o===" ";)o=e[++i+1];else if(o==="x"||o==="u"||o==="U"){let s=o==="x"?2:o==="u"?4:8;n+=oU(e,i+1,s,t),i+=s}else{let s=e.substr(i-1,2);t(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),n+=s}}else if(r===" "||r===" "){let o=i,a=e[i+1];for(;a===" "||a===" ";)a=e[++i+1];a!==`
156
+ `)for(o=e[++i+1];o===" "||o===" ";)o=e[++i+1];else if(o==="x"||o==="u"||o==="U"){let s=o==="x"?2:o==="u"?4:8;n+=cU(e,i+1,s,t),i+=s}else{let s=e.substr(i-1,2);t(i-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),n+=s}}else if(r===" "||r===" "){let o=i,a=e[i+1];for(;a===" "||a===" ";)a=e[++i+1];a!==`
157
157
  `&&!(a==="\r"&&e[i+2]===`
158
- `)&&(n+=i>o?e.slice(o,i+1):r)}else n+=r}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}function rU(e,t){let n="",i=e[t+1];for(;(i===" "||i===" "||i===`
158
+ `)&&(n+=i>o?e.slice(o,i+1):r)}else n+=r}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}function aU(e,t){let n="",i=e[t+1];for(;(i===" "||i===" "||i===`
159
159
  `||i==="\r")&&!(i==="\r"&&e[t+2]!==`
160
160
  `);)i===`
161
161
  `&&(n+=`
162
- `),t+=1,i=e[t+1];return n||(n=" "),{fold:n,offset:t}}var iU={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
163
- `,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function oU(e,t,n,i){let r=e.substr(t,n),a=r.length===n&&/^[0-9a-fA-F]+$/.test(r)?parseInt(r,16):NaN;try{return String.fromCodePoint(a)}catch{let s=e.substr(t-2,n+2);return i(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),s}}Jg.resolveFlowScalar=Q0});var Xg=w(Gg=>{"use strict";var wr=Re(),Kg=rt(),aU=lu(),sU=du();function cU(e,t,n,i){let{value:r,type:o,comment:a,range:s}=t.type==="block-scalar"?aU.resolveBlockScalar(e,t,i):sU.resolveFlowScalar(t,e.options.strict,i),l=n?e.directives.tagName(n.source,d=>i(n,"TAG_RESOLVE_FAILED",d)):null,c;e.options.stringKeys&&e.atKey?c=e.schema[wr.SCALAR]:l?c=lU(e.schema,r,l,n,i):t.type==="scalar"?c=uU(e,r,t,i):c=e.schema[wr.SCALAR];let u;try{let d=c.resolve(r,p=>i(n??t,"TAG_RESOLVE_FAILED",p),e.options);u=wr.isScalar(d)?d:new Kg.Scalar(d)}catch(d){let p=d instanceof Error?d.message:String(d);i(n??t,"TAG_RESOLVE_FAILED",p),u=new Kg.Scalar(r)}return u.range=s,u.source=r,o&&(u.type=o),l&&(u.tag=l),c.format&&(u.format=c.format),a&&(u.comment=a),u}function lU(e,t,n,i,r){if(n==="!")return e[wr.SCALAR];let o=[];for(let s of e.tags)if(!s.collection&&s.tag===n)if(s.default&&s.test)o.push(s);else return s;for(let s of o)if(s.test?.test(t))return s;let a=e.knownTags[n];return a&&!a.collection?(e.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(r(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),e[wr.SCALAR])}function uU({atKey:e,directives:t,schema:n},i,r,o){let a=n.tags.find(s=>(s.default===!0||e&&s.default==="key")&&s.test?.test(i))||n[wr.SCALAR];if(n.compat){let s=n.compat.find(l=>l.default&&l.test?.test(i))??n[wr.SCALAR];if(a.tag!==s.tag){let l=t.tagString(a.tag),c=t.tagString(s.tag),u=`Value may be parsed as either ${l} or ${c}`;o(r,"TAG_RESOLVE_FAILED",u,!0)}}return a}Gg.composeScalar=cU});var Qg=w(Yg=>{"use strict";function dU(e,t,n){if(t){n??(n=t.length);for(let i=n-1;i>=0;--i){let r=t[i];switch(r.type){case"space":case"comment":case"newline":e-=r.source.length;continue}for(r=t[++i];r?.type==="space";)e+=r.source.length,r=t[++i];break}}return e}Yg.emptyScalarPosition=dU});var ny=w(pu=>{"use strict";var _U=wi(),pU=Re(),fU=Wg(),ey=Xg(),mU=Qr(),gU=Qg(),yU={composeNode:ty,composeEmptyNode:_u};function ty(e,t,n,i){let r=e.atKey,{spaceBefore:o,comment:a,anchor:s,tag:l}=n,c,u=!0;switch(t.type){case"alias":c=hU(e,t,i),(s||l)&&i(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=ey.composeScalar(e,t,l,i),s&&(c.anchor=s.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=fU.composeCollection(yU,e,t,n,i),s&&(c.anchor=s.source.substring(1))}catch(d){let p=d instanceof Error?d.message:String(d);i(t,"RESOURCE_EXHAUSTION",p)}break;default:{let d=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;i(t,"UNEXPECTED_TOKEN",d),u=!1}}return c??(c=_u(e,t.offset,void 0,null,n,i)),s&&c.anchor===""&&i(s,"BAD_ALIAS","Anchor cannot be an empty string"),r&&e.options.stringKeys&&(!pU.isScalar(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&i(l??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(c.spaceBefore=!0),a&&(t.type==="scalar"&&t.source===""?c.comment=a:c.commentBefore=a),e.options.keepSourceTokens&&u&&(c.srcToken=t),c}function _u(e,t,n,i,{spaceBefore:r,comment:o,anchor:a,tag:s,end:l},c){let u={type:"scalar",offset:gU.emptyScalarPosition(t,n,i),indent:-1,source:""},d=ey.composeScalar(e,u,s,c);return a&&(d.anchor=a.source.substring(1),d.anchor===""&&c(a,"BAD_ALIAS","Anchor cannot be an empty string")),r&&(d.spaceBefore=!0),o&&(d.comment=o,d.range[2]=l),d}function hU({options:e},{offset:t,source:n,end:i},r){let o=new _U.Alias(n.substring(1));o.source===""&&r(t,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&r(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let a=t+n.length,s=mU.resolveEnd(i,a,e.strict,r);return o.range=[t,a,s.offset],s.comment&&(o.comment=s.comment),o}pu.composeEmptyNode=_u;pu.composeNode=ty});var oy=w(iy=>{"use strict";var vU=Fi(),ry=ny(),SU=Qr(),bU=Wi();function EU(e,t,{offset:n,start:i,value:r,end:o},a){let s=Object.assign({_directives:t},e),l=new vU.Document(void 0,s),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=bU.resolveProps(i,{indicator:"doc-start",next:r??o?.[0],offset:n,onError:a,parentIndent:0,startOnNewline:!0});u.found&&(l.directives.docStart=!0,r&&(r.type==="block-map"||r.type==="block-seq")&&!u.hasNewline&&a(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=r?ry.composeNode(c,r,u,a):ry.composeEmptyNode(c,u.end,i,null,u,a);let d=l.contents.range[2],p=SU.resolveEnd(o,d,!1,a);return p.comment&&(l.comment=p.comment),l.range=[n,d,p.offset],l}iy.composeDoc=EU});var mu=w(cy=>{"use strict";var kU=require("process"),OU=el(),wU=Fi(),Bi=Vi(),ay=Re(),AU=oy(),TU=Qr();function Hi(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+(typeof n=="string"?n.length:1)]}function sy(e){let t="",n=!1,i=!1;for(let r=0;r<e.length;++r){let o=e[r];switch(o[0]){case"#":t+=(t===""?"":i?`
162
+ `),t+=1,i=e[t+1];return n||(n=" "),{fold:n,offset:t}}var sU={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
163
+ `,r:"\r",t:" ",v:"\v",N:"\x85",_:"\xA0",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function cU(e,t,n,i){let r=e.substr(t,n),a=r.length===n&&/^[0-9a-fA-F]+$/.test(r)?parseInt(r,16):NaN;try{return String.fromCodePoint(a)}catch{let s=e.substr(t-2,n+2);return i(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),s}}Kg.resolveFlowScalar=nU});var Yg=w(Xg=>{"use strict";var Ar=Re(),Gg=rt(),lU=du(),uU=pu();function dU(e,t,n,i){let{value:r,type:o,comment:a,range:s}=t.type==="block-scalar"?lU.resolveBlockScalar(e,t,i):uU.resolveFlowScalar(t,e.options.strict,i),l=n?e.directives.tagName(n.source,d=>i(n,"TAG_RESOLVE_FAILED",d)):null,c;e.options.stringKeys&&e.atKey?c=e.schema[Ar.SCALAR]:l?c=_U(e.schema,r,l,n,i):t.type==="scalar"?c=pU(e,r,t,i):c=e.schema[Ar.SCALAR];let u;try{let d=c.resolve(r,p=>i(n??t,"TAG_RESOLVE_FAILED",p),e.options);u=Ar.isScalar(d)?d:new Gg.Scalar(d)}catch(d){let p=d instanceof Error?d.message:String(d);i(n??t,"TAG_RESOLVE_FAILED",p),u=new Gg.Scalar(r)}return u.range=s,u.source=r,o&&(u.type=o),l&&(u.tag=l),c.format&&(u.format=c.format),a&&(u.comment=a),u}function _U(e,t,n,i,r){if(n==="!")return e[Ar.SCALAR];let o=[];for(let s of e.tags)if(!s.collection&&s.tag===n)if(s.default&&s.test)o.push(s);else return s;for(let s of o)if(s.test?.test(t))return s;let a=e.knownTags[n];return a&&!a.collection?(e.tags.push(Object.assign({},a,{default:!1,test:void 0})),a):(r(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),e[Ar.SCALAR])}function pU({atKey:e,directives:t,schema:n},i,r,o){let a=n.tags.find(s=>(s.default===!0||e&&s.default==="key")&&s.test?.test(i))||n[Ar.SCALAR];if(n.compat){let s=n.compat.find(l=>l.default&&l.test?.test(i))??n[Ar.SCALAR];if(a.tag!==s.tag){let l=t.tagString(a.tag),c=t.tagString(s.tag),u=`Value may be parsed as either ${l} or ${c}`;o(r,"TAG_RESOLVE_FAILED",u,!0)}}return a}Xg.composeScalar=dU});var ey=w(Qg=>{"use strict";function fU(e,t,n){if(t){n??(n=t.length);for(let i=n-1;i>=0;--i){let r=t[i];switch(r.type){case"space":case"comment":case"newline":e-=r.source.length;continue}for(r=t[++i];r?.type==="space";)e+=r.source.length,r=t[++i];break}}return e}Qg.emptyScalarPosition=fU});var ry=w(mu=>{"use strict";var mU=wi(),gU=Re(),yU=Bg(),ty=Yg(),hU=Qr(),vU=ey(),SU={composeNode:ny,composeEmptyNode:fu};function ny(e,t,n,i){let r=e.atKey,{spaceBefore:o,comment:a,anchor:s,tag:l}=n,c,u=!0;switch(t.type){case"alias":c=bU(e,t,i),(s||l)&&i(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=ty.composeScalar(e,t,l,i),s&&(c.anchor=s.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=yU.composeCollection(SU,e,t,n,i),s&&(c.anchor=s.source.substring(1))}catch(d){let p=d instanceof Error?d.message:String(d);i(t,"RESOURCE_EXHAUSTION",p)}break;default:{let d=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;i(t,"UNEXPECTED_TOKEN",d),u=!1}}return c??(c=fu(e,t.offset,void 0,null,n,i)),s&&c.anchor===""&&i(s,"BAD_ALIAS","Anchor cannot be an empty string"),r&&e.options.stringKeys&&(!gU.isScalar(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&i(l??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(c.spaceBefore=!0),a&&(t.type==="scalar"&&t.source===""?c.comment=a:c.commentBefore=a),e.options.keepSourceTokens&&u&&(c.srcToken=t),c}function fu(e,t,n,i,{spaceBefore:r,comment:o,anchor:a,tag:s,end:l},c){let u={type:"scalar",offset:vU.emptyScalarPosition(t,n,i),indent:-1,source:""},d=ty.composeScalar(e,u,s,c);return a&&(d.anchor=a.source.substring(1),d.anchor===""&&c(a,"BAD_ALIAS","Anchor cannot be an empty string")),r&&(d.spaceBefore=!0),o&&(d.comment=o,d.range[2]=l),d}function bU({options:e},{offset:t,source:n,end:i},r){let o=new mU.Alias(n.substring(1));o.source===""&&r(t,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&r(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let a=t+n.length,s=hU.resolveEnd(i,a,e.strict,r);return o.range=[t,a,s.offset],s.comment&&(o.comment=s.comment),o}mu.composeEmptyNode=fu;mu.composeNode=ny});var ay=w(oy=>{"use strict";var EU=Fi(),iy=ry(),kU=Qr(),OU=Wi();function wU(e,t,{offset:n,start:i,value:r,end:o},a){let s=Object.assign({_directives:t},e),l=new EU.Document(void 0,s),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},u=OU.resolveProps(i,{indicator:"doc-start",next:r??o?.[0],offset:n,onError:a,parentIndent:0,startOnNewline:!0});u.found&&(l.directives.docStart=!0,r&&(r.type==="block-map"||r.type==="block-seq")&&!u.hasNewline&&a(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=r?iy.composeNode(c,r,u,a):iy.composeEmptyNode(c,u.end,i,null,u,a);let d=l.contents.range[2],p=kU.resolveEnd(o,d,!1,a);return p.comment&&(l.comment=p.comment),l.range=[n,d,p.offset],l}oy.composeDoc=wU});var yu=w(ly=>{"use strict";var AU=require("process"),TU=nl(),NU=Fi(),Bi=Vi(),sy=Re(),IU=ay(),RU=Qr();function Hi(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];let{offset:t,source:n}=e;return[t,t+(typeof n=="string"?n.length:1)]}function cy(e){let t="",n=!1,i=!1;for(let r=0;r<e.length;++r){let o=e[r];switch(o[0]){case"#":t+=(t===""?"":i?`
164
164
 
165
165
  `:`
166
- `)+(o.substring(1)||" "),n=!0,i=!1;break;case"%":e[r+1]?.[0]!=="#"&&(r+=1),n=!1;break;default:n||(i=!0),n=!1}}return{comment:t,afterEmptyLine:i}}var fu=class{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,i,r,o)=>{let a=Hi(n);o?this.warnings.push(new Bi.YAMLWarning(a,i,r)):this.errors.push(new Bi.YAMLParseError(a,i,r))},this.directives=new OU.Directives({version:t.version||"1.2"}),this.options=t}decorate(t,n){let{comment:i,afterEmptyLine:r}=sy(this.prelude);if(i){let o=t.contents;if(n)t.comment=t.comment?`${t.comment}
167
- ${i}`:i;else if(r||t.directives.docStart||!o)t.commentBefore=i;else if(ay.isCollection(o)&&!o.flow&&o.items.length>0){let a=o.items[0];ay.isPair(a)&&(a=a.key);let s=a.commentBefore;a.commentBefore=s?`${i}
166
+ `)+(o.substring(1)||" "),n=!0,i=!1;break;case"%":e[r+1]?.[0]!=="#"&&(r+=1),n=!1;break;default:n||(i=!0),n=!1}}return{comment:t,afterEmptyLine:i}}var gu=class{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,i,r,o)=>{let a=Hi(n);o?this.warnings.push(new Bi.YAMLWarning(a,i,r)):this.errors.push(new Bi.YAMLParseError(a,i,r))},this.directives=new TU.Directives({version:t.version||"1.2"}),this.options=t}decorate(t,n){let{comment:i,afterEmptyLine:r}=cy(this.prelude);if(i){let o=t.contents;if(n)t.comment=t.comment?`${t.comment}
167
+ ${i}`:i;else if(r||t.directives.docStart||!o)t.commentBefore=i;else if(sy.isCollection(o)&&!o.flow&&o.items.length>0){let a=o.items[0];sy.isPair(a)&&(a=a.key);let s=a.commentBefore;a.commentBefore=s?`${i}
168
168
  ${s}`:i}else{let a=o.commentBefore;o.commentBefore=a?`${i}
169
- ${a}`:i}}if(n){for(let o=0;o<this.errors.length;++o)t.errors.push(this.errors[o]);for(let o=0;o<this.warnings.length;++o)t.warnings.push(this.warnings[o])}else t.errors=this.errors,t.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:sy(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,n=!1,i=-1){for(let r of t)yield*this.next(r);yield*this.end(n,i)}*next(t){switch(kU.env.LOG_STREAM&&console.dir(t,{depth:null}),t.type){case"directive":this.directives.add(t.source,(n,i,r)=>{let o=Hi(t);o[0]+=n,this.onError(o,"BAD_DIRECTIVE",i,r)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{let n=AU.composeDoc(this.options,this.directives,t,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{let n=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,i=new Bi.YAMLParseError(Hi(t),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(i):this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){let i="Unexpected doc-end without preceding document";this.errors.push(new Bi.YAMLParseError(Hi(t),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;let n=TU.resolveEnd(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){let i=this.doc.comment;this.doc.comment=i?`${i}
170
- ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Bi.YAMLParseError(Hi(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){let i=Object.assign({_directives:this.directives},this.options),r=new wU.Document(void 0,i);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,n,n],this.decorate(r,!1),yield r}}};cy.Composer=fu});var dy=w(Is=>{"use strict";var NU=lu(),IU=du(),RU=Vi(),ly=Ri();function $U(e,t=!0,n){if(e){let i=(r,o,a)=>{let s=typeof r=="number"?r:Array.isArray(r)?r[0]:r.offset;if(n)n(s,o,a);else throw new RU.YAMLParseError([s,s+1],o,a)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return IU.resolveFlowScalar(e,t,i);case"block-scalar":return NU.resolveBlockScalar({options:{strict:t}},e,i)}}return null}function CU(e,t){let{implicitKey:n=!1,indent:i,inFlow:r=!1,offset:o=-1,type:a="PLAIN"}=t,s=ly.stringifyString({type:a,value:e},{implicitKey:n,indent:i>0?" ".repeat(i):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:i,source:`
169
+ ${a}`:i}}if(n){for(let o=0;o<this.errors.length;++o)t.errors.push(this.errors[o]);for(let o=0;o<this.warnings.length;++o)t.warnings.push(this.warnings[o])}else t.errors=this.errors,t.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:cy(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,n=!1,i=-1){for(let r of t)yield*this.next(r);yield*this.end(n,i)}*next(t){switch(AU.env.LOG_STREAM&&console.dir(t,{depth:null}),t.type){case"directive":this.directives.add(t.source,(n,i,r)=>{let o=Hi(t);o[0]+=n,this.onError(o,"BAD_DIRECTIVE",i,r)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{let n=IU.composeDoc(this.options,this.directives,t,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{let n=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,i=new Bi.YAMLParseError(Hi(t),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(i):this.doc.errors.push(i);break}case"doc-end":{if(!this.doc){let i="Unexpected doc-end without preceding document";this.errors.push(new Bi.YAMLParseError(Hi(t),"UNEXPECTED_TOKEN",i));break}this.doc.directives.docEnd=!0;let n=RU.resolveEnd(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){let i=this.doc.comment;this.doc.comment=i?`${i}
170
+ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Bi.YAMLParseError(Hi(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){let i=Object.assign({_directives:this.directives},this.options),r=new NU.Document(void 0,i);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,n,n],this.decorate(r,!1),yield r}}};ly.Composer=gu});var _y=w(Rs=>{"use strict";var $U=du(),CU=pu(),LU=Vi(),uy=Ri();function MU(e,t=!0,n){if(e){let i=(r,o,a)=>{let s=typeof r=="number"?r:Array.isArray(r)?r[0]:r.offset;if(n)n(s,o,a);else throw new LU.YAMLParseError([s,s+1],o,a)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return CU.resolveFlowScalar(e,t,i);case"block-scalar":return $U.resolveBlockScalar({options:{strict:t}},e,i)}}return null}function UU(e,t){let{implicitKey:n=!1,indent:i,inFlow:r=!1,offset:o=-1,type:a="PLAIN"}=t,s=uy.stringifyString({type:a,value:e},{implicitKey:n,indent:i>0?" ".repeat(i):"",inFlow:r,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:i,source:`
171
171
  `}];switch(s[0]){case"|":case">":{let c=s.indexOf(`
172
172
  `),u=s.substring(0,c),d=s.substring(c+1)+`
173
- `,p=[{type:"block-scalar-header",offset:o,indent:i,source:u}];return uy(p,l)||p.push({type:"newline",offset:-1,indent:i,source:`
174
- `}),{type:"block-scalar",offset:o,indent:i,props:p,source:d}}case'"':return{type:"double-quoted-scalar",offset:o,indent:i,source:s,end:l};case"'":return{type:"single-quoted-scalar",offset:o,indent:i,source:s,end:l};default:return{type:"scalar",offset:o,indent:i,source:s,end:l}}}function LU(e,t,n={}){let{afterKey:i=!1,implicitKey:r=!1,inFlow:o=!1,type:a}=n,s="indent"in e?e.indent:null;if(i&&typeof s=="number"&&(s+=2),!a)switch(e.type){case"single-quoted-scalar":a="QUOTE_SINGLE";break;case"double-quoted-scalar":a="QUOTE_DOUBLE";break;case"block-scalar":{let c=e.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:a="PLAIN"}let l=ly.stringifyString({type:a,value:t},{implicitKey:r||s===null,indent:s!==null&&s>0?" ".repeat(s):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":MU(e,l);break;case'"':gu(e,l,"double-quoted-scalar");break;case"'":gu(e,l,"single-quoted-scalar");break;default:gu(e,l,"scalar")}}function MU(e,t){let n=t.indexOf(`
173
+ `,p=[{type:"block-scalar-header",offset:o,indent:i,source:u}];return dy(p,l)||p.push({type:"newline",offset:-1,indent:i,source:`
174
+ `}),{type:"block-scalar",offset:o,indent:i,props:p,source:d}}case'"':return{type:"double-quoted-scalar",offset:o,indent:i,source:s,end:l};case"'":return{type:"single-quoted-scalar",offset:o,indent:i,source:s,end:l};default:return{type:"scalar",offset:o,indent:i,source:s,end:l}}}function xU(e,t,n={}){let{afterKey:i=!1,implicitKey:r=!1,inFlow:o=!1,type:a}=n,s="indent"in e?e.indent:null;if(i&&typeof s=="number"&&(s+=2),!a)switch(e.type){case"single-quoted-scalar":a="QUOTE_SINGLE";break;case"double-quoted-scalar":a="QUOTE_DOUBLE";break;case"block-scalar":{let c=e.props[0];if(c.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a=c.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:a="PLAIN"}let l=uy.stringifyString({type:a,value:t},{implicitKey:r||s===null,indent:s!==null&&s>0?" ".repeat(s):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":DU(e,l);break;case'"':hu(e,l,"double-quoted-scalar");break;case"'":hu(e,l,"single-quoted-scalar");break;default:hu(e,l,"scalar")}}function DU(e,t){let n=t.indexOf(`
175
175
  `),i=t.substring(0,n),r=t.substring(n+1)+`
176
- `;if(e.type==="block-scalar"){let o=e.props[0];if(o.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o.source=i,e.source=r}else{let{offset:o}=e,a="indent"in e?e.indent:-1,s=[{type:"block-scalar-header",offset:o,indent:a,source:i}];uy(s,"end"in e?e.end:void 0)||s.push({type:"newline",offset:-1,indent:a,source:`
177
- `});for(let l of Object.keys(e))l!=="type"&&l!=="offset"&&delete e[l];Object.assign(e,{type:"block-scalar",indent:a,props:s,source:r})}}function uy(e,t){if(t)for(let n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function gu(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{let i=e.props.slice(1),r=t.length;e.props[0].type==="block-scalar-header"&&(r-=e.props[0].source.length);for(let o of i)o.offset+=r;delete e.props,Object.assign(e,{type:n,source:t,end:i});break}case"block-map":case"block-seq":{let r={type:"newline",offset:e.offset+t.length,indent:e.indent,source:`
178
- `};delete e.items,Object.assign(e,{type:n,source:t,end:[r]});break}default:{let i="indent"in e?e.indent:-1,r="end"in e&&Array.isArray(e.end)?e.end.filter(o=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(let o of Object.keys(e))o!=="type"&&o!=="offset"&&delete e[o];Object.assign(e,{type:n,indent:i,source:t,end:r})}}}Is.createScalarToken=CU;Is.resolveAsScalar=$U;Is.setScalarValue=LU});var py=w(_y=>{"use strict";var UU=e=>"type"in e?$s(e):Rs(e);function $s(e){switch(e.type){case"block-scalar":{let t="";for(let n of e.props)t+=$s(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(let n of e.items)t+=Rs(n);return t}case"flow-collection":{let t=e.start.source;for(let n of e.items)t+=Rs(n);for(let n of e.end)t+=n.source;return t}case"document":{let t=Rs(e);if(e.end)for(let n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(let n of e.end)t+=n.source;return t}}}function Rs({start:e,key:t,sep:n,value:i}){let r="";for(let o of e)r+=o.source;if(t&&(r+=$s(t)),n)for(let o of n)r+=o.source;return i&&(r+=$s(i)),r}_y.stringify=UU});var yy=w(gy=>{"use strict";var yu=Symbol("break visit"),xU=Symbol("skip children"),fy=Symbol("remove item");function Ar(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),my(Object.freeze([]),e,t)}Ar.BREAK=yu;Ar.SKIP=xU;Ar.REMOVE=fy;Ar.itemAtPath=(e,t)=>{let n=e;for(let[i,r]of t){let o=n?.[i];if(o&&"items"in o)n=o.items[r];else return}return n};Ar.parentCollection=(e,t)=>{let n=Ar.itemAtPath(e,t.slice(0,-1)),i=t[t.length-1][0],r=n?.[i];if(r&&"items"in r)return r;throw new Error("Parent collection not found")};function my(e,t,n){let i=n(t,e);if(typeof i=="symbol")return i;for(let r of["key","value"]){let o=t[r];if(o&&"items"in o){for(let a=0;a<o.items.length;++a){let s=my(Object.freeze(e.concat([[r,a]])),o.items[a],n);if(typeof s=="number")a=s-1;else{if(s===yu)return yu;s===fy&&(o.items.splice(a,1),a-=1)}}typeof i=="function"&&r==="key"&&(i=i(t,e))}}return typeof i=="function"?i(t,e):i}gy.visit=Ar});var Cs=w(wt=>{"use strict";var hu=dy(),PU=py(),DU=yy(),vu="\uFEFF",Su="",bu="",Eu="",jU=e=>!!e&&"items"in e,zU=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function FU(e){switch(e){case vu:return"<BOM>";case Su:return"<DOC>";case bu:return"<FLOW_END>";case Eu:return"<SCALAR>";default:return JSON.stringify(e)}}function ZU(e){switch(e){case vu:return"byte-order-mark";case Su:return"doc-mode";case bu:return"flow-error-end";case Eu:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
176
+ `;if(e.type==="block-scalar"){let o=e.props[0];if(o.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o.source=i,e.source=r}else{let{offset:o}=e,a="indent"in e?e.indent:-1,s=[{type:"block-scalar-header",offset:o,indent:a,source:i}];dy(s,"end"in e?e.end:void 0)||s.push({type:"newline",offset:-1,indent:a,source:`
177
+ `});for(let l of Object.keys(e))l!=="type"&&l!=="offset"&&delete e[l];Object.assign(e,{type:"block-scalar",indent:a,props:s,source:r})}}function dy(e,t){if(t)for(let n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function hu(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{let i=e.props.slice(1),r=t.length;e.props[0].type==="block-scalar-header"&&(r-=e.props[0].source.length);for(let o of i)o.offset+=r;delete e.props,Object.assign(e,{type:n,source:t,end:i});break}case"block-map":case"block-seq":{let r={type:"newline",offset:e.offset+t.length,indent:e.indent,source:`
178
+ `};delete e.items,Object.assign(e,{type:n,source:t,end:[r]});break}default:{let i="indent"in e?e.indent:-1,r="end"in e&&Array.isArray(e.end)?e.end.filter(o=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(let o of Object.keys(e))o!=="type"&&o!=="offset"&&delete e[o];Object.assign(e,{type:n,indent:i,source:t,end:r})}}}Rs.createScalarToken=UU;Rs.resolveAsScalar=MU;Rs.setScalarValue=xU});var fy=w(py=>{"use strict";var PU=e=>"type"in e?Cs(e):$s(e);function Cs(e){switch(e.type){case"block-scalar":{let t="";for(let n of e.props)t+=Cs(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(let n of e.items)t+=$s(n);return t}case"flow-collection":{let t=e.start.source;for(let n of e.items)t+=$s(n);for(let n of e.end)t+=n.source;return t}case"document":{let t=$s(e);if(e.end)for(let n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(let n of e.end)t+=n.source;return t}}}function $s({start:e,key:t,sep:n,value:i}){let r="";for(let o of e)r+=o.source;if(t&&(r+=Cs(t)),n)for(let o of n)r+=o.source;return i&&(r+=Cs(i)),r}py.stringify=PU});var hy=w(yy=>{"use strict";var vu=Symbol("break visit"),jU=Symbol("skip children"),my=Symbol("remove item");function Tr(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),gy(Object.freeze([]),e,t)}Tr.BREAK=vu;Tr.SKIP=jU;Tr.REMOVE=my;Tr.itemAtPath=(e,t)=>{let n=e;for(let[i,r]of t){let o=n?.[i];if(o&&"items"in o)n=o.items[r];else return}return n};Tr.parentCollection=(e,t)=>{let n=Tr.itemAtPath(e,t.slice(0,-1)),i=t[t.length-1][0],r=n?.[i];if(r&&"items"in r)return r;throw new Error("Parent collection not found")};function gy(e,t,n){let i=n(t,e);if(typeof i=="symbol")return i;for(let r of["key","value"]){let o=t[r];if(o&&"items"in o){for(let a=0;a<o.items.length;++a){let s=gy(Object.freeze(e.concat([[r,a]])),o.items[a],n);if(typeof s=="number")a=s-1;else{if(s===vu)return vu;s===my&&(o.items.splice(a,1),a-=1)}}typeof i=="function"&&r==="key"&&(i=i(t,e))}}return typeof i=="function"?i(t,e):i}yy.visit=Tr});var Ls=w(wt=>{"use strict";var Su=_y(),zU=fy(),FU=hy(),bu="\uFEFF",Eu="",ku="",Ou="",ZU=e=>!!e&&"items"in e,qU=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function VU(e){switch(e){case bu:return"<BOM>";case Eu:return"<DOC>";case ku:return"<FLOW_END>";case Ou:return"<SCALAR>";default:return JSON.stringify(e)}}function WU(e){switch(e){case bu:return"byte-order-mark";case Eu:return"doc-mode";case ku:return"flow-error-end";case Ou:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
179
179
  `:case`\r
180
- `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}wt.createScalarToken=hu.createScalarToken;wt.resolveAsScalar=hu.resolveAsScalar;wt.setScalarValue=hu.setScalarValue;wt.stringify=PU.stringify;wt.visit=DU.visit;wt.BOM=vu;wt.DOCUMENT=Su;wt.FLOW_END=bu;wt.SCALAR=Eu;wt.isCollection=jU;wt.isScalar=zU;wt.prettyToken=FU;wt.tokenType=ZU});var wu=w(vy=>{"use strict";var Ji=Cs();function Jt(e){switch(e){case void 0:case" ":case`
181
- `:case"\r":case" ":return!0;default:return!1}}var hy=new Set("0123456789ABCDEFabcdef"),qU=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Ls=new Set(",[]{}"),VU=new Set(` ,[]{}
182
- \r `),ku=e=>!e||VU.has(e),Ou=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,n=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!n;let i=this.next??"stream";for(;i&&(n||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let t=this.pos,n=this.buffer[t];for(;n===" "||n===" ";)n=this.buffer[++t];return!n||n==="#"||n===`
180
+ `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}wt.createScalarToken=Su.createScalarToken;wt.resolveAsScalar=Su.resolveAsScalar;wt.setScalarValue=Su.setScalarValue;wt.stringify=zU.stringify;wt.visit=FU.visit;wt.BOM=bu;wt.DOCUMENT=Eu;wt.FLOW_END=ku;wt.SCALAR=Ou;wt.isCollection=ZU;wt.isScalar=qU;wt.prettyToken=VU;wt.tokenType=WU});var Tu=w(Sy=>{"use strict";var Ji=Ls();function Jt(e){switch(e){case void 0:case" ":case`
181
+ `:case"\r":case" ":return!0;default:return!1}}var vy=new Set("0123456789ABCDEFabcdef"),BU=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Ms=new Set(",[]{}"),HU=new Set(` ,[]{}
182
+ \r `),wu=e=>!e||HU.has(e),Au=class{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,n=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!n;let i=this.next??"stream";for(;i&&(n||this.hasChars(1));)i=yield*this.parseNext(i)}atLineEnd(){let t=this.pos,n=this.buffer[t];for(;n===" "||n===" ";)n=this.buffer[++t];return!n||n==="#"||n===`
183
183
  `?!0:n==="\r"?this.buffer[t+1]===`
184
184
  `:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let n=this.buffer[t];if(this.indentNext>0){let i=0;for(;n===" ";)n=this.buffer[++i+t];if(n==="\r"){let r=this.buffer[i+t+1];if(r===`
185
185
  `||!r&&!this.atEnd)return t+i+1}return n===`
186
186
  `||i>=this.indentNext||!n&&!this.atEnd?t+i:-1}if(n==="-"||n==="."){let i=this.buffer.substr(t,3);if((i==="---"||i==="...")&&Jt(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&t<this.pos)&&(t=this.buffer.indexOf(`
187
- `,this.pos),this.lineEndPos=t),t===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[t-1]==="\r"&&(t-=1),this.buffer.substring(this.pos,t))}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=t,null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(t===null)return this.setNext("stream");if(t[0]===Ji.BOM&&(yield*this.pushCount(1),t=t.substring(1)),t[0]==="%"){let n=t.length,i=t.indexOf("#");for(;i!==-1;){let o=t[i-1];if(o===" "||o===" "){n=i-1;break}else i=t.indexOf("#",i+1)}for(;;){let o=t[n-1];if(o===" "||o===" ")n-=1;else break}let r=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){let n=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-n),yield*this.pushNewline(),"stream"}return yield Ji.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let t=this.charAt(0);if(!t&&!this.atEnd)return this.setNext("line-start");if(t==="-"||t==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let n=this.peek(3);if((n==="---"||n==="...")&&Jt(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Jt(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[t,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&Jt(n)){let i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let t=this.getLine();if(t===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(t[n]){case"#":yield*this.pushCount(t.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(ku),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,i=-1;do t=yield*this.pushNewline(),t>0?(n=yield*this.pushSpaces(!1),this.indentValue=i=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);let r=this.getLine();if(r===null)return this.setNext("flow");if((i!==-1&&i<this.indentNext&&r[0]!=="#"||i===0&&(r.startsWith("---")||r.startsWith("..."))&&Jt(r[3]))&&!(i===this.indentNext-1&&this.flowLevel===1&&(r[0]==="]"||r[0]==="}")))return this.flowLevel=0,yield Ji.FLOW_END,yield*this.parseLineStart();let o=0;for(;r[o]===",";)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),r[o]){case void 0:return"flow";case"#":return yield*this.pushCount(r.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(ku),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let a=this.charAt(1);if(this.flowKey||Jt(a)||a===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let t=this.charAt(0),n=this.buffer.indexOf(t,this.pos+1);if(t==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let o=0;for(;this.buffer[n-1-o]==="\\";)o+=1;if(o%2===0)break;n=this.buffer.indexOf('"',n+1)}let i=this.buffer.substring(0,n),r=i.indexOf(`
187
+ `,this.pos),this.lineEndPos=t),t===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[t-1]==="\r"&&(t-=1),this.buffer.substring(this.pos,t))}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=t,null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(t===null)return this.setNext("stream");if(t[0]===Ji.BOM&&(yield*this.pushCount(1),t=t.substring(1)),t[0]==="%"){let n=t.length,i=t.indexOf("#");for(;i!==-1;){let o=t[i-1];if(o===" "||o===" "){n=i-1;break}else i=t.indexOf("#",i+1)}for(;;){let o=t[n-1];if(o===" "||o===" ")n-=1;else break}let r=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-r),this.pushNewline(),"stream"}if(this.atLineEnd()){let n=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-n),yield*this.pushNewline(),"stream"}return yield Ji.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let t=this.charAt(0);if(!t&&!this.atEnd)return this.setNext("line-start");if(t==="-"||t==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let n=this.peek(3);if((n==="---"||n==="...")&&Jt(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Jt(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){let[t,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&Jt(n)){let i=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=i,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let t=this.getLine();if(t===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(t[n]){case"#":yield*this.pushCount(t.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(wu),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,i=-1;do t=yield*this.pushNewline(),t>0?(n=yield*this.pushSpaces(!1),this.indentValue=i=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);let r=this.getLine();if(r===null)return this.setNext("flow");if((i!==-1&&i<this.indentNext&&r[0]!=="#"||i===0&&(r.startsWith("---")||r.startsWith("..."))&&Jt(r[3]))&&!(i===this.indentNext-1&&this.flowLevel===1&&(r[0]==="]"||r[0]==="}")))return this.flowLevel=0,yield Ji.FLOW_END,yield*this.parseLineStart();let o=0;for(;r[o]===",";)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),r[o]){case void 0:return"flow";case"#":return yield*this.pushCount(r.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(wu),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let a=this.charAt(1);if(this.flowKey||Jt(a)||a===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let t=this.charAt(0),n=this.buffer.indexOf(t,this.pos+1);if(t==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let o=0;for(;this.buffer[n-1-o]==="\\";)o+=1;if(o%2===0)break;n=this.buffer.indexOf('"',n+1)}let i=this.buffer.substring(0,n),r=i.indexOf(`
188
188
  `,this.pos);if(r!==-1){for(;r!==-1;){let o=this.continueScalar(r+1);if(o===-1)break;r=i.indexOf(`
189
189
  `,o)}r!==-1&&(n=r-(i[r-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let t=this.pos;for(;;){let n=this.buffer[++t];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>Jt(n)||n==="#")}*parseBlockScalar(){let t=this.pos-1,n=0,i;e:for(let o=this.pos;i=this.buffer[o];++o)switch(i){case" ":n+=1;break;case`
190
190
  `:t=o,n=0;break;case"\r":{let a=this.buffer[o+1];if(!a&&!this.atEnd)return this.setNext("block-scalar");if(a===`
191
191
  `)break}default:break e}if(!i&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{let o=this.continueScalar(t+1);if(o===-1)break;t=this.buffer.indexOf(`
192
192
  `,o)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let r=t+1;for(i=this.buffer[r];i===" ";)i=this.buffer[++r];if(i===" "){for(;i===" "||i===" "||i==="\r"||i===`
193
193
  `;)i=this.buffer[++r];t=r-1}else if(!this.blockScalarKeep)do{let o=t-1,a=this.buffer[o];a==="\r"&&(a=this.buffer[--o]);let s=o;for(;a===" ";)a=this.buffer[--o];if(a===`
194
- `&&o>=this.pos&&o+1+n>s)t=o;else break}while(!0);return yield Ji.SCALAR,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let t=this.flowLevel>0,n=this.pos-1,i=this.pos-1,r;for(;r=this.buffer[++i];)if(r===":"){let o=this.buffer[i+1];if(Jt(o)||t&&Ls.has(o))break;n=i}else if(Jt(r)){let o=this.buffer[i+1];if(r==="\r"&&(o===`
194
+ `&&o>=this.pos&&o+1+n>s)t=o;else break}while(!0);return yield Ji.SCALAR,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let t=this.flowLevel>0,n=this.pos-1,i=this.pos-1,r;for(;r=this.buffer[++i];)if(r===":"){let o=this.buffer[i+1];if(Jt(o)||t&&Ms.has(o))break;n=i}else if(Jt(r)){let o=this.buffer[i+1];if(r==="\r"&&(o===`
195
195
  `?(i+=1,r=`
196
- `,o=this.buffer[i+1]):n=i),o==="#"||t&&Ls.has(o))break;if(r===`
197
- `){let a=this.continueScalar(i+1);if(a===-1)break;i=Math.max(i,a-2)}}else{if(t&&Ls.has(r))break;n=i}return!r&&!this.atEnd?this.setNext("plain-scalar"):(yield Ji.SCALAR,yield*this.pushToIndex(n+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,n){let i=this.buffer.slice(this.pos,t);return i?(yield i,this.pos+=i.length,i.length):(n&&(yield""),0)}*pushIndicators(){let t=0;e:for(;;){switch(this.charAt(0)){case"!":t+=yield*this.pushTag(),t+=yield*this.pushSpaces(!0);continue e;case"&":t+=yield*this.pushUntil(ku),t+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let n=this.flowLevel>0,i=this.charAt(1);if(Jt(i)||n&&Ls.has(i)){n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,t+=yield*this.pushCount(1),t+=yield*this.pushSpaces(!0);continue e}}}break e}return t}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,n=this.buffer[t];for(;!Jt(n)&&n!==">";)n=this.buffer[++t];return yield*this.pushToIndex(n===">"?t+1:t,!1)}else{let t=this.pos+1,n=this.buffer[t];for(;n;)if(qU.has(n))n=this.buffer[++t];else if(n==="%"&&hy.has(this.buffer[t+1])&&hy.has(this.buffer[t+2]))n=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){let t=this.buffer[this.pos];return t===`
196
+ `,o=this.buffer[i+1]):n=i),o==="#"||t&&Ms.has(o))break;if(r===`
197
+ `){let a=this.continueScalar(i+1);if(a===-1)break;i=Math.max(i,a-2)}}else{if(t&&Ms.has(r))break;n=i}return!r&&!this.atEnd?this.setNext("plain-scalar"):(yield Ji.SCALAR,yield*this.pushToIndex(n+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,n){let i=this.buffer.slice(this.pos,t);return i?(yield i,this.pos+=i.length,i.length):(n&&(yield""),0)}*pushIndicators(){let t=0;e:for(;;){switch(this.charAt(0)){case"!":t+=yield*this.pushTag(),t+=yield*this.pushSpaces(!0);continue e;case"&":t+=yield*this.pushUntil(wu),t+=yield*this.pushSpaces(!0);continue e;case"-":case"?":case":":{let n=this.flowLevel>0,i=this.charAt(1);if(Jt(i)||n&&Ms.has(i)){n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,t+=yield*this.pushCount(1),t+=yield*this.pushSpaces(!0);continue e}}}break e}return t}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,n=this.buffer[t];for(;!Jt(n)&&n!==">";)n=this.buffer[++t];return yield*this.pushToIndex(n===">"?t+1:t,!1)}else{let t=this.pos+1,n=this.buffer[t];for(;n;)if(BU.has(n))n=this.buffer[++t];else if(n==="%"&&vy.has(this.buffer[t+1])&&vy.has(this.buffer[t+2]))n=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){let t=this.buffer[this.pos];return t===`
198
198
  `?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
199
- `?yield*this.pushCount(2):0}*pushSpaces(t){let n=this.pos-1,i;do i=this.buffer[++n];while(i===" "||t&&i===" ");let r=n-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(t){let n=this.pos,i=this.buffer[n];for(;!t(i);)i=this.buffer[++n];return yield*this.pushToIndex(n,!1)}};vy.Lexer=Ou});var Tu=w(Sy=>{"use strict";var Au=class{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,i=this.lineStarts.length;for(;n<i;){let o=n+i>>1;this.lineStarts[o]<t?n=o+1:i=o}if(this.lineStarts[n]===t)return{line:n+1,col:1};if(n===0)return{line:0,col:t};let r=this.lineStarts[n-1];return{line:n,col:t-r+1}}}};Sy.LineCounter=Au});var Iu=w(wy=>{"use strict";var WU=require("process"),by=Cs(),BU=wu();function yr(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function Ey(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function Oy(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Ms(e){switch(e.type){case"document":return e.start;case"block-map":{let t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function ei(e){if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function Us(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function ky(e){if(e.start.type==="flow-seq-start")for(let t of e.items)t.sep&&!t.value&&!yr(t.start,"explicit-key-ind")&&!yr(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,Oy(t.value)?t.value.end?Us(t.value.end,t.sep):t.value.end=t.sep:Us(t.start,t.sep),delete t.sep)}var Nu=class{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new BU.Lexer,this.onNewLine=t}*parse(t,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let i of this.lexer.lex(t,n))yield*this.next(i);n||(yield*this.end())}*next(t){if(this.source=t,WU.env.LOG_TOKENS&&console.log("|",by.prettyToken(t)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}let n=by.tokenType(t);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case"space":this.atNewLine&&t[0]===" "&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{let i=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:i,source:t}),this.offset+=t.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let t=this.peek(1);if(this.type==="doc-end"&&t?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){let n=t??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{let i=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in i?i.indent:0:n.type==="flow-collection"&&i.type==="document"&&(n.indent=0),n.type==="flow-collection"&&ky(n),i.type){case"document":i.value=n;break;case"block-scalar":i.props.push(n);break;case"block-map":{let r=i.items[i.items.length-1];if(r.value){i.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(r.sep)r.value=n;else{Object.assign(r,{key:n,sep:[]}),this.onKeyLine=!r.explicitKey;return}break}case"block-seq":{let r=i.items[i.items.length-1];r.value?i.items.push({start:[],value:n}):r.value=n;break}case"flow-collection":{let r=i.items[i.items.length-1];!r||r.value?i.items.push({start:[],key:n,sep:[]}):r.sep?r.value=n:Object.assign(r,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((i.type==="document"||i.type==="block-map"||i.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){let r=n.items[n.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&Ey(r.start)===-1&&(n.indent===0||r.start.every(o=>o.type!=="comment"||o.indent<n.indent))&&(i.type==="document"?i.end=r.start:i.items.push({start:r.start}),n.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let t={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&t.start.push(this.sourceToken),this.stack.push(t);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(t){if(t.value)return yield*this.lineEnd(t);switch(this.type){case"doc-start":{Ey(t.start)!==-1?(yield*this.pop(),yield*this.step()):t.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":t.start.push(this.sourceToken);return}let n=this.startBlockValue(t);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(t){if(this.type==="map-value-ind"){let n=Ms(this.peek(2)),i=ei(n),r;t.end?(r=t.end,r.push(this.sourceToken),delete t.end):r=[this.sourceToken];let o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:i,key:t,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(t)}*blockScalar(t){switch(this.type){case"space":case"comment":case"newline":t.props.push(this.sourceToken);return;case"scalar":if(t.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
199
+ `?yield*this.pushCount(2):0}*pushSpaces(t){let n=this.pos-1,i;do i=this.buffer[++n];while(i===" "||t&&i===" ");let r=n-this.pos;return r>0&&(yield this.buffer.substr(this.pos,r),this.pos=n),r}*pushUntil(t){let n=this.pos,i=this.buffer[n];for(;!t(i);)i=this.buffer[++n];return yield*this.pushToIndex(n,!1)}};Sy.Lexer=Au});var Iu=w(by=>{"use strict";var Nu=class{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,i=this.lineStarts.length;for(;n<i;){let o=n+i>>1;this.lineStarts[o]<t?n=o+1:i=o}if(this.lineStarts[n]===t)return{line:n+1,col:1};if(n===0)return{line:0,col:t};let r=this.lineStarts[n-1];return{line:n,col:t-r+1}}}};by.LineCounter=Nu});var $u=w(Ay=>{"use strict";var JU=require("process"),Ey=Ls(),KU=Tu();function yr(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function ky(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function wy(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Us(e){switch(e.type){case"document":return e.start;case"block-map":{let t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function ei(e){if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++t]?.type==="space";);return e.splice(t,e.length)}function xs(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let n=0;n<t.length;++n)e.push(t[n])}function Oy(e){if(e.start.type==="flow-seq-start")for(let t of e.items)t.sep&&!t.value&&!yr(t.start,"explicit-key-ind")&&!yr(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,wy(t.value)?t.value.end?xs(t.value.end,t.sep):t.value.end=t.sep:xs(t.start,t.sep),delete t.sep)}var Ru=class{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new KU.Lexer,this.onNewLine=t}*parse(t,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(let i of this.lexer.lex(t,n))yield*this.next(i);n||(yield*this.end())}*next(t){if(this.source=t,JU.env.LOG_TOKENS&&console.log("|",Ey.prettyToken(t)),this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}let n=Ey.tokenType(t);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case"space":this.atNewLine&&t[0]===" "&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{let i=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:i,source:t}),this.offset+=t.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let t=this.peek(1);if(this.type==="doc-end"&&t?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){let n=t??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{let i=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in i?i.indent:0:n.type==="flow-collection"&&i.type==="document"&&(n.indent=0),n.type==="flow-collection"&&Oy(n),i.type){case"document":i.value=n;break;case"block-scalar":i.props.push(n);break;case"block-map":{let r=i.items[i.items.length-1];if(r.value){i.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(r.sep)r.value=n;else{Object.assign(r,{key:n,sep:[]}),this.onKeyLine=!r.explicitKey;return}break}case"block-seq":{let r=i.items[i.items.length-1];r.value?i.items.push({start:[],value:n}):r.value=n;break}case"flow-collection":{let r=i.items[i.items.length-1];!r||r.value?i.items.push({start:[],key:n,sep:[]}):r.sep?r.value=n:Object.assign(r,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((i.type==="document"||i.type==="block-map"||i.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){let r=n.items[n.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&ky(r.start)===-1&&(n.indent===0||r.start.every(o=>o.type!=="comment"||o.indent<n.indent))&&(i.type==="document"?i.end=r.start:i.items.push({start:r.start}),n.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let t={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&t.start.push(this.sourceToken),this.stack.push(t);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(t){if(t.value)return yield*this.lineEnd(t);switch(this.type){case"doc-start":{ky(t.start)!==-1?(yield*this.pop(),yield*this.step()):t.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":t.start.push(this.sourceToken);return}let n=this.startBlockValue(t);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(t){if(this.type==="map-value-ind"){let n=Us(this.peek(2)),i=ei(n),r;t.end?(r=t.end,r.push(this.sourceToken),delete t.end):r=[this.sourceToken];let o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:i,key:t,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(t)}*blockScalar(t){switch(this.type){case"space":case"comment":case"newline":t.props.push(this.sourceToken);return;case"scalar":if(t.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
200
200
  `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
201
- `,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){let n=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){let i="end"in n.value?n.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,t.indent)){let r=t.items[t.items.length-2]?.value?.end;if(Array.isArray(r)){Us(r,n.start),r.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=t.indent){let i=!this.onKeyLine&&this.indent===t.indent,r=i&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind",o=[];if(r&&n.sep&&!n.value){let a=[];for(let s=0;s<n.sep.length;++s){let l=n.sep[s];switch(l.type){case"newline":a.push(s);break;case"space":break;case"comment":l.indent>t.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(o=n.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":r||n.value?(o.push(this.sourceToken),t.items.push({start:o}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):r||n.value?(o.push(this.sourceToken),t.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(yr(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(Oy(n.key)&&!yr(n.sep,"newline")){let a=ei(n.start),s=n.key,l=n.sep;l.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:s,sep:l}]})}else o.length>0?n.sep=n.sep.concat(o,this.sourceToken):n.sep.push(this.sourceToken);else if(yr(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{let a=ei(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||r?t.items.push({start:o,key:null,sep:[this.sourceToken]}):yr(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let a=this.flowScalar(this.type);r||n.value?(t.items.push({start:o,key:a,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(a):(Object.assign(n,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{let a=this.startBlockValue(t);if(a){if(a.type==="block-seq"){if(!n.explicitKey&&n.sep&&!yr(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else i&&t.items.push({start:o});this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){let n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){let i="end"in n.value?n.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){let r=t.items[t.items.length-2]?.value?.end;if(Array.isArray(r)){Us(r,n.start),r.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||yr(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){let i=this.startBlockValue(t);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){let n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while(i?.type==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let r=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:r,sep:[]}):n.sep?this.stack.push(r):Object.assign(n,{key:r,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}let i=this.startBlockValue(t);i?this.stack.push(i):(yield*this.pop(),yield*this.step())}else{let i=this.peek(2);if(i.type==="block-map"&&(this.type==="map-value-ind"&&i.indent===t.indent||this.type==="newline"&&!i.items[i.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&i.type!=="flow-collection"){let r=Ms(i),o=ei(r);ky(t);let a=t.end.splice(1,t.end.length);a.push(this.sourceToken);let s={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:o,key:t,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(`
201
+ `,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){let n=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){let i="end"in n.value?n.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,t.indent)){let r=t.items[t.items.length-2]?.value?.end;if(Array.isArray(r)){xs(r,n.start),r.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=t.indent){let i=!this.onKeyLine&&this.indent===t.indent,r=i&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind",o=[];if(r&&n.sep&&!n.value){let a=[];for(let s=0;s<n.sep.length;++s){let l=n.sep[s];switch(l.type){case"newline":a.push(s);break;case"space":break;case"comment":l.indent>t.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(o=n.sep.splice(a[1]))}switch(this.type){case"anchor":case"tag":r||n.value?(o.push(this.sourceToken),t.items.push({start:o}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):r||n.value?(o.push(this.sourceToken),t.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(yr(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(wy(n.key)&&!yr(n.sep,"newline")){let a=ei(n.start),s=n.key,l=n.sep;l.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:s,sep:l}]})}else o.length>0?n.sep=n.sep.concat(o,this.sourceToken):n.sep.push(this.sourceToken);else if(yr(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{let a=ei(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||r?t.items.push({start:o,key:null,sep:[this.sourceToken]}):yr(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let a=this.flowScalar(this.type);r||n.value?(t.items.push({start:o,key:a,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(a):(Object.assign(n,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{let a=this.startBlockValue(t);if(a){if(a.type==="block-seq"){if(!n.explicitKey&&n.sep&&!yr(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else i&&t.items.push({start:o});this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){let n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){let i="end"in n.value?n.value.end:void 0;(Array.isArray(i)?i[i.length-1]:void 0)?.type==="comment"?i?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){let r=t.items[t.items.length-2]?.value?.end;if(Array.isArray(r)){xs(r,n.start),r.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||yr(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){let i=this.startBlockValue(t);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){let n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let i;do yield*this.pop(),i=this.peek(1);while(i?.type==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let r=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:r,sep:[]}):n.sep?this.stack.push(r):Object.assign(n,{key:r,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}let i=this.startBlockValue(t);i?this.stack.push(i):(yield*this.pop(),yield*this.step())}else{let i=this.peek(2);if(i.type==="block-map"&&(this.type==="map-value-ind"&&i.indent===t.indent||this.type==="newline"&&!i.items[i.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&i.type!=="flow-collection"){let r=Us(i),o=ei(r);Oy(t);let a=t.end.splice(1,t.end.length);a.push(this.sourceToken);let s={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:o,key:t,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(`
202
202
  `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
203
- `,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let n=Ms(t),i=ei(n);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let n=Ms(t),i=ei(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};wy.Parser=Nu});var Ry=w(Gi=>{"use strict";var Ay=mu(),HU=Fi(),Ki=Vi(),JU=pl(),KU=Re(),GU=Tu(),Ty=Iu();function Ny(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new GU.LineCounter||null,prettyErrors:t}}function XU(e,t={}){let{lineCounter:n,prettyErrors:i}=Ny(t),r=new Ty.Parser(n?.addNewLine),o=new Ay.Composer(t),a=Array.from(o.compose(r.parse(e)));if(i&&n)for(let s of a)s.errors.forEach(Ki.prettifyError(e,n)),s.warnings.forEach(Ki.prettifyError(e,n));return a.length>0?a:Object.assign([],{empty:!0},o.streamInfo())}function Iy(e,t={}){let{lineCounter:n,prettyErrors:i}=Ny(t),r=new Ty.Parser(n?.addNewLine),o=new Ay.Composer(t),a=null;for(let s of o.compose(r.parse(e),!0,e.length))if(!a)a=s;else if(a.options.logLevel!=="silent"){a.errors.push(new Ki.YAMLParseError(s.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&n&&(a.errors.forEach(Ki.prettifyError(e,n)),a.warnings.forEach(Ki.prettifyError(e,n))),a}function YU(e,t,n){let i;typeof t=="function"?i=t:n===void 0&&t&&typeof t=="object"&&(n=t);let r=Iy(e,n);if(!r)return null;if(r.warnings.forEach(o=>JU.warn(r.options.logLevel,o)),r.errors.length>0){if(r.options.logLevel!=="silent")throw r.errors[0];r.errors=[]}return r.toJS(Object.assign({reviver:i},n))}function QU(e,t,n){let i=null;if(typeof t=="function"||Array.isArray(t)?i=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){let r=Math.round(n);n=r<1?void 0:r>8?{indent:8}:{indent:r}}if(e===void 0){let{keepUndefined:r}=n??t??{};if(!r)return}return KU.isDocument(e)&&!i?e.toString(n):new HU.Document(e,i,n).toString(n)}Gi.parse=YU;Gi.parseAllDocuments=XU;Gi.parseDocument=Iy;Gi.stringify=QU});var $u=w(xe=>{"use strict";var ex=mu(),tx=Fi(),nx=Kl(),Ru=Vi(),rx=wi(),hr=Re(),ix=pr(),ox=rt(),ax=mr(),sx=gr(),cx=Cs(),lx=wu(),ux=Tu(),dx=Iu(),xs=Ry(),$y=bi();xe.Composer=ex.Composer;xe.Document=tx.Document;xe.Schema=nx.Schema;xe.YAMLError=Ru.YAMLError;xe.YAMLParseError=Ru.YAMLParseError;xe.YAMLWarning=Ru.YAMLWarning;xe.Alias=rx.Alias;xe.isAlias=hr.isAlias;xe.isCollection=hr.isCollection;xe.isDocument=hr.isDocument;xe.isMap=hr.isMap;xe.isNode=hr.isNode;xe.isPair=hr.isPair;xe.isScalar=hr.isScalar;xe.isSeq=hr.isSeq;xe.Pair=ix.Pair;xe.Scalar=ox.Scalar;xe.YAMLMap=ax.YAMLMap;xe.YAMLSeq=sx.YAMLSeq;xe.CST=cx;xe.Lexer=lx.Lexer;xe.LineCounter=ux.LineCounter;xe.Parser=dx.Parser;xe.parse=xs.parse;xe.parseAllDocuments=xs.parseAllDocuments;xe.parseDocument=xs.parseDocument;xe.stringify=xs.stringify;xe.visit=$y.visit;xe.visitAsync=$y.visitAsync});var jP={};Kv(jP,{SqliteReadModelFileSystem:()=>rc,allocateAttributedTokenActiveMs:()=>ec,rebuildSqliteReadModel:()=>xP,sourceFingerprint:()=>no,sqliteReadModelPath:()=>nc,sqliteViewMetadata:()=>cd,validateSqliteReadModelSchema:()=>tc});module.exports=Gv(jP);var oo=require("node:crypto"),bv=require("node:fs"),ic=require("node:fs/promises"),ao=require("node:path"),Lr=require("node:sqlite");var be=ut(pt(),1),gD=be.z.object({provider:be.z.string().min(1),models:be.z.array(be.z.string().min(1)).min(1),reasoning_efforts:be.z.array(be.z.enum(["low","medium","high","xhigh"])).min(1),velocities:be.z.array(be.z.literal("standard")).length(1),streaming:be.z.boolean(),cancellation:be.z.boolean(),checkpointing:be.z.boolean(),resume:be.z.boolean(),tool_calls:be.z.boolean(),structured_output:be.z.boolean(),max_parallel_invocations:be.z.number().int().positive()}).strict().superRefine((e,t)=>{e.resume&&!e.checkpointing&&t.addIssue({code:"custom",message:"Resume requires checkpointing"})}),hC=be.z.object({role:be.z.enum(["system","user","assistant","tool"]),content:be.z.string(),name:be.z.string().min(1).nullable().default(null)}).strict(),yD=be.z.object({schema_version:be.z.literal(1),invocation_id:be.z.string().regex(/^INV-[A-Z0-9-]+$/),agent_id:be.z.string().min(1),model:be.z.string().min(1),reasoning_effort:be.z.enum(["low","medium","high","xhigh"]),velocity:be.z.literal("standard"),input:be.z.object({messages:be.z.array(hC).min(1),context_refs:be.z.array(be.z.string().min(1)),tools:be.z.array(be.z.string().min(1)),response_format:be.z.enum(["text","json"])}).strict(),budget:be.z.object({max_output_tokens:be.z.number().int().positive(),timeout_ms:be.z.number().int().positive().nullable(),max_tool_calls:be.z.number().int().nonnegative()}).strict(),metadata:be.z.record(be.z.string(),be.z.string()),resume_from:be.z.string().min(1).nullable()}).strict(),hD=be.z.object({invocation_id:be.z.string().regex(/^INV-[A-Z0-9-]+$/),reason:be.z.enum(["user","budget","timeout","shutdown","superseded"]),requested_at:be.z.string().datetime()}).strict();var ye=ut(pt(),1),er={schema_version:ye.z.literal(1),invocation_id:ye.z.string().regex(/^INV-[A-Z0-9-]+$/),sequence:ye.z.number().int().nonnegative(),occurred_at:ye.z.string().datetime()},vC=ye.z.object({checkpoint_id:ye.z.string().regex(/^CHK-[A-Z0-9-]+$/),opaque_token:ye.z.string().min(1),resumable_until:ye.z.string().datetime().nullable(),state_hash:ye.z.string().regex(/^[a-f0-9]{64}$/)}).strict(),jf=ye.z.object({input_tokens:ye.z.number().int().nonnegative(),cached_input_tokens:ye.z.number().int().nonnegative(),output_tokens:ye.z.number().int().nonnegative(),reasoning_tokens:ye.z.number().int().nonnegative(),source:ye.z.enum(["provider","estimated","unavailable"])}).strict(),SC=ye.z.object({code:ye.z.enum(["authentication","authorization","invalid_request","rate_limit","provider_unavailable","timeout","budget_exceeded","tool_error","protocol_error","unknown"]),message:ye.z.string().min(1),retryable:ye.z.boolean(),retry_after_ms:ye.z.number().int().nonnegative().nullable(),provider_code:ye.z.string().nullable()}).strict(),bC=ye.z.discriminatedUnion("type",[ye.z.object({...er,type:ye.z.literal("invocation.started")}).strict(),ye.z.object({...er,type:ye.z.literal("output.delta"),delta:ye.z.string().min(1)}).strict(),ye.z.object({...er,type:ye.z.literal("tool.requested"),call_id:ye.z.string().min(1),name:ye.z.string().min(1),arguments:ye.z.unknown()}).strict(),ye.z.object({...er,type:ye.z.literal("tool.completed"),call_id:ye.z.string().min(1),output:ye.z.unknown()}).strict(),ye.z.object({...er,type:ye.z.literal("checkpoint.created"),checkpoint:vC}).strict(),ye.z.object({...er,type:ye.z.literal("usage.updated"),usage:jf}).strict(),ye.z.object({...er,type:ye.z.literal("invocation.completed"),output:ye.z.string(),usage:jf}).strict(),ye.z.object({...er,type:ye.z.literal("invocation.failed"),error:SC}).strict(),ye.z.object({...er,type:ye.z.literal("invocation.cancelled"),reason:ye.z.string().min(1)}).strict()]);var _e=ut(pt(),1),bt=_e.z.array(_e.z.string().min(1)).superRefine((e,t)=>{new Set(e).size!==e.length&&t.addIssue({code:"custom",message:"Values must be unique"})}),zf=_e.z.string().regex(/^[a-z0-9]+(?:_[a-z0-9]+)*$/),EC=_e.z.object({nome:zf,cargo:zf,foto_url:_e.z.url().refine(e=>{let t=new URL(e).protocol;return t==="http:"||t==="https:"},"Persona photo URL must use http or https").optional()}).strict();function kC(e){return`${e.nome}_${e.cargo}_zaip_agent`}var OC=bt.length(1).superRefine((e,t)=>{for(let[n,i]of e.entries())/^[a-z0-9_]+$/.test(i)||t.addIssue({code:"custom",path:[n],message:"Codex nicknames must be lowercase snake_case"})}),wC=_e.z.string().regex(/^zaip-agent-[a-z0-9-]+$/,'Codex agent name must use the "zaip-agent-NOME" format'),AC=_e.z.string().regex(/^[a-z0-9_]+$/,"Codex task name must use lowercase snake_case"),Ff=_e.z.enum(["orchestrator","analyst","task-executor","execution-finalizer","builder","reviewer","integrator","auditor"]),TC=_e.z.enum(["id","codex_name","codex_task_name"]),NC=_e.z.object({kind:TC,value:_e.z.string().min(1),deprecated_at:_e.z.iso.date(),remove_after:_e.z.iso.date(),replacement:_e.z.string().regex(/^agent-[a-z0-9-]+$/)}).strict().superRefine((e,t)=>{(e.kind==="id"?/^agent-[a-z0-9-]+$/.test(e.value):e.kind==="codex_name"?/^zaip-agent-[a-z0-9-]+$/.test(e.value):/^[a-z0-9_]+$/.test(e.value))||t.addIssue({code:"custom",path:["value"],message:`Alias value does not match identity kind ${e.kind}`}),e.remove_after<=e.deprecated_at&&t.addIssue({code:"custom",path:["remove_after"],message:"Alias removal date must be after its deprecation date"})}),Da=_e.z.object({allow:bt,deny:bt}).strict().superRefine((e,t)=>{let n=e.allow.filter(i=>e.deny.includes(i));n.length>0&&t.addIssue({code:"custom",message:`Permission both allowed and denied: ${n.join(", ")}`})}),IC=_e.z.object({id:_e.z.string().regex(/^agent-[a-z0-9-]+$/),version:_e.z.number().int().positive(),purpose:_e.z.string().min(1),use_when:bt.min(1),do_not_use:bt.min(1),codex_name:wC,codex_task_name:AC,persona:EC,nickname_candidates:OC,compatibility:_e.z.object({aliases:_e.z.array(NC)}).strict().optional(),role:Ff,priority:_e.z.number().int().nonnegative().default(100),inherits:_e.z.string().regex(/^agent-[a-z0-9-]+$/).nullable().default(null),capabilities:bt.min(1),execution_eligibility:_e.z.array(_e.z.enum(["interaction","delivery"])),tools:bt,skills:bt,write_scopes:bt,permissions:_e.z.object({filesystem:Da,network:Da,shell:Da,deployment:Da}).strict(),model:_e.z.object({required_capabilities:bt,preferred:bt,reasoning_effort:_e.z.enum(["low","medium","high","xhigh","ultra"]).optional()}).strict(),budget:_e.z.object({soft_cycles:_e.z.number().int().positive()}).strict(),contract:_e.z.object({inputs:bt.min(1),outputs:bt.min(1),evidence:bt.min(1)}).strict(),review:_e.z.object({can_approve:_e.z.boolean(),cannot_review_roles:_e.z.array(Ff)}).strict(),escalation:bt}).strict().superRefine((e,t)=>{let n=e.nickname_candidates[0];e.codex_task_name!==n&&t.addIssue({code:"custom",path:["codex_task_name"],message:`Codex task name must equal the primary nickname candidate: ${n}`});let i=kC(e.persona);e.nickname_candidates[0]!==i&&t.addIssue({code:"custom",path:["nickname_candidates"],message:`nickname_candidates must contain only the derived persona nickname: ${i}`})}),RC=_e.z.object({id:_e.z.string().regex(/^squad-[a-z0-9-]+$/),version:_e.z.number().int().positive(),purpose:_e.z.string().min(1),members:_e.z.array(_e.z.string().regex(/^agent-[a-z0-9-]+$/)).min(2),max_parallelism:_e.z.number().int().positive(),delegation:_e.z.array(_e.z.object({from:_e.z.string().regex(/^agent-[a-z0-9-]+$/),to:_e.z.string().regex(/^agent-[a-z0-9-]+$/),capability:_e.z.string().min(1)}).strict()),review_policy:_e.z.object({independent:_e.z.literal(!0),executor_roles:_e.z.array(_e.z.enum(["analyst","builder","task-executor"])).min(1),reviewer_roles:_e.z.array(_e.z.enum(["reviewer","auditor"])).min(1)}).strict(),escalation:_e.z.array(_e.z.string().regex(/^agent-[a-z0-9-]+$/)).min(1)}).strict(),ND=_e.z.object({schema_version:_e.z.literal(1),agents:_e.z.array(IC).min(1),squads:_e.z.array(RC).min(1)}).strict();var q=ut(pt(),1);var pe=ut(pt(),1),$C=["gpt-5.6-luna","gpt-5.6-terra","gpt-5.6-sol"],CC=["low","medium","high","xhigh"];var Zf="task-risk-v1",jD=pe.z.enum($C),zD=pe.z.enum(CC),LC=pe.z.literal("standard"),FD=pe.z.object({model:pe.z.string().min(1).optional(),reasoning_effort:pe.z.string().min(1).optional(),velocity:pe.z.string().min(1).optional()}).strict().refine(e=>e.model!==void 0||e.reasoning_effort!==void 0||e.velocity!==void 0,"Model selection override must define at least one field"),MC=pe.z.enum(["discovery","planning","replanning","implementation","testing","integration","review","audit","finalization","rework"]),UC=pe.z.enum(["full_stack_boundary","shared_contracts_3_plus","critical_data_or_security","rollout_and_rollback","repeated_structural_repair","architectural_review_finding","prepared_plan_invalidated","material_architectural_tradeoffs"]),xC=pe.z.object({phase:MC,agent_role:pe.z.string().min(1),complexity:pe.z.enum(["simple","standard","complex"]),risk:pe.z.enum(["lite","standard","critical"]),transversality:pe.z.enum(["local","multi_module","cross_system"]),ambiguity:pe.z.enum(["low","medium","high"]),rework:pe.z.enum(["none","localized","structural"]),rework_cost:pe.z.enum(["low","medium","high"]),bounded:pe.z.boolean(),high_volume:pe.z.boolean().default(!1),xhigh_triggers:pe.z.array(UC).default([])}).strict(),Gc=pe.z.object({production_impact:pe.z.boolean(),external_action:pe.z.boolean(),irreversible_change:pe.z.boolean(),security_or_critical_data:pe.z.boolean(),data_migration:pe.z.boolean(),broad_audit:pe.z.boolean(),rollback:pe.z.enum(["trivial","planned","complex"]),verification_scope:pe.z.enum(["scoped","package","cross_scope","full"])}).strict(),PC=xC.omit({agent_role:!0,risk:!0}).extend({risk_signals:Gc}).strict(),ZD=PC.extend({risk:pe.z.enum(["lite","standard","critical"]),risk_signals:Gc,risk_policy_version:pe.z.literal(Zf),risk_reasons:pe.z.array(pe.z.enum(["CRITICAL_EXPLICIT_IMPACT","CRITICAL_COMPLEX_ROLLBACK","CRITICAL_AMBIGUOUS_CROSS_SYSTEM","CRITICAL_STRUCTURAL_REWORK","LITE_BOUNDED_LOCAL","STANDARD_GOVERNED"])).min(1)}).strict().superRefine((e,t)=>{let n=DC(e);e.risk!==n.risk&&t.addIssue({code:"custom",path:["risk"],message:`Task risk must be ${n.risk} for the persisted signals`}),JSON.stringify(e.risk_reasons)!==JSON.stringify(n.reasons)&&t.addIssue({code:"custom",path:["risk_reasons"],message:`Task risk reasons must be ${n.reasons.join(",")}`})}),qD=pe.z.object({models:pe.z.array(pe.z.string().min(1)).min(1),reasoning_efforts:pe.z.array(pe.z.string().min(1)).min(1),velocities:pe.z.array(pe.z.string().min(1)).min(1)}).strict(),qf=pe.z.object({mode:pe.z.literal("auto"),default_model:pe.z.literal("gpt-5.6-terra"),default_effort:pe.z.literal("medium"),default_velocity:LC,allowed_models:pe.z.tuple([pe.z.literal("gpt-5.6-luna"),pe.z.literal("gpt-5.6-terra"),pe.z.literal("gpt-5.6-sol")]),allowed_efforts:pe.z.tuple([pe.z.literal("low"),pe.z.literal("medium"),pe.z.literal("high"),pe.z.literal("xhigh")]),max_auto_effort:pe.z.literal("xhigh"),automatic_sources:pe.z.tuple([pe.z.literal("spec"),pe.z.literal("prd")]),notice:pe.z.enum(["always","mismatch"])}).strict();function DC(e){let t=Gc.parse(e.risk_signals);return t.production_impact||t.external_action||t.irreversible_change||t.security_or_critical_data||t.data_migration||t.broad_audit?qr("critical","CRITICAL_EXPLICIT_IMPACT"):t.rollback==="complex"?qr("critical","CRITICAL_COMPLEX_ROLLBACK"):e.ambiguity==="high"&&e.transversality==="cross_system"?qr("critical","CRITICAL_AMBIGUOUS_CROSS_SYSTEM"):e.rework==="structural"&&e.rework_cost==="high"?qr("critical","CRITICAL_STRUCTURAL_REWORK"):e.complexity==="simple"&&e.transversality==="local"&&e.ambiguity==="low"&&e.rework==="none"&&e.rework_cost==="low"&&e.bounded&&t.rollback==="trivial"&&t.verification_scope==="scoped"?qr("lite","LITE_BOUNDED_LOCAL"):qr("standard","STANDARD_GOVERNED")}function qr(e,t){return{risk:e,policy_version:Zf,reasons:[t]}}var Lu=ut($u(),1),_x=10,Cu=class extends Error{name="YamlContractError"};function Xi(e){let t=(0,Lu.parseDocument)(e,{strict:!0,uniqueKeys:!0});if(t.errors.length>0)throw new Cu(t.errors.map(n=>n.message).join("; "));return t.toJS({maxAliasCount:_x})}var Ps=q.z.string().regex(/^[a-f0-9]{64}$/i,"Expected a SHA-256 checksum"),fx=q.z.string().min(1).superRefine((e,t)=>{try{new Intl.DateTimeFormat("en",{timeZone:e}).format()}catch{t.addIssue({code:"custom",message:"Expected a valid IANA timezone"})}}),mx=q.z.string().min(1).max(255).refine(e=>e.trim()===e&&!/[\r\n\0]/.test(e),"Expected a non-empty Git branch name");function gx(e){return e.length===0||e.includes("\\")||e.includes("\0")||e.startsWith("/")||e.startsWith("./")||e.endsWith("/")||/^[A-Za-z]:/.test(e)?!1:e.split("/").every(t=>t.length>0&&t!=="."&&t!=="..")}var yx=q.z.object({sha256:Ps}).strict();function Cy(e){return q.z.record(q.z.string().min(1),e).superRefine((t,n)=>{for(let i of Object.keys(t))gx(i)||n.addIssue({code:"custom",path:[i],message:"Managed file path must be canonical and workspace-relative"})})}var hx=Cy(yx),vx=Cy(Ps),Sx=q.z.object({schema_version:q.z.literal(1),zaip:q.z.object({enabled:q.z.boolean()}).strict().optional(),"zaip-aios":q.z.object({enabled:q.z.boolean()}).strict().optional(),project:q.z.object({id:q.z.string().min(1),name:q.z.string().min(1),timezone:fx}).strict(),stack:q.z.object({id:q.z.string().min(1),language:q.z.string().min(1).optional(),api:q.z.string().min(1).optional(),query_builder:q.z.string().min(1).optional(),extensions:q.z.array(q.z.string().min(1)).min(1).optional(),layout:q.z.object({frontend:q.z.string().min(1),backend:q.z.string().min(1),site:q.z.string().min(1),modules:q.z.string().min(1),packages:q.z.string().min(1),e2e:q.z.string().min(1)}).strict().optional(),source_limits:q.z.object({warning_lines:q.z.number().int().positive(),error_lines:q.z.number().int().positive()}).strict().optional(),invariants:q.z.array(q.z.string().min(1)).min(1).optional(),commands:q.z.object({test:q.z.string().min(1),typecheck:q.z.string().min(1)}).strict().optional(),overrides:q.z.record(q.z.string(),q.z.unknown())}).strict(),clients:q.z.object({codex:q.z.boolean(),claude:q.z.boolean()}).strict(),tracking:q.z.object({enabled:q.z.boolean(),currency:q.z.string().regex(/^[A-Z]{3}$/,"Expected an ISO 4217 currency code"),storage_mode:q.z.enum(["tracked_sanitized","local_only"])}).strict(),deploy:q.z.object({branch:mx.optional()}).strict().optional(),model_orchestration:q.z.discriminatedUnion("mode",[q.z.object({mode:q.z.literal("manual"),default_model:q.z.literal("manual"),default_effort:q.z.literal("manual"),default_velocity:q.z.literal("manual"),notice:q.z.enum(["always","mismatch"])}).strict(),q.z.object({mode:q.z.literal("off"),default_model:q.z.string().min(1),default_effort:q.z.string().min(1),default_velocity:q.z.string().min(1),notice:q.z.enum(["always","mismatch"])}).strict(),qf]).optional(),execution:q.z.discriminatedUnion("runtime",[q.z.object({runtime:q.z.literal("manual")}).strict(),q.z.object({runtime:q.z.literal("autonomous"),autonomous:q.z.object({provider:q.z.enum(["codex","claude"]),model:q.z.string().min(1),max_parallelism:q.z.number().int().min(1).max(8),lease_ms:q.z.number().int().min(5e3).max(36e5),max_phase_attempts:q.z.number().int().positive().nullable().optional(),max_total_invocations:q.z.number().int().positive().nullable().optional()}).strict()}).strict()]).optional(),assurance:q.z.object({version:q.z.literal(1),standard_depth:q.z.enum(["auto","base","elevated"]),require_final_commit:q.z.boolean()}).strict().optional(),context:q.z.object({canonical_roots:q.z.array(q.z.string().min(1)).min(1),projection_roots:q.z.array(q.z.string().min(1))}).strict().optional()}).strict().superRefine((e,t)=>{let n=e.zaip?.enabled,i=e["zaip-aios"]?.enabled;n!==void 0&&i!==void 0&&n!==i&&t.addIssue({code:"custom",path:["zaip","enabled"],message:"Conflicting ZAIP activation keys: zaip.enabled and legacy zaip-aios.enabled must agree"})}),Ly={framework:q.z.object({version:q.z.string().min(1),distribution_sha256:Ps.nullable()}).strict(),layout:q.z.object({version:q.z.union([q.z.literal(2),q.z.literal(3)])}).strict(),resolved_profile:q.z.object({id:q.z.string().min(1).nullable(),sha256:Ps.nullable()}).strict()},bx=q.z.object({lock_version:q.z.literal(1),...Ly,managed_files:hx}).strict(),Ex=q.z.object({lock_version:q.z.literal(2),...Ly,managed_files:vx}).strict(),_z=q.z.toJSONSchema(Sx),pz=q.z.toJSONSchema(q.z.union([bx,Ex]));var Oe=require("node:fs/promises"),Fe=require("node:path");var Uy=require("node:crypto");var My="23456789ABCDEFGHJKLMNPQRSTUVWXYZ";function Ds(e=4){if(!Number.isSafeInteger(e)||e<2||e>16)throw new RangeError("collision code length must be between 2 and 16");let t=(0,Uy.randomBytes)(e);return Array.from(t,n=>My[n%My.length]).join("")}var Gn=class extends Error{name="WorkspacePathError"},Qi=class{root;appendQueues=new Map;constructor(t){this.root=(0,Fe.resolve)(t)}resolve(t){if(kx(t)||Ox(t))throw new Gn("Expected a path relative to the workspace root");let n=(0,Fe.resolve)(this.root,t),i=(0,Fe.relative)(this.root,n);if(i===".."||i.startsWith(`..${Fe.sep}`)||(0,Fe.isAbsolute)(i))throw new Gn(`Path escapes workspace root: ${t}`);return n}async exists(t){try{let n=this.resolve(t);return await this.assertPhysicalContainment(n),await(0,Oe.stat)(n),!0}catch(n){if(Yi(n)&&n.code==="ENOENT")return!1;throw n}}async readText(t){let n=this.resolve(t);return await this.assertPhysicalContainment(n),(0,Oe.readFile)(n,"utf8")}async readBytes(t){let n=this.resolve(t);return await this.assertPhysicalContainment(n),(0,Oe.readFile)(n)}async readTextFrom(t,n){if(!Number.isSafeInteger(n)||n<0)throw new RangeError("Expected a non-negative byte offset");let i=this.resolve(t);await this.assertPhysicalContainment(i);let r=await(0,Oe.open)(i,"r");try{let o=await r.stat(),a=Math.min(n,o.size),s=Buffer.allocUnsafe(o.size-a);return s.byteLength>0&&await r.read(s,0,s.byteLength,a),{content:s.toString("utf8"),nextOffset:o.size}}finally{await r.close()}}async listFiles(t,n=""){let i=this.resolve(t);return await this.assertPhysicalContainment(i),await this.exists(t)?(await(0,Oe.readdir)(i,{recursive:!0,withFileTypes:!0})).filter(o=>o.isFile()).map(o=>(0,Fe.relative)(this.root,(0,Fe.resolve)(o.parentPath,o.name)).replace(/\\/g,"/")).filter(o=>o.endsWith(n)).sort():[]}async listDirectories(t){let n=this.resolve(t);return await this.assertPhysicalContainment(n),await this.exists(t)?(await(0,Oe.readdir)(n,{withFileTypes:!0})).filter(r=>r.isDirectory()).map(r=>(0,Fe.relative)(this.root,(0,Fe.resolve)(n,r.name)).replace(/\\/g,"/")).sort():[]}async writeTextAtomic(t,n){let i=this.resolve(t),r=`${i}.${Ds(6)}.tmp`;await this.assertPhysicalContainment(i),await(0,Oe.mkdir)((0,Fe.dirname)(i),{recursive:!0}),await this.assertPhysicalContainment(i);try{await(0,Oe.writeFile)(r,n,{encoding:"utf8",flag:"wx"}),await wx(r,i)}finally{await(0,Oe.rm)(r,{force:!0})}}async appendText(t,n){let i=this.resolve(t),o=(this.appendQueues.get(i)??Promise.resolve()).catch(()=>{}).then(async()=>{await this.assertPhysicalContainment(i),await(0,Oe.mkdir)((0,Fe.dirname)(i),{recursive:!0}),await this.assertPhysicalContainment(i),await(0,Oe.appendFile)(i,n,{encoding:"utf8",flush:!0})});this.appendQueues.set(i,o);try{await o}finally{this.appendQueues.get(i)===o&&this.appendQueues.delete(i)}}async writeTextExclusive(t,n){let i=this.resolve(t);await this.assertPhysicalContainment(i),await(0,Oe.mkdir)((0,Fe.dirname)(i),{recursive:!0}),await this.assertPhysicalContainment(i),await(0,Oe.writeFile)(i,n,{encoding:"utf8",flag:"wx",flush:!0})}async writeTextAtomicExclusive(t,n){let i=this.resolve(t),r=`${i}.${Ds(6)}.tmp`;await this.assertPhysicalContainment(i),await(0,Oe.mkdir)((0,Fe.dirname)(i),{recursive:!0}),await this.assertPhysicalContainment(i);try{await(0,Oe.writeFile)(r,n,{encoding:"utf8",flag:"wx",flush:!0}),await(0,Oe.link)(r,i)}finally{await(0,Oe.rm)(r,{force:!0})}}async removeFile(t){let n=this.resolve(t);await this.assertPhysicalContainment(n),await(0,Oe.rm)(n,{force:!0})}async removeFileIfContentMatches(t,n){let i=`${t}.${Ds(16)}.compare-delete`;try{await this.moveFileAtomic(t,i)}catch(s){if(Yi(s)&&s.code==="ENOENT")return!1;throw s}if(await this.readText(i)===n)return await this.removeFile(i),!0;let o=this.resolve(i),a=this.resolve(t);try{await(0,Oe.link)(o,a),await this.removeFile(i)}catch(s){throw Yi(s)&&s.code==="EEXIST"?new Gn(`Conditional delete observed a replacement; captured file retained at ${i}`):s}return!1}async collectCompareDeleteTombstones(t){let n=[];for(let i of await this.listFiles(t)){let r=/^(.*)\.[A-Z0-9]{16}\.compare-delete$/.exec(i);if(r===null)continue;let o=r[1];o!==void 0&&await this.exists(o)&&(await this.removeFile(i),n.push(i))}return n}async moveFileAtomic(t,n){let i=this.resolve(t),r=this.resolve(n);await this.assertPhysicalContainment(i),await this.assertPhysicalContainment(r),await(0,Oe.mkdir)((0,Fe.dirname)(r),{recursive:!0}),await this.assertPhysicalContainment(r),await(0,Oe.rename)(i,r)}async assertPhysicalContainment(t){let n=await(0,Oe.realpath)(this.root),i=t,r=null;for(;;)try{let o=await(0,Oe.realpath)(i),a=(0,Fe.relative)(n,o);if(a===".."||a.startsWith(`..${Fe.sep}`)||(0,Fe.isAbsolute)(a))throw await(0,Oe.lstat)(i),new Gn(`Physical path escapes workspace root: ${t}`);return}catch(o){if(!Yi(o)||o.code!=="ENOENT")throw o;if(r=o,i===this.root)throw new Gn(`Cannot resolve workspace root for: ${t}`,{cause:r});let a=(0,Fe.dirname)(i);if(a===i)throw new Gn(`Cannot resolve workspace ancestor for: ${t}`,{cause:r});i=a}}};function kx(e){return Fe.posix.isAbsolute(e)||Fe.win32.isAbsolute(e)||/^[A-Za-z]:/.test(e)}function Ox(e){return e.split(/[\\/]+/).some(t=>t==="..")}function Yi(e){return e instanceof Error&&"code"in e}async function wx(e,t){if(process.platform!=="win32"){await(0,Oe.rename)(e,t);return}for(let n=0;n<5;n+=1)try{await(0,Oe.rm)(t,{force:!0}),await(0,Oe.rename)(e,t);return}catch(i){if(!Ax(i)||n===4)throw i;await Tx(25*(n+1))}}function Ax(e){return Yi(e)&&["EPERM","EBUSY","EACCES"].includes(e.code??"")}async function Tx(e){await new Promise(t=>setTimeout(t,e))}var xy=require("node:child_process");var Py=require("node:util"),vz=(0,Py.promisify)(xy.execFile);var st=ut(pt(),1);var Dy=ut($u(),1);var kz=st.z.object({id:st.z.string().regex(/^RULE-[A-Z0-9-]+$/),load:st.z.enum(["always","auto","file_match","manual"]),globs:st.z.array(st.z.string().min(1)).default([]),priority:st.z.enum(["critical","high","medium","low"]),max_context_tokens:st.z.number().int().positive(),requires:st.z.array(st.z.string().regex(/^RULE-[A-Z0-9-]+$/))}).strict().superRefine((e,t)=>{e.load==="file_match"&&e.globs.length===0&&t.addIssue({code:"custom",path:["globs"],message:"file_match Rules require at least one glob"})}),Oz=st.z.object({schema_version:st.z.literal(2),id:st.z.string().regex(/^REQUIREMENTS-[A-Z0-9-]+$/),area:st.z.string().regex(/^[a-z][a-z0-9-]*$/),title:st.z.string().min(1),status:st.z.enum(["proposed","active","deprecated"]),version:st.z.number().int().positive(),source_change:st.z.string().min(1).nullable(),source_release:st.z.string().regex(/^\d+\.\d+\.\d+$/).optional()}).strict().superRefine((e,t)=>{e.source_change===null&&e.source_release===void 0&&t.addIssue({code:"custom",path:["source_release"],message:"released Requirements require source_release when source_change is null"}),e.source_change!==null&&e.source_release!==void 0&&t.addIssue({code:"custom",path:["source_release"],message:"source_release is only valid when source_change is null"})});var ge=ut(pt(),1);var Nx=["codex_host_native","provider_subprocess"],Ix=["frontier","balanced","fast_scan","review"],Rx=["subagents","worktrees","sandbox","approvals","skills","mcp"];var Tz=ge.z.enum(Nx),Nz=ge.z.enum(Ix),zy=ge.z.enum(Rx),$x=ge.z.array(zy).min(1).refine(e=>new Set(e).size===e.length,{message:"native_surfaces must be unique"}),Cx=ge.z.object({locator:ge.z.string().min(1),candidate_sha256:ge.z.string().regex(/^[a-f0-9]{64}$/)}).strict(),Lx=ge.z.object({capability_id:ge.z.string().regex(/^CAP-[A-Z0-9-]+$/),current_state:ge.z.literal("implemented"),previous_states:ge.z.tuple([ge.z.literal("declared")]),evidence:ge.z.array(Cx).length(0)}).strict(),Mx=ge.z.object({tier:ge.z.literal(1),enabled:ge.z.literal(!0),optional:ge.z.literal(!1),invokes_provider_subprocess:ge.z.literal(!1),authority:ge.z.literal("host"),native_surfaces:$x,capability_bindings:ge.z.record(zy,Lx)}).strict().superRefine((e,t)=>{let n=Object.keys(e.capability_bindings).sort(),i=[...e.native_surfaces].sort();JSON.stringify(n)!==JSON.stringify(i)&&t.addIssue({code:"custom",path:["capability_bindings"],message:"every native surface requires exactly one conformance/maturity binding"})}),Ux=ge.z.object({tier:ge.z.union([ge.z.literal(2),ge.z.literal(3)]),enabled:ge.z.boolean(),optional:ge.z.literal(!0),invokes_provider_subprocess:ge.z.literal(!0),authority:ge.z.literal("framework"),native_surfaces:ge.z.array(ge.z.never()).length(0),opt_in:ge.z.object({required:ge.z.literal(!0),allowed_sources:ge.z.array(ge.z.enum(["project_config","human_decision"])).min(1).refine(e=>new Set(e).size===e.length,{message:"opt-in sources must be unique"})}).strict()}).strict(),js=ge.z.object({selection:ge.z.enum(["host_available","inherit_host"]),reasoning:ge.z.enum(["low","medium","high"]),intent:ge.z.string().min(1)}).strict(),Iz=ge.z.object({schema_version:ge.z.literal(1),host_id:ge.z.literal("codex"),candidate_sha256:ge.z.null(),default_mode:ge.z.literal("codex_host_native"),modes:ge.z.object({codex_host_native:Mx,provider_subprocess:Ux}).strict(),model_classes:ge.z.object({frontier:js,balanced:js,fast_scan:js,review:js}).strict()}).strict(),Rz=ge.z.object({enabled:ge.z.literal(!0),source:ge.z.enum(["project_config","human_decision"]),provenance:ge.z.object({reference:ge.z.string().min(1),recorded_at:ge.z.string().datetime({offset:!0})}).strict()}).strict();var We=ut(pt(),1);var xx=We.z.object({schema_version:We.z.literal(1),project:We.z.object({id:We.z.string().min(1),name:We.z.string().min(1),timezone:We.z.string().min(1).default("America/Sao_Paulo")}),framework:We.z.object({version:We.z.string().min(1)}),layout:We.z.object({version:We.z.literal(1),managed_namespace:We.z.string().min(1).default(".agents/managed"),project_namespace:We.z.string().min(1).default(".agents/project")}).default({version:1,managed_namespace:".agents/managed",project_namespace:".agents/project"}),profile:We.z.object({id:We.z.string().min(1).default("zaip-aios-stack")}),paths:We.z.object({specs:We.z.string().min(1).default(".agents/specs"),changes:We.z.string().min(1).default(".agents/changes"),tasks:We.z.string().min(1).default(".agents/tasks"),decisions:We.z.string().min(1).default(".agents/decisions"),runs:We.z.string().min(1).default(".agents/runs")}).default({specs:".agents/specs",changes:".agents/changes",tasks:".agents/tasks",decisions:".agents/decisions",runs:".agents/runs"}),agents:We.z.array(We.z.enum(["codex","claude"])).default(["codex","claude"])}).strict(),xz=We.z.toJSONSchema(xx);var Fy="(?:access[_-]?token|refresh[_-]?token|id[_-]?token|token|api[_-]?key|password|passwd|secret|client[_-]?secret|authorization|signature|sig)",Hz=new RegExp(`^${Fy}$`,"i");var Jz=new RegExp(String.raw`\b${Fy}["']?\s*[:=]\s*["']?((?:(?:bearer|basic)\s+)?(?:\[redacted(?: private key)?\]|<redacted>|\*{3,})|[^\s"',;]+)`,"gi");var Uu=class{#e;constructor(t){let n=new Map;for(let i of t){let r=n.get(i.from)??new Set;r.add(i.to),n.set(i.from,r)}this.#e=n}canTransition(t,n){return this.#e.get(t)?.has(n)??!1}assertTransition(t,n){if(!this.canTransition(t,n))throw new Error(`Invalid state transition: ${t} -> ${n}`)}nextStates(t){return[...this.#e.get(t)??[]]}};var Xz=new Uu([{from:"draft",to:"planned"},{from:"draft",to:"cancelled"},{from:"planned",to:"executing"},{from:"planned",to:"cancelled"},{from:"executing",to:"verifying"},{from:"executing",to:"blocked"},{from:"executing",to:"cancelled"},{from:"verifying",to:"completed"},{from:"verifying",to:"failed"},{from:"verifying",to:"blocked"},{from:"verifying",to:"cancelled"},{from:"blocked",to:"executing"},{from:"blocked",to:"cancelled"}]);var Y=ut(pt(),1);var xu=e=>Math.round(e*1e6)/1e6;function zs(e,t,n){let i=`${e} ${t} ${n}`.toLowerCase();return i.includes("claude")||i.includes("anthropic")?"anthropic":i.includes("gpt")||i.includes("openai")||i.includes("codex")?"openai":null}function Zy(e){let t=Math.max(e.inputTokens-e.cachedInputTokens,0),n=xu(t/1e6*e.inputRate*e.inputMultiplier),i=xu(e.cachedInputTokens/1e6*(e.cachedInputRate??0)*e.inputMultiplier),r=xu(e.outputTokens/1e6*e.outputRate*e.outputMultiplier);return{inputUsd:n,cachedInputUsd:i,outputUsd:r,reasoningUsd:0}}var Pe=ut(pt(),1),ti=Pe.z.number().finite().nonnegative().nullable(),Zx=Pe.z.object({task_id:Pe.z.string().min(1),completed:Pe.z.boolean(),completed_at:Pe.z.string().min(1).nullable(),attempt:Pe.z.number().int().nonnegative().nullable(),attempt_id:Pe.z.string().min(1).nullable().optional(),equivalence_key:Pe.z.string().min(1).nullable().optional(),model:Pe.z.string().min(1).nullable(),reasoning_effort:Pe.z.enum(["low","medium","high","xhigh"]).nullable(),baseline_task_id:Pe.z.string().min(1).nullable(),baseline_attempt_id:Pe.z.string().min(1).nullable().optional(),baseline_equivalence_id:Pe.z.string().min(1).nullable(),observed_cost_usd:ti,baseline_observed_cost_usd:ti,quality_score:ti,quality_floor:ti,rework_count:Pe.z.number().int().nonnegative().nullable(),billed_amount:ti.optional(),billed_currency:Pe.z.string().min(1).nullable().optional(),billed_provenance:Pe.z.enum(["observed","inferred","unavailable"]).nullable().optional(),billed_source_id:Pe.z.string().min(1).nullable().optional(),billed_at:Pe.z.string().min(1).nullable().optional(),baseline_billed_amount:ti.optional(),baseline_billed_currency:Pe.z.string().min(1).nullable().optional(),baseline_billed_provenance:Pe.z.enum(["observed","inferred","unavailable"]).nullable().optional(),baseline_billed_source_id:Pe.z.string().min(1).nullable().optional(),baseline_billed_at:Pe.z.string().min(1).nullable().optional()}).strict(),F1=Pe.z.object({timezone:Pe.z.string().min(1),interval:Pe.z.object({start:Pe.z.string().min(1),end:Pe.z.string().min(1)}).strict(),equivalence_key:Pe.z.string().min(1).nullable().optional(),tasks:Pe.z.array(Zx)}).strict();var qy=require("node:crypto");function Pu(e){let t=qx(e.manifest),n=t.source_streams.find(i=>i.run_id===e.run_id);if(n===void 0)return null;if(n.path!==e.path||Vy(e.content)!==n.content_sha256)throw new Error(`Historical developer attribution source mismatch: ${e.run_id}`);return t.assignment}function Vy(e){return(0,qy.createHash)("sha256").update(e).digest("hex")}function qx(e){if(typeof e!="object"||e===null)throw new Error("Invalid historical developer attribution manifest");let t=e,{manifest_hash:n,...i}=t;if(t.schema_version!==1||t.kind!=="historical_developer_attribution"||t.assignment?.attribution_source!=="human_assigned"||!Array.isArray(t.source_streams)||Vy(JSON.stringify(i))!==n)throw new Error("Invalid historical developer attribution manifest");return t}var Tr=Y.z.string().datetime({offset:!0}).or(Y.z.string().datetime()),Bx=Y.z.object({id:Y.z.string().min(1),provider:Y.z.enum(["openai","anthropic"]),aliases:Y.z.array(Y.z.string().min(1)).default([]),input_per_million_usd:Y.z.number().nonnegative(),cached_input_per_million_usd:Y.z.number().nonnegative().nullable().default(null),output_per_million_usd:Y.z.number().nonnegative(),reasoning_per_million_usd:Y.z.number().nonnegative().nullable().default(null),priority_input_per_million_usd:Y.z.number().nonnegative().nullable().optional(),priority_cached_input_per_million_usd:Y.z.number().nonnegative().nullable().optional(),priority_output_per_million_usd:Y.z.number().nonnegative().nullable().optional(),priority_reasoning_per_million_usd:Y.z.number().nonnegative().nullable().optional(),reasoning_billed_separately:Y.z.boolean().default(!1),long_context_threshold_tokens:Y.z.number().int().positive().nullable().default(null),long_context_input_multiplier:Y.z.number().positive().default(1),long_context_output_multiplier:Y.z.number().positive().default(1),source_label:Y.z.string().min(1),source_url:Y.z.string().url(),notes:Y.z.array(Y.z.string()).default([])}).strict(),By=Y.z.object({schema_version:Y.z.literal(1),updated_at:Tr,source:Y.z.string().min(1),disclaimer:Y.z.string().min(1),models:Y.z.array(Bx)}).strict(),Hy=Y.z.object({schema_version:Y.z.literal(1),base:Y.z.literal("USD"),quote:Y.z.literal("BRL"),rate:Y.z.number().positive(),as_of:Tr,source_label:Y.z.string().min(1),source_url:Y.z.string().url()}).strict(),Jy=Y.z.object({input:Y.z.number().int().nonnegative().nullable(),cached_input:Y.z.number().int().nonnegative().nullable().default(null),output:Y.z.number().int().nonnegative().nullable(),reasoning:Y.z.number().int().nonnegative().nullable(),total:Y.z.number().int().nonnegative().nullable().default(null),source:Y.z.preprocess(e=>e==="client"?"provider_reported":e,Y.z.enum(["provider_reported","estimated","unavailable"]))}).strict(),Ky=Y.z.object({estimated_usd:Y.z.number().nonnegative().nullable(),estimated_brl:Y.z.number().nonnegative().nullable(),fx_rate:Y.z.number().positive().nullable(),pricing_model:Y.z.string().nullable(),pricing_source:Y.z.string().nullable(),input_usd:Y.z.number().nonnegative().nullable().default(null),cached_input_usd:Y.z.number().nonnegative().nullable().default(null),output_usd:Y.z.number().nonnegative().nullable().default(null),reasoning_usd:Y.z.number().nonnegative().nullable().default(null)}).strict(),Hx=Y.z.object({cycle_count:Y.z.number().int().nonnegative().nullable(),source:Y.z.enum(["repository","local-codex","manual","unavailable"]),segment_key:Y.z.string().nullable()}).strict(),zx=Y.z.object({schema_version:Y.z.literal(1),recorded_at:Tr,run_id:Y.z.string().startsWith("RUN-"),task_id:Y.z.string().startsWith("TASK-"),spec_id:Y.z.string().nullable(),change_id:Y.z.string().nullable(),task_title:Y.z.string().nullable(),task_status:Y.z.string().nullable(),client:Y.z.string().min(1),agent:Y.z.string().min(1),provider:Y.z.enum(["openai","anthropic"]).nullable(),model:Y.z.string().min(1),status:Y.z.enum(["running","completed","failed"]),started_at:Tr,finished_at:Tr.nullable(),duration_ms:Y.z.number().int().nonnegative().nullable(),token_usage:Jy,estimated_cost:Ky,telemetry:Hx,source_segment_key:Y.z.string().nullable()}).strict(),Fx=Y.z.object({schema_version:Y.z.literal(1),recorded_at:Tr,run_id:Y.z.string().startsWith("RUN-"),task_id:Y.z.string().startsWith("TASK-"),cycle_index:Y.z.number().int().nonnegative(),provider:Y.z.enum(["openai","anthropic"]).nullable(),model:Y.z.string().min(1),timestamp:Tr,source:Y.z.enum(["local-codex","manual"]),source_segment_key:Y.z.string().nullable(),token_usage:Jy,estimated_cost:Ky}).strict();function Wy(e){return Math.round(e*1e6)/1e6}function Fs(e){let t=e.provider??zs(e.model,"",""),n=e.model.toLowerCase(),i=V=>{let ce=V.toLowerCase();if(n===ce)return!0;let Se=n.slice(ce.length);return Se.startsWith("@")||Se.startsWith(":")||Se.startsWith("/")||/^-\d{4}-\d{2}-\d{2}(?:$|[.:@/])/.test(Se)},r=e.catalog.models.find(V=>i(V.id)||V.aliases.some(ce=>i(ce)));if(!r||t!==null&&r.provider!==t)return{estimated_usd:null,estimated_brl:null,fx_rate:e.fxRate?.rate??null,pricing_model:null,pricing_source:null,input_usd:null,cached_input_usd:null,output_usd:null,reasoning_usd:null};let o=e.usage.cached_input,a=e.usage.input,s=e.usage.output;if(a===null||o===null||s===null)return{estimated_usd:null,estimated_brl:null,fx_rate:e.fxRate?.rate??null,pricing_model:r.id,pricing_source:r.source_label,input_usd:null,cached_input_usd:null,output_usd:null,reasoning_usd:null};let l=e.usage.reasoning??0,c=r.long_context_threshold_tokens!==null&&(e.usage.input??0)>r.long_context_threshold_tokens,u=c?r.long_context_input_multiplier:1,d=c?r.long_context_output_multiplier:1,p=e.serviceTier==="priority"||e.serviceTier==="fast";if(p&&c)return{estimated_usd:null,estimated_brl:null,fx_rate:e.fxRate?.rate??null,pricing_model:r.id,pricing_source:r.source_label,input_usd:null,cached_input_usd:null,output_usd:null,reasoning_usd:null};let f=p?r.priority_input_per_million_usd??null:r.input_per_million_usd,S=p?r.priority_output_per_million_usd??null:r.output_per_million_usd;if(f===null||S===null)return{estimated_usd:null,estimated_brl:null,fx_rate:e.fxRate?.rate??null,pricing_model:r.id,pricing_source:r.source_label,input_usd:null,cached_input_usd:null,output_usd:null,reasoning_usd:null};let{inputUsd:h,cachedInputUsd:v,outputUsd:E,reasoningUsd:U}=Zy({inputTokens:a,cachedInputTokens:o,outputTokens:s,reasoningTokens:l,inputRate:f,cachedInputRate:p?r.priority_cached_input_per_million_usd??null:r.cached_input_per_million_usd,outputRate:S,reasoningRate:p?r.priority_reasoning_per_million_usd??null:r.reasoning_per_million_usd,inputMultiplier:u,outputMultiplier:d}),F=Wy(h+v+E+U),Z=e.fxRate===null||e.fxRate===void 0?null:Wy(F*e.fxRate.rate);return{estimated_usd:F,estimated_brl:Z,fx_rate:e.fxRate?.rate??null,pricing_model:r.id,pricing_source:r.source_label,input_usd:h,cached_input_usd:v,output_usd:E,reasoning_usd:U}}var $e=ut(pt(),1);function zt(e,t){let n=[...new Set(t)].sort((a,s)=>a.localeCompare(s)),i=new Map;if(n.length===0)return i;if(e===null||!Number.isFinite(e)){for(let a of n)i.set(a,null);return i}if(Number.isInteger(e)){let a=Math.floor(e/n.length),s=e-a*n.length;return n.forEach((l,c)=>{i.set(l,a+(c===n.length-1?s:0))}),i}let r=e/n.length,o=0;return n.forEach((a,s)=>{let l=s===n.length-1?e-o:r;i.set(a,l),o+=l}),i}var Xy=".agents/records/lifecycle/views",xF=`${Xy}/manifest.json`;var Nr=".agents/records/lifecycle",cZ=`${Nr}/manifest.json`,lZ=`${Nr}/entity-snapshot.json`,uZ=`${Nr}/entity-state.json`,dZ=`${Nr}/indexes`;var _Z=`${Nr}/summary.json`,pZ=`${Nr}/overview.json`,fZ=`${Nr}/active-work.json`;var Qy=$e.z.enum(["prd","spec","change","task","execution","run","decision","validation","evidence"]),mZ=Qy.options,Kx=$e.z.enum(["parent","child","references","evidence","requirement"]),Gx=$e.z.enum(["explicit","derived"]),Xx=$e.z.object({target_id:$e.z.string().min(1),type:Kx,direction:$e.z.enum(["outbound","inbound"]),provenance:Gx,source_locator:$e.z.string().min(1).nullable().default(null)}).strict(),Yx=$e.z.object({input_tokens:$e.z.number().int().nonnegative().nullable().default(null),output_tokens:$e.z.number().int().nonnegative().nullable().default(null),cached_input_tokens:$e.z.number().int().nonnegative().nullable().default(null),total_tokens:$e.z.number().int().nonnegative().nullable().default(null),cost:$e.z.number().nonnegative().nullable().default(null),currency:$e.z.string().min(1).nullable().default(null)}).strict(),Qx=$e.z.object({kind:Qy,id:$e.z.string().min(1),title:$e.z.string().min(1).nullable().default(null),status:$e.z.string().min(1).nullable().default(null),risk:$e.z.string().min(1).nullable().default(null),priority:$e.z.string().min(1).nullable().default(null),updated_at:$e.z.string().datetime({offset:!0}),relations:$e.z.array($e.z.string().min(1)).default([]),relation_edges:$e.z.array(Xx).optional(),usage:Yx.nullable().default(null),data:$e.z.record($e.z.string(),$e.z.unknown()).nullable().default(null)}).strict(),gZ=$e.z.object({schema_version:$e.z.literal(1),event_id:$e.z.string().min(1),occurred_at:$e.z.string().datetime({offset:!0}),operation:$e.z.enum(["upsert","remove"]),entity:Qx}).strict();var fe=ut(pt(),1);var $t=ut(pt(),1);var k=ut(pt(),1);var It=ut(pt(),1),eP=It.z.string().datetime({offset:!0}).or(It.z.string().datetime()),eh=It.z.object({schema_version:It.z.literal(2),event_id:It.z.string().min(1).max(200),run_id:It.z.string().startsWith("RUN-"),sequence:It.z.number().int().positive(),occurred_at:eP,type:It.z.literal("run.attribution.recovered"),phase:It.z.literal("execution"),execution_id:It.z.string().startsWith("EXEC-"),task_id:It.z.string().startsWith("TASK-"),change_id:It.z.string().startsWith("CHG-")}).strict();function th(e,t){return e.entrypoint==="task"&&e.execution_id!==null&&e.task_id!==null&&e.change_id===null&&t.execution_id===e.execution_id&&t.task_id===e.task_id}function Du(e,t){return e.coverage==="partial"&&t.coverage==="complete"&&e.call_id===t.call_id&&e.agent_invocation_id===t.agent_invocation_id&&e.source_call_key===t.source_call_key&&JSON.stringify(e.tokens)===JSON.stringify(t.tokens)}function ju(e,t,n){return e.type==="usage.recorded"&&e.retrospective_correction===!0&&e.activity_kind==="retrospective_observed_timing"&&e.supersedes_event_id===null&&e.phase===t.phase&&e.source_segment_key!==null&&e.source_started_at!==void 0&&e.source_finished_at!==void 0&&Date.parse(e.source_finished_at)>=Date.parse(e.source_started_at)&&e.source_occurred_at===e.source_finished_at&&e.tokens.source==="unavailable"&&[e.tokens.input,e.tokens.cached_input,e.tokens.output,e.tokens.reasoning,e.tokens.total,e.cost.usd,e.cost.brl,e.cost.fx_rate,e.provider,e.model].every(r=>r===null)?!0:e.type==="usage.recorded"&&e.retrospective_correction===!0&&e.activity_kind==="retrospective_local_remeasurement"&&e.supersedes_event_id!==null&&n.has(e.supersedes_event_id)&&e.phase===t.phase}function Zs(e,t){let n={conversation:0,planning:1,execution:2};if(n[t]<n[e])throw new Error(`Run V2 phase cannot move backward from ${e} to ${t}`)}var Xe=ut(pt(),1),nh=Xe.z.string().datetime({offset:!0}).or(Xe.z.string().datetime()),nP=Xe.z.string().regex(/^DEC-(?:HUMAN|AI)-/),rP=Xe.z.enum(["architecture","contract","database","security","dependency","network","infrastructure","cost","implementation","rollback"]),wZ=Xe.z.object({schema_version:Xe.z.literal(2),id:nP,title:Xe.z.string().min(1),scope_type:Xe.z.enum(["change","execution"]),scope_id:Xe.z.string().min(1),origin:Xe.z.enum(["human","agent"]),category:rP,context:Xe.z.string().min(1),decision:Xe.z.string().min(1),reason:Xe.z.string().min(1),alternatives:Xe.z.array(Xe.z.string().min(1)),consequences:Xe.z.array(Xe.z.string().min(1)),reversible:Xe.z.boolean(),rollback:Xe.z.string().min(1),confidence:Xe.z.number().min(0).max(1).nullable(),created_at:nh,confirmed_at:nh.nullable()}).strict().superRefine((e,t)=>{let n=e.scope_type==="change"?"CHG-":"EXEC-";e.scope_id.startsWith(n)||t.addIssue({code:"custom",path:["scope_id"],message:`${e.scope_type} decision requires ${n} scope_id`});let i=e.origin==="human"?"DEC-HUMAN-":"DEC-AI-";e.id.startsWith(i)||t.addIssue({code:"custom",path:["id"],message:`${e.origin} decision requires ${i} id`}),e.origin==="human"&&e.confidence!==null&&t.addIssue({code:"custom",path:["confidence"],message:"Human decisions do not use agent confidence"}),e.origin==="agent"&&e.confidence===null&&t.addIssue({code:"custom",path:["confidence"],message:"Agent decisions require confidence"}),e.origin==="human"&&e.confirmed_at===null&&t.addIssue({code:"custom",path:["confirmed_at"],message:"Human decisions require explicit confirmation provenance"})});var Rt=k.z.string().datetime({offset:!0}).or(k.z.string().datetime()),qs=k.z.enum(["conversation","planning","execution"]),Vs=k.z.string().startsWith("RUN-"),aP=k.z.string().startsWith("CONV-"),rh=k.z.string().startsWith("EXEC-").nullable(),ih=k.z.string().startsWith("TASK-").nullable(),oh=k.z.string().startsWith("SPEC-").nullable(),ah=k.z.string().startsWith("PRD-").nullable(),sh=k.z.string().startsWith("CHG-").nullable(),Fu=Vs.nullable(),Ir=k.z.string().regex(/^(?:AINV|INV)-/).max(200),ch=k.z.string().startsWith("MCALL-").max(200),xZ=k.z.enum(["intake","orchestrator","subagent"]),sP=k.z.enum(["intake","orchestrator","subagent","owner","contributor"]),lh=k.z.enum(["intake","orchestration","execution","review","audit","finalization"]),Zu=k.z.enum(["low","medium","high","xhigh"]),eo=k.z.object({schema_version:k.z.literal(1),provider:k.z.literal("github"),account_id:k.z.string().min(1).max(100),login_snapshot:k.z.string().min(1).max(100),attribution_source:k.z.enum(["verified_local_account","last_verified_local_account","cached_fallback","human_assigned"]),verified_at:Rt.nullable(),expires_at:Rt.nullable().optional(),last_verified_at:Rt.nullable().optional()}).strict();var uh=k.z.enum(["orchestrator","delegated"]);var qu=k.z.object({input:k.z.number().int().nonnegative().nullable(),cached_input:k.z.number().int().nonnegative().nullable(),output:k.z.number().int().nonnegative().nullable(),reasoning:k.z.number().int().nonnegative().nullable(),total:k.z.number().int().nonnegative().nullable(),source:k.z.enum(["provider_reported","estimated","unavailable"])}).strict().superRefine((e,t)=>{e.input!==null&&e.cached_input!==null&&e.cached_input>e.input&&t.addIssue({code:"custom",path:["cached_input"],message:"cached_input cannot exceed input"}),e.total!==null&&e.input!==null&&e.output!==null&&e.total<e.input+e.output&&t.addIssue({code:"custom",path:["total"],message:"total cannot be lower than input + output"})}),dh=k.z.object({usd:k.z.number().nonnegative().nullable(),brl:k.z.number().nonnegative().nullable(),fx_rate:k.z.number().positive().nullable().optional()}).strict(),Rr={schema_version:k.z.literal(2),event_id:k.z.string().min(1).max(200),run_id:Vs,sequence:k.z.number().int().positive(),occurred_at:Rt},cP=k.z.object({intent:k.z.enum(["conversation","continue","refine","rework","new_work"]),classification_source:k.z.enum(["agent","explicit","fallback"]),confidence:k.z.number().min(0).max(1),reason_codes:k.z.array(k.z.string().regex(/^[a-z][a-z0-9-]{0,63}$/)).min(1).max(12)}).strict(),_h=k.z.object({...Rr,type:k.z.literal("run.started"),attribution_status:k.z.enum(["attributed","legacy_unattributed"]),developer_identity:eo.nullable().optional(),phase:qs,run_role:sP.optional(),run_purpose:lh.optional(),requires_finalizer:k.z.boolean().optional(),execution_kind:k.z.enum(["interaction","delivery"]).optional(),execution_eligibility:k.z.array(k.z.enum(["interaction","delivery"])).optional(),entrypoint:k.z.enum(["conversation","task","spec","prd"]),work_type:k.z.enum(["new","rework"]),storage_mode:k.z.enum(["tracked_sanitized","local_only"]),client:k.z.string().min(1).max(100),agent:k.z.string().min(1).max(100),agent_name:k.z.string().min(1).max(100).nullable().optional(),agent_identity_warning:k.z.object({code:k.z.literal("deprecated-agent-identity"),kind:k.z.enum(["id","codex_name","codex_task_name"]),requested:k.z.string().min(1),canonical_id:k.z.string().min(1),deprecated_at:k.z.iso.date(),remove_after:k.z.iso.date()}).strict().optional(),provider:k.z.string().min(1).max(100).nullable(),model:k.z.string().min(1).max(200),reasoning_effort:Zu.nullable().optional(),client_thread_id:k.z.string().min(1).max(200).nullable().optional(),client_turn_id:k.z.string().min(1).max(200).nullable().optional(),conversation_id:aP,execution_id:rh,task_id:ih,spec_id:oh,prd_id:ah,change_id:sh,parent_run_id:Fu,continuation_of_run_id:Fu,retry_of_run_id:Fu,agent_invocation_id:Ir.optional(),root_agent_invocation_id:Ir.optional(),parent_agent_invocation_id:Ir.nullable().optional(),invocation_kind:uh.optional(),delegation_depth:k.z.number().int().nonnegative().optional(),intake:cP.nullable().optional()}).strict().superRefine((e,t)=>{e.phase==="execution"&&e.execution_id===null&&e.attribution_status!=="legacy_unattributed"&&t.addIssue({code:"custom",path:["execution_id"],message:"Execution phase requires execution_id"}),{conversation:e.conversation_id,task:e.task_id,spec:e.spec_id,prd:e.prd_id}[e.entrypoint]===null&&t.addIssue({code:"custom",path:[`${e.entrypoint}_id`],message:`${e.entrypoint} entrypoint requires its scope id`}),e.run_role==="orchestrator"&&e.parent_run_id!==null&&t.addIssue({code:"custom",path:["parent_run_id"],message:"orchestrator Run cannot have parent_run_id"}),e.run_role==="subagent"&&e.parent_run_id===null&&t.addIssue({code:"custom",path:["parent_run_id"],message:"subagent Sub-Run requires parent_run_id"});let i=e.agent_invocation_id!==void 0;i&&(e.root_agent_invocation_id===void 0||e.parent_agent_invocation_id===void 0||e.invocation_kind===void 0||e.delegation_depth===void 0)&&t.addIssue({code:"custom",path:["agent_invocation_id"],message:"Agent Invocation identity must be complete when present"}),i&&e.invocation_kind==="orchestrator"&&(e.parent_agent_invocation_id!==null||e.root_agent_invocation_id!==e.agent_invocation_id||e.delegation_depth!==0)&&t.addIssue({code:"custom",path:["invocation_kind"],message:"orchestrator Agent Invocation must be its root at depth zero"}),i&&e.invocation_kind==="delegated"&&(e.parent_agent_invocation_id===null||e.delegation_depth===0)&&t.addIssue({code:"custom",path:["parent_agent_invocation_id"],message:"delegated Agent Invocation requires a parent and positive depth"});for(let[r,o]of[["parent_run_id",e.parent_run_id],["continuation_of_run_id",e.continuation_of_run_id],["retry_of_run_id",e.retry_of_run_id]])o===e.run_id&&t.addIssue({code:"custom",path:[r],message:`${r} cannot reference itself`})}),ph=k.z.object({...Rr,type:k.z.literal("usage.recorded"),phase:qs,activity_kind:k.z.string().regex(/^[a-z][a-z0-9_-]{0,63}$/),classification_source:k.z.enum(["explicit","current_context","default","legacy_inferred"]),tokens:qu,cost:dh,provider:k.z.string().min(1).max(100).nullable(),model:k.z.string().min(1).max(200).nullable(),source_segment_key:k.z.string().min(1).max(500).nullable(),attributed_spec_id:k.z.string().min(1).max(200).nullable().optional(),model_call_id:ch.nullable().optional(),runtime:k.z.object({reasoning_effort:k.z.string().min(1).max(40).nullable(),service_tier:k.z.string().min(1).max(40).nullable()}).strict().optional(),supersedes_event_id:k.z.string().min(1).max(200).nullable(),retrospective_correction:k.z.literal(!0).optional(),source_occurred_at:Rt.optional(),source_started_at:Rt.optional(),source_finished_at:Rt.optional(),duration_ms:k.z.number().int().nonnegative().nullable().optional(),duration_provenance:k.z.enum(["observed","reconciled","legacy_inferred","estimated","unavailable"]).nullable().optional(),context_stats:k.z.object({initial_pack_tokens:k.z.number().int().nonnegative().nullable(),tool_output_tokens:k.z.number().int().nonnegative().nullable(),files_opened:k.z.number().int().nonnegative().nullable(),snippets_opened:k.z.number().int().nonnegative().nullable()}).strict().optional()}).strict(),fh=k.z.object({...Rr,type:k.z.literal("model.call.observed"),call_id:ch,agent_invocation_id:Ir,coverage:k.z.enum(["complete","partial","unavailable"]),tokens:qu,cost:dh,provider:k.z.string().min(1).max(100).nullable(),model:k.z.string().min(1).max(200).nullable(),source_call_key:k.z.string().min(1).max(500).nullable(),source_occurred_at:Rt.optional(),source_started_at:Rt.optional(),source_finished_at:Rt.optional(),runtime:k.z.object({reasoning_effort:k.z.string().min(1).max(40).nullable(),service_tier:k.z.string().min(1).max(40).nullable()}).strict().optional()}).strict(),mh=k.z.object({schema_version:k.z.literal(1),run_id:Vs,execution_id:rh.nullable().default(null),task_id:ih.nullable().default(null),spec_id:oh.nullable().default(null),prd_id:ah.nullable().default(null),change_id:sh.nullable().default(null),developer_identity:eo.nullable().optional(),zaip_agent:k.z.string().min(1).max(100).nullable().default(null),phase:qs.nullable().default(null),purpose:lh.nullable().default(null),agent_invocation_id:Ir,root_agent_invocation_id:Ir,parent_agent_invocation_id:Ir.nullable(),invocation_kind:uh,delegation_depth:k.z.number().int().nonnegative(),client:k.z.enum(["codex","codex-desktop","codex-subagent"]),thread_id:k.z.string().min(1).max(200).nullable(),turn_id:k.z.string().min(1).max(200).nullable(),agent_path:k.z.string().min(1).max(500).nullable()}).strict().superRefine((e,t)=>{e.invocation_kind==="orchestrator"&&(e.parent_agent_invocation_id!==null||e.root_agent_invocation_id!==e.agent_invocation_id||e.delegation_depth!==0)&&t.addIssue({code:"custom",path:["invocation_kind"],message:"orchestrator telemetry correlation must be its root at depth zero"}),e.invocation_kind==="delegated"&&(e.parent_agent_invocation_id===null||e.delegation_depth===0)&&t.addIssue({code:"custom",path:["parent_agent_invocation_id"],message:"delegated telemetry correlation requires a parent and positive depth"}),e.client==="codex-subagent"&&(e.thread_id!==null||e.agent_path===null&&e.turn_id===null)&&t.addIssue({code:"custom",path:["agent_path"],message:"Codex subagent telemetry requires agent_path or turn_id and no root thread_id"}),e.client!=="codex-subagent"&&e.thread_id===null&&e.turn_id===null&&t.addIssue({code:"custom",path:["thread_id"],message:"Codex root telemetry requires thread_id or turn_id"})}),gh=k.z.object({correlation:mh,event_kind:k.z.enum(["response","usage","terminal","error"]),source:k.z.enum(["codex_app_server","codex_session_fallback","unavailable"]),source_event_key:k.z.string().min(1).max(500),source_method:k.z.enum(["item/completed","rawResponse/completed","thread/tokenUsage/updated","error","turn/completed"]).optional(),stream_boundary:k.z.enum(["item_completed","response_completed","usage_updated","error","turn_completed"]).optional(),source_occurred_at:Rt.nullable(),captured_at:Rt,coverage:k.z.enum(["complete","partial","unavailable"]),tokens:qu.nullable(),provider:k.z.string().min(1).max(100).nullable(),model:k.z.string().min(1).max(200).nullable(),runtime:k.z.object({reasoning_effort:k.z.string().min(1).max(40).nullable(),service_tier:k.z.string().min(1).max(40).nullable()}).strict(),status:k.z.enum(["completed","failed","cancelled"]).nullable(),will_retry:k.z.boolean().nullable().optional(),latency_ms:k.z.number().int().nonnegative().nullable(),historical_cost:k.z.object({estimated_usd:k.z.number().nonnegative().nullable(),estimated_brl:k.z.number().nonnegative().nullable(),fx_rate:k.z.number().positive().nullable(),pricing_model:k.z.string().nullable(),pricing_source:k.z.string().nullable(),input_usd:k.z.number().nonnegative().nullable(),cached_input_usd:k.z.number().nonnegative().nullable(),output_usd:k.z.number().nonnegative().nullable(),reasoning_usd:k.z.number().nonnegative().nullable()}).strict().nullable().optional(),context_stats:k.z.object({initial_pack_tokens:k.z.number().int().nonnegative().nullable(),tool_output_tokens:k.z.number().int().nonnegative().nullable(),files_opened:k.z.number().int().nonnegative().nullable(),snippets_opened:k.z.number().int().nonnegative().nullable()}).strict().nullable(),discarded_counts:k.z.object({prompt:k.z.number().int().nonnegative(),response_text:k.z.number().int().nonnegative(),reasoning:k.z.number().int().nonnegative(),secrets:k.z.number().int().nonnegative()}).strict()}).strict().superRefine((e,t)=>{e.source==="codex_session_fallback"&&e.coverage==="complete"&&t.addIssue({code:"custom",path:["coverage"],message:"Codex session fallback coverage must be partial or unavailable"}),e.source==="unavailable"&&e.coverage!=="unavailable"&&t.addIssue({code:"custom",path:["coverage"],message:"Unavailable source requires unavailable coverage"}),e.source==="unavailable"&&(e.provider!==null||e.model!==null||e.runtime.reasoning_effort!==null||e.runtime.service_tier!==null||e.latency_ms!==null)&&t.addIssue({code:"custom",path:["source"],message:"Unavailable source cannot contain effective runtime observations"}),e.coverage==="unavailable"&&e.tokens!==null&&e.tokens.source!=="unavailable"&&t.addIssue({code:"custom",path:["tokens","source"],message:"Unavailable coverage cannot contain observed tokens"}),e.event_kind==="terminal"&&e.status===null&&t.addIssue({code:"custom",path:["status"],message:"Terminal telemetry requires status"}),e.event_kind==="error"&&(e.will_retry===!0&&e.status!==null||e.will_retry!==!0&&e.status!=="failed")&&t.addIssue({code:"custom",path:["status"],message:"Retrying errors require null status; terminal errors require failed status"})}),lP=k.z.object({schema_version:k.z.literal(1),event_id:k.z.string().startsWith("CEVT-").max(200),checksum_sha256:k.z.string().regex(/^[a-f0-9]{64}$/),compaction:k.z.object({status:k.z.enum(["pending","compacted"]),compacted_at:Rt.nullable()}).strict(),event:gh}).strict(),yh=k.z.string().startsWith("INV-").max(200),hh=k.z.object({...Rr,type:k.z.literal("model.selection.recorded"),invocation_id:yh,requested:k.z.object({model:k.z.string().min(1).max(200),reasoning_effort:Zu.nullable(),velocity:k.z.literal("standard")}).strict(),selection:k.z.object({source:k.z.enum(["execution-override","task-override","auto-policy","project-default"]),policy_version:k.z.number().int().positive(),reasons:k.z.array(k.z.string().regex(/^[a-z][a-z0-9-]{0,63}$/)).min(1).max(20)}).strict()}).strict(),vh=k.z.object({...Rr,type:k.z.literal("provider.invocation.finished"),invocation_id:yh,status:k.z.enum(["completed","failed","cancelled"]),effective:k.z.object({provider:k.z.string().min(1).max(100).nullable(),model:k.z.string().min(1).max(200).nullable(),reasoning_effort:Zu.nullable(),service_tier:k.z.string().min(1).max(40).nullable()}).strict(),latency_ms:k.z.number().int().nonnegative().nullable()}).strict(),Sh=k.z.object({...Rr,type:k.z.literal("run.finished"),phase:qs,status:k.z.enum(["completed","failed","cancelled"]),duration_ms:k.z.number().int().nonnegative().nullable().default(null),duration_provenance:k.z.enum(["observed","reconciled","legacy_inferred","estimated","unavailable"]).nullable().default(null)}).strict(),uP=k.z.object({...Rr,type:k.z.literal("run.finalization.decided"),finalizer_run_id:Vs,outcome:k.z.enum(["completed","blocked","failed","cancelled"]),summary:k.z.string().min(1).max(4e3),evidence_ids:k.z.array(k.z.string().min(1).max(200)).max(100),changed_files:k.z.array(k.z.string().min(1).max(500)).max(1e4).default([])}).strict(),to=k.z.discriminatedUnion("type",[_h,ph,fh,hh,vh,eh,uP,Sh]);var dP=$t.z.object({run_id:$t.z.string().startsWith("RUN-"),path:$t.z.string().startsWith(".agents/records/runs/"),content_sha256:$t.z.string().regex(/^[a-f0-9]{64}$/)}).strict(),_P=$t.z.object({schema_version:$t.z.literal(1),manifest_id:$t.z.string().min(1),created_at:$t.z.string().datetime({offset:!0}),kind:$t.z.literal("historical_developer_attribution"),assignment:eo.extend({attribution_source:$t.z.literal("human_assigned")}),source_streams:$t.z.array(dP).min(1)}).strict().superRefine((e,t)=>{let n=new Set,i=new Set;for(let[r,o]of e.source_streams.entries())n.has(o.run_id)&&t.addIssue({code:"custom",path:["source_streams",r,"run_id"],message:"Duplicate historical Run"}),i.has(o.path)&&t.addIssue({code:"custom",path:["source_streams",r,"path"],message:"Duplicate historical Run path"}),n.add(o.run_id),i.add(o.path)}),qZ=_P.extend({manifest_hash:$t.z.string().regex(/^[a-f0-9]{64}$/)}).strict();var BZ=1440*60*1e3;var KZ=64*1024;function Ah(e){let t=new Map,n=[];for(let i of e){if(i.source_segment_key===null){n.push(i);continue}let r=t.get(i.source_segment_key);if(r===void 0){t.set(i.source_segment_key,i),n.push(i);continue}if(!Th(i,r))throw new Error(`Divergent duplicate source segment: ${i.source_segment_key}`)}return n}function Th(e,t){return JSON.stringify(wh(e))===JSON.stringify(wh(t))}function wh(e){return{phase:e.phase,activity_kind:e.activity_kind,classification_source:e.classification_source,tokens:e.tokens,cost:e.cost,provider:e.provider,model:e.model,source_segment_key:e.source_segment_key,model_call_id:e.model_call_id??null}}function Nh(e,t){let n=[],i=null;for(let r of e.split(/\r?\n/).map(o=>o.trim()).filter(Boolean)){let o=JSON.parse(r),a=to.parse(Array.isArray(o)?t(o,i):o);i??=a.run_id,n.push(a)}return n}function Ih(e,t,n){if(e.model!=="unknown"&&n.requested.model!==e.model)throw new Error(`Agent Run model is immutable: expected ${e.model}, received ${n.requested.model}`);if(e.reasoning_effort!=null&&n.requested.reasoning_effort!==e.reasoning_effort)throw new Error(`Agent Run reasoning effort is immutable: expected ${e.reasoning_effort}, received ${n.requested.reasoning_effort}`);let i=t.find(r=>r.type==="model.selection.recorded");if(i!==void 0){if(JSON.stringify(i.requested)!==JSON.stringify(n.requested))throw new Error(`Agent Run calls must inherit one model configuration: ${e.run_id}`);if(JSON.stringify(i.selection)!==JSON.stringify(n.selection))throw new Error(`Agent Run calls must inherit one selection decision: ${e.run_id}`)}}function Vu(e){return Nh(e,vP)}function Wu(e){let t=new Map;for(let v of e){let E=to.parse(v),U=t.get(E.event_id);if(U!==void 0){if(JSON.stringify(U)!==JSON.stringify(E))throw new Error(`Divergent duplicate Run V2 event: ${E.event_id}`);continue}t.set(E.event_id,E)}let n=[...t.values()].sort((v,E)=>v.sequence-E.sequence);if(n.length===0||n[0]?.type!=="run.started")throw new Error("Run V2 stream must start with run.started");let i=n[0],r=i.phase,o=null,a=null,s=null,l=new Map,c=new Map,u=new Map,d=new Map,p=new Map;for(let[v,E]of n.entries()){if(E.run_id!==i.run_id)throw new Error("Run V2 stream mixes run ids");if(E.sequence!==v+1)throw new Error("Run V2 sequence must be contiguous");let U=l.get(E.sequence);if(U!==void 0&&U!==E.event_id)throw new Error(`Run V2 sequence is duplicated: ${E.sequence}`);if(l.set(E.sequence,E.event_id),v>0&&E.type==="run.started")throw new Error("Run V2 has multiple starts");if(o!==null&&E.type!=="run.finalization.decided"&&!ju(E,o,c))throw new Error("Run V2 contains a non-retrospective record after run.finished");if(E.type==="usage.recorded"){if(Zs(r,E.phase),E.phase==="execution"&&i.execution_id===null&&i.attribution_status!=="legacy_unattributed")throw new Error("Execution phase requires execution_id");if(E.supersedes_event_id!==null&&!c.has(E.supersedes_event_id))throw new Error(`Superseded usage event must occur earlier: ${E.supersedes_event_id}`);c.set(E.event_id,E),r=E.phase}if(E.type==="run.attribution.recovered"){if(!th(i,E))throw new Error("Run attribution recovery does not match its immutable start header");if(s!==null)throw new Error("Run V2 has multiple attribution recoveries");Zs(r,E.phase),r=E.phase,s=E}if(E.type==="model.selection.recorded"){if(Ih(i,n.slice(0,v),{invocationId:E.invocation_id,requested:E.requested,selection:E.selection}),u.has(E.invocation_id))throw new Error(`Duplicate model selection for invocation: ${E.invocation_id}`);u.set(E.invocation_id,E)}if(E.type==="provider.invocation.finished"){if(!u.has(E.invocation_id))throw new Error(`Provider invocation requires earlier model selection: ${E.invocation_id}`);if(d.has(E.invocation_id))throw new Error(`Duplicate provider terminal for invocation: ${E.invocation_id}`);d.set(E.invocation_id,E)}if(E.type==="model.call.observed"){let F=p.get(E.call_id);if(F!==void 0&&JSON.stringify(F)!==JSON.stringify(E)&&!Du(F,E))throw new Error(`Divergent duplicate Model Call: ${E.call_id}`);p.set(E.call_id,E)}if(E.type==="run.finalization.decided"){if(a!==null)throw new Error("Run V2 has multiple finalization decisions");a=E}if(E.type==="run.finished"){if(E.phase!==r)throw new Error("run.finished phase must match the latest phase");o=E}}let f=n.filter(v=>v.type==="usage.recorded"),S=new Set(f.map(v=>v.supersedes_event_id).filter(v=>v!==null)),h=Ah(f.filter(v=>!S.has(v.event_id)));return{run:s===null?i:{...i,phase:s.phase,execution_id:s.execution_id,task_id:s.task_id,change_id:s.change_id},status:o?.status??"running",finished:o,finalization_decision:a,attribution_recovery:s,records:n,usage_records:f,effective_usage_records:h,model_selection_records:[...u.values()],provider_invocation_records:[...d.values()],model_call_records:[...p.values()]}}function vP(e,t){if(e[0]!==3||t===null)throw new Error("Run delta requires transport version 3 and a preceding run.started header");if(e[1]==="f")return{schema_version:2,type:"run.finished",run_id:t,event_id:e[2],sequence:e[3],occurred_at:e[4],phase:e[5],status:e[6]};if(e[1]==="a")return{schema_version:2,type:"run.attribution.recovered",run_id:t,event_id:e[2],sequence:e[3],occurred_at:e[4],phase:e[5],execution_id:e[6],task_id:e[7],change_id:e[8]};if(e[1]==="d"&&Array.isArray(e[8]))return{schema_version:2,type:"run.finalization.decided",run_id:t,event_id:e[2],sequence:e[3],occurred_at:e[4],finalizer_run_id:e[5],outcome:e[6],summary:e[7],evidence_ids:e[8],changed_files:Array.isArray(e[9])?e[9]:[]};if(e[1]==="m"&&Array.isArray(e[6])&&Array.isArray(e[7])){let d=e[6],p=e[7];return{schema_version:2,type:"model.selection.recorded",run_id:t,event_id:e[2],sequence:e[3],occurred_at:e[4],invocation_id:e[5],requested:{model:d[0],reasoning_effort:d[1],velocity:d[2]},selection:{source:p[0],policy_version:p[1],reasons:p[2]}}}if(e[1]==="p"&&Array.isArray(e[7])){let d=e[7];return{schema_version:2,type:"provider.invocation.finished",run_id:t,event_id:e[2],sequence:e[3],occurred_at:e[4],invocation_id:e[5],status:e[6],effective:{provider:d[0],model:d[1],reasoning_effort:d[2],service_tier:d[3]},latency_ms:e[8]}}if(e[1]==="c"&&Array.isArray(e[8])&&Array.isArray(e[9])){let d=e[8],p=e[9],f=e[16];return{schema_version:2,type:"model.call.observed",run_id:t,event_id:e[2],sequence:e[3],occurred_at:e[4],call_id:e[5],agent_invocation_id:e[6],coverage:e[7],tokens:{input:d[0],cached_input:d[1],output:d[2],reasoning:d[3],total:d[4],source:d[5]},cost:{usd:p[0],brl:p[1],fx_rate:p[2]??null},provider:e[10],model:e[11],source_call_key:e[12],...e[13]===null?{}:{source_occurred_at:e[13]},...e[14]===null||e[14]===void 0?{}:{source_started_at:e[14]},...e[15]===null||e[15]===void 0?{}:{source_finished_at:e[15]},...f===null||!Array.isArray(f)?{}:{runtime:{reasoning_effort:f[0],service_tier:f[1]}}}}if(e[1]!=="u"||!Array.isArray(e[8])||!Array.isArray(e[9]))throw new Error("Invalid Run transport v3 delta");let n=e[8],i=e[9],r=e[15],o=e[16],a=e[17],s=e[18],l=e[19],c=e[20],u=typeof e[21]=="string"?e[21]:null;return{schema_version:2,type:"usage.recorded",run_id:t,event_id:e[2],sequence:e[3],occurred_at:e[4],phase:e[5],activity_kind:e[6],classification_source:e[7],tokens:{input:n[0],cached_input:n[1],output:n[2],reasoning:n[3],total:n[4],source:n[5]},cost:{usd:i[0],brl:i[1],fx_rate:i[2]??null},provider:e[10],model:e[11],source_segment_key:e[12],...u==null?{}:{attributed_spec_id:u},...c==null?{}:{model_call_id:c},supersedes_event_id:e[13],...e[14]===null?{}:{source_occurred_at:e[14]},...a==null?{}:{source_started_at:a},...s==null?{}:{source_finished_at:s},...l===!0?{retrospective_correction:!0}:{},...r===null||!Array.isArray(r)?{}:{context_stats:{initial_pack_tokens:r[0],tool_output_tokens:r[1],files_opened:r[2],snippets_opened:r[3]}},...o===null||!Array.isArray(o)?{}:{runtime:{reasoning_effort:o[0],service_tier:o[1]}}}}var Ws=fe.z.string().datetime({offset:!0}),SP=fe.z.preprocess(e=>e==="client"?"provider_reported":e,fe.z.enum(["provider_reported","estimated","unavailable"])),Pq=fe.z.object({id:fe.z.string().regex(/^DEC-(?:HUMAN|AI)-/),title:fe.z.string().min(1),origin:fe.z.enum(["human","agent"]),category:fe.z.enum(["architecture","contract","database","security","dependency","network","infrastructure","cost","implementation"]),status:fe.z.enum(["active","superseded","rejected"]),task:fe.z.string().startsWith("TASK-").nullable(),change:fe.z.string().startsWith("CHG-").nullable(),context:fe.z.string().min(1),decision:fe.z.string().min(1),reason:fe.z.string().min(1),alternatives:fe.z.array(fe.z.string()),consequences:fe.z.array(fe.z.string()),reversible:fe.z.boolean(),rollback:fe.z.string(),confidence:fe.z.number().min(0).max(1).nullable(),created_at:Ws,confirmed_at:Ws.nullable()}).strict();var Dq=fe.z.object({id:fe.z.string().startsWith("RUN-"),task:fe.z.string().startsWith("TASK-"),status:fe.z.enum(["running","completed","failed"]),client:fe.z.string().min(1),agent:fe.z.string().min(1),model:fe.z.string().min(1),started_at:Ws,finished_at:Ws.nullable(),duration_ms:fe.z.number().int().nonnegative().nullable(),provider:fe.z.string().min(1).nullable().default(null),token_usage:fe.z.object({input:fe.z.number().int().nonnegative().nullable(),cached_input:fe.z.number().int().nonnegative().nullable().default(null),output:fe.z.number().int().nonnegative().nullable(),reasoning:fe.z.number().int().nonnegative().nullable(),total:fe.z.number().int().nonnegative().nullable().default(null),source:SP}),cost:fe.z.object({estimated_usd:fe.z.number().nonnegative().nullable(),estimated_brl:fe.z.number().nonnegative().nullable(),fx_rate:fe.z.number().positive().nullable(),pricing_model:fe.z.string().nullable(),pricing_source:fe.z.string().nullable(),input_usd:fe.z.number().nonnegative().nullable().default(null),cached_input_usd:fe.z.number().nonnegative().nullable().default(null),output_usd:fe.z.number().nonnegative().nullable().default(null),reasoning_usd:fe.z.number().nonnegative().nullable().default(null)}).default({estimated_usd:null,estimated_brl:null,fx_rate:null,pricing_model:null,pricing_source:null,input_usd:null,cached_input_usd:null,output_usd:null,reasoning_usd:null}),telemetry:fe.z.object({cycle_count:fe.z.number().int().nonnegative().nullable(),source:fe.z.enum(["repository","local-codex","manual","unavailable"]),segment_key:fe.z.string().nullable()}).default({cycle_count:null,source:"unavailable",segment_key:null}),commands:fe.z.array(fe.z.string()),gates:fe.z.array(fe.z.string()),decisions:fe.z.array(fe.z.string()),evidence:fe.z.array(fe.z.string())}).strict();var bP=["prd_count","spec_count","task_count","test_count","evidence_count"],Bs=()=>({prd_count:0,spec_count:0,task_count:0,test_count:0,evidence_count:0});function EP(e,t){let n=["a.payload_type IS NULL","a.run_id IS NOT NULL","a.zaip_agent IS NOT NULL"],i=[];for(let f of["from","to"])t[f]&&(n.push(`a.occurred_day_sp ${f==="from"?">=":"<="} ?`),i.push(t[f].slice(0,10)));for(let f of["agent","phase","status"])t[f]&&(n.push(`a.${f==="agent"?"zaip_agent":f}=?`),i.push(t[f]));t.risk&&(n.push("EXISTS (SELECT 1 FROM zaip_aios_activities t WHERE t.payload_type='work_item' AND json_extract(t.payload_json,'$.entity_kind')='task' AND json_extract(t.payload_json,'$.id')=a.task_id AND json_extract(t.payload_json,'$.risk')=?)"),i.push(t.risk)),(t.priority||t.workType)&&n.push("0"),t.origin&&n.push(t.origin==="prd"?"a.prd_id IS NOT NULL":t.origin==="spec"?"a.prd_id IS NULL AND a.spec_id IS NOT NULL":t.origin==="task"?"a.prd_id IS NULL AND a.spec_id IS NULL AND a.task_id IS NOT NULL":"a.prd_id IS NULL AND a.spec_id IS NULL AND a.task_id IS NULL");let r=[];for(let f of["provider","model"])t[f]&&(r.push(`COALESCE(u.${f},'unavailable')=?`),i.push(t[f]));r.length&&n.push(`EXISTS (SELECT 1 FROM invocation_usage u WHERE u.agent_invocation_id=a.agent_invocation_id AND ${r.join(" AND ")})`),t.query&&(n.push("(a.zaip_agent LIKE ? OR a.zaip_agent_persona LIKE ? OR a.zaip_agent_job LIKE ?)"),i.push(...Array(3).fill(`%${t.query}%`)));let o=e.prepare(`SELECT a.run_id, MIN(a.zaip_agent) AS agent FROM zaip_aios_activities a WHERE ${n.join(" AND ")} GROUP BY a.run_id HAVING COUNT(DISTINCT a.zaip_agent)=1`).all(...i),a=new Map(o.map(f=>[f.run_id,f.agent])),s=new Map,l=new Set,c=t.from?.slice(0,10)??"0000-01-01",u=t.to?.slice(0,10)??"9999-12-31",d=e.prepare(`WITH files AS (
203
+ `,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let n=Us(t),i=ei(n);return i.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let n=Us(t),i=ei(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(i=>i.type==="newline"||i.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};Ay.Parser=Ru});var $y=w(Gi=>{"use strict";var Ty=yu(),GU=Fi(),Ki=Vi(),XU=ml(),YU=Re(),QU=Iu(),Ny=$u();function Iy(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new QU.LineCounter||null,prettyErrors:t}}function ex(e,t={}){let{lineCounter:n,prettyErrors:i}=Iy(t),r=new Ny.Parser(n?.addNewLine),o=new Ty.Composer(t),a=Array.from(o.compose(r.parse(e)));if(i&&n)for(let s of a)s.errors.forEach(Ki.prettifyError(e,n)),s.warnings.forEach(Ki.prettifyError(e,n));return a.length>0?a:Object.assign([],{empty:!0},o.streamInfo())}function Ry(e,t={}){let{lineCounter:n,prettyErrors:i}=Iy(t),r=new Ny.Parser(n?.addNewLine),o=new Ty.Composer(t),a=null;for(let s of o.compose(r.parse(e),!0,e.length))if(!a)a=s;else if(a.options.logLevel!=="silent"){a.errors.push(new Ki.YAMLParseError(s.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return i&&n&&(a.errors.forEach(Ki.prettifyError(e,n)),a.warnings.forEach(Ki.prettifyError(e,n))),a}function tx(e,t,n){let i;typeof t=="function"?i=t:n===void 0&&t&&typeof t=="object"&&(n=t);let r=Ry(e,n);if(!r)return null;if(r.warnings.forEach(o=>XU.warn(r.options.logLevel,o)),r.errors.length>0){if(r.options.logLevel!=="silent")throw r.errors[0];r.errors=[]}return r.toJS(Object.assign({reviver:i},n))}function nx(e,t,n){let i=null;if(typeof t=="function"||Array.isArray(t)?i=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){let r=Math.round(n);n=r<1?void 0:r>8?{indent:8}:{indent:r}}if(e===void 0){let{keepUndefined:r}=n??t??{};if(!r)return}return YU.isDocument(e)&&!i?e.toString(n):new GU.Document(e,i,n).toString(n)}Gi.parse=tx;Gi.parseAllDocuments=ex;Gi.parseDocument=Ry;Gi.stringify=nx});var Lu=w(xe=>{"use strict";var rx=yu(),ix=Fi(),ox=Xl(),Cu=Vi(),ax=wi(),hr=Re(),sx=pr(),cx=rt(),lx=mr(),ux=gr(),dx=Ls(),_x=Tu(),px=Iu(),fx=$u(),Ds=$y(),Cy=bi();xe.Composer=rx.Composer;xe.Document=ix.Document;xe.Schema=ox.Schema;xe.YAMLError=Cu.YAMLError;xe.YAMLParseError=Cu.YAMLParseError;xe.YAMLWarning=Cu.YAMLWarning;xe.Alias=ax.Alias;xe.isAlias=hr.isAlias;xe.isCollection=hr.isCollection;xe.isDocument=hr.isDocument;xe.isMap=hr.isMap;xe.isNode=hr.isNode;xe.isPair=hr.isPair;xe.isScalar=hr.isScalar;xe.isSeq=hr.isSeq;xe.Pair=sx.Pair;xe.Scalar=cx.Scalar;xe.YAMLMap=lx.YAMLMap;xe.YAMLSeq=ux.YAMLSeq;xe.CST=dx;xe.Lexer=_x.Lexer;xe.LineCounter=px.LineCounter;xe.Parser=fx.Parser;xe.parse=Ds.parse;xe.parseAllDocuments=Ds.parseAllDocuments;xe.parseDocument=Ds.parseDocument;xe.stringify=Ds.stringify;xe.visit=Cy.visit;xe.visitAsync=Cy.visitAsync});var ZD={};Gv(ZD,{SqliteReadModelFileSystem:()=>oc,allocateAttributedTokenActiveMs:()=>nc,rebuildSqliteReadModel:()=>jD,sourceFingerprint:()=>ro,sqliteReadModelPath:()=>ic,sqliteViewMetadata:()=>ld,validateSqliteReadModelSchema:()=>rc});module.exports=Xv(ZD);var ao=require("node:crypto"),Ev=require("node:fs"),ac=require("node:fs/promises"),so=require("node:path"),Lr=require("node:sqlite");var Se=ut(pt(),1),vP=Se.z.object({provider:Se.z.string().min(1),models:Se.z.array(Se.z.string().min(1)).min(1),reasoning_efforts:Se.z.array(Se.z.enum(["low","medium","high","xhigh"])).min(1),velocities:Se.z.array(Se.z.literal("standard")).length(1),streaming:Se.z.boolean(),cancellation:Se.z.boolean(),checkpointing:Se.z.boolean(),resume:Se.z.boolean(),tool_calls:Se.z.boolean(),structured_output:Se.z.boolean(),max_parallel_invocations:Se.z.number().int().positive()}).strict().superRefine((e,t)=>{e.resume&&!e.checkpointing&&t.addIssue({code:"custom",message:"Resume requires checkpointing"})}),vC=Se.z.object({role:Se.z.enum(["system","user","assistant","tool"]),content:Se.z.string(),name:Se.z.string().min(1).nullable().default(null)}).strict(),SP=Se.z.object({schema_version:Se.z.literal(1),invocation_id:Se.z.string().regex(/^INV-[A-Z0-9-]+$/),agent_id:Se.z.string().min(1),model:Se.z.string().min(1),reasoning_effort:Se.z.enum(["low","medium","high","xhigh"]),velocity:Se.z.literal("standard"),input:Se.z.object({messages:Se.z.array(vC).min(1),context_refs:Se.z.array(Se.z.string().min(1)),tools:Se.z.array(Se.z.string().min(1)),response_format:Se.z.enum(["text","json"])}).strict(),budget:Se.z.object({max_output_tokens:Se.z.number().int().positive(),timeout_ms:Se.z.number().int().positive().nullable(),max_tool_calls:Se.z.number().int().nonnegative()}).strict(),metadata:Se.z.record(Se.z.string(),Se.z.string()),resume_from:Se.z.string().min(1).nullable()}).strict().superRefine((e,t)=>{e.model==="gpt-6-astra"&&e.reasoning_effort!=="high"&&t.addIssue({code:"custom",path:["reasoning_effort"],message:"Astra requires high reasoning effort"})}),bP=Se.z.object({invocation_id:Se.z.string().regex(/^INV-[A-Z0-9-]+$/),reason:Se.z.enum(["user","budget","timeout","shutdown","superseded"]),requested_at:Se.z.string().datetime()}).strict();var ye=ut(pt(),1),er={schema_version:ye.z.literal(1),invocation_id:ye.z.string().regex(/^INV-[A-Z0-9-]+$/),sequence:ye.z.number().int().nonnegative(),occurred_at:ye.z.string().datetime()},SC=ye.z.object({checkpoint_id:ye.z.string().regex(/^CHK-[A-Z0-9-]+$/),opaque_token:ye.z.string().min(1),resumable_until:ye.z.string().datetime().nullable(),state_hash:ye.z.string().regex(/^[a-f0-9]{64}$/)}).strict(),zf=ye.z.object({input_tokens:ye.z.number().int().nonnegative(),cached_input_tokens:ye.z.number().int().nonnegative(),output_tokens:ye.z.number().int().nonnegative(),reasoning_tokens:ye.z.number().int().nonnegative(),source:ye.z.enum(["provider","estimated","unavailable"])}).strict(),bC=ye.z.object({code:ye.z.enum(["authentication","authorization","invalid_request","rate_limit","provider_unavailable","timeout","budget_exceeded","tool_error","protocol_error","unknown"]),message:ye.z.string().min(1),retryable:ye.z.boolean(),retry_after_ms:ye.z.number().int().nonnegative().nullable(),provider_code:ye.z.string().nullable()}).strict(),EC=ye.z.discriminatedUnion("type",[ye.z.object({...er,type:ye.z.literal("invocation.started")}).strict(),ye.z.object({...er,type:ye.z.literal("output.delta"),delta:ye.z.string().min(1)}).strict(),ye.z.object({...er,type:ye.z.literal("tool.requested"),call_id:ye.z.string().min(1),name:ye.z.string().min(1),arguments:ye.z.unknown()}).strict(),ye.z.object({...er,type:ye.z.literal("tool.completed"),call_id:ye.z.string().min(1),output:ye.z.unknown()}).strict(),ye.z.object({...er,type:ye.z.literal("checkpoint.created"),checkpoint:SC}).strict(),ye.z.object({...er,type:ye.z.literal("usage.updated"),usage:zf}).strict(),ye.z.object({...er,type:ye.z.literal("invocation.completed"),output:ye.z.string(),usage:zf}).strict(),ye.z.object({...er,type:ye.z.literal("invocation.failed"),error:bC}).strict(),ye.z.object({...er,type:ye.z.literal("invocation.cancelled"),reason:ye.z.string().min(1)}).strict()]);var pe=ut(pt(),1),bt=pe.z.array(pe.z.string().min(1)).superRefine((e,t)=>{new Set(e).size!==e.length&&t.addIssue({code:"custom",message:"Values must be unique"})}),Ff=pe.z.string().regex(/^[a-z0-9]+(?:_[a-z0-9]+)*$/),kC=pe.z.object({nome:Ff,cargo:Ff,foto_url:pe.z.url().refine(e=>{let t=new URL(e).protocol;return t==="http:"||t==="https:"},"Persona photo URL must use http or https").optional()}).strict();function OC(e){return`${e.nome}_${e.cargo}_zaip_agent`}var wC=bt.length(1).superRefine((e,t)=>{for(let[n,i]of e.entries())/^[a-z0-9_]+$/.test(i)||t.addIssue({code:"custom",path:[n],message:"Codex nicknames must be lowercase snake_case"})}),AC=pe.z.string().regex(/^zaip-agent-[a-z0-9-]+$/,'Codex agent name must use the "zaip-agent-NOME" format'),TC=pe.z.string().regex(/^[a-z0-9_]+$/,"Codex task name must use lowercase snake_case"),Zf=pe.z.enum(["orchestrator","analyst","task-executor","execution-finalizer","builder","reviewer","integrator","auditor"]),NC=pe.z.enum(["id","codex_name","codex_task_name"]),IC=pe.z.object({kind:NC,value:pe.z.string().min(1),deprecated_at:pe.z.iso.date(),remove_after:pe.z.iso.date(),replacement:pe.z.string().regex(/^agent-[a-z0-9-]+$/)}).strict().superRefine((e,t)=>{(e.kind==="id"?/^agent-[a-z0-9-]+$/.test(e.value):e.kind==="codex_name"?/^zaip-agent-[a-z0-9-]+$/.test(e.value):/^[a-z0-9_]+$/.test(e.value))||t.addIssue({code:"custom",path:["value"],message:`Alias value does not match identity kind ${e.kind}`}),e.remove_after<=e.deprecated_at&&t.addIssue({code:"custom",path:["remove_after"],message:"Alias removal date must be after its deprecation date"})}),ja=pe.z.object({allow:bt,deny:bt}).strict().superRefine((e,t)=>{let n=e.allow.filter(i=>e.deny.includes(i));n.length>0&&t.addIssue({code:"custom",message:`Permission both allowed and denied: ${n.join(", ")}`})}),RC=pe.z.object({id:pe.z.string().regex(/^agent-[a-z0-9-]+$/),version:pe.z.number().int().positive(),purpose:pe.z.string().min(1),use_when:bt.min(1),do_not_use:bt.min(1),codex_name:AC,codex_task_name:TC,persona:kC,nickname_candidates:wC,compatibility:pe.z.object({aliases:pe.z.array(IC)}).strict().optional(),role:Zf,priority:pe.z.number().int().nonnegative().default(100),inherits:pe.z.string().regex(/^agent-[a-z0-9-]+$/).nullable().default(null),capabilities:bt.min(1),execution_eligibility:pe.z.array(pe.z.enum(["interaction","delivery"])),tools:bt,skills:bt,write_scopes:bt,permissions:pe.z.object({filesystem:ja,network:ja,shell:ja,deployment:ja}).strict(),model:pe.z.object({required_capabilities:bt,preferred:bt,reasoning_effort:pe.z.enum(["low","medium","high","xhigh","ultra"]).optional()}).strict(),budget:pe.z.object({soft_cycles:pe.z.number().int().positive()}).strict(),contract:pe.z.object({inputs:bt.min(1),outputs:bt.min(1),evidence:bt.min(1)}).strict(),review:pe.z.object({can_approve:pe.z.boolean(),cannot_review_roles:pe.z.array(Zf)}).strict(),escalation:bt}).strict().superRefine((e,t)=>{let n=e.nickname_candidates[0];e.codex_task_name!==n&&t.addIssue({code:"custom",path:["codex_task_name"],message:`Codex task name must equal the primary nickname candidate: ${n}`});let i=OC(e.persona);e.nickname_candidates[0]!==i&&t.addIssue({code:"custom",path:["nickname_candidates"],message:`nickname_candidates must contain only the derived persona nickname: ${i}`})}),$C=pe.z.object({id:pe.z.string().regex(/^squad-[a-z0-9-]+$/),version:pe.z.number().int().positive(),purpose:pe.z.string().min(1),members:pe.z.array(pe.z.string().regex(/^agent-[a-z0-9-]+$/)).min(2),max_parallelism:pe.z.number().int().positive(),delegation:pe.z.array(pe.z.object({from:pe.z.string().regex(/^agent-[a-z0-9-]+$/),to:pe.z.string().regex(/^agent-[a-z0-9-]+$/),capability:pe.z.string().min(1)}).strict()),review_policy:pe.z.object({independent:pe.z.literal(!0),executor_roles:pe.z.array(pe.z.enum(["analyst","builder","task-executor"])).min(1),reviewer_roles:pe.z.array(pe.z.enum(["reviewer","auditor"])).min(1)}).strict(),escalation:pe.z.array(pe.z.string().regex(/^agent-[a-z0-9-]+$/)).min(1)}).strict(),$P=pe.z.object({schema_version:pe.z.literal(1),agents:pe.z.array(RC).min(1),squads:pe.z.array($C).min(1)}).strict();var q=ut(pt(),1);var Q=ut(pt(),1),CC=["gpt-5.6-luna","gpt-5.6-terra","gpt-5.6-sol","gpt-6-astra"],LC=["low","medium","high","xhigh"];var qf="task-risk-v1",MC=Q.z.enum(CC),ZP=Q.z.enum(LC),UC=Q.z.literal("standard"),qP=Q.z.object({model:Q.z.string().min(1).optional(),reasoning_effort:Q.z.string().min(1).optional(),velocity:Q.z.string().min(1).optional()}).strict().refine(e=>e.model!==void 0||e.reasoning_effort!==void 0||e.velocity!==void 0,"Model selection override must define at least one field"),xC=Q.z.enum(["diagnosis","discovery","planning","replanning","implementation","testing","integration","review","audit","finalization","rework"]),DC=Q.z.object({executor_attempt:Q.z.object({id:Q.z.string().min(1),failure_kind:Q.z.enum(["reasoning","hypothesis"]),evidence:Q.z.string().min(1)}).strict().optional(),diagnostic:Q.z.object({evidence:Q.z.string().min(1),difficult:Q.z.literal(!0)}).strict(),material_critical_impact:Q.z.object({evidence:Q.z.string().min(1)}).strict().optional()}).strict(),VP=Q.z.object({findings:Q.z.array(Q.z.string().min(1)).min(1),evidence:Q.z.array(Q.z.string().min(1)).min(1),cause_or_hypothesis:Q.z.string().min(1),recommended_model:Q.z.enum(["gpt-5.6-luna","gpt-5.6-terra","gpt-5.6-sol"]),route:Q.z.string().min(1),scope:Q.z.array(Q.z.string().min(1)).min(1),test_plan:Q.z.array(Q.z.string().min(1)).min(1),executor:Q.z.string().min(1)}).strict(),PC=Q.z.enum(["full_stack_boundary","shared_contracts_3_plus","critical_data_or_security","rollout_and_rollback","repeated_structural_repair","architectural_review_finding","prepared_plan_invalidated","material_architectural_tradeoffs"]),jC=Q.z.object({phase:xC,agent_role:Q.z.string().min(1),complexity:Q.z.enum(["simple","standard","complex"]),risk:Q.z.enum(["lite","standard","critical"]),transversality:Q.z.enum(["local","multi_module","cross_system"]),ambiguity:Q.z.enum(["low","medium","high"]),rework:Q.z.enum(["none","localized","structural"]),rework_cost:Q.z.enum(["low","medium","high"]),bounded:Q.z.boolean(),high_volume:Q.z.boolean().default(!1),xhigh_triggers:Q.z.array(PC).default([]),astra_mode:Q.z.literal("diagnostic").optional(),task_id:Q.z.string().min(1).optional(),astra_cycle:Q.z.enum(["1","2","3"]).optional(),astra_diagnostic:DC.optional()}).strict(),Yc=Q.z.object({production_impact:Q.z.boolean(),external_action:Q.z.boolean(),irreversible_change:Q.z.boolean(),security_or_critical_data:Q.z.boolean(),data_migration:Q.z.boolean(),broad_audit:Q.z.boolean(),rollback:Q.z.enum(["trivial","planned","complex"]),verification_scope:Q.z.enum(["scoped","package","cross_scope","full"])}).strict(),zC=jC.omit({agent_role:!0,risk:!0}).extend({risk_signals:Yc}).strict(),WP=zC.extend({risk:Q.z.enum(["lite","standard","critical"]),risk_signals:Yc,risk_policy_version:Q.z.literal(qf),risk_reasons:Q.z.array(Q.z.enum(["CRITICAL_EXPLICIT_IMPACT","CRITICAL_COMPLEX_ROLLBACK","CRITICAL_AMBIGUOUS_CROSS_SYSTEM","CRITICAL_STRUCTURAL_REWORK","LITE_BOUNDED_LOCAL","STANDARD_GOVERNED"])).min(1)}).strict().superRefine((e,t)=>{let n=FC(e);e.risk!==n.risk&&t.addIssue({code:"custom",path:["risk"],message:`Task risk must be ${n.risk} for the persisted signals`}),JSON.stringify(e.risk_reasons)!==JSON.stringify(n.reasons)&&t.addIssue({code:"custom",path:["risk_reasons"],message:`Task risk reasons must be ${n.reasons.join(",")}`})}),BP=Q.z.object({models:Q.z.array(Q.z.string().min(1)).min(1),reasoning_efforts:Q.z.array(Q.z.string().min(1)).min(1),velocities:Q.z.array(Q.z.string().min(1)).min(1)}).strict(),Vf=Q.z.object({mode:Q.z.literal("auto"),default_model:Q.z.literal("gpt-5.6-terra"),default_effort:Q.z.literal("medium"),default_velocity:UC,allowed_models:Q.z.array(MC).refine(e=>new Set(e).size===e.length&&["gpt-5.6-luna","gpt-5.6-terra","gpt-5.6-sol"].every(t=>e.includes(t)),"allowed_models must contain the unique legacy Luna, Terra and Sol trio; Astra is optional"),allowed_efforts:Q.z.tuple([Q.z.literal("low"),Q.z.literal("medium"),Q.z.literal("high"),Q.z.literal("xhigh")]),max_auto_effort:Q.z.literal("xhigh"),automatic_sources:Q.z.tuple([Q.z.literal("spec"),Q.z.literal("prd")]),notice:Q.z.enum(["always","mismatch"])}).strict();function FC(e){let t=Yc.parse(e.risk_signals);return t.production_impact||t.external_action||t.irreversible_change||t.security_or_critical_data||t.data_migration||t.broad_audit?qr("critical","CRITICAL_EXPLICIT_IMPACT"):t.rollback==="complex"?qr("critical","CRITICAL_COMPLEX_ROLLBACK"):e.ambiguity==="high"&&e.transversality==="cross_system"?qr("critical","CRITICAL_AMBIGUOUS_CROSS_SYSTEM"):e.rework==="structural"&&e.rework_cost==="high"?qr("critical","CRITICAL_STRUCTURAL_REWORK"):e.complexity==="simple"&&e.transversality==="local"&&e.ambiguity==="low"&&e.rework==="none"&&e.rework_cost==="low"&&e.bounded&&t.rollback==="trivial"&&t.verification_scope==="scoped"?qr("lite","LITE_BOUNDED_LOCAL"):qr("standard","STANDARD_GOVERNED")}function qr(e,t){return{risk:e,policy_version:qf,reasons:[t]}}var Uu=ut(Lu(),1),mx=10,Mu=class extends Error{name="YamlContractError"};function Xi(e){let t=(0,Uu.parseDocument)(e,{strict:!0,uniqueKeys:!0});if(t.errors.length>0)throw new Mu(t.errors.map(n=>n.message).join("; "));return t.toJS({maxAliasCount:mx})}var Ps=q.z.string().regex(/^[a-f0-9]{64}$/i,"Expected a SHA-256 checksum"),yx=q.z.string().min(1).superRefine((e,t)=>{try{new Intl.DateTimeFormat("en",{timeZone:e}).format()}catch{t.addIssue({code:"custom",message:"Expected a valid IANA timezone"})}}),hx=q.z.string().min(1).max(255).refine(e=>e.trim()===e&&!/[\r\n\0]/.test(e),"Expected a non-empty Git branch name");function vx(e){return e.length===0||e.includes("\\")||e.includes("\0")||e.startsWith("/")||e.startsWith("./")||e.endsWith("/")||/^[A-Za-z]:/.test(e)?!1:e.split("/").every(t=>t.length>0&&t!=="."&&t!=="..")}var Sx=q.z.object({sha256:Ps}).strict();function Ly(e){return q.z.record(q.z.string().min(1),e).superRefine((t,n)=>{for(let i of Object.keys(t))vx(i)||n.addIssue({code:"custom",path:[i],message:"Managed file path must be canonical and workspace-relative"})})}var bx=Ly(Sx),Ex=Ly(Ps),kx=q.z.object({schema_version:q.z.literal(1),zaip:q.z.object({enabled:q.z.boolean()}).strict().optional(),"zaip-aios":q.z.object({enabled:q.z.boolean()}).strict().optional(),project:q.z.object({id:q.z.string().min(1),name:q.z.string().min(1),timezone:yx}).strict(),stack:q.z.object({id:q.z.string().min(1),language:q.z.string().min(1).optional(),api:q.z.string().min(1).optional(),query_builder:q.z.string().min(1).optional(),extensions:q.z.array(q.z.string().min(1)).min(1).optional(),layout:q.z.object({frontend:q.z.string().min(1),backend:q.z.string().min(1),site:q.z.string().min(1),modules:q.z.string().min(1),packages:q.z.string().min(1),e2e:q.z.string().min(1)}).strict().optional(),source_limits:q.z.object({warning_lines:q.z.number().int().positive(),error_lines:q.z.number().int().positive()}).strict().optional(),invariants:q.z.array(q.z.string().min(1)).min(1).optional(),commands:q.z.object({test:q.z.string().min(1),typecheck:q.z.string().min(1)}).strict().optional(),overrides:q.z.record(q.z.string(),q.z.unknown())}).strict(),clients:q.z.object({codex:q.z.boolean(),claude:q.z.boolean()}).strict(),tracking:q.z.object({enabled:q.z.boolean(),currency:q.z.string().regex(/^[A-Z]{3}$/,"Expected an ISO 4217 currency code"),storage_mode:q.z.enum(["tracked_sanitized","local_only"])}).strict(),deploy:q.z.object({branch:hx.optional()}).strict().optional(),model_orchestration:q.z.discriminatedUnion("mode",[q.z.object({mode:q.z.literal("manual"),default_model:q.z.literal("manual"),default_effort:q.z.literal("manual"),default_velocity:q.z.literal("manual"),notice:q.z.enum(["always","mismatch"])}).strict(),q.z.object({mode:q.z.literal("off"),default_model:q.z.string().min(1),default_effort:q.z.string().min(1),default_velocity:q.z.string().min(1),notice:q.z.enum(["always","mismatch"])}).strict(),Vf]).optional(),execution:q.z.discriminatedUnion("runtime",[q.z.object({runtime:q.z.literal("manual")}).strict(),q.z.object({runtime:q.z.literal("autonomous"),autonomous:q.z.object({provider:q.z.enum(["codex","claude"]),model:q.z.string().min(1),max_parallelism:q.z.number().int().min(1).max(8),lease_ms:q.z.number().int().min(5e3).max(36e5),max_phase_attempts:q.z.number().int().positive().nullable().optional(),max_total_invocations:q.z.number().int().positive().nullable().optional()}).strict()}).strict()]).optional(),assurance:q.z.object({version:q.z.literal(1),standard_depth:q.z.enum(["auto","base","elevated"]),require_final_commit:q.z.boolean()}).strict().optional(),context:q.z.object({canonical_roots:q.z.array(q.z.string().min(1)).min(1),projection_roots:q.z.array(q.z.string().min(1))}).strict().optional()}).strict().superRefine((e,t)=>{let n=e.zaip?.enabled,i=e["zaip-aios"]?.enabled;n!==void 0&&i!==void 0&&n!==i&&t.addIssue({code:"custom",path:["zaip","enabled"],message:"Conflicting ZAIP activation keys: zaip.enabled and legacy zaip-aios.enabled must agree"})}),My={framework:q.z.object({version:q.z.string().min(1),distribution_sha256:Ps.nullable()}).strict(),layout:q.z.object({version:q.z.union([q.z.literal(2),q.z.literal(3)])}).strict(),resolved_profile:q.z.object({id:q.z.string().min(1).nullable(),sha256:Ps.nullable()}).strict()},Ox=q.z.object({lock_version:q.z.literal(1),...My,managed_files:bx}).strict(),wx=q.z.object({lock_version:q.z.literal(2),...My,managed_files:Ex}).strict(),mz=q.z.toJSONSchema(kx),gz=q.z.toJSONSchema(q.z.union([Ox,wx]));var Oe=require("node:fs/promises"),Fe=require("node:path");var xy=require("node:crypto");var Uy="23456789ABCDEFGHJKLMNPQRSTUVWXYZ";function js(e=4){if(!Number.isSafeInteger(e)||e<2||e>16)throw new RangeError("collision code length must be between 2 and 16");let t=(0,xy.randomBytes)(e);return Array.from(t,n=>Uy[n%Uy.length]).join("")}var Gn=class extends Error{name="WorkspacePathError"},Qi=class{root;appendQueues=new Map;constructor(t){this.root=(0,Fe.resolve)(t)}resolve(t){if(Ax(t)||Tx(t))throw new Gn("Expected a path relative to the workspace root");let n=(0,Fe.resolve)(this.root,t),i=(0,Fe.relative)(this.root,n);if(i===".."||i.startsWith(`..${Fe.sep}`)||(0,Fe.isAbsolute)(i))throw new Gn(`Path escapes workspace root: ${t}`);return n}async exists(t){try{let n=this.resolve(t);return await this.assertPhysicalContainment(n),await(0,Oe.stat)(n),!0}catch(n){if(Yi(n)&&n.code==="ENOENT")return!1;throw n}}async readText(t){let n=this.resolve(t);return await this.assertPhysicalContainment(n),(0,Oe.readFile)(n,"utf8")}async readBytes(t){let n=this.resolve(t);return await this.assertPhysicalContainment(n),(0,Oe.readFile)(n)}async readTextFrom(t,n){if(!Number.isSafeInteger(n)||n<0)throw new RangeError("Expected a non-negative byte offset");let i=this.resolve(t);await this.assertPhysicalContainment(i);let r=await(0,Oe.open)(i,"r");try{let o=await r.stat(),a=Math.min(n,o.size),s=Buffer.allocUnsafe(o.size-a);return s.byteLength>0&&await r.read(s,0,s.byteLength,a),{content:s.toString("utf8"),nextOffset:o.size}}finally{await r.close()}}async listFiles(t,n=""){let i=this.resolve(t);return await this.assertPhysicalContainment(i),await this.exists(t)?(await(0,Oe.readdir)(i,{recursive:!0,withFileTypes:!0})).filter(o=>o.isFile()).map(o=>(0,Fe.relative)(this.root,(0,Fe.resolve)(o.parentPath,o.name)).replace(/\\/g,"/")).filter(o=>o.endsWith(n)).sort():[]}async listDirectories(t){let n=this.resolve(t);return await this.assertPhysicalContainment(n),await this.exists(t)?(await(0,Oe.readdir)(n,{withFileTypes:!0})).filter(r=>r.isDirectory()).map(r=>(0,Fe.relative)(this.root,(0,Fe.resolve)(n,r.name)).replace(/\\/g,"/")).sort():[]}async writeTextAtomic(t,n){let i=this.resolve(t),r=`${i}.${js(6)}.tmp`;await this.assertPhysicalContainment(i),await(0,Oe.mkdir)((0,Fe.dirname)(i),{recursive:!0}),await this.assertPhysicalContainment(i);try{await(0,Oe.writeFile)(r,n,{encoding:"utf8",flag:"wx"}),await Nx(r,i)}finally{await(0,Oe.rm)(r,{force:!0})}}async appendText(t,n){let i=this.resolve(t),o=(this.appendQueues.get(i)??Promise.resolve()).catch(()=>{}).then(async()=>{await this.assertPhysicalContainment(i),await(0,Oe.mkdir)((0,Fe.dirname)(i),{recursive:!0}),await this.assertPhysicalContainment(i),await(0,Oe.appendFile)(i,n,{encoding:"utf8",flush:!0})});this.appendQueues.set(i,o);try{await o}finally{this.appendQueues.get(i)===o&&this.appendQueues.delete(i)}}async writeTextExclusive(t,n){let i=this.resolve(t);await this.assertPhysicalContainment(i),await(0,Oe.mkdir)((0,Fe.dirname)(i),{recursive:!0}),await this.assertPhysicalContainment(i),await(0,Oe.writeFile)(i,n,{encoding:"utf8",flag:"wx",flush:!0})}async writeTextAtomicExclusive(t,n){let i=this.resolve(t),r=`${i}.${js(6)}.tmp`;await this.assertPhysicalContainment(i),await(0,Oe.mkdir)((0,Fe.dirname)(i),{recursive:!0}),await this.assertPhysicalContainment(i);try{await(0,Oe.writeFile)(r,n,{encoding:"utf8",flag:"wx",flush:!0}),await(0,Oe.link)(r,i)}finally{await(0,Oe.rm)(r,{force:!0})}}async removeFile(t){let n=this.resolve(t);await this.assertPhysicalContainment(n),await(0,Oe.rm)(n,{force:!0})}async removeFileIfContentMatches(t,n){let i=`${t}.${js(16)}.compare-delete`;try{await this.moveFileAtomic(t,i)}catch(s){if(Yi(s)&&s.code==="ENOENT")return!1;throw s}if(await this.readText(i)===n)return await this.removeFile(i),!0;let o=this.resolve(i),a=this.resolve(t);try{await(0,Oe.link)(o,a),await this.removeFile(i)}catch(s){throw Yi(s)&&s.code==="EEXIST"?new Gn(`Conditional delete observed a replacement; captured file retained at ${i}`):s}return!1}async collectCompareDeleteTombstones(t){let n=[];for(let i of await this.listFiles(t)){let r=/^(.*)\.[A-Z0-9]{16}\.compare-delete$/.exec(i);if(r===null)continue;let o=r[1];o!==void 0&&await this.exists(o)&&(await this.removeFile(i),n.push(i))}return n}async moveFileAtomic(t,n){let i=this.resolve(t),r=this.resolve(n);await this.assertPhysicalContainment(i),await this.assertPhysicalContainment(r),await(0,Oe.mkdir)((0,Fe.dirname)(r),{recursive:!0}),await this.assertPhysicalContainment(r),await(0,Oe.rename)(i,r)}async assertPhysicalContainment(t){let n=await(0,Oe.realpath)(this.root),i=t,r=null;for(;;)try{let o=await(0,Oe.realpath)(i),a=(0,Fe.relative)(n,o);if(a===".."||a.startsWith(`..${Fe.sep}`)||(0,Fe.isAbsolute)(a))throw await(0,Oe.lstat)(i),new Gn(`Physical path escapes workspace root: ${t}`);return}catch(o){if(!Yi(o)||o.code!=="ENOENT")throw o;if(r=o,i===this.root)throw new Gn(`Cannot resolve workspace root for: ${t}`,{cause:r});let a=(0,Fe.dirname)(i);if(a===i)throw new Gn(`Cannot resolve workspace ancestor for: ${t}`,{cause:r});i=a}}};function Ax(e){return Fe.posix.isAbsolute(e)||Fe.win32.isAbsolute(e)||/^[A-Za-z]:/.test(e)}function Tx(e){return e.split(/[\\/]+/).some(t=>t==="..")}function Yi(e){return e instanceof Error&&"code"in e}async function Nx(e,t){if(process.platform!=="win32"){await(0,Oe.rename)(e,t);return}for(let n=0;n<5;n+=1)try{await(0,Oe.rm)(t,{force:!0}),await(0,Oe.rename)(e,t);return}catch(i){if(!Ix(i)||n===4)throw i;await Rx(25*(n+1))}}function Ix(e){return Yi(e)&&["EPERM","EBUSY","EACCES"].includes(e.code??"")}async function Rx(e){await new Promise(t=>setTimeout(t,e))}var Dy=require("node:child_process");var Py=require("node:util"),Ez=(0,Py.promisify)(Dy.execFile);var st=ut(pt(),1);var jy=ut(Lu(),1);var Az=st.z.object({id:st.z.string().regex(/^RULE-[A-Z0-9-]+$/),load:st.z.enum(["always","auto","file_match","manual"]),globs:st.z.array(st.z.string().min(1)).default([]),priority:st.z.enum(["critical","high","medium","low"]),max_context_tokens:st.z.number().int().positive(),requires:st.z.array(st.z.string().regex(/^RULE-[A-Z0-9-]+$/))}).strict().superRefine((e,t)=>{e.load==="file_match"&&e.globs.length===0&&t.addIssue({code:"custom",path:["globs"],message:"file_match Rules require at least one glob"})}),Tz=st.z.object({schema_version:st.z.literal(2),id:st.z.string().regex(/^REQUIREMENTS-[A-Z0-9-]+$/),area:st.z.string().regex(/^[a-z][a-z0-9-]*$/),title:st.z.string().min(1),status:st.z.enum(["proposed","active","deprecated"]),version:st.z.number().int().positive(),source_change:st.z.string().min(1).nullable(),source_release:st.z.string().regex(/^\d+\.\d+\.\d+$/).optional()}).strict().superRefine((e,t)=>{e.source_change===null&&e.source_release===void 0&&t.addIssue({code:"custom",path:["source_release"],message:"released Requirements require source_release when source_change is null"}),e.source_change!==null&&e.source_release!==void 0&&t.addIssue({code:"custom",path:["source_release"],message:"source_release is only valid when source_change is null"})});var ge=ut(pt(),1);var $x=["codex_host_native","provider_subprocess"],Cx=["frontier","balanced","fast_scan","review"],Lx=["subagents","worktrees","sandbox","approvals","skills","mcp"];var Rz=ge.z.enum($x),$z=ge.z.enum(Cx),Fy=ge.z.enum(Lx),Mx=ge.z.array(Fy).min(1).refine(e=>new Set(e).size===e.length,{message:"native_surfaces must be unique"}),Ux=ge.z.object({locator:ge.z.string().min(1),candidate_sha256:ge.z.string().regex(/^[a-f0-9]{64}$/)}).strict(),xx=ge.z.object({capability_id:ge.z.string().regex(/^CAP-[A-Z0-9-]+$/),current_state:ge.z.literal("implemented"),previous_states:ge.z.tuple([ge.z.literal("declared")]),evidence:ge.z.array(Ux).length(0)}).strict(),Dx=ge.z.object({tier:ge.z.literal(1),enabled:ge.z.literal(!0),optional:ge.z.literal(!1),invokes_provider_subprocess:ge.z.literal(!1),authority:ge.z.literal("host"),native_surfaces:Mx,capability_bindings:ge.z.record(Fy,xx)}).strict().superRefine((e,t)=>{let n=Object.keys(e.capability_bindings).sort(),i=[...e.native_surfaces].sort();JSON.stringify(n)!==JSON.stringify(i)&&t.addIssue({code:"custom",path:["capability_bindings"],message:"every native surface requires exactly one conformance/maturity binding"})}),Px=ge.z.object({tier:ge.z.union([ge.z.literal(2),ge.z.literal(3)]),enabled:ge.z.boolean(),optional:ge.z.literal(!0),invokes_provider_subprocess:ge.z.literal(!0),authority:ge.z.literal("framework"),native_surfaces:ge.z.array(ge.z.never()).length(0),opt_in:ge.z.object({required:ge.z.literal(!0),allowed_sources:ge.z.array(ge.z.enum(["project_config","human_decision"])).min(1).refine(e=>new Set(e).size===e.length,{message:"opt-in sources must be unique"})}).strict()}).strict(),zs=ge.z.object({selection:ge.z.enum(["host_available","inherit_host"]),reasoning:ge.z.enum(["low","medium","high"]),intent:ge.z.string().min(1)}).strict(),Cz=ge.z.object({schema_version:ge.z.literal(1),host_id:ge.z.literal("codex"),candidate_sha256:ge.z.null(),default_mode:ge.z.literal("codex_host_native"),modes:ge.z.object({codex_host_native:Dx,provider_subprocess:Px}).strict(),model_classes:ge.z.object({frontier:zs,balanced:zs,fast_scan:zs,review:zs}).strict()}).strict(),Lz=ge.z.object({enabled:ge.z.literal(!0),source:ge.z.enum(["project_config","human_decision"]),provenance:ge.z.object({reference:ge.z.string().min(1),recorded_at:ge.z.string().datetime({offset:!0})}).strict()}).strict();var We=ut(pt(),1);var jx=We.z.object({schema_version:We.z.literal(1),project:We.z.object({id:We.z.string().min(1),name:We.z.string().min(1),timezone:We.z.string().min(1).default("America/Sao_Paulo")}),framework:We.z.object({version:We.z.string().min(1)}),layout:We.z.object({version:We.z.literal(1),managed_namespace:We.z.string().min(1).default(".agents/managed"),project_namespace:We.z.string().min(1).default(".agents/project")}).default({version:1,managed_namespace:".agents/managed",project_namespace:".agents/project"}),profile:We.z.object({id:We.z.string().min(1).default("zaip-aios-stack")}),paths:We.z.object({specs:We.z.string().min(1).default(".agents/specs"),changes:We.z.string().min(1).default(".agents/changes"),tasks:We.z.string().min(1).default(".agents/tasks"),decisions:We.z.string().min(1).default(".agents/decisions"),runs:We.z.string().min(1).default(".agents/runs")}).default({specs:".agents/specs",changes:".agents/changes",tasks:".agents/tasks",decisions:".agents/decisions",runs:".agents/runs"}),agents:We.z.array(We.z.enum(["codex","claude"])).default(["codex","claude"])}).strict(),jz=We.z.toJSONSchema(jx);var Zy="(?:access[_-]?token|refresh[_-]?token|id[_-]?token|token|api[_-]?key|password|passwd|secret|client[_-]?secret|authorization|signature|sig)",Gz=new RegExp(`^${Zy}$`,"i");var Xz=new RegExp(String.raw`\b${Zy}["']?\s*[:=]\s*["']?((?:(?:bearer|basic)\s+)?(?:\[redacted(?: private key)?\]|<redacted>|\*{3,})|[^\s"',;]+)`,"gi");var Du=class{#e;constructor(t){let n=new Map;for(let i of t){let r=n.get(i.from)??new Set;r.add(i.to),n.set(i.from,r)}this.#e=n}canTransition(t,n){return this.#e.get(t)?.has(n)??!1}assertTransition(t,n){if(!this.canTransition(t,n))throw new Error(`Invalid state transition: ${t} -> ${n}`)}nextStates(t){return[...this.#e.get(t)??[]]}};var e1=new Du([{from:"draft",to:"planned"},{from:"draft",to:"cancelled"},{from:"planned",to:"executing"},{from:"planned",to:"cancelled"},{from:"executing",to:"verifying"},{from:"executing",to:"blocked"},{from:"executing",to:"cancelled"},{from:"verifying",to:"completed"},{from:"verifying",to:"failed"},{from:"verifying",to:"blocked"},{from:"verifying",to:"cancelled"},{from:"blocked",to:"executing"},{from:"blocked",to:"cancelled"}]);var Y=ut(pt(),1);var Fs=e=>Math.round(e*1e6)/1e6;function Zs(e,t,n){let i=`${e} ${t} ${n}`.toLowerCase();return i.includes("claude")||i.includes("anthropic")?"anthropic":i.includes("gpt")||i.includes("openai")||i.includes("codex")?"openai":null}function qy(e){let t=e.inputIncludesCacheWrites?e.cacheWriteInputTokens??0:0,n=Math.max(e.inputTokens-e.cachedInputTokens-t,0),i=Fs(n/1e6*e.inputRate*e.inputMultiplier),r=e.cachedInputTokens===0?0:e.cachedInputRate===null?null:Fs(e.cachedInputTokens/1e6*e.cachedInputRate*e.inputMultiplier),o=e.cacheWriteInputTokens===null||e.cacheWriteInputTokens===void 0?null:e.cacheWriteInputTokens===0?0:e.cacheWriteInputRate===null||e.cacheWriteInputRate===void 0?null:Fs(e.cacheWriteInputTokens/1e6*e.cacheWriteInputRate*e.inputMultiplier),a=Fs(e.outputTokens/1e6*e.outputRate*e.outputMultiplier);return{inputUsd:i,cachedInputUsd:r,cacheWriteInputUsd:o,outputUsd:a,reasoningUsd:0}}var De=ut(pt(),1),ti=De.z.number().finite().nonnegative().nullable(),Wx=De.z.object({task_id:De.z.string().min(1),completed:De.z.boolean(),completed_at:De.z.string().min(1).nullable(),attempt:De.z.number().int().nonnegative().nullable(),attempt_id:De.z.string().min(1).nullable().optional(),equivalence_key:De.z.string().min(1).nullable().optional(),model:De.z.string().min(1).nullable(),reasoning_effort:De.z.enum(["low","medium","high","xhigh"]).nullable(),baseline_task_id:De.z.string().min(1).nullable(),baseline_attempt_id:De.z.string().min(1).nullable().optional(),baseline_equivalence_id:De.z.string().min(1).nullable(),observed_cost_usd:ti,baseline_observed_cost_usd:ti,quality_score:ti,quality_floor:ti,rework_count:De.z.number().int().nonnegative().nullable(),billed_amount:ti.optional(),billed_currency:De.z.string().min(1).nullable().optional(),billed_provenance:De.z.enum(["observed","inferred","unavailable"]).nullable().optional(),billed_source_id:De.z.string().min(1).nullable().optional(),billed_at:De.z.string().min(1).nullable().optional(),baseline_billed_amount:ti.optional(),baseline_billed_currency:De.z.string().min(1).nullable().optional(),baseline_billed_provenance:De.z.enum(["observed","inferred","unavailable"]).nullable().optional(),baseline_billed_source_id:De.z.string().min(1).nullable().optional(),baseline_billed_at:De.z.string().min(1).nullable().optional()}).strict(),V1=De.z.object({timezone:De.z.string().min(1),interval:De.z.object({start:De.z.string().min(1),end:De.z.string().min(1)}).strict(),equivalence_key:De.z.string().min(1).nullable().optional(),tasks:De.z.array(Wx)}).strict();var Vy=require("node:crypto");function Pu(e){let t=Bx(e.manifest),n=t.source_streams.find(i=>i.run_id===e.run_id);if(n===void 0)return null;if(n.path!==e.path||Wy(e.content)!==n.content_sha256)throw new Error(`Historical developer attribution source mismatch: ${e.run_id}`);return t.assignment}function Wy(e){return(0,Vy.createHash)("sha256").update(e).digest("hex")}function Bx(e){if(typeof e!="object"||e===null)throw new Error("Invalid historical developer attribution manifest");let t=e,{manifest_hash:n,...i}=t;if(t.schema_version!==1||t.kind!=="historical_developer_attribution"||t.assignment?.attribution_source!=="human_assigned"||!Array.isArray(t.source_streams)||Wy(JSON.stringify(i))!==n)throw new Error("Invalid historical developer attribution manifest");return t}var vr=Y.z.string().datetime({offset:!0}).or(Y.z.string().datetime()),Kx=Y.z.object({id:Y.z.string().min(1),provider:Y.z.enum(["openai","anthropic"]),aliases:Y.z.array(Y.z.string().min(1)).default([]),input_per_million_usd:Y.z.number().nonnegative(),cached_input_per_million_usd:Y.z.number().nonnegative().nullable().default(null),cache_write_input_per_million_usd:Y.z.number().nonnegative().nullable().optional(),output_per_million_usd:Y.z.number().nonnegative(),reasoning_per_million_usd:Y.z.number().nonnegative().nullable().default(null),priority_input_per_million_usd:Y.z.number().nonnegative().nullable().optional(),priority_cached_input_per_million_usd:Y.z.number().nonnegative().nullable().optional(),priority_cache_write_input_per_million_usd:Y.z.number().nonnegative().nullable().optional(),priority_output_per_million_usd:Y.z.number().nonnegative().nullable().optional(),priority_reasoning_per_million_usd:Y.z.number().nonnegative().nullable().optional(),reasoning_billed_separately:Y.z.boolean().default(!1),long_context_threshold_tokens:Y.z.number().int().positive().nullable().default(null),long_context_input_multiplier:Y.z.number().positive().default(1),long_context_output_multiplier:Y.z.number().positive().default(1),source_label:Y.z.string().min(1),source_url:Y.z.string().url(),notes:Y.z.array(Y.z.string()).default([])}).strict(),Hy=Y.z.object({schema_version:Y.z.literal(1),updated_at:vr,source:Y.z.string().min(1),disclaimer:Y.z.string().min(1),models:Y.z.array(Kx)}).strict(),Jy=Y.z.object({schema_version:Y.z.literal(1),base:Y.z.literal("USD"),quote:Y.z.literal("BRL"),rate:Y.z.number().positive(),as_of:vr,source_label:Y.z.string().min(1),source_url:Y.z.string().url()}).strict(),Ky=Y.z.object({input:Y.z.number().int().nonnegative().nullable(),cached_input:Y.z.number().int().nonnegative().nullable().default(null),cache_write_input:Y.z.number().int().nonnegative().nullable().optional(),output:Y.z.number().int().nonnegative().nullable(),reasoning:Y.z.number().int().nonnegative().nullable(),total:Y.z.number().int().nonnegative().nullable().default(null),source:Y.z.preprocess(e=>e==="client"?"provider_reported":e,Y.z.enum(["provider_reported","estimated","unavailable"]))}).strict(),Gy=Y.z.object({estimated_usd:Y.z.number().nonnegative().nullable(),estimated_brl:Y.z.number().nonnegative().nullable(),fx_rate:Y.z.number().positive().nullable(),pricing_model:Y.z.string().nullable(),pricing_source:Y.z.string().nullable(),pricing_source_url:Y.z.string().url().nullable().optional(),pricing_catalog_updated_at:vr.nullable().optional(),input_usd:Y.z.number().nonnegative().nullable().default(null),cached_input_usd:Y.z.number().nonnegative().nullable().default(null),cache_write_input_usd:Y.z.number().nonnegative().nullable().optional(),output_usd:Y.z.number().nonnegative().nullable().default(null),reasoning_usd:Y.z.number().nonnegative().nullable().default(null)}).strict(),Gx=Y.z.object({cycle_count:Y.z.number().int().nonnegative().nullable(),source:Y.z.enum(["repository","local-codex","manual","unavailable"]),segment_key:Y.z.string().nullable()}).strict(),qx=Y.z.object({schema_version:Y.z.literal(1),recorded_at:vr,run_id:Y.z.string().startsWith("RUN-"),task_id:Y.z.string().startsWith("TASK-"),spec_id:Y.z.string().nullable(),change_id:Y.z.string().nullable(),task_title:Y.z.string().nullable(),task_status:Y.z.string().nullable(),client:Y.z.string().min(1),agent:Y.z.string().min(1),provider:Y.z.enum(["openai","anthropic"]).nullable(),model:Y.z.string().min(1),status:Y.z.enum(["running","completed","failed"]),started_at:vr,finished_at:vr.nullable(),duration_ms:Y.z.number().int().nonnegative().nullable(),token_usage:Ky,estimated_cost:Gy,telemetry:Gx,source_segment_key:Y.z.string().nullable()}).strict(),Vx=Y.z.object({schema_version:Y.z.literal(1),recorded_at:vr,run_id:Y.z.string().startsWith("RUN-"),task_id:Y.z.string().startsWith("TASK-"),cycle_index:Y.z.number().int().nonnegative(),provider:Y.z.enum(["openai","anthropic"]).nullable(),model:Y.z.string().min(1),timestamp:vr,source:Y.z.enum(["local-codex","manual"]),source_segment_key:Y.z.string().nullable(),token_usage:Ky,estimated_cost:Gy}).strict();function By(e){return Math.round(e*1e6)/1e6}function eo(e,t){return{estimated_usd:null,estimated_brl:null,fx_rate:e.fxRate?.rate??null,pricing_model:t?.id??null,pricing_source:t?.source_label??null,pricing_source_url:t?.source_url??null,pricing_catalog_updated_at:t===null?null:e.catalog.updated_at,input_usd:null,cached_input_usd:null,cache_write_input_usd:null,output_usd:null,reasoning_usd:null}}function qs(e){let t=e.provider??Zs(e.model,"",""),n=e.model.toLowerCase(),i=O=>{let U=O.toLowerCase();if(n===U)return!0;let M=n.slice(U.length);return M.startsWith("@")||M.startsWith(":")||M.startsWith("/")||/^-\d{4}-\d{2}-\d{2}(?:$|[.:@/])/.test(M)},r=e.catalog.models.find(O=>i(O.id)||O.aliases.some(U=>i(U)));if(!r||t!==null&&r.provider!==t)return eo(e,null);let o=e.usage.cached_input,a=e.usage.input,s=e.usage.output;if(a===null||o===null||s===null)return eo(e,r);let l=e.usage.reasoning??0,c=r.long_context_threshold_tokens!==null&&(e.usage.input??0)>r.long_context_threshold_tokens,u=c?r.long_context_input_multiplier:1,d=c?r.long_context_output_multiplier:1,p=e.serviceTier==="priority"||e.serviceTier==="fast";if(p&&c)return eo(e,r);let f=p?r.priority_input_per_million_usd??null:r.input_per_million_usd,S=p?r.priority_output_per_million_usd??null:r.output_per_million_usd;if(f===null||S===null)return eo(e,r);let h=p?r.priority_cache_write_input_per_million_usd??null:r.cache_write_input_per_million_usd??null,v=e.usage.cache_write_input??null,{inputUsd:E,cachedInputUsd:x,cacheWriteInputUsd:F,outputUsd:Z,reasoningUsd:W}=qy({inputTokens:a,cachedInputTokens:o,cacheWriteInputTokens:v,inputIncludesCacheWrites:r.provider==="openai",outputTokens:s,reasoningTokens:l,inputRate:f,cachedInputRate:p?r.priority_cached_input_per_million_usd??null:r.cached_input_per_million_usd,cacheWriteInputRate:h,outputRate:S,reasoningRate:p?r.priority_reasoning_per_million_usd??null:r.reasoning_per_million_usd,inputMultiplier:u,outputMultiplier:d});if(x===null||r.provider==="openai"&&v!==null&&v>a||h!==null&&v===null||h===null&&(v??0)>0)return eo(e,r);let ue=By(E+x+(F??0)+Z+W),be=e.fxRate===null||e.fxRate===void 0?null:By(ue*e.fxRate.rate);return{estimated_usd:ue,estimated_brl:be,fx_rate:e.fxRate?.rate??null,pricing_model:r.id,pricing_source:r.source_label,pricing_source_url:r.source_url,pricing_catalog_updated_at:e.catalog.updated_at,input_usd:E,cached_input_usd:x,cache_write_input_usd:F,output_usd:Z,reasoning_usd:W}}var $e=ut(pt(),1);function zt(e,t){let n=[...new Set(t)].sort((a,s)=>a.localeCompare(s)),i=new Map;if(n.length===0)return i;if(e===null||!Number.isFinite(e)){for(let a of n)i.set(a,null);return i}if(Number.isInteger(e)){let a=Math.floor(e/n.length),s=e-a*n.length;return n.forEach((l,c)=>{i.set(l,a+(c===n.length-1?s:0))}),i}let r=e/n.length,o=0;return n.forEach((a,s)=>{let l=s===n.length-1?e-o:r;i.set(a,l),o+=l}),i}var Yy=".agents/records/lifecycle/views",jF=`${Yy}/manifest.json`;var Nr=".agents/records/lifecycle",dZ=`${Nr}/manifest.json`,_Z=`${Nr}/entity-snapshot.json`,pZ=`${Nr}/entity-state.json`,fZ=`${Nr}/indexes`;var mZ=`${Nr}/summary.json`,gZ=`${Nr}/overview.json`,yZ=`${Nr}/active-work.json`;var eh=$e.z.enum(["prd","spec","change","task","execution","run","decision","validation","evidence"]),hZ=eh.options,Yx=$e.z.enum(["parent","child","references","evidence","requirement"]),Qx=$e.z.enum(["explicit","derived"]),eD=$e.z.object({target_id:$e.z.string().min(1),type:Yx,direction:$e.z.enum(["outbound","inbound"]),provenance:Qx,source_locator:$e.z.string().min(1).nullable().default(null)}).strict(),tD=$e.z.object({input_tokens:$e.z.number().int().nonnegative().nullable().default(null),output_tokens:$e.z.number().int().nonnegative().nullable().default(null),cached_input_tokens:$e.z.number().int().nonnegative().nullable().default(null),total_tokens:$e.z.number().int().nonnegative().nullable().default(null),cost:$e.z.number().nonnegative().nullable().default(null),currency:$e.z.string().min(1).nullable().default(null)}).strict(),nD=$e.z.object({kind:eh,id:$e.z.string().min(1),title:$e.z.string().min(1).nullable().default(null),status:$e.z.string().min(1).nullable().default(null),risk:$e.z.string().min(1).nullable().default(null),priority:$e.z.string().min(1).nullable().default(null),updated_at:$e.z.string().datetime({offset:!0}),relations:$e.z.array($e.z.string().min(1)).default([]),relation_edges:$e.z.array(eD).optional(),usage:tD.nullable().default(null),data:$e.z.record($e.z.string(),$e.z.unknown()).nullable().default(null)}).strict(),vZ=$e.z.object({schema_version:$e.z.literal(1),event_id:$e.z.string().min(1),occurred_at:$e.z.string().datetime({offset:!0}),operation:$e.z.enum(["upsert","remove"]),entity:nD}).strict();var fe=ut(pt(),1);var $t=ut(pt(),1);var k=ut(pt(),1);var Rt=ut(pt(),1),rD=Rt.z.string().datetime({offset:!0}).or(Rt.z.string().datetime()),th=Rt.z.object({schema_version:Rt.z.literal(2),event_id:Rt.z.string().min(1).max(200),run_id:Rt.z.string().startsWith("RUN-"),sequence:Rt.z.number().int().positive(),occurred_at:rD,type:Rt.z.literal("run.attribution.recovered"),phase:Rt.z.literal("execution"),execution_id:Rt.z.string().startsWith("EXEC-"),task_id:Rt.z.string().startsWith("TASK-"),change_id:Rt.z.string().startsWith("CHG-")}).strict();function nh(e,t){return e.entrypoint==="task"&&e.execution_id!==null&&e.task_id!==null&&e.change_id===null&&t.execution_id===e.execution_id&&t.task_id===e.task_id}function ju(e,t){return e.coverage==="partial"&&t.coverage==="complete"&&e.call_id===t.call_id&&e.agent_invocation_id===t.agent_invocation_id&&e.source_call_key===t.source_call_key&&JSON.stringify(e.tokens)===JSON.stringify(t.tokens)}function zu(e,t,n){return e.type==="usage.recorded"&&e.retrospective_correction===!0&&e.activity_kind==="retrospective_observed_timing"&&e.supersedes_event_id===null&&e.phase===t.phase&&e.source_segment_key!==null&&e.source_started_at!==void 0&&e.source_finished_at!==void 0&&Date.parse(e.source_finished_at)>=Date.parse(e.source_started_at)&&e.source_occurred_at===e.source_finished_at&&e.tokens.source==="unavailable"&&[e.tokens.input,e.tokens.cached_input,e.tokens.output,e.tokens.reasoning,e.tokens.total,e.cost.usd,e.cost.brl,e.cost.fx_rate,e.provider,e.model].every(r=>r===null)?!0:e.type==="usage.recorded"&&e.retrospective_correction===!0&&e.activity_kind==="retrospective_local_remeasurement"&&e.supersedes_event_id!==null&&n.has(e.supersedes_event_id)&&e.phase===t.phase}function Vs(e,t){let n={conversation:0,planning:1,execution:2};if(n[t]<n[e])throw new Error(`Run V2 phase cannot move backward from ${e} to ${t}`)}var Xe=ut(pt(),1),rh=Xe.z.string().datetime({offset:!0}).or(Xe.z.string().datetime()),oD=Xe.z.string().regex(/^DEC-(?:HUMAN|AI)-/),aD=Xe.z.enum(["architecture","contract","database","security","dependency","network","infrastructure","cost","implementation","rollback"]),NZ=Xe.z.object({schema_version:Xe.z.literal(2),id:oD,title:Xe.z.string().min(1),scope_type:Xe.z.enum(["change","execution"]),scope_id:Xe.z.string().min(1),origin:Xe.z.enum(["human","agent"]),category:aD,context:Xe.z.string().min(1),decision:Xe.z.string().min(1),reason:Xe.z.string().min(1),alternatives:Xe.z.array(Xe.z.string().min(1)),consequences:Xe.z.array(Xe.z.string().min(1)),reversible:Xe.z.boolean(),rollback:Xe.z.string().min(1),confidence:Xe.z.number().min(0).max(1).nullable(),created_at:rh,confirmed_at:rh.nullable()}).strict().superRefine((e,t)=>{let n=e.scope_type==="change"?"CHG-":"EXEC-";e.scope_id.startsWith(n)||t.addIssue({code:"custom",path:["scope_id"],message:`${e.scope_type} decision requires ${n} scope_id`});let i=e.origin==="human"?"DEC-HUMAN-":"DEC-AI-";e.id.startsWith(i)||t.addIssue({code:"custom",path:["id"],message:`${e.origin} decision requires ${i} id`}),e.origin==="human"&&e.confidence!==null&&t.addIssue({code:"custom",path:["confidence"],message:"Human decisions do not use agent confidence"}),e.origin==="agent"&&e.confidence===null&&t.addIssue({code:"custom",path:["confidence"],message:"Agent decisions require confidence"}),e.origin==="human"&&e.confirmed_at===null&&t.addIssue({code:"custom",path:["confirmed_at"],message:"Human decisions require explicit confirmation provenance"})});var At=k.z.string().datetime({offset:!0}).or(k.z.string().datetime()),Ws=k.z.enum(["conversation","planning","execution"]),Bs=k.z.string().startsWith("RUN-"),lD=k.z.string().startsWith("CONV-"),ih=k.z.string().startsWith("EXEC-").nullable(),oh=k.z.string().startsWith("TASK-").nullable(),ah=k.z.string().startsWith("SPEC-").nullable(),sh=k.z.string().startsWith("PRD-").nullable(),ch=k.z.string().startsWith("CHG-").nullable(),Zu=Bs.nullable(),Ir=k.z.string().regex(/^(?:AINV|INV)-/).max(200),lh=k.z.string().startsWith("MCALL-").max(200),jZ=k.z.enum(["intake","orchestrator","subagent"]),uD=k.z.enum(["intake","orchestrator","subagent","owner","contributor"]),uh=k.z.enum(["intake","orchestration","execution","review","audit","finalization"]),qu=k.z.enum(["low","medium","high","xhigh"]),to=k.z.object({schema_version:k.z.literal(1),provider:k.z.literal("github"),account_id:k.z.string().min(1).max(100),login_snapshot:k.z.string().min(1).max(100),attribution_source:k.z.enum(["verified_local_account","last_verified_local_account","cached_fallback","human_assigned"]),verified_at:At.nullable(),expires_at:At.nullable().optional(),last_verified_at:At.nullable().optional()}).strict();var dh=k.z.enum(["orchestrator","delegated"]);var Vu=k.z.object({input:k.z.number().int().nonnegative().nullable(),cached_input:k.z.number().int().nonnegative().nullable(),cache_write_input:k.z.number().int().nonnegative().nullable().optional(),output:k.z.number().int().nonnegative().nullable(),reasoning:k.z.number().int().nonnegative().nullable(),total:k.z.number().int().nonnegative().nullable(),source:k.z.enum(["provider_reported","estimated","unavailable"])}).strict().superRefine((e,t)=>{e.input!==null&&e.cached_input!==null&&e.cached_input>e.input&&t.addIssue({code:"custom",path:["cached_input"],message:"cached_input cannot exceed input"}),e.total!==null&&e.input!==null&&e.output!==null&&e.total<e.input+e.output&&t.addIssue({code:"custom",path:["total"],message:"total cannot be lower than input + output"})}),_h=k.z.object({usd:k.z.number().nonnegative().nullable(),brl:k.z.number().nonnegative().nullable(),fx_rate:k.z.number().positive().nullable().optional()}).strict(),Rr={schema_version:k.z.literal(2),event_id:k.z.string().min(1).max(200),run_id:Bs,sequence:k.z.number().int().positive(),occurred_at:At},dD=k.z.object({intent:k.z.enum(["conversation","continue","refine","rework","new_work"]),classification_source:k.z.enum(["agent","explicit","fallback"]),confidence:k.z.number().min(0).max(1),reason_codes:k.z.array(k.z.string().regex(/^[a-z][a-z0-9-]{0,63}$/)).min(1).max(12)}).strict(),ph=k.z.object({...Rr,type:k.z.literal("run.started"),attribution_status:k.z.enum(["attributed","legacy_unattributed"]),developer_identity:to.nullable().optional(),phase:Ws,run_role:uD.optional(),run_purpose:uh.optional(),requires_finalizer:k.z.boolean().optional(),execution_kind:k.z.enum(["interaction","delivery"]).optional(),execution_eligibility:k.z.array(k.z.enum(["interaction","delivery"])).optional(),entrypoint:k.z.enum(["conversation","task","spec","prd"]),work_type:k.z.enum(["new","rework"]),storage_mode:k.z.enum(["tracked_sanitized","local_only"]),client:k.z.string().min(1).max(100),agent:k.z.string().min(1).max(100),agent_name:k.z.string().min(1).max(100).nullable().optional(),agent_identity_warning:k.z.object({code:k.z.literal("deprecated-agent-identity"),kind:k.z.enum(["id","codex_name","codex_task_name"]),requested:k.z.string().min(1),canonical_id:k.z.string().min(1),deprecated_at:k.z.iso.date(),remove_after:k.z.iso.date()}).strict().optional(),provider:k.z.string().min(1).max(100).nullable(),model:k.z.string().min(1).max(200),reasoning_effort:qu.nullable().optional(),client_thread_id:k.z.string().min(1).max(200).nullable().optional(),client_turn_id:k.z.string().min(1).max(200).nullable().optional(),conversation_id:lD,execution_id:ih,task_id:oh,spec_id:ah,prd_id:sh,change_id:ch,parent_run_id:Zu,continuation_of_run_id:Zu,retry_of_run_id:Zu,agent_invocation_id:Ir.optional(),root_agent_invocation_id:Ir.optional(),parent_agent_invocation_id:Ir.nullable().optional(),invocation_kind:dh.optional(),delegation_depth:k.z.number().int().nonnegative().optional(),intake:dD.nullable().optional()}).strict().superRefine((e,t)=>{e.phase==="execution"&&e.execution_id===null&&e.attribution_status!=="legacy_unattributed"&&t.addIssue({code:"custom",path:["execution_id"],message:"Execution phase requires execution_id"}),{conversation:e.conversation_id,task:e.task_id,spec:e.spec_id,prd:e.prd_id}[e.entrypoint]===null&&t.addIssue({code:"custom",path:[`${e.entrypoint}_id`],message:`${e.entrypoint} entrypoint requires its scope id`}),e.run_role==="orchestrator"&&e.parent_run_id!==null&&t.addIssue({code:"custom",path:["parent_run_id"],message:"orchestrator Run cannot have parent_run_id"}),e.run_role==="subagent"&&e.parent_run_id===null&&t.addIssue({code:"custom",path:["parent_run_id"],message:"subagent Sub-Run requires parent_run_id"});let i=e.agent_invocation_id!==void 0;i&&(e.root_agent_invocation_id===void 0||e.parent_agent_invocation_id===void 0||e.invocation_kind===void 0||e.delegation_depth===void 0)&&t.addIssue({code:"custom",path:["agent_invocation_id"],message:"Agent Invocation identity must be complete when present"}),i&&e.invocation_kind==="orchestrator"&&(e.parent_agent_invocation_id!==null||e.root_agent_invocation_id!==e.agent_invocation_id||e.delegation_depth!==0)&&t.addIssue({code:"custom",path:["invocation_kind"],message:"orchestrator Agent Invocation must be its root at depth zero"}),i&&e.invocation_kind==="delegated"&&(e.parent_agent_invocation_id===null||e.delegation_depth===0)&&t.addIssue({code:"custom",path:["parent_agent_invocation_id"],message:"delegated Agent Invocation requires a parent and positive depth"});for(let[r,o]of[["parent_run_id",e.parent_run_id],["continuation_of_run_id",e.continuation_of_run_id],["retry_of_run_id",e.retry_of_run_id]])o===e.run_id&&t.addIssue({code:"custom",path:[r],message:`${r} cannot reference itself`})}),fh=k.z.object({...Rr,type:k.z.literal("usage.recorded"),phase:Ws,activity_kind:k.z.string().regex(/^[a-z][a-z0-9_-]{0,63}$/),classification_source:k.z.enum(["explicit","current_context","default","legacy_inferred"]),tokens:Vu,cost:_h,provider:k.z.string().min(1).max(100).nullable(),model:k.z.string().min(1).max(200).nullable(),source_segment_key:k.z.string().min(1).max(500).nullable(),attributed_spec_id:k.z.string().min(1).max(200).nullable().optional(),model_call_id:lh.nullable().optional(),runtime:k.z.object({reasoning_effort:k.z.string().min(1).max(40).nullable(),service_tier:k.z.string().min(1).max(40).nullable()}).strict().optional(),supersedes_event_id:k.z.string().min(1).max(200).nullable(),retrospective_correction:k.z.literal(!0).optional(),source_occurred_at:At.optional(),source_started_at:At.optional(),source_finished_at:At.optional(),duration_ms:k.z.number().int().nonnegative().nullable().optional(),duration_provenance:k.z.enum(["observed","reconciled","legacy_inferred","estimated","unavailable"]).nullable().optional(),context_stats:k.z.object({initial_pack_tokens:k.z.number().int().nonnegative().nullable(),tool_output_tokens:k.z.number().int().nonnegative().nullable(),files_opened:k.z.number().int().nonnegative().nullable(),snippets_opened:k.z.number().int().nonnegative().nullable()}).strict().optional()}).strict(),mh=k.z.object({...Rr,type:k.z.literal("model.call.observed"),call_id:lh,agent_invocation_id:Ir,coverage:k.z.enum(["complete","partial","unavailable"]),tokens:Vu,cost:_h,provider:k.z.string().min(1).max(100).nullable(),model:k.z.string().min(1).max(200).nullable(),source_call_key:k.z.string().min(1).max(500).nullable(),source_occurred_at:At.optional(),source_started_at:At.optional(),source_finished_at:At.optional(),runtime:k.z.object({reasoning_effort:k.z.string().min(1).max(40).nullable(),service_tier:k.z.string().min(1).max(40).nullable()}).strict().optional()}).strict(),gh=k.z.object({schema_version:k.z.literal(1),run_id:Bs,execution_id:ih.nullable().default(null),task_id:oh.nullable().default(null),spec_id:ah.nullable().default(null),prd_id:sh.nullable().default(null),change_id:ch.nullable().default(null),developer_identity:to.nullable().optional(),zaip_agent:k.z.string().min(1).max(100).nullable().default(null),phase:Ws.nullable().default(null),purpose:uh.nullable().default(null),agent_invocation_id:Ir,root_agent_invocation_id:Ir,parent_agent_invocation_id:Ir.nullable(),invocation_kind:dh,delegation_depth:k.z.number().int().nonnegative(),client:k.z.enum(["codex","codex-desktop","codex-subagent"]),thread_id:k.z.string().min(1).max(200).nullable(),turn_id:k.z.string().min(1).max(200).nullable(),agent_path:k.z.string().min(1).max(500).nullable()}).strict().superRefine((e,t)=>{e.invocation_kind==="orchestrator"&&(e.parent_agent_invocation_id!==null||e.root_agent_invocation_id!==e.agent_invocation_id||e.delegation_depth!==0)&&t.addIssue({code:"custom",path:["invocation_kind"],message:"orchestrator telemetry correlation must be its root at depth zero"}),e.invocation_kind==="delegated"&&(e.parent_agent_invocation_id===null||e.delegation_depth===0)&&t.addIssue({code:"custom",path:["parent_agent_invocation_id"],message:"delegated telemetry correlation requires a parent and positive depth"}),e.client==="codex-subagent"&&(e.thread_id!==null||e.agent_path===null&&e.turn_id===null)&&t.addIssue({code:"custom",path:["agent_path"],message:"Codex subagent telemetry requires agent_path or turn_id and no root thread_id"}),e.client!=="codex-subagent"&&e.thread_id===null&&e.turn_id===null&&t.addIssue({code:"custom",path:["thread_id"],message:"Codex root telemetry requires thread_id or turn_id"})}),yh=k.z.object({correlation:gh,event_kind:k.z.enum(["response","usage","terminal","error"]),source:k.z.enum(["codex_app_server","codex_session_fallback","unavailable"]),source_event_key:k.z.string().min(1).max(500),source_method:k.z.enum(["item/completed","rawResponse/completed","thread/tokenUsage/updated","error","turn/completed"]).optional(),stream_boundary:k.z.enum(["item_completed","response_completed","usage_updated","error","turn_completed"]).optional(),source_occurred_at:At.nullable(),captured_at:At,coverage:k.z.enum(["complete","partial","unavailable"]),tokens:Vu.nullable(),provider:k.z.string().min(1).max(100).nullable(),model:k.z.string().min(1).max(200).nullable(),runtime:k.z.object({reasoning_effort:k.z.string().min(1).max(40).nullable(),service_tier:k.z.string().min(1).max(40).nullable()}).strict(),status:k.z.enum(["completed","failed","cancelled"]).nullable(),will_retry:k.z.boolean().nullable().optional(),latency_ms:k.z.number().int().nonnegative().nullable(),historical_cost:k.z.object({estimated_usd:k.z.number().nonnegative().nullable(),estimated_brl:k.z.number().nonnegative().nullable(),fx_rate:k.z.number().positive().nullable(),pricing_model:k.z.string().nullable(),pricing_source:k.z.string().nullable(),pricing_source_url:k.z.string().url().nullable().optional(),pricing_catalog_updated_at:At.nullable().optional(),input_usd:k.z.number().nonnegative().nullable(),cached_input_usd:k.z.number().nonnegative().nullable(),cache_write_input_usd:k.z.number().nonnegative().nullable().optional(),output_usd:k.z.number().nonnegative().nullable(),reasoning_usd:k.z.number().nonnegative().nullable()}).strict().nullable().optional(),context_stats:k.z.object({initial_pack_tokens:k.z.number().int().nonnegative().nullable(),tool_output_tokens:k.z.number().int().nonnegative().nullable(),files_opened:k.z.number().int().nonnegative().nullable(),snippets_opened:k.z.number().int().nonnegative().nullable()}).strict().nullable(),discarded_counts:k.z.object({prompt:k.z.number().int().nonnegative(),response_text:k.z.number().int().nonnegative(),reasoning:k.z.number().int().nonnegative(),secrets:k.z.number().int().nonnegative()}).strict()}).strict().superRefine((e,t)=>{e.source==="codex_session_fallback"&&e.coverage==="complete"&&t.addIssue({code:"custom",path:["coverage"],message:"Codex session fallback coverage must be partial or unavailable"}),e.source==="unavailable"&&e.coverage!=="unavailable"&&t.addIssue({code:"custom",path:["coverage"],message:"Unavailable source requires unavailable coverage"}),e.source==="unavailable"&&(e.provider!==null||e.model!==null||e.runtime.reasoning_effort!==null||e.runtime.service_tier!==null||e.latency_ms!==null)&&t.addIssue({code:"custom",path:["source"],message:"Unavailable source cannot contain effective runtime observations"}),e.coverage==="unavailable"&&e.tokens!==null&&e.tokens.source!=="unavailable"&&t.addIssue({code:"custom",path:["tokens","source"],message:"Unavailable coverage cannot contain observed tokens"}),e.event_kind==="terminal"&&e.status===null&&t.addIssue({code:"custom",path:["status"],message:"Terminal telemetry requires status"}),e.event_kind==="error"&&(e.will_retry===!0&&e.status!==null||e.will_retry!==!0&&e.status!=="failed")&&t.addIssue({code:"custom",path:["status"],message:"Retrying errors require null status; terminal errors require failed status"})}),_D=k.z.object({schema_version:k.z.literal(1),event_id:k.z.string().startsWith("CEVT-").max(200),checksum_sha256:k.z.string().regex(/^[a-f0-9]{64}$/),compaction:k.z.object({status:k.z.enum(["pending","compacted"]),compacted_at:At.nullable()}).strict(),event:yh}).strict(),hh=k.z.string().startsWith("INV-").max(200),vh=k.z.object({...Rr,type:k.z.literal("model.selection.recorded"),invocation_id:hh,requested:k.z.object({model:k.z.string().min(1).max(200),reasoning_effort:qu.nullable(),velocity:k.z.literal("standard")}).strict(),selection:k.z.object({source:k.z.enum(["execution-override","task-override","auto-policy","project-default"]),policy_version:k.z.number().int().positive(),reasons:k.z.array(k.z.string().regex(/^[a-z][a-z0-9-]{0,63}$/)).min(1).max(20)}).strict()}).strict(),Sh=k.z.object({...Rr,type:k.z.literal("provider.invocation.finished"),invocation_id:hh,status:k.z.enum(["completed","failed","cancelled"]),effective:k.z.object({provider:k.z.string().min(1).max(100).nullable(),model:k.z.string().min(1).max(200).nullable(),reasoning_effort:qu.nullable(),service_tier:k.z.string().min(1).max(40).nullable()}).strict(),latency_ms:k.z.number().int().nonnegative().nullable()}).strict(),bh=k.z.object({...Rr,type:k.z.literal("run.finished"),phase:Ws,status:k.z.enum(["completed","failed","cancelled"]),duration_ms:k.z.number().int().nonnegative().nullable().default(null),duration_provenance:k.z.enum(["observed","reconciled","legacy_inferred","estimated","unavailable"]).nullable().default(null)}).strict(),pD=k.z.object({...Rr,type:k.z.literal("run.finalization.decided"),finalizer_run_id:Bs,outcome:k.z.enum(["completed","blocked","failed","cancelled"]),summary:k.z.string().min(1).max(4e3),evidence_ids:k.z.array(k.z.string().min(1).max(200)).max(100),changed_files:k.z.array(k.z.string().min(1).max(500)).max(1e4).default([])}).strict(),no=k.z.discriminatedUnion("type",[ph,fh,mh,vh,Sh,th,pD,bh]);var fD=$t.z.object({run_id:$t.z.string().startsWith("RUN-"),path:$t.z.string().startsWith(".agents/records/runs/"),content_sha256:$t.z.string().regex(/^[a-f0-9]{64}$/)}).strict(),mD=$t.z.object({schema_version:$t.z.literal(1),manifest_id:$t.z.string().min(1),created_at:$t.z.string().datetime({offset:!0}),kind:$t.z.literal("historical_developer_attribution"),assignment:to.extend({attribution_source:$t.z.literal("human_assigned")}),source_streams:$t.z.array(fD).min(1)}).strict().superRefine((e,t)=>{let n=new Set,i=new Set;for(let[r,o]of e.source_streams.entries())n.has(o.run_id)&&t.addIssue({code:"custom",path:["source_streams",r,"run_id"],message:"Duplicate historical Run"}),i.has(o.path)&&t.addIssue({code:"custom",path:["source_streams",r,"path"],message:"Duplicate historical Run path"}),n.add(o.run_id),i.add(o.path)}),BZ=mD.extend({manifest_hash:$t.z.string().regex(/^[a-f0-9]{64}$/)}).strict();var KZ=1440*60*1e3;var YZ=64*1024;function Th(e){let t=new Map,n=[];for(let i of e){if(i.source_segment_key===null){n.push(i);continue}let r=t.get(i.source_segment_key);if(r===void 0){t.set(i.source_segment_key,i),n.push(i);continue}if(!Nh(i,r))throw new Error(`Divergent duplicate source segment: ${i.source_segment_key}`)}return n}function Nh(e,t){return JSON.stringify(Ah(e))===JSON.stringify(Ah(t))}function Ah(e){return{phase:e.phase,activity_kind:e.activity_kind,classification_source:e.classification_source,tokens:e.tokens,cost:e.cost,provider:e.provider,model:e.model,source_segment_key:e.source_segment_key,model_call_id:e.model_call_id??null}}function Ih(e,t){let n=[],i=null;for(let r of e.split(/\r?\n/).map(o=>o.trim()).filter(Boolean)){let o=JSON.parse(r),a=no.parse(Array.isArray(o)?t(o,i):o);i??=a.run_id,n.push(a)}return n}function Rh(e,t,n){if(e.model!=="unknown"&&n.requested.model!==e.model)throw new Error(`Agent Run model is immutable: expected ${e.model}, received ${n.requested.model}`);if(e.reasoning_effort!=null&&n.requested.reasoning_effort!==e.reasoning_effort)throw new Error(`Agent Run reasoning effort is immutable: expected ${e.reasoning_effort}, received ${n.requested.reasoning_effort}`);let i=t.find(r=>r.type==="model.selection.recorded");if(i!==void 0){if(JSON.stringify(i.requested)!==JSON.stringify(n.requested))throw new Error(`Agent Run calls must inherit one model configuration: ${e.run_id}`);if(JSON.stringify(i.selection)!==JSON.stringify(n.selection))throw new Error(`Agent Run calls must inherit one selection decision: ${e.run_id}`)}}function Wu(e){return Ih(e,ED)}function Bu(e){let t=new Map;for(let v of e){let E=no.parse(v),x=t.get(E.event_id);if(x!==void 0){if(JSON.stringify(x)!==JSON.stringify(E))throw new Error(`Divergent duplicate Run V2 event: ${E.event_id}`);continue}t.set(E.event_id,E)}let n=[...t.values()].sort((v,E)=>v.sequence-E.sequence);if(n.length===0||n[0]?.type!=="run.started")throw new Error("Run V2 stream must start with run.started");let i=n[0],r=i.phase,o=null,a=null,s=null,l=new Map,c=new Map,u=new Map,d=new Map,p=new Map;for(let[v,E]of n.entries()){if(E.run_id!==i.run_id)throw new Error("Run V2 stream mixes run ids");if(E.sequence!==v+1)throw new Error("Run V2 sequence must be contiguous");let x=l.get(E.sequence);if(x!==void 0&&x!==E.event_id)throw new Error(`Run V2 sequence is duplicated: ${E.sequence}`);if(l.set(E.sequence,E.event_id),v>0&&E.type==="run.started")throw new Error("Run V2 has multiple starts");if(o!==null&&E.type!=="run.finalization.decided"&&!zu(E,o,c))throw new Error("Run V2 contains a non-retrospective record after run.finished");if(E.type==="usage.recorded"){if(Vs(r,E.phase),E.phase==="execution"&&i.execution_id===null&&i.attribution_status!=="legacy_unattributed")throw new Error("Execution phase requires execution_id");if(E.supersedes_event_id!==null&&!c.has(E.supersedes_event_id))throw new Error(`Superseded usage event must occur earlier: ${E.supersedes_event_id}`);c.set(E.event_id,E),r=E.phase}if(E.type==="run.attribution.recovered"){if(!nh(i,E))throw new Error("Run attribution recovery does not match its immutable start header");if(s!==null)throw new Error("Run V2 has multiple attribution recoveries");Vs(r,E.phase),r=E.phase,s=E}if(E.type==="model.selection.recorded"){if(Rh(i,n.slice(0,v),{invocationId:E.invocation_id,requested:E.requested,selection:E.selection}),u.has(E.invocation_id))throw new Error(`Duplicate model selection for invocation: ${E.invocation_id}`);u.set(E.invocation_id,E)}if(E.type==="provider.invocation.finished"){if(!u.has(E.invocation_id))throw new Error(`Provider invocation requires earlier model selection: ${E.invocation_id}`);if(d.has(E.invocation_id))throw new Error(`Duplicate provider terminal for invocation: ${E.invocation_id}`);d.set(E.invocation_id,E)}if(E.type==="model.call.observed"){let F=p.get(E.call_id);if(F!==void 0&&JSON.stringify(F)!==JSON.stringify(E)&&!ju(F,E))throw new Error(`Divergent duplicate Model Call: ${E.call_id}`);p.set(E.call_id,E)}if(E.type==="run.finalization.decided"){if(a!==null)throw new Error("Run V2 has multiple finalization decisions");a=E}if(E.type==="run.finished"){if(E.phase!==r)throw new Error("run.finished phase must match the latest phase");o=E}}let f=n.filter(v=>v.type==="usage.recorded"),S=new Set(f.map(v=>v.supersedes_event_id).filter(v=>v!==null)),h=Th(f.filter(v=>!S.has(v.event_id)));return{run:s===null?i:{...i,phase:s.phase,execution_id:s.execution_id,task_id:s.task_id,change_id:s.change_id},status:o?.status??"running",finished:o,finalization_decision:a,attribution_recovery:s,records:n,usage_records:f,effective_usage_records:h,model_selection_records:[...u.values()],provider_invocation_records:[...d.values()],model_call_records:[...p.values()]}}function ED(e,t){if(e[0]!==3||t===null)throw new Error("Run delta requires transport version 3 and a preceding run.started header");if(e[1]==="f")return{schema_version:2,type:"run.finished",run_id:t,event_id:e[2],sequence:e[3],occurred_at:e[4],phase:e[5],status:e[6]};if(e[1]==="a")return{schema_version:2,type:"run.attribution.recovered",run_id:t,event_id:e[2],sequence:e[3],occurred_at:e[4],phase:e[5],execution_id:e[6],task_id:e[7],change_id:e[8]};if(e[1]==="d"&&Array.isArray(e[8]))return{schema_version:2,type:"run.finalization.decided",run_id:t,event_id:e[2],sequence:e[3],occurred_at:e[4],finalizer_run_id:e[5],outcome:e[6],summary:e[7],evidence_ids:e[8],changed_files:Array.isArray(e[9])?e[9]:[]};if(e[1]==="m"&&Array.isArray(e[6])&&Array.isArray(e[7])){let d=e[6],p=e[7];return{schema_version:2,type:"model.selection.recorded",run_id:t,event_id:e[2],sequence:e[3],occurred_at:e[4],invocation_id:e[5],requested:{model:d[0],reasoning_effort:d[1],velocity:d[2]},selection:{source:p[0],policy_version:p[1],reasons:p[2]}}}if(e[1]==="p"&&Array.isArray(e[7])){let d=e[7];return{schema_version:2,type:"provider.invocation.finished",run_id:t,event_id:e[2],sequence:e[3],occurred_at:e[4],invocation_id:e[5],status:e[6],effective:{provider:d[0],model:d[1],reasoning_effort:d[2],service_tier:d[3]},latency_ms:e[8]}}if(e[1]==="c"&&Array.isArray(e[8])&&Array.isArray(e[9])){let d=e[8],p=e[9],f=e[16];return{schema_version:2,type:"model.call.observed",run_id:t,event_id:e[2],sequence:e[3],occurred_at:e[4],call_id:e[5],agent_invocation_id:e[6],coverage:e[7],tokens:{input:d[0],cached_input:d[1],output:d[2],reasoning:d[3],total:d[4],source:d[5],...d[6]===void 0?{}:{cache_write_input:d[6]}},cost:{usd:p[0],brl:p[1],fx_rate:p[2]??null},provider:e[10],model:e[11],source_call_key:e[12],...e[13]===null?{}:{source_occurred_at:e[13]},...e[14]===null||e[14]===void 0?{}:{source_started_at:e[14]},...e[15]===null||e[15]===void 0?{}:{source_finished_at:e[15]},...f===null||!Array.isArray(f)?{}:{runtime:{reasoning_effort:f[0],service_tier:f[1]}}}}if(e[1]!=="u"||!Array.isArray(e[8])||!Array.isArray(e[9]))throw new Error("Invalid Run transport v3 delta");let n=e[8],i=e[9],r=e[15],o=e[16],a=e[17],s=e[18],l=e[19],c=e[20],u=typeof e[21]=="string"?e[21]:null;return{schema_version:2,type:"usage.recorded",run_id:t,event_id:e[2],sequence:e[3],occurred_at:e[4],phase:e[5],activity_kind:e[6],classification_source:e[7],tokens:{input:n[0],cached_input:n[1],output:n[2],reasoning:n[3],total:n[4],source:n[5],...n[6]===void 0?{}:{cache_write_input:n[6]}},cost:{usd:i[0],brl:i[1],fx_rate:i[2]??null},provider:e[10],model:e[11],source_segment_key:e[12],...u==null?{}:{attributed_spec_id:u},...c==null?{}:{model_call_id:c},supersedes_event_id:e[13],...e[14]===null?{}:{source_occurred_at:e[14]},...a==null?{}:{source_started_at:a},...s==null?{}:{source_finished_at:s},...l===!0?{retrospective_correction:!0}:{},...r===null||!Array.isArray(r)?{}:{context_stats:{initial_pack_tokens:r[0],tool_output_tokens:r[1],files_opened:r[2],snippets_opened:r[3]}},...o===null||!Array.isArray(o)?{}:{runtime:{reasoning_effort:o[0],service_tier:o[1]}}}}var Hs=fe.z.string().datetime({offset:!0}),kD=fe.z.preprocess(e=>e==="client"?"provider_reported":e,fe.z.enum(["provider_reported","estimated","unavailable"])),zq=fe.z.object({id:fe.z.string().regex(/^DEC-(?:HUMAN|AI)-/),title:fe.z.string().min(1),origin:fe.z.enum(["human","agent"]),category:fe.z.enum(["architecture","contract","database","security","dependency","network","infrastructure","cost","implementation"]),status:fe.z.enum(["active","superseded","rejected"]),task:fe.z.string().startsWith("TASK-").nullable(),change:fe.z.string().startsWith("CHG-").nullable(),context:fe.z.string().min(1),decision:fe.z.string().min(1),reason:fe.z.string().min(1),alternatives:fe.z.array(fe.z.string()),consequences:fe.z.array(fe.z.string()),reversible:fe.z.boolean(),rollback:fe.z.string(),confidence:fe.z.number().min(0).max(1).nullable(),created_at:Hs,confirmed_at:Hs.nullable()}).strict();var Fq=fe.z.object({id:fe.z.string().startsWith("RUN-"),task:fe.z.string().startsWith("TASK-"),status:fe.z.enum(["running","completed","failed"]),client:fe.z.string().min(1),agent:fe.z.string().min(1),model:fe.z.string().min(1),started_at:Hs,finished_at:Hs.nullable(),duration_ms:fe.z.number().int().nonnegative().nullable(),provider:fe.z.string().min(1).nullable().default(null),token_usage:fe.z.object({input:fe.z.number().int().nonnegative().nullable(),cached_input:fe.z.number().int().nonnegative().nullable().default(null),output:fe.z.number().int().nonnegative().nullable(),reasoning:fe.z.number().int().nonnegative().nullable(),total:fe.z.number().int().nonnegative().nullable().default(null),source:kD}),cost:fe.z.object({estimated_usd:fe.z.number().nonnegative().nullable(),estimated_brl:fe.z.number().nonnegative().nullable(),fx_rate:fe.z.number().positive().nullable(),pricing_model:fe.z.string().nullable(),pricing_source:fe.z.string().nullable(),input_usd:fe.z.number().nonnegative().nullable().default(null),cached_input_usd:fe.z.number().nonnegative().nullable().default(null),output_usd:fe.z.number().nonnegative().nullable().default(null),reasoning_usd:fe.z.number().nonnegative().nullable().default(null)}).default({estimated_usd:null,estimated_brl:null,fx_rate:null,pricing_model:null,pricing_source:null,input_usd:null,cached_input_usd:null,output_usd:null,reasoning_usd:null}),telemetry:fe.z.object({cycle_count:fe.z.number().int().nonnegative().nullable(),source:fe.z.enum(["repository","local-codex","manual","unavailable"]),segment_key:fe.z.string().nullable()}).default({cycle_count:null,source:"unavailable",segment_key:null}),commands:fe.z.array(fe.z.string()),gates:fe.z.array(fe.z.string()),decisions:fe.z.array(fe.z.string()),evidence:fe.z.array(fe.z.string())}).strict();var OD=["prd_count","spec_count","task_count","test_count","evidence_count"],Js=()=>({prd_count:0,spec_count:0,task_count:0,test_count:0,evidence_count:0});function wD(e,t){let n=["a.payload_type IS NULL","a.run_id IS NOT NULL","a.zaip_agent IS NOT NULL"],i=[];for(let f of["from","to"])t[f]&&(n.push(`a.occurred_day_sp ${f==="from"?">=":"<="} ?`),i.push(t[f].slice(0,10)));for(let f of["agent","phase","status"])t[f]&&(n.push(`a.${f==="agent"?"zaip_agent":f}=?`),i.push(t[f]));t.risk&&(n.push("EXISTS (SELECT 1 FROM zaip_aios_activities t WHERE t.payload_type='work_item' AND json_extract(t.payload_json,'$.entity_kind')='task' AND json_extract(t.payload_json,'$.id')=a.task_id AND json_extract(t.payload_json,'$.risk')=?)"),i.push(t.risk)),(t.priority||t.workType)&&n.push("0"),t.origin&&n.push(t.origin==="prd"?"a.prd_id IS NOT NULL":t.origin==="spec"?"a.prd_id IS NULL AND a.spec_id IS NOT NULL":t.origin==="task"?"a.prd_id IS NULL AND a.spec_id IS NULL AND a.task_id IS NOT NULL":"a.prd_id IS NULL AND a.spec_id IS NULL AND a.task_id IS NULL");let r=[];for(let f of["provider","model"])t[f]&&(r.push(`COALESCE(u.${f},'unavailable')=?`),i.push(t[f]));r.length&&n.push(`EXISTS (SELECT 1 FROM invocation_usage u WHERE u.agent_invocation_id=a.agent_invocation_id AND ${r.join(" AND ")})`),t.query&&(n.push("(a.zaip_agent LIKE ? OR a.zaip_agent_persona LIKE ? OR a.zaip_agent_job LIKE ?)"),i.push(...Array(3).fill(`%${t.query}%`)));let o=e.prepare(`SELECT a.run_id, MIN(a.zaip_agent) AS agent FROM zaip_aios_activities a WHERE ${n.join(" AND ")} GROUP BY a.run_id HAVING COUNT(DISTINCT a.zaip_agent)=1`).all(...i),a=new Map(o.map(f=>[f.run_id,f.agent])),s=new Map,l=new Set,c=t.from?.slice(0,10)??"0000-01-01",u=t.to?.slice(0,10)??"9999-12-31",d=e.prepare(`WITH files AS (
204
204
  SELECT json_extract(payload_json,'$.path') path,
205
205
  json_extract(payload_json,'$.artifact_kind') artifact_kind,
206
206
  json_extract(payload_json,'$.artifact_id') artifact_id,
@@ -219,10 +219,10 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
219
219
  COALESCE(artifact_id,path), artifact_run_id, artifact_occurred_day_sp
220
220
  FROM files WHERE artifact_run_id IS NOT NULL AND
221
221
  (artifact_kind='evidence' OR (artifact_kind='validation' AND path LIKE '%/artifacts/tests/%'))
222
- `).all();for(let f of d){if(!f.day||f.day<c||f.day>u)continue;let S=a.get(f.run_id);if(!S)continue;let h=`${f.kind}:${f.id}`;if(l.has(h))continue;l.add(h);let v=s.get(S)??Bs(),E=`${f.kind}_count`;v[E]=(v[E]??0)+1,s.set(S,v)}let p=e.prepare(`SELECT a.zaip_agent AS agent,
222
+ `).all();for(let f of d){if(!f.day||f.day<c||f.day>u)continue;let S=a.get(f.run_id);if(!S)continue;let h=`${f.kind}:${f.id}`;if(l.has(h))continue;l.add(h);let v=s.get(S)??Js(),E=`${f.kind}_count`;v[E]=(v[E]??0)+1,s.set(S,v)}let p=e.prepare(`SELECT a.zaip_agent AS agent,
223
223
  COUNT(DISTINCT NULLIF(trim(a.task_id),'')) AS task_count
224
224
  FROM zaip_aios_activities a WHERE ${n.join(" AND ")}
225
- GROUP BY a.zaip_agent`).all(...i);for(let f of p){let S=s.get(f.agent)??Bs();S.task_count=f.task_count,s.set(f.agent,S)}return s}function Rh(e,t,n){let i=EP(e,t);for(let r of n.rows)r.tasks_active=r.task_count,Object.assign(r,i.get(String(r.key))??Bs()),r.validation_count=r.test_count;if(n.totals){let r=Bs();for(let o of i.values())for(let a of bP)r[a]=r[a]===null||o[a]===null?null:r[a]+o[a];Object.assign(n.totals,r,{validation_count:r.test_count})}}function $h(){return`, artifacts AS (
225
+ GROUP BY a.zaip_agent`).all(...i);for(let f of p){let S=s.get(f.agent)??Js();S.task_count=f.task_count,s.set(f.agent,S)}return s}function $h(e,t,n){let i=wD(e,t);for(let r of n.rows)r.tasks_active=r.task_count,Object.assign(r,i.get(String(r.key))??Js()),r.validation_count=r.test_count;if(n.totals){let r=Js();for(let o of i.values())for(let a of OD)r[a]=r[a]===null||o[a]===null?null:r[a]+o[a];Object.assign(n.totals,r,{validation_count:r.test_count})}}function Ch(){return`, artifacts AS (
226
226
  SELECT a.developer_account_id,
227
227
  COUNT(DISTINCT CASE WHEN artifact.artifact_kind='validation' THEN artifact.source_path END) AS test_count,
228
228
  COUNT(DISTINCT CASE WHEN artifact.artifact_kind='evidence' THEN artifact.source_path END) AS evidence_count
@@ -234,7 +234,7 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
234
234
  AND (? IS NULL OR artifact.occurred_day_sp >= ?)
235
235
  AND (? IS NULL OR artifact.occurred_day_sp <= ?)
236
236
  GROUP BY a.developer_account_id
237
- )`}function Ch(){return`UNION ALL
237
+ )`}function Lh(){return`UNION ALL
238
238
  SELECT occurred_day_sp,
239
239
  0, 0, 0,
240
240
  SUM(CASE WHEN artifact_kind='validation' THEN 1 ELSE 0 END),
@@ -243,7 +243,7 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
243
243
  WHERE occurred_day_sp IS NOT NULL
244
244
  AND (? IS NULL OR occurred_day_sp >= ?)
245
245
  AND (? IS NULL OR occurred_day_sp <= ?)
246
- GROUP BY occurred_day_sp`}function Hs(e){return(e.from!==void 0||e.to!==void 0)&&!e.query&&!e.status&&!e.risk&&!e.provider&&!e.model&&!e.agent&&!e.phase&&!e.origin&&!e.workType&&!e.priority}function Bu(e){let t=i=>i&&/^\d{4}-\d{2}-\d{2}/.test(i)?i.slice(0,10):null,n=[t(e.from)&&`occurred_day_sp >= '${t(e.from)}'`,t(e.to)&&`occurred_day_sp <= '${t(e.to)}'`].filter(i=>!!i);return n.length===0?"":` AND ${n.join(" AND ")}`}function Hu(e,t,n,i={}){return e.prepare(`
246
+ GROUP BY occurred_day_sp`}function Ks(e){return(e.from!==void 0||e.to!==void 0)&&!e.query&&!e.status&&!e.risk&&!e.provider&&!e.model&&!e.agent&&!e.phase&&!e.origin&&!e.workType&&!e.priority}function Hu(e){let t=i=>i&&/^\d{4}-\d{2}-\d{2}/.test(i)?i.slice(0,10):null,n=[t(e.from)&&`occurred_day_sp >= '${t(e.from)}'`,t(e.to)&&`occurred_day_sp <= '${t(e.to)}'`].filter(i=>!!i);return n.length===0?"":` AND ${n.join(" AND ")}`}function Ju(e,t,n,i={}){return e.prepare(`
247
247
  WITH creation_models AS (
248
248
  SELECT a.run_id, MIN(f.model) AS model
249
249
  FROM zaip_aios_activities a JOIN cost_invocation_dimension_facts f
@@ -295,16 +295,16 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
295
295
  ), keys AS (SELECT key FROM entity_counts UNION SELECT key FROM artifact_counts)
296
296
  SELECT keys.key, entity_counts.task_count, entity_counts.spec_count, entity_counts.prd_count,
297
297
  artifact_counts.validation_count, artifact_counts.evidence_count
298
- FROM keys LEFT JOIN entity_counts USING(key) LEFT JOIN artifact_counts USING(key)`).all(t,n,i.model??null,i.model??null,i.provider??null,i.provider??null,t,n,i.model??null,i.model??null,i.provider??null,i.provider??null)}function rr(e,t){let n=e.filter(i=>typeof i[t]=="number");return n.length===0?null:n.reduce((i,r)=>i+Number(r[t]),0)}function Lh(e,t,n,i,r,o){if(t==="agent"){let h="WITH facts AS (SELECT zaip_agent AS key, zaip_agent_persona AS persona, zaip_agent_job AS job, occurred_at, task_id, duration_ms, source_event_count, total_tokens, cost_usd, cost_brl FROM zaip_aios_activities WHERE payload_type IS NULL AND occurred_day_sp>=? AND occurred_day_sp<=? AND zaip_agent IS NOT NULL AND (activity_source_kind='agent_run' OR (activity_source_kind<>'agent_run' AND (total_tokens IS NOT NULL OR cost_usd IS NOT NULL OR cost_brl IS NOT NULL))))",v=Number(e.prepare(`${h} SELECT COUNT(DISTINCT key) AS count FROM facts`).get(n,i)?.count??0),E=e.prepare(`${h} SELECT COUNT(*) AS invocation_count, COUNT(DISTINCT task_id) AS task_count, SUM(duration_ms) AS total_duration, SUM(CASE WHEN duration_ms IS NULL THEN 1 ELSE 0 END) AS duration_unknown, SUM(CASE WHEN duration_ms IS NULL THEN 0 ELSE duration_ms END) AS duration_known, SUM(source_event_count) AS source_event_count, SUM(total_tokens) AS total_tokens, SUM(cost_usd) AS total_cost_usd, SUM(cost_brl) AS total_cost_brl FROM facts`).get(n,i)??{},U=e.prepare(`${h} SELECT key, key AS label, COALESCE(MAX(persona), (SELECT persona FROM zaip_dim_zaip_agent d WHERE d.zaip_agent=key)) AS persona, COALESCE(MAX(job), (SELECT job FROM zaip_dim_zaip_agent d WHERE d.zaip_agent=key)) AS job, MAX(occurred_at) AS latest_started_at, COUNT(*) AS invocation_count, COUNT(DISTINCT task_id) AS task_count, SUM(duration_ms) AS total_duration, SUM(CASE WHEN duration_ms IS NULL THEN 1 ELSE 0 END) AS duration_unknown, SUM(CASE WHEN duration_ms IS NULL THEN 0 ELSE duration_ms END) AS duration_known, SUM(source_event_count) AS source_event_count, SUM(total_tokens) AS total_tokens, SUM(cost_usd) AS total_cost_usd, SUM(cost_brl) AS total_cost_brl FROM facts GROUP BY key ORDER BY total_cost_brl DESC, key LIMIT ? OFFSET ?`).all(n,i,r,o);return{total_count:v,totals:E,rows:U}}let a=t==="model"?"model":"provider",s=t==="model"?` UNION ALL SELECT CASE WHEN a.${a} IS NULL OR trim(a.${a})='' OR lower(a.${a}) IN ('unavailable','unknown','mixed') THEN 'unavailable' ELSE a.${a} END,a.total_tokens,a.cost_usd,a.cost_brl FROM zaip_aios_activities a WHERE a.payload_type IS NULL AND a.activity_source_kind<>'agent_run' AND a.occurred_day_sp>=? AND a.occurred_day_sp<=? AND (a.total_tokens IS NOT NULL OR a.cost_usd IS NOT NULL OR a.cost_brl IS NOT NULL)`:"",l=`WITH base AS (SELECT agent_invocation_id, task_id, duration_ms, source_event_count, input_tokens, cached_input_tokens, output_tokens, reasoning_tokens, total_tokens, cost_usd, cost_brl FROM zaip_aios_activities WHERE payload_type IS NULL AND activity_source_kind='agent_run' AND occurred_day_sp>=? AND occurred_day_sp<=?), segment_totals AS (SELECT f.agent_invocation_id,SUM(f.input_tokens) input_tokens,SUM(f.cached_input_tokens) cached_input_tokens,SUM(f.output_tokens) output_tokens,SUM(f.reasoning_tokens) reasoning_tokens,SUM(f.total_tokens) total_tokens,SUM(f.cost_usd) cost_usd,SUM(f.cost_brl) cost_brl FROM cost_invocation_dimension_facts f JOIN base USING(agent_invocation_id) WHERE f.occurred_day_sp>=? AND f.occurred_day_sp<=? AND (f.total_tokens IS NOT NULL OR f.cost_usd IS NOT NULL OR f.cost_brl IS NOT NULL) GROUP BY f.agent_invocation_id), segments AS (SELECT f.agent_invocation_id,CASE WHEN f.${a} IS NULL OR trim(f.${a})='' OR lower(f.${a}) IN ('unavailable','unknown','mixed') THEN 'unavailable' ELSE f.${a} END key,SUM(f.input_tokens) input_tokens,SUM(f.cached_input_tokens) cached_input_tokens,SUM(f.output_tokens) output_tokens,SUM(f.reasoning_tokens) reasoning_tokens,SUM(f.total_tokens) total_tokens,SUM(f.cost_usd) total_cost_usd,SUM(f.cost_brl) total_cost_brl FROM cost_invocation_dimension_facts f JOIN base USING(agent_invocation_id) WHERE f.occurred_day_sp>=? AND f.occurred_day_sp<=? AND (f.total_tokens IS NOT NULL OR f.cost_usd IS NOT NULL OR f.cost_brl IS NOT NULL) GROUP BY f.agent_invocation_id,key UNION ALL SELECT b.agent_invocation_id,'unavailable',b.input_tokens-COALESCE(t.input_tokens,0),b.cached_input_tokens-COALESCE(t.cached_input_tokens,0),b.output_tokens-COALESCE(t.output_tokens,0),b.reasoning_tokens-COALESCE(t.reasoning_tokens,0),b.total_tokens-COALESCE(t.total_tokens,0),b.cost_usd-COALESCE(t.cost_usd,0),b.cost_brl-COALESCE(t.cost_brl,0) FROM base b LEFT JOIN segment_totals t USING(agent_invocation_id) WHERE (b.total_tokens IS NOT NULL OR b.cost_usd IS NOT NULL OR b.cost_brl IS NOT NULL) AND (b.total_tokens<>COALESCE(t.total_tokens,0) OR b.cost_usd<>COALESCE(t.cost_usd,0) OR b.cost_brl<>COALESCE(t.cost_brl,0))), dimension_segments AS (SELECT agent_invocation_id,key,SUM(input_tokens) input_tokens,SUM(cached_input_tokens) cached_input_tokens,SUM(output_tokens) output_tokens,SUM(reasoning_tokens) reasoning_tokens,SUM(total_tokens) total_tokens,SUM(total_cost_usd) total_cost_usd,SUM(total_cost_brl) total_cost_brl FROM segments GROUP BY agent_invocation_id,key), known_dimensions AS (SELECT agent_invocation_id,COUNT(DISTINCT key) dimension_count FROM dimension_segments WHERE key<>'unavailable' GROUP BY agent_invocation_id), filtered_segments AS (SELECT s.*,b.task_id,b.duration_ms,b.source_event_count,d.dimension_count FROM segments s JOIN base b USING(agent_invocation_id) LEFT JOIN known_dimensions d USING(agent_invocation_id)), financial_components AS (SELECT key,total_tokens,total_cost_usd,total_cost_brl FROM filtered_segments${s}), financial AS (SELECT key,SUM(total_tokens) total_tokens,SUM(total_cost_usd) total_cost_usd,SUM(total_cost_brl) total_cost_brl FROM financial_components GROUP BY key), population_dimensions AS (SELECT agent_invocation_id,key,MAX(task_id) task_id,MAX(duration_ms) duration_ms,MAX(source_event_count) source_event_count,MAX(dimension_count) dimension_count FROM filtered_segments GROUP BY agent_invocation_id,key), population_ranked AS (SELECT *,ROW_NUMBER() OVER (PARTITION BY agent_invocation_id ORDER BY key) dimension_rank FROM population_dimensions), population AS (SELECT key,COUNT(*) invocation_count,SUM(duration_ms) total_duration,SUM(source_event_count) source_event_count FROM population_ranked WHERE dimension_rank=1 AND dimension_count=1 GROUP BY key), task_population AS (SELECT key,COUNT(*) task_count FROM (SELECT task_id,key FROM population_dimensions WHERE task_id IS NOT NULL AND key<>'unavailable' GROUP BY task_id,key) GROUP BY key), keys AS (SELECT key FROM financial UNION SELECT key FROM population UNION SELECT key FROM task_population)`,c=t==="model"?[n,i,n,i,n,i,n,i]:[n,i,n,i,n,i],u=t==="model"?"(SELECT SUM(task_count) FROM task_population) AS task_count, 0 AS prd_count, 0 AS spec_count, 0 AS validation_count, 0 AS evidence_count":"(SELECT COUNT(DISTINCT task_id) FROM population_dimensions) task_count",d=t==="model"?"COALESCE(task_population.task_count,0) AS task_count,0 AS prd_count,0 AS spec_count,0 AS validation_count,0 AS evidence_count":"COALESCE(task_population.task_count,0) task_count",p=Number(e.prepare(`${l} SELECT COUNT(*) AS count FROM keys`).get(...c)?.count??0),f=e.prepare(`${l} SELECT (SELECT COUNT(*) FROM population_ranked WHERE dimension_rank=1) invocation_count, ${u}, (SELECT SUM(duration_ms) FROM population_ranked WHERE dimension_rank=1) total_duration, (SELECT SUM(CASE WHEN duration_ms IS NULL THEN 1 ELSE 0 END) FROM population_ranked WHERE dimension_rank=1) duration_unknown, (SELECT SUM(CASE WHEN duration_ms IS NULL THEN 0 ELSE duration_ms END) FROM population_ranked WHERE dimension_rank=1) duration_known, (SELECT SUM(source_event_count) FROM population_ranked WHERE dimension_rank=1) source_event_count, (SELECT SUM(input_tokens) FROM filtered_segments) total_input_tokens, (SELECT SUM(cached_input_tokens) FROM filtered_segments) total_cached_input_tokens, (SELECT SUM(output_tokens) FROM filtered_segments) total_output_tokens, (SELECT SUM(reasoning_tokens) FROM filtered_segments) total_reasoning_tokens, (SELECT SUM(total_tokens) FROM financial) total_tokens, (SELECT SUM(total_cost_usd) FROM financial) total_cost_usd, (SELECT SUM(total_cost_brl) FROM financial) total_cost_brl`).get(...c)??{},S=e.prepare(`${l} SELECT keys.key,keys.key AS label,COALESCE(population.invocation_count,0) invocation_count,${d},population.total_duration,population.source_event_count,financial.total_tokens,financial.total_cost_usd,financial.total_cost_brl FROM keys LEFT JOIN population USING(key) LEFT JOIN task_population USING(key) LEFT JOIN financial USING(key) ORDER BY financial.total_cost_brl DESC,keys.key LIMIT ? OFFSET ?`).all(...c,r,o);if(t==="model"){let h=new Map(Hu(e,n,i).map(F=>[String(F.key),F]));for(let F of S){let Z=h.get(String(F.key));Object.assign(F,{prd_count:Z?.prd_count??0,spec_count:Z?.spec_count??0,validation_count:Z?.validation_count??0,evidence_count:Z?.evidence_count??0})}let v=[...h.values()];Object.assign(f,{prd_count:rr(v,"prd_count")??0,spec_count:rr(v,"spec_count")??0,validation_count:rr(v,"validation_count")??0,evidence_count:rr(v,"evidence_count")??0});let E=["invocation_count","task_count","prd_count","spec_count","validation_count","evidence_count","total_duration","duration_unknown","source_event_count","total_input_tokens","total_cached_input_tokens","total_output_tokens","total_reasoning_tokens","total_tokens","total_cost_usd","total_cost_brl"];for(let F of S){let Z=typeof F.total_duration=="number";for(let V of E)F[V]=typeof F[V]=="number"?F[V]:0;typeof F.duration_known!="number"&&!Z&&(F.duration_known=0)}let U=typeof f.total_duration=="number";for(let F of E)f[F]=typeof f[F]=="number"?f[F]:0;typeof f.duration_known!="number"&&!U&&(f.duration_known=0)}return{total_count:p,totals:f,rows:S}}function Ct(e){if(typeof e!="string")return null;let t=e.trim();return t.length>0&&!["unavailable","unknown","mixed"].includes(t.toLowerCase())?t:null}function Mh(e,t){let n=["model","provider"],i=new Set(e.prepare("SELECT provider FROM zaip_dim_provider").all().map(b=>b.provider)),r=e.prepare(`SELECT activity_row_id, agent_invocation_id, task_id, duration_ms,
298
+ FROM keys LEFT JOIN entity_counts USING(key) LEFT JOIN artifact_counts USING(key)`).all(t,n,i.model??null,i.model??null,i.provider??null,i.provider??null,t,n,i.model??null,i.model??null,i.provider??null,i.provider??null)}function rr(e,t){let n=e.filter(i=>typeof i[t]=="number");return n.length===0?null:n.reduce((i,r)=>i+Number(r[t]),0)}function Mh(e,t,n,i,r,o){if(t==="agent"){let h="WITH facts AS (SELECT zaip_agent AS key, zaip_agent_persona AS persona, zaip_agent_job AS job, occurred_at, task_id, duration_ms, source_event_count, total_tokens, cost_usd, cost_brl FROM zaip_aios_activities WHERE payload_type IS NULL AND occurred_day_sp>=? AND occurred_day_sp<=? AND zaip_agent IS NOT NULL AND (activity_source_kind='agent_run' OR (activity_source_kind<>'agent_run' AND (total_tokens IS NOT NULL OR cost_usd IS NOT NULL OR cost_brl IS NOT NULL))))",v=Number(e.prepare(`${h} SELECT COUNT(DISTINCT key) AS count FROM facts`).get(n,i)?.count??0),E=e.prepare(`${h} SELECT COUNT(*) AS invocation_count, COUNT(DISTINCT task_id) AS task_count, SUM(duration_ms) AS total_duration, SUM(CASE WHEN duration_ms IS NULL THEN 1 ELSE 0 END) AS duration_unknown, SUM(CASE WHEN duration_ms IS NULL THEN 0 ELSE duration_ms END) AS duration_known, SUM(source_event_count) AS source_event_count, SUM(total_tokens) AS total_tokens, SUM(cost_usd) AS total_cost_usd, SUM(cost_brl) AS total_cost_brl FROM facts`).get(n,i)??{},x=e.prepare(`${h} SELECT key, key AS label, COALESCE(MAX(persona), (SELECT persona FROM zaip_dim_zaip_agent d WHERE d.zaip_agent=key)) AS persona, COALESCE(MAX(job), (SELECT job FROM zaip_dim_zaip_agent d WHERE d.zaip_agent=key)) AS job, MAX(occurred_at) AS latest_started_at, COUNT(*) AS invocation_count, COUNT(DISTINCT task_id) AS task_count, SUM(duration_ms) AS total_duration, SUM(CASE WHEN duration_ms IS NULL THEN 1 ELSE 0 END) AS duration_unknown, SUM(CASE WHEN duration_ms IS NULL THEN 0 ELSE duration_ms END) AS duration_known, SUM(source_event_count) AS source_event_count, SUM(total_tokens) AS total_tokens, SUM(cost_usd) AS total_cost_usd, SUM(cost_brl) AS total_cost_brl FROM facts GROUP BY key ORDER BY total_cost_brl DESC, key LIMIT ? OFFSET ?`).all(n,i,r,o);return{total_count:v,totals:E,rows:x}}let a=t==="model"?"model":"provider",s=t==="model"?` UNION ALL SELECT CASE WHEN a.${a} IS NULL OR trim(a.${a})='' OR lower(a.${a}) IN ('unavailable','unknown','mixed') THEN 'unavailable' ELSE a.${a} END,a.total_tokens,a.cost_usd,a.cost_brl FROM zaip_aios_activities a WHERE a.payload_type IS NULL AND a.activity_source_kind<>'agent_run' AND a.occurred_day_sp>=? AND a.occurred_day_sp<=? AND (a.total_tokens IS NOT NULL OR a.cost_usd IS NOT NULL OR a.cost_brl IS NOT NULL)`:"",l=`WITH base AS (SELECT agent_invocation_id, task_id, duration_ms, source_event_count, input_tokens, cached_input_tokens, output_tokens, reasoning_tokens, total_tokens, cost_usd, cost_brl FROM zaip_aios_activities WHERE payload_type IS NULL AND activity_source_kind='agent_run' AND occurred_day_sp>=? AND occurred_day_sp<=?), segment_totals AS (SELECT f.agent_invocation_id,SUM(f.input_tokens) input_tokens,SUM(f.cached_input_tokens) cached_input_tokens,SUM(f.output_tokens) output_tokens,SUM(f.reasoning_tokens) reasoning_tokens,SUM(f.total_tokens) total_tokens,SUM(f.cost_usd) cost_usd,SUM(f.cost_brl) cost_brl FROM cost_invocation_dimension_facts f JOIN base USING(agent_invocation_id) WHERE f.occurred_day_sp>=? AND f.occurred_day_sp<=? AND (f.total_tokens IS NOT NULL OR f.cost_usd IS NOT NULL OR f.cost_brl IS NOT NULL) GROUP BY f.agent_invocation_id), segments AS (SELECT f.agent_invocation_id,CASE WHEN f.${a} IS NULL OR trim(f.${a})='' OR lower(f.${a}) IN ('unavailable','unknown','mixed') THEN 'unavailable' ELSE f.${a} END key,SUM(f.input_tokens) input_tokens,SUM(f.cached_input_tokens) cached_input_tokens,SUM(f.output_tokens) output_tokens,SUM(f.reasoning_tokens) reasoning_tokens,SUM(f.total_tokens) total_tokens,SUM(f.cost_usd) total_cost_usd,SUM(f.cost_brl) total_cost_brl FROM cost_invocation_dimension_facts f JOIN base USING(agent_invocation_id) WHERE f.occurred_day_sp>=? AND f.occurred_day_sp<=? AND (f.total_tokens IS NOT NULL OR f.cost_usd IS NOT NULL OR f.cost_brl IS NOT NULL) GROUP BY f.agent_invocation_id,key UNION ALL SELECT b.agent_invocation_id,'unavailable',b.input_tokens-COALESCE(t.input_tokens,0),b.cached_input_tokens-COALESCE(t.cached_input_tokens,0),b.output_tokens-COALESCE(t.output_tokens,0),b.reasoning_tokens-COALESCE(t.reasoning_tokens,0),b.total_tokens-COALESCE(t.total_tokens,0),b.cost_usd-COALESCE(t.cost_usd,0),b.cost_brl-COALESCE(t.cost_brl,0) FROM base b LEFT JOIN segment_totals t USING(agent_invocation_id) WHERE (b.total_tokens IS NOT NULL OR b.cost_usd IS NOT NULL OR b.cost_brl IS NOT NULL) AND (b.total_tokens<>COALESCE(t.total_tokens,0) OR b.cost_usd<>COALESCE(t.cost_usd,0) OR b.cost_brl<>COALESCE(t.cost_brl,0))), dimension_segments AS (SELECT agent_invocation_id,key,SUM(input_tokens) input_tokens,SUM(cached_input_tokens) cached_input_tokens,SUM(output_tokens) output_tokens,SUM(reasoning_tokens) reasoning_tokens,SUM(total_tokens) total_tokens,SUM(total_cost_usd) total_cost_usd,SUM(total_cost_brl) total_cost_brl FROM segments GROUP BY agent_invocation_id,key), known_dimensions AS (SELECT agent_invocation_id,COUNT(DISTINCT key) dimension_count FROM dimension_segments WHERE key<>'unavailable' GROUP BY agent_invocation_id), filtered_segments AS (SELECT s.*,b.task_id,b.duration_ms,b.source_event_count,d.dimension_count FROM segments s JOIN base b USING(agent_invocation_id) LEFT JOIN known_dimensions d USING(agent_invocation_id)), financial_components AS (SELECT key,total_tokens,total_cost_usd,total_cost_brl FROM filtered_segments${s}), financial AS (SELECT key,SUM(total_tokens) total_tokens,SUM(total_cost_usd) total_cost_usd,SUM(total_cost_brl) total_cost_brl FROM financial_components GROUP BY key), population_dimensions AS (SELECT agent_invocation_id,key,MAX(task_id) task_id,MAX(duration_ms) duration_ms,MAX(source_event_count) source_event_count,MAX(dimension_count) dimension_count FROM filtered_segments GROUP BY agent_invocation_id,key), population_ranked AS (SELECT *,ROW_NUMBER() OVER (PARTITION BY agent_invocation_id ORDER BY key) dimension_rank FROM population_dimensions), population AS (SELECT key,COUNT(*) invocation_count,SUM(duration_ms) total_duration,SUM(source_event_count) source_event_count FROM population_ranked WHERE dimension_rank=1 AND dimension_count=1 GROUP BY key), task_population AS (SELECT key,COUNT(*) task_count FROM (SELECT task_id,key FROM population_dimensions WHERE task_id IS NOT NULL AND key<>'unavailable' GROUP BY task_id,key) GROUP BY key), keys AS (SELECT key FROM financial UNION SELECT key FROM population UNION SELECT key FROM task_population)`,c=t==="model"?[n,i,n,i,n,i,n,i]:[n,i,n,i,n,i],u=t==="model"?"(SELECT SUM(task_count) FROM task_population) AS task_count, 0 AS prd_count, 0 AS spec_count, 0 AS validation_count, 0 AS evidence_count":"(SELECT COUNT(DISTINCT task_id) FROM population_dimensions) task_count",d=t==="model"?"COALESCE(task_population.task_count,0) AS task_count,0 AS prd_count,0 AS spec_count,0 AS validation_count,0 AS evidence_count":"COALESCE(task_population.task_count,0) task_count",p=Number(e.prepare(`${l} SELECT COUNT(*) AS count FROM keys`).get(...c)?.count??0),f=e.prepare(`${l} SELECT (SELECT COUNT(*) FROM population_ranked WHERE dimension_rank=1) invocation_count, ${u}, (SELECT SUM(duration_ms) FROM population_ranked WHERE dimension_rank=1) total_duration, (SELECT SUM(CASE WHEN duration_ms IS NULL THEN 1 ELSE 0 END) FROM population_ranked WHERE dimension_rank=1) duration_unknown, (SELECT SUM(CASE WHEN duration_ms IS NULL THEN 0 ELSE duration_ms END) FROM population_ranked WHERE dimension_rank=1) duration_known, (SELECT SUM(source_event_count) FROM population_ranked WHERE dimension_rank=1) source_event_count, (SELECT SUM(input_tokens) FROM filtered_segments) total_input_tokens, (SELECT SUM(cached_input_tokens) FROM filtered_segments) total_cached_input_tokens, (SELECT SUM(output_tokens) FROM filtered_segments) total_output_tokens, (SELECT SUM(reasoning_tokens) FROM filtered_segments) total_reasoning_tokens, (SELECT SUM(total_tokens) FROM financial) total_tokens, (SELECT SUM(total_cost_usd) FROM financial) total_cost_usd, (SELECT SUM(total_cost_brl) FROM financial) total_cost_brl`).get(...c)??{},S=e.prepare(`${l} SELECT keys.key,keys.key AS label,COALESCE(population.invocation_count,0) invocation_count,${d},population.total_duration,population.source_event_count,financial.total_tokens,financial.total_cost_usd,financial.total_cost_brl FROM keys LEFT JOIN population USING(key) LEFT JOIN task_population USING(key) LEFT JOIN financial USING(key) ORDER BY financial.total_cost_brl DESC,keys.key LIMIT ? OFFSET ?`).all(...c,r,o);if(t==="model"){let h=new Map(Ju(e,n,i).map(F=>[String(F.key),F]));for(let F of S){let Z=h.get(String(F.key));Object.assign(F,{prd_count:Z?.prd_count??0,spec_count:Z?.spec_count??0,validation_count:Z?.validation_count??0,evidence_count:Z?.evidence_count??0})}let v=[...h.values()];Object.assign(f,{prd_count:rr(v,"prd_count")??0,spec_count:rr(v,"spec_count")??0,validation_count:rr(v,"validation_count")??0,evidence_count:rr(v,"evidence_count")??0});let E=["invocation_count","task_count","prd_count","spec_count","validation_count","evidence_count","total_duration","duration_unknown","source_event_count","total_input_tokens","total_cached_input_tokens","total_output_tokens","total_reasoning_tokens","total_tokens","total_cost_usd","total_cost_brl"];for(let F of S){let Z=typeof F.total_duration=="number";for(let W of E)F[W]=typeof F[W]=="number"?F[W]:0;typeof F.duration_known!="number"&&!Z&&(F.duration_known=0)}let x=typeof f.total_duration=="number";for(let F of E)f[F]=typeof f[F]=="number"?f[F]:0;typeof f.duration_known!="number"&&!x&&(f.duration_known=0)}return{total_count:p,totals:f,rows:S}}function Ct(e){if(typeof e!="string")return null;let t=e.trim();return t.length>0&&!["unavailable","unknown","mixed"].includes(t.toLowerCase())?t:null}function Uh(e,t){let n=["model","provider"],i=new Set(e.prepare("SELECT provider FROM zaip_dim_provider").all().map(b=>b.provider)),r=e.prepare(`SELECT activity_row_id, agent_invocation_id, task_id, duration_ms,
299
299
  source_event_count, provider, model, total_tokens, cost_usd, cost_brl, run_id,
300
300
  activity_source_kind, zaip_agent, zaip_agent_persona, zaip_agent_job,
301
301
  execution_id, conversation_id, occurred_at, occurred_day_sp, llm_call_count,
302
302
  input_tokens, cached_input_tokens, output_tokens, reasoning_tokens
303
303
  FROM zaip_aios_activities WHERE payload_type IS NULL`).all(),o=e.prepare(`SELECT agent_invocation_id, provider, model, total_tokens, cost_usd, cost_brl
304
- FROM invocation_usage_segments`).all(),a=new Map(r.filter(b=>typeof b.agent_invocation_id=="string").map(b=>[String(b.agent_invocation_id),b])),s=new Map(n.map(b=>[b,new Map])),l=(b,N)=>{let A=s.get(b),B=A.get(N);if(B!==void 0)return B;let ie={key:N,label:N,invocation_count:0,task_count:0,conversation_count:0,prd_count:0,spec_count:0,test_count:0,evidence_count:0,total_duration:null,source_event_count:null,total_tokens:null,total_cost_usd:null,total_cost_brl:null};return A.set(N,ie),ie},c=(b,N,A)=>{typeof A=="number"&&(b[N]=(b[N]??0)+A)},u=new Map;for(let b of o){let N=String(b.agent_invocation_id??"");if(N.length===0)continue;let A=u.get(N);A===void 0?u.set(N,[b]):A.push(b)}for(let[b,N]of u){let A=a.get(b);if(A!==void 0)for(let B of n){let ie=N.filter(J=>Ct(J[B])!==null&&Ct(J.provider)!==null&&i.has(Ct(J.provider))&&(typeof J.total_tokens=="number"||typeof J.cost_usd=="number"||typeof J.cost_brl=="number")),x=[...new Set(ie.map(J=>Ct(J[B])))];if(x.length===0){let J=l(B,"unavailable");J.invocation_count+=1,typeof A.duration_ms=="number"&&(J.total_duration=(J.total_duration??0)+A.duration_ms),typeof A.source_event_count=="number"&&(J.source_event_count=(J.source_event_count??0)+A.source_event_count),c(J,"total_tokens",A.total_tokens),c(J,"total_cost_usd",A.cost_usd),c(J,"total_cost_brl",A.cost_brl)}for(let J of ie){let K=l(B,Ct(J[B]));c(K,"total_tokens",J.total_tokens),c(K,"total_cost_usd",J.cost_usd),c(K,"total_cost_brl",J.cost_brl)}if(x.length===1){let J=l(B,x[0]);J.invocation_count+=1,typeof A.duration_ms=="number"&&(J.total_duration=(J.total_duration??0)+A.duration_ms),typeof A.source_event_count=="number"&&(J.source_event_count=(J.source_event_count??0)+A.source_event_count)}}}let d=new Map;for(let[b,N]of u){let A=[...new Set(N.filter(x=>{let J=Ct(x.model),K=Ct(x.provider);return J!==null&&K!==null&&i.has(K)&&(typeof x.total_tokens=="number"||typeof x.cost_usd=="number"||typeof x.cost_brl=="number")}).map(x=>Ct(x.model)))],B=a.get(b)?.run_id;if(typeof B!="string")continue;let ie=d.get(B)??new Set;for(let x of A)ie.add(x);d.set(B,ie)}let p=new Map([...d].flatMap(([b,N])=>N.size===1?[[b,[...N][0]]]:[])),f=new Map,S=new Map;for(let b of e.prepare("SELECT entity_kind, id, creation_run_id FROM canonical_work_items WHERE creation_run_id IS NOT NULL").all()){let N=p.get(b.creation_run_id);if(N===void 0)continue;let A=b.entity_kind==="spec"?f:b.entity_kind==="prd"?S:null;if(A===null)continue;let B=A.get(N)??new Set;B.add(b.id),A.set(N,B)}let h=new Map;for(let b of e.prepare("SELECT path, artifact_kind, artifact_run_id FROM files WHERE artifact_run_id IS NOT NULL AND artifact_kind IN ('validation', 'evidence')").all()){if(b.artifact_kind==="validation"&&!b.path.includes("/artifacts/tests/"))continue;let N=p.get(b.artifact_run_id);if(N===void 0)continue;let A=h.get(N)??{tests:0,evidences:0};b.artifact_kind==="validation"?A.tests+=1:A.evidences+=1,h.set(N,A)}for(let[b,N]of h){let A=l("model",b);A.test_count=N.tests,A.evidence_count=N.evidences}for(let[b,N]of f)l("model",b).spec_count=N.size;for(let[b,N]of S)l("model",b).prd_count=N.size;let v=new Map,E=new Map,U=new Map;for(let[b,N]of u){let A=a.get(b),B=A?.task_id;for(let ie of N){let x=Ct(ie.provider),J=Ct(ie.model),K=typeof ie.total_tokens=="number"||typeof ie.cost_usd=="number"||typeof ie.cost_brl=="number";if(x===null||!i.has(x)||!K)continue;if(J!==null&&typeof B=="string"&&A?.activity_source_kind!=="unassisted_turn"){let he=v.get(J)??new Set;he.add(B),v.set(J,he)}let Ze=A?.conversation_id;if(typeof Ze=="string"&&(A?.activity_source_kind==="unassisted_turn"||typeof B!="string")){let he=J??"unavailable",P=E.get(he)??new Set;P.add(Ze),E.set(he,P)}if(typeof B!="string")continue;let ct=U.get(x)??new Set;ct.add(B),U.set(x,ct)}}for(let[b,N]of v)l("model",b).task_count=N.size;for(let[b,N]of E)l("model",b).conversation_count=N.size;for(let[b,N]of U)l("provider",b).task_count=N.size;for(let b of r){if(typeof b.agent_invocation_id=="string"||!(typeof b.total_tokens=="number"||typeof b.cost_usd=="number"||typeof b.cost_brl=="number"))continue;let A=Ct(b.provider);if(A===null||!i.has(A))continue;for(let x of n){let J=Ct(b[x])??"unavailable",K=l(x,J);K.invocation_count+=1,typeof b.duration_ms=="number"&&(K.total_duration=(K.total_duration??0)+b.duration_ms),typeof b.source_event_count=="number"&&(K.source_event_count=(K.source_event_count??0)+b.source_event_count),c(K,"total_tokens",b.total_tokens),c(K,"total_cost_usd",b.cost_usd),c(K,"total_cost_brl",b.cost_brl)}let B=Ct(b.model),ie=b.conversation_id;if(B!==null&&typeof b.task_id=="string"&&b.activity_source_kind!=="unassisted_turn"){let x=v.get(B)??new Set;x.add(b.task_id),v.set(B,x),l("model",B).task_count=x.size}if(typeof ie=="string"&&(b.activity_source_kind==="unassisted_turn"||typeof b.task_id!="string")){let x=B??"unavailable",J=E.get(x)??new Set;J.add(ie),E.set(x,J),l("model",x).conversation_count=J.size}}let F=Object.fromEntries(n.map(b=>[b,[...s.get(b).values()].sort((N,A)=>(A.total_cost_brl??-1)-(N.total_cost_brl??-1)||N.key.localeCompare(A.key))])),Z=["total_input_tokens","total_cached_input_tokens","total_output_tokens","total_reasoning_tokens","total_tokens","total_cost_usd","total_cost_brl"],V=b=>({key:b,id:b,label:b,title:b,status:null,risk:null,persona:null,job:null,latest_started_at:"",first_day:"",last_day:"",occurred_at:"",invocation_count:0,task_count:0,conversation_count:0,prd_count:null,spec_count:null,test_count:null,evidence_count:null,llm_call_count:null,total_duration:null,duration_unknown:0,duration_known:0,source_event_count:null,total_input_tokens:null,total_cached_input_tokens:null,total_output_tokens:null,total_reasoning_tokens:null,total_tokens:null,total_cost_usd:null,total_cost_brl:null}),ce=(b,N,A)=>{typeof A=="number"&&(b[N]=(b[N]??0)+A)},Se=(b,N)=>{b.invocation_count+=1,typeof N.llm_call_count=="number"&&(b.llm_call_count=(b.llm_call_count??0)+N.llm_call_count),typeof N.duration_ms=="number"?(b.total_duration=(b.total_duration??0)+N.duration_ms,b.duration_known+=N.duration_ms):b.duration_unknown+=1,typeof N.source_event_count=="number"&&(b.source_event_count=(b.source_event_count??0)+N.source_event_count);for(let ie of Z)ce(b,ie,N[ie==="total_input_tokens"?"input_tokens":ie==="total_cached_input_tokens"?"cached_input_tokens":ie==="total_output_tokens"?"output_tokens":ie==="total_reasoning_tokens"?"reasoning_tokens":ie==="total_cost_usd"?"cost_usd":ie==="total_cost_brl"?"cost_brl":ie]);let A=typeof N.occurred_at=="string"?N.occurred_at:"",B=typeof N.occurred_day_sp=="string"?N.occurred_day_sp:"";A>b.latest_started_at&&(b.latest_started_at=A),(b.first_day===""||B!==""&&B<b.first_day)&&(b.first_day=B),B>b.last_day&&(b.last_day=B)},O=new Map,D=new Set;for(let b of r){let N=b.zaip_agent,A=typeof b.total_tokens=="number"||typeof b.cost_usd=="number"||typeof b.cost_brl=="number";if(typeof N!="string"||N.length===0||b.activity_source_kind!=="agent_run"&&!A)continue;let B=O.get(N)??{row:V(N),tasks:new Set},ie=typeof b.zaip_agent_persona=="string"?b.zaip_agent_persona:t.get(N)?.persona??null,x=typeof b.zaip_agent_job=="string"?b.zaip_agent_job:t.get(N)?.job??null;ie!==null&&(B.row.persona===null||ie>B.row.persona)&&(B.row.persona=ie),x!==null&&(B.row.job===null||x>B.row.job)&&(B.row.job=x),typeof b.task_id=="string"&&(B.tasks.add(b.task_id),D.add(b.task_id)),Se(B.row,b),O.set(N,B)}let M=[...O.values()].map(({row:b,tasks:N})=>({...b,task_count:N.size})).sort((b,N)=>(N.total_cost_brl??-1)-(b.total_cost_brl??-1)||b.key.localeCompare(N.key)),C=new Map;for(let b of e.prepare("SELECT entity_kind, id, title, status, risk FROM canonical_work_items WHERE entity_kind IN ('task', 'conversation')").all())C.set(`${b.entity_kind}:${b.id}`,{title:b.title??b.id,status:b.status,risk:b.entity_kind==="task"?b.risk:null});for(let b of e.prepare("SELECT id, status FROM canonical_executions").all())C.set(`execution:${b.id}`,{title:b.id,status:b.status,risk:null});let z=[{dimension:"execution",column:"execution_id"},{dimension:"task",column:"task_id"},{dimension:"conversation",column:"conversation_id"}],W=Object.fromEntries(z.map(({dimension:b,column:N})=>{let A=new Map;for(let ie of r){let x=ie[N];if(ie.activity_source_kind!=="agent_run"||typeof x!="string"||x.length===0)continue;let J=A.get(x)??{row:V(x),tasks:new Set},K=C.get(`${b}:${x}`);J.row.title=K?.title??x,J.row.status=K?.status??null,J.row.risk=K?.risk??null,typeof ie.task_id=="string"&&J.tasks.add(ie.task_id),Se(J.row,ie),A.set(x,J)}let B=[...A.values()].map(({row:ie,tasks:x})=>({...ie,task_count:x.size,occurred_at:ie.last_day===""?"":`${ie.last_day}T12:00:00.000Z`})).sort((ie,x)=>(x.total_cost_brl??-1)-(ie.total_cost_brl??-1)||ie.key.localeCompare(x.key));return[b,B]})),de=Object.fromEntries(z.map(({dimension:b,column:N})=>{let A=e.prepare(`SELECT ROUND(SUM(duration_ms)) AS total_duration
304
+ FROM invocation_usage_segments`).all(),a=new Map(r.filter(b=>typeof b.agent_invocation_id=="string").map(b=>[String(b.agent_invocation_id),b])),s=new Map(n.map(b=>[b,new Map])),l=(b,N)=>{let A=s.get(b),B=A.get(N);if(B!==void 0)return B;let oe={key:N,label:N,invocation_count:0,task_count:0,conversation_count:0,prd_count:0,spec_count:0,test_count:0,evidence_count:0,total_duration:null,source_event_count:null,total_tokens:null,total_cost_usd:null,total_cost_brl:null};return A.set(N,oe),oe},c=(b,N,A)=>{typeof A=="number"&&(b[N]=(b[N]??0)+A)},u=new Map;for(let b of o){let N=String(b.agent_invocation_id??"");if(N.length===0)continue;let A=u.get(N);A===void 0?u.set(N,[b]):A.push(b)}for(let[b,N]of u){let A=a.get(b);if(A!==void 0)for(let B of n){let oe=N.filter(J=>Ct(J[B])!==null&&Ct(J.provider)!==null&&i.has(Ct(J.provider))&&(typeof J.total_tokens=="number"||typeof J.cost_usd=="number"||typeof J.cost_brl=="number")),D=[...new Set(oe.map(J=>Ct(J[B])))];if(D.length===0){let J=l(B,"unavailable");J.invocation_count+=1,typeof A.duration_ms=="number"&&(J.total_duration=(J.total_duration??0)+A.duration_ms),typeof A.source_event_count=="number"&&(J.source_event_count=(J.source_event_count??0)+A.source_event_count),c(J,"total_tokens",A.total_tokens),c(J,"total_cost_usd",A.cost_usd),c(J,"total_cost_brl",A.cost_brl)}for(let J of oe){let K=l(B,Ct(J[B]));c(K,"total_tokens",J.total_tokens),c(K,"total_cost_usd",J.cost_usd),c(K,"total_cost_brl",J.cost_brl)}if(D.length===1){let J=l(B,D[0]);J.invocation_count+=1,typeof A.duration_ms=="number"&&(J.total_duration=(J.total_duration??0)+A.duration_ms),typeof A.source_event_count=="number"&&(J.source_event_count=(J.source_event_count??0)+A.source_event_count)}}}let d=new Map;for(let[b,N]of u){let A=[...new Set(N.filter(D=>{let J=Ct(D.model),K=Ct(D.provider);return J!==null&&K!==null&&i.has(K)&&(typeof D.total_tokens=="number"||typeof D.cost_usd=="number"||typeof D.cost_brl=="number")}).map(D=>Ct(D.model)))],B=a.get(b)?.run_id;if(typeof B!="string")continue;let oe=d.get(B)??new Set;for(let D of A)oe.add(D);d.set(B,oe)}let p=new Map([...d].flatMap(([b,N])=>N.size===1?[[b,[...N][0]]]:[])),f=new Map,S=new Map;for(let b of e.prepare("SELECT entity_kind, id, creation_run_id FROM canonical_work_items WHERE creation_run_id IS NOT NULL").all()){let N=p.get(b.creation_run_id);if(N===void 0)continue;let A=b.entity_kind==="spec"?f:b.entity_kind==="prd"?S:null;if(A===null)continue;let B=A.get(N)??new Set;B.add(b.id),A.set(N,B)}let h=new Map;for(let b of e.prepare("SELECT path, artifact_kind, artifact_run_id FROM files WHERE artifact_run_id IS NOT NULL AND artifact_kind IN ('validation', 'evidence')").all()){if(b.artifact_kind==="validation"&&!b.path.includes("/artifacts/tests/"))continue;let N=p.get(b.artifact_run_id);if(N===void 0)continue;let A=h.get(N)??{tests:0,evidences:0};b.artifact_kind==="validation"?A.tests+=1:A.evidences+=1,h.set(N,A)}for(let[b,N]of h){let A=l("model",b);A.test_count=N.tests,A.evidence_count=N.evidences}for(let[b,N]of f)l("model",b).spec_count=N.size;for(let[b,N]of S)l("model",b).prd_count=N.size;let v=new Map,E=new Map,x=new Map;for(let[b,N]of u){let A=a.get(b),B=A?.task_id;for(let oe of N){let D=Ct(oe.provider),J=Ct(oe.model),K=typeof oe.total_tokens=="number"||typeof oe.cost_usd=="number"||typeof oe.cost_brl=="number";if(D===null||!i.has(D)||!K)continue;if(J!==null&&typeof B=="string"&&A?.activity_source_kind!=="unassisted_turn"){let he=v.get(J)??new Set;he.add(B),v.set(J,he)}let Ze=A?.conversation_id;if(typeof Ze=="string"&&(A?.activity_source_kind==="unassisted_turn"||typeof B!="string")){let he=J??"unavailable",P=E.get(he)??new Set;P.add(Ze),E.set(he,P)}if(typeof B!="string")continue;let ct=x.get(D)??new Set;ct.add(B),x.set(D,ct)}}for(let[b,N]of v)l("model",b).task_count=N.size;for(let[b,N]of E)l("model",b).conversation_count=N.size;for(let[b,N]of x)l("provider",b).task_count=N.size;for(let b of r){if(typeof b.agent_invocation_id=="string"||!(typeof b.total_tokens=="number"||typeof b.cost_usd=="number"||typeof b.cost_brl=="number"))continue;let A=Ct(b.provider);if(A===null||!i.has(A))continue;for(let D of n){let J=Ct(b[D])??"unavailable",K=l(D,J);K.invocation_count+=1,typeof b.duration_ms=="number"&&(K.total_duration=(K.total_duration??0)+b.duration_ms),typeof b.source_event_count=="number"&&(K.source_event_count=(K.source_event_count??0)+b.source_event_count),c(K,"total_tokens",b.total_tokens),c(K,"total_cost_usd",b.cost_usd),c(K,"total_cost_brl",b.cost_brl)}let B=Ct(b.model),oe=b.conversation_id;if(B!==null&&typeof b.task_id=="string"&&b.activity_source_kind!=="unassisted_turn"){let D=v.get(B)??new Set;D.add(b.task_id),v.set(B,D),l("model",B).task_count=D.size}if(typeof oe=="string"&&(b.activity_source_kind==="unassisted_turn"||typeof b.task_id!="string")){let D=B??"unavailable",J=E.get(D)??new Set;J.add(oe),E.set(D,J),l("model",D).conversation_count=J.size}}let F=Object.fromEntries(n.map(b=>[b,[...s.get(b).values()].sort((N,A)=>(A.total_cost_brl??-1)-(N.total_cost_brl??-1)||N.key.localeCompare(A.key))])),Z=["total_input_tokens","total_cached_input_tokens","total_output_tokens","total_reasoning_tokens","total_tokens","total_cost_usd","total_cost_brl"],W=b=>({key:b,id:b,label:b,title:b,status:null,risk:null,persona:null,job:null,latest_started_at:"",first_day:"",last_day:"",occurred_at:"",invocation_count:0,task_count:0,conversation_count:0,prd_count:null,spec_count:null,test_count:null,evidence_count:null,llm_call_count:null,total_duration:null,duration_unknown:0,duration_known:0,source_event_count:null,total_input_tokens:null,total_cached_input_tokens:null,total_output_tokens:null,total_reasoning_tokens:null,total_tokens:null,total_cost_usd:null,total_cost_brl:null}),ue=(b,N,A)=>{typeof A=="number"&&(b[N]=(b[N]??0)+A)},be=(b,N)=>{b.invocation_count+=1,typeof N.llm_call_count=="number"&&(b.llm_call_count=(b.llm_call_count??0)+N.llm_call_count),typeof N.duration_ms=="number"?(b.total_duration=(b.total_duration??0)+N.duration_ms,b.duration_known+=N.duration_ms):b.duration_unknown+=1,typeof N.source_event_count=="number"&&(b.source_event_count=(b.source_event_count??0)+N.source_event_count);for(let oe of Z)ue(b,oe,N[oe==="total_input_tokens"?"input_tokens":oe==="total_cached_input_tokens"?"cached_input_tokens":oe==="total_output_tokens"?"output_tokens":oe==="total_reasoning_tokens"?"reasoning_tokens":oe==="total_cost_usd"?"cost_usd":oe==="total_cost_brl"?"cost_brl":oe]);let A=typeof N.occurred_at=="string"?N.occurred_at:"",B=typeof N.occurred_day_sp=="string"?N.occurred_day_sp:"";A>b.latest_started_at&&(b.latest_started_at=A),(b.first_day===""||B!==""&&B<b.first_day)&&(b.first_day=B),B>b.last_day&&(b.last_day=B)},O=new Map,U=new Set;for(let b of r){let N=b.zaip_agent,A=typeof b.total_tokens=="number"||typeof b.cost_usd=="number"||typeof b.cost_brl=="number";if(typeof N!="string"||N.length===0||b.activity_source_kind!=="agent_run"&&!A)continue;let B=O.get(N)??{row:W(N),tasks:new Set},oe=typeof b.zaip_agent_persona=="string"?b.zaip_agent_persona:t.get(N)?.persona??null,D=typeof b.zaip_agent_job=="string"?b.zaip_agent_job:t.get(N)?.job??null;oe!==null&&(B.row.persona===null||oe>B.row.persona)&&(B.row.persona=oe),D!==null&&(B.row.job===null||D>B.row.job)&&(B.row.job=D),typeof b.task_id=="string"&&(B.tasks.add(b.task_id),U.add(b.task_id)),be(B.row,b),O.set(N,B)}let M=[...O.values()].map(({row:b,tasks:N})=>({...b,task_count:N.size})).sort((b,N)=>(N.total_cost_brl??-1)-(b.total_cost_brl??-1)||b.key.localeCompare(N.key)),C=new Map;for(let b of e.prepare("SELECT entity_kind, id, title, status, risk FROM canonical_work_items WHERE entity_kind IN ('task', 'conversation')").all())C.set(`${b.entity_kind}:${b.id}`,{title:b.title??b.id,status:b.status,risk:b.entity_kind==="task"?b.risk:null});for(let b of e.prepare("SELECT id, status FROM canonical_executions").all())C.set(`execution:${b.id}`,{title:b.id,status:b.status,risk:null});let z=[{dimension:"execution",column:"execution_id"},{dimension:"task",column:"task_id"},{dimension:"conversation",column:"conversation_id"}],V=Object.fromEntries(z.map(({dimension:b,column:N})=>{let A=new Map;for(let oe of r){let D=oe[N];if(oe.activity_source_kind!=="agent_run"||typeof D!="string"||D.length===0)continue;let J=A.get(D)??{row:W(D),tasks:new Set},K=C.get(`${b}:${D}`);J.row.title=K?.title??D,J.row.status=K?.status??null,J.row.risk=K?.risk??null,typeof oe.task_id=="string"&&J.tasks.add(oe.task_id),be(J.row,oe),A.set(D,J)}let B=[...A.values()].map(({row:oe,tasks:D})=>({...oe,task_count:D.size,occurred_at:oe.last_day===""?"":`${oe.last_day}T12:00:00.000Z`})).sort((oe,D)=>(D.total_cost_brl??-1)-(oe.total_cost_brl??-1)||oe.key.localeCompare(D.key));return[b,B]})),_e=Object.fromEntries(z.map(({dimension:b,column:N})=>{let A=e.prepare(`SELECT ROUND(SUM(duration_ms)) AS total_duration
305
305
  FROM zaip_aios_activities
306
306
  WHERE payload_type IS NULL AND activity_source_kind='agent_run'
307
- AND ${N} IS NOT NULL`).get();return[b,A.total_duration]})),te=(b,N)=>({entity_count:b.length,invocation_count:b.reduce((A,B)=>A+B.invocation_count,0),task_count:N,total_duration:b.some(A=>A.total_duration!==null)?b.reduce((A,B)=>A+(B.total_duration??0),0):null,duration_unknown:b.reduce((A,B)=>A+B.duration_unknown,0),duration_known:b.reduce((A,B)=>A+B.duration_known,0),source_event_count:b.some(A=>A.source_event_count!==null)?b.reduce((A,B)=>A+(B.source_event_count??0),0):null,total_tokens:b.some(A=>A.total_tokens!==null)?b.reduce((A,B)=>A+(B.total_tokens??0),0):null,total_cost_usd:b.some(A=>A.total_cost_usd!==null)?b.reduce((A,B)=>A+(B.total_cost_usd??0),0):null,total_cost_brl:b.some(A=>A.total_cost_brl!==null)?b.reduce((A,B)=>A+(B.total_cost_brl??0),0):null}),se=(b,N)=>({...te(b,0),total_duration:N});return{...F,remote:{agent:{rows:M,totals:te(M,D.size)},execution:{rows:W.execution,totals:se(W.execution,de.execution)},task:{rows:W.task,totals:se(W.task,de.task)},conversation:{rows:W.conversation,totals:se(W.conversation,de.conversation)}}}}var Ju=`
307
+ AND ${N} IS NOT NULL`).get();return[b,A.total_duration]})),ne=(b,N)=>({entity_count:b.length,invocation_count:b.reduce((A,B)=>A+B.invocation_count,0),task_count:N,total_duration:b.some(A=>A.total_duration!==null)?b.reduce((A,B)=>A+(B.total_duration??0),0):null,duration_unknown:b.reduce((A,B)=>A+B.duration_unknown,0),duration_known:b.reduce((A,B)=>A+B.duration_known,0),source_event_count:b.some(A=>A.source_event_count!==null)?b.reduce((A,B)=>A+(B.source_event_count??0),0):null,total_tokens:b.some(A=>A.total_tokens!==null)?b.reduce((A,B)=>A+(B.total_tokens??0),0):null,total_cost_usd:b.some(A=>A.total_cost_usd!==null)?b.reduce((A,B)=>A+(B.total_cost_usd??0),0):null,total_cost_brl:b.some(A=>A.total_cost_brl!==null)?b.reduce((A,B)=>A+(B.total_cost_brl??0),0):null}),ce=(b,N)=>({...ne(b,0),total_duration:N});return{...F,remote:{agent:{rows:M,totals:ne(M,U.size)},execution:{rows:V.execution,totals:ce(V.execution,_e.execution)},task:{rows:V.task,totals:ce(V.task,_e.task)},conversation:{rows:V.conversation,totals:ce(V.conversation,_e.conversation)}}}}var Ku=`
308
308
  -- Preserve the numeric representation of the old json_object/json_extract
309
309
  -- payload path once per input, before sums. Raw REALs can differ at the last
310
310
  -- significant digits; removing JSON round trips must not change finances.
@@ -369,7 +369,7 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
369
369
  WHERE a.payload_type IS NULL AND a.activity_source_kind <> 'agent_run'
370
370
  AND (a.total_tokens IS NOT NULL OR a.cost_usd IS NOT NULL OR a.cost_brl IS NOT NULL)
371
371
  AND NOT EXISTS (SELECT 1 FROM cost_invocation_dimension_facts f WHERE f.agent_invocation_id='activity:' || a.activity_row_id);
372
- `;var kP={task:{title:"entity.title",status:"entity.status",risk:"entity.risk"},spec:{title:"entity.title",status:"entity.status",risk:"entity.risk"},prd:{title:"entity.title",status:"entity.status",risk:"entity.risk"},execution:{title:"grouped.group_value",status:"entity.status",risk:"NULL"},conversation:{title:"grouped.group_value",status:"entity.status",risk:"NULL"}};function Uh(e,t,n,i){let r=kP[n],o=["group_kind = ?","group_value IS NOT NULL"],a=[n];i.from&&(o.push("day >= ?"),a.push(i.from.slice(0,10))),i.to&&(o.push("day <= ?"),a.push(i.to.slice(0,10))),i.query&&(o.push("group_value LIKE ?"),a.push(`%${i.query}%`));let s=o.join(" AND "),l=Hs(i)?"cost_group_daily_projection":"cost_monitor_group_daily_cache",c=Number(e.prepare(`SELECT COUNT(DISTINCT group_value) AS count FROM ${l} WHERE ${s}`).get(...a).count),u=e.prepare(`SELECT COUNT(DISTINCT group_value) AS entity_count,
372
+ `;var AD={task:{title:"entity.title",status:"entity.status",risk:"entity.risk"},spec:{title:"entity.title",status:"entity.status",risk:"entity.risk"},prd:{title:"entity.title",status:"entity.status",risk:"entity.risk"},execution:{title:"grouped.group_value",status:"entity.status",risk:"NULL"},conversation:{title:"grouped.group_value",status:"entity.status",risk:"NULL"}};function xh(e,t,n,i){let r=AD[n],o=["group_kind = ?","group_value IS NOT NULL"],a=[n];i.from&&(o.push("day >= ?"),a.push(i.from.slice(0,10))),i.to&&(o.push("day <= ?"),a.push(i.to.slice(0,10))),i.query&&(o.push("group_value LIKE ?"),a.push(`%${i.query}%`));let s=o.join(" AND "),l=Ks(i)?"cost_group_daily_projection":"cost_monitor_group_daily_cache",c=Number(e.prepare(`SELECT COUNT(DISTINCT group_value) AS count FROM ${l} WHERE ${s}`).get(...a).count),u=e.prepare(`SELECT COUNT(DISTINCT group_value) AS entity_count,
373
373
  COALESCE(SUM(invocation_count), 0) AS invocation_count,
374
374
  ROUND(SUM(total_duration)) AS total_duration,
375
375
  SUM(total_tokens) AS total_tokens,
@@ -405,7 +405,7 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
405
405
  LEFT JOIN cost_group_entity_projection entity
406
406
  ON entity.group_kind = ? AND entity.group_value = grouped.group_value
407
407
  ORDER BY grouped.total_cost_brl DESC, grouped.group_value
408
- LIMIT ? OFFSET ?`).all(...a,n,d,p);return{data_source:"sqlite_read_model",view:t,offset:p,limit:d,total_count:c,has_more:p+f.length<c,totals:u,rows:f}}function xh(e){e.exec(`
408
+ LIMIT ? OFFSET ?`).all(...a,n,d,p);return{data_source:"sqlite_read_model",view:t,offset:p,limit:d,total_count:c,has_more:p+f.length<c,totals:u,rows:f}}function Dh(e){e.exec(`
409
409
  CREATE TABLE IF NOT EXISTS cost_group_daily_projection AS SELECT * FROM zaip_vw_cost_monitor_group_daily_cache LIMIT 0;
410
410
  DELETE FROM cost_group_daily_projection;
411
411
  INSERT INTO cost_group_daily_projection SELECT * FROM zaip_vw_cost_monitor_group_daily_cache;
@@ -449,7 +449,7 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
449
449
  LEFT JOIN conversations entity ON entity.id = groups.group_value;
450
450
  CREATE UNIQUE INDEX IF NOT EXISTS cost_group_entity_projection_lookup
451
451
  ON cost_group_entity_projection(group_kind, group_value);
452
- `)}function Ku(e){if(!e)return null;if(/^\d{4}-\d{2}-\d{2}$/.test(e))return e;let t=new Date(e);if(Number.isNaN(t.valueOf()))return null;let n=new Intl.DateTimeFormat("en-CA",{timeZone:"America/Sao_Paulo",year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(t);return`${n.find(i=>i.type==="year")?.value}-${n.find(i=>i.type==="month")?.value}-${n.find(i=>i.type==="day")?.value}`}function Ph(e,t){let n=Ku(t.from),i=Ku(t.to);return e.filter(r=>{let o=r.source_started_at??r.source_occurred_at??r.occurred_at,a=typeof o=="string"?Ku(o):null;return a!==null&&(n===null||a>=n)&&(i===null||a<=i)})}var Gu=`WITH usage AS MATERIALIZED (SELECT * FROM invocation_usage)
452
+ `)}function Gu(e){if(!e)return null;if(/^\d{4}-\d{2}-\d{2}$/.test(e))return e;let t=new Date(e);if(Number.isNaN(t.valueOf()))return null;let n=new Intl.DateTimeFormat("en-CA",{timeZone:"America/Sao_Paulo",year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(t);return`${n.find(i=>i.type==="year")?.value}-${n.find(i=>i.type==="month")?.value}-${n.find(i=>i.type==="day")?.value}`}function Ph(e,t){let n=Gu(t.from),i=Gu(t.to);return e.filter(r=>{let o=r.source_started_at??r.source_occurred_at??r.occurred_at,a=typeof o=="string"?Gu(o):null;return a!==null&&(n===null||a>=n)&&(i===null||a<=i)})}var Xu=`WITH usage AS MATERIALIZED (SELECT * FROM invocation_usage)
453
453
  SELECT i.*,
454
454
  COUNT(u.usage_index) AS pricing_segment_count,
455
455
  CASE WHEN COUNT(DISTINCT COALESCE(u.provider, '') || '|' || COALESCE(u.model, '') || '|' || COALESCE(u.service_tier, 'default') || '|' || COALESCE(CAST(u.context_input_multiplier AS TEXT), '') || '|' || COALESCE(CAST(u.context_output_multiplier AS TEXT), '')) > 1 THEN 1 ELSE 0 END AS pricing_mixed,
@@ -486,9 +486,9 @@ SELECT i.*,
486
486
  CASE COUNT(DISTINCT u.pricing_model) WHEN 1 THEN MIN(u.pricing_model) ELSE NULL END AS audit_pricing_model,
487
487
  CASE COUNT(DISTINCT u.pricing_source) WHEN 1 THEN MIN(u.pricing_source) ELSE NULL END AS audit_pricing_source
488
488
  FROM invocations i LEFT JOIN usage u USING(agent_invocation_id)
489
- GROUP BY i.agent_invocation_id`;function Dh(e){let t=Gu.replaceAll(/\binvocation_usage\b/g,"zaip_vw_invocation_usage").replaceAll(/\binvocations\b/g,"zaip_vw_invocations").replaceAll(/\bfiles\b/g,"zaip_vw_files");return e.prepare(t).all()}function jh(e,t,n,i){let r=performance.now(),o=i();if(e){let a=Math.round(performance.now()-r);t(n,82,`${n}: ${a}ms.`),process.stderr.write(`${JSON.stringify({event:"dashboard_sqlite_first_fold",phase:n,elapsed_ms:a})}
490
- `)}return o}function zh(e,t){let n=performance.now(),i=t();return process.env.ZAIP_DASHBOARD_LAUNCH_PROGRESS==="1"&&process.stderr.write(`${JSON.stringify({event:"dashboard_sqlite_first_fold_query",phase:e,elapsed_ms:Math.round(performance.now()-n)})}
491
- `),i}var Ye=(e,t=0)=>typeof e=="number"?e:t,Ke=e=>typeof e=="number"?e:null;function Js(e,t){let n=e.prepare("SELECT payload_json FROM zaip_aios_activities WHERE payload_type=? ORDER BY recorded_at DESC LIMIT 1").get(t);if(typeof n?.payload_json!="string")return null;try{return JSON.parse(n.payload_json)}catch{return null}}function Fh(e,t,n){let i=Js(e,"first_fold_all_time_cache");if(i!==null)return i;let r=(u,d)=>zh(u,d),o=n===void 0?e.prepare("SELECT * FROM zaip_vw_first_fold_overview_all_time").get():null,a=n===void 0?e.prepare("SELECT status, task_count FROM zaip_vw_first_fold_task_status_all_time").all():null,s=n===void 0?e.prepare("SELECT risk, task_count FROM zaip_vw_first_fold_task_risk_all_time").all():null,l=r("first_fold_all_time_top_tasks",()=>e.prepare("SELECT * FROM zaip_vw_first_fold_top_tasks_all_time ORDER BY rank").all()),c=u=>{let d=r(`first_fold_${u}_status`,()=>e.prepare(`SELECT stage, entity_count FROM zaip_vw_first_fold_${u}_status_all_time`).all()),p=r(`first_fold_${u}_classification`,()=>e.prepare(`SELECT classification, entity_count FROM zaip_vw_first_fold_${u}_classification_all_time`).all()),f=r(`first_fold_${u}_metrics`,()=>e.prepare(`SELECT * FROM zaip_vw_first_fold_${u}_metrics_all_time`).get()),S=r(`first_fold_${u}_top_entities`,()=>e.prepare(`SELECT * FROM zaip_vw_first_fold_top_${u}s_all_time ORDER BY rank`).all());return{status_counts:Object.fromEntries(d.map(h=>[h.stage,Number(h.entity_count)])),classification_counts:Object.fromEntries(p.map(h=>[h.classification,Number(h.entity_count)])),entity_count:Ye(f.entity_count),total_run_count:Ye(f.total_run_count),total_duration_ms:Ke(f.total_duration_ms),total_tokens:Ke(f.total_tokens),total_cost_usd:Ke(f.total_cost_usd),total_cost_brl:Ke(f.total_cost_brl),average_duration_ms:Ke(f.average_duration_ms),average_tokens:Ke(f.average_tokens),average_cost_usd:Ke(f.average_cost_usd),average_cost_brl:Ke(f.average_cost_brl),latest_created_at:typeof f.latest_created_at=="string"?f.latest_created_at:null,top_entities:S}};return{aggregate:n?.aggregate??{days:typeof o?.start_day=="string"&&typeof o.end_day=="string"?t():0,start_day:typeof o?.start_day=="string"?o.start_day:null,end_day:typeof o?.end_day=="string"?o.end_day:null,task_count:Ye(o?.task_count),completed_task_count:Ye(o?.completed_task_count),spec_count:Ye(o?.spec_count),completed_spec_count:Ye(o?.completed_spec_count),prd_count:Ye(o?.prd_count),completed_prd_count:Ye(o?.completed_prd_count),total_run_count:Ye(o?.total_run_count),agent_invocation_count:Ye(o?.agent_invocation_count),llm_call_count:Ke(o?.llm_call_count),duration_ms:Ke(o?.total_duration_ms),total_tokens:Ke(o?.total_tokens),total_cost_usd:Ke(o?.total_cost_usd),cost_brl:Ke(o?.total_cost_brl),execution_day_count:Ye(o?.execution_day_count),latest_task_created_at:typeof o?.latest_task_created_at=="string"?o.latest_task_created_at:null},task_status_counts:n?.task_status_counts??Object.fromEntries(a?.map(u=>[u.status,Number(u.task_count)])??[]),task_risk_counts:n?.task_risk_counts??Object.fromEntries(s?.map(u=>[u.risk,Number(u.task_count)])??[]),task_metrics:n?{average_duration_ms_per_task:n.aggregate.task_count===0||n.aggregate.duration_ms===null?null:n.aggregate.duration_ms/n.aggregate.task_count,average_tokens_per_task:n.aggregate.task_count===0||n.aggregate.total_tokens===null?null:n.aggregate.total_tokens/n.aggregate.task_count,average_cost_usd_per_task:n.aggregate.task_count===0||n.aggregate.total_cost_usd===null?null:n.aggregate.total_cost_usd/n.aggregate.task_count,average_cost_brl_per_task:n.aggregate.task_count===0||n.aggregate.cost_brl===null?null:n.aggregate.cost_brl/n.aggregate.task_count,latest_task_created_at:n.aggregate.latest_task_created_at}:(()=>{let u=e.prepare("SELECT * FROM zaip_vw_first_fold_task_metrics_all_time").get();return{average_duration_ms_per_task:Ke(u.average_duration_ms_per_task),average_tokens_per_task:Ke(u.average_tokens_per_task),average_cost_usd_per_task:Ke(u.average_cost_usd_per_task),average_cost_brl_per_task:Ke(u.average_cost_brl_per_task),latest_task_created_at:typeof u.latest_task_created_at=="string"?u.latest_task_created_at:null}})(),top_tasks:l,macro_metrics:{specs:c("spec"),prds:c("prd")}}}function Zh(e,t){let n=Js(e,"first_fold_viewport_cache");if(n!==null)return n;let i=performance.now(),r=e.prepare(`WITH totals AS (
489
+ GROUP BY i.agent_invocation_id`;function jh(e){let t=Xu.replaceAll(/\binvocation_usage\b/g,"zaip_vw_invocation_usage").replaceAll(/\binvocations\b/g,"zaip_vw_invocations").replaceAll(/\bfiles\b/g,"zaip_vw_files");return e.prepare(t).all()}function zh(e,t,n,i){let r=performance.now(),o=i();if(e){let a=Math.round(performance.now()-r);t(n,82,`${n}: ${a}ms.`),process.stderr.write(`${JSON.stringify({event:"dashboard_sqlite_first_fold",phase:n,elapsed_ms:a})}
490
+ `)}return o}function Fh(e,t){let n=performance.now(),i=t();return process.env.ZAIP_DASHBOARD_LAUNCH_PROGRESS==="1"&&process.stderr.write(`${JSON.stringify({event:"dashboard_sqlite_first_fold_query",phase:e,elapsed_ms:Math.round(performance.now()-n)})}
491
+ `),i}var Ye=(e,t=0)=>typeof e=="number"?e:t,Ke=e=>typeof e=="number"?e:null;function Gs(e,t){let n=e.prepare("SELECT payload_json FROM zaip_aios_activities WHERE payload_type=? ORDER BY recorded_at DESC LIMIT 1").get(t);if(typeof n?.payload_json!="string")return null;try{return JSON.parse(n.payload_json)}catch{return null}}function Zh(e,t,n){let i=Gs(e,"first_fold_all_time_cache");if(i!==null)return i;let r=(u,d)=>Fh(u,d),o=n===void 0?e.prepare("SELECT * FROM zaip_vw_first_fold_overview_all_time").get():null,a=n===void 0?e.prepare("SELECT status, task_count FROM zaip_vw_first_fold_task_status_all_time").all():null,s=n===void 0?e.prepare("SELECT risk, task_count FROM zaip_vw_first_fold_task_risk_all_time").all():null,l=r("first_fold_all_time_top_tasks",()=>e.prepare("SELECT * FROM zaip_vw_first_fold_top_tasks_all_time ORDER BY rank").all()),c=u=>{let d=r(`first_fold_${u}_status`,()=>e.prepare(`SELECT stage, entity_count FROM zaip_vw_first_fold_${u}_status_all_time`).all()),p=r(`first_fold_${u}_classification`,()=>e.prepare(`SELECT classification, entity_count FROM zaip_vw_first_fold_${u}_classification_all_time`).all()),f=r(`first_fold_${u}_metrics`,()=>e.prepare(`SELECT * FROM zaip_vw_first_fold_${u}_metrics_all_time`).get()),S=r(`first_fold_${u}_top_entities`,()=>e.prepare(`SELECT * FROM zaip_vw_first_fold_top_${u}s_all_time ORDER BY rank`).all());return{status_counts:Object.fromEntries(d.map(h=>[h.stage,Number(h.entity_count)])),classification_counts:Object.fromEntries(p.map(h=>[h.classification,Number(h.entity_count)])),entity_count:Ye(f.entity_count),total_run_count:Ye(f.total_run_count),total_duration_ms:Ke(f.total_duration_ms),total_tokens:Ke(f.total_tokens),total_cost_usd:Ke(f.total_cost_usd),total_cost_brl:Ke(f.total_cost_brl),average_duration_ms:Ke(f.average_duration_ms),average_tokens:Ke(f.average_tokens),average_cost_usd:Ke(f.average_cost_usd),average_cost_brl:Ke(f.average_cost_brl),latest_created_at:typeof f.latest_created_at=="string"?f.latest_created_at:null,top_entities:S}};return{aggregate:n?.aggregate??{days:typeof o?.start_day=="string"&&typeof o.end_day=="string"?t():0,start_day:typeof o?.start_day=="string"?o.start_day:null,end_day:typeof o?.end_day=="string"?o.end_day:null,task_count:Ye(o?.task_count),completed_task_count:Ye(o?.completed_task_count),spec_count:Ye(o?.spec_count),completed_spec_count:Ye(o?.completed_spec_count),prd_count:Ye(o?.prd_count),completed_prd_count:Ye(o?.completed_prd_count),total_run_count:Ye(o?.total_run_count),agent_invocation_count:Ye(o?.agent_invocation_count),llm_call_count:Ke(o?.llm_call_count),duration_ms:Ke(o?.total_duration_ms),total_tokens:Ke(o?.total_tokens),total_cost_usd:Ke(o?.total_cost_usd),cost_brl:Ke(o?.total_cost_brl),execution_day_count:Ye(o?.execution_day_count),latest_task_created_at:typeof o?.latest_task_created_at=="string"?o.latest_task_created_at:null},task_status_counts:n?.task_status_counts??Object.fromEntries(a?.map(u=>[u.status,Number(u.task_count)])??[]),task_risk_counts:n?.task_risk_counts??Object.fromEntries(s?.map(u=>[u.risk,Number(u.task_count)])??[]),task_metrics:n?{average_duration_ms_per_task:n.aggregate.task_count===0||n.aggregate.duration_ms===null?null:n.aggregate.duration_ms/n.aggregate.task_count,average_tokens_per_task:n.aggregate.task_count===0||n.aggregate.total_tokens===null?null:n.aggregate.total_tokens/n.aggregate.task_count,average_cost_usd_per_task:n.aggregate.task_count===0||n.aggregate.total_cost_usd===null?null:n.aggregate.total_cost_usd/n.aggregate.task_count,average_cost_brl_per_task:n.aggregate.task_count===0||n.aggregate.cost_brl===null?null:n.aggregate.cost_brl/n.aggregate.task_count,latest_task_created_at:n.aggregate.latest_task_created_at}:(()=>{let u=e.prepare("SELECT * FROM zaip_vw_first_fold_task_metrics_all_time").get();return{average_duration_ms_per_task:Ke(u.average_duration_ms_per_task),average_tokens_per_task:Ke(u.average_tokens_per_task),average_cost_usd_per_task:Ke(u.average_cost_usd_per_task),average_cost_brl_per_task:Ke(u.average_cost_brl_per_task),latest_task_created_at:typeof u.latest_task_created_at=="string"?u.latest_task_created_at:null}})(),top_tasks:l,macro_metrics:{specs:c("spec"),prds:c("prd")}}}function qh(e,t){let n=Gs(e,"first_fold_viewport_cache");if(n!==null)return n;let i=performance.now(),r=e.prepare(`WITH totals AS (
492
492
  SELECT SUM(CASE WHEN activity_source_kind='agent_run' THEN 1 ELSE 0 END) AS agent_invocation_count,
493
493
  SUM(llm_call_count) AS llm_call_count, SUM(total_tokens) AS total_tokens,
494
494
  SUM(cost_usd) AS total_cost_usd, SUM(cost_brl) AS total_cost_brl FROM activities
@@ -531,17 +531,17 @@ SELECT i.*,
531
531
  )
532
532
  SELECT totals.*, run_totals.*, duration_totals.*, bounds.*, item_totals.*, task_status.*, task_risk.*
533
533
  FROM totals CROSS JOIN run_totals CROSS JOIN duration_totals CROSS JOIN bounds
534
- CROSS JOIN item_totals CROSS JOIN task_status CROSS JOIN task_risk`).get();return process.env.ZAIP_DASHBOARD_PROFILE_FIRST_FOLD==="1"&&(t.viewport_overview=Math.round((performance.now()-i)*10)/10,console.info(JSON.stringify({event:"dashboard_first_fold_select",select:"viewport_overview",elapsed_ms:t.viewport_overview}))),{aggregate:{days:Ye(r.day_count),start_day:typeof r.start_day=="string"?r.start_day:null,end_day:typeof r.end_day=="string"?r.end_day:null,task_count:Ye(r.task_count),completed_task_count:Ye(r.completed_task_count),spec_count:Ye(r.spec_count),completed_spec_count:Ye(r.completed_spec_count),prd_count:Ye(r.prd_count),completed_prd_count:Ye(r.completed_prd_count),total_run_count:Ye(r.total_run_count),agent_invocation_count:Ye(r.agent_invocation_count),llm_call_count:Ke(r.llm_call_count),duration_ms:Ke(r.total_duration_ms),total_tokens:Ke(r.total_tokens),total_cost_usd:Ke(r.total_cost_usd),cost_brl:Ke(r.total_cost_brl),execution_day_count:Ye(r.execution_day_count),latest_task_created_at:typeof r.latest_task_created_at=="string"?r.latest_task_created_at:null},task_status_counts:typeof r.task_status_json=="string"?JSON.parse(r.task_status_json):{},task_risk_counts:typeof r.task_risk_json=="string"?JSON.parse(r.task_risk_json):{}}}function qh(e,t){return Js(e,"first_fold_all_time_board_cache")??t()}function Vh(e){return e.prepare("SELECT * FROM zaip_vw_first_fold_top_tasks_all_time ORDER BY rank").all()}function Wh(e,t,n){let i=t;if(i===void 0){let u=Js(e,"first_fold_monthly_quick_cache");i=u!==null&&typeof u.from_day=="string"&&typeof u.to_day=="string"&&u.aggregate!==void 0&&u.pages!==void 0&&Array.isArray(u.top_tasks)?u:null}if(i===null)return{cache:i,result:null};let r=n.from?.slice(0,10)??null,o=n.to?.slice(0,10)??null,a=r===i.from_day&&o===i.to_day,s=r===i.from_day&&o!==null&&o>i.to_day&&o.slice(0,7)===i.from_day.slice(0,7),l=i.source_latest_day===null||i.source_latest_day<=i.to_day;if(a||s&&l)return{cache:i,result:i};let c=i.source_latest_day===null?i.from_day.slice(0,7):i.source_latest_day.slice(0,7);return r===null||o===null||r.slice(0,7)<=c?{cache:i,result:null}:{cache:i,result:{from_day:r,to_day:o,source_latest_day:i.source_latest_day,aggregate:{days:0,total_run_count:0,agent_invocation_count:0,llm_call_count:null,duration_ms:null,total_tokens:null,cost_brl:null,execution_day_count:0},pages:{task:[],spec:[],prd:[]},top_tasks:[]}}}var Jh=require("node:crypto"),OP=require("node:sqlite"),Ks=[["first_fold_viewport_cache","first_fold_viewport_cache:all_time"],["first_fold_all_time_cache","first_fold_all_time_cache:all_time"],["first_fold_all_time_board_cache","first_fold_all_time_board_cache:all_time"],["cost_monitor_summary_cache","cost_monitor_summary_cache:all_time"],["cost_monitor_summary_month_cache","cost_monitor_summary_month_cache:current"],["first_fold_monthly_quick_cache","first_fold_monthly_quick_cache:default"]];function Bh(e,t){let n=e.prepare("SELECT payload_json FROM zaip_aios_activities WHERE payload_type=? ORDER BY recorded_at DESC LIMIT 1").get(t);if(typeof n?.payload_json!="string")return null;try{let i=JSON.parse(n.payload_json);return i!==null&&typeof i=="object"?i:null}catch{return null}}function wP(e,t,n){let i="json_extract(payload_json, '$.occurred_day_sp')",r=t&&n?` AND ${i} >= ? AND ${i} <= ?`:"",o=e.prepare(`SELECT json_extract(payload_json, '$.entity_kind') AS kind, COUNT(*) AS count
535
- FROM zaip_aios_activities WHERE payload_type='work_item'${r} GROUP BY kind`).all(...t&&n?[t,n]:[]);return Object.fromEntries(o.map(a=>[a.kind,Number(a.count)]))}function Hh(e,t,n=!1){let i=typeof t.from_day=="string"?t.from_day:void 0,r=typeof t.to_day=="string"?t.to_day:void 0;if(n&&(!i||!r))return!1;let o=wP(e,n?i:void 0,n?r:void 0);return["task","spec","prd"].every(a=>Array.isArray(t.pages?.[a])&&t.pages?.[a].length===(o[a]??0))}function Kh(e){if(Number(e.prepare(`SELECT COUNT(DISTINCT payload_type) AS count FROM zaip_aios_activities
536
- WHERE payload_type IN (${Ks.map(()=>"?").join(", ")})`).get(...Ks.map(([r])=>r)).count??0)!==Ks.length)return!1;let n=Bh(e,"first_fold_all_time_board_cache"),i=Bh(e,"first_fold_monthly_quick_cache");return n!==null&&i!==null&&Hh(e,n)&&Hh(e,i,!0)}function Gh(e,t){let n=e.prepare(`INSERT INTO zaip_aios_activities(
534
+ CROSS JOIN item_totals CROSS JOIN task_status CROSS JOIN task_risk`).get();return process.env.ZAIP_DASHBOARD_PROFILE_FIRST_FOLD==="1"&&(t.viewport_overview=Math.round((performance.now()-i)*10)/10,console.info(JSON.stringify({event:"dashboard_first_fold_select",select:"viewport_overview",elapsed_ms:t.viewport_overview}))),{aggregate:{days:Ye(r.day_count),start_day:typeof r.start_day=="string"?r.start_day:null,end_day:typeof r.end_day=="string"?r.end_day:null,task_count:Ye(r.task_count),completed_task_count:Ye(r.completed_task_count),spec_count:Ye(r.spec_count),completed_spec_count:Ye(r.completed_spec_count),prd_count:Ye(r.prd_count),completed_prd_count:Ye(r.completed_prd_count),total_run_count:Ye(r.total_run_count),agent_invocation_count:Ye(r.agent_invocation_count),llm_call_count:Ke(r.llm_call_count),duration_ms:Ke(r.total_duration_ms),total_tokens:Ke(r.total_tokens),total_cost_usd:Ke(r.total_cost_usd),cost_brl:Ke(r.total_cost_brl),execution_day_count:Ye(r.execution_day_count),latest_task_created_at:typeof r.latest_task_created_at=="string"?r.latest_task_created_at:null},task_status_counts:typeof r.task_status_json=="string"?JSON.parse(r.task_status_json):{},task_risk_counts:typeof r.task_risk_json=="string"?JSON.parse(r.task_risk_json):{}}}function Vh(e,t){return Gs(e,"first_fold_all_time_board_cache")??t()}function Wh(e){return e.prepare("SELECT * FROM zaip_vw_first_fold_top_tasks_all_time ORDER BY rank").all()}function Bh(e,t,n){let i=t;if(i===void 0){let u=Gs(e,"first_fold_monthly_quick_cache");i=u!==null&&typeof u.from_day=="string"&&typeof u.to_day=="string"&&u.aggregate!==void 0&&u.pages!==void 0&&Array.isArray(u.top_tasks)?u:null}if(i===null)return{cache:i,result:null};let r=n.from?.slice(0,10)??null,o=n.to?.slice(0,10)??null,a=r===i.from_day&&o===i.to_day,s=r===i.from_day&&o!==null&&o>i.to_day&&o.slice(0,7)===i.from_day.slice(0,7),l=i.source_latest_day===null||i.source_latest_day<=i.to_day;if(a||s&&l)return{cache:i,result:i};let c=i.source_latest_day===null?i.from_day.slice(0,7):i.source_latest_day.slice(0,7);return r===null||o===null||r.slice(0,7)<=c?{cache:i,result:null}:{cache:i,result:{from_day:r,to_day:o,source_latest_day:i.source_latest_day,aggregate:{days:0,total_run_count:0,agent_invocation_count:0,llm_call_count:null,duration_ms:null,total_tokens:null,cost_brl:null,execution_day_count:0},pages:{task:[],spec:[],prd:[]},top_tasks:[]}}}var Kh=require("node:crypto"),TD=require("node:sqlite"),Xs=[["first_fold_viewport_cache","first_fold_viewport_cache:all_time"],["first_fold_all_time_cache","first_fold_all_time_cache:all_time"],["first_fold_all_time_board_cache","first_fold_all_time_board_cache:all_time"],["cost_monitor_summary_cache","cost_monitor_summary_cache:all_time"],["cost_monitor_summary_month_cache","cost_monitor_summary_month_cache:current"],["first_fold_monthly_quick_cache","first_fold_monthly_quick_cache:default"]];function Hh(e,t){let n=e.prepare("SELECT payload_json FROM zaip_aios_activities WHERE payload_type=? ORDER BY recorded_at DESC LIMIT 1").get(t);if(typeof n?.payload_json!="string")return null;try{let i=JSON.parse(n.payload_json);return i!==null&&typeof i=="object"?i:null}catch{return null}}function ND(e,t,n){let i="json_extract(payload_json, '$.occurred_day_sp')",r=t&&n?` AND ${i} >= ? AND ${i} <= ?`:"",o=e.prepare(`SELECT json_extract(payload_json, '$.entity_kind') AS kind, COUNT(*) AS count
535
+ FROM zaip_aios_activities WHERE payload_type='work_item'${r} GROUP BY kind`).all(...t&&n?[t,n]:[]);return Object.fromEntries(o.map(a=>[a.kind,Number(a.count)]))}function Jh(e,t,n=!1){let i=typeof t.from_day=="string"?t.from_day:void 0,r=typeof t.to_day=="string"?t.to_day:void 0;if(n&&(!i||!r))return!1;let o=ND(e,n?i:void 0,n?r:void 0);return["task","spec","prd"].every(a=>Array.isArray(t.pages?.[a])&&t.pages?.[a].length===(o[a]??0))}function Gh(e){if(Number(e.prepare(`SELECT COUNT(DISTINCT payload_type) AS count FROM zaip_aios_activities
536
+ WHERE payload_type IN (${Xs.map(()=>"?").join(", ")})`).get(...Xs.map(([r])=>r)).count??0)!==Xs.length)return!1;let n=Hh(e,"first_fold_all_time_board_cache"),i=Hh(e,"first_fold_monthly_quick_cache");return n!==null&&i!==null&&Jh(e,n)&&Jh(e,i,!0)}function Xh(e,t){let n=e.prepare(`INSERT INTO zaip_aios_activities(
537
537
  activity_row_id, activity_source_kind, activity_key, source_path, source_hash,
538
538
  recorded_at, run_role, root_run_id, payload_type, payload_json
539
- ) VALUES (?, 'technical_payload', ?, ?, '', datetime('now'), 'technical', 'technical', ?, ?)`);for(let[i,r]of Ks){let o=e.prepare("SELECT activity_row_id,payload_json FROM zaip_aios_activities WHERE payload_type=? AND activity_key=?").get(i,r);if(o){o.payload_json!==t[i]&&e.prepare("UPDATE zaip_aios_activities SET payload_json=?,recorded_at=datetime('now') WHERE activity_row_id=?").run(t[i],o.activity_row_id);continue}n.run(`TECH-${(0,Jh.randomUUID)().toLowerCase()}`,r,`sqlite://${i}/${r.split(":")[1]}`,i,t[i])}}var Xu=require("node:crypto"),Gs=class{constructor(t){this.database=t}database;read(t,n,i,r){let o=`parsed_source:${t}:${n}`,a=this.database.prepare("SELECT source_hash, payload_json FROM zaip_aios_activities WHERE payload_type='parsed_source' AND activity_key=?").get(o);if(a?.source_hash===i)try{return JSON.parse(a.payload_json)}catch{}let s=r();return this.database.prepare("DELETE FROM zaip_aios_activities WHERE payload_type='parsed_source' AND activity_key=?").run(o),this.database.prepare(`INSERT INTO zaip_aios_activities(
539
+ ) VALUES (?, 'technical_payload', ?, ?, '', datetime('now'), 'technical', 'technical', ?, ?)`);for(let[i,r]of Xs){let o=e.prepare("SELECT activity_row_id,payload_json FROM zaip_aios_activities WHERE payload_type=? AND activity_key=?").get(i,r);if(o){o.payload_json!==t[i]&&e.prepare("UPDATE zaip_aios_activities SET payload_json=?,recorded_at=datetime('now') WHERE activity_row_id=?").run(t[i],o.activity_row_id);continue}n.run(`TECH-${(0,Kh.randomUUID)().toLowerCase()}`,r,`sqlite://${i}/${r.split(":")[1]}`,i,t[i])}}var Yu=require("node:crypto"),Ys=class{constructor(t){this.database=t}database;read(t,n,i,r){let o=`parsed_source:${t}:${n}`,a=this.database.prepare("SELECT source_hash, payload_json FROM zaip_aios_activities WHERE payload_type='parsed_source' AND activity_key=?").get(o);if(a?.source_hash===i)try{return JSON.parse(a.payload_json)}catch{}let s=r();return this.database.prepare("DELETE FROM zaip_aios_activities WHERE payload_type='parsed_source' AND activity_key=?").run(o),this.database.prepare(`INSERT INTO zaip_aios_activities(
540
540
  activity_row_id, activity_source_kind, activity_key, source_path, source_hash,
541
541
  recorded_at, run_role, root_run_id, payload_type, payload_json
542
- ) VALUES (?, 'technical_payload', ?, ?, ?, ?, 'technical', 'technical', 'parsed_source', ?)`).run(`TECH-${(0,Xu.randomUUID)()}`,o,n,i,new Date().toISOString(),JSON.stringify(s)),s}};function Xs(e,t,n){let i=new Map(e.prepare("SELECT activity_row_id,activity_key,payload_json FROM zaip_aios_activities WHERE payload_type=?").all(t).map(l=>[l.activity_key,l])),r=e.prepare(`INSERT INTO zaip_aios_activities(
542
+ ) VALUES (?, 'technical_payload', ?, ?, ?, ?, 'technical', 'technical', 'parsed_source', ?)`).run(`TECH-${(0,Yu.randomUUID)()}`,o,n,i,new Date().toISOString(),JSON.stringify(s)),s}};function Qs(e,t,n){let i=new Map(e.prepare("SELECT activity_row_id,activity_key,payload_json FROM zaip_aios_activities WHERE payload_type=?").all(t).map(l=>[l.activity_key,l])),r=e.prepare(`INSERT INTO zaip_aios_activities(
543
543
  activity_row_id,activity_source_kind,activity_key,source_path,source_hash,recorded_at,run_role,root_run_id,payload_type,payload_json,occurred_day_sp
544
- ) VALUES (?,'technical_payload',?,?,'',?,'technical','technical',?,?,?)`),o=e.prepare("UPDATE zaip_aios_activities SET payload_json=?,recorded_at=?,occurred_day_sp=? WHERE activity_row_id=?"),a=e.prepare("DELETE FROM zaip_aios_activities WHERE activity_row_id=?"),s=typeof n=="string"?e.prepare(n).all():n;for(let l of s){let c=`${t}:${l.row_key}`,u=i.get(c),d=l.payload_json;if(t==="source_state"&&u){let p=JSON.parse(d),f=JSON.parse(u.payload_json);p.source_hash===f.source_hash&&(p.last_processed_at=f.last_processed_at),d=JSON.stringify(p)}u?d!==u.payload_json&&o.run(d,new Date().toISOString(),l.occurred_day_sp??null,u.activity_row_id):r.run(`TECH-${(0,Xu.randomUUID)()}`,c,`sqlite://${t}`,new Date().toISOString(),t,d,l.occurred_day_sp??null),i.delete(c)}for(let l of i.values())a.run(l.activity_row_id)}function Xh(e,t,n){let i=new Set(n),r=[...e,...t].filter(a=>i.has(a.activityRowId)),o=!0;for(;o;){o=!1;for(let a of t)i.has(a.activityRowId)||r.some(s=>a.startMs<s.endMs&&a.endMs>s.startMs)&&(i.add(a.activityRowId),r.push(a),o=!0)}return{ids:i,intervals:t.filter(a=>i.has(a.activityRowId))}}function Yh(e){let t=`
544
+ ) VALUES (?,'technical_payload',?,?,'',?,'technical','technical',?,?,?)`),o=e.prepare("UPDATE zaip_aios_activities SET payload_json=?,recorded_at=?,occurred_day_sp=? WHERE activity_row_id=?"),a=e.prepare("DELETE FROM zaip_aios_activities WHERE activity_row_id=?"),s=typeof n=="string"?e.prepare(n).all():n;for(let l of s){let c=`${t}:${l.row_key}`,u=i.get(c),d=l.payload_json;if(t==="source_state"&&u){let p=JSON.parse(d),f=JSON.parse(u.payload_json);p.source_hash===f.source_hash&&(p.last_processed_at=f.last_processed_at),d=JSON.stringify(p)}u?d!==u.payload_json&&o.run(d,new Date().toISOString(),l.occurred_day_sp??null,u.activity_row_id):r.run(`TECH-${(0,Yu.randomUUID)()}`,c,`sqlite://${t}`,new Date().toISOString(),t,d,l.occurred_day_sp??null),i.delete(c)}for(let l of i.values())a.run(l.activity_row_id)}function Yh(e,t,n){let i=new Set(n),r=[...e,...t].filter(a=>i.has(a.activityRowId)),o=!0;for(;o;){o=!1;for(let a of t)i.has(a.activityRowId)||r.some(s=>a.startMs<s.endMs&&a.endMs>s.startMs)&&(i.add(a.activityRowId),r.push(a),o=!0)}return{ids:i,intervals:t.filter(a=>i.has(a.activityRowId))}}function Qh(e){let t=`
545
545
  WITH changes AS MATERIALIZED (SELECT * FROM zaip_vw_canonical_changes),
546
546
  work_items AS MATERIALIZED (SELECT * FROM zaip_vw_canonical_work_items),
547
547
  fallback_changes AS MATERIALIZED (
@@ -564,9 +564,9 @@ SELECT i.*,
564
564
  DELETE FROM operations_work_projection;
565
565
  INSERT INTO operations_work_projection ${t};
566
566
  CREATE INDEX IF NOT EXISTS operations_work_projection_order ON operations_work_projection(occurred_at DESC, id DESC);
567
- `)}function AP(e){if(e===null||typeof e!="object")return!1;let t=e.pages;return t===null||typeof t!="object"?!1:["task","spec","prd"].every(n=>Array.isArray(t[n]))}function TP(e,t){return t!=="task"?t:e.kind==="task"||e.kind==="standalone-task"?e.kind:typeof e.spec_id=="string"&&e.spec_id.length>0||e.origin==="spec"||e.origin==="prd"?"task":"standalone-task"}function NP(e,t,n){if(n.kind&&n.kind!=="all"&&!(n.kind==="all-tasks"?t==="task"||t==="standalone-task":t===n.kind))return!1;if(n.query){let i=n.query.toLowerCase();if(!String(e.id??"").toLowerCase().includes(i)&&!String(e.title??"").toLowerCase().includes(i))return!1}return!(n.status&&e.stage!==n.status||n.risk&&e.risk!==n.risk||n.origin&&(t==="prd"||t==="spec"||typeof e.origin!="string")||n.origin&&e.origin!==n.origin)}function ev(e,t){if(!AP(t)||(e.from||e.to)&&!(typeof t.from_day=="string"))return null;let n=["task","spec","prd"].flatMap(a=>t.pages[a].map(s=>({...s,kind:TP(s,a)}))).filter(a=>NP(a,String(a.kind),e)).sort((a,s)=>String(s.occurred_at??"").localeCompare(String(a.occurred_at??""))||String(s.id??"").localeCompare(String(a.id??""))),i=Math.min(200,Math.max(1,e.limit??50)),r=Math.max(0,e.offset??0),o=n.slice(r,r+i);return{offset:r,limit:i,total_count:n.length,has_more:r+o.length<n.length,rows:o}}var Qu="canonical.spec_id IS NOT NULL",tv="(COALESCE(canonical.change_id, (SELECT change.id FROM canonical_changes change, json_each(change.task_ids_json) task WHERE task.value = canonical.id ORDER BY change.created_at DESC, change.id DESC LIMIT 1)))",Ys=`(SELECT change.source_type FROM canonical_changes change WHERE change.id=${tv})`,Yu=`(${Qu} OR COALESCE(${Ys} IN ('spec', 'prd'), 0))`;function nv(e){let t=[],n=[];if(e.from&&(t.push("canonical.occurred_day_sp >= ?"),n.push(e.from.slice(0,10))),e.to&&(t.push("canonical.occurred_day_sp <= ?"),n.push(e.to.slice(0,10))),e.query&&(t.push("(work.id LIKE ? OR work.title LIKE ?)"),n.push(`%${e.query}%`,`%${e.query}%`)),e.status&&(t.push("canonical.stage = ?"),n.push(e.status)),e.risk&&(t.push("canonical.risk = ?"),n.push(e.risk)),e.origin){t.push("canonical.entity_kind = 'task'");let r=e.origin==="spec"?Qu:e.origin==="task"?`NOT ${Qu}`:"0";t.push(`(${Ys} = ? OR (${Ys} IS NULL AND ${r}))`),n.push(e.origin)}return e.kind==="prd"||e.kind==="spec"?(t.push("canonical.entity_kind = ?"),n.push(e.kind)):(e.kind==="all-tasks"||e.kind==="task"||e.kind==="standalone-task")&&(t.push("canonical.entity_kind = 'task'"),e.kind!=="all-tasks"&&t.push(e.kind==="task"?Yu:`NOT ${Yu}`)),{source:"operations_work_kanban work JOIN canonical_work_items canonical ON canonical.entity_kind=work.entity_kind AND canonical.id=work.id",where:t.length===0?"":` WHERE ${t.join(" AND ")}`,values:n,select:`SELECT work.*, canonical.stage, canonical.spec_id,
568
- ${tv} AS change_id, ${Ys} AS origin,
569
- CASE WHEN canonical.entity_kind='task' THEN CASE WHEN ${Yu} THEN 'task' ELSE 'standalone-task' END ELSE canonical.entity_kind END AS kind`}}function rv(e){return e.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='operations_work_projection' LIMIT 1").get()!==void 0}function IP(e){let t=[],n=[];if(e.from&&(t.push("occurred_day_sp >= ?"),n.push(e.from.slice(0,10))),e.to&&(t.push("occurred_day_sp <= ?"),n.push(e.to.slice(0,10))),e.query&&(t.push("(id LIKE ? OR title LIKE ?)"),n.push(`%${e.query}%`,`%${e.query}%`)),e.status&&(t.push("stage = ?"),n.push(e.status)),e.risk&&(t.push("risk = ?"),n.push(e.risk)),e.origin){t.push("entity_kind = 'task'");let i=e.origin==="spec"?"spec_id IS NOT NULL":e.origin==="task"?"spec_id IS NULL":"0";t.push(`(origin = ? OR (origin IS NULL AND ${i}))`),n.push(e.origin)}return e.kind==="prd"||e.kind==="spec"?(t.push("entity_kind = ?"),n.push(e.kind)):e.kind==="all-tasks"?t.push("entity_kind = 'task'"):(e.kind==="task"||e.kind==="standalone-task")&&(t.push("kind = ?"),n.push(e.kind)),{where:t.length===0?"":` WHERE ${t.join(" AND ")}`,values:n}}function iv(e,t){let n=Math.min(200,Math.max(1,t.limit??50)),i=Math.max(0,t.offset??0);if(rv(e)){let s=IP(t),l=Number(e.prepare(`SELECT COUNT(*) AS count FROM operations_work_projection${s.where}`).get(...s.values).count),c=e.prepare(`SELECT * FROM operations_work_projection${s.where} ORDER BY occurred_at DESC, id DESC LIMIT ? OFFSET ?`).all(...s.values,n,i);return{offset:i,limit:n,total_count:l,has_more:i+c.length<l,rows:c}}let r=nv(t),o=Number(e.prepare(`SELECT COUNT(*) AS count FROM ${r.source}${r.where}`).get(...r.values).count),a=e.prepare(`${r.select} FROM ${r.source}${r.where} ORDER BY work.occurred_at DESC, work.id DESC LIMIT ? OFFSET ?`).all(...r.values,n,i);return{offset:i,limit:n,total_count:o,has_more:i+a.length<o,rows:a}}function Qh(e){let t=e.entity_kind??e.kind;return t==="task"||t==="standalone-task"?"task":t==="spec"||t==="prd"?t:null}function ov(e,t,n){let i=t.flatMap(c=>{let u=Qh(c),d=typeof c.id=="string"&&c.id.length>0?c.id:null;return u&&d?[{entityKind:u,id:d}]:[]});if(i.length===0)return t.map(c=>({...c,developers:[]}));let r=i.flatMap(({entityKind:c,id:u})=>[c,u]),o=n.from?.slice(0,10)??null,a=n.to?.slice(0,10)??null,s=e.prepare(`WITH page_items(entity_kind, id) AS (VALUES ${i.map(()=>"(?, ?)").join(", ")}),
567
+ `)}function ID(e){if(e===null||typeof e!="object")return!1;let t=e.pages;return t===null||typeof t!="object"?!1:["task","spec","prd"].every(n=>Array.isArray(t[n]))}function RD(e,t){return t!=="task"?t:e.kind==="task"||e.kind==="standalone-task"?e.kind:typeof e.spec_id=="string"&&e.spec_id.length>0||e.origin==="spec"||e.origin==="prd"?"task":"standalone-task"}function $D(e,t,n){if(n.kind&&n.kind!=="all"&&!(n.kind==="all-tasks"?t==="task"||t==="standalone-task":t===n.kind))return!1;if(n.query){let i=n.query.toLowerCase();if(!String(e.id??"").toLowerCase().includes(i)&&!String(e.title??"").toLowerCase().includes(i))return!1}return!(n.status&&e.stage!==n.status||n.risk&&e.risk!==n.risk||n.origin&&(t==="prd"||t==="spec"||typeof e.origin!="string")||n.origin&&e.origin!==n.origin)}function tv(e,t){if(!ID(t)||(e.from||e.to)&&!(typeof t.from_day=="string"))return null;let n=["task","spec","prd"].flatMap(a=>t.pages[a].map(s=>({...s,kind:RD(s,a)}))).filter(a=>$D(a,String(a.kind),e)).sort((a,s)=>String(s.occurred_at??"").localeCompare(String(a.occurred_at??""))||String(s.id??"").localeCompare(String(a.id??""))),i=Math.min(200,Math.max(1,e.limit??50)),r=Math.max(0,e.offset??0),o=n.slice(r,r+i);return{offset:r,limit:i,total_count:n.length,has_more:r+o.length<n.length,rows:o}}var ed="canonical.spec_id IS NOT NULL",nv="(COALESCE(canonical.change_id, (SELECT change.id FROM canonical_changes change, json_each(change.task_ids_json) task WHERE task.value = canonical.id ORDER BY change.created_at DESC, change.id DESC LIMIT 1)))",ec=`(SELECT change.source_type FROM canonical_changes change WHERE change.id=${nv})`,Qu=`(${ed} OR COALESCE(${ec} IN ('spec', 'prd'), 0))`;function rv(e){let t=[],n=[];if(e.from&&(t.push("canonical.occurred_day_sp >= ?"),n.push(e.from.slice(0,10))),e.to&&(t.push("canonical.occurred_day_sp <= ?"),n.push(e.to.slice(0,10))),e.query&&(t.push("(work.id LIKE ? OR work.title LIKE ?)"),n.push(`%${e.query}%`,`%${e.query}%`)),e.status&&(t.push("canonical.stage = ?"),n.push(e.status)),e.risk&&(t.push("canonical.risk = ?"),n.push(e.risk)),e.origin){t.push("canonical.entity_kind = 'task'");let r=e.origin==="spec"?ed:e.origin==="task"?`NOT ${ed}`:"0";t.push(`(${ec} = ? OR (${ec} IS NULL AND ${r}))`),n.push(e.origin)}return e.kind==="prd"||e.kind==="spec"?(t.push("canonical.entity_kind = ?"),n.push(e.kind)):(e.kind==="all-tasks"||e.kind==="task"||e.kind==="standalone-task")&&(t.push("canonical.entity_kind = 'task'"),e.kind!=="all-tasks"&&t.push(e.kind==="task"?Qu:`NOT ${Qu}`)),{source:"operations_work_kanban work JOIN canonical_work_items canonical ON canonical.entity_kind=work.entity_kind AND canonical.id=work.id",where:t.length===0?"":` WHERE ${t.join(" AND ")}`,values:n,select:`SELECT work.*, canonical.stage, canonical.spec_id,
568
+ ${nv} AS change_id, ${ec} AS origin,
569
+ CASE WHEN canonical.entity_kind='task' THEN CASE WHEN ${Qu} THEN 'task' ELSE 'standalone-task' END ELSE canonical.entity_kind END AS kind`}}function iv(e){return e.prepare("SELECT 1 FROM sqlite_master WHERE type='table' AND name='operations_work_projection' LIMIT 1").get()!==void 0}function CD(e){let t=[],n=[];if(e.from&&(t.push("occurred_day_sp >= ?"),n.push(e.from.slice(0,10))),e.to&&(t.push("occurred_day_sp <= ?"),n.push(e.to.slice(0,10))),e.query&&(t.push("(id LIKE ? OR title LIKE ?)"),n.push(`%${e.query}%`,`%${e.query}%`)),e.status&&(t.push("stage = ?"),n.push(e.status)),e.risk&&(t.push("risk = ?"),n.push(e.risk)),e.origin){t.push("entity_kind = 'task'");let i=e.origin==="spec"?"spec_id IS NOT NULL":e.origin==="task"?"spec_id IS NULL":"0";t.push(`(origin = ? OR (origin IS NULL AND ${i}))`),n.push(e.origin)}return e.kind==="prd"||e.kind==="spec"?(t.push("entity_kind = ?"),n.push(e.kind)):e.kind==="all-tasks"?t.push("entity_kind = 'task'"):(e.kind==="task"||e.kind==="standalone-task")&&(t.push("kind = ?"),n.push(e.kind)),{where:t.length===0?"":` WHERE ${t.join(" AND ")}`,values:n}}function ov(e,t){let n=Math.min(200,Math.max(1,t.limit??50)),i=Math.max(0,t.offset??0);if(iv(e)){let s=CD(t),l=Number(e.prepare(`SELECT COUNT(*) AS count FROM operations_work_projection${s.where}`).get(...s.values).count),c=e.prepare(`SELECT * FROM operations_work_projection${s.where} ORDER BY occurred_at DESC, id DESC LIMIT ? OFFSET ?`).all(...s.values,n,i);return{offset:i,limit:n,total_count:l,has_more:i+c.length<l,rows:c}}let r=rv(t),o=Number(e.prepare(`SELECT COUNT(*) AS count FROM ${r.source}${r.where}`).get(...r.values).count),a=e.prepare(`${r.select} FROM ${r.source}${r.where} ORDER BY work.occurred_at DESC, work.id DESC LIMIT ? OFFSET ?`).all(...r.values,n,i);return{offset:i,limit:n,total_count:o,has_more:i+a.length<o,rows:a}}function ev(e){let t=e.entity_kind??e.kind;return t==="task"||t==="standalone-task"?"task":t==="spec"||t==="prd"?t:null}function av(e,t,n){let i=t.flatMap(c=>{let u=ev(c),d=typeof c.id=="string"&&c.id.length>0?c.id:null;return u&&d?[{entityKind:u,id:d}]:[]});if(i.length===0)return t.map(c=>({...c,developers:[]}));let r=i.flatMap(({entityKind:c,id:u})=>[c,u]),o=n.from?.slice(0,10)??null,a=n.to?.slice(0,10)??null,s=e.prepare(`WITH page_items(entity_kind, id) AS (VALUES ${i.map(()=>"(?, ?)").join(", ")}),
570
570
  identified_developers AS (
571
571
  SELECT page_items.entity_kind, page_items.id,
572
572
  CAST(activity.developer_account_id AS TEXT) AS account_id,
@@ -587,14 +587,14 @@ SELECT i.*,
587
587
  )
588
588
  SELECT entity_kind, id, account_id, login_snapshot
589
589
  FROM identified_developers
590
- ORDER BY entity_kind, id, account_id COLLATE BINARY`).all(...r,o,o,a,a),l=new Map;for(let c of s){let u=`${c.entity_kind}:${c.id}`,d=l.get(u)??[];d.push({account_id:c.account_id,login_snapshot:c.login_snapshot}),l.set(u,d)}return t.map(c=>{let u=Qh(c),d=typeof c.id=="string"?c.id:"";return{...c,developers:u?l.get(`${u}:${d}`)??[]:[]}})}function av(e){if(rv(e))return e.prepare("SELECT * FROM operations_work_projection ORDER BY occurred_at DESC, id DESC").all();let t=nv({kind:"all"});return e.prepare(`${t.select} FROM ${t.source}${t.where} ORDER BY work.occurred_at DESC, work.id DESC`).all(...t.values)}function Qs(e,t,n){return e.filter(i=>{let r=typeof i.occurred_day_sp=="string"?i.occurred_day_sp:"";return r>=t&&r<=n})}var sv=require("node:sqlite");function cv(e,t,n,i){let r;try{r=new sv.DatabaseSync(e,{readOnly:!0});let o=r,a=c=>o.prepare("SELECT value FROM zaip_vw_read_model_metadata WHERE key = ?").get(c)?.value,s=Number(a("source_file_count")??0);return a("source_fingerprint")===t&&a("schema_version")===n&&i(r)?s:null}catch{return null}finally{r?.close()}}function ed(e){let t=e.prepare("SELECT name FROM sqlite_master WHERE type = 'view' AND name LIKE 'zaip_vw_%'").all();for(let{name:n}of t){let i=n.slice(8),r=a=>`"${a.replaceAll('"','""')}"`;e.prepare("SELECT 1 FROM sqlite_temp_master WHERE name=? LIMIT 1").get(i)===void 0&&e.exec(`CREATE TEMP VIEW ${r(i)} AS SELECT * FROM main.${r(n)}`)}}var lv=require("node:crypto"),$r=require("node:fs/promises"),Cr=require("node:path"),RP=new Set([".json",".jsonl",".md",".yaml",".yml",".txt"]);function $P(e){let t="\\.agents\\/(?:data|records)";return[".agents/config/project.yaml",".agents/config/framework.lock.yaml",".agents/config/agents/catalog.yaml",".agents/config/clients.yaml"].includes(e)||e.startsWith(".agents/config/pricing/")||new RegExp(`^${t}/runs/`).test(e)&&e.endsWith(".jsonl")||new RegExp(`^${t}/(tasks|specs|prds)/.*\\.md$`).test(e)||new RegExp(`^${t}/executions/.*/execution\\.md$`).test(e)||new RegExp(`^${t}/executions/.*/decisions/.*\\.md$`).test(e)||new RegExp(`^${t}/lifecycle/historical-developer-attribution/`).test(e)&&e.endsWith(".json")?!0:new RegExp(`^${t}/changes/.*/(change\\.md|decisions/.*\\.md|artifacts/(evidence|tests|validations)/.*\\.md)$`).test(e)}async function no(e,t={}){let n=(await Promise.all([".agents/config",...["tasks","specs","prds","runs","executions","changes","lifecycle/historical-developer-attribution"].flatMap(a=>[`.agents/data/${a}`,`.agents/records/${a}`])].map(a=>uv((0,Cr.resolve)(e,a))))).flat().filter(a=>RP.has(a.slice(a.lastIndexOf(".")).toLowerCase())&&$P((0,Cr.relative)(e,a).replaceAll("\\","/"))).sort(),i=[],r=0,o=0;for(let a=0;a<n.length;a+=32)i.push(...(await Promise.all(n.slice(a,a+32).map(async s=>{let l=(0,Cr.relative)(e,s).replaceAll("\\","/");try{for(let c=0;c<3;c+=1){let u=await(0,$r.stat)(s),d={path:s,source:l,mtimeMs:u.mtimeMs,ctimeMs:u.ctimeMs,size:u.size,fileIdentity:`${u.dev}:${u.ino}:${u.birthtimeMs}`},p=t.previous?.get(l);if(!t.verifyContent&&p!==void 0&&p.mtimeMs===d.mtimeMs&&p.ctimeMs===d.ctimeMs&&p.size===d.size&&p.fileIdentity===d.fileIdentity)return o+=1,{...d,contentHash:p.contentHash};let f=(0,lv.createHash)("sha256").update(await(0,$r.readFile)(s)).digest("hex"),S=await(0,$r.stat)(s);if(!(u.mtimeMs!==S.mtimeMs||u.ctimeMs!==S.ctimeMs||u.size!==S.size||u.ino!==S.ino||u.dev!==S.dev||u.birthtimeMs!==S.birthtimeMs))return r+=1,{...d,contentHash:f}}throw new Error(`Canonical source changed repeatedly during refresh: ${l}`)}catch(c){if(c.code==="ENOENT")return null;throw c}}))).filter(s=>s!==null));return{fingerprint:i.map(a=>`${a.source}:${a.mtimeMs}:${a.size}:${a.contentHash}`).join("|"),candidates:i,hashedFiles:r,reusedFiles:o}}async function uv(e){let t=await(0,$r.readdir)(e,{withFileTypes:!0}).catch(n=>{if(n.code==="ENOENT")return[];throw n});return(await Promise.all(t.map(async n=>{let i=(0,Cr.join)(e,n.name);return n.isDirectory()?uv(i):n.isFile()?[i]:[]}))).flat()}var CP=performance.now();function td(e,t,n){process.env.ZAIP_DASHBOARD_LAUNCH_PROGRESS==="1"&&process.stderr.write(`${JSON.stringify({event:"dashboard_sqlite_rebuild_progress",phase:e,percent:t,detail:n,elapsed_ms:Math.round(performance.now()-CP)})}
591
- `)}function nd(e){let t=/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/.exec(e)?.[1];if(t===void 0)return null;try{let n=Xi(t);return n!==null&&typeof n=="object"&&!Array.isArray(n)?n:null}catch{return null}}function ni(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function Be(e){return typeof e=="string"&&e.length>0?e:null}function ro(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function Ft(e){let t=[...new Set(e.filter(n=>typeof n=="string"&&n.length>0&&n!=="unavailable"))];return t.length===0?null:t.length===1?t[0]:"mixed"}var rd=2*36e5;function dv(){let e=new Intl.DateTimeFormat("en-CA",{timeZone:"America/Sao_Paulo",year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(new Date),t=Object.fromEntries(e.map(i=>[i.type,i.value])),n=`${t.year}-${t.month}-${t.day}`;return{from:`${t.year}-${t.month}-01`,to:n}}function _v(e){let t=[],n=[],i=[];for(let r of e){let o=nd(r.content);if(o===null)continue;let a=Be(o.id),s=Be(o.created_at);if(!(a===null||s===null||Number.isNaN(Date.parse(s)))){if(/^\.agents\/(?:data|records)\/executions\/.*\/execution\.md$/.test(r.path)){let l=ni(o.origin),c=Be(l?.type),u=c==="interaction"?Be(l?.conversation_id):c==="task"?Be(l?.task_id):c==="spec"?Be(l?.spec_id):c==="prd"?Be(l?.prd_id):null;t.push({id:a,status:Be(o.status),kind:Be(o.kind),originType:c,originId:u,createdAt:s,finishedAt:Be(o.finished_at),sourcePath:r.path});continue}if(/^\.agents\/(?:data|records)\/changes\/.*\/change\.md$/.test(r.path)){let l=ni(o.source),c=Be(l?.type),u=c==="task"?Be(l?.task_id):c==="spec"?Be(l?.spec_id):c==="prd"?Be(l?.prd_id):null;if(c===null||u===null)continue;n.push({id:a,title:Be(o.title)??a,status:Be(o.status)??"unclassified",risk:Be(o.risk)??"unclassified",sourceType:c,sourceId:u,sourceSpecId:Be(l?.spec_id),sourcePrdId:Be(l?.prd_id),requirementIds:ro(o.requirement_ids),acceptanceIds:ro(o.acceptance_ids),taskIds:ro(o.task_ids),result:Be(o.result),createdAt:s,sourcePath:r.path});continue}if(/^\.agents\/(?:data|records)\/(changes|executions)\/.*\/decisions\/.*\.md$/.test(r.path)){let l=o.origin,c=o.scope_type,u=Be(o.scope_id);if(l!=="human"&&l!=="agent"||c!=="change"&&c!=="execution"||u===null)continue;i.push({id:a,title:Be(o.title)??a,origin:l,scopeType:c,scopeId:u,createdAt:s,sourcePath:r.path})}}}return{executions:t,changes:n,decisions:i}}function id(e){let t=new Map;for(let n of e){let i=/^\.agents\/(?:data|records)\/(tasks|specs|prds|changes|executions|conversations)\//.exec(n.path);if(i===null)continue;let r=/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/.exec(n.content)?.[1];if(r===void 0)continue;let o=l=>{let c=new RegExp(`^${l}:\\s*(.+?)\\s*$`,"m").exec(r)?.[1]?.trim();return c===void 0||c==="null"?null:c.replace(/^['"]|['"]$/g,"")},a=o("id");if(a===null)continue;let s=i[1]?.slice(0,-1);s!==void 0&&t.set(`${s}:${a}`,{kind:s,id:a,title:o("title"),status:o("status"),stage:o("stage"),risk:o("risk"),specId:o("spec_id"),changeId:o("change_id"),occurredAt:o("created_at")??o("started_at")??o("recorded_at"),creationRunId:o("creation_run_id"),completedRunId:o("completed_run_id")})}return t}function pv(e,t){let n=new Map;for(let i of(e??"").split(/^ {2}- id: /m).slice(1)){let r=i.slice(0,i.indexOf(`
592
- `)).trim(),o=/\bcodex_name:\s*([^\s#]+)/.exec(i)?.[1]??null;if(o===null)continue;let a=/persona:\s*\{\s*nome:\s*([^,}\s]+),\s*cargo:\s*([^,}\s]+)\s*\}/.exec(i),s=/\brole:\s*([^\s#]+)/.exec(i)?.[1]??null,l={catalogId:r,persona:a?.[1]??null,job:a?.[2]??null,role:s},c=new Set([o,r]);for(let u of i.matchAll(/^ {8}- kind:\s*(?:id|codex_name|codex_task_name)\s*\r?\n {10}value:\s*([^\s#]+)/gm)){let d=u[1];d!==void 0&&c.add(d)}for(let u of[...c])u.startsWith("agent-")&&c.add(`zaip-${u}`);for(let u of c)n.set(u,l)}return/^ {2}- id:\s*codex\s*$/m.test(t??"")&&n.set("codex",{catalogId:"client:codex",persona:"codex",job:"client_host",role:"host"}),n}function fv(e){return e.prd_id!==null&&e.execution_id===null||e.spec_id!==null&&e.execution_id===null||e.phase==="planning"||e.purpose==="planning"?"planning":e.execution_id!==null||e.task_id!==null||e.phase==="execution"||e.purpose==="implementation"?"development":"conversation"}function Zt(e,t){let n=e.map(i=>i.tokens[t]).filter(i=>typeof i=="number");return n.length===0?null:n.reduce((i,r)=>i+r,0)}function io(e,t,n){return e==="openai"||e==="anthropic"?e:e==="unavailable"||t==="unavailable"||t===null?null:zs(t,n,"")}function LP(e){return typeof e.duration_ms=="number"&&(e.duration_provenance==="observed"||e.duration_provenance==="reconciled"||e.duration_provenance==="legacy_inferred")}function MP(e){let t=e.flatMap(r=>{let o=r.source_started_at,a=r.source_finished_at,s=typeof o=="string"?Date.parse(o):Number.NaN,l=typeof a=="string"?Date.parse(a):Number.NaN;return typeof o=="string"&&typeof a=="string"&&Number.isFinite(s)&&Number.isFinite(l)&&l>s&&l-s<=rd?[{start:o,end:a,startMs:s,endMs:l}]:[]});if(t.length===0)return null;let n=t.reduce((r,o)=>o.startMs<r.startMs?o:r),i=t.reduce((r,o)=>o.endMs>r.endMs?o:r);return i.endMs-n.startMs<=rd?{start:n.start,end:i.end,duration:i.endMs-n.startMs}:null}function mv(e,t){let n=MP(e);if(n!==null)return{source:n.duration,effective:n.duration,provenance:"reconciled",sourceStartedAt:n.start,sourceFinishedAt:n.end};if(typeof t.finished?.duration_ms=="number"&&t.finished.duration_provenance!=="estimated"&&t.finished.duration_provenance!=="unavailable")return{source:t.finished.duration_ms,effective:t.finished.duration_ms,provenance:t.finished.duration_provenance??"observed",sourceStartedAt:null,sourceFinishedAt:null};let i=e.filter(LP);if(i.length>0){let a=i.reduce((l,c)=>l+(c.duration_ms??0),0),s=Ft(i.map(l=>l.duration_provenance))??"observed";return{source:a,effective:a,provenance:s,sourceStartedAt:null,sourceFinishedAt:null}}let r=Date.parse(t.run.occurred_at),o=typeof t.finished?.occurred_at=="string"?Date.parse(t.finished.occurred_at):Number.NaN;return Number.isFinite(r)&&Number.isFinite(o)&&o>r&&o-r<=rd?{source:null,effective:o-r,provenance:"reconciled",sourceStartedAt:null,sourceFinishedAt:null}:{source:null,effective:null,provenance:null,sourceStartedAt:null,sourceFinishedAt:null}}function gv(e){return e.flatMap(t=>{try{return[Hy.parse(JSON.parse(t.content))]}catch{return[]}}).sort((t,n)=>n.as_of.localeCompare(t.as_of))[0]??null}function od(e,t,n,i){let r=0,o=0,a=!1,s=!1,l=!1,c=[],u=[];for(let p of e){if(typeof p.cost.usd=="number"&&(r+=p.cost.usd,a=!0),typeof p.cost.brl=="number"&&(o+=p.cost.brl,s=!0),typeof p.cost.usd=="number"&&typeof p.cost.brl=="number"||p.tokens.total===null)continue;if(p.tokens.total===0){a=!0,s=!0;continue}let f=p.model??t.run.model;if(f===null||f==="unavailable")continue;let S=Fs({provider:io(p.provider,f,t.run.client),model:f,usage:p.tokens,catalog:n,fxRate:i,serviceTier:p.runtime?.service_tier??null});typeof p.cost.usd!="number"&&S.estimated_usd!==null&&(r+=S.estimated_usd,a=!0,l=!0),typeof p.cost.brl!="number"&&S.estimated_brl!==null&&(o+=S.estimated_brl,s=!0,l=!0),S.pricing_model!==null&&c.push(S.pricing_model),S.pricing_source!==null&&u.push(S.pricing_source)}let d=Zt(e,"total");return{usd:a?Math.round(r*1e6)/1e6:null,brl:s?Math.round(o*1e6)/1e6:null,method:d===0?"zero_no_llm_usage":l?"token_pricing_estimate":a||s?"canonical_recorded":null,pricingModel:Ft(c),pricingSource:Ft(u),fxRate:s?i?.rate??null:null}}function UP(e,t){if(t===null)return null;let n=t.toLowerCase(),i=r=>{let o=r.toLowerCase();if(n===o)return!0;let a=n.slice(o.length);return a.startsWith("@")||a.startsWith(":")||a.startsWith("/")||/^-\d{4}-\d{2}-\d{2}(?:$|[.:@/])/.test(a)};return e.models.find(r=>i(r.id)||r.aliases.some(o=>i(o)))??null}function yv(e,t,n,i){let r=e.model??t.run.model,o=io(e.provider,r,t.run.client),a=e.runtime?.service_tier??null,s=UP(n,r),l=r===null?null:Fs({provider:o,model:r,usage:e.tokens,catalog:n,fxRate:i,serviceTier:a}),c=r===null?null:Fs({provider:o,model:r,usage:e.tokens,catalog:n,fxRate:i,serviceTier:"default"}),u=s?.long_context_threshold_tokens!==null&&s?.long_context_threshold_tokens!==void 0&&(e.tokens.input??0)>s.long_context_threshold_tokens,d=a==="priority"||a==="fast",p=d&&!u,f=s?p?s.priority_input_per_million_usd??null:s.input_per_million_usd:null,S=s?p?s.priority_cached_input_per_million_usd??null:s.cached_input_per_million_usd:null,h=s?p?s.priority_output_per_million_usd??null:s.output_per_million_usd:null,v=s?p?s.priority_reasoning_per_million_usd??s.priority_output_per_million_usd??null:s.reasoning_per_million_usd??s.output_per_million_usd:null,E=l?.estimated_usd!==null&&l!==null?l:c,U=E?.estimated_usd??null,F=c?.estimated_usd??null,Z=e.cost.usd,V=Z??U,ce=e.cost.brl??l?.estimated_brl??(V!==null&&i!==null?Math.round(V*i.rate*1e6)/1e6:null);return{provider:o,model:r,serviceTier:a,uncachedInputTokens:e.tokens.input===null?null:Math.max(e.tokens.input-(e.tokens.cached_input??0),0),visibleOutputTokens:e.tokens.output===null?null:Math.max(e.tokens.output-(e.tokens.reasoning??0),0),inputRate:f,cachedRate:S,outputRate:h,reasoningRate:v,contextInputMultiplier:s?u?s.long_context_input_multiplier:1:null,contextOutputMultiplier:s?u?s.long_context_output_multiplier:1:null,speedCostMultiplier:U!==null&&F!==null&&F>0?Math.round(U/F*1e3)/1e3:null,pricingScenario:d&&u?"standard_long_context_fallback":d?"priority":"standard",standardUsd:F,speedUpliftUsd:U!==null&&F!==null?Math.round((U-F)*1e6)/1e6:null,inputUsd:E?.input_usd??null,cachedInputUsd:E?.cached_input_usd??null,outputUsd:E?.output_usd??null,reasoningUsd:E?.reasoning_usd??null,calculatedUsd:U,recordedUsd:Z,effectiveUsd:V,effectiveBrl:ce,varianceUsd:Z!==null&&U!==null?Math.round((Z-U)*1e6)/1e6:null,pricingModel:E?.pricing_model??null,pricingSource:E?.pricing_source??null,fxRate:e.cost.fx_rate??i?.rate??null}}function yt(e){let t=Object.fromEntries(new Intl.DateTimeFormat("en",{timeZone:"America/Sao_Paulo",year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(new Date(e)).filter(n=>n.type!=="literal").map(n=>[n.type,n.value]));return`${t.year}-${t.month}-${t.day}`}function ec(e){let t=new Set;for(let r of e){t.add(r.startMs),t.add(r.endMs);for(let o=r.startMs;o<r.endMs;){let a=Date.parse(`${yt(new Date(o).toISOString())}T03:00:00.000Z`)+864e5;if(a>=r.endMs)break;t.add(a),o=a}}let n=[...t].sort((r,o)=>r-o),i=new Map;for(let r=0;r<n.length-1;r+=1){let o=n[r],a=n[r+1],s=e.filter(u=>u.startMs<a&&u.endMs>o);if(s.length===0||a<=o)continue;let l=(a-o)/s.length,c=yt(new Date(o).toISOString());for(let u of s){let d=`${u.activityRowId}:${c}`,p=i.get(d);i.set(d,{activityRowId:u.activityRowId,day:c,value:(p?.value??0)+l})}}return[...i.values()]}function Qe(e){return e==null?null:/^\d{4}-\d{2}-\d{2}$/.test(e)?e:yt(e)}function ad(e,t){let n=e.map(i=>i[t]).filter(i=>typeof i=="number"&&Number.isFinite(i));return n.length===0?null:n.reduce((i,r)=>i+r,0)}function hv(e,t){let n=e.includes("/artifacts/evidence/")?"evidence":e.includes("/artifacts/validations/")||e.includes("/artifacts/tests/")?"validation":null;if(n===null)return null;let i=/^---\r?\n([\s\S]*?)\r?\n---/.exec(t)?.[1]??"",r=a=>{let s=new RegExp(`^${a}:\\s*['"]?(.+?)['"]?\\s*$`,"m").exec(i)?.[1]?.trim();return s===void 0||s==="null"?null:s},o=r("observed_at")??r("executed_at")??r("created_at")??r("recorded_at");return o===null||Number.isNaN(Date.parse(o))?null:{kind:n,id:r("id")??e.slice(e.lastIndexOf("/")+1,-3),occurredAt:o,occurredDaySp:yt(o),taskId:r("task_id"),changeId:r("change_id"),runId:r("run_id")}}var Ev=".local/sqlite/zaip-aios-dashboard.sqlite",ri="74",kv=["zaip_aios_activities","zaip_dim_llm_model","zaip_dim_provider","zaip_dim_zaip_agent","cost_invocation_dimension_facts","cost_group_daily_projection","cost_group_entity_projection","developer_cost_projection","operations_work_projection"],ld=["zaip_activities_agent_run","zaip_activities_relationships","zaip_activities_task_day","zaip_activities_spec_day","zaip_activities_prd_day","zaip_activities_agent","zaip_activities_run_id","zaip_activities_run_hierarchy","zaip_activities_period","zaip_activities_period_invocation","zaip_activities_status","zaip_activities_payload","zaip_activities_work_item_identity","cost_dimension_facts_day_model","cost_dimension_facts_day_provider","cost_dimension_facts_invocation","cost_group_daily_projection_lookup","cost_group_entity_projection_lookup","developer_cost_projection_lookup"],Ov=["zaip_vw_read_model_metadata","zaip_vw_operations_overview","zaip_vw_cost_overview","zaip_vw_cost_models","zaip_vw_cost_providers","zaip_vw_operations_agent_invocations"],FV=2*36e5;function nc(e){return(0,ao.resolve)(process.env.ZAIP_SQLITE_DB_PATH??(0,ao.resolve)(e,Ev))}function sd(e){if(!(0,bv.existsSync)(e))return new Map;let t;try{t=new Lr.DatabaseSync(e,{readOnly:!0});let n=t.prepare("SELECT source_path, source_hash, mtime_ms, ctime_ms, size_bytes, file_identity FROM zaip_vw_read_model_source_state").all();return new Map(n.flatMap(i=>{let r=typeof i.source_path=="string"?i.source_path:null,o=typeof i.source_hash=="string"?i.source_hash:null,a=typeof i.file_identity=="string"?i.file_identity:null,s=typeof i.mtime_ms=="number"?i.mtime_ms:typeof i.mtime_ms=="string"?Number(i.mtime_ms):Number.NaN,l=typeof i.ctime_ms=="number"?i.ctime_ms:typeof i.ctime_ms=="string"?Number(i.ctime_ms):Number.NaN;return r===null||o===null||a===null||!Number.isFinite(s)||!Number.isFinite(l)||typeof i.size_bytes!="number"?[]:[[r,{source:r,mtimeMs:s,ctimeMs:l,size:i.size_bytes,contentHash:o,fileIdentity:a}]]}))}catch{return new Map}finally{t?.close()}}function tc(e){let t=new Lr.DatabaseSync(e,{readOnly:!0});try{let n=t.prepare("PRAGMA integrity_check").get();if(n.integrity_check!=="ok")throw new Error(`SQLite integrity check failed for ${e}: ${n.integrity_check??"unknown"}`);let i=t.prepare("SELECT name, type FROM sqlite_master WHERE type IN ('table', 'view', 'index')").all(),r=i.filter(d=>d.type==="table").map(d=>d.name).sort(),o=[...kv].sort();if(r.length!==o.length||r.some((d,p)=>d!==o[p]))throw new Error(`SQLite schema ${ri} requires the complete persisted table contract; found ${r.join(", ")||"none"}`);let a=new Set(i.map(d=>d.name)),s=Ov.filter(d=>!a.has(d));if(s.length>0)throw new Error(`SQLite schema is missing required views: ${s.join(", ")}`);let l=i.filter(d=>d.type==="view").map(d=>d.name);if(l.some(d=>!d.startsWith("zaip_vw_")))throw new Error("SQLite persisted views must use the zaip_vw_ namespace");let c=ld.filter(d=>!a.has(d));if(c.length>0)throw new Error(`SQLite schema is missing required indexes: ${c.join(", ")}`);let u=t.prepare("SELECT value FROM zaip_vw_read_model_metadata WHERE key = ?").get("schema_version")?.value;if(u!==ri)throw new Error(`SQLite schema version must be ${ri}; found ${u??"missing"}`);return{schemaVersion:u,tableCount:r.length,viewCount:l.length,indexCount:i.filter(d=>d.type==="index"&&!d.name.startsWith("sqlite_")).length}}finally{t.close()}}function vv(e){let t=e.prepare("SELECT name FROM sqlite_master WHERE type='index'").all(),n=new Set(t.map(i=>i.name));return ld.every(i=>n.has(i))&&Kh(e)}async function xP(e,t={}){let n=nc(e);if(t.preferExisting&&!t.forceCanonical)try{tc(n);let f=new Lr.DatabaseSync(n,{readOnly:!0});try{if(vv(f)){let S=f.prepare("SELECT value FROM zaip_vw_read_model_metadata WHERE key = 'source_file_count'").get();return{files:Number(S.value),path:n,cache:"stale_seed",fingerprint_ms:0,materialize_ms:0,refresh:{reused_sources:0,processed_sources:0,added_sources:0,changed_sources:0,removed_sources:0,canonical_runs_refolded:0}}}}finally{f.close()}}catch{}let i=td,r=performance.now();i("source_fingerprint_started",8,"Inventariando fontes can\xF4nicas.");let o=await no(e,t.forceCanonical?{verifyContent:!0}:{previous:sd(n)}),a={reused_sources:o.reusedFiles,processed_sources:o.hashedFiles,added_sources:0,changed_sources:0,removed_sources:0,canonical_runs_refolded:0};i("source_fingerprint_ready",20,"Invent\xE1rio can\xF4nico conclu\xEDdo.");let s=`${o.fingerprint}
593
- current_day=${yt(new Date().toISOString())}`,l=Math.round(performance.now()-r),c=cv(n,s,ri,vv);if(c!==null&&!t.forceCanonical&&o.hashedFiles===0)return tc(n),{files:c,path:n,cache:"generation",fingerprint_ms:l,materialize_ms:0,refresh:a};i("source_inventory",52,`Encontradas ${o.candidates.length} fontes can\xF4nicas.`),await(0,ic.mkdir)((0,ao.dirname)(n),{recursive:!0});let u=new Lr.DatabaseSync(n),d=0;try{u.exec("PRAGMA busy_timeout=180000; PRAGMA journal_mode=WAL; BEGIN IMMEDIATE;");try{o=await no(e,t.forceCanonical?{verifyContent:!0}:{previous:sd(n)}),a={reused_sources:o.reusedFiles,processed_sources:o.hashedFiles,added_sources:0,changed_sources:0,removed_sources:0,canonical_runs_refolded:0},s=`${o.fingerprint}
594
- current_day=${yt(new Date().toISOString())}`;let f=new Map((()=>{try{return u.prepare("SELECT path, content, content_sha256 FROM zaip_vw_files").all()}catch{return[]}})().map(m=>[m.path,m])),S=u.prepare("SELECT name, type FROM sqlite_master WHERE name NOT LIKE 'sqlite_%'").all(),h=!t.forceCanonical&&kv.every(m=>S.some($=>$.type==="table"&&$.name===m))&&ld.every(m=>S.some($=>$.type==="index"&&$.name===m))&&Ov.every(m=>S.some($=>$.type==="view"&&$.name===m))&&(()=>{try{let m=u.prepare("SELECT value FROM zaip_vw_read_model_metadata WHERE key='schema_version'").get();return u.prepare("SELECT source_path, ctime_ms, file_identity FROM zaip_vw_read_model_source_state LIMIT 1").all(),m?.value===ri}catch{return!1}})(),v=new Map((()=>{try{return u.prepare("SELECT source_path, source_hash FROM zaip_vw_read_model_source_state").all()}catch{return[]}})().map(m=>[m.source_path,m.source_hash]));a={...a,added_sources:o.candidates.filter(m=>!v.has(m.source)).length,changed_sources:o.candidates.filter(m=>{let $=v.get(m.source);return $!==void 0&&$!==m.contentHash}).length,removed_sources:[...v.keys()].filter(m=>!o.candidates.some($=>$.source===m)).length};let E=o.candidates.filter(m=>v.get(m.source)!==m.contentHash),U=[...v.keys()].filter(m=>!o.candidates.some($=>$.source===m));if(h&&E.length===0&&U.length===0){let m=u.prepare("SELECT value FROM zaip_vw_read_model_metadata WHERE key='source_fingerprint'").get(),$=sd(n);for(let L of o.candidates){let Ae=$.get(L.source);Ae&&(Ae.mtimeMs!==L.mtimeMs||Ae.ctimeMs!==L.ctimeMs||Ae.fileIdentity!==L.fileIdentity)&&u.prepare(`UPDATE zaip_aios_activities SET payload_json=json_set(payload_json,'$.mtime_ms',?,'$.ctime_ms',?,'$.file_identity',?,'$.size_bytes',?)
590
+ ORDER BY entity_kind, id, account_id COLLATE BINARY`).all(...r,o,o,a,a),l=new Map;for(let c of s){let u=`${c.entity_kind}:${c.id}`,d=l.get(u)??[];d.push({account_id:c.account_id,login_snapshot:c.login_snapshot}),l.set(u,d)}return t.map(c=>{let u=ev(c),d=typeof c.id=="string"?c.id:"";return{...c,developers:u?l.get(`${u}:${d}`)??[]:[]}})}function sv(e){if(iv(e))return e.prepare("SELECT * FROM operations_work_projection ORDER BY occurred_at DESC, id DESC").all();let t=rv({kind:"all"});return e.prepare(`${t.select} FROM ${t.source}${t.where} ORDER BY work.occurred_at DESC, work.id DESC`).all(...t.values)}function tc(e,t,n){return e.filter(i=>{let r=typeof i.occurred_day_sp=="string"?i.occurred_day_sp:"";return r>=t&&r<=n})}var cv=require("node:sqlite");function lv(e,t,n,i){let r;try{r=new cv.DatabaseSync(e,{readOnly:!0});let o=r,a=c=>o.prepare("SELECT value FROM zaip_vw_read_model_metadata WHERE key = ?").get(c)?.value,s=Number(a("source_file_count")??0);return a("source_fingerprint")===t&&a("schema_version")===n&&i(r)?s:null}catch{return null}finally{r?.close()}}function td(e){let t=e.prepare("SELECT name FROM sqlite_master WHERE type = 'view' AND name LIKE 'zaip_vw_%'").all();for(let{name:n}of t){let i=n.slice(8),r=a=>`"${a.replaceAll('"','""')}"`;e.prepare("SELECT 1 FROM sqlite_temp_master WHERE name=? LIMIT 1").get(i)===void 0&&e.exec(`CREATE TEMP VIEW ${r(i)} AS SELECT * FROM main.${r(n)}`)}}var uv=require("node:crypto"),$r=require("node:fs/promises"),Cr=require("node:path"),LD=new Set([".json",".jsonl",".md",".yaml",".yml",".txt"]);function MD(e){let t="\\.agents\\/(?:data|records)";return[".agents/config/project.yaml",".agents/config/framework.lock.yaml",".agents/config/agents/catalog.yaml",".agents/config/clients.yaml"].includes(e)||e.startsWith(".agents/config/pricing/")||new RegExp(`^${t}/runs/`).test(e)&&e.endsWith(".jsonl")||new RegExp(`^${t}/(tasks|specs|prds)/.*\\.md$`).test(e)||new RegExp(`^${t}/executions/.*/execution\\.md$`).test(e)||new RegExp(`^${t}/executions/.*/decisions/.*\\.md$`).test(e)||new RegExp(`^${t}/lifecycle/historical-developer-attribution/`).test(e)&&e.endsWith(".json")?!0:new RegExp(`^${t}/changes/.*/(change\\.md|decisions/.*\\.md|artifacts/(evidence|tests|validations)/.*\\.md)$`).test(e)}async function ro(e,t={}){let n=(await Promise.all([".agents/config",...["tasks","specs","prds","runs","executions","changes","lifecycle/historical-developer-attribution"].flatMap(a=>[`.agents/data/${a}`,`.agents/records/${a}`])].map(a=>dv((0,Cr.resolve)(e,a))))).flat().filter(a=>LD.has(a.slice(a.lastIndexOf(".")).toLowerCase())&&MD((0,Cr.relative)(e,a).replaceAll("\\","/"))).sort(),i=[],r=0,o=0;for(let a=0;a<n.length;a+=32)i.push(...(await Promise.all(n.slice(a,a+32).map(async s=>{let l=(0,Cr.relative)(e,s).replaceAll("\\","/");try{for(let c=0;c<3;c+=1){let u=await(0,$r.stat)(s),d={path:s,source:l,mtimeMs:u.mtimeMs,ctimeMs:u.ctimeMs,size:u.size,fileIdentity:`${u.dev}:${u.ino}:${u.birthtimeMs}`},p=t.previous?.get(l);if(!t.verifyContent&&p!==void 0&&p.mtimeMs===d.mtimeMs&&p.ctimeMs===d.ctimeMs&&p.size===d.size&&p.fileIdentity===d.fileIdentity)return o+=1,{...d,contentHash:p.contentHash};let f=(0,uv.createHash)("sha256").update(await(0,$r.readFile)(s)).digest("hex"),S=await(0,$r.stat)(s);if(!(u.mtimeMs!==S.mtimeMs||u.ctimeMs!==S.ctimeMs||u.size!==S.size||u.ino!==S.ino||u.dev!==S.dev||u.birthtimeMs!==S.birthtimeMs))return r+=1,{...d,contentHash:f}}throw new Error(`Canonical source changed repeatedly during refresh: ${l}`)}catch(c){if(c.code==="ENOENT")return null;throw c}}))).filter(s=>s!==null));return{fingerprint:i.map(a=>`${a.source}:${a.mtimeMs}:${a.size}:${a.contentHash}`).join("|"),candidates:i,hashedFiles:r,reusedFiles:o}}async function dv(e){let t=await(0,$r.readdir)(e,{withFileTypes:!0}).catch(n=>{if(n.code==="ENOENT")return[];throw n});return(await Promise.all(t.map(async n=>{let i=(0,Cr.join)(e,n.name);return n.isDirectory()?dv(i):n.isFile()?[i]:[]}))).flat()}var UD=performance.now();function nd(e,t,n){process.env.ZAIP_DASHBOARD_LAUNCH_PROGRESS==="1"&&process.stderr.write(`${JSON.stringify({event:"dashboard_sqlite_rebuild_progress",phase:e,percent:t,detail:n,elapsed_ms:Math.round(performance.now()-UD)})}
591
+ `)}function rd(e){let t=/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/.exec(e)?.[1];if(t===void 0)return null;try{let n=Xi(t);return n!==null&&typeof n=="object"&&!Array.isArray(n)?n:null}catch{return null}}function ni(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function Be(e){return typeof e=="string"&&e.length>0?e:null}function io(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function Ft(e){let t=[...new Set(e.filter(n=>typeof n=="string"&&n.length>0&&n!=="unavailable"))];return t.length===0?null:t.length===1?t[0]:"mixed"}var id=2*36e5;function _v(){let e=new Intl.DateTimeFormat("en-CA",{timeZone:"America/Sao_Paulo",year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(new Date),t=Object.fromEntries(e.map(i=>[i.type,i.value])),n=`${t.year}-${t.month}-${t.day}`;return{from:`${t.year}-${t.month}-01`,to:n}}function pv(e){let t=[],n=[],i=[];for(let r of e){let o=rd(r.content);if(o===null)continue;let a=Be(o.id),s=Be(o.created_at);if(!(a===null||s===null||Number.isNaN(Date.parse(s)))){if(/^\.agents\/(?:data|records)\/executions\/.*\/execution\.md$/.test(r.path)){let l=ni(o.origin),c=Be(l?.type),u=c==="interaction"?Be(l?.conversation_id):c==="task"?Be(l?.task_id):c==="spec"?Be(l?.spec_id):c==="prd"?Be(l?.prd_id):null;t.push({id:a,status:Be(o.status),kind:Be(o.kind),originType:c,originId:u,createdAt:s,finishedAt:Be(o.finished_at),sourcePath:r.path});continue}if(/^\.agents\/(?:data|records)\/changes\/.*\/change\.md$/.test(r.path)){let l=ni(o.source),c=Be(l?.type),u=c==="task"?Be(l?.task_id):c==="spec"?Be(l?.spec_id):c==="prd"?Be(l?.prd_id):null;if(c===null||u===null)continue;n.push({id:a,title:Be(o.title)??a,status:Be(o.status)??"unclassified",risk:Be(o.risk)??"unclassified",sourceType:c,sourceId:u,sourceSpecId:Be(l?.spec_id),sourcePrdId:Be(l?.prd_id),requirementIds:io(o.requirement_ids),acceptanceIds:io(o.acceptance_ids),taskIds:io(o.task_ids),result:Be(o.result),createdAt:s,sourcePath:r.path});continue}if(/^\.agents\/(?:data|records)\/(changes|executions)\/.*\/decisions\/.*\.md$/.test(r.path)){let l=o.origin,c=o.scope_type,u=Be(o.scope_id);if(l!=="human"&&l!=="agent"||c!=="change"&&c!=="execution"||u===null)continue;i.push({id:a,title:Be(o.title)??a,origin:l,scopeType:c,scopeId:u,createdAt:s,sourcePath:r.path})}}}return{executions:t,changes:n,decisions:i}}function od(e){let t=new Map;for(let n of e){let i=/^\.agents\/(?:data|records)\/(tasks|specs|prds|changes|executions|conversations)\//.exec(n.path);if(i===null)continue;let r=/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/.exec(n.content)?.[1];if(r===void 0)continue;let o=l=>{let c=new RegExp(`^${l}:\\s*(.+?)\\s*$`,"m").exec(r)?.[1]?.trim();return c===void 0||c==="null"?null:c.replace(/^['"]|['"]$/g,"")},a=o("id");if(a===null)continue;let s=i[1]?.slice(0,-1);s!==void 0&&t.set(`${s}:${a}`,{kind:s,id:a,title:o("title"),status:o("status"),stage:o("stage"),risk:o("risk"),specId:o("spec_id"),changeId:o("change_id"),occurredAt:o("created_at")??o("started_at")??o("recorded_at"),creationRunId:o("creation_run_id"),completedRunId:o("completed_run_id")})}return t}function fv(e,t){let n=new Map;for(let i of(e??"").split(/^ {2}- id: /m).slice(1)){let r=i.slice(0,i.indexOf(`
592
+ `)).trim(),o=/\bcodex_name:\s*([^\s#]+)/.exec(i)?.[1]??null;if(o===null)continue;let a=/persona:\s*\{\s*nome:\s*([^,}\s]+),\s*cargo:\s*([^,}\s]+)\s*\}/.exec(i),s=/\brole:\s*([^\s#]+)/.exec(i)?.[1]??null,l={catalogId:r,persona:a?.[1]??null,job:a?.[2]??null,role:s},c=new Set([o,r]);for(let u of i.matchAll(/^ {8}- kind:\s*(?:id|codex_name|codex_task_name)\s*\r?\n {10}value:\s*([^\s#]+)/gm)){let d=u[1];d!==void 0&&c.add(d)}for(let u of[...c])u.startsWith("agent-")&&c.add(`zaip-${u}`);for(let u of c)n.set(u,l)}return/^ {2}- id:\s*codex\s*$/m.test(t??"")&&n.set("codex",{catalogId:"client:codex",persona:"codex",job:"client_host",role:"host"}),n}function mv(e){return e.prd_id!==null&&e.execution_id===null||e.spec_id!==null&&e.execution_id===null||e.phase==="planning"||e.purpose==="planning"?"planning":e.execution_id!==null||e.task_id!==null||e.phase==="execution"||e.purpose==="implementation"?"development":"conversation"}function Zt(e,t){let n=e.map(i=>i.tokens[t]).filter(i=>typeof i=="number");return n.length===0?null:n.reduce((i,r)=>i+r,0)}function oo(e,t,n){return e==="openai"||e==="anthropic"?e:e==="unavailable"||t==="unavailable"||t===null?null:Zs(t,n,"")}function xD(e){return typeof e.duration_ms=="number"&&(e.duration_provenance==="observed"||e.duration_provenance==="reconciled"||e.duration_provenance==="legacy_inferred")}function DD(e){let t=e.flatMap(r=>{let o=r.source_started_at,a=r.source_finished_at,s=typeof o=="string"?Date.parse(o):Number.NaN,l=typeof a=="string"?Date.parse(a):Number.NaN;return typeof o=="string"&&typeof a=="string"&&Number.isFinite(s)&&Number.isFinite(l)&&l>s&&l-s<=id?[{start:o,end:a,startMs:s,endMs:l}]:[]});if(t.length===0)return null;let n=t.reduce((r,o)=>o.startMs<r.startMs?o:r),i=t.reduce((r,o)=>o.endMs>r.endMs?o:r);return i.endMs-n.startMs<=id?{start:n.start,end:i.end,duration:i.endMs-n.startMs}:null}function gv(e,t){let n=DD(e);if(n!==null)return{source:n.duration,effective:n.duration,provenance:"reconciled",sourceStartedAt:n.start,sourceFinishedAt:n.end};if(typeof t.finished?.duration_ms=="number"&&t.finished.duration_provenance!=="estimated"&&t.finished.duration_provenance!=="unavailable")return{source:t.finished.duration_ms,effective:t.finished.duration_ms,provenance:t.finished.duration_provenance??"observed",sourceStartedAt:null,sourceFinishedAt:null};let i=e.filter(xD);if(i.length>0){let a=i.reduce((l,c)=>l+(c.duration_ms??0),0),s=Ft(i.map(l=>l.duration_provenance))??"observed";return{source:a,effective:a,provenance:s,sourceStartedAt:null,sourceFinishedAt:null}}let r=Date.parse(t.run.occurred_at),o=typeof t.finished?.occurred_at=="string"?Date.parse(t.finished.occurred_at):Number.NaN;return Number.isFinite(r)&&Number.isFinite(o)&&o>r&&o-r<=id?{source:null,effective:o-r,provenance:"reconciled",sourceStartedAt:null,sourceFinishedAt:null}:{source:null,effective:null,provenance:null,sourceStartedAt:null,sourceFinishedAt:null}}function yv(e){return e.flatMap(t=>{try{return[Jy.parse(JSON.parse(t.content))]}catch{return[]}}).sort((t,n)=>n.as_of.localeCompare(t.as_of))[0]??null}function ad(e,t,n,i){let r=0,o=0,a=!1,s=!1,l=!1,c=[],u=[];for(let p of e){if(typeof p.cost.usd=="number"&&(r+=p.cost.usd,a=!0),typeof p.cost.brl=="number"&&(o+=p.cost.brl,s=!0),typeof p.cost.usd=="number"&&typeof p.cost.brl=="number"||p.tokens.total===null)continue;if(p.tokens.total===0){a=!0,s=!0;continue}let f=p.model??t.run.model;if(f===null||f==="unavailable")continue;let S=qs({provider:oo(p.provider,f,t.run.client),model:f,usage:p.tokens,catalog:n,fxRate:i,serviceTier:p.runtime?.service_tier??null});typeof p.cost.usd!="number"&&S.estimated_usd!==null&&(r+=S.estimated_usd,a=!0,l=!0),typeof p.cost.brl!="number"&&S.estimated_brl!==null&&(o+=S.estimated_brl,s=!0,l=!0),S.pricing_model!==null&&c.push(S.pricing_model),S.pricing_source!==null&&u.push(S.pricing_source)}let d=Zt(e,"total");return{usd:a?Math.round(r*1e6)/1e6:null,brl:s?Math.round(o*1e6)/1e6:null,method:d===0?"zero_no_llm_usage":l?"token_pricing_estimate":a||s?"canonical_recorded":null,pricingModel:Ft(c),pricingSource:Ft(u),fxRate:s?i?.rate??null:null}}function PD(e,t){if(t===null)return null;let n=t.toLowerCase(),i=r=>{let o=r.toLowerCase();if(n===o)return!0;let a=n.slice(o.length);return a.startsWith("@")||a.startsWith(":")||a.startsWith("/")||/^-\d{4}-\d{2}-\d{2}(?:$|[.:@/])/.test(a)};return e.models.find(r=>i(r.id)||r.aliases.some(o=>i(o)))??null}function hv(e,t,n,i){let r=e.model??t.run.model,o=oo(e.provider,r,t.run.client),a=e.runtime?.service_tier??null,s=PD(n,r),l=r===null?null:qs({provider:o,model:r,usage:e.tokens,catalog:n,fxRate:i,serviceTier:a}),c=r===null?null:qs({provider:o,model:r,usage:e.tokens,catalog:n,fxRate:i,serviceTier:"default"}),u=s?.long_context_threshold_tokens!==null&&s?.long_context_threshold_tokens!==void 0&&(e.tokens.input??0)>s.long_context_threshold_tokens,d=a==="priority"||a==="fast",p=d&&!u,f=s?p?s.priority_input_per_million_usd??null:s.input_per_million_usd:null,S=s?p?s.priority_cached_input_per_million_usd??null:s.cached_input_per_million_usd:null,h=s?p?s.priority_output_per_million_usd??null:s.output_per_million_usd:null,v=s?p?s.priority_reasoning_per_million_usd??s.priority_output_per_million_usd??null:s.reasoning_per_million_usd??s.output_per_million_usd:null,E=l?.estimated_usd!==null&&l!==null?l:c,x=E?.estimated_usd??null,F=c?.estimated_usd??null,Z=e.cost.usd,W=Z??x,ue=e.cost.brl??l?.estimated_brl??(W!==null&&i!==null?Math.round(W*i.rate*1e6)/1e6:null);return{provider:o,model:r,serviceTier:a,uncachedInputTokens:e.tokens.input===null?null:Math.max(e.tokens.input-(e.tokens.cached_input??0),0),visibleOutputTokens:e.tokens.output===null?null:Math.max(e.tokens.output-(e.tokens.reasoning??0),0),inputRate:f,cachedRate:S,outputRate:h,reasoningRate:v,contextInputMultiplier:s?u?s.long_context_input_multiplier:1:null,contextOutputMultiplier:s?u?s.long_context_output_multiplier:1:null,speedCostMultiplier:x!==null&&F!==null&&F>0?Math.round(x/F*1e3)/1e3:null,pricingScenario:d&&u?"standard_long_context_fallback":d?"priority":"standard",standardUsd:F,speedUpliftUsd:x!==null&&F!==null?Math.round((x-F)*1e6)/1e6:null,inputUsd:E?.input_usd??null,cachedInputUsd:E?.cached_input_usd??null,outputUsd:E?.output_usd??null,reasoningUsd:E?.reasoning_usd??null,calculatedUsd:x,recordedUsd:Z,effectiveUsd:W,effectiveBrl:ue,varianceUsd:Z!==null&&x!==null?Math.round((Z-x)*1e6)/1e6:null,pricingModel:E?.pricing_model??null,pricingSource:E?.pricing_source??null,fxRate:e.cost.fx_rate??i?.rate??null}}function yt(e){let t=Object.fromEntries(new Intl.DateTimeFormat("en",{timeZone:"America/Sao_Paulo",year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(new Date(e)).filter(n=>n.type!=="literal").map(n=>[n.type,n.value]));return`${t.year}-${t.month}-${t.day}`}function nc(e){let t=new Set;for(let r of e){t.add(r.startMs),t.add(r.endMs);for(let o=r.startMs;o<r.endMs;){let a=Date.parse(`${yt(new Date(o).toISOString())}T03:00:00.000Z`)+864e5;if(a>=r.endMs)break;t.add(a),o=a}}let n=[...t].sort((r,o)=>r-o),i=new Map;for(let r=0;r<n.length-1;r+=1){let o=n[r],a=n[r+1],s=e.filter(u=>u.startMs<a&&u.endMs>o);if(s.length===0||a<=o)continue;let l=(a-o)/s.length,c=yt(new Date(o).toISOString());for(let u of s){let d=`${u.activityRowId}:${c}`,p=i.get(d);i.set(d,{activityRowId:u.activityRowId,day:c,value:(p?.value??0)+l})}}return[...i.values()]}function Qe(e){return e==null?null:/^\d{4}-\d{2}-\d{2}$/.test(e)?e:yt(e)}function sd(e,t){let n=e.map(i=>i[t]).filter(i=>typeof i=="number"&&Number.isFinite(i));return n.length===0?null:n.reduce((i,r)=>i+r,0)}function vv(e,t){let n=e.includes("/artifacts/evidence/")?"evidence":e.includes("/artifacts/validations/")||e.includes("/artifacts/tests/")?"validation":null;if(n===null)return null;let i=/^---\r?\n([\s\S]*?)\r?\n---/.exec(t)?.[1]??"",r=a=>{let s=new RegExp(`^${a}:\\s*['"]?(.+?)['"]?\\s*$`,"m").exec(i)?.[1]?.trim();return s===void 0||s==="null"?null:s},o=r("observed_at")??r("executed_at")??r("created_at")??r("recorded_at");return o===null||Number.isNaN(Date.parse(o))?null:{kind:n,id:r("id")??e.slice(e.lastIndexOf("/")+1,-3),occurredAt:o,occurredDaySp:yt(o),taskId:r("task_id"),changeId:r("change_id"),runId:r("run_id")}}var kv=".local/sqlite/zaip-aios-dashboard.sqlite",ri="74",Ov=["zaip_aios_activities","zaip_dim_llm_model","zaip_dim_provider","zaip_dim_zaip_agent","cost_invocation_dimension_facts","cost_group_daily_projection","cost_group_entity_projection","developer_cost_projection","operations_work_projection"],ud=["zaip_activities_agent_run","zaip_activities_relationships","zaip_activities_task_day","zaip_activities_spec_day","zaip_activities_prd_day","zaip_activities_agent","zaip_activities_run_id","zaip_activities_run_hierarchy","zaip_activities_period","zaip_activities_period_invocation","zaip_activities_status","zaip_activities_payload","zaip_activities_work_item_identity","cost_dimension_facts_day_model","cost_dimension_facts_day_provider","cost_dimension_facts_invocation","cost_group_daily_projection_lookup","cost_group_entity_projection_lookup","developer_cost_projection_lookup"],wv=["zaip_vw_read_model_metadata","zaip_vw_operations_overview","zaip_vw_cost_overview","zaip_vw_cost_models","zaip_vw_cost_providers","zaip_vw_operations_agent_invocations"],VV=2*36e5;function ic(e){return(0,so.resolve)(process.env.ZAIP_SQLITE_DB_PATH??(0,so.resolve)(e,kv))}function cd(e){if(!(0,Ev.existsSync)(e))return new Map;let t;try{t=new Lr.DatabaseSync(e,{readOnly:!0});let n=t.prepare("SELECT source_path, source_hash, mtime_ms, ctime_ms, size_bytes, file_identity FROM zaip_vw_read_model_source_state").all();return new Map(n.flatMap(i=>{let r=typeof i.source_path=="string"?i.source_path:null,o=typeof i.source_hash=="string"?i.source_hash:null,a=typeof i.file_identity=="string"?i.file_identity:null,s=typeof i.mtime_ms=="number"?i.mtime_ms:typeof i.mtime_ms=="string"?Number(i.mtime_ms):Number.NaN,l=typeof i.ctime_ms=="number"?i.ctime_ms:typeof i.ctime_ms=="string"?Number(i.ctime_ms):Number.NaN;return r===null||o===null||a===null||!Number.isFinite(s)||!Number.isFinite(l)||typeof i.size_bytes!="number"?[]:[[r,{source:r,mtimeMs:s,ctimeMs:l,size:i.size_bytes,contentHash:o,fileIdentity:a}]]}))}catch{return new Map}finally{t?.close()}}function rc(e){let t=new Lr.DatabaseSync(e,{readOnly:!0});try{let n=t.prepare("PRAGMA integrity_check").get();if(n.integrity_check!=="ok")throw new Error(`SQLite integrity check failed for ${e}: ${n.integrity_check??"unknown"}`);let i=t.prepare("SELECT name, type FROM sqlite_master WHERE type IN ('table', 'view', 'index')").all(),r=i.filter(d=>d.type==="table").map(d=>d.name).sort(),o=[...Ov].sort();if(r.length!==o.length||r.some((d,p)=>d!==o[p]))throw new Error(`SQLite schema ${ri} requires the complete persisted table contract; found ${r.join(", ")||"none"}`);let a=new Set(i.map(d=>d.name)),s=wv.filter(d=>!a.has(d));if(s.length>0)throw new Error(`SQLite schema is missing required views: ${s.join(", ")}`);let l=i.filter(d=>d.type==="view").map(d=>d.name);if(l.some(d=>!d.startsWith("zaip_vw_")))throw new Error("SQLite persisted views must use the zaip_vw_ namespace");let c=ud.filter(d=>!a.has(d));if(c.length>0)throw new Error(`SQLite schema is missing required indexes: ${c.join(", ")}`);let u=t.prepare("SELECT value FROM zaip_vw_read_model_metadata WHERE key = ?").get("schema_version")?.value;if(u!==ri)throw new Error(`SQLite schema version must be ${ri}; found ${u??"missing"}`);return{schemaVersion:u,tableCount:r.length,viewCount:l.length,indexCount:i.filter(d=>d.type==="index"&&!d.name.startsWith("sqlite_")).length}}finally{t.close()}}function Sv(e){let t=e.prepare("SELECT name FROM sqlite_master WHERE type='index'").all(),n=new Set(t.map(i=>i.name));return ud.every(i=>n.has(i))&&Gh(e)}async function jD(e,t={}){let n=ic(e);if(t.preferExisting&&!t.forceCanonical)try{rc(n);let f=new Lr.DatabaseSync(n,{readOnly:!0});try{if(Sv(f)){let S=f.prepare("SELECT value FROM zaip_vw_read_model_metadata WHERE key = 'source_file_count'").get();return{files:Number(S.value),path:n,cache:"stale_seed",fingerprint_ms:0,materialize_ms:0,refresh:{reused_sources:0,processed_sources:0,added_sources:0,changed_sources:0,removed_sources:0,canonical_runs_refolded:0}}}}finally{f.close()}}catch{}let i=nd,r=performance.now();i("source_fingerprint_started",8,"Inventariando fontes can\xF4nicas.");let o=await ro(e,t.forceCanonical?{verifyContent:!0}:{previous:cd(n)}),a={reused_sources:o.reusedFiles,processed_sources:o.hashedFiles,added_sources:0,changed_sources:0,removed_sources:0,canonical_runs_refolded:0};i("source_fingerprint_ready",20,"Invent\xE1rio can\xF4nico conclu\xEDdo.");let s=`${o.fingerprint}
593
+ current_day=${yt(new Date().toISOString())}`,l=Math.round(performance.now()-r),c=lv(n,s,ri,Sv);if(c!==null&&!t.forceCanonical&&o.hashedFiles===0)return rc(n),{files:c,path:n,cache:"generation",fingerprint_ms:l,materialize_ms:0,refresh:a};i("source_inventory",52,`Encontradas ${o.candidates.length} fontes can\xF4nicas.`),await(0,ac.mkdir)((0,so.dirname)(n),{recursive:!0});let u=new Lr.DatabaseSync(n),d=0;try{u.exec("PRAGMA busy_timeout=180000; PRAGMA journal_mode=WAL; BEGIN IMMEDIATE;");try{o=await ro(e,t.forceCanonical?{verifyContent:!0}:{previous:cd(n)}),a={reused_sources:o.reusedFiles,processed_sources:o.hashedFiles,added_sources:0,changed_sources:0,removed_sources:0,canonical_runs_refolded:0},s=`${o.fingerprint}
594
+ current_day=${yt(new Date().toISOString())}`;let f=new Map((()=>{try{return u.prepare("SELECT path, content, content_sha256 FROM zaip_vw_files").all()}catch{return[]}})().map(m=>[m.path,m])),S=u.prepare("SELECT name, type FROM sqlite_master WHERE name NOT LIKE 'sqlite_%'").all(),h=!t.forceCanonical&&Ov.every(m=>S.some($=>$.type==="table"&&$.name===m))&&ud.every(m=>S.some($=>$.type==="index"&&$.name===m))&&wv.every(m=>S.some($=>$.type==="view"&&$.name===m))&&(()=>{try{let m=u.prepare("SELECT value FROM zaip_vw_read_model_metadata WHERE key='schema_version'").get();return u.prepare("SELECT source_path, ctime_ms, file_identity FROM zaip_vw_read_model_source_state LIMIT 1").all(),m?.value===ri}catch{return!1}})(),v=new Map((()=>{try{return u.prepare("SELECT source_path, source_hash FROM zaip_vw_read_model_source_state").all()}catch{return[]}})().map(m=>[m.source_path,m.source_hash]));a={...a,added_sources:o.candidates.filter(m=>!v.has(m.source)).length,changed_sources:o.candidates.filter(m=>{let $=v.get(m.source);return $!==void 0&&$!==m.contentHash}).length,removed_sources:[...v.keys()].filter(m=>!o.candidates.some($=>$.source===m)).length};let E=o.candidates.filter(m=>v.get(m.source)!==m.contentHash),x=[...v.keys()].filter(m=>!o.candidates.some($=>$.source===m));if(h&&E.length===0&&x.length===0){let m=u.prepare("SELECT value FROM zaip_vw_read_model_metadata WHERE key='source_fingerprint'").get(),$=cd(n);for(let L of o.candidates){let Ae=$.get(L.source);Ae&&(Ae.mtimeMs!==L.mtimeMs||Ae.ctimeMs!==L.ctimeMs||Ae.fileIdentity!==L.fileIdentity)&&u.prepare(`UPDATE zaip_aios_activities SET payload_json=json_set(payload_json,'$.mtime_ms',?,'$.ctime_ms',?,'$.file_identity',?,'$.size_bytes',?)
595
595
  WHERE payload_type='source_state' AND activity_key=?`).run(String(L.mtimeMs),String(L.ctimeMs),L.fileIdentity,L.size,`source_state:${L.source}`)}return u.prepare("UPDATE zaip_aios_activities SET payload_json=json_set(payload_json,'$.value',?) WHERE payload_type='metadata' AND activity_key='metadata:source_fingerprint'").run(s),m.value.split(`
596
596
  current_day=`)[1]!==s.split(`
597
- current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type IN ('cost_monitor_summary_month_cache','first_fold_monthly_quick_cache')"),Sv(e,u)),u.exec("COMMIT;"),{files:o.candidates.length,path:n,cache:"rebuilt",fingerprint_ms:l,materialize_ms:Math.round(performance.now()-r),refresh:a}}let F=new Map(o.candidates.map(m=>[m.source,m])),Z=new Set([...E.map(m=>m.source),...U]),V=h?u.prepare("SELECT * FROM zaip_aios_activities WHERE payload_type IS NULL").all():[],ce=h?u.prepare("SELECT * FROM zaip_vw_canonical_run_index").all():[],Se=h?u.prepare("SELECT * FROM zaip_vw_invocation_usage_segments").all():[],O=h?u.prepare("SELECT * FROM zaip_vw_attributed_token_active_facts").all():[],D=new Map(ce.map(m=>[m.run_id,m.duration_ms])),M=(m,$)=>{if(!(m.total_tokens>0)||$===null||$<0)return null;let L=Date.parse(m.source_started_at??m.occurred_at),Ae=Date.parse(m.source_finished_at??"")||L+$;return Number.isFinite(L)&&Number.isFinite(Ae)&&Ae>L?{activityRowId:m.activity_row_id,startMs:L,endMs:Ae}:null},C=V.flatMap(m=>{let $=M(m,D.get(m.run_id)??null);return $?[$]:[]}),z=[...Z].some(m=>m.startsWith(".agents/config/pricing/")||m===".agents/config/agents/catalog.yaml"||m===".agents/config/clients.yaml"||m.includes("/historical-developer-attribution/")),W=[...Z].some(m=>/^\.agents\/(?:data|records)\/(tasks|specs|prds)\//.test(m)),de=new Set;if(h)for(let m of Z){if(!/^\.agents\/(?:data|records)\/specs\//.test(m))continue;let $=u.prepare("SELECT payload_json FROM zaip_aios_activities WHERE payload_type='parsed_source' AND activity_key=?").get(`parsed_source:entities:${m}`);if($)for(let[,L]of JSON.parse($.payload_json))L.creationRunId&&de.add(L.creationRunId)}let te=new Set(V.filter(m=>z||Z.has(m.source_path)).map(m=>String(m.run_id)));for(let m of Z){let $=/^\.agents\/(?:data|records)\/runs\/.*\/([^/]+)\.jsonl$/.exec(m);$?.[1]&&te.add($[1])}let se=!0;for(;se;){se=!1;for(let m of V)te.has(m.parent_run_id)&&!te.has(m.run_id)&&(te.add(m.run_id),se=!0)}let b=m=>`"${m.replaceAll('"','""')}"`;if(h){u.exec(`
597
+ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type IN ('cost_monitor_summary_month_cache','first_fold_monthly_quick_cache')"),bv(e,u)),u.exec("COMMIT;"),{files:o.candidates.length,path:n,cache:"rebuilt",fingerprint_ms:l,materialize_ms:Math.round(performance.now()-r),refresh:a}}let F=new Map(o.candidates.map(m=>[m.source,m])),Z=new Set([...E.map(m=>m.source),...x]),W=h?u.prepare("SELECT * FROM zaip_aios_activities WHERE payload_type IS NULL").all():[],ue=h?u.prepare("SELECT * FROM zaip_vw_canonical_run_index").all():[],be=h?u.prepare("SELECT * FROM zaip_vw_invocation_usage_segments").all():[],O=h?u.prepare("SELECT * FROM zaip_vw_attributed_token_active_facts").all():[],U=new Map(ue.map(m=>[m.run_id,m.duration_ms])),M=(m,$)=>{if(!(m.total_tokens>0)||$===null||$<0)return null;let L=Date.parse(m.source_started_at??m.occurred_at),Ae=Date.parse(m.source_finished_at??"")||L+$;return Number.isFinite(L)&&Number.isFinite(Ae)&&Ae>L?{activityRowId:m.activity_row_id,startMs:L,endMs:Ae}:null},C=W.flatMap(m=>{let $=M(m,U.get(m.run_id)??null);return $?[$]:[]}),z=[...Z].some(m=>m.startsWith(".agents/config/pricing/")||m===".agents/config/agents/catalog.yaml"||m===".agents/config/clients.yaml"||m.includes("/historical-developer-attribution/")),V=[...Z].some(m=>/^\.agents\/(?:data|records)\/(tasks|specs|prds)\//.test(m)),_e=new Set;if(h)for(let m of Z){if(!/^\.agents\/(?:data|records)\/specs\//.test(m))continue;let $=u.prepare("SELECT payload_json FROM zaip_aios_activities WHERE payload_type='parsed_source' AND activity_key=?").get(`parsed_source:entities:${m}`);if($)for(let[,L]of JSON.parse($.payload_json))L.creationRunId&&_e.add(L.creationRunId)}let ne=new Set(W.filter(m=>z||Z.has(m.source_path)).map(m=>String(m.run_id)));for(let m of Z){let $=/^\.agents\/(?:data|records)\/runs\/.*\/([^/]+)\.jsonl$/.exec(m);$?.[1]&&ne.add($[1])}let ce=!0;for(;ce;){ce=!1;for(let m of W)ne.has(m.parent_run_id)&&!ne.has(m.run_id)&&(ne.add(m.run_id),ce=!0)}let b=m=>`"${m.replaceAll('"','""')}"`;if(h){u.exec(`
598
598
  DELETE FROM zaip_aios_activities
599
599
  WHERE payload_type IS NOT NULL AND payload_type NOT IN ('file', 'source_state', 'parsed_source', 'usage_segment', 'run_index', 'duration_allocation', 'shared_creation_allocation', 'work_item', 'execution', 'change', 'decision', 'cost_dimension_aggregate_v1', 'cost_agent_invocation_projection_v1');
600
600
  DELETE FROM zaip_dim_zaip_agent;
@@ -653,8 +653,8 @@ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type
653
653
  occurred_day_sp TEXT NOT NULL,
654
654
  attributed_token_active_ms REAL NOT NULL,
655
655
  PRIMARY KEY(activity_row_id, occurred_day_sp)
656
- );`),u.exec("CREATE INDEX IF NOT EXISTS zaip_activities_payload ON zaip_aios_activities(payload_type, activity_key)");let N=new Gs(u),A=m=>F.get(m)?.contentHash??"",B=(m,$)=>{if(!$.length)return;let L=Object.keys($[0]),Ae=u.prepare(`INSERT INTO ${m}(${L.join(",")}) VALUES (${L.map(()=>"?").join(",")})`);for(let Te of $)Ae.run(...L.map(Ne=>Te[Ne]??null))};B("canonical_run_index",ce.filter(m=>!te.has(m.run_id)));let ie=new Set(V.filter(m=>te.has(m.run_id)).map(m=>m.agent_invocation_id));B("invocation_usage_segments",Se.filter(m=>!ie.has(m.agent_invocation_id))),B("attributed_token_active_facts",O);for(let m of te)u.prepare("DELETE FROM zaip_aios_activities WHERE payload_type IS NULL AND run_id=?").run(m);for(let m of U)u.prepare("DELETE FROM zaip_aios_activities WHERE payload_type='parsed_source' AND source_path=?").run(m);let x=u.prepare("INSERT INTO files(path, content, mtime_ms, size_bytes, content_sha256, artifact_kind, artifact_id, artifact_occurred_at, artifact_occurred_day_sp, artifact_task_id, artifact_change_id, artifact_run_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"),J=u.prepare("INSERT INTO read_model_source_state(source_path, source_hash, mtime_ms, ctime_ms, size_bytes, file_identity, source_kind, last_processed_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?)"),K=0,Ze=0,qt=32;for(let m=0;m<o.candidates.length;m+=qt){let $=o.candidates.slice(m,m+qt),L=await Promise.all($.map(async Te=>{let Ne=f.get(Te.source);if(Ne?.content_sha256===Te.contentHash)return Ne.content;let tt=await(0,ic.readFile)(Te.path,"utf8");if((0,oo.createHash)("sha256").update(tt).digest("hex")!==Te.contentHash)throw new Error(`Canonical source changed during refresh: ${Te.source}`);return tt}));for(let Te=0;Te<$.length;Te+=1){let Ne=$[Te],tt=L[Te];if(Ne===void 0||tt===void 0)continue;let{source:it,mtimeMs:Wt,ctimeMs:ht,size:nt,fileIdentity:lt}=Ne,ze=Ne.contentHash,Ge=it.includes("/runs/")?"run":it.includes("/artifacts/evidence/")?"evidence":it.includes("/artifacts/validations/")||it.includes("/artifacts/tests/")?"validation":it.startsWith(".agents/config/")?"config":"entity",At=N.read("artifact",it,ze,()=>hv(it,tt));x.run(it,tt,Wt,nt,ze,At?.kind??null,At?.id??null,At?.occurredAt??null,At?.occurredDaySp??null,At?.taskId??null,At?.changeId??null,At?.runId??null),J.run(it,ze,String(Wt),String(ht),nt,lt,Ge,new Date().toISOString()),K+=1}let Ae=52+Math.round((m+$.length)/o.candidates.length*20);i("source_import",Ae,`Lidas ${Math.min(m+$.length,o.candidates.length)} de ${o.candidates.length} fontes.`)}i("projection_build",74,"Organizando fatos e proje\xE7\xF5es do banco local.");let ct=u.prepare("SELECT path, content FROM files WHERE (path LIKE '.agents/data/%' OR path LIKE '.agents/records/%') AND path NOT LIKE '.agents/data/runs/%' AND path NOT LIKE '.agents/records/runs/%' ORDER BY CASE WHEN path LIKE '.agents/data/%' THEN 1 ELSE 0 END, path").all(),he=new Map(ct.flatMap(m=>N.read("entities",m.path,A(m.path),()=>[...id([m])])));for(let m of ct)if(Z.has(m.path)&&/^\.agents\/(?:data|records)\/specs\//.test(m.path))for(let[,$]of N.read("entities",m.path,A(m.path),()=>[...id([m])]))$.creationRunId&&de.add($.creationRunId);let P=u.prepare("INSERT INTO canonical_work_items(entity_kind, id, title, status, stage, risk, spec_id, change_id, creation_run_id, completed_run_id, occurred_at, occurred_day_sp) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");for(let m of he.values())m.kind!=="task"&&m.kind!=="spec"&&m.kind!=="prd"||m.occurredAt===null||Number.isNaN(Date.parse(m.occurredAt))||P.run(m.kind,m.id,m.title,m.status,m.stage,m.risk,m.specId,m.changeId,m.creationRunId,m.completedRunId,m.occurredAt,yt(m.occurredAt));let oe={executions:[],changes:[],decisions:[]};for(let m of ct){let $=N.read("lifecycle",m.path,A(m.path),()=>_v([m]));oe.executions.push(...$.executions),oe.changes.push(...$.changes),oe.decisions.push(...$.decisions)}oe.executions=[...new Map(oe.executions.map(m=>[m.id,m])).values()],oe.changes=[...new Map(oe.changes.map(m=>[m.id,m])).values()],oe.decisions=[...new Map(oe.decisions.map(m=>[m.id,m])).values()];let Ee=u.prepare("INSERT INTO canonical_executions(id, status, kind, origin_type, origin_id, created_at, occurred_day_sp, finished_at, source_path) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)");for(let m of oe.executions)Ee.run(m.id,m.status,m.kind,m.originType,m.originId,m.createdAt,yt(m.createdAt),m.finishedAt,m.sourcePath);let Ue=u.prepare("INSERT INTO canonical_changes(id, title, status, risk, source_type, source_id, source_spec_id, source_prd_id, requirement_ids_json, acceptance_ids_json, task_ids_json, result, created_at, occurred_day_sp, source_path) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");for(let m of oe.changes)Ue.run(m.id,m.title,m.status,m.risk,m.sourceType,m.sourceId,m.sourceSpecId,m.sourcePrdId,JSON.stringify(m.requirementIds),JSON.stringify(m.acceptanceIds),JSON.stringify(m.taskIds),m.result,m.createdAt,yt(m.createdAt),m.sourcePath);let et=u.prepare("INSERT INTO canonical_decisions(id, title, origin, scope_type, scope_id, created_at, occurred_day_sp, source_path) VALUES (?, ?, ?, ?, ?, ?, ?, ?)");for(let m of oe.decisions)et.run(m.id,m.title,m.origin,m.scopeType,m.scopeId,m.createdAt,yt(m.createdAt),m.sourcePath);let Vt=u.prepare("SELECT content FROM files WHERE path = ?").get(".agents/config/agents/catalog.yaml")?.content,ir=u.prepare("SELECT content FROM files WHERE path = ?").get(".agents/config/clients.yaml")?.content,Mr=pv(Vt,ir),oc=Vt===void 0?null:(0,oo.createHash)("sha256").update(Vt).digest("hex"),wv=u.prepare("SELECT content FROM files WHERE path = ?").get(".agents/config/pricing/models.json")?.content,so=By.parse(JSON.parse(wv??'{"schema_version":1,"updated_at":"1970-01-01T00:00:00.000Z","source":"missing","disclaimer":"missing","models":[]}')),ac=gv(u.prepare("SELECT path, content FROM files WHERE path LIKE '.agents/config/pricing/fx/%.json'").all()),sc=u.prepare("SELECT path, content, content_sha256 FROM files WHERE (path LIKE '.agents/data/runs/%.jsonl' OR path LIKE '.agents/records/runs/%.jsonl') ORDER BY CASE WHEN path LIKE '.agents/data/%' THEN 1 ELSE 0 END, path").all(),Av=u.prepare("SELECT content FROM files WHERE path LIKE '.agents/data/lifecycle/historical-developer-attribution/%.json' OR path LIKE '.agents/records/lifecycle/historical-developer-attribution/%.json'").all().flatMap(m=>{try{return[JSON.parse(m.content)]}catch{return[]}}),Tv=(m,$)=>{let L=ni($);if(L!==null&&typeof L.account_id=="string"&&typeof L.login_snapshot=="string")return{accountId:L.account_id,login:L.login_snapshot,source:typeof L.attribution_source=="string"?L.attribution_source:"native"};for(let Ae of Av)try{let Te=Pu({manifest:Ae,run_id:String(JSON.parse(m.content.split(/\r?\n/u)[0]??"{}").run_id??""),path:m.path,content:m.content});if(Te!==null)return{accountId:Te.account_id,login:Te.login_snapshot,source:Te.attribution_source}}catch{}return null},cc=new Map(sc.map(m=>[m.path.split("/").at(-1).replace(/\.jsonl$/,""),m]));for(let m of V){let $=sc.find(Ae=>Ae.path===m.source_path),L=cc.get(m.run_id);$&&(L===void 0||!L.path.startsWith(".agents/data/"))&&cc.set(m.run_id,$)}let lc=new Map,ud=m=>N.read("fold",m.path,m.content_sha256,()=>(a.canonical_runs_refolded+=1,Wu(Vu(m.content)))),dd=m=>{let $=lc.get(m);if($)return $;let L=cc.get(m);if(L)return{row:L,fold:ud(L)}};for(let m of sc){let $=V.find(Ae=>Ae.source_path===m.path);if(h&&$&&!te.has($.run_id)&&!Z.has(m.path))continue;let L=ud(m);te.add(L.run.run_id),lc.set(L.run.run_id,{row:m,fold:L})}let _d=m=>{let $=m,L=new Set;for(;$.run.parent_run_id!==null&&!L.has($.run.run_id);){L.add($.run.run_id);let Ae=dd($.run.parent_run_id)?.fold;if(Ae===void 0)break;$=Ae}return $.run.run_id},co=["activity_row_id","activity_source_kind","activity_key","source_path","source_hash","source_occurred_at","recorded_at","version_activity_id","source_last_event_id","source_last_sequence","work_item_kind","title","work_item_status","work_stage","risk","run_role","root_run_id","parent_run_id","agent_run_id","root_agent_run_id","parent_agent_run_id","agent_run_role","delegation_depth","agent_invocation_id","root_agent_invocation_id","parent_agent_invocation_id","invocation_kind","execution_id","task_id","spec_id","prd_id","change_id","conversation_id","run_id","occurred_at","occurred_day_sp","execution_kind","entrypoint","work_type","phase","purpose","status","activity_kind","zaip_agent","zaip_agent_persona","zaip_agent_job","zaip_agent_role","agent_catalog_id","agent_catalog_hash","client","provider","model","service_tier","reasoning_effort","developer_account_id","developer_login","developer_attribution_source","source_duration_ms","source_started_at","source_finished_at","duration_ms","duration_provenance","input_tokens","cached_input_tokens","output_tokens","reasoning_tokens","total_tokens","token_source","usage_event_count","llm_call_count","cost_usd","cost_brl","cost_method","pricing_model","pricing_source","fx_rate","source_event_count","root_run_duration","sub_run_duration","payload_type","payload_json"],pd=u.prepare(`INSERT INTO zaip_aios_activities(${co.join(",")}) VALUES (${co.map(()=>"?").join(",")})`),fd=u.prepare("INSERT INTO attributed_token_active_facts(activity_row_id, occurred_day_sp, attributed_token_active_ms) VALUES (?, ?, ?)"),Nv=u.prepare("INSERT INTO invocation_usage_segments VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"),Iv=u.prepare("INSERT INTO canonical_run_index(run_id, occurred_at, occurred_day_sp, task_id, phase, run_role, duration_ms, source_event_count, zaip_agent, provider, model, status) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"),uc=V.filter(m=>!te.has(m.run_id)&&m.agent_invocation_id===null).length,Rv=0,md=C.filter(m=>!V.some($=>$.activity_row_id===m.activityRowId&&te.has($.run_id))),gd=[];for(let{row:m,fold:$}of lc.values()){let L=$.run,Ae=Tv(m,L.developer_identity??null),Te=$.effective_usage_records,Ne=L.agent_invocation_id??null,tt=Ne!==null,it=L.parent_run_id===null?"root":"subrun",Wt=tt?L.parent_agent_invocation_id===null?"root":"subagent":null,ht=Zt(Te,"total"),nt=mv(Te,$),lt=od(Te,$,so,ac),ze=Te.filter(we=>typeof we.tokens.total=="number"||typeof we.cost.usd=="number"||typeof we.cost.brl=="number"),Ge=Ft(ze.map(we=>we.model??L.model))??(L.model==="unavailable"?null:L.model),At=Ft(ze.map(we=>io(we.provider,we.model??L.model,L.client)))??io(L.provider,Ge,L.client),ii=L.agent_name??L.agent;Iv.run(L.run_id,L.occurred_at,yt(L.occurred_at),L.task_id,L.phase,it,nt.effective,$.records.length,ii,At,Ge,$.status);let or=Mr.get(ii)??Mr.get(L.agent),vr=L.task_id===null?L.spec_id===null?L.prd_id===null?null:he.get(`prd:${L.prd_id}`):he.get(`spec:${L.spec_id}`):he.get(`task:${L.task_id}`),ar=new Set([...$.model_call_records.map(we=>we.call_id),...Te.map(we=>we.model_call_id).filter(we=>typeof we=="string")]),fc=$.records.at(-1),mc=`ACTV-${(0,oo.createHash)("sha256").update(`run:${L.run_id}`).digest("hex").slice(0,24)}`,qv={activity_row_id:mc,activity_source_kind:tt?"agent_run":"unassisted_turn",activity_key:`run:${L.run_id}`,source_path:m.path,source_hash:m.content_sha256,source_occurred_at:Te.map(we=>we.source_occurred_at).filter(we=>typeof we=="string").sort()[0]??L.occurred_at,recorded_at:fc.occurred_at,version_activity_id:null,source_last_event_id:fc.event_id,source_last_sequence:fc.sequence,work_item_kind:vr?.kind??null,title:vr?.title??null,work_item_status:vr?.status??null,work_stage:vr?.stage??null,risk:vr?.risk??null,run_role:it,root_run_id:_d($),parent_run_id:L.parent_run_id,agent_run_id:Ne,root_agent_run_id:L.root_agent_invocation_id??Ne,parent_agent_run_id:L.parent_agent_invocation_id??null,agent_run_role:Wt,delegation_depth:L.delegation_depth??null,agent_invocation_id:Ne,root_agent_invocation_id:L.root_agent_invocation_id??Ne,parent_agent_invocation_id:L.parent_agent_invocation_id??null,invocation_kind:L.invocation_kind??null,execution_id:L.execution_id,task_id:L.task_id,spec_id:L.spec_id,prd_id:L.prd_id,change_id:L.change_id,conversation_id:L.conversation_id,run_id:L.run_id,occurred_at:L.occurred_at,occurred_day_sp:yt(L.occurred_at),execution_kind:L.execution_kind??null,entrypoint:L.entrypoint,work_type:L.work_type,phase:L.phase,purpose:L.run_purpose??null,status:$.status,activity_kind:fv({execution_id:L.execution_id,task_id:L.task_id,spec_id:L.spec_id,prd_id:L.prd_id,phase:L.phase,purpose:L.run_purpose??null}),zaip_agent:ii,zaip_agent_persona:or?.persona??null,zaip_agent_job:or?.job??null,zaip_agent_role:or?.role??null,agent_catalog_id:or?.catalogId??null,agent_catalog_hash:oc,client:L.client,provider:At,model:Ge,service_tier:Ft(Te.map(we=>we.runtime?.service_tier??null)),reasoning_effort:Ft(Te.map(we=>we.runtime?.reasoning_effort??null))??L.reasoning_effort??null,developer_account_id:Ae?.accountId??null,developer_login:Ae?.login??null,developer_attribution_source:Ae?.source??null,source_duration_ms:nt.source,source_started_at:nt.sourceStartedAt,source_finished_at:nt.sourceFinishedAt,duration_ms:nt.effective,duration_provenance:nt.provenance,input_tokens:Zt(Te,"input"),cached_input_tokens:Zt(Te,"cached_input"),output_tokens:Zt(Te,"output"),reasoning_tokens:Zt(Te,"reasoning"),total_tokens:ht,token_source:Ft(Te.map(we=>we.tokens.source)),usage_event_count:Te.length,llm_call_count:ar.size>0?ar.size:null,cost_usd:lt.usd,cost_brl:lt.brl,cost_method:lt.method,pricing_model:lt.pricingModel,pricing_source:lt.pricingSource,fx_rate:lt.fxRate,source_event_count:$.records.length,root_run_duration:it==="root"?nt.effective:null,sub_run_duration:it==="subrun"?nt.effective:null,payload_type:null,payload_json:null};if(pd.run(...co.map(we=>qv[we]??null)),ht!==null&&ht>0&&nt.effective!==null&&nt.effective>=0){let we=Date.parse(nt.sourceStartedAt??L.occurred_at),Xn=Date.parse(nt.sourceFinishedAt??"")||we+nt.effective;Number.isFinite(we)&&Number.isFinite(Xn)&&Xn>we?md.push({activityRowId:mc,startMs:we,endMs:Xn}):nt.effective===0&&gd.push({activityRowId:mc,day:yt(L.occurred_at)})}if(Ne!==null)for(let we of Te){let Xn=we.tokens,qe=yv(we,$,so,ac);Nv.run(Ne,we.provider??null,we.model??null,qe.serviceTier,we.runtime?.reasoning_effort??null,Xn.input,Xn.cached_input,qe.uncachedInputTokens,Xn.output,Xn.reasoning,qe.visibleOutputTokens,Xn.total,qe.inputRate,qe.cachedRate,qe.outputRate,qe.reasoningRate,qe.contextInputMultiplier,qe.contextOutputMultiplier,qe.speedCostMultiplier,qe.pricingScenario,qe.standardUsd,qe.speedUpliftUsd,qe.inputUsd,qe.cachedInputUsd,qe.outputUsd,qe.reasoningUsd,qe.calculatedUsd,qe.recordedUsd,qe.varianceUsd,qe.effectiveUsd,qe.effectiveBrl,qe.recordedUsd!==null?"canonical_recorded":"token_pricing_estimate",qe.pricingModel,qe.pricingSource,qe.fxRate)}tt||(uc+=1)}let yd=new Set(V.filter(m=>te.has(m.run_id)).map(m=>String(m.activity_row_id)));for(let m of u.prepare("SELECT activity_row_id,run_id FROM zaip_aios_activities WHERE payload_type IS NULL").all())te.has(m.run_id)&&yd.add(m.activity_row_id);let dc=Xh(C,md,yd);for(let m of dc.ids)u.prepare("DELETE FROM attributed_token_active_facts WHERE activity_row_id=?").run(m);for(let m of ec(dc.intervals))fd.run(m.activityRowId,m.day,m.value);for(let m of gd)fd.run(m.activityRowId,m.day,0);let $v=u.prepare(`UPDATE zaip_aios_activities SET duration_ms=?,duration_provenance=?
657
- WHERE activity_row_id=? AND (duration_ms IS NOT ? OR duration_provenance IS NOT ?)`),_c=new Set(te);for(let m of dc.ids){let $=u.prepare("SELECT SUM(attributed_token_active_ms) value,COUNT(*) count FROM attributed_token_active_facts WHERE activity_row_id=?").get(m),L=$.count?"attributed_token_active":null;$v.run($.value,L,m,$.value,L);let Ae=u.prepare("SELECT run_id FROM zaip_aios_activities WHERE activity_row_id=?").get(m);Ae&&_c.add(Ae.run_id)}if(W)for(let m of u.prepare("SELECT activity_row_id,task_id,spec_id,prd_id,change_id,execution_id,conversation_id FROM zaip_aios_activities WHERE payload_type IS NULL").all()){let $=m.task_id!==null?he.get(`task:${m.task_id}`):m.spec_id!==null?he.get(`spec:${m.spec_id}`):m.prd_id!==null?he.get(`prd:${m.prd_id}`):null,L=[$?.kind??null,$?.title??null,$?.status??null,$?.stage??null,$?.risk??null];u.prepare("UPDATE zaip_aios_activities SET work_item_kind=?,title=?,work_item_status=?,work_stage=?,risk=? WHERE activity_row_id=? AND (work_item_kind IS NOT ? OR title IS NOT ? OR work_item_status IS NOT ? OR work_stage IS NOT ? OR risk IS NOT ?)").run(...L,m.activity_row_id,...L)}let pc=new Map;for(let m of he.values())m.kind!=="spec"||m.creationRunId===null||pc.set(m.creationRunId,[...pc.get(m.creationRunId)??[],m]);for(let m of u.prepare("SELECT DISTINCT run_id FROM zaip_aios_activities WHERE payload_type='shared_creation_allocation'").all())(de.has(m.run_id)||_c.has(m.run_id))&&u.prepare("DELETE FROM zaip_aios_activities WHERE payload_type='shared_creation_allocation' AND run_id=?").run(m.run_id);(()=>{for(let[m,$]of pc){if($.length===0||h&&!de.has(m)&&!_c.has(m))continue;let L=dd(m);if(L===void 0)continue;let{fold:Ae,row:Te}=L,Ne=Ae.run,tt=Ae.effective_usage_records,it=u.prepare("SELECT duration_ms, duration_provenance, source_started_at, source_finished_at FROM zaip_aios_activities WHERE run_id=? AND payload_type IS NULL LIMIT 1").get(m),Wt=od(tt,Ae,so,ac),ht=$.map(ze=>ze.id),nt=it?.duration_ms??null,lt={source_duration_ms:zt(nt,ht),duration_ms:zt(nt,ht),input_tokens:zt(Zt(tt,"input"),ht),cached_input_tokens:zt(Zt(tt,"cached_input"),ht),output_tokens:zt(Zt(tt,"output"),ht),reasoning_tokens:zt(Zt(tt,"reasoning"),ht),total_tokens:zt(Zt(tt,"total"),ht),cost_usd:zt(Wt.usd,ht),cost_brl:zt(Wt.brl,ht)};for(let ze of $){let Ge=tt.find(ar=>ar.attributed_spec_id===ze.id)??null,At=Ge?.source_started_at&&Ge?.source_finished_at?Math.max(0,Date.parse(Ge.source_finished_at)-Date.parse(Ge.source_started_at)):null,ii=`ACTV-${(0,oo.createHash)("sha256").update(`shared-creation:${m}:${ze.id}`).digest("hex").slice(0,24)}`,or=Ae.records.at(-1),vr={activity_row_id:ii,activity_source_kind:"shared_creation_allocation",activity_key:`shared-creation:${m}:${ze.id}`,source_path:Te.path,source_hash:Te.content_sha256,source_occurred_at:Ne.occurred_at,recorded_at:or?.occurred_at??Ne.occurred_at,version_activity_id:null,source_last_event_id:or?.event_id??null,source_last_sequence:or?.sequence??null,work_item_kind:"spec",title:ze.title,work_item_status:ze.status,work_stage:ze.stage,risk:ze.risk,run_role:"shared_creation_allocation",root_run_id:_d(Ae),parent_run_id:Ne.parent_run_id,agent_run_id:null,root_agent_run_id:null,parent_agent_run_id:null,agent_run_role:null,delegation_depth:Ne.delegation_depth??null,agent_invocation_id:null,root_agent_invocation_id:null,parent_agent_invocation_id:null,invocation_kind:null,execution_id:Ne.execution_id,task_id:null,spec_id:ze.id,prd_id:null,change_id:null,conversation_id:Ne.conversation_id,run_id:Ne.run_id,occurred_at:Ne.occurred_at,occurred_day_sp:yt(Ne.occurred_at),execution_kind:Ne.execution_kind??null,entrypoint:Ne.entrypoint,work_type:Ne.work_type,phase:Ne.phase,purpose:Ne.run_purpose??null,status:Ae.status,activity_kind:"planning",zaip_agent:Ne.agent_name??Ne.agent,zaip_agent_persona:null,zaip_agent_job:null,zaip_agent_role:null,agent_catalog_id:null,agent_catalog_hash:oc,client:Ne.client,provider:null,model:null,service_tier:null,reasoning_effort:Ne.reasoning_effort??null,developer_account_id:null,developer_login:null,developer_attribution_source:null,source_duration_ms:At??lt.source_duration_ms.get(ze.id)??null,source_started_at:Ge?.source_started_at??it?.source_started_at??null,source_finished_at:Ge?.source_finished_at??it?.source_finished_at??null,duration_ms:At??lt.duration_ms.get(ze.id)??null,duration_provenance:Ge?"explicit_spec_turn_recovery":"shared_creation_allocation",input_tokens:Ge?.tokens.input??lt.input_tokens.get(ze.id)??null,cached_input_tokens:Ge?.tokens.cached_input??lt.cached_input_tokens.get(ze.id)??null,output_tokens:Ge?.tokens.output??lt.output_tokens.get(ze.id)??null,reasoning_tokens:Ge?.tokens.reasoning??lt.reasoning_tokens.get(ze.id)??null,total_tokens:Ge?.tokens.total??lt.total_tokens.get(ze.id)??null,token_source:Ft(tt.map(ar=>ar.tokens.source)),usage_event_count:tt.length,llm_call_count:null,cost_usd:Ge?.cost.usd??lt.cost_usd.get(ze.id)??null,cost_brl:Ge?.cost.brl??lt.cost_brl.get(ze.id)??null,cost_method:Wt.method,pricing_model:Wt.pricingModel,pricing_source:Wt.pricingSource,fx_rate:Wt.fxRate,source_event_count:Ae.records.length,root_run_duration:null,sub_run_duration:null,payload_type:"shared_creation_allocation",payload_json:JSON.stringify({provenance:Ge?"explicit_spec_turn_recovery":"shared_creation_allocation",base_duration_provenance:it?.duration_provenance??null,creation_run_id:m,spec_id:ze.id})};pd.run(...co.map(ar=>vr[ar]??null))}}})();let Cv=Number(u.prepare("SELECT COUNT(*) count FROM zaip_aios_activities WHERE payload_type IS NULL").get().count),Lv=u.prepare("SELECT COUNT(*) AS count FROM zaip_aios_activities WHERE agent_invocation_id IS NOT NULL").get().count;u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("source_file_count",String(K)),u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("excluded_source_count",String(Ze));let Mv=u.prepare("SELECT COUNT(DISTINCT occurred_day_sp) AS count FROM zaip_aios_activities WHERE occurred_day_sp IS NOT NULL").get().count,Uv=u.prepare("SELECT COUNT(*) AS count FROM zaip_aios_activities WHERE payload_type IS NULL OR payload_type='shared_creation_allocation'").get().count,xv=u.prepare("SELECT COUNT(*) AS count FROM zaip_aios_activities WHERE activity_source_kind = 'agent_run'").get().count;u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("daily_aggregate_count",String(Mv)),u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("activity_count",String(Uv)),u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("canonical_run_count",String(Cv)),u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("excluded_unknown_token_run_count",String(Rv)),u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("agent_run_count",String(xv)),u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("telemetry_summary_count","0"),u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("unassisted_activity_count",String(uc)),u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("unassisted_turn_count",String(uc)),u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("agent_invocation_count",String(Lv)),u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("schema_version",ri),u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("source_fingerprint",s);let Pv=u.prepare("INSERT OR IGNORE INTO zaip_dim_llm_model(model) VALUES (?)"),Dv=u.prepare("INSERT OR IGNORE INTO zaip_dim_provider(provider) VALUES (?)");for(let m of so.models)Pv.run(m.id),Dv.run(m.provider);let hd=Mh(u,Mr),Kt=(m,$,L=!1)=>Xs(u,m,$);Kt("metadata","SELECT key AS row_key, json_object('key', key, 'value', value) AS payload_json FROM read_model_metadata"),Kt("source_state","SELECT source_path AS row_key, json_object('source_path', source_path, 'source_hash', source_hash, 'mtime_ms', mtime_ms, 'ctime_ms', ctime_ms, 'size_bytes', size_bytes, 'file_identity', file_identity, 'source_kind', source_kind, 'last_processed_at', last_processed_at) AS payload_json FROM read_model_source_state",!0),Kt("file","SELECT path AS row_key, json_object('path', path, 'content', content, 'mtime_ms', mtime_ms, 'size_bytes', size_bytes, 'content_sha256', content_sha256, 'artifact_kind', artifact_kind, 'artifact_id', artifact_id, 'artifact_occurred_at', artifact_occurred_at, 'artifact_occurred_day_sp', artifact_occurred_day_sp, 'artifact_task_id', artifact_task_id, 'artifact_change_id', artifact_change_id, 'artifact_run_id', artifact_run_id) AS payload_json FROM files",!0),Kt("work_item","SELECT entity_kind || ':' || id AS row_key, json_object('entity_kind', entity_kind, 'id', id, 'title', title, 'status', status, 'stage', stage, 'risk', risk, 'spec_id', spec_id, 'change_id', change_id, 'creation_run_id', creation_run_id, 'completed_run_id', completed_run_id, 'occurred_at', occurred_at, 'occurred_day_sp', occurred_day_sp) AS payload_json FROM canonical_work_items"),Kt("execution","SELECT id AS row_key, json_object('id', id, 'status', status, 'kind', kind, 'origin_type', origin_type, 'origin_id', origin_id, 'created_at', created_at, 'occurred_day_sp', occurred_day_sp, 'finished_at', finished_at, 'source_path', source_path) AS payload_json FROM canonical_executions"),Kt("change","SELECT id AS row_key, json_object('id', id, 'title', title, 'status', status, 'risk', risk, 'source_type', source_type, 'source_id', source_id, 'source_spec_id', source_spec_id, 'source_prd_id', source_prd_id, 'requirement_ids_json', requirement_ids_json, 'acceptance_ids_json', acceptance_ids_json, 'task_ids_json', task_ids_json, 'result', result, 'created_at', created_at, 'occurred_day_sp', occurred_day_sp, 'source_path', source_path) AS payload_json FROM canonical_changes"),Kt("decision","SELECT id AS row_key, json_object('id', id, 'title', title, 'origin', origin, 'scope_type', scope_type, 'scope_id', scope_id, 'created_at', created_at, 'occurred_day_sp', occurred_day_sp, 'source_path', source_path) AS payload_json FROM canonical_decisions"),Kt("run_index","SELECT run_id AS row_key, json_object('run_id', run_id, 'occurred_at', occurred_at, 'occurred_day_sp', occurred_day_sp, 'task_id', task_id, 'phase', phase, 'run_role', run_role, 'duration_ms', duration_ms, 'source_event_count', source_event_count, 'zaip_agent', zaip_agent, 'provider', provider, 'model', model, 'status', status) AS payload_json FROM canonical_run_index"),Kt("usage_segment","SELECT agent_invocation_id || ':' || ROW_NUMBER() OVER(PARTITION BY agent_invocation_id ORDER BY rowid) AS row_key, json_object('agent_invocation_id', agent_invocation_id, 'provider', provider, 'model', model, 'service_tier', service_tier, 'reasoning_effort', reasoning_effort, 'input_tokens', input_tokens, 'cached_input_tokens', cached_input_tokens, 'uncached_input_tokens', uncached_input_tokens, 'output_tokens', output_tokens, 'reasoning_tokens', reasoning_tokens, 'visible_output_tokens', visible_output_tokens, 'total_tokens', total_tokens, 'input_rate_usd_per_million', input_rate_usd_per_million, 'cached_input_rate_usd_per_million', cached_input_rate_usd_per_million, 'output_rate_usd_per_million', output_rate_usd_per_million, 'reasoning_rate_usd_per_million', reasoning_rate_usd_per_million, 'context_input_multiplier', context_input_multiplier, 'context_output_multiplier', context_output_multiplier, 'speed_cost_multiplier', speed_cost_multiplier, 'pricing_scenario', pricing_scenario, 'standard_cost_usd', standard_cost_usd, 'speed_uplift_usd', speed_uplift_usd, 'input_cost_usd', input_cost_usd, 'cached_input_cost_usd', cached_input_cost_usd, 'output_cost_usd', output_cost_usd, 'reasoning_cost_usd', reasoning_cost_usd, 'calculated_cost_usd', calculated_cost_usd, 'recorded_cost_usd', recorded_cost_usd, 'cost_variance_usd', cost_variance_usd, 'cost_usd', cost_usd, 'cost_brl', cost_brl, 'cost_method', cost_method, 'pricing_model', pricing_model, 'pricing_source', pricing_source, 'fx_rate', fx_rate) AS payload_json FROM invocation_usage_segments"),Kt("duration_allocation","SELECT activity_row_id || ':' || occurred_day_sp AS row_key, json_object('activity_row_id', activity_row_id, 'occurred_day_sp', occurred_day_sp, 'attributed_token_active_ms', attributed_token_active_ms) AS payload_json FROM attributed_token_active_facts");let jv=u.prepare("INSERT OR IGNORE INTO zaip_dim_zaip_agent(zaip_agent, catalog_id, persona, job, role, catalog_hash) VALUES (?, ?, ?, ?, ?, ?)");for(let[m,$]of Mr)jv.run(m,$.catalogId,$.persona,$.job,$.role,oc);let lo=[];for(let m of["model","provider"])for(let $ of hd[m])lo.push({row_key:`${m}:${$.key}`,payload_json:JSON.stringify({schema_version:1,dimension:m,...$})});for(let[m,$]of Object.entries(hd.remote)){for(let L of $.rows)lo.push({row_key:`${m}:${L.key}`,payload_json:JSON.stringify({schema_version:1,dimension:m,row_kind:"row",...L})});lo.push({row_key:`${m}:__totals__`,payload_json:JSON.stringify({schema_version:1,dimension:m,row_kind:"totals",...$.totals})})}Xs(u,"cost_dimension_aggregate_v1",lo),u.exec(h?Ju.replace("CREATE TABLE cost_invocation_dimension_facts AS","DELETE FROM cost_invocation_dimension_facts; INSERT INTO cost_invocation_dimension_facts").replace(/CREATE INDEX cost_dimension_facts_[A-Za-z_]+ ON [^;]+;/g,""):Ju);let vd=`
656
+ );`),u.exec("CREATE INDEX IF NOT EXISTS zaip_activities_payload ON zaip_aios_activities(payload_type, activity_key)");let N=new Ys(u),A=m=>F.get(m)?.contentHash??"",B=(m,$)=>{if(!$.length)return;let L=Object.keys($[0]),Ae=u.prepare(`INSERT INTO ${m}(${L.join(",")}) VALUES (${L.map(()=>"?").join(",")})`);for(let Te of $)Ae.run(...L.map(Ne=>Te[Ne]??null))};B("canonical_run_index",ue.filter(m=>!ne.has(m.run_id)));let oe=new Set(W.filter(m=>ne.has(m.run_id)).map(m=>m.agent_invocation_id));B("invocation_usage_segments",be.filter(m=>!oe.has(m.agent_invocation_id))),B("attributed_token_active_facts",O);for(let m of ne)u.prepare("DELETE FROM zaip_aios_activities WHERE payload_type IS NULL AND run_id=?").run(m);for(let m of x)u.prepare("DELETE FROM zaip_aios_activities WHERE payload_type='parsed_source' AND source_path=?").run(m);let D=u.prepare("INSERT INTO files(path, content, mtime_ms, size_bytes, content_sha256, artifact_kind, artifact_id, artifact_occurred_at, artifact_occurred_day_sp, artifact_task_id, artifact_change_id, artifact_run_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"),J=u.prepare("INSERT INTO read_model_source_state(source_path, source_hash, mtime_ms, ctime_ms, size_bytes, file_identity, source_kind, last_processed_at) VALUES (?, ?, ?, ?, ?, ?, ?, ?)"),K=0,Ze=0,qt=32;for(let m=0;m<o.candidates.length;m+=qt){let $=o.candidates.slice(m,m+qt),L=await Promise.all($.map(async Te=>{let Ne=f.get(Te.source);if(Ne?.content_sha256===Te.contentHash)return Ne.content;let tt=await(0,ac.readFile)(Te.path,"utf8");if((0,ao.createHash)("sha256").update(tt).digest("hex")!==Te.contentHash)throw new Error(`Canonical source changed during refresh: ${Te.source}`);return tt}));for(let Te=0;Te<$.length;Te+=1){let Ne=$[Te],tt=L[Te];if(Ne===void 0||tt===void 0)continue;let{source:it,mtimeMs:Wt,ctimeMs:ht,size:nt,fileIdentity:lt}=Ne,ze=Ne.contentHash,Ge=it.includes("/runs/")?"run":it.includes("/artifacts/evidence/")?"evidence":it.includes("/artifacts/validations/")||it.includes("/artifacts/tests/")?"validation":it.startsWith(".agents/config/")?"config":"entity",Tt=N.read("artifact",it,ze,()=>vv(it,tt));D.run(it,tt,Wt,nt,ze,Tt?.kind??null,Tt?.id??null,Tt?.occurredAt??null,Tt?.occurredDaySp??null,Tt?.taskId??null,Tt?.changeId??null,Tt?.runId??null),J.run(it,ze,String(Wt),String(ht),nt,lt,Ge,new Date().toISOString()),K+=1}let Ae=52+Math.round((m+$.length)/o.candidates.length*20);i("source_import",Ae,`Lidas ${Math.min(m+$.length,o.candidates.length)} de ${o.candidates.length} fontes.`)}i("projection_build",74,"Organizando fatos e proje\xE7\xF5es do banco local.");let ct=u.prepare("SELECT path, content FROM files WHERE (path LIKE '.agents/data/%' OR path LIKE '.agents/records/%') AND path NOT LIKE '.agents/data/runs/%' AND path NOT LIKE '.agents/records/runs/%' ORDER BY CASE WHEN path LIKE '.agents/data/%' THEN 1 ELSE 0 END, path").all(),he=new Map(ct.flatMap(m=>N.read("entities",m.path,A(m.path),()=>[...od([m])])));for(let m of ct)if(Z.has(m.path)&&/^\.agents\/(?:data|records)\/specs\//.test(m.path))for(let[,$]of N.read("entities",m.path,A(m.path),()=>[...od([m])]))$.creationRunId&&_e.add($.creationRunId);let P=u.prepare("INSERT INTO canonical_work_items(entity_kind, id, title, status, stage, risk, spec_id, change_id, creation_run_id, completed_run_id, occurred_at, occurred_day_sp) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");for(let m of he.values())m.kind!=="task"&&m.kind!=="spec"&&m.kind!=="prd"||m.occurredAt===null||Number.isNaN(Date.parse(m.occurredAt))||P.run(m.kind,m.id,m.title,m.status,m.stage,m.risk,m.specId,m.changeId,m.creationRunId,m.completedRunId,m.occurredAt,yt(m.occurredAt));let ae={executions:[],changes:[],decisions:[]};for(let m of ct){let $=N.read("lifecycle",m.path,A(m.path),()=>pv([m]));ae.executions.push(...$.executions),ae.changes.push(...$.changes),ae.decisions.push(...$.decisions)}ae.executions=[...new Map(ae.executions.map(m=>[m.id,m])).values()],ae.changes=[...new Map(ae.changes.map(m=>[m.id,m])).values()],ae.decisions=[...new Map(ae.decisions.map(m=>[m.id,m])).values()];let Ee=u.prepare("INSERT INTO canonical_executions(id, status, kind, origin_type, origin_id, created_at, occurred_day_sp, finished_at, source_path) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)");for(let m of ae.executions)Ee.run(m.id,m.status,m.kind,m.originType,m.originId,m.createdAt,yt(m.createdAt),m.finishedAt,m.sourcePath);let Ue=u.prepare("INSERT INTO canonical_changes(id, title, status, risk, source_type, source_id, source_spec_id, source_prd_id, requirement_ids_json, acceptance_ids_json, task_ids_json, result, created_at, occurred_day_sp, source_path) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");for(let m of ae.changes)Ue.run(m.id,m.title,m.status,m.risk,m.sourceType,m.sourceId,m.sourceSpecId,m.sourcePrdId,JSON.stringify(m.requirementIds),JSON.stringify(m.acceptanceIds),JSON.stringify(m.taskIds),m.result,m.createdAt,yt(m.createdAt),m.sourcePath);let et=u.prepare("INSERT INTO canonical_decisions(id, title, origin, scope_type, scope_id, created_at, occurred_day_sp, source_path) VALUES (?, ?, ?, ?, ?, ?, ?, ?)");for(let m of ae.decisions)et.run(m.id,m.title,m.origin,m.scopeType,m.scopeId,m.createdAt,yt(m.createdAt),m.sourcePath);let Vt=u.prepare("SELECT content FROM files WHERE path = ?").get(".agents/config/agents/catalog.yaml")?.content,ir=u.prepare("SELECT content FROM files WHERE path = ?").get(".agents/config/clients.yaml")?.content,Mr=fv(Vt,ir),sc=Vt===void 0?null:(0,ao.createHash)("sha256").update(Vt).digest("hex"),Av=u.prepare("SELECT content FROM files WHERE path = ?").get(".agents/config/pricing/models.json")?.content,co=Hy.parse(JSON.parse(Av??'{"schema_version":1,"updated_at":"1970-01-01T00:00:00.000Z","source":"missing","disclaimer":"missing","models":[]}')),cc=yv(u.prepare("SELECT path, content FROM files WHERE path LIKE '.agents/config/pricing/fx/%.json'").all()),lc=u.prepare("SELECT path, content, content_sha256 FROM files WHERE (path LIKE '.agents/data/runs/%.jsonl' OR path LIKE '.agents/records/runs/%.jsonl') ORDER BY CASE WHEN path LIKE '.agents/data/%' THEN 1 ELSE 0 END, path").all(),Tv=u.prepare("SELECT content FROM files WHERE path LIKE '.agents/data/lifecycle/historical-developer-attribution/%.json' OR path LIKE '.agents/records/lifecycle/historical-developer-attribution/%.json'").all().flatMap(m=>{try{return[JSON.parse(m.content)]}catch{return[]}}),Nv=(m,$)=>{let L=ni($);if(L!==null&&typeof L.account_id=="string"&&typeof L.login_snapshot=="string")return{accountId:L.account_id,login:L.login_snapshot,source:typeof L.attribution_source=="string"?L.attribution_source:"native"};for(let Ae of Tv)try{let Te=Pu({manifest:Ae,run_id:String(JSON.parse(m.content.split(/\r?\n/u)[0]??"{}").run_id??""),path:m.path,content:m.content});if(Te!==null)return{accountId:Te.account_id,login:Te.login_snapshot,source:Te.attribution_source}}catch{}return null},uc=new Map(lc.map(m=>[m.path.split("/").at(-1).replace(/\.jsonl$/,""),m]));for(let m of W){let $=lc.find(Ae=>Ae.path===m.source_path),L=uc.get(m.run_id);$&&(L===void 0||!L.path.startsWith(".agents/data/"))&&uc.set(m.run_id,$)}let dc=new Map,dd=m=>N.read("fold",m.path,m.content_sha256,()=>(a.canonical_runs_refolded+=1,Bu(Wu(m.content)))),_d=m=>{let $=dc.get(m);if($)return $;let L=uc.get(m);if(L)return{row:L,fold:dd(L)}};for(let m of lc){let $=W.find(Ae=>Ae.source_path===m.path);if(h&&$&&!ne.has($.run_id)&&!Z.has(m.path))continue;let L=dd(m);ne.add(L.run.run_id),dc.set(L.run.run_id,{row:m,fold:L})}let pd=m=>{let $=m,L=new Set;for(;$.run.parent_run_id!==null&&!L.has($.run.run_id);){L.add($.run.run_id);let Ae=_d($.run.parent_run_id)?.fold;if(Ae===void 0)break;$=Ae}return $.run.run_id},lo=["activity_row_id","activity_source_kind","activity_key","source_path","source_hash","source_occurred_at","recorded_at","version_activity_id","source_last_event_id","source_last_sequence","work_item_kind","title","work_item_status","work_stage","risk","run_role","root_run_id","parent_run_id","agent_run_id","root_agent_run_id","parent_agent_run_id","agent_run_role","delegation_depth","agent_invocation_id","root_agent_invocation_id","parent_agent_invocation_id","invocation_kind","execution_id","task_id","spec_id","prd_id","change_id","conversation_id","run_id","occurred_at","occurred_day_sp","execution_kind","entrypoint","work_type","phase","purpose","status","activity_kind","zaip_agent","zaip_agent_persona","zaip_agent_job","zaip_agent_role","agent_catalog_id","agent_catalog_hash","client","provider","model","service_tier","reasoning_effort","developer_account_id","developer_login","developer_attribution_source","source_duration_ms","source_started_at","source_finished_at","duration_ms","duration_provenance","input_tokens","cached_input_tokens","output_tokens","reasoning_tokens","total_tokens","token_source","usage_event_count","llm_call_count","cost_usd","cost_brl","cost_method","pricing_model","pricing_source","fx_rate","source_event_count","root_run_duration","sub_run_duration","payload_type","payload_json"],fd=u.prepare(`INSERT INTO zaip_aios_activities(${lo.join(",")}) VALUES (${lo.map(()=>"?").join(",")})`),md=u.prepare("INSERT INTO attributed_token_active_facts(activity_row_id, occurred_day_sp, attributed_token_active_ms) VALUES (?, ?, ?)"),Iv=u.prepare("INSERT INTO invocation_usage_segments VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"),Rv=u.prepare("INSERT INTO canonical_run_index(run_id, occurred_at, occurred_day_sp, task_id, phase, run_role, duration_ms, source_event_count, zaip_agent, provider, model, status) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"),_c=W.filter(m=>!ne.has(m.run_id)&&m.agent_invocation_id===null).length,$v=0,gd=C.filter(m=>!W.some($=>$.activity_row_id===m.activityRowId&&ne.has($.run_id))),yd=[];for(let{row:m,fold:$}of dc.values()){let L=$.run,Ae=Nv(m,L.developer_identity??null),Te=$.effective_usage_records,Ne=L.agent_invocation_id??null,tt=Ne!==null,it=L.parent_run_id===null?"root":"subrun",Wt=tt?L.parent_agent_invocation_id===null?"root":"subagent":null,ht=Zt(Te,"total"),nt=gv(Te,$),lt=ad(Te,$,co,cc),ze=Te.filter(we=>typeof we.tokens.total=="number"||typeof we.cost.usd=="number"||typeof we.cost.brl=="number"),Ge=Ft(ze.map(we=>we.model??L.model))??(L.model==="unavailable"?null:L.model),Tt=Ft(ze.map(we=>oo(we.provider,we.model??L.model,L.client)))??oo(L.provider,Ge,L.client),ii=L.agent_name??L.agent;Rv.run(L.run_id,L.occurred_at,yt(L.occurred_at),L.task_id,L.phase,it,nt.effective,$.records.length,ii,Tt,Ge,$.status);let or=Mr.get(ii)??Mr.get(L.agent),Sr=L.task_id===null?L.spec_id===null?L.prd_id===null?null:he.get(`prd:${L.prd_id}`):he.get(`spec:${L.spec_id}`):he.get(`task:${L.task_id}`),ar=new Set([...$.model_call_records.map(we=>we.call_id),...Te.map(we=>we.model_call_id).filter(we=>typeof we=="string")]),gc=$.records.at(-1),yc=`ACTV-${(0,ao.createHash)("sha256").update(`run:${L.run_id}`).digest("hex").slice(0,24)}`,Vv={activity_row_id:yc,activity_source_kind:tt?"agent_run":"unassisted_turn",activity_key:`run:${L.run_id}`,source_path:m.path,source_hash:m.content_sha256,source_occurred_at:Te.map(we=>we.source_occurred_at).filter(we=>typeof we=="string").sort()[0]??L.occurred_at,recorded_at:gc.occurred_at,version_activity_id:null,source_last_event_id:gc.event_id,source_last_sequence:gc.sequence,work_item_kind:Sr?.kind??null,title:Sr?.title??null,work_item_status:Sr?.status??null,work_stage:Sr?.stage??null,risk:Sr?.risk??null,run_role:it,root_run_id:pd($),parent_run_id:L.parent_run_id,agent_run_id:Ne,root_agent_run_id:L.root_agent_invocation_id??Ne,parent_agent_run_id:L.parent_agent_invocation_id??null,agent_run_role:Wt,delegation_depth:L.delegation_depth??null,agent_invocation_id:Ne,root_agent_invocation_id:L.root_agent_invocation_id??Ne,parent_agent_invocation_id:L.parent_agent_invocation_id??null,invocation_kind:L.invocation_kind??null,execution_id:L.execution_id,task_id:L.task_id,spec_id:L.spec_id,prd_id:L.prd_id,change_id:L.change_id,conversation_id:L.conversation_id,run_id:L.run_id,occurred_at:L.occurred_at,occurred_day_sp:yt(L.occurred_at),execution_kind:L.execution_kind??null,entrypoint:L.entrypoint,work_type:L.work_type,phase:L.phase,purpose:L.run_purpose??null,status:$.status,activity_kind:mv({execution_id:L.execution_id,task_id:L.task_id,spec_id:L.spec_id,prd_id:L.prd_id,phase:L.phase,purpose:L.run_purpose??null}),zaip_agent:ii,zaip_agent_persona:or?.persona??null,zaip_agent_job:or?.job??null,zaip_agent_role:or?.role??null,agent_catalog_id:or?.catalogId??null,agent_catalog_hash:sc,client:L.client,provider:Tt,model:Ge,service_tier:Ft(Te.map(we=>we.runtime?.service_tier??null)),reasoning_effort:Ft(Te.map(we=>we.runtime?.reasoning_effort??null))??L.reasoning_effort??null,developer_account_id:Ae?.accountId??null,developer_login:Ae?.login??null,developer_attribution_source:Ae?.source??null,source_duration_ms:nt.source,source_started_at:nt.sourceStartedAt,source_finished_at:nt.sourceFinishedAt,duration_ms:nt.effective,duration_provenance:nt.provenance,input_tokens:Zt(Te,"input"),cached_input_tokens:Zt(Te,"cached_input"),output_tokens:Zt(Te,"output"),reasoning_tokens:Zt(Te,"reasoning"),total_tokens:ht,token_source:Ft(Te.map(we=>we.tokens.source)),usage_event_count:Te.length,llm_call_count:ar.size>0?ar.size:null,cost_usd:lt.usd,cost_brl:lt.brl,cost_method:lt.method,pricing_model:lt.pricingModel,pricing_source:lt.pricingSource,fx_rate:lt.fxRate,source_event_count:$.records.length,root_run_duration:it==="root"?nt.effective:null,sub_run_duration:it==="subrun"?nt.effective:null,payload_type:null,payload_json:null};if(fd.run(...lo.map(we=>Vv[we]??null)),ht!==null&&ht>0&&nt.effective!==null&&nt.effective>=0){let we=Date.parse(nt.sourceStartedAt??L.occurred_at),Xn=Date.parse(nt.sourceFinishedAt??"")||we+nt.effective;Number.isFinite(we)&&Number.isFinite(Xn)&&Xn>we?gd.push({activityRowId:yc,startMs:we,endMs:Xn}):nt.effective===0&&yd.push({activityRowId:yc,day:yt(L.occurred_at)})}if(Ne!==null)for(let we of Te){let Xn=we.tokens,qe=hv(we,$,co,cc);Iv.run(Ne,we.provider??null,we.model??null,qe.serviceTier,we.runtime?.reasoning_effort??null,Xn.input,Xn.cached_input,qe.uncachedInputTokens,Xn.output,Xn.reasoning,qe.visibleOutputTokens,Xn.total,qe.inputRate,qe.cachedRate,qe.outputRate,qe.reasoningRate,qe.contextInputMultiplier,qe.contextOutputMultiplier,qe.speedCostMultiplier,qe.pricingScenario,qe.standardUsd,qe.speedUpliftUsd,qe.inputUsd,qe.cachedInputUsd,qe.outputUsd,qe.reasoningUsd,qe.calculatedUsd,qe.recordedUsd,qe.varianceUsd,qe.effectiveUsd,qe.effectiveBrl,qe.recordedUsd!==null?"canonical_recorded":"token_pricing_estimate",qe.pricingModel,qe.pricingSource,qe.fxRate)}tt||(_c+=1)}let hd=new Set(W.filter(m=>ne.has(m.run_id)).map(m=>String(m.activity_row_id)));for(let m of u.prepare("SELECT activity_row_id,run_id FROM zaip_aios_activities WHERE payload_type IS NULL").all())ne.has(m.run_id)&&hd.add(m.activity_row_id);let pc=Yh(C,gd,hd);for(let m of pc.ids)u.prepare("DELETE FROM attributed_token_active_facts WHERE activity_row_id=?").run(m);for(let m of nc(pc.intervals))md.run(m.activityRowId,m.day,m.value);for(let m of yd)md.run(m.activityRowId,m.day,0);let Cv=u.prepare(`UPDATE zaip_aios_activities SET duration_ms=?,duration_provenance=?
657
+ WHERE activity_row_id=? AND (duration_ms IS NOT ? OR duration_provenance IS NOT ?)`),fc=new Set(ne);for(let m of pc.ids){let $=u.prepare("SELECT SUM(attributed_token_active_ms) value,COUNT(*) count FROM attributed_token_active_facts WHERE activity_row_id=?").get(m),L=$.count?"attributed_token_active":null;Cv.run($.value,L,m,$.value,L);let Ae=u.prepare("SELECT run_id FROM zaip_aios_activities WHERE activity_row_id=?").get(m);Ae&&fc.add(Ae.run_id)}if(V)for(let m of u.prepare("SELECT activity_row_id,task_id,spec_id,prd_id,change_id,execution_id,conversation_id FROM zaip_aios_activities WHERE payload_type IS NULL").all()){let $=m.task_id!==null?he.get(`task:${m.task_id}`):m.spec_id!==null?he.get(`spec:${m.spec_id}`):m.prd_id!==null?he.get(`prd:${m.prd_id}`):null,L=[$?.kind??null,$?.title??null,$?.status??null,$?.stage??null,$?.risk??null];u.prepare("UPDATE zaip_aios_activities SET work_item_kind=?,title=?,work_item_status=?,work_stage=?,risk=? WHERE activity_row_id=? AND (work_item_kind IS NOT ? OR title IS NOT ? OR work_item_status IS NOT ? OR work_stage IS NOT ? OR risk IS NOT ?)").run(...L,m.activity_row_id,...L)}let mc=new Map;for(let m of he.values())m.kind!=="spec"||m.creationRunId===null||mc.set(m.creationRunId,[...mc.get(m.creationRunId)??[],m]);for(let m of u.prepare("SELECT DISTINCT run_id FROM zaip_aios_activities WHERE payload_type='shared_creation_allocation'").all())(_e.has(m.run_id)||fc.has(m.run_id))&&u.prepare("DELETE FROM zaip_aios_activities WHERE payload_type='shared_creation_allocation' AND run_id=?").run(m.run_id);(()=>{for(let[m,$]of mc){if($.length===0||h&&!_e.has(m)&&!fc.has(m))continue;let L=_d(m);if(L===void 0)continue;let{fold:Ae,row:Te}=L,Ne=Ae.run,tt=Ae.effective_usage_records,it=u.prepare("SELECT duration_ms, duration_provenance, source_started_at, source_finished_at FROM zaip_aios_activities WHERE run_id=? AND payload_type IS NULL LIMIT 1").get(m),Wt=ad(tt,Ae,co,cc),ht=$.map(ze=>ze.id),nt=it?.duration_ms??null,lt={source_duration_ms:zt(nt,ht),duration_ms:zt(nt,ht),input_tokens:zt(Zt(tt,"input"),ht),cached_input_tokens:zt(Zt(tt,"cached_input"),ht),output_tokens:zt(Zt(tt,"output"),ht),reasoning_tokens:zt(Zt(tt,"reasoning"),ht),total_tokens:zt(Zt(tt,"total"),ht),cost_usd:zt(Wt.usd,ht),cost_brl:zt(Wt.brl,ht)};for(let ze of $){let Ge=tt.find(ar=>ar.attributed_spec_id===ze.id)??null,Tt=Ge?.source_started_at&&Ge?.source_finished_at?Math.max(0,Date.parse(Ge.source_finished_at)-Date.parse(Ge.source_started_at)):null,ii=`ACTV-${(0,ao.createHash)("sha256").update(`shared-creation:${m}:${ze.id}`).digest("hex").slice(0,24)}`,or=Ae.records.at(-1),Sr={activity_row_id:ii,activity_source_kind:"shared_creation_allocation",activity_key:`shared-creation:${m}:${ze.id}`,source_path:Te.path,source_hash:Te.content_sha256,source_occurred_at:Ne.occurred_at,recorded_at:or?.occurred_at??Ne.occurred_at,version_activity_id:null,source_last_event_id:or?.event_id??null,source_last_sequence:or?.sequence??null,work_item_kind:"spec",title:ze.title,work_item_status:ze.status,work_stage:ze.stage,risk:ze.risk,run_role:"shared_creation_allocation",root_run_id:pd(Ae),parent_run_id:Ne.parent_run_id,agent_run_id:null,root_agent_run_id:null,parent_agent_run_id:null,agent_run_role:null,delegation_depth:Ne.delegation_depth??null,agent_invocation_id:null,root_agent_invocation_id:null,parent_agent_invocation_id:null,invocation_kind:null,execution_id:Ne.execution_id,task_id:null,spec_id:ze.id,prd_id:null,change_id:null,conversation_id:Ne.conversation_id,run_id:Ne.run_id,occurred_at:Ne.occurred_at,occurred_day_sp:yt(Ne.occurred_at),execution_kind:Ne.execution_kind??null,entrypoint:Ne.entrypoint,work_type:Ne.work_type,phase:Ne.phase,purpose:Ne.run_purpose??null,status:Ae.status,activity_kind:"planning",zaip_agent:Ne.agent_name??Ne.agent,zaip_agent_persona:null,zaip_agent_job:null,zaip_agent_role:null,agent_catalog_id:null,agent_catalog_hash:sc,client:Ne.client,provider:null,model:null,service_tier:null,reasoning_effort:Ne.reasoning_effort??null,developer_account_id:null,developer_login:null,developer_attribution_source:null,source_duration_ms:Tt??lt.source_duration_ms.get(ze.id)??null,source_started_at:Ge?.source_started_at??it?.source_started_at??null,source_finished_at:Ge?.source_finished_at??it?.source_finished_at??null,duration_ms:Tt??lt.duration_ms.get(ze.id)??null,duration_provenance:Ge?"explicit_spec_turn_recovery":"shared_creation_allocation",input_tokens:Ge?.tokens.input??lt.input_tokens.get(ze.id)??null,cached_input_tokens:Ge?.tokens.cached_input??lt.cached_input_tokens.get(ze.id)??null,output_tokens:Ge?.tokens.output??lt.output_tokens.get(ze.id)??null,reasoning_tokens:Ge?.tokens.reasoning??lt.reasoning_tokens.get(ze.id)??null,total_tokens:Ge?.tokens.total??lt.total_tokens.get(ze.id)??null,token_source:Ft(tt.map(ar=>ar.tokens.source)),usage_event_count:tt.length,llm_call_count:null,cost_usd:Ge?.cost.usd??lt.cost_usd.get(ze.id)??null,cost_brl:Ge?.cost.brl??lt.cost_brl.get(ze.id)??null,cost_method:Wt.method,pricing_model:Wt.pricingModel,pricing_source:Wt.pricingSource,fx_rate:Wt.fxRate,source_event_count:Ae.records.length,root_run_duration:null,sub_run_duration:null,payload_type:"shared_creation_allocation",payload_json:JSON.stringify({provenance:Ge?"explicit_spec_turn_recovery":"shared_creation_allocation",base_duration_provenance:it?.duration_provenance??null,creation_run_id:m,spec_id:ze.id})};fd.run(...lo.map(ar=>Sr[ar]??null))}}})();let Lv=Number(u.prepare("SELECT COUNT(*) count FROM zaip_aios_activities WHERE payload_type IS NULL").get().count),Mv=u.prepare("SELECT COUNT(*) AS count FROM zaip_aios_activities WHERE agent_invocation_id IS NOT NULL").get().count;u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("source_file_count",String(K)),u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("excluded_source_count",String(Ze));let Uv=u.prepare("SELECT COUNT(DISTINCT occurred_day_sp) AS count FROM zaip_aios_activities WHERE occurred_day_sp IS NOT NULL").get().count,xv=u.prepare("SELECT COUNT(*) AS count FROM zaip_aios_activities WHERE payload_type IS NULL OR payload_type='shared_creation_allocation'").get().count,Dv=u.prepare("SELECT COUNT(*) AS count FROM zaip_aios_activities WHERE activity_source_kind = 'agent_run'").get().count;u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("daily_aggregate_count",String(Uv)),u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("activity_count",String(xv)),u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("canonical_run_count",String(Lv)),u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("excluded_unknown_token_run_count",String($v)),u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("agent_run_count",String(Dv)),u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("telemetry_summary_count","0"),u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("unassisted_activity_count",String(_c)),u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("unassisted_turn_count",String(_c)),u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("agent_invocation_count",String(Mv)),u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("schema_version",ri),u.prepare("INSERT INTO read_model_metadata(key, value) VALUES (?, ?)").run("source_fingerprint",s);let Pv=u.prepare("INSERT OR IGNORE INTO zaip_dim_llm_model(model) VALUES (?)"),jv=u.prepare("INSERT OR IGNORE INTO zaip_dim_provider(provider) VALUES (?)");for(let m of co.models)Pv.run(m.id),jv.run(m.provider);let vd=Uh(u,Mr),Kt=(m,$,L=!1)=>Qs(u,m,$);Kt("metadata","SELECT key AS row_key, json_object('key', key, 'value', value) AS payload_json FROM read_model_metadata"),Kt("source_state","SELECT source_path AS row_key, json_object('source_path', source_path, 'source_hash', source_hash, 'mtime_ms', mtime_ms, 'ctime_ms', ctime_ms, 'size_bytes', size_bytes, 'file_identity', file_identity, 'source_kind', source_kind, 'last_processed_at', last_processed_at) AS payload_json FROM read_model_source_state",!0),Kt("file","SELECT path AS row_key, json_object('path', path, 'content', content, 'mtime_ms', mtime_ms, 'size_bytes', size_bytes, 'content_sha256', content_sha256, 'artifact_kind', artifact_kind, 'artifact_id', artifact_id, 'artifact_occurred_at', artifact_occurred_at, 'artifact_occurred_day_sp', artifact_occurred_day_sp, 'artifact_task_id', artifact_task_id, 'artifact_change_id', artifact_change_id, 'artifact_run_id', artifact_run_id) AS payload_json FROM files",!0),Kt("work_item","SELECT entity_kind || ':' || id AS row_key, json_object('entity_kind', entity_kind, 'id', id, 'title', title, 'status', status, 'stage', stage, 'risk', risk, 'spec_id', spec_id, 'change_id', change_id, 'creation_run_id', creation_run_id, 'completed_run_id', completed_run_id, 'occurred_at', occurred_at, 'occurred_day_sp', occurred_day_sp) AS payload_json FROM canonical_work_items"),Kt("execution","SELECT id AS row_key, json_object('id', id, 'status', status, 'kind', kind, 'origin_type', origin_type, 'origin_id', origin_id, 'created_at', created_at, 'occurred_day_sp', occurred_day_sp, 'finished_at', finished_at, 'source_path', source_path) AS payload_json FROM canonical_executions"),Kt("change","SELECT id AS row_key, json_object('id', id, 'title', title, 'status', status, 'risk', risk, 'source_type', source_type, 'source_id', source_id, 'source_spec_id', source_spec_id, 'source_prd_id', source_prd_id, 'requirement_ids_json', requirement_ids_json, 'acceptance_ids_json', acceptance_ids_json, 'task_ids_json', task_ids_json, 'result', result, 'created_at', created_at, 'occurred_day_sp', occurred_day_sp, 'source_path', source_path) AS payload_json FROM canonical_changes"),Kt("decision","SELECT id AS row_key, json_object('id', id, 'title', title, 'origin', origin, 'scope_type', scope_type, 'scope_id', scope_id, 'created_at', created_at, 'occurred_day_sp', occurred_day_sp, 'source_path', source_path) AS payload_json FROM canonical_decisions"),Kt("run_index","SELECT run_id AS row_key, json_object('run_id', run_id, 'occurred_at', occurred_at, 'occurred_day_sp', occurred_day_sp, 'task_id', task_id, 'phase', phase, 'run_role', run_role, 'duration_ms', duration_ms, 'source_event_count', source_event_count, 'zaip_agent', zaip_agent, 'provider', provider, 'model', model, 'status', status) AS payload_json FROM canonical_run_index"),Kt("usage_segment","SELECT agent_invocation_id || ':' || ROW_NUMBER() OVER(PARTITION BY agent_invocation_id ORDER BY rowid) AS row_key, json_object('agent_invocation_id', agent_invocation_id, 'provider', provider, 'model', model, 'service_tier', service_tier, 'reasoning_effort', reasoning_effort, 'input_tokens', input_tokens, 'cached_input_tokens', cached_input_tokens, 'uncached_input_tokens', uncached_input_tokens, 'output_tokens', output_tokens, 'reasoning_tokens', reasoning_tokens, 'visible_output_tokens', visible_output_tokens, 'total_tokens', total_tokens, 'input_rate_usd_per_million', input_rate_usd_per_million, 'cached_input_rate_usd_per_million', cached_input_rate_usd_per_million, 'output_rate_usd_per_million', output_rate_usd_per_million, 'reasoning_rate_usd_per_million', reasoning_rate_usd_per_million, 'context_input_multiplier', context_input_multiplier, 'context_output_multiplier', context_output_multiplier, 'speed_cost_multiplier', speed_cost_multiplier, 'pricing_scenario', pricing_scenario, 'standard_cost_usd', standard_cost_usd, 'speed_uplift_usd', speed_uplift_usd, 'input_cost_usd', input_cost_usd, 'cached_input_cost_usd', cached_input_cost_usd, 'output_cost_usd', output_cost_usd, 'reasoning_cost_usd', reasoning_cost_usd, 'calculated_cost_usd', calculated_cost_usd, 'recorded_cost_usd', recorded_cost_usd, 'cost_variance_usd', cost_variance_usd, 'cost_usd', cost_usd, 'cost_brl', cost_brl, 'cost_method', cost_method, 'pricing_model', pricing_model, 'pricing_source', pricing_source, 'fx_rate', fx_rate) AS payload_json FROM invocation_usage_segments"),Kt("duration_allocation","SELECT activity_row_id || ':' || occurred_day_sp AS row_key, json_object('activity_row_id', activity_row_id, 'occurred_day_sp', occurred_day_sp, 'attributed_token_active_ms', attributed_token_active_ms) AS payload_json FROM attributed_token_active_facts");let zv=u.prepare("INSERT OR IGNORE INTO zaip_dim_zaip_agent(zaip_agent, catalog_id, persona, job, role, catalog_hash) VALUES (?, ?, ?, ?, ?, ?)");for(let[m,$]of Mr)zv.run(m,$.catalogId,$.persona,$.job,$.role,sc);let uo=[];for(let m of["model","provider"])for(let $ of vd[m])uo.push({row_key:`${m}:${$.key}`,payload_json:JSON.stringify({schema_version:1,dimension:m,...$})});for(let[m,$]of Object.entries(vd.remote)){for(let L of $.rows)uo.push({row_key:`${m}:${L.key}`,payload_json:JSON.stringify({schema_version:1,dimension:m,row_kind:"row",...L})});uo.push({row_key:`${m}:__totals__`,payload_json:JSON.stringify({schema_version:1,dimension:m,row_kind:"totals",...$.totals})})}Qs(u,"cost_dimension_aggregate_v1",uo),u.exec(h?Ku.replace("CREATE TABLE cost_invocation_dimension_facts AS","DELETE FROM cost_invocation_dimension_facts; INSERT INTO cost_invocation_dimension_facts").replace(/CREATE INDEX cost_dimension_facts_[A-Za-z_]+ ON [^;]+;/g,""):Ku);let Sd=`
658
658
  CREATE INDEX zaip_activities_agent_run ON zaip_aios_activities(activity_source_kind, agent_run_id, occurred_day_sp, occurred_at DESC);
659
659
  CREATE INDEX zaip_activities_relationships ON zaip_aios_activities(task_id, spec_id, prd_id, execution_id, conversation_id);
660
660
  CREATE INDEX zaip_activities_task_day ON zaip_aios_activities(payload_type, task_id, occurred_day_sp) WHERE task_id IS NOT NULL;
@@ -1029,7 +1029,7 @@ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type
1029
1029
  SUM(cost_monitor_total_duration)
1030
1030
  FROM daily GROUP BY substr(day, 1, 4);
1031
1031
  CREATE VIEW vw_cost_executions AS SELECT i.execution_id, i.execution_id AS title, e.status, NULL AS risk, MIN(i.occurred_at) AS occurred_at, MIN(i.occurred_day_sp) AS occurred_day_sp, SUM(i.llm_call_count) AS llm_call_count, SUM(i.duration_ms) AS total_duration, SUM(i.total_tokens) AS total_tokens, SUM(i.cost_usd) AS total_cost_usd, SUM(i.cost_brl) AS total_cost_brl, COUNT(*) AS invocation_count FROM invocations i LEFT JOIN executions e ON e.id = i.execution_id WHERE i.execution_id IS NOT NULL GROUP BY i.execution_id, e.status;
1032
- CREATE VIEW vw_cost_agent_invocations AS ${Gu};
1032
+ CREATE VIEW vw_cost_agent_invocations AS ${Xu};
1033
1033
  CREATE VIEW vw_cost_zaip_agents AS SELECT zaip_agent, SUM(llm_call_count) AS llm_call_count, SUM(total_tokens) AS total_tokens, SUM(cost_usd) AS cost_usd, SUM(cost_brl) AS cost_brl, COUNT(*) AS invocation_count FROM invocations GROUP BY zaip_agent;
1034
1034
  CREATE VIEW vw_cost_models AS WITH usage AS (SELECT model, agent_invocation_id, SUM(total_tokens) AS total_tokens, SUM(cost_usd) AS cost_usd, SUM(cost_brl) AS cost_brl FROM invocation_usage GROUP BY model, agent_invocation_id), calls AS (SELECT i.agent_invocation_id, CASE WHEN (SELECT COUNT(DISTINCT m.model) FROM invocation_usage m WHERE m.agent_invocation_id = i.agent_invocation_id AND m.model IS NOT NULL) = 1 THEN i.llm_call_count END AS llm_call_count FROM invocations i) SELECT u.model, SUM(c.llm_call_count) AS llm_call_count, SUM(u.total_tokens) AS total_tokens, SUM(u.cost_usd) AS cost_usd, SUM(u.cost_brl) AS cost_brl, COUNT(*) AS invocation_count FROM usage u JOIN calls c USING(agent_invocation_id) GROUP BY u.model;
1035
1035
  CREATE VIEW vw_cost_providers AS WITH usage AS (SELECT provider, agent_invocation_id, SUM(total_tokens) AS total_tokens, SUM(cost_usd) AS cost_usd, SUM(cost_brl) AS cost_brl FROM invocation_usage GROUP BY provider, agent_invocation_id), calls AS (SELECT i.agent_invocation_id, CASE WHEN (SELECT COUNT(DISTINCT p.provider) FROM invocation_usage p WHERE p.agent_invocation_id = i.agent_invocation_id AND p.provider IS NOT NULL) = 1 THEN i.llm_call_count END AS llm_call_count FROM invocations i) SELECT u.provider, SUM(c.llm_call_count) AS llm_call_count, SUM(u.total_tokens) AS total_tokens, SUM(u.cost_usd) AS cost_usd, SUM(u.cost_brl) AS cost_brl, COUNT(*) AS invocation_count FROM usage u JOIN calls c USING(agent_invocation_id) GROUP BY u.provider;
@@ -1448,7 +1448,7 @@ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type
1448
1448
  CREATE VIEW prd_summary_daily AS SELECT * FROM vw_prd_summary_daily;
1449
1449
  CREATE VIEW task_status_daily AS SELECT * FROM vw_task_status_daily;
1450
1450
  CREATE VIEW task_risk_daily AS SELECT * FROM vw_task_risk_daily;
1451
- `,zv=[...vd.matchAll(/\bCREATE VIEW ([A-Za-z_][A-Za-z0-9_]*)/g)].map(m=>m[1]).filter(m=>m!==void 0).reduce((m,$)=>{let L=$.startsWith("vw_")?$.slice(3):$;return m.replace(new RegExp(`\\b${$}\\b`,"g"),`zaip_vw_${L}`)},vd),Sd=new Set,Fv=zv.replace(/\bCREATE VIEW ([A-Za-z_][A-Za-z0-9_]*)[\s\S]*?;/g,(m,$)=>Sd.has($)?"":(Sd.add($),m));h||u.exec(Fv);let bd=`
1451
+ `,Fv=[...Sd.matchAll(/\bCREATE VIEW ([A-Za-z_][A-Za-z0-9_]*)/g)].map(m=>m[1]).filter(m=>m!==void 0).reduce((m,$)=>{let L=$.startsWith("vw_")?$.slice(3):$;return m.replace(new RegExp(`\\b${$}\\b`,"g"),`zaip_vw_${L}`)},Sd),bd=new Set,Zv=Fv.replace(/\bCREATE VIEW ([A-Za-z_][A-Za-z0-9_]*)[\s\S]*?;/g,(m,$)=>bd.has($)?"":(bd.add($),m));h||u.exec(Zv);let Ed=`
1452
1452
  CREATE TABLE developer_cost_projection AS
1453
1453
  WITH completed AS (
1454
1454
  SELECT a.developer_account_id, COUNT(DISTINCT w.id) AS completed_task_count
@@ -1475,7 +1475,7 @@ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type
1475
1475
  GROUP BY a.developer_account_id
1476
1476
  ORDER BY total_cost_brl DESC, account_id;
1477
1477
  CREATE INDEX developer_cost_projection_lookup ON developer_cost_projection(account_id);
1478
- `;u.exec(h?bd.replace("CREATE TABLE developer_cost_projection AS","DELETE FROM developer_cost_projection; INSERT INTO developer_cost_projection").replace("CREATE INDEX developer_cost_projection_lookup ON developer_cost_projection(account_id);",""):bd),xh(u),Yh(u);let Zv=Dh(u);Xs(u,"cost_agent_invocation_projection_v1",Zv.flatMap(m=>{let $=String(m.agent_invocation_id??"");return $?[{row_key:$,payload_json:JSON.stringify(m),occurred_day_sp:typeof m.occurred_day_sp=="string"?m.occurred_day_sp:null}]:[]})),u.exec(`
1478
+ `;u.exec(h?Ed.replace("CREATE TABLE developer_cost_projection AS","DELETE FROM developer_cost_projection; INSERT INTO developer_cost_projection").replace("CREATE INDEX developer_cost_projection_lookup ON developer_cost_projection(account_id);",""):Ed),Dh(u),Qh(u);let qv=jh(u);Qs(u,"cost_agent_invocation_projection_v1",qv.flatMap(m=>{let $=String(m.agent_invocation_id??"");return $?[{row_key:$,payload_json:JSON.stringify(m),occurred_day_sp:typeof m.occurred_day_sp=="string"?m.occurred_day_sp:null}]:[]})),u.exec(`
1479
1479
  DROP TABLE IF EXISTS files;
1480
1480
  DROP TABLE IF EXISTS read_model_source_state;
1481
1481
  DROP TABLE IF EXISTS read_model_metadata;
@@ -1485,15 +1485,15 @@ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type
1485
1485
  DROP TABLE IF EXISTS canonical_decisions;
1486
1486
  DROP TABLE IF EXISTS canonical_run_index;
1487
1487
  DROP TABLE IF EXISTS invocation_usage_segments;
1488
- `),Sv(e,u),u.exec("COMMIT;"),i("projection_finalize",80,"Finalizando \xEDndices do banco persistente do dashboard."),d=K}catch(f){throw u.exec("ROLLBACK;"),f}u.exec("PRAGMA busy_timeout=0; PRAGMA wal_checkpoint(TRUNCATE);")}finally{u.close()}let p=r+l;return i("snapshot_ready",86,"O banco SQLite persistente est\xE1 pronto."),tc(n),{files:d,path:n,cache:"rebuilt",fingerprint_ms:l,materialize_ms:Math.round(performance.now()-p),refresh:a}}function Sv(e,t){let n=td,i=(p,f)=>jh(process.env.ZAIP_DASHBOARD_LAUNCH_PROGRESS==="1",n,p,f),r=new rc(e,t),o=i("first_fold_viewport",()=>r.firstFoldViewportAllTime()),a=i("first_fold_all_time",()=>r.firstFoldAllTime()),s=i("first_fold_board",()=>r.firstFoldBoardAllTime()),l=i("first_fold_cost_summary",()=>r.costMonitorSummaryAggregate({from:null,to:null})),c=dv(),u=i("first_fold_cost_summary_month",()=>r.costMonitorSummaryAggregate(c)),d={from_day:c.from,to_day:c.to,source_latest_day:i("first_fold_latest_day",()=>r.firstFoldRelevantLatestDay()),aggregate:i("first_fold_month_aggregate",()=>r.firstFoldAggregate(c)),pages:{task:Qs(s.pages.task,c.from,c.to),spec:Qs(s.pages.spec,c.from,c.to),prd:Qs(s.pages.prd,c.from,c.to)},top_tasks:i("first_fold_month_top_tasks",()=>r.topTasks(c))};r.close(),Gh(t,{first_fold_viewport_cache:JSON.stringify(o),first_fold_all_time_cache:JSON.stringify(a),first_fold_all_time_board_cache:JSON.stringify(s),cost_monitor_summary_cache:JSON.stringify(l),cost_monitor_summary_month_cache:JSON.stringify({...c,aggregate:u}),first_fold_monthly_quick_cache:JSON.stringify(d)})}var cd={cost_monitor_daily:{date:"period_key",id:"period_key",order:"period_key DESC"},cost_monitor_monthly:{date:"period_key",id:"period_key",order:"period_key DESC"},cost_monitor_annual:{date:"period_key",id:"period_key",order:"period_key DESC"},cost_monitor_overview_view:{date:"period_key",id:"period_key",order:"period_key DESC"},cost_monitor_executions:{date:null,id:"execution_id",order:"invocation_count DESC, execution_id DESC"},cost_monitor_agent_invocations:{date:"occurred_day_sp",id:"agent_invocation_id",order:"occurred_at DESC, agent_invocation_id DESC"},cost_monitor_zaip_agents:{date:null,id:"zaip_agent",order:"invocation_count DESC, zaip_agent"},cost_monitor_models:{date:null,id:"model",order:"invocation_count DESC, model"},cost_monitor_providers:{date:null,id:"provider",order:"invocation_count DESC, provider"},cost_monitor_tasks:{date:null,id:"task_id",order:"invocation_count DESC, task_id"},cost_monitor_specs:{date:null,id:"spec_id",order:"invocation_count DESC, spec_id"},cost_monitor_prds:{date:null,id:"prd_id",order:"invocation_count DESC, prd_id"},cost_monitor_conversations:{date:null,id:"conversation_id",order:"invocation_count DESC, conversation_id"},operations_work_list:{date:"occurred_day_sp",id:"id",order:"occurred_at DESC, id DESC"},operations_work_kanban:{date:"occurred_day_sp",id:"id",order:"occurred_at DESC, id DESC"},operations_executions:{date:null,id:"execution_id",order:"started_at DESC, execution_id DESC"},operations_agent_invocations:{date:"source_day_sp",id:"agent_invocation_id",order:"occurred_at DESC, agent_invocation_id DESC"},operations_conversations:{date:null,id:"conversation_id",order:"started_at DESC, conversation_id DESC"},operations_decisions:{date:"occurred_day_sp",id:"id",order:"occurred_at DESC, id DESC"},operations_changes:{date:"occurred_day_sp",id:"id",order:"occurred_at DESC, id DESC"},operations_daily:{date:"day",id:"day",order:"day DESC"},operations_monthly:{date:"period_key",id:"period_key",order:"period_key DESC"},operations_annual:{date:"period_key",id:"period_key",order:"period_key DESC"},first_fold_overview:{date:"start_day",id:"period_key",order:"period_key DESC"},first_fold_task_status:{date:"day",id:"status",order:"day DESC, status"},first_fold_task_risk:{date:"day",id:"risk",order:"day DESC, risk"},first_fold_top_tasks:{date:"occurred_day_sp",id:"id",order:"total_duration DESC, id DESC"},first_fold_overview_all_time:{date:null,id:"period_key",order:"period_key"},first_fold_task_status_all_time:{date:null,id:"status",order:"status"},first_fold_task_risk_all_time:{date:null,id:"risk",order:"risk"},first_fold_task_metrics_all_time:{date:null,id:null,order:"task_count DESC"},first_fold_top_tasks_all_time:{date:null,id:"task_id",order:"rank"},first_fold_spec_status_all_time:{date:null,id:"stage",order:"stage"},first_fold_spec_classification_all_time:{date:null,id:"classification",order:"classification"},first_fold_spec_metrics_all_time:{date:null,id:null,order:"entity_count DESC"},first_fold_top_specs_all_time:{date:null,id:"entity_id",order:"rank"},first_fold_prd_status_all_time:{date:null,id:"stage",order:"stage"},first_fold_prd_classification_all_time:{date:null,id:"classification",order:"classification"},first_fold_prd_metrics_all_time:{date:null,id:null,order:"entity_count DESC"},first_fold_top_prds_all_time:{date:null,id:"entity_id",order:"rank"},first_fold_task:{date:"occurred_day_sp",id:"id",order:"occurred_at DESC, id DESC"},first_fold_spec:{date:"occurred_day_sp",id:"id",order:"occurred_at DESC, id DESC"},first_fold_prd:{date:"occurred_day_sp",id:"id",order:"occurred_at DESC, id DESC"}},rc=class extends Qi{executionDurationCache=new Map;dailyAggregateRowsCache=null;firstFoldAllTimeCache=null;firstFoldAllTimeBoardCache=null;firstFoldTopTasksAllTimeCache=null;firstFoldViewportCache=null;firstFoldMonthlyQuickCache=void 0;firstFoldViewportTimings={};metadataValues=null;unfilteredViewPageCache=new Map;technicalPayloadRowsCache=new Map;viewPageResultCache=new Map;costMonitorSummaryCache=new Map;canonicalSource(){return this.database.prepare("SELECT 1 FROM files WHERE path LIKE '.agents/data/%' LIMIT 1").get()===void 0?".agents/records":".agents/data"}dailyAggregateRows(){return this.dailyAggregateRowsCache===null&&(this.dailyAggregateRowsCache=this.database.prepare("SELECT * FROM daily_aggregate_cache ORDER BY day").all()),this.dailyAggregateRowsCache}unfilteredViewRows(t){let n=this.unfilteredViewPageCache.get(t);if(n!==void 0)return n;let i=cd[t].order,r=this.database.prepare(`SELECT * FROM ${t} ORDER BY ${i}`).all();return this.unfilteredViewPageCache.set(t,r),r}technicalPayloadRows(t){let n=this.technicalPayloadRowsCache.get(t);if(n!==void 0)return n;let i=this.database.prepare("SELECT payload_json FROM zaip_aios_activities WHERE payload_type=?").all(t).flatMap(({payload_json:r})=>{try{let o=JSON.parse(r);return o!==null&&typeof o=="object"&&!Array.isArray(o)?[o]:[]}catch{return[]}});return this.technicalPayloadRowsCache.set(t,i),i}database;ownsDatabase;constructor(t,n){super(t),this.ownsDatabase=n===void 0,this.database=n??new Lr.DatabaseSync(nc(t),{readOnly:!0}),ed(this.database)}async exists(t){let n=this.database.prepare("SELECT 1 FROM files WHERE path = ? LIMIT 1").get(t),i=this.database.prepare("SELECT 1 FROM files WHERE path LIKE ? LIMIT 1").get(`${t.replace(/\/$/,"")}/%`);return n!==void 0||i!==void 0}async readText(t){let n=this.database.prepare("SELECT content FROM files WHERE path = ?").get(t);if(n?.content===void 0)throw Object.assign(new Error(`SQLite read model is missing ${t}`),{code:"ENOENT"});return n.content}async readBytes(t){return Buffer.from(await this.readText(t),"utf8")}async readTextFrom(t,n){let i=await this.readText(t),r=Buffer.from(i,"utf8");return{content:r.subarray(Math.min(n,r.byteLength)).toString("utf8"),nextOffset:r.byteLength}}async listFiles(t,n=""){let i=`${t.replace(/\/$/,"")}/%`;return this.database.prepare("SELECT path FROM files WHERE path LIKE ? ORDER BY path").all(i).map(o=>o.path).filter(o=>o.endsWith(n))}async listDirectories(t){let n=`${t.replace(/\/$/,"")}/`,i=this.database.prepare("SELECT path FROM files WHERE path LIKE ?").all(`${n}%`);return[...new Set(i.map(r=>r.path.slice(n.length).split("/")[0]).filter(Boolean).map(r=>`${t.replace(/\/$/,"")}/${r}`))].sort()}close(){this.ownsDatabase&&this.database.close()}reopen(){this.database=new Lr.DatabaseSync(nc(this.root),{readOnly:!0}),ed(this.database),this.executionDurationCache.clear(),this.dailyAggregateRowsCache=null,this.firstFoldAllTimeCache=null,this.firstFoldAllTimeBoardCache=null,this.firstFoldTopTasksAllTimeCache=null,this.firstFoldViewportCache=null,this.firstFoldMonthlyQuickCache=void 0,this.firstFoldViewportTimings={},this.metadataValues=null,this.unfilteredViewPageCache.clear(),this.technicalPayloadRowsCache.clear(),this.costMonitorSummaryCache.clear(),this.viewPageResultCache.clear()}refresh(){this.database.close(),this.reopen()}async rebuildAndRefresh(t){this.database.close();try{await t()}finally{this.reopen()}this.viewPage("cost_monitor_daily",{limit:1,offset:0})}executionDurationByDay(t,n=null){let i=t.from?.slice(0,10)??null,r=t.to?.slice(0,10)??null,o=JSON.stringify({...t,from:i,to:r,taskId:n}),a=this.executionDurationCache.get(o);if(a!==void 0)return new Map(a);let s=["(? IS NULL OR f.occurred_day_sp >= ?)","(? IS NULL OR f.occurred_day_sp <= ?)","(? IS NULL OR a.task_id = ?)"],l=[i,i,r,r,n,n],c=(t.providers??[]).filter(h=>h!=="unavailable"),u=(t.models??[]).filter(h=>h!=="unavailable");if(t.providers?.includes("unavailable")===!0||t.models?.includes("unavailable")===!0){let h=(v,E)=>{if(E===void 0||E.length===0)return;let U=E.filter(V=>V!=="unavailable"),F=U.length===0?"0":`EXISTS (SELECT 1 FROM invocation_usage u WHERE u.agent_invocation_id=a.agent_run_id AND u.${v} IN (${U.map(()=>"?").join(",")}))`;U.length>0&&l.push(...U);let Z=`NOT EXISTS (SELECT 1 FROM invocation_usage u WHERE u.agent_invocation_id=a.agent_run_id AND u.${v} IS NOT NULL AND u.${v} <> 'unavailable')`;s.push(E.includes("unavailable")?`(${F} OR ${Z})`:F)};h("provider",t.providers),h("model",t.models)}else if(c.length>0||u.length>0){let h=[];c.length>0&&(h.push(`u.provider IN (${c.map(()=>"?").join(",")})`),l.push(...c)),u.length>0&&(h.push(`u.model IN (${u.map(()=>"?").join(",")})`),l.push(...u)),s.push(`EXISTS (SELECT 1 FROM invocation_usage u WHERE u.agent_invocation_id=a.agent_run_id AND ${h.join(" AND ")})`)}let p=[["zaip_agent",t.agents],["phase",t.phases],["status",t.statuses]];for(let[h,v]of p)v===void 0||v.length===0||(s.push(`a.${h} IN (${v.map(()=>"?").join(",")})`),l.push(...v));let f=this.database.prepare(`SELECT f.occurred_day_sp AS day, SUM(f.attributed_token_active_ms) AS duration_ms
1488
+ `),bv(e,u),u.exec("COMMIT;"),i("projection_finalize",80,"Finalizando \xEDndices do banco persistente do dashboard."),d=K}catch(f){throw u.exec("ROLLBACK;"),f}u.exec("PRAGMA busy_timeout=0; PRAGMA wal_checkpoint(TRUNCATE);")}finally{u.close()}let p=r+l;return i("snapshot_ready",86,"O banco SQLite persistente est\xE1 pronto."),rc(n),{files:d,path:n,cache:"rebuilt",fingerprint_ms:l,materialize_ms:Math.round(performance.now()-p),refresh:a}}function bv(e,t){let n=nd,i=(p,f)=>zh(process.env.ZAIP_DASHBOARD_LAUNCH_PROGRESS==="1",n,p,f),r=new oc(e,t),o=i("first_fold_viewport",()=>r.firstFoldViewportAllTime()),a=i("first_fold_all_time",()=>r.firstFoldAllTime()),s=i("first_fold_board",()=>r.firstFoldBoardAllTime()),l=i("first_fold_cost_summary",()=>r.costMonitorSummaryAggregate({from:null,to:null})),c=_v(),u=i("first_fold_cost_summary_month",()=>r.costMonitorSummaryAggregate(c)),d={from_day:c.from,to_day:c.to,source_latest_day:i("first_fold_latest_day",()=>r.firstFoldRelevantLatestDay()),aggregate:i("first_fold_month_aggregate",()=>r.firstFoldAggregate(c)),pages:{task:tc(s.pages.task,c.from,c.to),spec:tc(s.pages.spec,c.from,c.to),prd:tc(s.pages.prd,c.from,c.to)},top_tasks:i("first_fold_month_top_tasks",()=>r.topTasks(c))};r.close(),Xh(t,{first_fold_viewport_cache:JSON.stringify(o),first_fold_all_time_cache:JSON.stringify(a),first_fold_all_time_board_cache:JSON.stringify(s),cost_monitor_summary_cache:JSON.stringify(l),cost_monitor_summary_month_cache:JSON.stringify({...c,aggregate:u}),first_fold_monthly_quick_cache:JSON.stringify(d)})}var ld={cost_monitor_daily:{date:"period_key",id:"period_key",order:"period_key DESC"},cost_monitor_monthly:{date:"period_key",id:"period_key",order:"period_key DESC"},cost_monitor_annual:{date:"period_key",id:"period_key",order:"period_key DESC"},cost_monitor_overview_view:{date:"period_key",id:"period_key",order:"period_key DESC"},cost_monitor_executions:{date:null,id:"execution_id",order:"invocation_count DESC, execution_id DESC"},cost_monitor_agent_invocations:{date:"occurred_day_sp",id:"agent_invocation_id",order:"occurred_at DESC, agent_invocation_id DESC"},cost_monitor_zaip_agents:{date:null,id:"zaip_agent",order:"invocation_count DESC, zaip_agent"},cost_monitor_models:{date:null,id:"model",order:"invocation_count DESC, model"},cost_monitor_providers:{date:null,id:"provider",order:"invocation_count DESC, provider"},cost_monitor_tasks:{date:null,id:"task_id",order:"invocation_count DESC, task_id"},cost_monitor_specs:{date:null,id:"spec_id",order:"invocation_count DESC, spec_id"},cost_monitor_prds:{date:null,id:"prd_id",order:"invocation_count DESC, prd_id"},cost_monitor_conversations:{date:null,id:"conversation_id",order:"invocation_count DESC, conversation_id"},operations_work_list:{date:"occurred_day_sp",id:"id",order:"occurred_at DESC, id DESC"},operations_work_kanban:{date:"occurred_day_sp",id:"id",order:"occurred_at DESC, id DESC"},operations_executions:{date:null,id:"execution_id",order:"started_at DESC, execution_id DESC"},operations_agent_invocations:{date:"source_day_sp",id:"agent_invocation_id",order:"occurred_at DESC, agent_invocation_id DESC"},operations_conversations:{date:null,id:"conversation_id",order:"started_at DESC, conversation_id DESC"},operations_decisions:{date:"occurred_day_sp",id:"id",order:"occurred_at DESC, id DESC"},operations_changes:{date:"occurred_day_sp",id:"id",order:"occurred_at DESC, id DESC"},operations_daily:{date:"day",id:"day",order:"day DESC"},operations_monthly:{date:"period_key",id:"period_key",order:"period_key DESC"},operations_annual:{date:"period_key",id:"period_key",order:"period_key DESC"},first_fold_overview:{date:"start_day",id:"period_key",order:"period_key DESC"},first_fold_task_status:{date:"day",id:"status",order:"day DESC, status"},first_fold_task_risk:{date:"day",id:"risk",order:"day DESC, risk"},first_fold_top_tasks:{date:"occurred_day_sp",id:"id",order:"total_duration DESC, id DESC"},first_fold_overview_all_time:{date:null,id:"period_key",order:"period_key"},first_fold_task_status_all_time:{date:null,id:"status",order:"status"},first_fold_task_risk_all_time:{date:null,id:"risk",order:"risk"},first_fold_task_metrics_all_time:{date:null,id:null,order:"task_count DESC"},first_fold_top_tasks_all_time:{date:null,id:"task_id",order:"rank"},first_fold_spec_status_all_time:{date:null,id:"stage",order:"stage"},first_fold_spec_classification_all_time:{date:null,id:"classification",order:"classification"},first_fold_spec_metrics_all_time:{date:null,id:null,order:"entity_count DESC"},first_fold_top_specs_all_time:{date:null,id:"entity_id",order:"rank"},first_fold_prd_status_all_time:{date:null,id:"stage",order:"stage"},first_fold_prd_classification_all_time:{date:null,id:"classification",order:"classification"},first_fold_prd_metrics_all_time:{date:null,id:null,order:"entity_count DESC"},first_fold_top_prds_all_time:{date:null,id:"entity_id",order:"rank"},first_fold_task:{date:"occurred_day_sp",id:"id",order:"occurred_at DESC, id DESC"},first_fold_spec:{date:"occurred_day_sp",id:"id",order:"occurred_at DESC, id DESC"},first_fold_prd:{date:"occurred_day_sp",id:"id",order:"occurred_at DESC, id DESC"}},oc=class extends Qi{executionDurationCache=new Map;dailyAggregateRowsCache=null;firstFoldAllTimeCache=null;firstFoldAllTimeBoardCache=null;firstFoldTopTasksAllTimeCache=null;firstFoldViewportCache=null;firstFoldMonthlyQuickCache=void 0;firstFoldViewportTimings={};metadataValues=null;unfilteredViewPageCache=new Map;technicalPayloadRowsCache=new Map;viewPageResultCache=new Map;costMonitorSummaryCache=new Map;canonicalSource(){return this.database.prepare("SELECT 1 FROM files WHERE path LIKE '.agents/data/%' LIMIT 1").get()===void 0?".agents/records":".agents/data"}dailyAggregateRows(){return this.dailyAggregateRowsCache===null&&(this.dailyAggregateRowsCache=this.database.prepare("SELECT * FROM daily_aggregate_cache ORDER BY day").all()),this.dailyAggregateRowsCache}unfilteredViewRows(t){let n=this.unfilteredViewPageCache.get(t);if(n!==void 0)return n;let i=ld[t].order,r=this.database.prepare(`SELECT * FROM ${t} ORDER BY ${i}`).all();return this.unfilteredViewPageCache.set(t,r),r}technicalPayloadRows(t){let n=this.technicalPayloadRowsCache.get(t);if(n!==void 0)return n;let i=this.database.prepare("SELECT payload_json FROM zaip_aios_activities WHERE payload_type=?").all(t).flatMap(({payload_json:r})=>{try{let o=JSON.parse(r);return o!==null&&typeof o=="object"&&!Array.isArray(o)?[o]:[]}catch{return[]}});return this.technicalPayloadRowsCache.set(t,i),i}database;ownsDatabase;constructor(t,n){super(t),this.ownsDatabase=n===void 0,this.database=n??new Lr.DatabaseSync(ic(t),{readOnly:!0}),td(this.database)}async exists(t){let n=this.database.prepare("SELECT 1 FROM files WHERE path = ? LIMIT 1").get(t),i=this.database.prepare("SELECT 1 FROM files WHERE path LIKE ? LIMIT 1").get(`${t.replace(/\/$/,"")}/%`);return n!==void 0||i!==void 0}async readText(t){let n=this.database.prepare("SELECT content FROM files WHERE path = ?").get(t);if(n?.content===void 0)throw Object.assign(new Error(`SQLite read model is missing ${t}`),{code:"ENOENT"});return n.content}async readBytes(t){return Buffer.from(await this.readText(t),"utf8")}async readTextFrom(t,n){let i=await this.readText(t),r=Buffer.from(i,"utf8");return{content:r.subarray(Math.min(n,r.byteLength)).toString("utf8"),nextOffset:r.byteLength}}async listFiles(t,n=""){let i=`${t.replace(/\/$/,"")}/%`;return this.database.prepare("SELECT path FROM files WHERE path LIKE ? ORDER BY path").all(i).map(o=>o.path).filter(o=>o.endsWith(n))}async listDirectories(t){let n=`${t.replace(/\/$/,"")}/`,i=this.database.prepare("SELECT path FROM files WHERE path LIKE ?").all(`${n}%`);return[...new Set(i.map(r=>r.path.slice(n.length).split("/")[0]).filter(Boolean).map(r=>`${t.replace(/\/$/,"")}/${r}`))].sort()}close(){this.ownsDatabase&&this.database.close()}reopen(){this.database=new Lr.DatabaseSync(ic(this.root),{readOnly:!0}),td(this.database),this.executionDurationCache.clear(),this.dailyAggregateRowsCache=null,this.firstFoldAllTimeCache=null,this.firstFoldAllTimeBoardCache=null,this.firstFoldTopTasksAllTimeCache=null,this.firstFoldViewportCache=null,this.firstFoldMonthlyQuickCache=void 0,this.firstFoldViewportTimings={},this.metadataValues=null,this.unfilteredViewPageCache.clear(),this.technicalPayloadRowsCache.clear(),this.costMonitorSummaryCache.clear(),this.viewPageResultCache.clear()}refresh(){this.database.close(),this.reopen()}async rebuildAndRefresh(t){this.database.close();try{await t()}finally{this.reopen()}this.viewPage("cost_monitor_daily",{limit:1,offset:0})}executionDurationByDay(t,n=null){let i=t.from?.slice(0,10)??null,r=t.to?.slice(0,10)??null,o=JSON.stringify({...t,from:i,to:r,taskId:n}),a=this.executionDurationCache.get(o);if(a!==void 0)return new Map(a);let s=["(? IS NULL OR f.occurred_day_sp >= ?)","(? IS NULL OR f.occurred_day_sp <= ?)","(? IS NULL OR a.task_id = ?)"],l=[i,i,r,r,n,n],c=(t.providers??[]).filter(h=>h!=="unavailable"),u=(t.models??[]).filter(h=>h!=="unavailable");if(t.providers?.includes("unavailable")===!0||t.models?.includes("unavailable")===!0){let h=(v,E)=>{if(E===void 0||E.length===0)return;let x=E.filter(W=>W!=="unavailable"),F=x.length===0?"0":`EXISTS (SELECT 1 FROM invocation_usage u WHERE u.agent_invocation_id=a.agent_run_id AND u.${v} IN (${x.map(()=>"?").join(",")}))`;x.length>0&&l.push(...x);let Z=`NOT EXISTS (SELECT 1 FROM invocation_usage u WHERE u.agent_invocation_id=a.agent_run_id AND u.${v} IS NOT NULL AND u.${v} <> 'unavailable')`;s.push(E.includes("unavailable")?`(${F} OR ${Z})`:F)};h("provider",t.providers),h("model",t.models)}else if(c.length>0||u.length>0){let h=[];c.length>0&&(h.push(`u.provider IN (${c.map(()=>"?").join(",")})`),l.push(...c)),u.length>0&&(h.push(`u.model IN (${u.map(()=>"?").join(",")})`),l.push(...u)),s.push(`EXISTS (SELECT 1 FROM invocation_usage u WHERE u.agent_invocation_id=a.agent_run_id AND ${h.join(" AND ")})`)}let p=[["zaip_agent",t.agents],["phase",t.phases],["status",t.statuses]];for(let[h,v]of p)v===void 0||v.length===0||(s.push(`a.${h} IN (${v.map(()=>"?").join(",")})`),l.push(...v));let f=this.database.prepare(`SELECT f.occurred_day_sp AS day, SUM(f.attributed_token_active_ms) AS duration_ms
1489
1489
  FROM attributed_token_active_facts f JOIN zaip_aios_activities a USING(activity_row_id)
1490
- WHERE ${s.join(" AND ")} GROUP BY f.occurred_day_sp`).all(...l),S=new Map(f.map(h=>[h.day,Number(h.duration_ms)]));return this.executionDurationCache.set(o,S),new Map(S)}canonicalRunCountByDay(t){let n=t.from?.slice(0,10)??null,i=t.to?.slice(0,10)??null,r=["(? IS NULL OR occurred_day_sp >= ?)","(? IS NULL OR occurred_day_sp <= ?)"],o=[n,n,i,i],a=(t.providers??[]).filter(d=>d!=="unavailable"),s=(t.models??[]).filter(d=>d!=="unavailable");if(t.providers?.includes("unavailable")===!0||t.models?.includes("unavailable")===!0){let d=(p,f)=>{if(f===void 0||f.length===0)return;let S=f.filter(E=>E!=="unavailable"),h=S.length===0?"0":`EXISTS (SELECT 1 FROM invocations i JOIN invocation_usage u USING(agent_invocation_id) WHERE i.run_id=canonical_run_index.run_id AND u.${p} IN (${S.map(()=>"?").join(",")}))`;S.length>0&&o.push(...S);let v=`NOT EXISTS (SELECT 1 FROM invocations i JOIN invocation_usage u USING(agent_invocation_id) WHERE i.run_id=canonical_run_index.run_id AND u.${p} IS NOT NULL AND u.${p} <> 'unavailable')`;r.push(f.includes("unavailable")?`(${h} OR ${v})`:h)};d("provider",t.providers),d("model",t.models)}else if(a.length>0||s.length>0){let d=[];a.length>0&&(d.push(`u.provider IN (${a.map(()=>"?").join(",")})`),o.push(...a)),s.length>0&&(d.push(`u.model IN (${s.map(()=>"?").join(",")})`),o.push(...s)),r.push(`EXISTS (SELECT 1 FROM invocations i JOIN invocation_usage u USING(agent_invocation_id) WHERE i.run_id=canonical_run_index.run_id AND ${d.join(" AND ")})`)}let c=[["zaip_agent",t.agents],["phase",t.phases],["status",t.statuses]];for(let[d,p]of c)p===void 0||p.length===0||(r.push(`${d} IN (${p.map(()=>"?").join(",")})`),o.push(...p));let u=this.database.prepare(`SELECT occurred_day_sp AS day, COUNT(*) AS count FROM canonical_run_index WHERE ${r.join(" AND ")} GROUP BY occurred_day_sp`).all(...o);return new Map(u.map(d=>[d.day,Number(d.count)]))}dailyPeriods(t){let n=t.from?.slice(0,10)??null,i=t.to?.slice(0,10)??null,r=this.executionDurationByDay(t),o=this.dailyAggregateRows().filter(l=>{let c=String(l.day);return(n===null||c>=n)&&(i===null||c<=i)}),a=new Map(o.map(l=>[String(l.day),l])),s=[...new Set([...a.keys(),...r.keys()])].sort();return Object.fromEntries(s.map(l=>{let c=a.get(l)??{},u=Number(c.total_run_count??0),d=Number(c.token_known_runs??0),p=Math.min(Number(c.usd_known_runs??0),Number(c.brl_known_runs??0));return[l,{prds:Number(c.prd_count??0),specs:Number(c.spec_count??0),tasks:Number(c.task_count??0),validations:Number(c.validation_count??0),evidences:Number(c.evidence_count??0),runs:Number(c.total_run_count??0),usage:{total_tokens:{known_sum:Number(c.total_tokens??0),unknown:Math.max(0,u-d)},cost:{known_sum:Number(c.total_cost_brl??0),unknown:Math.max(0,u-p)}},duration:{known_sum:r.get(l)??0,unknown:r.has(l)?0:Number(c.total_run_count??0)}}]}))}firstFoldAggregate(t){let n=t.from?.slice(0,10)??null,i=t.to?.slice(0,10)??null,r=this.dailyAggregateRows().filter(l=>{let c=String(l.day);return(n===null||c>=n)&&(i===null||c<=i)}),o=l=>{let c=r.map(u=>u[l]).filter(u=>typeof u=="number");return c.length===0?null:c.reduce((u,d)=>u+d,0)},a=this.executionDurationByDay(t),s=[...a.values()].reduce((l,c)=>l+c,0);return{days:r.length,total_run_count:o("total_run_count")??0,agent_invocation_count:o("invocation_count")??0,llm_call_count:o("llm_call_count"),duration_ms:a.size===0?null:s,total_tokens:o("total_tokens"),cost_brl:o("total_cost_brl"),execution_day_count:a.size}}firstFoldMonthlyQuick(t){let n=Wh(this.database,this.firstFoldMonthlyQuickCache,t);return this.firstFoldMonthlyQuickCache=n.cache,n.result}firstFoldRelevantLatestDay(){let t=this.database.prepare(`SELECT MAX(day) AS day FROM (
1490
+ WHERE ${s.join(" AND ")} GROUP BY f.occurred_day_sp`).all(...l),S=new Map(f.map(h=>[h.day,Number(h.duration_ms)]));return this.executionDurationCache.set(o,S),new Map(S)}canonicalRunCountByDay(t){let n=t.from?.slice(0,10)??null,i=t.to?.slice(0,10)??null,r=["(? IS NULL OR occurred_day_sp >= ?)","(? IS NULL OR occurred_day_sp <= ?)"],o=[n,n,i,i],a=(t.providers??[]).filter(d=>d!=="unavailable"),s=(t.models??[]).filter(d=>d!=="unavailable");if(t.providers?.includes("unavailable")===!0||t.models?.includes("unavailable")===!0){let d=(p,f)=>{if(f===void 0||f.length===0)return;let S=f.filter(E=>E!=="unavailable"),h=S.length===0?"0":`EXISTS (SELECT 1 FROM invocations i JOIN invocation_usage u USING(agent_invocation_id) WHERE i.run_id=canonical_run_index.run_id AND u.${p} IN (${S.map(()=>"?").join(",")}))`;S.length>0&&o.push(...S);let v=`NOT EXISTS (SELECT 1 FROM invocations i JOIN invocation_usage u USING(agent_invocation_id) WHERE i.run_id=canonical_run_index.run_id AND u.${p} IS NOT NULL AND u.${p} <> 'unavailable')`;r.push(f.includes("unavailable")?`(${h} OR ${v})`:h)};d("provider",t.providers),d("model",t.models)}else if(a.length>0||s.length>0){let d=[];a.length>0&&(d.push(`u.provider IN (${a.map(()=>"?").join(",")})`),o.push(...a)),s.length>0&&(d.push(`u.model IN (${s.map(()=>"?").join(",")})`),o.push(...s)),r.push(`EXISTS (SELECT 1 FROM invocations i JOIN invocation_usage u USING(agent_invocation_id) WHERE i.run_id=canonical_run_index.run_id AND ${d.join(" AND ")})`)}let c=[["zaip_agent",t.agents],["phase",t.phases],["status",t.statuses]];for(let[d,p]of c)p===void 0||p.length===0||(r.push(`${d} IN (${p.map(()=>"?").join(",")})`),o.push(...p));let u=this.database.prepare(`SELECT occurred_day_sp AS day, COUNT(*) AS count FROM canonical_run_index WHERE ${r.join(" AND ")} GROUP BY occurred_day_sp`).all(...o);return new Map(u.map(d=>[d.day,Number(d.count)]))}dailyPeriods(t){let n=t.from?.slice(0,10)??null,i=t.to?.slice(0,10)??null,r=this.executionDurationByDay(t),o=this.dailyAggregateRows().filter(l=>{let c=String(l.day);return(n===null||c>=n)&&(i===null||c<=i)}),a=new Map(o.map(l=>[String(l.day),l])),s=[...new Set([...a.keys(),...r.keys()])].sort();return Object.fromEntries(s.map(l=>{let c=a.get(l)??{},u=Number(c.total_run_count??0),d=Number(c.token_known_runs??0),p=Math.min(Number(c.usd_known_runs??0),Number(c.brl_known_runs??0));return[l,{prds:Number(c.prd_count??0),specs:Number(c.spec_count??0),tasks:Number(c.task_count??0),validations:Number(c.validation_count??0),evidences:Number(c.evidence_count??0),runs:Number(c.total_run_count??0),usage:{total_tokens:{known_sum:Number(c.total_tokens??0),unknown:Math.max(0,u-d)},cost:{known_sum:Number(c.total_cost_brl??0),unknown:Math.max(0,u-p)}},duration:{known_sum:r.get(l)??0,unknown:r.has(l)?0:Number(c.total_run_count??0)}}]}))}firstFoldAggregate(t){let n=t.from?.slice(0,10)??null,i=t.to?.slice(0,10)??null,r=this.dailyAggregateRows().filter(l=>{let c=String(l.day);return(n===null||c>=n)&&(i===null||c<=i)}),o=l=>{let c=r.map(u=>u[l]).filter(u=>typeof u=="number");return c.length===0?null:c.reduce((u,d)=>u+d,0)},a=this.executionDurationByDay(t),s=[...a.values()].reduce((l,c)=>l+c,0);return{days:r.length,total_run_count:o("total_run_count")??0,agent_invocation_count:o("invocation_count")??0,llm_call_count:o("llm_call_count"),duration_ms:a.size===0?null:s,total_tokens:o("total_tokens"),cost_brl:o("total_cost_brl"),execution_day_count:a.size}}firstFoldMonthlyQuick(t){let n=Bh(this.database,this.firstFoldMonthlyQuickCache,t);return this.firstFoldMonthlyQuickCache=n.cache,n.result}firstFoldRelevantLatestDay(){let t=this.database.prepare(`SELECT MAX(day) AS day FROM (
1491
1491
  SELECT occurred_day_sp AS day FROM activities
1492
1492
  UNION ALL SELECT occurred_day_sp AS day FROM canonical_work_items
1493
1493
  UNION ALL SELECT occurred_day_sp AS day FROM canonical_artifacts
1494
1494
  UNION ALL SELECT occurred_day_sp AS day FROM canonical_run_index
1495
1495
  UNION ALL SELECT occurred_day_sp AS day FROM attributed_token_active_facts
1496
- )`).get();return typeof t.day=="string"?t.day:null}firstFoldAllTime(){return this.firstFoldAllTimeCache!==null?this.firstFoldAllTimeCache:(this.firstFoldAllTimeCache=Fh(this.database,()=>this.dailyAggregateRows().length,this.firstFoldViewportAllTime()),this.firstFoldAllTimeCache)}firstFoldBoardAllTime(){return this.firstFoldAllTimeBoardCache!==null?this.firstFoldAllTimeBoardCache:(this.firstFoldAllTimeBoardCache=qh(this.database,()=>{let t=av(this.database);return{pages:{task:t.filter(n=>n.kind==="task"||n.kind==="standalone-task"),spec:t.filter(n=>n.kind==="spec"),prd:t.filter(n=>n.kind==="prd")}}}),this.firstFoldAllTimeBoardCache)}firstFoldTopTasksAllTime(){return this.firstFoldTopTasksAllTimeCache!==null?this.firstFoldTopTasksAllTimeCache:(this.firstFoldTopTasksAllTimeCache=Vh(this.database),this.firstFoldTopTasksAllTimeCache)}firstFoldViewportAllTime(){return this.firstFoldViewportCache!==null?this.firstFoldViewportCache:(this.firstFoldViewportCache=Zh(this.database,this.firstFoldViewportTimings),this.firstFoldViewportCache)}firstFoldViewportProfile(){return this.firstFoldViewportTimings}topTasks(t,n=5){let i=t.from?.slice(0,10)??null,r=t.to?.slice(0,10)??null,o=this.database.prepare(`SELECT task_id, SUM(total_tokens) AS total_tokens, SUM(cost_brl) AS cost_brl, COUNT(*) AS run_count
1496
+ )`).get();return typeof t.day=="string"?t.day:null}firstFoldAllTime(){return this.firstFoldAllTimeCache!==null?this.firstFoldAllTimeCache:(this.firstFoldAllTimeCache=Zh(this.database,()=>this.dailyAggregateRows().length,this.firstFoldViewportAllTime()),this.firstFoldAllTimeCache)}firstFoldBoardAllTime(){return this.firstFoldAllTimeBoardCache!==null?this.firstFoldAllTimeBoardCache:(this.firstFoldAllTimeBoardCache=Vh(this.database,()=>{let t=sv(this.database);return{pages:{task:t.filter(n=>n.kind==="task"||n.kind==="standalone-task"),spec:t.filter(n=>n.kind==="spec"),prd:t.filter(n=>n.kind==="prd")}}}),this.firstFoldAllTimeBoardCache)}firstFoldTopTasksAllTime(){return this.firstFoldTopTasksAllTimeCache!==null?this.firstFoldTopTasksAllTimeCache:(this.firstFoldTopTasksAllTimeCache=Wh(this.database),this.firstFoldTopTasksAllTimeCache)}firstFoldViewportAllTime(){return this.firstFoldViewportCache!==null?this.firstFoldViewportCache:(this.firstFoldViewportCache=qh(this.database,this.firstFoldViewportTimings),this.firstFoldViewportCache)}firstFoldViewportProfile(){return this.firstFoldViewportTimings}topTasks(t,n=5){let i=t.from?.slice(0,10)??null,r=t.to?.slice(0,10)??null,o=this.database.prepare(`SELECT task_id, SUM(total_tokens) AS total_tokens, SUM(cost_brl) AS cost_brl, COUNT(*) AS run_count
1497
1497
  FROM activities WHERE task_id IS NOT NULL AND phase = 'execution'
1498
1498
  AND (? IS NULL OR occurred_day_sp >= ?) AND (? IS NULL OR occurred_day_sp <= ?)
1499
1499
  GROUP BY task_id`).all(i,i,r,r),a=this.database.prepare(`SELECT a.task_id, SUM(f.attributed_token_active_ms) AS duration_ms
@@ -1502,7 +1502,7 @@ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type
1502
1502
  AND (? IS NULL OR f.occurred_day_sp >= ?) AND (? IS NULL OR f.occurred_day_sp <= ?)
1503
1503
  GROUP BY a.task_id`).all(i,i,r,r),s=new Map(a.map(l=>[l.task_id,Number(l.duration_ms)]));return o.map(l=>({...l,duration_ms:s.get(l.task_id)??0})).filter(l=>l.duration_ms>0).sort((l,c)=>c.duration_ms-l.duration_ms||l.task_id.localeCompare(c.task_id)).slice(0,n)}canonicalTraceFiles(t){let n=[...new Set(t.filter(Boolean))];if(n.length===0)return[];let i=n.map(()=>"content LIKE ?").join(" OR ");return this.database.prepare(`SELECT path, content FROM files
1504
1504
  WHERE (path LIKE '.agents/data/%' OR path LIKE '.agents/records/%') AND (${i}) ORDER BY path`).all(...n.map(r=>`%${r}%`))}taskTraceUsage(t){let n=this.database.prepare(`SELECT run_id, run_role, phase, duration_ms FROM canonical_run_index
1505
- WHERE task_id = ?`).all(t),i=this.database.prepare("SELECT run_id, total_tokens, cost_brl FROM activities WHERE task_id = ?").all(t),r=n.filter(u=>u.run_role==="root"&&u.phase==="execution"&&typeof u.duration_ms=="number").length,o=this.executionDurationByDay({from:null,to:null},t),a=o.size===0?null:[...o.values()].reduce((u,d)=>u+d,0),s=i.filter(u=>typeof u.total_tokens=="number"),l=i.filter(u=>typeof u.cost_brl=="number"),c=(u,d)=>({value:u,known_runs:d,unknown_runs:Math.max(0,n.length-d),coverage_ratio:n.length===0?1:d/n.length});return{run_count:n.length,duration_ms:c(a,r),total_tokens:c(s.length===0?null:s.reduce((u,d)=>u+Number(d.total_tokens),0),s.length),cost:{...c(l.length===0?null:l.reduce((u,d)=>u+Number(d.cost_brl),0),l.length),currency:l.length===0?null:"BRL"}}}invocationTotals(t){let n=t.from?.slice(0,10)??null,i=t.to?.slice(0,10)??null;return this.database.prepare("SELECT COUNT(*) AS invocation_count, SUM(llm_call_count) AS llm_call_count, SUM(total_tokens) AS total_tokens, SUM(cost_usd) AS cost_usd, SUM(cost_brl) AS cost_brl FROM invocations WHERE (? IS NULL OR occurred_day_sp >= ?) AND (? IS NULL OR occurred_day_sp <= ?)").get(n,n,i,i)}invocationCostRows(t){let n=t.from?.slice(0,10)??null,i=t.to?.slice(0,10)??null,r="date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours')",o=[`(? IS NULL OR ${r} >= ?)`,`(? IS NULL OR ${r} <= ?)`],a=[n,n,i,i],s=(d,p)=>{p!==void 0&&p.length>0&&(o.push(`${d} IN (${p.map(()=>"?").join(",")})`),a.push(...p))};s("i.zaip_agent",t.agents),s("i.phase",t.phases),s("i.status",t.statuses),s("i.task_id",t.tasks),s("i.spec_id",t.specs),s("i.prd_id",t.prds),s("i.execution_id",t.executions),s("i.change_id",t.changes);let l=(t.providers??[]).filter(d=>d!=="unavailable"),c=(t.models??[]).filter(d=>d!=="unavailable");if(t.providers?.includes("unavailable")===!0||t.models?.includes("unavailable")===!0){let d=(p,f)=>{if(f===void 0||f.length===0)return;let S=f.filter(U=>U!=="unavailable"),h=f.includes("unavailable"),v=S.length===0?"0":`EXISTS (SELECT 1 FROM invocation_usage f WHERE f.agent_invocation_id = i.agent_invocation_id AND f.${p} IN (${S.map(()=>"?").join(",")}))`;S.length>0&&a.push(...S);let E=`NOT EXISTS (SELECT 1 FROM invocation_usage f WHERE f.agent_invocation_id = i.agent_invocation_id AND f.${p} IS NOT NULL AND f.${p} <> 'unavailable')`;o.push(h?`(${v} OR ${E})`:v)};d("provider",t.providers),d("model",t.models)}else if(l.length>0||c.length>0){let d=[];l.length>0&&(d.push(`f.provider IN (${l.map(()=>"?").join(",")})`),a.push(...l)),c.length>0&&(d.push(`f.model IN (${c.map(()=>"?").join(",")})`),a.push(...c)),o.push(`EXISTS (SELECT 1 FROM invocation_usage f WHERE f.agent_invocation_id = i.agent_invocation_id AND ${d.join(" AND ")})`)}return this.database.prepare(`SELECT i.*, CASE COUNT(DISTINCT s.provider) WHEN 0 THEN NULL WHEN 1 THEN MIN(s.provider) ELSE 'mixed' END AS provider, CASE COUNT(DISTINCT s.model) WHEN 0 THEN NULL WHEN 1 THEN MIN(s.model) ELSE 'mixed' END AS model,
1505
+ WHERE task_id = ?`).all(t),i=this.database.prepare("SELECT run_id, total_tokens, cost_brl FROM activities WHERE task_id = ?").all(t),r=n.filter(u=>u.run_role==="root"&&u.phase==="execution"&&typeof u.duration_ms=="number").length,o=this.executionDurationByDay({from:null,to:null},t),a=o.size===0?null:[...o.values()].reduce((u,d)=>u+d,0),s=i.filter(u=>typeof u.total_tokens=="number"),l=i.filter(u=>typeof u.cost_brl=="number"),c=(u,d)=>({value:u,known_runs:d,unknown_runs:Math.max(0,n.length-d),coverage_ratio:n.length===0?1:d/n.length});return{run_count:n.length,duration_ms:c(a,r),total_tokens:c(s.length===0?null:s.reduce((u,d)=>u+Number(d.total_tokens),0),s.length),cost:{...c(l.length===0?null:l.reduce((u,d)=>u+Number(d.cost_brl),0),l.length),currency:l.length===0?null:"BRL"}}}invocationTotals(t){let n=t.from?.slice(0,10)??null,i=t.to?.slice(0,10)??null;return this.database.prepare("SELECT COUNT(*) AS invocation_count, SUM(llm_call_count) AS llm_call_count, SUM(total_tokens) AS total_tokens, SUM(cost_usd) AS cost_usd, SUM(cost_brl) AS cost_brl FROM invocations WHERE (? IS NULL OR occurred_day_sp >= ?) AND (? IS NULL OR occurred_day_sp <= ?)").get(n,n,i,i)}invocationCostRows(t){let n=t.from?.slice(0,10)??null,i=t.to?.slice(0,10)??null,r="date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours')",o=[`(? IS NULL OR ${r} >= ?)`,`(? IS NULL OR ${r} <= ?)`],a=[n,n,i,i],s=(d,p)=>{p!==void 0&&p.length>0&&(o.push(`${d} IN (${p.map(()=>"?").join(",")})`),a.push(...p))};s("i.zaip_agent",t.agents),s("i.phase",t.phases),s("i.status",t.statuses),s("i.task_id",t.tasks),s("i.spec_id",t.specs),s("i.prd_id",t.prds),s("i.execution_id",t.executions),s("i.change_id",t.changes);let l=(t.providers??[]).filter(d=>d!=="unavailable"),c=(t.models??[]).filter(d=>d!=="unavailable");if(t.providers?.includes("unavailable")===!0||t.models?.includes("unavailable")===!0){let d=(p,f)=>{if(f===void 0||f.length===0)return;let S=f.filter(x=>x!=="unavailable"),h=f.includes("unavailable"),v=S.length===0?"0":`EXISTS (SELECT 1 FROM invocation_usage f WHERE f.agent_invocation_id = i.agent_invocation_id AND f.${p} IN (${S.map(()=>"?").join(",")}))`;S.length>0&&a.push(...S);let E=`NOT EXISTS (SELECT 1 FROM invocation_usage f WHERE f.agent_invocation_id = i.agent_invocation_id AND f.${p} IS NOT NULL AND f.${p} <> 'unavailable')`;o.push(h?`(${v} OR ${E})`:v)};d("provider",t.providers),d("model",t.models)}else if(l.length>0||c.length>0){let d=[];l.length>0&&(d.push(`f.provider IN (${l.map(()=>"?").join(",")})`),a.push(...l)),c.length>0&&(d.push(`f.model IN (${c.map(()=>"?").join(",")})`),a.push(...c)),o.push(`EXISTS (SELECT 1 FROM invocation_usage f WHERE f.agent_invocation_id = i.agent_invocation_id AND ${d.join(" AND ")})`)}return this.database.prepare(`SELECT i.*, CASE COUNT(DISTINCT s.provider) WHEN 0 THEN NULL WHEN 1 THEN MIN(s.provider) ELSE 'mixed' END AS provider, CASE COUNT(DISTINCT s.model) WHEN 0 THEN NULL WHEN 1 THEN MIN(s.model) ELSE 'mixed' END AS model,
1506
1506
  SUM(s.input_tokens) AS input_tokens, SUM(s.cached_input_tokens) AS cached_input_tokens,
1507
1507
  SUM(s.output_tokens) AS output_tokens, SUM(s.reasoning_tokens) AS reasoning_tokens,
1508
1508
  SUM(s.total_tokens) AS total_tokens, SUM(s.cost_usd) AS cost_usd, SUM(s.cost_brl) AS cost_brl
@@ -1510,7 +1510,7 @@ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type
1510
1510
  WHERE ${o.join(" AND ")}
1511
1511
  GROUP BY i.agent_invocation_id ORDER BY i.occurred_at`).all(...a)}costMonitorFactualDurationByDay(t,n=this.costMonitorFinancialActivityRows(t)){let i=n,r=new Set,o=new Map;for(let d of i){let p=typeof d.source_started_at=="string"?d.source_started_at:typeof d.source_occurred_at=="string"?d.source_occurred_at:typeof d.occurred_at=="string"?d.occurred_at:null;if(p===null||!(typeof d.total_tokens=="number"||typeof d.cost_brl=="number"||typeof d.cost_usd=="number"))continue;let S=typeof d.activity_row_id=="string"||typeof d.activity_row_id=="number"?String(d.activity_row_id):String(d.run_id??p);r.add(S)}let a=new Map,s=new Set,l=this.database.prepare("SELECT 1 AS present FROM sqlite_master WHERE name = 'attributed_token_active_facts'").get()!==void 0?"attributed_token_active_facts":"zaip_vw_attributed_token_active_facts",c=Array.from(r);for(let d=0;d<c.length;d+=900){let p=c.slice(d,d+900),f=this.database.prepare(`SELECT activity_row_id, occurred_day_sp, attributed_token_active_ms
1512
1512
  FROM ${l}
1513
- WHERE activity_row_id IN (${p.map(()=>"?").join(",")})`).all(...p);for(let S of f){let h=String(S.activity_row_id),v=String(S.occurred_day_sp),E=Number(S.attributed_token_active_ms);if(!Number.isFinite(E)||E<0)continue;let U=a.get(v)??{known_sum:0,activityIds:new Set};U.known_sum+=E,U.activityIds.add(h),a.set(v,U),s.add(h)}}for(let d of i){let p=typeof d.activity_row_id=="string"||typeof d.activity_row_id=="number"?String(d.activity_row_id):null;if(p===null||s.has(p))continue;let f=typeof d.source_started_at=="string"?d.source_started_at:typeof d.source_occurred_at=="string"?d.source_occurred_at:typeof d.occurred_at=="string"?d.occurred_at:null;if(f===null)continue;let S=yt(f),h=o.get(S)??new Set;h.add(p),o.set(S,h)}let u=new Map;for(let d of new Set([...a.keys(),...o.keys()])){let p=a.get(d)??{known_sum:0,activityIds:new Set},f=o.get(d)??new Set;u.set(d,{known_sum:p.known_sum,eligible_runs:new Set([...p.activityIds,...f]).size,known_runs:p.activityIds.size})}return u}activityCostRows(t){let n=t.from?.slice(0,10)??null,i=t.to?.slice(0,10)??null,r=["(? IS NULL OR i.occurred_day_sp >= ?)","(? IS NULL OR i.occurred_day_sp <= ?)"],o=[n,n,i,i],a=(s,l)=>{l!==void 0&&l.length>0&&(r.push(`${s} IN (${l.map(()=>"?").join(",")})`),o.push(...l))};return a("i.zaip_agent",t.agents),a("i.provider",t.providers),a("i.model",t.models),a("i.phase",t.phases),a("i.status",t.statuses),a("i.task_id",t.tasks),a("i.spec_id",t.specs),a("i.prd_id",t.prds),a("i.execution_id",t.executions),a("i.change_id",t.changes),this.database.prepare(`SELECT i.*, i.activity_row_id AS agent_invocation_id,
1513
+ WHERE activity_row_id IN (${p.map(()=>"?").join(",")})`).all(...p);for(let S of f){let h=String(S.activity_row_id),v=String(S.occurred_day_sp),E=Number(S.attributed_token_active_ms);if(!Number.isFinite(E)||E<0)continue;let x=a.get(v)??{known_sum:0,activityIds:new Set};x.known_sum+=E,x.activityIds.add(h),a.set(v,x),s.add(h)}}for(let d of i){let p=typeof d.activity_row_id=="string"||typeof d.activity_row_id=="number"?String(d.activity_row_id):null;if(p===null||s.has(p))continue;let f=typeof d.source_started_at=="string"?d.source_started_at:typeof d.source_occurred_at=="string"?d.source_occurred_at:typeof d.occurred_at=="string"?d.occurred_at:null;if(f===null)continue;let S=yt(f),h=o.get(S)??new Set;h.add(p),o.set(S,h)}let u=new Map;for(let d of new Set([...a.keys(),...o.keys()])){let p=a.get(d)??{known_sum:0,activityIds:new Set},f=o.get(d)??new Set;u.set(d,{known_sum:p.known_sum,eligible_runs:new Set([...p.activityIds,...f]).size,known_runs:p.activityIds.size})}return u}activityCostRows(t){let n=t.from?.slice(0,10)??null,i=t.to?.slice(0,10)??null,r=["(? IS NULL OR i.occurred_day_sp >= ?)","(? IS NULL OR i.occurred_day_sp <= ?)"],o=[n,n,i,i],a=(s,l)=>{l!==void 0&&l.length>0&&(r.push(`${s} IN (${l.map(()=>"?").join(",")})`),o.push(...l))};return a("i.zaip_agent",t.agents),a("i.provider",t.providers),a("i.model",t.models),a("i.phase",t.phases),a("i.status",t.statuses),a("i.task_id",t.tasks),a("i.spec_id",t.specs),a("i.prd_id",t.prds),a("i.execution_id",t.executions),a("i.change_id",t.changes),this.database.prepare(`SELECT i.*, i.activity_row_id AS agent_invocation_id,
1514
1514
  i.parent_run_id AS parent_agent_invocation_id
1515
1515
  FROM activities i WHERE ${r.join(" AND ")} ORDER BY i.occurred_at`).all(...o)}costMonitorFinancialActivityRows(t){let{from:n,to:i,providers:r=[],models:o=[]}=t,a=Qe(n),s=Qe(i),l="date(COALESCE(a.source_started_at, a.source_occurred_at, a.occurred_at), '-3 hours')",c=["(a.total_tokens IS NOT NULL OR a.cost_brl IS NOT NULL OR a.cost_usd IS NOT NULL)",`(? IS NULL OR ${l} >= ?)`,`(? IS NULL OR ${l} <= ?)`],u=[a,a,s,s],d=(p,f)=>{f!==void 0&&f.length>0&&(c.push(`a.${p} IN (${f.map(()=>"?").join(",")})`),u.push(...f))};if(d("zaip_agent",t.agents),d("phase",t.phases),d("status",t.statuses),d("task_id",t.tasks),d("spec_id",t.specs),d("prd_id",t.prds),d("execution_id",t.executions),d("change_id",t.changes),r.length>0||o.length>0){let p=[];r.length>0&&p.push(`COALESCE(u.provider, 'unavailable') IN (${r.map(()=>"?").join(",")})`),o.length>0&&p.push(`COALESCE(u.model, 'unavailable') IN (${o.map(()=>"?").join(",")})`);let f=[...r,...o],S=[];r.length>0&&S.push(`COALESCE(a.provider, 'unavailable') IN (${r.map(()=>"?").join(",")})`),o.length>0&&S.push(`COALESCE(a.model, 'unavailable') IN (${o.map(()=>"?").join(",")})`),c.push(`((a.agent_run_id IS NULL AND ${S.join(" AND ")}) OR (a.agent_run_id IS NOT NULL AND EXISTS (SELECT 1 FROM invocation_usage u WHERE u.agent_invocation_id = a.agent_run_id AND ${p.join(" AND ")})))`),u.push(...r,...o,...f)}return this.database.prepare(`SELECT
1516
1516
  a.activity_row_id, a.agent_run_id, a.parent_run_id,
@@ -1529,7 +1529,7 @@ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type
1529
1529
  SELECT a.developer_account_id, COUNT(DISTINCT w.id) AS completed_task_count
1530
1530
  FROM zaip_vw_canonical_work_items w JOIN selected a ON a.run_id=w.completed_run_id
1531
1531
  WHERE w.entity_kind='task' AND w.status='completed' GROUP BY a.developer_account_id
1532
- ) ${$h()}
1532
+ ) ${Ch()}
1533
1533
  SELECT a.developer_account_id AS account_id, MAX(a.developer_login) AS login_snapshot,
1534
1534
  CASE WHEN COUNT(DISTINCT a.developer_attribution_source)=1 THEN MAX(a.developer_attribution_source) ELSE 'mixed' END AS attribution_source,
1535
1535
  COUNT(DISTINCT a.prd_id) AS prd_count, COUNT(DISTINCT a.spec_id) AS spec_count,
@@ -1555,7 +1555,7 @@ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type
1555
1555
  AND contributor.developer_account_id IS NOT NULL
1556
1556
  WHERE w.entity_kind='task' AND w.status='completed'
1557
1557
  GROUP BY selected.developer_account_id, w.id, w.title, w.status, w.completed_run_id
1558
- ORDER BY w.id`).all(...o),c=new Map;for(let d of l){let p=String(d.delivered_by_account_id),f=c.get(p)??[];f.push({id:d.id,title:d.title,status:d.status,completed_run_id:d.completed_run_id,delivered_by:{account_id:p},contributors:String(d.contributor_pairs??"").split(",").filter(Boolean).map(S=>{let[h,v]=S.split("");return{account_id:h,login_snapshot:v||null}})}),c.set(p,f)}let u={verified_local_account:"verified",cached_fallback:"cached_fallback",human_assigned:"human_assigned",mixed:"mixed"};for(let d of s)d.completed_tasks=c.get(String(d.account_id))??[],d.qualification=u[String(d.attribution_source)]??"unqualified";return{data_source:"sqlite_read_model",filters:{from:n,to:i,account_ids:t.accountIds??[]},rows:s,totals:{run_count:s.reduce((d,p)=>d+Number(p.run_count??0),0),completed_task_count:s.reduce((d,p)=>d+Number(p.completed_task_count??0),0),total_cost_usd:ad(s,"total_cost_usd"),total_cost_brl:ad(s,"total_cost_brl")}}}operationsDeveloperAggregate(t){let n=Qe(t.from),i=Qe(t.to),r=["a.developer_account_id IS NOT NULL","(? IS NULL OR a.occurred_day_sp >= ?)","(? IS NULL OR a.occurred_day_sp <= ?)"],o=[n,n,i,i];t.accountIds!==void 0&&t.accountIds.length>0&&(r.push(`a.developer_account_id IN (${t.accountIds.map(()=>"?").join(",")})`),o.push(...t.accountIds));let a=r.join(" AND "),s=this.database.prepare(`
1558
+ ORDER BY w.id`).all(...o),c=new Map;for(let d of l){let p=String(d.delivered_by_account_id),f=c.get(p)??[];f.push({id:d.id,title:d.title,status:d.status,completed_run_id:d.completed_run_id,delivered_by:{account_id:p},contributors:String(d.contributor_pairs??"").split(",").filter(Boolean).map(S=>{let[h,v]=S.split("");return{account_id:h,login_snapshot:v||null}})}),c.set(p,f)}let u={verified_local_account:"verified",cached_fallback:"cached_fallback",human_assigned:"human_assigned",mixed:"mixed"};for(let d of s)d.completed_tasks=c.get(String(d.account_id))??[],d.qualification=u[String(d.attribution_source)]??"unqualified";return{data_source:"sqlite_read_model",filters:{from:n,to:i,account_ids:t.accountIds??[]},rows:s,totals:{run_count:s.reduce((d,p)=>d+Number(p.run_count??0),0),completed_task_count:s.reduce((d,p)=>d+Number(p.completed_task_count??0),0),total_cost_usd:sd(s,"total_cost_usd"),total_cost_brl:sd(s,"total_cost_brl")}}}operationsDeveloperAggregate(t){let n=Qe(t.from),i=Qe(t.to),r=["a.developer_account_id IS NOT NULL","(? IS NULL OR a.occurred_day_sp >= ?)","(? IS NULL OR a.occurred_day_sp <= ?)"],o=[n,n,i,i];t.accountIds!==void 0&&t.accountIds.length>0&&(r.push(`a.developer_account_id IN (${t.accountIds.map(()=>"?").join(",")})`),o.push(...t.accountIds));let a=r.join(" AND "),s=this.database.prepare(`
1559
1559
  WITH selected AS (SELECT * FROM zaip_vw_activities a WHERE ${a}),
1560
1560
  developer_tasks AS (
1561
1561
  SELECT DISTINCT developer_account_id AS account_id, task_id
@@ -1597,7 +1597,7 @@ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type
1597
1597
  LEFT JOIN type_counts ON type_counts.account_id=selected.developer_account_id
1598
1598
  LEFT JOIN risk_counts ON risk_counts.account_id=selected.developer_account_id
1599
1599
  GROUP BY selected.developer_account_id
1600
- ORDER BY total_cost_brl DESC, account_id`).all(...o),l=c=>{if(typeof c!="string")return null;try{let u=JSON.parse(c);return Object.fromEntries(Object.entries(u).flatMap(([d,p])=>typeof p=="number"&&Number.isFinite(p)?[[d,p]]:[]))}catch{return null}};for(let c of s)c.status_counts=l(c.status_counts_json),c.type_counts=l(c.type_counts_json),c.risk_counts=l(c.risk_counts_json),delete c.status_counts_json,delete c.type_counts_json,delete c.risk_counts_json;return{data_source:"sqlite_read_model",filters:{from:n,to:i,account_ids:t.accountIds??[]},rows:s}}costMonitorSummaryAggregate(t){let{from:n,to:i,providers:r=[],models:o=[]}=t,a=Qe(n),s=Qe(i),l=JSON.stringify({...t,from:a,to:s}),c=this.costMonitorSummaryCache.get(l);if(c!==void 0)return structuredClone(c);let u=P=>{if(this.costMonitorSummaryCache.size>=64){let oe=this.costMonitorSummaryCache.keys().next().value;oe!==void 0&&this.costMonitorSummaryCache.delete(oe)}return this.costMonitorSummaryCache.set(l,structuredClone(P)),structuredClone(P)};if(a===null&&s===null&&[r,o,t.agents,t.phases,t.statuses,t.tasks,t.specs,t.prds,t.executions,t.changes].every(P=>P===void 0||P.length===0)){let P=this.database.prepare("SELECT payload_json FROM zaip_aios_activities WHERE payload_type='cost_monitor_summary_cache' ORDER BY recorded_at DESC LIMIT 1").get();if(typeof P?.payload_json=="string")return u(JSON.parse(P.payload_json))}if(a!==null&&s!==null&&[r,o,t.agents,t.phases,t.statuses,t.tasks,t.specs,t.prds,t.executions,t.changes].every(P=>P===void 0||P.length===0)){let P=this.database.prepare("SELECT payload_json FROM zaip_aios_activities WHERE payload_type='cost_monitor_summary_month_cache' ORDER BY recorded_at DESC LIMIT 1").get();if(typeof P?.payload_json=="string"){let oe=JSON.parse(P.payload_json);if(oe.from===a&&oe.to===s)return u(oe.aggregate)}}let p="date(COALESCE(a.source_started_at, a.source_occurred_at, a.occurred_at), '-3 hours')",f=["(a.total_tokens IS NOT NULL OR a.cost_brl IS NOT NULL OR a.cost_usd IS NOT NULL)",`(? IS NULL OR ${p} >= ?)`,`(? IS NULL OR ${p} <= ?)`],S=[a,a,s,s],h=(P,oe)=>{oe===void 0||oe.length===0||(f.push(`a.${P} IN (${oe.map(()=>"?").join(",")})`),S.push(...oe))};if(h("zaip_agent",t.agents),h("phase",t.phases),h("status",t.statuses),h("task_id",t.tasks),h("spec_id",t.specs),h("prd_id",t.prds),h("execution_id",t.executions),h("change_id",t.changes),r.length>0||o.length>0){let P=[],oe=[],Ee=[],Ue=[];r.length>0&&(P.push(`COALESCE(u.provider, 'unavailable') IN (${r.map(()=>"?").join(",")})`),oe.push(`COALESCE(a.provider, 'unavailable') IN (${r.map(()=>"?").join(",")})`),Ee.push(...r),Ue.push(...r)),o.length>0&&(P.push(`COALESCE(u.model, 'unavailable') IN (${o.map(()=>"?").join(",")})`),oe.push(`COALESCE(a.model, 'unavailable') IN (${o.map(()=>"?").join(",")})`),Ee.push(...o),Ue.push(...o)),f.push(`((a.agent_run_id IS NULL AND ${oe.join(" AND ")}) OR (a.agent_run_id IS NOT NULL AND a.agent_run_id IN (SELECT u.agent_invocation_id FROM invocation_usage u WHERE ${P.join(" AND ")})))`),S.push(...Ue,...Ee)}let v=`WITH selected AS (
1600
+ ORDER BY total_cost_brl DESC, account_id`).all(...o),l=c=>{if(typeof c!="string")return null;try{let u=JSON.parse(c);return Object.fromEntries(Object.entries(u).flatMap(([d,p])=>typeof p=="number"&&Number.isFinite(p)?[[d,p]]:[]))}catch{return null}};for(let c of s)c.status_counts=l(c.status_counts_json),c.type_counts=l(c.type_counts_json),c.risk_counts=l(c.risk_counts_json),delete c.status_counts_json,delete c.type_counts_json,delete c.risk_counts_json;return{data_source:"sqlite_read_model",filters:{from:n,to:i,account_ids:t.accountIds??[]},rows:s}}costMonitorSummaryAggregate(t){let{from:n,to:i,providers:r=[],models:o=[]}=t,a=Qe(n),s=Qe(i),l=JSON.stringify({...t,from:a,to:s}),c=this.costMonitorSummaryCache.get(l);if(c!==void 0)return structuredClone(c);let u=P=>{if(this.costMonitorSummaryCache.size>=64){let ae=this.costMonitorSummaryCache.keys().next().value;ae!==void 0&&this.costMonitorSummaryCache.delete(ae)}return this.costMonitorSummaryCache.set(l,structuredClone(P)),structuredClone(P)};if(a===null&&s===null&&[r,o,t.agents,t.phases,t.statuses,t.tasks,t.specs,t.prds,t.executions,t.changes].every(P=>P===void 0||P.length===0)){let P=this.database.prepare("SELECT payload_json FROM zaip_aios_activities WHERE payload_type='cost_monitor_summary_cache' ORDER BY recorded_at DESC LIMIT 1").get();if(typeof P?.payload_json=="string")return u(JSON.parse(P.payload_json))}if(a!==null&&s!==null&&[r,o,t.agents,t.phases,t.statuses,t.tasks,t.specs,t.prds,t.executions,t.changes].every(P=>P===void 0||P.length===0)){let P=this.database.prepare("SELECT payload_json FROM zaip_aios_activities WHERE payload_type='cost_monitor_summary_month_cache' ORDER BY recorded_at DESC LIMIT 1").get();if(typeof P?.payload_json=="string"){let ae=JSON.parse(P.payload_json);if(ae.from===a&&ae.to===s)return u(ae.aggregate)}}let p="date(COALESCE(a.source_started_at, a.source_occurred_at, a.occurred_at), '-3 hours')",f=["(a.total_tokens IS NOT NULL OR a.cost_brl IS NOT NULL OR a.cost_usd IS NOT NULL)",`(? IS NULL OR ${p} >= ?)`,`(? IS NULL OR ${p} <= ?)`],S=[a,a,s,s],h=(P,ae)=>{ae===void 0||ae.length===0||(f.push(`a.${P} IN (${ae.map(()=>"?").join(",")})`),S.push(...ae))};if(h("zaip_agent",t.agents),h("phase",t.phases),h("status",t.statuses),h("task_id",t.tasks),h("spec_id",t.specs),h("prd_id",t.prds),h("execution_id",t.executions),h("change_id",t.changes),r.length>0||o.length>0){let P=[],ae=[],Ee=[],Ue=[];r.length>0&&(P.push(`COALESCE(u.provider, 'unavailable') IN (${r.map(()=>"?").join(",")})`),ae.push(`COALESCE(a.provider, 'unavailable') IN (${r.map(()=>"?").join(",")})`),Ee.push(...r),Ue.push(...r)),o.length>0&&(P.push(`COALESCE(u.model, 'unavailable') IN (${o.map(()=>"?").join(",")})`),ae.push(`COALESCE(a.model, 'unavailable') IN (${o.map(()=>"?").join(",")})`),Ee.push(...o),Ue.push(...o)),f.push(`((a.agent_run_id IS NULL AND ${ae.join(" AND ")}) OR (a.agent_run_id IS NOT NULL AND a.agent_run_id IN (SELECT u.agent_invocation_id FROM invocation_usage u WHERE ${P.join(" AND ")})))`),S.push(...Ue,...Ee)}let v=`WITH selected AS (
1601
1601
  SELECT ${p} AS day,
1602
1602
  CASE WHEN a.phase='conversation' THEN 'conversation'
1603
1603
  WHEN a.phase='planning' THEN 'planning' ELSE 'execution' END AS phase_key,
@@ -1607,7 +1607,7 @@ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type
1607
1607
  a.input_tokens, a.cached_input_tokens, a.output_tokens, a.reasoning_tokens,
1608
1608
  a.total_tokens, a.cost_usd, a.cost_brl
1609
1609
  FROM activities a WHERE ${f.join(" AND ")}
1610
- )`,U=this.database.prepare(`${v}
1610
+ )`,x=this.database.prepare(`${v}
1611
1611
  SELECT day, phase_key, COUNT(*) AS eligible_runs,
1612
1612
  json_group_array(DISTINCT task_id) AS task_ids_json,
1613
1613
  COALESCE(SUM(event_count), 0) AS events,
@@ -1623,7 +1623,7 @@ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type
1623
1623
  COUNT(total_tokens) AS tokens_known,
1624
1624
  COUNT(cost_usd) AS usd_known,
1625
1625
  COUNT(cost_brl) AS brl_known
1626
- FROM selected GROUP BY day, phase_key ORDER BY day, phase_key`).all(...S),F=["duration_ms","input_tokens","cached_input_tokens","output_tokens","reasoning_tokens","total_tokens","cost_usd","cost_brl"],Z=["eligible_runs","events","duration_known","tokens_known","usd_known","brl_known"],V=(P,oe)=>{let Ee={key:P};for(let et of Z)Ee[et]=oe.reduce((Vt,ir)=>Vt+(typeof ir[et]=="number"?Number(ir[et]):0),0);for(let et of F){let Vt=oe.filter(ir=>typeof ir[et]=="number");Ee[et]=Vt.length===0?null:Vt.reduce((ir,Mr)=>ir+Number(Mr[et]),0)}let Ue=new Set;for(let et of oe)if(typeof et.task_ids_json=="string")for(let Vt of JSON.parse(et.task_ids_json))typeof Vt=="string"&&Ue.add(Vt);return Ee.task_count=Ue.size,Ee},Se=["conversation","planning","execution"].map(P=>V(P,U.filter(oe=>oe.phase_key===P)));Se.push(V("total",U));let O=[...new Set(U.map(P=>String(P.day)))].map(P=>V(P,U.filter(oe=>String(oe.day)===P))),D=this.database.prepare(`WITH canonical_ids AS MATERIALIZED (
1626
+ FROM selected GROUP BY day, phase_key ORDER BY day, phase_key`).all(...S),F=["duration_ms","input_tokens","cached_input_tokens","output_tokens","reasoning_tokens","total_tokens","cost_usd","cost_brl"],Z=["eligible_runs","events","duration_known","tokens_known","usd_known","brl_known"],W=(P,ae)=>{let Ee={key:P};for(let et of Z)Ee[et]=ae.reduce((Vt,ir)=>Vt+(typeof ir[et]=="number"?Number(ir[et]):0),0);for(let et of F){let Vt=ae.filter(ir=>typeof ir[et]=="number");Ee[et]=Vt.length===0?null:Vt.reduce((ir,Mr)=>ir+Number(Mr[et]),0)}let Ue=new Set;for(let et of ae)if(typeof et.task_ids_json=="string")for(let Vt of JSON.parse(et.task_ids_json))typeof Vt=="string"&&Ue.add(Vt);return Ee.task_count=Ue.size,Ee},be=["conversation","planning","execution"].map(P=>W(P,x.filter(ae=>ae.phase_key===P)));be.push(W("total",x));let O=[...new Set(x.map(P=>String(P.day)))].map(P=>W(P,x.filter(ae=>String(ae.day)===P))),U=this.database.prepare(`WITH canonical_ids AS MATERIALIZED (
1627
1627
  SELECT entity_kind AS kind, id FROM canonical_work_items
1628
1628
  ), work_item_days AS (
1629
1629
  SELECT entity_kind AS kind, id, occurred_day_sp AS day FROM canonical_work_items
@@ -1653,7 +1653,7 @@ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type
1653
1653
  AND (? IS NULL OR day >= ?)
1654
1654
  AND (? IS NULL OR day <= ?)
1655
1655
  GROUP BY day
1656
- ${Ch()}
1656
+ ${Lh()}
1657
1657
  )
1658
1658
  SELECT day,
1659
1659
  SUM(prd_count) AS prd_count,
@@ -1661,7 +1661,7 @@ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type
1661
1661
  SUM(task_count) AS task_count,
1662
1662
  SUM(validation_count) AS validation_count,
1663
1663
  SUM(evidence_count) AS evidence_count
1664
- FROM structural GROUP BY day ORDER BY day`).all(a,a,s,s,a,a,s,s),M=P=>typeof P=="number"?P:0,C=P=>typeof P=="number"?P:null,z=P=>{let oe=M(P?.eligible_runs);return{events:M(P?.events),duration_ms:C(P?.duration_ms),tokens:{input:C(P?.input_tokens),cached_input:C(P?.cached_input_tokens),output:C(P?.output_tokens),reasoning:C(P?.reasoning_tokens),total:C(P?.total_tokens)},cost:{usd:C(P?.cost_usd),brl:C(P?.cost_brl)},coverage:{events:M(P?.events),tokens:M(P?.tokens_known),usd:M(P?.usd_known),brl:M(P?.brl_known)},_duration_population:{eligible_runs:oe,known_runs:M(P?.duration_known)}}},W=new Map(Se.map(P=>[String(P.key),P])),de=W.get("total"),te=P=>{let{_duration_population:oe,...Ee}=P;return Ee},se=te(z(W.get("conversation"))),b=te(z(W.get("planning"))),N=te(z(W.get("execution"))),A=te(z(W.get("total"))),B=te(z()),ie=new Map(O.map(P=>[String(P.key),P])),x=new Map(D.map(P=>[String(P.day),P])),K=[...new Set([...ie.keys(),...x.keys()])].sort().map(P=>{let oe=ie.get(P),Ee=x.get(P),Ue=M(oe?.eligible_runs),et=M(oe?.duration_known);return{key:P,prd_count:M(Ee?.prd_count),spec_count:M(Ee?.spec_count),task_count:M(Ee?.task_count),validation_count:M(Ee?.validation_count),evidence_count:M(Ee?.evidence_count),total_run_count:Ue,total_duration:C(oe?.duration_ms),duration_known:M(oe?.duration_ms),duration_unknown:Math.max(0,Ue-et),total_tokens:C(oe?.total_tokens),total_cost_usd:C(oe?.cost_usd),total_cost_brl:C(oe?.cost_brl),source_event_count:M(oe?.events)}}),Ze=Object.fromEntries(K.map(P=>{let oe=ie.get(P.key),Ee=M(oe?.eligible_runs),Ue=M(oe?.tokens_known),et=M(oe?.brl_known);return[P.key,{prds:P.prd_count,specs:P.spec_count,tasks:P.task_count,validations:P.validation_count,evidences:P.evidence_count,runs:Ee,usage:{total_tokens:{known_sum:M(oe?.total_tokens),unknown:Ee-Ue,complete:Ue===Ee,coverage_ratio:Ee===0?1:Ue/Ee},cost:{known_sum:M(oe?.cost_brl),unknown:Ee-et,complete:et===Ee,coverage_ratio:Ee===0?1:et/Ee,currency:"BRL"}},events:{known_sum:M(oe?.events),unknown:0,complete:!0,coverage_ratio:1}}]})),qt=Object.fromEntries(O.map(P=>{let oe=z(P);return[String(P.key),{known_sum:M(P.duration_ms),eligible_runs:oe._duration_population.eligible_runs,known_runs:oe._duration_population.known_runs}]})),he=this.database.prepare(`${v},
1664
+ FROM structural GROUP BY day ORDER BY day`).all(a,a,s,s,a,a,s,s),M=P=>typeof P=="number"?P:0,C=P=>typeof P=="number"?P:null,z=P=>{let ae=M(P?.eligible_runs);return{events:M(P?.events),duration_ms:C(P?.duration_ms),tokens:{input:C(P?.input_tokens),cached_input:C(P?.cached_input_tokens),output:C(P?.output_tokens),reasoning:C(P?.reasoning_tokens),total:C(P?.total_tokens)},cost:{usd:C(P?.cost_usd),brl:C(P?.cost_brl)},coverage:{events:M(P?.events),tokens:M(P?.tokens_known),usd:M(P?.usd_known),brl:M(P?.brl_known)},_duration_population:{eligible_runs:ae,known_runs:M(P?.duration_known)}}},V=new Map(be.map(P=>[String(P.key),P])),_e=V.get("total"),ne=P=>{let{_duration_population:ae,...Ee}=P;return Ee},ce=ne(z(V.get("conversation"))),b=ne(z(V.get("planning"))),N=ne(z(V.get("execution"))),A=ne(z(V.get("total"))),B=ne(z()),oe=new Map(O.map(P=>[String(P.key),P])),D=new Map(U.map(P=>[String(P.day),P])),K=[...new Set([...oe.keys(),...D.keys()])].sort().map(P=>{let ae=oe.get(P),Ee=D.get(P),Ue=M(ae?.eligible_runs),et=M(ae?.duration_known);return{key:P,prd_count:M(Ee?.prd_count),spec_count:M(Ee?.spec_count),task_count:M(Ee?.task_count),validation_count:M(Ee?.validation_count),evidence_count:M(Ee?.evidence_count),total_run_count:Ue,total_duration:C(ae?.duration_ms),duration_known:M(ae?.duration_ms),duration_unknown:Math.max(0,Ue-et),total_tokens:C(ae?.total_tokens),total_cost_usd:C(ae?.cost_usd),total_cost_brl:C(ae?.cost_brl),source_event_count:M(ae?.events)}}),Ze=Object.fromEntries(K.map(P=>{let ae=oe.get(P.key),Ee=M(ae?.eligible_runs),Ue=M(ae?.tokens_known),et=M(ae?.brl_known);return[P.key,{prds:P.prd_count,specs:P.spec_count,tasks:P.task_count,validations:P.validation_count,evidences:P.evidence_count,runs:Ee,usage:{total_tokens:{known_sum:M(ae?.total_tokens),unknown:Ee-Ue,complete:Ue===Ee,coverage_ratio:Ee===0?1:Ue/Ee},cost:{known_sum:M(ae?.cost_brl),unknown:Ee-et,complete:et===Ee,coverage_ratio:Ee===0?1:et/Ee,currency:"BRL"}},events:{known_sum:M(ae?.events),unknown:0,complete:!0,coverage_ratio:1}}]})),qt=Object.fromEntries(O.map(P=>{let ae=z(P);return[String(P.key),{known_sum:M(P.duration_ms),eligible_runs:ae._duration_population.eligible_runs,known_runs:ae._duration_population.known_runs}]})),he=this.database.prepare(`${v},
1665
1665
  segment_totals AS (
1666
1666
  SELECT agent_invocation_id, SUM(total_tokens) AS total_tokens,
1667
1667
  SUM(cost_usd) AS cost_usd, SUM(cost_brl) AS cost_brl
@@ -1703,11 +1703,11 @@ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type
1703
1703
  NULL AS total_duration, 0 AS duration_unknown, 0 AS duration_known,
1704
1704
  0 AS source_event_count, SUM(total_tokens) AS total_tokens,
1705
1705
  SUM(total_cost_usd) AS total_cost_usd, SUM(total_cost_brl) AS total_cost_brl
1706
- FROM components GROUP BY key ORDER BY total_cost_brl DESC, key`).all(...S).map(P=>{let oe=C(P.total_duration),Ee=M(P.duration_unknown),Ue=C(P.duration_known)??oe??0;return{key:String(P.key??"unavailable"),label:String(P.label??P.key??"unavailable"),latest_started_at:"",run_count:M(P.invocation_count),task_count:C(P.task_count),prd_count:0,spec_count:0,evidence_count:0,test_count:0,event_count:M(P.source_event_count),total_tokens:C(P.total_tokens),estimated_usd:C(P.total_cost_usd),estimated_brl:C(P.total_cost_brl),duration_ms:oe,duration:{known_sum:Ue,unknown:Ee,complete:Ee===0,coverage_ratio:Ee===0?1:0},coverage:{events:0,tokens:0,usd:0,brl:0}}});return u({periods:{daily:Ze},aggregate_usage:{conversation:se,planning:b,execution:N,total:A,new_work:A,rework:B},task_count:M(de?.task_count),model_groups:he,cost_monitor_daily_duration:qt,daily_rows:K})}summaryPage(t,n,i,r,o=null){let a="operations_work_summary",s=n.from?.slice(0,10)??null,l=n.to?.slice(0,10)??null,c=DP(o),u=["entity_kind = ?","(? IS NULL OR occurred_day_sp >= ?)","(? IS NULL OR occurred_day_sp <= ?)"],d=[t,s,s,l,l];n.status&&(u.push("status = ?"),d.push(n.status)),n.risk&&(u.push("risk = ?"),d.push(n.risk)),n.query&&(u.push("(id LIKE ? OR title LIKE ?)"),d.push(`%${n.query}%`,`%${n.query}%`));let p=u.join(" AND "),f=[...d];c!==null&&(u.push("(occurred_at < ? OR (occurred_at = ? AND id < ?))"),d.push(c[0],c[0],c[1]));let S=u.join(" AND "),h=Number(this.database.prepare(`SELECT COUNT(*) AS count FROM ${a} WHERE ${p}`).get(...f).count),v=c===null?i:0,E=this.database.prepare(`SELECT id, title, status, risk, occurred_at, occurred_day_sp,
1706
+ FROM components GROUP BY key ORDER BY total_cost_brl DESC, key`).all(...S).map(P=>{let ae=C(P.total_duration),Ee=M(P.duration_unknown),Ue=C(P.duration_known)??ae??0;return{key:String(P.key??"unavailable"),label:String(P.label??P.key??"unavailable"),latest_started_at:"",run_count:M(P.invocation_count),task_count:C(P.task_count),prd_count:0,spec_count:0,evidence_count:0,test_count:0,event_count:M(P.source_event_count),total_tokens:C(P.total_tokens),estimated_usd:C(P.total_cost_usd),estimated_brl:C(P.total_cost_brl),duration_ms:ae,duration:{known_sum:Ue,unknown:Ee,complete:Ee===0,coverage_ratio:Ee===0?1:0},coverage:{events:0,tokens:0,usd:0,brl:0}}});return u({periods:{daily:Ze},aggregate_usage:{conversation:ce,planning:b,execution:N,total:A,new_work:A,rework:B},task_count:M(_e?.task_count),model_groups:he,cost_monitor_daily_duration:qt,daily_rows:K})}summaryPage(t,n,i,r,o=null){let a="operations_work_summary",s=n.from?.slice(0,10)??null,l=n.to?.slice(0,10)??null,c=FD(o),u=["entity_kind = ?","(? IS NULL OR occurred_day_sp >= ?)","(? IS NULL OR occurred_day_sp <= ?)"],d=[t,s,s,l,l];n.status&&(u.push("status = ?"),d.push(n.status)),n.risk&&(u.push("risk = ?"),d.push(n.risk)),n.query&&(u.push("(id LIKE ? OR title LIKE ?)"),d.push(`%${n.query}%`,`%${n.query}%`));let p=u.join(" AND "),f=[...d];c!==null&&(u.push("(occurred_at < ? OR (occurred_at = ? AND id < ?))"),d.push(c[0],c[0],c[1]));let S=u.join(" AND "),h=Number(this.database.prepare(`SELECT COUNT(*) AS count FROM ${a} WHERE ${p}`).get(...f).count),v=c===null?i:0,E=this.database.prepare(`SELECT id, title, status, risk, occurred_at, occurred_day_sp,
1707
1707
  invocation_count, llm_call_count, total_duration, total_tokens, total_cost_usd, total_cost_brl
1708
- FROM ${a} WHERE ${S} ORDER BY occurred_at DESC, id DESC LIMIT ? OFFSET ?`).all(...d,r,v),U=E.at(-1);return{data_source:"sqlite_read_model",kind:t,offset:v,limit:r,total:h,has_more:E.length===r&&(c!==null||v+E.length<h),next_cursor:U===void 0||E.length<r?null:PP(String(U.occurred_at),String(U.id)),rows:E}}canonicalWorkPage(t,n,i,r){return this.viewPage("operations_work_list",{...n,kind:t==="task"?"all-tasks":t,offset:i,limit:r})}overviewPage(t,n,i){let r=Number(this.database.prepare("SELECT COUNT(*) AS count FROM overview WHERE period_kind = ?").get(t).count),o=this.database.prepare(`SELECT o.*, op.operations_total_duration, cm.cost_monitor_total_duration, cm.total_tokens, cm.total_cost_usd, cm.total_cost_brl
1708
+ FROM ${a} WHERE ${S} ORDER BY occurred_at DESC, id DESC LIMIT ? OFFSET ?`).all(...d,r,v),x=E.at(-1);return{data_source:"sqlite_read_model",kind:t,offset:v,limit:r,total:h,has_more:E.length===r&&(c!==null||v+E.length<h),next_cursor:x===void 0||E.length<r?null:zD(String(x.occurred_at),String(x.id)),rows:E}}canonicalWorkPage(t,n,i,r){return this.viewPage("operations_work_list",{...n,kind:t==="task"?"all-tasks":t,offset:i,limit:r})}overviewPage(t,n,i){let r=Number(this.database.prepare("SELECT COUNT(*) AS count FROM overview WHERE period_kind = ?").get(t).count),o=this.database.prepare(`SELECT o.*, op.operations_total_duration, cm.cost_monitor_total_duration, cm.total_tokens, cm.total_cost_usd, cm.total_cost_brl
1709
1709
  FROM overview o JOIN operations_overview op USING(period_kind, period_key) JOIN cost_monitor_overview cm USING(period_kind, period_key)
1710
- WHERE o.period_kind = ? ORDER BY o.period_key DESC LIMIT ? OFFSET ?`).all(t,i,n),a=this.executionDurationByDay({from:null,to:null});for(let s of o)s.operations_total_duration=[...a].filter(([l])=>t==="day"?l===s.period_key:l.startsWith(String(s.period_key))).reduce((l,[,c])=>l+c,0);return{data_source:"sqlite_read_model",kind:"overview",period:t,offset:n,limit:i,total:r,has_more:n+o.length<r,rows:o}}viewPage(t,n){let i=`${t}:${JSON.stringify(n)}`,r=this.viewPageResultCache.get(i);if(r!==void 0)return structuredClone(r);let o=this.uncachedViewPage(t,n);if(t==="cost_monitor_zaip_agents"&&Rh(this.database,n,o),this.viewPageResultCache.size>=256){let a=this.viewPageResultCache.keys().next().value;a!==void 0&&this.viewPageResultCache.delete(a)}return this.viewPageResultCache.set(i,structuredClone(o)),o}uncachedViewPage(t,n){let i=!n.from&&!n.to&&!n.query&&!n.status&&!n.risk&&!n.provider&&!n.model&&!n.agent&&!n.phase&&!n.origin&&!n.workType&&!n.priority;if(t==="cost_monitor_agent_invocations"&&!n.query&&!n.status&&!n.risk&&!n.provider&&!n.model&&!n.agent&&!n.phase&&!n.origin&&!n.workType&&!n.priority){let O=Ph(this.technicalPayloadRows("cost_agent_invocation_projection_v1"),n);if(O.length>0){let D=Math.min(200,Math.max(1,n.limit??100)),M=Math.max(0,n.offset??0),C=O.slice(M,M+D);return{data_source:"sqlite_read_model",view:t,offset:M,limit:D,total_count:O.length,has_more:M+C.length<O.length,rows:C}}}let a={cost_monitor_zaip_agents:"agent",cost_monitor_executions:"execution",cost_monitor_tasks:"task",cost_monitor_conversations:"conversation"}[t];if(i&&a!==void 0){let O=this.technicalPayloadRows("cost_dimension_aggregate_v1").filter(C=>C.dimension===a),D=O.filter(C=>C.row_kind==="row").map(C=>t==="cost_monitor_zaip_agents"?{key:C.key,label:C.label,persona:C.persona,job:C.job,latest_started_at:C.latest_started_at,invocation_count:C.invocation_count,task_count:C.task_count,total_duration:C.total_duration,duration_unknown:C.duration_unknown,duration_known:C.duration_known,source_event_count:C.source_event_count,total_tokens:C.total_tokens,total_cost_usd:C.total_cost_usd,total_cost_brl:C.total_cost_brl}:{id:C.id,key:C.key,title:C.title,status:C.status,risk:C.risk,first_day:C.first_day,last_day:C.last_day,occurred_at:C.occurred_at,invocation_count:C.invocation_count,llm_call_count:C.llm_call_count,total_duration:C.total_duration,total_input_tokens:C.total_input_tokens,total_cached_input_tokens:C.total_cached_input_tokens,total_output_tokens:C.total_output_tokens,total_reasoning_tokens:C.total_reasoning_tokens,total_tokens:C.total_tokens,total_cost_usd:C.total_cost_usd,total_cost_brl:C.total_cost_brl}).sort((C,z)=>Number(z.total_cost_brl??-1)-Number(C.total_cost_brl??-1)||String(C.key??"").localeCompare(String(z.key??""))),M=O.find(C=>C.row_kind==="totals");if(D.length>0&&M!==void 0){let C=Math.min(200,Math.max(1,n.limit??50)),z=Math.max(0,n.offset??0),W=D.slice(z,z+C),de=t!=="cost_monitor_zaip_agents"?{entity_count:M.entity_count,invocation_count:M.invocation_count,total_duration:M.total_duration,total_tokens:M.total_tokens,total_cost_usd:M.total_cost_usd,total_cost_brl:M.total_cost_brl}:{invocation_count:M.invocation_count,task_count:M.task_count,total_duration:M.total_duration,duration_unknown:M.duration_unknown,duration_known:M.duration_known,source_event_count:M.source_event_count,total_tokens:M.total_tokens,total_cost_usd:M.total_cost_usd,total_cost_brl:M.total_cost_brl};return{data_source:"sqlite_read_model",view:t,offset:z,limit:C,total_count:D.length,has_more:z+W.length<D.length,totals:de,rows:W}}}if(["operations_work_kanban","operations_executions","operations_agent_invocations","operations_conversations"].includes(t)&&!n.from&&!n.to&&!n.query&&!n.status&&!n.risk&&!n.provider&&!n.model&&!n.agent&&!n.phase&&!n.origin&&!n.workType&&!n.priority){let O=this.unfilteredViewRows(t),D=Math.min(200,Math.max(1,n.limit??100)),M=Math.max(0,n.offset??0),C=O.slice(M,M+D);return{data_source:"sqlite_read_model",view:t,offset:M,limit:D,total_count:O.length,has_more:M+C.length<O.length,rows:C}}if(t==="operations_work_list"){let O=n.from||n.to?this.firstFoldMonthlyQuick({from:n.from??null,to:n.to??null}):this.technicalPayloadRows("first_fold_all_time_board_cache")[0],M=ev(n,O)??iv(this.database,n);return{data_source:"sqlite_read_model",view:t,...M,rows:ov(this.database,M.rows,n)}}if(t==="cost_monitor_agent_invocations"){let O="date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours')",D=[`(? IS NULL OR ${O} >= ?)`,`(? IS NULL OR ${O} <= ?)`],M=Qe(n.from),C=Qe(n.to),z=[M,M,C,C],W=(B,ie)=>{ie&&(D.push(`${B} = ?`),z.push(ie))};W("i.zaip_agent",n.agent),W("i.phase",n.phase),W("i.status",n.status);let de=[];n.provider&&(n.provider==="unavailable"?D.push("((i.agent_invocation_id IS NOT NULL AND NOT EXISTS (SELECT 1 FROM invocation_usage known_provider WHERE known_provider.agent_invocation_id=i.agent_invocation_id AND known_provider.provider IS NOT NULL AND known_provider.provider <> 'unavailable')) OR (i.agent_invocation_id IS NULL AND (i.provider IS NULL OR i.provider = 'unavailable')))"):(de.push("f.provider=?"),z.push(n.provider))),n.model&&(n.model==="unavailable"?D.push("((i.agent_invocation_id IS NOT NULL AND NOT EXISTS (SELECT 1 FROM invocation_usage known_model WHERE known_model.agent_invocation_id=i.agent_invocation_id AND known_model.model IS NOT NULL AND known_model.model <> 'unavailable')) OR (i.agent_invocation_id IS NULL AND (i.model IS NULL OR i.model = 'unavailable')))"):(de.push("f.model=?"),z.push(n.model))),de.length>0&&D.push(`EXISTS (SELECT 1 FROM invocation_usage f WHERE f.agent_invocation_id=i.agent_invocation_id AND ${de.join(" AND ")})`),n.query&&(D.push("(i.agent_invocation_id LIKE ? OR i.task_id LIKE ? OR i.execution_id LIKE ?)"),z.push(`%${n.query}%`,`%${n.query}%`,`%${n.query}%`));let te=D.join(" AND "),se=Math.min(200,Math.max(1,n.limit??100)),b=Math.max(0,n.offset??0),N=Number(this.database.prepare(`SELECT COUNT(*) AS count FROM cost_monitor_agent_invocations i WHERE ${te}`).get(...z).count),A=this.database.prepare(`SELECT i.* FROM cost_monitor_agent_invocations i WHERE ${te} ORDER BY i.occurred_at DESC, i.agent_invocation_id DESC LIMIT ? OFFSET ?`).all(...z,se,b);return{data_source:"sqlite_read_model",view:t,offset:b,limit:se,total_count:N,has_more:b+A.length<N,rows:A}}let c={cost_monitor_daily:"day",cost_monitor_monthly:"month",cost_monitor_annual:"year",cost_monitor_zaip_agents:"agent",cost_monitor_models:"model",cost_monitor_providers:"provider"}[t];if((c==="agent"||c==="provider")&&Hs(n)){let O=Qe(n.from)??"0000-01-01",D=Qe(n.to)??"9999-12-31",M=Math.min(200,Math.max(1,n.limit??50)),C=Math.max(0,n.offset??0),z=Lh(this.database,c,O,D,M,C);return{data_source:"sqlite_read_model",view:t,offset:C,limit:M,total_count:z.total_count,has_more:C+z.rows.length<z.total_count,totals:z.totals,rows:z.rows}}if((c==="model"||c==="provider")&&!n.from&&!n.to&&!n.query&&!n.status&&!n.risk&&!n.provider&&!n.model&&!n.agent&&!n.phase&&!n.origin&&!n.workType&&!n.priority){let O=c,D=this.database.prepare(`SELECT
1710
+ WHERE o.period_kind = ? ORDER BY o.period_key DESC LIMIT ? OFFSET ?`).all(t,i,n),a=this.executionDurationByDay({from:null,to:null});for(let s of o)s.operations_total_duration=[...a].filter(([l])=>t==="day"?l===s.period_key:l.startsWith(String(s.period_key))).reduce((l,[,c])=>l+c,0);return{data_source:"sqlite_read_model",kind:"overview",period:t,offset:n,limit:i,total:r,has_more:n+o.length<r,rows:o}}viewPage(t,n){let i=`${t}:${JSON.stringify(n)}`,r=this.viewPageResultCache.get(i);if(r!==void 0)return structuredClone(r);let o=this.uncachedViewPage(t,n);if(t==="cost_monitor_zaip_agents"&&$h(this.database,n,o),this.viewPageResultCache.size>=256){let a=this.viewPageResultCache.keys().next().value;a!==void 0&&this.viewPageResultCache.delete(a)}return this.viewPageResultCache.set(i,structuredClone(o)),o}uncachedViewPage(t,n){let i=!n.from&&!n.to&&!n.query&&!n.status&&!n.risk&&!n.provider&&!n.model&&!n.agent&&!n.phase&&!n.origin&&!n.workType&&!n.priority;if(t==="cost_monitor_agent_invocations"&&!n.query&&!n.status&&!n.risk&&!n.provider&&!n.model&&!n.agent&&!n.phase&&!n.origin&&!n.workType&&!n.priority){let O=Ph(this.technicalPayloadRows("cost_agent_invocation_projection_v1"),n);if(O.length>0){let U=Math.min(200,Math.max(1,n.limit??100)),M=Math.max(0,n.offset??0),C=O.slice(M,M+U);return{data_source:"sqlite_read_model",view:t,offset:M,limit:U,total_count:O.length,has_more:M+C.length<O.length,rows:C}}}let a={cost_monitor_zaip_agents:"agent",cost_monitor_executions:"execution",cost_monitor_tasks:"task",cost_monitor_conversations:"conversation"}[t];if(i&&a!==void 0){let O=this.technicalPayloadRows("cost_dimension_aggregate_v1").filter(C=>C.dimension===a),U=O.filter(C=>C.row_kind==="row").map(C=>t==="cost_monitor_zaip_agents"?{key:C.key,label:C.label,persona:C.persona,job:C.job,latest_started_at:C.latest_started_at,invocation_count:C.invocation_count,task_count:C.task_count,total_duration:C.total_duration,duration_unknown:C.duration_unknown,duration_known:C.duration_known,source_event_count:C.source_event_count,total_tokens:C.total_tokens,total_cost_usd:C.total_cost_usd,total_cost_brl:C.total_cost_brl}:{id:C.id,key:C.key,title:C.title,status:C.status,risk:C.risk,first_day:C.first_day,last_day:C.last_day,occurred_at:C.occurred_at,invocation_count:C.invocation_count,llm_call_count:C.llm_call_count,total_duration:C.total_duration,total_input_tokens:C.total_input_tokens,total_cached_input_tokens:C.total_cached_input_tokens,total_output_tokens:C.total_output_tokens,total_reasoning_tokens:C.total_reasoning_tokens,total_tokens:C.total_tokens,total_cost_usd:C.total_cost_usd,total_cost_brl:C.total_cost_brl}).sort((C,z)=>Number(z.total_cost_brl??-1)-Number(C.total_cost_brl??-1)||String(C.key??"").localeCompare(String(z.key??""))),M=O.find(C=>C.row_kind==="totals");if(U.length>0&&M!==void 0){let C=Math.min(200,Math.max(1,n.limit??50)),z=Math.max(0,n.offset??0),V=U.slice(z,z+C),_e=t!=="cost_monitor_zaip_agents"?{entity_count:M.entity_count,invocation_count:M.invocation_count,total_duration:M.total_duration,total_tokens:M.total_tokens,total_cost_usd:M.total_cost_usd,total_cost_brl:M.total_cost_brl}:{invocation_count:M.invocation_count,task_count:M.task_count,total_duration:M.total_duration,duration_unknown:M.duration_unknown,duration_known:M.duration_known,source_event_count:M.source_event_count,total_tokens:M.total_tokens,total_cost_usd:M.total_cost_usd,total_cost_brl:M.total_cost_brl};return{data_source:"sqlite_read_model",view:t,offset:z,limit:C,total_count:U.length,has_more:z+V.length<U.length,totals:_e,rows:V}}}if(["operations_work_kanban","operations_executions","operations_agent_invocations","operations_conversations"].includes(t)&&!n.from&&!n.to&&!n.query&&!n.status&&!n.risk&&!n.provider&&!n.model&&!n.agent&&!n.phase&&!n.origin&&!n.workType&&!n.priority){let O=this.unfilteredViewRows(t),U=Math.min(200,Math.max(1,n.limit??100)),M=Math.max(0,n.offset??0),C=O.slice(M,M+U);return{data_source:"sqlite_read_model",view:t,offset:M,limit:U,total_count:O.length,has_more:M+C.length<O.length,rows:C}}if(t==="operations_work_list"){let O=n.from||n.to?this.firstFoldMonthlyQuick({from:n.from??null,to:n.to??null}):this.technicalPayloadRows("first_fold_all_time_board_cache")[0],M=tv(n,O)??ov(this.database,n);return{data_source:"sqlite_read_model",view:t,...M,rows:av(this.database,M.rows,n)}}if(t==="cost_monitor_agent_invocations"){let O="date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours')",U=[`(? IS NULL OR ${O} >= ?)`,`(? IS NULL OR ${O} <= ?)`],M=Qe(n.from),C=Qe(n.to),z=[M,M,C,C],V=(B,oe)=>{oe&&(U.push(`${B} = ?`),z.push(oe))};V("i.zaip_agent",n.agent),V("i.phase",n.phase),V("i.status",n.status);let _e=[];n.provider&&(n.provider==="unavailable"?U.push("((i.agent_invocation_id IS NOT NULL AND NOT EXISTS (SELECT 1 FROM invocation_usage known_provider WHERE known_provider.agent_invocation_id=i.agent_invocation_id AND known_provider.provider IS NOT NULL AND known_provider.provider <> 'unavailable')) OR (i.agent_invocation_id IS NULL AND (i.provider IS NULL OR i.provider = 'unavailable')))"):(_e.push("f.provider=?"),z.push(n.provider))),n.model&&(n.model==="unavailable"?U.push("((i.agent_invocation_id IS NOT NULL AND NOT EXISTS (SELECT 1 FROM invocation_usage known_model WHERE known_model.agent_invocation_id=i.agent_invocation_id AND known_model.model IS NOT NULL AND known_model.model <> 'unavailable')) OR (i.agent_invocation_id IS NULL AND (i.model IS NULL OR i.model = 'unavailable')))"):(_e.push("f.model=?"),z.push(n.model))),_e.length>0&&U.push(`EXISTS (SELECT 1 FROM invocation_usage f WHERE f.agent_invocation_id=i.agent_invocation_id AND ${_e.join(" AND ")})`),n.query&&(U.push("(i.agent_invocation_id LIKE ? OR i.task_id LIKE ? OR i.execution_id LIKE ?)"),z.push(`%${n.query}%`,`%${n.query}%`,`%${n.query}%`));let ne=U.join(" AND "),ce=Math.min(200,Math.max(1,n.limit??100)),b=Math.max(0,n.offset??0),N=Number(this.database.prepare(`SELECT COUNT(*) AS count FROM cost_monitor_agent_invocations i WHERE ${ne}`).get(...z).count),A=this.database.prepare(`SELECT i.* FROM cost_monitor_agent_invocations i WHERE ${ne} ORDER BY i.occurred_at DESC, i.agent_invocation_id DESC LIMIT ? OFFSET ?`).all(...z,ce,b);return{data_source:"sqlite_read_model",view:t,offset:b,limit:ce,total_count:N,has_more:b+A.length<N,rows:A}}let c={cost_monitor_daily:"day",cost_monitor_monthly:"month",cost_monitor_annual:"year",cost_monitor_zaip_agents:"agent",cost_monitor_models:"model",cost_monitor_providers:"provider"}[t];if((c==="agent"||c==="provider")&&Ks(n)){let O=Qe(n.from)??"0000-01-01",U=Qe(n.to)??"9999-12-31",M=Math.min(200,Math.max(1,n.limit??50)),C=Math.max(0,n.offset??0),z=Mh(this.database,c,O,U,M,C);return{data_source:"sqlite_read_model",view:t,offset:C,limit:M,total_count:z.total_count,has_more:C+z.rows.length<z.total_count,totals:z.totals,rows:z.rows}}if((c==="model"||c==="provider")&&!n.from&&!n.to&&!n.query&&!n.status&&!n.risk&&!n.provider&&!n.model&&!n.agent&&!n.phase&&!n.origin&&!n.workType&&!n.priority){let O=c,U=this.database.prepare(`SELECT
1711
1711
  json_extract(payload_json, '$.key') AS key,
1712
1712
  json_extract(payload_json, '$.label') AS label,
1713
1713
  json_extract(payload_json, '$.invocation_count') AS invocation_count,
@@ -1725,17 +1725,17 @@ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type
1725
1725
  FROM zaip_aios_activities
1726
1726
  WHERE payload_type='cost_dimension_aggregate_v1'
1727
1727
  AND json_extract(payload_json, '$.dimension')=?
1728
- ORDER BY total_cost_brl DESC, key`).all(O),M=O==="model"?D.filter(b=>b.key!=="unavailable"&&b.key!==null):D,C=Math.min(200,Math.max(1,n.limit??50)),z=Math.max(0,n.offset??0),W=M.slice(z,z+C),de=O!=="model"||M.every(b=>typeof b.conversation_count=="number"),te=["invocation_count","task_count","conversation_count","prd_count","spec_count","validation_count","evidence_count","total_duration","source_event_count","total_tokens","total_cost_usd","total_cost_brl"];if(O==="model")for(let b of M)for(let N of te)b[N]=typeof b[N]=="number"?b[N]:0;let se=b=>M.some(N=>typeof N[b]=="number")?M.reduce((N,A)=>N+(typeof A[b]=="number"?Number(A[b]):0),0):null;if(de)return{data_source:"sqlite_read_model",view:t,offset:z,limit:C,total_count:M.length,has_more:z+W.length<M.length,totals:{invocation_count:M.reduce((b,N)=>b+Number(N.invocation_count??0),0),task_count:se("task_count")??(O==="model"?0:null),conversation_count:se("conversation_count")??(O==="model"?0:null),prd_count:se("prd_count")??(O==="model"?0:null),spec_count:se("spec_count")??(O==="model"?0:null),validation_count:se("validation_count")??(O==="model"?0:null),evidence_count:se("evidence_count")??(O==="model"?0:null),total_duration:se("total_duration")??(O==="model"?0:null),source_event_count:se("source_event_count")??(O==="model"?0:null),total_tokens:se("total_tokens")??(O==="model"?0:null),total_cost_usd:se("total_cost_usd")??(O==="model"?0:null),total_cost_brl:se("total_cost_brl")??(O==="model"?0:null)},rows:W}}if(c==="agent"){let O=["i.zaip_agent IS NOT NULL"],D=[];if(n.from&&(O.push("date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours') >= ?"),D.push(n.from.slice(0,10))),n.to&&(O.push("date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours') <= ?"),D.push(n.to.slice(0,10))),n.agent&&(O.push("i.zaip_agent = ?"),D.push(n.agent)),n.phase&&(O.push("i.phase = ?"),D.push(n.phase)),n.status&&(O.push("i.status = ?"),D.push(n.status)),n.priority&&O.push("0"),n.risk&&(O.push("t.risk = ?"),D.push(n.risk)),n.origin){let K=n.origin==="prd"?"i.prd_id IS NOT NULL":n.origin==="spec"?"i.prd_id IS NULL AND i.spec_id IS NOT NULL":n.origin==="task"?"i.prd_id IS NULL AND i.spec_id IS NULL AND i.task_id IS NOT NULL":"i.prd_id IS NULL AND i.spec_id IS NULL AND i.task_id IS NULL";O.push(K)}n.workType&&O.push("0");let M=[];if(n.provider&&(n.provider==="unavailable"?O.push("NOT EXISTS (SELECT 1 FROM invocation_usage known_provider WHERE known_provider.agent_invocation_id=i.agent_invocation_id AND known_provider.provider IS NOT NULL AND known_provider.provider <> 'unavailable')"):(M.push("f.provider = ?"),D.push(n.provider))),n.model&&(n.model==="unavailable"?O.push("NOT EXISTS (SELECT 1 FROM invocation_usage known_model WHERE known_model.agent_invocation_id=i.agent_invocation_id AND known_model.model IS NOT NULL AND known_model.model <> 'unavailable')"):(M.push("f.model = ?"),D.push(n.model))),M.length>0&&O.push(`EXISTS (SELECT 1 FROM invocation_usage f WHERE f.agent_invocation_id=i.agent_invocation_id AND ${M.join(" AND ")})`),n.query){let K=`%${n.query}%`;O.push("(i.zaip_agent LIKE ? OR i.zaip_agent_persona LIKE ? OR i.zaip_agent_job LIKE ?)"),D.push(K,K,K)}let C="date(COALESCE(a.source_started_at, a.source_occurred_at, a.occurred_at), '-3 hours')",z=["a.activity_source_kind <> 'agent_run'","a.zaip_agent IS NOT NULL","(a.total_tokens IS NOT NULL OR a.cost_brl IS NOT NULL OR a.cost_usd IS NOT NULL)"],W=[];if(n.from&&(z.push(`${C} >= ?`),W.push(n.from.slice(0,10))),n.to&&(z.push(`${C} <= ?`),W.push(n.to.slice(0,10))),n.agent&&(z.push("a.zaip_agent = ?"),W.push(n.agent)),n.phase&&(z.push("a.phase = ?"),W.push(n.phase)),n.status&&(z.push("a.status = ?"),W.push(n.status)),(n.priority||n.workType)&&z.push("0"),n.risk&&(z.push("activity_task.risk = ?"),W.push(n.risk)),n.origin&&z.push(n.origin==="prd"?"a.prd_id IS NOT NULL":n.origin==="spec"?"a.prd_id IS NULL AND a.spec_id IS NOT NULL":n.origin==="task"?"a.prd_id IS NULL AND a.spec_id IS NULL AND a.task_id IS NOT NULL":"a.prd_id IS NULL AND a.spec_id IS NULL AND a.task_id IS NULL"),n.provider||n.model){let K=[],Ze=[];n.provider&&(K.push("COALESCE(a.provider, 'unavailable') = ?"),Ze.push("COALESCE(u.provider, 'unavailable') = ?"),W.push(n.provider)),n.model&&(K.push("COALESCE(a.model, 'unavailable') = ?"),Ze.push("COALESCE(u.model, 'unavailable') = ?"),W.push(n.model)),z.push(`((a.agent_run_id IS NULL AND ${K.join(" AND ")}) OR (a.agent_run_id IS NOT NULL AND EXISTS (SELECT 1 FROM invocation_usage u WHERE u.agent_invocation_id = a.agent_run_id AND ${Ze.join(" AND ")})))`),n.provider&&W.push(n.provider),n.model&&W.push(n.model)}if(n.query){let K=`%${n.query}%`;z.push("(a.zaip_agent LIKE ? OR a.zaip_agent_persona LIKE ? OR a.zaip_agent_job LIKE ?)"),W.push(K,K,K)}let de=O.join(" AND "),te=["i.zaip_agent IS NOT NULL"],se=[],b="date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours')";if(n.from&&(te.push(`${b} >= ?`),se.push(n.from.slice(0,10)),te.push("i.occurred_day_sp >= ?"),se.push(n.from.slice(0,10))),n.to&&(te.push(`${b} <= ?`),se.push(n.to.slice(0,10)),te.push("i.occurred_day_sp <= ?"),se.push(n.to.slice(0,10))),n.agent&&(te.push("i.zaip_agent = ?"),se.push(n.agent)),n.phase&&(te.push("i.phase = ?"),se.push(n.phase)),n.status&&(te.push("i.status = ?"),se.push(n.status)),(n.priority||n.workType)&&te.push("0"),n.risk&&(te.push("invocation_task.risk = ?"),se.push(n.risk)),n.origin&&te.push(n.origin==="prd"?"i.prd_id IS NOT NULL":n.origin==="spec"?"i.prd_id IS NULL AND i.spec_id IS NOT NULL":n.origin==="task"?"i.prd_id IS NULL AND i.spec_id IS NULL AND i.task_id IS NOT NULL":"i.prd_id IS NULL AND i.spec_id IS NULL AND i.task_id IS NULL"),n.provider||n.model){let K=[];n.provider&&(K.push("COALESCE(u.provider, 'unavailable') = ?"),se.push(n.provider)),n.model&&(K.push("COALESCE(u.model, 'unavailable') = ?"),se.push(n.model)),te.push(`EXISTS (SELECT 1 FROM invocation_usage u WHERE u.agent_invocation_id=i.agent_invocation_id AND ${K.join(" AND ")})`)}if(n.query){let K=`%${n.query}%`;te.push("(i.zaip_agent LIKE ? OR i.zaip_agent_persona LIKE ? OR i.zaip_agent_job LIKE ?)"),se.push(K,K,K)}let N=`WITH agent_facts AS (
1728
+ ORDER BY total_cost_brl DESC, key`).all(O),M=O==="model"?U.filter(b=>b.key!=="unavailable"&&b.key!==null):U,C=Math.min(200,Math.max(1,n.limit??50)),z=Math.max(0,n.offset??0),V=M.slice(z,z+C),_e=O!=="model"||M.every(b=>typeof b.conversation_count=="number"),ne=["invocation_count","task_count","conversation_count","prd_count","spec_count","validation_count","evidence_count","total_duration","source_event_count","total_tokens","total_cost_usd","total_cost_brl"];if(O==="model")for(let b of M)for(let N of ne)b[N]=typeof b[N]=="number"?b[N]:0;let ce=b=>M.some(N=>typeof N[b]=="number")?M.reduce((N,A)=>N+(typeof A[b]=="number"?Number(A[b]):0),0):null;if(_e)return{data_source:"sqlite_read_model",view:t,offset:z,limit:C,total_count:M.length,has_more:z+V.length<M.length,totals:{invocation_count:M.reduce((b,N)=>b+Number(N.invocation_count??0),0),task_count:ce("task_count")??(O==="model"?0:null),conversation_count:ce("conversation_count")??(O==="model"?0:null),prd_count:ce("prd_count")??(O==="model"?0:null),spec_count:ce("spec_count")??(O==="model"?0:null),validation_count:ce("validation_count")??(O==="model"?0:null),evidence_count:ce("evidence_count")??(O==="model"?0:null),total_duration:ce("total_duration")??(O==="model"?0:null),source_event_count:ce("source_event_count")??(O==="model"?0:null),total_tokens:ce("total_tokens")??(O==="model"?0:null),total_cost_usd:ce("total_cost_usd")??(O==="model"?0:null),total_cost_brl:ce("total_cost_brl")??(O==="model"?0:null)},rows:V}}if(c==="agent"){let O=["i.zaip_agent IS NOT NULL"],U=[];if(n.from&&(O.push("date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours') >= ?"),U.push(n.from.slice(0,10))),n.to&&(O.push("date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours') <= ?"),U.push(n.to.slice(0,10))),n.agent&&(O.push("i.zaip_agent = ?"),U.push(n.agent)),n.phase&&(O.push("i.phase = ?"),U.push(n.phase)),n.status&&(O.push("i.status = ?"),U.push(n.status)),n.priority&&O.push("0"),n.risk&&(O.push("t.risk = ?"),U.push(n.risk)),n.origin){let K=n.origin==="prd"?"i.prd_id IS NOT NULL":n.origin==="spec"?"i.prd_id IS NULL AND i.spec_id IS NOT NULL":n.origin==="task"?"i.prd_id IS NULL AND i.spec_id IS NULL AND i.task_id IS NOT NULL":"i.prd_id IS NULL AND i.spec_id IS NULL AND i.task_id IS NULL";O.push(K)}n.workType&&O.push("0");let M=[];if(n.provider&&(n.provider==="unavailable"?O.push("NOT EXISTS (SELECT 1 FROM invocation_usage known_provider WHERE known_provider.agent_invocation_id=i.agent_invocation_id AND known_provider.provider IS NOT NULL AND known_provider.provider <> 'unavailable')"):(M.push("f.provider = ?"),U.push(n.provider))),n.model&&(n.model==="unavailable"?O.push("NOT EXISTS (SELECT 1 FROM invocation_usage known_model WHERE known_model.agent_invocation_id=i.agent_invocation_id AND known_model.model IS NOT NULL AND known_model.model <> 'unavailable')"):(M.push("f.model = ?"),U.push(n.model))),M.length>0&&O.push(`EXISTS (SELECT 1 FROM invocation_usage f WHERE f.agent_invocation_id=i.agent_invocation_id AND ${M.join(" AND ")})`),n.query){let K=`%${n.query}%`;O.push("(i.zaip_agent LIKE ? OR i.zaip_agent_persona LIKE ? OR i.zaip_agent_job LIKE ?)"),U.push(K,K,K)}let C="date(COALESCE(a.source_started_at, a.source_occurred_at, a.occurred_at), '-3 hours')",z=["a.activity_source_kind <> 'agent_run'","a.zaip_agent IS NOT NULL","(a.total_tokens IS NOT NULL OR a.cost_brl IS NOT NULL OR a.cost_usd IS NOT NULL)"],V=[];if(n.from&&(z.push(`${C} >= ?`),V.push(n.from.slice(0,10))),n.to&&(z.push(`${C} <= ?`),V.push(n.to.slice(0,10))),n.agent&&(z.push("a.zaip_agent = ?"),V.push(n.agent)),n.phase&&(z.push("a.phase = ?"),V.push(n.phase)),n.status&&(z.push("a.status = ?"),V.push(n.status)),(n.priority||n.workType)&&z.push("0"),n.risk&&(z.push("activity_task.risk = ?"),V.push(n.risk)),n.origin&&z.push(n.origin==="prd"?"a.prd_id IS NOT NULL":n.origin==="spec"?"a.prd_id IS NULL AND a.spec_id IS NOT NULL":n.origin==="task"?"a.prd_id IS NULL AND a.spec_id IS NULL AND a.task_id IS NOT NULL":"a.prd_id IS NULL AND a.spec_id IS NULL AND a.task_id IS NULL"),n.provider||n.model){let K=[],Ze=[];n.provider&&(K.push("COALESCE(a.provider, 'unavailable') = ?"),Ze.push("COALESCE(u.provider, 'unavailable') = ?"),V.push(n.provider)),n.model&&(K.push("COALESCE(a.model, 'unavailable') = ?"),Ze.push("COALESCE(u.model, 'unavailable') = ?"),V.push(n.model)),z.push(`((a.agent_run_id IS NULL AND ${K.join(" AND ")}) OR (a.agent_run_id IS NOT NULL AND EXISTS (SELECT 1 FROM invocation_usage u WHERE u.agent_invocation_id = a.agent_run_id AND ${Ze.join(" AND ")})))`),n.provider&&V.push(n.provider),n.model&&V.push(n.model)}if(n.query){let K=`%${n.query}%`;z.push("(a.zaip_agent LIKE ? OR a.zaip_agent_persona LIKE ? OR a.zaip_agent_job LIKE ?)"),V.push(K,K,K)}let _e=O.join(" AND "),ne=["i.zaip_agent IS NOT NULL"],ce=[],b="date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours')";if(n.from&&(ne.push(`${b} >= ?`),ce.push(n.from.slice(0,10)),ne.push("i.occurred_day_sp >= ?"),ce.push(n.from.slice(0,10))),n.to&&(ne.push(`${b} <= ?`),ce.push(n.to.slice(0,10)),ne.push("i.occurred_day_sp <= ?"),ce.push(n.to.slice(0,10))),n.agent&&(ne.push("i.zaip_agent = ?"),ce.push(n.agent)),n.phase&&(ne.push("i.phase = ?"),ce.push(n.phase)),n.status&&(ne.push("i.status = ?"),ce.push(n.status)),(n.priority||n.workType)&&ne.push("0"),n.risk&&(ne.push("invocation_task.risk = ?"),ce.push(n.risk)),n.origin&&ne.push(n.origin==="prd"?"i.prd_id IS NOT NULL":n.origin==="spec"?"i.prd_id IS NULL AND i.spec_id IS NOT NULL":n.origin==="task"?"i.prd_id IS NULL AND i.spec_id IS NULL AND i.task_id IS NOT NULL":"i.prd_id IS NULL AND i.spec_id IS NULL AND i.task_id IS NULL"),n.provider||n.model){let K=[];n.provider&&(K.push("COALESCE(u.provider, 'unavailable') = ?"),ce.push(n.provider)),n.model&&(K.push("COALESCE(u.model, 'unavailable') = ?"),ce.push(n.model)),ne.push(`EXISTS (SELECT 1 FROM invocation_usage u WHERE u.agent_invocation_id=i.agent_invocation_id AND ${K.join(" AND ")})`)}if(n.query){let K=`%${n.query}%`;ne.push("(i.zaip_agent LIKE ? OR i.zaip_agent_persona LIKE ? OR i.zaip_agent_job LIKE ?)"),ce.push(K,K,K)}let N=`WITH agent_facts AS (
1729
1729
  SELECT i.zaip_agent AS key, i.zaip_agent_persona AS persona, i.zaip_agent_job AS job, d.persona AS catalog_persona, d.job AS catalog_job,
1730
1730
  i.occurred_at, i.task_id, i.duration_ms, i.source_event_count, i.total_tokens, i.cost_usd, i.cost_brl
1731
1731
  FROM invocations i LEFT JOIN tasks invocation_task ON invocation_task.id=i.task_id LEFT JOIN zaip_dim_zaip_agent d ON d.zaip_agent = i.zaip_agent
1732
- WHERE ${te.join(" AND ")}
1732
+ WHERE ${ne.join(" AND ")}
1733
1733
  UNION ALL
1734
1734
  SELECT a.zaip_agent AS key, a.zaip_agent_persona AS persona, a.zaip_agent_job AS job, d.persona AS catalog_persona, d.job AS catalog_job,
1735
1735
  a.occurred_at, a.task_id, a.attributed_token_active_ms AS duration_ms, a.source_event_count, a.total_tokens, a.cost_usd, a.cost_brl
1736
1736
  FROM activities a LEFT JOIN tasks activity_task ON activity_task.id=a.task_id LEFT JOIN zaip_dim_zaip_agent d ON d.zaip_agent = a.zaip_agent
1737
1737
  WHERE ${z.join(" AND ")}
1738
- )`,A=Math.min(200,Math.max(1,n.limit??50)),B=Math.max(0,n.offset??0),ie=Number(this.database.prepare(`${N} SELECT COUNT(DISTINCT key) AS count FROM agent_facts`).get(...se,...W).count),x=this.database.prepare(`${N} SELECT COUNT(*) AS invocation_count, COUNT(DISTINCT task_id) AS task_count, SUM(duration_ms) AS total_duration, SUM(CASE WHEN duration_ms IS NULL THEN 1 ELSE 0 END) AS duration_unknown, SUM(CASE WHEN duration_ms IS NULL THEN 0 ELSE duration_ms END) AS duration_known, SUM(source_event_count) AS source_event_count, SUM(total_tokens) AS total_tokens, SUM(cost_usd) AS total_cost_usd, SUM(cost_brl) AS total_cost_brl FROM agent_facts`).get(...se,...W),J=this.database.prepare(`${N} SELECT key, key AS label, COALESCE(MAX(persona), MAX(catalog_persona)) AS persona, COALESCE(MAX(job), MAX(catalog_job)) AS job, MAX(occurred_at) AS latest_started_at, COUNT(*) AS invocation_count, COUNT(DISTINCT task_id) AS task_count, SUM(duration_ms) AS total_duration, SUM(CASE WHEN duration_ms IS NULL THEN 1 ELSE 0 END) AS duration_unknown, SUM(CASE WHEN duration_ms IS NULL THEN 0 ELSE duration_ms END) AS duration_known, SUM(source_event_count) AS source_event_count, SUM(total_tokens) AS total_tokens, SUM(cost_usd) AS total_cost_usd, SUM(cost_brl) AS total_cost_brl FROM agent_facts GROUP BY key ORDER BY total_cost_brl DESC, key LIMIT ? OFFSET ?`).all(...se,...W,A,B);return{data_source:"sqlite_read_model",view:t,offset:B,limit:A,total_count:ie,has_more:B+J.length<ie,totals:x,rows:J}}if(c==="model"){let O=["1=1"],D=[],M=Bu(n);n.from&&(O.push("date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours') >= ?"),D.push(n.from.slice(0,10))),n.to&&(O.push("date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours') <= ?"),D.push(n.to.slice(0,10))),n.agent&&(O.push("i.zaip_agent = ?"),D.push(n.agent)),n.phase&&(O.push("i.phase = ?"),D.push(n.phase)),n.status&&(O.push("i.status = ?"),D.push(n.status)),(n.priority||n.workType)&&O.push("0"),n.risk&&(O.push("t.risk = ?"),D.push(n.risk)),n.origin&&O.push(n.origin==="prd"?"i.prd_id IS NOT NULL":n.origin==="spec"?"i.prd_id IS NULL AND i.spec_id IS NOT NULL":n.origin==="task"?"i.prd_id IS NULL AND i.spec_id IS NULL AND i.task_id IS NOT NULL":"i.prd_id IS NULL AND i.spec_id IS NULL AND i.task_id IS NULL"),n.provider&&(n.provider==="unavailable"?O.push("s.provider IS NULL AND NOT EXISTS (SELECT 1 FROM invocation_usage known_provider WHERE known_provider.agent_invocation_id=i.agent_invocation_id AND known_provider.provider IS NOT NULL AND known_provider.provider <> 'unavailable')"):(O.push("s.provider = ?"),D.push(n.provider))),n.model&&(n.model==="unavailable"?O.push("s.model_key = 'unavailable'"):(O.push("s.model_key = ?"),D.push(n.model))),n.query&&(O.push("s.model_key LIKE ?"),D.push(`%${n.query}%`));let C=O.join(" AND "),z=["a.activity_source_kind <> 'agent_run'"],W=[];n.from&&(z.push("a.occurred_day_sp >= ?"),W.push(n.from.slice(0,10))),n.to&&(z.push("a.occurred_day_sp <= ?"),W.push(n.to.slice(0,10))),n.agent&&(z.push("a.zaip_agent = ?"),W.push(n.agent)),n.phase&&(z.push("a.phase = ?"),W.push(n.phase)),n.status&&(z.push("a.status = ?"),W.push(n.status)),(n.priority||n.workType)&&z.push("0"),n.risk&&(z.push("activity_task.risk = ?"),W.push(n.risk)),n.origin&&z.push(n.origin==="prd"?"a.prd_id IS NOT NULL":n.origin==="spec"?"a.prd_id IS NULL AND a.spec_id IS NOT NULL":n.origin==="task"?"a.prd_id IS NULL AND a.spec_id IS NULL AND a.task_id IS NOT NULL":"a.prd_id IS NULL AND a.spec_id IS NULL AND a.task_id IS NULL"),n.provider&&(n.provider==="unavailable"?z.push("a.provider IS NULL OR trim(a.provider) = '' OR a.provider = 'unavailable'"):(z.push("a.provider = ?"),W.push(n.provider))),n.model&&(n.model==="unavailable"?z.push("a.model IS NULL OR trim(a.model) = '' OR a.model = 'unavailable'"):(z.push("a.model = ?"),W.push(n.model))),n.query&&(z.push("COALESCE(a.model, 'unavailable') LIKE ?"),W.push(`%${n.query}%`));let de=`WITH segment_totals AS (
1738
+ )`,A=Math.min(200,Math.max(1,n.limit??50)),B=Math.max(0,n.offset??0),oe=Number(this.database.prepare(`${N} SELECT COUNT(DISTINCT key) AS count FROM agent_facts`).get(...ce,...V).count),D=this.database.prepare(`${N} SELECT COUNT(*) AS invocation_count, COUNT(DISTINCT task_id) AS task_count, SUM(duration_ms) AS total_duration, SUM(CASE WHEN duration_ms IS NULL THEN 1 ELSE 0 END) AS duration_unknown, SUM(CASE WHEN duration_ms IS NULL THEN 0 ELSE duration_ms END) AS duration_known, SUM(source_event_count) AS source_event_count, SUM(total_tokens) AS total_tokens, SUM(cost_usd) AS total_cost_usd, SUM(cost_brl) AS total_cost_brl FROM agent_facts`).get(...ce,...V),J=this.database.prepare(`${N} SELECT key, key AS label, COALESCE(MAX(persona), MAX(catalog_persona)) AS persona, COALESCE(MAX(job), MAX(catalog_job)) AS job, MAX(occurred_at) AS latest_started_at, COUNT(*) AS invocation_count, COUNT(DISTINCT task_id) AS task_count, SUM(duration_ms) AS total_duration, SUM(CASE WHEN duration_ms IS NULL THEN 1 ELSE 0 END) AS duration_unknown, SUM(CASE WHEN duration_ms IS NULL THEN 0 ELSE duration_ms END) AS duration_known, SUM(source_event_count) AS source_event_count, SUM(total_tokens) AS total_tokens, SUM(cost_usd) AS total_cost_usd, SUM(cost_brl) AS total_cost_brl FROM agent_facts GROUP BY key ORDER BY total_cost_brl DESC, key LIMIT ? OFFSET ?`).all(...ce,...V,A,B);return{data_source:"sqlite_read_model",view:t,offset:B,limit:A,total_count:oe,has_more:B+J.length<oe,totals:D,rows:J}}if(c==="model"){let O=["1=1"],U=[],M=Hu(n);n.from&&(O.push("date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours') >= ?"),U.push(n.from.slice(0,10))),n.to&&(O.push("date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours') <= ?"),U.push(n.to.slice(0,10))),n.agent&&(O.push("i.zaip_agent = ?"),U.push(n.agent)),n.phase&&(O.push("i.phase = ?"),U.push(n.phase)),n.status&&(O.push("i.status = ?"),U.push(n.status)),(n.priority||n.workType)&&O.push("0"),n.risk&&(O.push("t.risk = ?"),U.push(n.risk)),n.origin&&O.push(n.origin==="prd"?"i.prd_id IS NOT NULL":n.origin==="spec"?"i.prd_id IS NULL AND i.spec_id IS NOT NULL":n.origin==="task"?"i.prd_id IS NULL AND i.spec_id IS NULL AND i.task_id IS NOT NULL":"i.prd_id IS NULL AND i.spec_id IS NULL AND i.task_id IS NULL"),n.provider&&(n.provider==="unavailable"?O.push("s.provider IS NULL AND NOT EXISTS (SELECT 1 FROM invocation_usage known_provider WHERE known_provider.agent_invocation_id=i.agent_invocation_id AND known_provider.provider IS NOT NULL AND known_provider.provider <> 'unavailable')"):(O.push("s.provider = ?"),U.push(n.provider))),n.model&&(n.model==="unavailable"?O.push("s.model_key = 'unavailable'"):(O.push("s.model_key = ?"),U.push(n.model))),n.query&&(O.push("s.model_key LIKE ?"),U.push(`%${n.query}%`));let C=O.join(" AND "),z=["a.activity_source_kind <> 'agent_run'"],V=[];n.from&&(z.push("a.occurred_day_sp >= ?"),V.push(n.from.slice(0,10))),n.to&&(z.push("a.occurred_day_sp <= ?"),V.push(n.to.slice(0,10))),n.agent&&(z.push("a.zaip_agent = ?"),V.push(n.agent)),n.phase&&(z.push("a.phase = ?"),V.push(n.phase)),n.status&&(z.push("a.status = ?"),V.push(n.status)),(n.priority||n.workType)&&z.push("0"),n.risk&&(z.push("activity_task.risk = ?"),V.push(n.risk)),n.origin&&z.push(n.origin==="prd"?"a.prd_id IS NOT NULL":n.origin==="spec"?"a.prd_id IS NULL AND a.spec_id IS NOT NULL":n.origin==="task"?"a.prd_id IS NULL AND a.spec_id IS NULL AND a.task_id IS NOT NULL":"a.prd_id IS NULL AND a.spec_id IS NULL AND a.task_id IS NULL"),n.provider&&(n.provider==="unavailable"?z.push("a.provider IS NULL OR trim(a.provider) = '' OR a.provider = 'unavailable'"):(z.push("a.provider = ?"),V.push(n.provider))),n.model&&(n.model==="unavailable"?z.push("a.model IS NULL OR trim(a.model) = '' OR a.model = 'unavailable'"):(z.push("a.model = ?"),V.push(n.model))),n.query&&(z.push("COALESCE(a.model, 'unavailable') LIKE ?"),V.push(`%${n.query}%`));let _e=`WITH segment_totals AS (
1739
1739
  SELECT agent_invocation_id, SUM(input_tokens) AS input_tokens, SUM(cached_input_tokens) AS cached_input_tokens,
1740
1740
  SUM(output_tokens) AS output_tokens, SUM(reasoning_tokens) AS reasoning_tokens,
1741
1741
  SUM(total_tokens) AS total_tokens, SUM(cost_usd) AS cost_usd, SUM(cost_brl) AS cost_brl
@@ -1775,7 +1775,7 @@ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type
1775
1775
  SELECT s.*, i.task_id, i.conversation_id, i.duration_ms, i.source_event_count, km.model_count
1776
1776
  FROM segments s JOIN invocations i USING(agent_invocation_id)
1777
1777
  LEFT JOIN tasks t ON t.id=i.task_id LEFT JOIN known_models km USING(agent_invocation_id)
1778
- WHERE ${C}`,te=`), financial_components AS (
1778
+ WHERE ${C}`,ne=`), financial_components AS (
1779
1779
  SELECT model_key AS key, SUM(total_tokens) AS total_tokens, SUM(cost_usd) AS total_cost_usd, SUM(cost_brl) AS total_cost_brl
1780
1780
  FROM filtered_segments GROUP BY model_key
1781
1781
  UNION ALL
@@ -1851,7 +1851,7 @@ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type
1851
1851
  SELECT key FROM financial UNION SELECT key FROM population UNION SELECT key FROM task_population UNION SELECT key FROM conversation_population
1852
1852
  ), displayed_keys AS (
1853
1853
  SELECT key FROM keys WHERE key <> 'unavailable'
1854
- )`,se=Math.min(200,Math.max(1,n.limit??50)),b=Math.max(0,n.offset??0),N=Number(this.database.prepare(`${de} ${te} SELECT COUNT(*) AS count FROM displayed_keys`).get(...D,...W,...W).count),A=this.database.prepare(`${de} ${te} SELECT
1854
+ )`,ce=Math.min(200,Math.max(1,n.limit??50)),b=Math.max(0,n.offset??0),N=Number(this.database.prepare(`${_e} ${ne} SELECT COUNT(*) AS count FROM displayed_keys`).get(...U,...V,...V).count),A=this.database.prepare(`${_e} ${ne} SELECT
1855
1855
  SUM(COALESCE(population.invocation_count, 0)) AS invocation_count,
1856
1856
  SUM(COALESCE(task_population.task_count, 0)) AS task_count,
1857
1857
  SUM(COALESCE(conversation_population.conversation_count, 0)) AS conversation_count,
@@ -1866,7 +1866,7 @@ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type
1866
1866
  LEFT JOIN population USING(key)
1867
1867
  LEFT JOIN task_population USING(key)
1868
1868
  LEFT JOIN conversation_population USING(key)
1869
- LEFT JOIN financial USING(key)`).get(...D,...W,...W),B=this.database.prepare(`${de} ${te} SELECT displayed_keys.key, displayed_keys.key AS label, COALESCE(population.invocation_count, 0) AS invocation_count, COALESCE(task_population.task_count, 0) AS task_count, COALESCE(conversation_population.conversation_count, 0) AS conversation_count, population.total_duration, population.source_event_count, financial.total_tokens, financial.total_cost_usd, financial.total_cost_brl FROM displayed_keys LEFT JOIN population USING(key) LEFT JOIN task_population USING(key) LEFT JOIN conversation_population USING(key) LEFT JOIN financial USING(key) ORDER BY financial.total_cost_brl DESC, displayed_keys.key LIMIT ? OFFSET ?`).all(...D,...W,...W,se,b),ie=Hu(this.database,n.from?.slice(0,10)??"0000-01-01",n.to?.slice(0,10)??"9999-12-31",{...n.model?{model:n.model}:{},...n.provider?{provider:n.provider}:{}}),x=new Map(ie.map(J=>[String(J.key),J]));for(let J of B){let K=x.get(String(J.key));Object.assign(J,{prd_count:K?.prd_count??0,spec_count:K?.spec_count??0,validation_count:K?.validation_count??0,evidence_count:K?.evidence_count??0})}Object.assign(A,{task_count:Number(A.task_count??0),conversation_count:Number(A.conversation_count??0),prd_count:rr(ie,"prd_count")??0,spec_count:rr(ie,"spec_count")??0,validation_count:rr(ie,"validation_count")??0,evidence_count:rr(ie,"evidence_count")??0});for(let J of B)for(let K of["invocation_count","task_count","conversation_count","prd_count","spec_count","validation_count","evidence_count","total_duration","source_event_count","total_tokens","total_cost_usd","total_cost_brl"])J[K]=typeof J[K]=="number"?J[K]:0;for(let J of["invocation_count","task_count","conversation_count","prd_count","spec_count","validation_count","evidence_count","total_duration","source_event_count","total_tokens","total_cost_usd","total_cost_brl"])A[J]=typeof A[J]=="number"?A[J]:0;return{data_source:"sqlite_read_model",view:t,offset:b,limit:se,total_count:N,has_more:b+B.length<N,totals:A,rows:B}}if(c==="provider"){let O=["1=1"],D=[],M=Bu(n);n.from&&(O.push("date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours') >= ?"),D.push(n.from.slice(0,10))),n.to&&(O.push("date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours') <= ?"),D.push(n.to.slice(0,10))),n.agent&&(O.push("i.zaip_agent = ?"),D.push(n.agent)),n.phase&&(O.push("i.phase = ?"),D.push(n.phase)),n.status&&(O.push("i.status = ?"),D.push(n.status)),(n.priority||n.workType)&&O.push("0"),n.risk&&(O.push("t.risk = ?"),D.push(n.risk)),n.origin&&O.push(n.origin==="prd"?"i.prd_id IS NOT NULL":n.origin==="spec"?"i.prd_id IS NULL AND i.spec_id IS NOT NULL":n.origin==="task"?"i.prd_id IS NULL AND i.spec_id IS NULL AND i.task_id IS NOT NULL":"i.prd_id IS NULL AND i.spec_id IS NULL AND i.task_id IS NULL"),n.provider&&(n.provider==="unavailable"?O.push("s.provider_key = 'unavailable'"):(O.push("s.provider_key = ?"),D.push(n.provider))),n.model&&(n.model==="unavailable"?O.push("s.model_key = 'unavailable'"):(O.push("s.model_key = ?"),D.push(n.model))),n.query&&(O.push("s.provider_key LIKE ?"),D.push(`%${n.query}%`));let C=O.join(" AND "),z=`WITH segment_totals AS (
1869
+ LEFT JOIN financial USING(key)`).get(...U,...V,...V),B=this.database.prepare(`${_e} ${ne} SELECT displayed_keys.key, displayed_keys.key AS label, COALESCE(population.invocation_count, 0) AS invocation_count, COALESCE(task_population.task_count, 0) AS task_count, COALESCE(conversation_population.conversation_count, 0) AS conversation_count, population.total_duration, population.source_event_count, financial.total_tokens, financial.total_cost_usd, financial.total_cost_brl FROM displayed_keys LEFT JOIN population USING(key) LEFT JOIN task_population USING(key) LEFT JOIN conversation_population USING(key) LEFT JOIN financial USING(key) ORDER BY financial.total_cost_brl DESC, displayed_keys.key LIMIT ? OFFSET ?`).all(...U,...V,...V,ce,b),oe=Ju(this.database,n.from?.slice(0,10)??"0000-01-01",n.to?.slice(0,10)??"9999-12-31",{...n.model?{model:n.model}:{},...n.provider?{provider:n.provider}:{}}),D=new Map(oe.map(J=>[String(J.key),J]));for(let J of B){let K=D.get(String(J.key));Object.assign(J,{prd_count:K?.prd_count??0,spec_count:K?.spec_count??0,validation_count:K?.validation_count??0,evidence_count:K?.evidence_count??0})}Object.assign(A,{task_count:Number(A.task_count??0),conversation_count:Number(A.conversation_count??0),prd_count:rr(oe,"prd_count")??0,spec_count:rr(oe,"spec_count")??0,validation_count:rr(oe,"validation_count")??0,evidence_count:rr(oe,"evidence_count")??0});for(let J of B)for(let K of["invocation_count","task_count","conversation_count","prd_count","spec_count","validation_count","evidence_count","total_duration","source_event_count","total_tokens","total_cost_usd","total_cost_brl"])J[K]=typeof J[K]=="number"?J[K]:0;for(let J of["invocation_count","task_count","conversation_count","prd_count","spec_count","validation_count","evidence_count","total_duration","source_event_count","total_tokens","total_cost_usd","total_cost_brl"])A[J]=typeof A[J]=="number"?A[J]:0;return{data_source:"sqlite_read_model",view:t,offset:b,limit:ce,total_count:N,has_more:b+B.length<N,totals:A,rows:B}}if(c==="provider"){let O=["1=1"],U=[],M=Hu(n);n.from&&(O.push("date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours') >= ?"),U.push(n.from.slice(0,10))),n.to&&(O.push("date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours') <= ?"),U.push(n.to.slice(0,10))),n.agent&&(O.push("i.zaip_agent = ?"),U.push(n.agent)),n.phase&&(O.push("i.phase = ?"),U.push(n.phase)),n.status&&(O.push("i.status = ?"),U.push(n.status)),(n.priority||n.workType)&&O.push("0"),n.risk&&(O.push("t.risk = ?"),U.push(n.risk)),n.origin&&O.push(n.origin==="prd"?"i.prd_id IS NOT NULL":n.origin==="spec"?"i.prd_id IS NULL AND i.spec_id IS NOT NULL":n.origin==="task"?"i.prd_id IS NULL AND i.spec_id IS NULL AND i.task_id IS NOT NULL":"i.prd_id IS NULL AND i.spec_id IS NULL AND i.task_id IS NULL"),n.provider&&(n.provider==="unavailable"?O.push("s.provider_key = 'unavailable'"):(O.push("s.provider_key = ?"),U.push(n.provider))),n.model&&(n.model==="unavailable"?O.push("s.model_key = 'unavailable'"):(O.push("s.model_key = ?"),U.push(n.model))),n.query&&(O.push("s.provider_key LIKE ?"),U.push(`%${n.query}%`));let C=O.join(" AND "),z=`WITH segment_totals AS (
1870
1870
  SELECT agent_invocation_id, SUM(input_tokens) AS input_tokens, SUM(cached_input_tokens) AS cached_input_tokens,
1871
1871
  SUM(output_tokens) AS output_tokens, SUM(reasoning_tokens) AS reasoning_tokens,
1872
1872
  SUM(total_tokens) AS total_tokens, SUM(cost_usd) AS cost_usd, SUM(cost_brl) AS cost_brl
@@ -1906,7 +1906,7 @@ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type
1906
1906
  SELECT s.*, i.task_id, i.duration_ms, i.source_event_count, kp.provider_count
1907
1907
  FROM segments s JOIN invocations i USING(agent_invocation_id)
1908
1908
  LEFT JOIN tasks t ON t.id=i.task_id LEFT JOIN known_providers kp USING(agent_invocation_id)
1909
- WHERE ${C}`,W=`), financial AS (
1909
+ WHERE ${C}`,V=`), financial AS (
1910
1910
  SELECT provider_key AS key, SUM(total_tokens) AS total_tokens, SUM(cost_usd) AS total_cost_usd, SUM(cost_brl) AS total_cost_brl FROM filtered_segments GROUP BY provider_key
1911
1911
  ), population_providers AS (
1912
1912
  SELECT agent_invocation_id, provider_key, MAX(task_id) AS task_id, MAX(duration_ms) AS duration_ms, MAX(source_event_count) AS source_event_count, MAX(provider_count) AS provider_count
@@ -1921,7 +1921,7 @@ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type
1921
1921
  ), task_population AS (
1922
1922
  SELECT provider_key AS key, COUNT(*) AS task_count
1923
1923
  FROM task_providers GROUP BY provider_key
1924
- ), keys AS (SELECT key FROM financial UNION SELECT key FROM population UNION SELECT key FROM task_population)`,de=Math.min(200,Math.max(1,n.limit??50)),te=Math.max(0,n.offset??0),se=Number(this.database.prepare(`${z} ${W} SELECT COUNT(*) AS count FROM keys`).get(...D).count),b=this.database.prepare(`${z} ${W} SELECT
1924
+ ), keys AS (SELECT key FROM financial UNION SELECT key FROM population UNION SELECT key FROM task_population)`,_e=Math.min(200,Math.max(1,n.limit??50)),ne=Math.max(0,n.offset??0),ce=Number(this.database.prepare(`${z} ${V} SELECT COUNT(*) AS count FROM keys`).get(...U).count),b=this.database.prepare(`${z} ${V} SELECT
1925
1925
  (SELECT COUNT(*) FROM population_ranked WHERE provider_rank = 1) AS invocation_count,
1926
1926
  (SELECT COUNT(DISTINCT task_id) FROM population_providers) AS task_count,
1927
1927
  (SELECT SUM(duration_ms) FROM population_ranked WHERE provider_rank = 1) AS total_duration,
@@ -1935,7 +1935,7 @@ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type
1935
1935
  SUM(total_tokens) AS total_tokens,
1936
1936
  SUM(cost_usd) AS total_cost_usd,
1937
1937
  SUM(cost_brl) AS total_cost_brl
1938
- FROM filtered_segments`).get(...D),N=this.database.prepare(`${z} ${W} SELECT keys.key, keys.key AS label, COALESCE(population.invocation_count,0) AS invocation_count, COALESCE(task_population.task_count,0) AS task_count, population.total_duration, population.source_event_count, financial.total_tokens, financial.total_cost_usd, financial.total_cost_brl FROM keys LEFT JOIN population USING(key) LEFT JOIN task_population USING(key) LEFT JOIN financial USING(key) ORDER BY financial.total_cost_brl DESC, keys.key LIMIT ? OFFSET ?`).all(...D,de,te);return{data_source:"sqlite_read_model",view:t,offset:te,limit:de,total_count:se,has_more:te+N.length<se,totals:b,rows:N}}let d=c==="day"||c==="month"||c==="year",p=!!(n.provider||n.model||n.agent||n.phase||n.status||n.origin||n.priority||n.risk||n.workType);if(c!==void 0&&d&&!p){let O=Qe(n.from),D=Qe(n.to),C=this.costMonitorSummaryAggregate({from:O,to:D}).daily_rows,z=new Map(C.map(x=>[String(x.key),x])),W=[...z.keys()].sort(),de=new Map,te=["prd_count","spec_count","task_count","validation_count","evidence_count","total_run_count","invocation_count","cost_monitor_invocation_count","llm_call_count","source_event_count","total_tokens","total_cost_usd","total_cost_brl"];for(let x of W){let J=c==="day"?x:c==="month"?x.slice(0,7):x.slice(0,4),K=de.get(J)??{key:J,label:J,period_key:J,start_day:x,end_day:x,total_duration:null,duration_incomplete:!1,duration_provenance:"unavailable",estimation_basis:null};K.start_day=String(K.start_day)<x?K.start_day:x,K.end_day=String(K.end_day)>x?K.end_day:x;let Ze=z.get(x);for(let ct of te){let he=Ze?.[ct];typeof he=="number"&&(K[ct]=(typeof K[ct]=="number"?Number(K[ct]):0)+he)}let qt=Ze?.total_duration;typeof qt=="number"&&(K.total_duration=(typeof K.total_duration=="number"?Number(K.total_duration):0)+qt),typeof Ze?.duration_unknown=="number"&&Ze.duration_unknown>0&&(K.duration_incomplete=!0),de.set(J,K)}let se=n.query?.toLocaleLowerCase()??null,b=[...de.values()].map(x=>{let J=typeof x.total_duration=="number"?x.total_duration:null,K=x.duration_incomplete===!0?1:0;return{key:String(x.key),label:String(x.label),prd_count:Number(x.prd_count??0),spec_count:Number(x.spec_count??0),task_count:Number(x.task_count??0),total_run_count:Number(x.total_run_count??0),validation_count:Number(x.validation_count??0),evidence_count:Number(x.evidence_count??0),total_duration:J,duration_known:J??0,duration_unknown:K,total_tokens:typeof x.total_tokens=="number"?x.total_tokens:null,total_cost_usd:typeof x.total_cost_usd=="number"?x.total_cost_usd:null,total_cost_brl:typeof x.total_cost_brl=="number"?x.total_cost_brl:null}}).filter(x=>se===null||String(x.key).toLocaleLowerCase().includes(se)).sort((x,J)=>String(J.key).localeCompare(String(x.key))),N=b.reduce((x,J)=>{for(let K of["prd_count","spec_count","task_count","total_run_count","validation_count","evidence_count","total_duration","duration_known","duration_unknown","total_tokens","total_cost_usd","total_cost_brl"]){let Ze=J[K];typeof Ze=="number"?x[K]=(x[K]??0)+Ze:K in x||(x[K]=null)}return x},{}),A=Math.min(200,Math.max(1,n.limit??50)),B=Math.max(0,n.offset??0),ie=b.slice(B,B+A);return{data_source:"sqlite_read_model",view:t,offset:B,limit:A,total_count:b.length,has_more:B+ie.length<b.length,totals:N,rows:ie}}if(c!==void 0&&(!d||p)){if(d&&n.workType)return{data_source:"sqlite_read_model",view:t,offset:Math.max(0,n.offset??0),limit:Math.min(200,Math.max(1,n.limit??50)),total_count:0,has_more:!1,rows:[]};let O=c==="day"?"date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours')":c==="month"?"substr(date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours'), 1, 7)":c==="year"?"substr(date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours'), 1, 4)":"i.provider_group",D=[`${O} IS NOT NULL`,"(i.total_tokens IS NOT NULL OR i.cost_usd IS NOT NULL OR i.cost_brl IS NOT NULL)"],M=[];n.from&&(D.push("date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours') >= ?"),M.push(Qe(n.from))),n.to&&(D.push("date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours') <= ?"),M.push(Qe(n.to)));let C=[];if(n.provider&&(n.provider==="unavailable"?D.push("NOT EXISTS (SELECT 1 FROM invocation_usage known_provider WHERE known_provider.agent_invocation_id=i.agent_invocation_id AND known_provider.provider IS NOT NULL AND known_provider.provider <> 'unavailable')"):(C.push("f.provider=?"),M.push(n.provider))),n.model&&(n.model==="unavailable"?D.push("NOT EXISTS (SELECT 1 FROM invocation_usage known_model WHERE known_model.agent_invocation_id=i.agent_invocation_id AND known_model.model IS NOT NULL AND known_model.model <> 'unavailable')"):(C.push("f.model=?"),M.push(n.model))),C.length>0&&D.push(`EXISTS (SELECT 1 FROM invocation_usage f WHERE f.agent_invocation_id=i.agent_invocation_id AND ${C.join(" AND ")})`),n.agent&&(D.push("i.zaip_agent = ?"),M.push(n.agent)),n.phase&&(D.push("i.phase = ?"),M.push(n.phase)),n.status&&(D.push("i.status = ?"),M.push(n.status)),n.priority&&D.push("0"),n.risk&&(D.push("i.task_risk = ?"),M.push(n.risk)),n.origin&&D.push(n.origin==="prd"?"i.prd_id IS NOT NULL":n.origin==="spec"?"i.prd_id IS NULL AND i.spec_id IS NOT NULL":n.origin==="task"?"i.prd_id IS NULL AND i.spec_id IS NULL AND i.task_id IS NOT NULL":"i.prd_id IS NULL AND i.spec_id IS NULL AND i.task_id IS NULL"),n.workType&&D.push("0"),n.query){let A=`%${n.query}%`;D.push("(i.agent_invocation_id LIKE ? OR i.execution_id LIKE ? OR i.task_id LIKE ? OR i.spec_id LIKE ? OR i.prd_id LIKE ? OR i.conversation_id LIKE ? OR i.zaip_agent LIKE ? OR i.purpose LIKE ?)"),M.push(A,A,A,A,A,A,A,A)}let z=`WITH usage_rollup AS (
1938
+ FROM filtered_segments`).get(...U),N=this.database.prepare(`${z} ${V} SELECT keys.key, keys.key AS label, COALESCE(population.invocation_count,0) AS invocation_count, COALESCE(task_population.task_count,0) AS task_count, population.total_duration, population.source_event_count, financial.total_tokens, financial.total_cost_usd, financial.total_cost_brl FROM keys LEFT JOIN population USING(key) LEFT JOIN task_population USING(key) LEFT JOIN financial USING(key) ORDER BY financial.total_cost_brl DESC, keys.key LIMIT ? OFFSET ?`).all(...U,_e,ne);return{data_source:"sqlite_read_model",view:t,offset:ne,limit:_e,total_count:ce,has_more:ne+N.length<ce,totals:b,rows:N}}let d=c==="day"||c==="month"||c==="year",p=!!(n.provider||n.model||n.agent||n.phase||n.status||n.origin||n.priority||n.risk||n.workType);if(c!==void 0&&d&&!p){let O=Qe(n.from),U=Qe(n.to),C=this.costMonitorSummaryAggregate({from:O,to:U}).daily_rows,z=new Map(C.map(D=>[String(D.key),D])),V=[...z.keys()].sort(),_e=new Map,ne=["prd_count","spec_count","task_count","validation_count","evidence_count","total_run_count","invocation_count","cost_monitor_invocation_count","llm_call_count","source_event_count","total_tokens","total_cost_usd","total_cost_brl"];for(let D of V){let J=c==="day"?D:c==="month"?D.slice(0,7):D.slice(0,4),K=_e.get(J)??{key:J,label:J,period_key:J,start_day:D,end_day:D,total_duration:null,duration_incomplete:!1,duration_provenance:"unavailable",estimation_basis:null};K.start_day=String(K.start_day)<D?K.start_day:D,K.end_day=String(K.end_day)>D?K.end_day:D;let Ze=z.get(D);for(let ct of ne){let he=Ze?.[ct];typeof he=="number"&&(K[ct]=(typeof K[ct]=="number"?Number(K[ct]):0)+he)}let qt=Ze?.total_duration;typeof qt=="number"&&(K.total_duration=(typeof K.total_duration=="number"?Number(K.total_duration):0)+qt),typeof Ze?.duration_unknown=="number"&&Ze.duration_unknown>0&&(K.duration_incomplete=!0),_e.set(J,K)}let ce=n.query?.toLocaleLowerCase()??null,b=[..._e.values()].map(D=>{let J=typeof D.total_duration=="number"?D.total_duration:null,K=D.duration_incomplete===!0?1:0;return{key:String(D.key),label:String(D.label),prd_count:Number(D.prd_count??0),spec_count:Number(D.spec_count??0),task_count:Number(D.task_count??0),total_run_count:Number(D.total_run_count??0),validation_count:Number(D.validation_count??0),evidence_count:Number(D.evidence_count??0),total_duration:J,duration_known:J??0,duration_unknown:K,total_tokens:typeof D.total_tokens=="number"?D.total_tokens:null,total_cost_usd:typeof D.total_cost_usd=="number"?D.total_cost_usd:null,total_cost_brl:typeof D.total_cost_brl=="number"?D.total_cost_brl:null}}).filter(D=>ce===null||String(D.key).toLocaleLowerCase().includes(ce)).sort((D,J)=>String(J.key).localeCompare(String(D.key))),N=b.reduce((D,J)=>{for(let K of["prd_count","spec_count","task_count","total_run_count","validation_count","evidence_count","total_duration","duration_known","duration_unknown","total_tokens","total_cost_usd","total_cost_brl"]){let Ze=J[K];typeof Ze=="number"?D[K]=(D[K]??0)+Ze:K in D||(D[K]=null)}return D},{}),A=Math.min(200,Math.max(1,n.limit??50)),B=Math.max(0,n.offset??0),oe=b.slice(B,B+A);return{data_source:"sqlite_read_model",view:t,offset:B,limit:A,total_count:b.length,has_more:B+oe.length<b.length,totals:N,rows:oe}}if(c!==void 0&&(!d||p)){if(d&&n.workType)return{data_source:"sqlite_read_model",view:t,offset:Math.max(0,n.offset??0),limit:Math.min(200,Math.max(1,n.limit??50)),total_count:0,has_more:!1,rows:[]};let O=c==="day"?"date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours')":c==="month"?"substr(date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours'), 1, 7)":c==="year"?"substr(date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours'), 1, 4)":"i.provider_group",U=[`${O} IS NOT NULL`,"(i.total_tokens IS NOT NULL OR i.cost_usd IS NOT NULL OR i.cost_brl IS NOT NULL)"],M=[];n.from&&(U.push("date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours') >= ?"),M.push(Qe(n.from))),n.to&&(U.push("date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours') <= ?"),M.push(Qe(n.to)));let C=[];if(n.provider&&(n.provider==="unavailable"?U.push("NOT EXISTS (SELECT 1 FROM invocation_usage known_provider WHERE known_provider.agent_invocation_id=i.agent_invocation_id AND known_provider.provider IS NOT NULL AND known_provider.provider <> 'unavailable')"):(C.push("f.provider=?"),M.push(n.provider))),n.model&&(n.model==="unavailable"?U.push("NOT EXISTS (SELECT 1 FROM invocation_usage known_model WHERE known_model.agent_invocation_id=i.agent_invocation_id AND known_model.model IS NOT NULL AND known_model.model <> 'unavailable')"):(C.push("f.model=?"),M.push(n.model))),C.length>0&&U.push(`EXISTS (SELECT 1 FROM invocation_usage f WHERE f.agent_invocation_id=i.agent_invocation_id AND ${C.join(" AND ")})`),n.agent&&(U.push("i.zaip_agent = ?"),M.push(n.agent)),n.phase&&(U.push("i.phase = ?"),M.push(n.phase)),n.status&&(U.push("i.status = ?"),M.push(n.status)),n.priority&&U.push("0"),n.risk&&(U.push("i.task_risk = ?"),M.push(n.risk)),n.origin&&U.push(n.origin==="prd"?"i.prd_id IS NOT NULL":n.origin==="spec"?"i.prd_id IS NULL AND i.spec_id IS NOT NULL":n.origin==="task"?"i.prd_id IS NULL AND i.spec_id IS NULL AND i.task_id IS NOT NULL":"i.prd_id IS NULL AND i.spec_id IS NULL AND i.task_id IS NULL"),n.workType&&U.push("0"),n.query){let A=`%${n.query}%`;U.push("(i.agent_invocation_id LIKE ? OR i.execution_id LIKE ? OR i.task_id LIKE ? OR i.spec_id LIKE ? OR i.prd_id LIKE ? OR i.conversation_id LIKE ? OR i.zaip_agent LIKE ? OR i.purpose LIKE ?)"),M.push(A,A,A,A,A,A,A,A)}let z=`WITH usage_rollup AS (
1939
1939
  SELECT agent_invocation_id,
1940
1940
  CASE COUNT(DISTINCT provider) WHEN 0 THEN NULL WHEN 1 THEN MIN(provider) ELSE 'mixed' END AS provider_group,
1941
1941
  CASE COUNT(DISTINCT model) WHEN 0 THEN NULL WHEN 1 THEN MIN(model) ELSE 'mixed' END AS model_group,
@@ -1954,8 +1954,8 @@ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type
1954
1954
  FROM activities v
1955
1955
  LEFT JOIN tasks t ON t.id=v.task_id
1956
1956
  LEFT JOIN usage_rollup u ON u.agent_invocation_id=v.agent_run_id
1957
- )`,W=D.join(" AND "),de=Number(this.database.prepare(`${z} SELECT COUNT(*) AS count FROM (SELECT ${O} FROM facts i WHERE ${W} GROUP BY ${O})`).get(...M).count),te=Math.min(200,Math.max(1,n.limit??50)),se=Math.max(0,n.offset??0),b=c==="day"||c==="month"||c==="year"?"key DESC":"total_cost_brl DESC, key",N=this.database.prepare(`${z} SELECT ${O} AS key, ${O} AS label, ${O} AS period_key, MIN(date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours')) AS start_day, MAX(date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours')) AS end_day, COUNT(*) AS invocation_count, SUM(i.llm_call_count) AS llm_call_count, SUM(i.source_event_count) AS source_event_count, NULL AS total_duration, SUM(i.input_tokens) AS total_input_tokens, SUM(i.cached_input_tokens) AS total_cached_input_tokens, SUM(i.output_tokens) AS total_output_tokens, SUM(i.reasoning_tokens) AS total_reasoning_tokens, SUM(i.total_tokens) AS total_tokens, SUM(i.cost_usd) AS total_cost_usd, SUM(i.cost_brl) AS total_cost_brl FROM facts i WHERE ${W} GROUP BY ${O} ORDER BY ${b} LIMIT ? OFFSET ?`).all(...M,te,se);if(d){let A={from:n.from??null,to:n.to??null,providers:n.provider?[n.provider]:[],models:n.model?[n.model]:[],agents:n.agent?[n.agent]:[],phases:n.phase?[n.phase]:[],statuses:n.status?[n.status]:[]},B=this.costMonitorFactualDurationByDay(A),ie=!!(n.origin||n.priority||n.risk||n.workType),x=ie?[]:this.database.prepare(`SELECT day, prd_count, spec_count, task_count, validation_count, evidence_count
1958
- FROM daily_aggregate_cache WHERE (? IS NULL OR day >= ?) AND (? IS NULL OR day <= ?)`).all(Qe(n.from),Qe(n.from),Qe(n.to),Qe(n.to)),J=new Map;for(let he of x){let P=String(he.day),oe=c==="day"?P:c==="month"?P.slice(0,7):P.slice(0,4),Ee=J.get(oe)??{prd_count:0,spec_count:0,task_count:0,validation_count:0,evidence_count:0};for(let Ue of["prd_count","spec_count","task_count","validation_count","evidence_count"])Ee[Ue]=(Ee[Ue]??0)+Number(he[Ue]??0);J.set(oe,Ee)}let K=new Map(N.map(he=>[String(he.period_key),he])),Ze=new Set((n.query?[]:[...new Set([...B.keys(),...x.map(he=>String(he.day))])]).map(he=>c==="day"?he:c==="month"?he.slice(0,7):he.slice(0,4))),ct=[...new Set([...K.keys(),...Ze])].sort((he,P)=>P.localeCompare(he)).map(he=>{let P=K.get(he)??{key:he,label:he,period_key:he,start_day:he,end_day:he,invocation_count:0,llm_call_count:null,source_event_count:0,total_tokens:null,total_cost_usd:null,total_cost_brl:null},oe=Ue=>c==="day"?Ue===he:Ue.startsWith(he),Ee=[...B].filter(([Ue])=>oe(Ue));return{...P,...J.get(he)??(ie?{prd_count:null,spec_count:null,task_count:null,validation_count:null,evidence_count:null}:{prd_count:0,spec_count:0,task_count:0,validation_count:0,evidence_count:0}),total_run_count:Number(P.invocation_count??0),total_duration:Ee.length===0||Ee.some(([,Ue])=>Ue.eligible_runs!==Ue.known_runs)?null:Ee.reduce((Ue,[,et])=>Ue+et.known_sum,0)}});de=ct.length,N=ct.slice(se,se+te);for(let he of N){let P=String(he.period_key),oe=[...B.keys()].filter(Ee=>c==="day"?Ee===P:Ee.startsWith(P));oe.length>0&&(he.start_day=oe.sort()[0],he.end_day=oe.sort().at(-1))}}return{data_source:"sqlite_read_model",view:t,offset:se,limit:te,total_count:de,has_more:se+N.length<de,rows:N}}let S={cost_monitor_executions:"execution",cost_monitor_tasks:"task",cost_monitor_specs:"spec",cost_monitor_prds:"prd",cost_monitor_conversations:"conversation"}[t];if(S!==void 0){let O=S==="spec"||S==="prd",D=!!(n.provider||n.model||n.agent||n.phase||n.origin||n.workType||n.priority);if(O&&!D){let C=S==="spec"?"specs":"prds",z=S==="spec"?"spec_id":"prd_id",W=[],de=[],te=[],se=[];n.from&&(W.push("entity.occurred_day_sp >= ?"),de.push(n.from.slice(0,10)),te.push("i.occurred_day_sp >= ?"),se.push(n.from.slice(0,10))),n.to&&(W.push("entity.occurred_day_sp <= ?"),de.push(n.to.slice(0,10)),te.push("i.occurred_day_sp <= ?"),se.push(n.to.slice(0,10))),n.status&&(W.push("entity.status = ?"),de.push(n.status)),n.risk&&(W.push("entity.risk = ?"),de.push(n.risk)),n.query&&(W.push("(entity.id LIKE ? OR COALESCE(entity.title, '') LIKE ?)"),de.push(`%${n.query}%`,`%${n.query}%`));let b=W.length===0?"1":W.join(" AND "),N=te.length===0?"":` AND ${te.join(" AND ")}`,A=`WITH grouped AS (
1957
+ )`,V=U.join(" AND "),_e=Number(this.database.prepare(`${z} SELECT COUNT(*) AS count FROM (SELECT ${O} FROM facts i WHERE ${V} GROUP BY ${O})`).get(...M).count),ne=Math.min(200,Math.max(1,n.limit??50)),ce=Math.max(0,n.offset??0),b=c==="day"||c==="month"||c==="year"?"key DESC":"total_cost_brl DESC, key",N=this.database.prepare(`${z} SELECT ${O} AS key, ${O} AS label, ${O} AS period_key, MIN(date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours')) AS start_day, MAX(date(COALESCE(i.source_started_at, i.source_occurred_at, i.occurred_at), '-3 hours')) AS end_day, COUNT(*) AS invocation_count, SUM(i.llm_call_count) AS llm_call_count, SUM(i.source_event_count) AS source_event_count, NULL AS total_duration, SUM(i.input_tokens) AS total_input_tokens, SUM(i.cached_input_tokens) AS total_cached_input_tokens, SUM(i.output_tokens) AS total_output_tokens, SUM(i.reasoning_tokens) AS total_reasoning_tokens, SUM(i.total_tokens) AS total_tokens, SUM(i.cost_usd) AS total_cost_usd, SUM(i.cost_brl) AS total_cost_brl FROM facts i WHERE ${V} GROUP BY ${O} ORDER BY ${b} LIMIT ? OFFSET ?`).all(...M,ne,ce);if(d){let A={from:n.from??null,to:n.to??null,providers:n.provider?[n.provider]:[],models:n.model?[n.model]:[],agents:n.agent?[n.agent]:[],phases:n.phase?[n.phase]:[],statuses:n.status?[n.status]:[]},B=this.costMonitorFactualDurationByDay(A),oe=!!(n.origin||n.priority||n.risk||n.workType),D=oe?[]:this.database.prepare(`SELECT day, prd_count, spec_count, task_count, validation_count, evidence_count
1958
+ FROM daily_aggregate_cache WHERE (? IS NULL OR day >= ?) AND (? IS NULL OR day <= ?)`).all(Qe(n.from),Qe(n.from),Qe(n.to),Qe(n.to)),J=new Map;for(let he of D){let P=String(he.day),ae=c==="day"?P:c==="month"?P.slice(0,7):P.slice(0,4),Ee=J.get(ae)??{prd_count:0,spec_count:0,task_count:0,validation_count:0,evidence_count:0};for(let Ue of["prd_count","spec_count","task_count","validation_count","evidence_count"])Ee[Ue]=(Ee[Ue]??0)+Number(he[Ue]??0);J.set(ae,Ee)}let K=new Map(N.map(he=>[String(he.period_key),he])),Ze=new Set((n.query?[]:[...new Set([...B.keys(),...D.map(he=>String(he.day))])]).map(he=>c==="day"?he:c==="month"?he.slice(0,7):he.slice(0,4))),ct=[...new Set([...K.keys(),...Ze])].sort((he,P)=>P.localeCompare(he)).map(he=>{let P=K.get(he)??{key:he,label:he,period_key:he,start_day:he,end_day:he,invocation_count:0,llm_call_count:null,source_event_count:0,total_tokens:null,total_cost_usd:null,total_cost_brl:null},ae=Ue=>c==="day"?Ue===he:Ue.startsWith(he),Ee=[...B].filter(([Ue])=>ae(Ue));return{...P,...J.get(he)??(oe?{prd_count:null,spec_count:null,task_count:null,validation_count:null,evidence_count:null}:{prd_count:0,spec_count:0,task_count:0,validation_count:0,evidence_count:0}),total_run_count:Number(P.invocation_count??0),total_duration:Ee.length===0||Ee.some(([,Ue])=>Ue.eligible_runs!==Ue.known_runs)?null:Ee.reduce((Ue,[,et])=>Ue+et.known_sum,0)}});_e=ct.length,N=ct.slice(ce,ce+ne);for(let he of N){let P=String(he.period_key),ae=[...B.keys()].filter(Ee=>c==="day"?Ee===P:Ee.startsWith(P));ae.length>0&&(he.start_day=ae.sort()[0],he.end_day=ae.sort().at(-1))}}return{data_source:"sqlite_read_model",view:t,offset:ce,limit:ne,total_count:_e,has_more:ce+N.length<_e,rows:N}}let S={cost_monitor_executions:"execution",cost_monitor_tasks:"task",cost_monitor_specs:"spec",cost_monitor_prds:"prd",cost_monitor_conversations:"conversation"}[t];if(S!==void 0){let O=S==="spec"||S==="prd",U=!!(n.provider||n.model||n.agent||n.phase||n.origin||n.workType||n.priority);if(O&&!U){let C=S==="spec"?"specs":"prds",z=S==="spec"?"spec_id":"prd_id",V=[],_e=[],ne=[],ce=[];n.from&&(V.push("entity.occurred_day_sp >= ?"),_e.push(n.from.slice(0,10)),ne.push("i.occurred_day_sp >= ?"),ce.push(n.from.slice(0,10))),n.to&&(V.push("entity.occurred_day_sp <= ?"),_e.push(n.to.slice(0,10)),ne.push("i.occurred_day_sp <= ?"),ce.push(n.to.slice(0,10))),n.status&&(V.push("entity.status = ?"),_e.push(n.status)),n.risk&&(V.push("entity.risk = ?"),_e.push(n.risk)),n.query&&(V.push("(entity.id LIKE ? OR COALESCE(entity.title, '') LIKE ?)"),_e.push(`%${n.query}%`,`%${n.query}%`));let b=V.length===0?"1":V.join(" AND "),N=ne.length===0?"":` AND ${ne.join(" AND ")}`,A=`WITH grouped AS (
1959
1959
  SELECT entity.id AS group_value, entity.title, entity.status, entity.risk,
1960
1960
  COALESCE(MIN(i.occurred_day_sp), entity.occurred_day_sp) AS first_day,
1961
1961
  COALESCE(MAX(i.occurred_day_sp), entity.occurred_day_sp) AS last_day,
@@ -1972,5 +1972,5 @@ current_day=`)[1]&&(u.exec("DELETE FROM zaip_aios_activities WHERE payload_type
1972
1972
  LEFT JOIN invocations i ON i.${z} = entity.id${N}
1973
1973
  WHERE ${b}
1974
1974
  GROUP BY entity.id, entity.title, entity.status, entity.risk, entity.occurred_at, entity.occurred_day_sp
1975
- )`,B=Math.min(200,Math.max(1,n.limit??50)),ie=Math.max(0,n.offset??0),x=[...se,...de],J=Number(this.database.prepare(`${A} SELECT COUNT(*) AS count FROM grouped`).get(...x).count),K=this.database.prepare(`${A} SELECT COUNT(*) AS entity_count, COALESCE(SUM(invocation_count), 0) AS invocation_count, ROUND(SUM(total_duration)) AS total_duration, SUM(total_tokens) AS total_tokens, SUM(total_cost_usd) AS total_cost_usd, SUM(total_cost_brl) AS total_cost_brl FROM grouped`).get(...x),Ze=this.database.prepare(`${A} SELECT group_value AS id, group_value AS key, title, status, risk, first_day, last_day, occurred_at, invocation_count, llm_call_count, total_duration, total_input_tokens, total_cached_input_tokens, total_output_tokens, total_reasoning_tokens, total_tokens, total_cost_usd, total_cost_brl FROM grouped ORDER BY total_cost_brl DESC, group_value LIMIT ? OFFSET ?`).all(...x,B,ie);return{data_source:"sqlite_read_model",view:t,offset:ie,limit:B,total_count:J,has_more:ie+Ze.length<J,totals:K,rows:Ze}}if(!!(n.provider||n.model||n.agent||n.phase||n.status||n.origin||n.workType||n.priority||n.risk)){let C={task:"i.task_id",spec:"i.spec_id",prd:"i.prd_id",execution:"i.execution_id",conversation:"i.conversation_id"}[S],z=S==="task"?"tasks":S==="spec"?"specs":S==="prd"?"prds":null,W=[`${C} IS NOT NULL`],de=[];n.from&&(W.push("i.occurred_day_sp >= ?"),de.push(n.from.slice(0,10))),n.to&&(W.push("i.occurred_day_sp <= ?"),de.push(n.to.slice(0,10))),n.agent&&(W.push("i.zaip_agent = ?"),de.push(n.agent)),n.phase&&(W.push("i.phase = ?"),de.push(n.phase)),n.status&&(W.push("i.status = ?"),de.push(n.status)),n.risk&&(W.push("task_entity.risk = ?"),de.push(n.risk)),n.origin&&W.push(n.origin==="prd"?"i.prd_id IS NOT NULL":n.origin==="spec"?"i.prd_id IS NULL AND i.spec_id IS NOT NULL":n.origin==="task"?"i.prd_id IS NULL AND i.spec_id IS NULL AND i.task_id IS NOT NULL":"i.prd_id IS NULL AND i.spec_id IS NULL AND i.task_id IS NULL"),(n.workType||n.priority)&&W.push("0");let te=[];n.provider&&(n.provider==="unavailable"?W.push("NOT EXISTS (SELECT 1 FROM invocation_usage known_provider WHERE known_provider.agent_invocation_id=i.agent_invocation_id AND known_provider.provider IS NOT NULL AND known_provider.provider <> 'unavailable')"):(te.push("u.provider = ?"),de.push(n.provider))),n.model&&(n.model==="unavailable"?W.push("NOT EXISTS (SELECT 1 FROM invocation_usage known_model WHERE known_model.agent_invocation_id=i.agent_invocation_id AND known_model.model IS NOT NULL AND known_model.model <> 'unavailable')"):(te.push("u.model = ?"),de.push(n.model))),te.length>0&&W.push(`EXISTS (SELECT 1 FROM invocation_usage u WHERE u.agent_invocation_id=i.agent_invocation_id AND ${te.join(" AND ")})`),n.query&&(W.push(z===null?`${C} LIKE ?`:`(${C} LIKE ? OR COALESCE(entity.title, '') LIKE ?)`),de.push(`%${n.query}%`,...z===null?[]:[`%${n.query}%`]));let N=`${z===null?"":`LEFT JOIN ${z} entity ON entity.id=${C}`} LEFT JOIN tasks task_entity ON task_entity.id=i.task_id`,A=W.join(" AND "),B=z===null?C:`COALESCE(MAX(entity.title), ${C})`,x=`WITH grouped AS (SELECT ${C} AS group_value, ${B} AS title, ${z===null?"NULL":"MAX(entity.status)"} AS status, MAX(task_entity.risk) AS risk, MAX(i.occurred_at) AS occurred_at, COUNT(*) AS invocation_count, SUM(i.duration_ms) AS total_duration, SUM(i.total_tokens) AS total_tokens, SUM(i.cost_usd) AS total_cost_usd, SUM(i.cost_brl) AS total_cost_brl FROM invocations i ${N} WHERE ${A} GROUP BY ${C})`,J=Math.min(200,Math.max(1,n.limit??50)),K=Math.max(0,n.offset??0),Ze=Number(this.database.prepare(`${x} SELECT COUNT(*) AS count FROM grouped`).get(...de).count),qt=this.database.prepare(`${x} SELECT COUNT(*) AS entity_count, COALESCE(SUM(invocation_count), 0) AS invocation_count, ROUND(SUM(total_duration)) AS total_duration, SUM(total_tokens) AS total_tokens, SUM(total_cost_usd) AS total_cost_usd, SUM(total_cost_brl) AS total_cost_brl FROM grouped`).get(...de),ct=this.database.prepare(`${x} SELECT group_value AS id, group_value AS key, title, status, risk, occurred_at, invocation_count, total_duration, total_tokens, total_cost_usd, total_cost_brl FROM grouped ORDER BY total_cost_brl DESC, group_value LIMIT ? OFFSET ?`).all(...de,J,K);return{data_source:"sqlite_read_model",view:t,offset:K,limit:J,total_count:Ze,has_more:K+ct.length<Ze,totals:qt,rows:ct}}return Uh(this.database,t,S,n)}let h=cd[t],v=[],E=[],U=t==="cost_monitor_monthly"||t==="cost_monitor_annual"||t==="operations_monthly"||t==="operations_annual";U&&n.from?(v.push("end_day >= ?"),E.push(n.from.slice(0,10))):h.date!==null&&n.from&&(v.push(`${h.date} >= ?`),E.push(n.from.slice(0,10))),U&&n.to?(v.push("start_day <= ?"),E.push(n.to.slice(0,10))):h.date!==null&&n.to&&(v.push(`${h.date} <= ?`),E.push(n.to.slice(0,10))),n.query&&["cost_monitor_daily","cost_monitor_monthly","cost_monitor_annual","cost_monitor_overview_view","operations_monthly","operations_annual"].includes(t)&&(v.push("period_key LIKE ?"),E.push(`%${n.query}%`)),n.query&&t==="operations_daily"&&(v.push("day LIKE ?"),E.push(`%${n.query}%`)),n.status&&["operations_work_list","operations_work_kanban","operations_executions","operations_conversations","operations_decisions","operations_changes","operations_agent_invocations","first_fold_task","first_fold_spec","first_fold_prd"].includes(t)&&(v.push("status = ?"),E.push(n.status)),n.risk&&["operations_work_list","operations_work_kanban","operations_executions","operations_conversations","operations_decisions","operations_changes","operations_agent_invocations","first_fold_task","first_fold_spec","first_fold_prd"].includes(t)&&(v.push("risk = ?"),E.push(n.risk)),n.query&&["operations_work_list","operations_work_kanban","first_fold_top_tasks","first_fold_task","first_fold_spec","first_fold_prd"].includes(t)&&(v.push("(id LIKE ? OR title LIKE ?)"),E.push(`%${n.query}%`,`%${n.query}%`)),n.query&&t==="operations_executions"&&(v.push("execution_id LIKE ?"),E.push(`%${n.query}%`)),n.query&&t==="operations_conversations"&&(v.push("conversation_id LIKE ?"),E.push(`%${n.query}%`)),n.query&&(t==="operations_decisions"||t==="operations_changes")&&(v.push("id LIKE ?"),E.push(`%${n.query}%`)),t==="operations_agent_invocations"&&(n.query&&(v.push("(agent_invocation_id LIKE ? OR task_id LIKE ? OR execution_id LIKE ?)"),E.push(`%${n.query}%`,`%${n.query}%`,`%${n.query}%`)),n.agent&&(v.push("zaip_agent = ?"),E.push(n.agent)),n.phase&&(v.push("phase = ?"),E.push(n.phase)),n.provider&&(v.push("provider = ?"),E.push(n.provider)),n.model&&(v.push("model = ?"),E.push(n.model)));let F=v.length===0?"":` WHERE ${v.join(" AND ")}`,Z=Number(this.database.prepare(`SELECT COUNT(*) AS count FROM ${t}${F}`).get(...E).count),V=Math.min(200,Math.max(1,n.limit??(t.includes("agent_invocations")?100:t==="first_fold_top_tasks"?5:50))),ce=Math.max(0,n.offset??0),Se=this.database.prepare(`SELECT * FROM ${t}${F} ORDER BY ${h.order} LIMIT ? OFFSET ?`).all(...E,V,ce);if(t==="operations_daily"||t==="operations_monthly"||t==="operations_annual"){let O=t!=="operations_daily"&&(n.from||n.to),D=n.from?.slice(0,10)??null,M=n.to?.slice(0,10)??null,C=O?this.database.prepare("SELECT * FROM operations_daily WHERE (? IS NULL OR day >= ?) AND (? IS NULL OR day <= ?)").all(D,D,M,M):[],z=this.executionDurationByDay({from:n.from??null,to:n.to??null});for(let W of Se){let de=String(W.day??W.period_key);if(O){let te=C.filter(b=>String(b.day).startsWith(de)),se=te.map(b=>String(b.day)).sort();W.start_day=se[0]??null,W.end_day=se.at(-1)??null;for(let b of["prd_count","spec_count","task_count","validation_count","evidence_count","total_run_count","invocation_count","llm_call_count","total_tokens","total_cost_usd","total_cost_brl"])W[b]=te.reduce((N,A)=>N+(typeof A[b]=="number"?Number(A[b]):0),0)}W.operations_total_duration=[...z].filter(([te])=>t==="operations_daily"?te===de:te.startsWith(de)).reduce((te,[,se])=>te+se,0)}}return{data_source:"sqlite_read_model",view:t,offset:ce,limit:V,total_count:Z,has_more:ce+Se.length<Z,rows:Se}}metadata(){this.metadataValues===null&&(this.metadataValues=new Map(this.database.prepare("SELECT key, value FROM read_model_metadata").all().map(n=>[n.key,n.value])));let t=n=>Number(this.metadataValues?.get(n)??0);return{storage_mode:"sqlite_read_model",db_path:process.env.ZAIP_SQLITE_DB_PATH?"session-specific":Ev,source_file_count:t("source_file_count"),excluded_source_count:t("excluded_source_count"),daily_aggregate_count:t("daily_aggregate_count"),activity_count:t("activity_count"),canonical_run_count:t("canonical_run_count"),agent_run_count:t("agent_run_count"),telemetry_summary_count:t("telemetry_summary_count"),unassisted_activity_count:t("unassisted_activity_count")}}};function PP(e,t){return encodeURIComponent(JSON.stringify([e,t]))}function DP(e){if(e===null)return null;try{let t=JSON.parse(decodeURIComponent(e));return Array.isArray(t)&&typeof t[0]=="string"&&typeof t[1]=="string"?[t[0],t[1]]:null}catch{return null}}0&&(module.exports={SqliteReadModelFileSystem,allocateAttributedTokenActiveMs,rebuildSqliteReadModel,sourceFingerprint,sqliteReadModelPath,sqliteViewMetadata,validateSqliteReadModelSchema});
1975
+ )`,B=Math.min(200,Math.max(1,n.limit??50)),oe=Math.max(0,n.offset??0),D=[...ce,..._e],J=Number(this.database.prepare(`${A} SELECT COUNT(*) AS count FROM grouped`).get(...D).count),K=this.database.prepare(`${A} SELECT COUNT(*) AS entity_count, COALESCE(SUM(invocation_count), 0) AS invocation_count, ROUND(SUM(total_duration)) AS total_duration, SUM(total_tokens) AS total_tokens, SUM(total_cost_usd) AS total_cost_usd, SUM(total_cost_brl) AS total_cost_brl FROM grouped`).get(...D),Ze=this.database.prepare(`${A} SELECT group_value AS id, group_value AS key, title, status, risk, first_day, last_day, occurred_at, invocation_count, llm_call_count, total_duration, total_input_tokens, total_cached_input_tokens, total_output_tokens, total_reasoning_tokens, total_tokens, total_cost_usd, total_cost_brl FROM grouped ORDER BY total_cost_brl DESC, group_value LIMIT ? OFFSET ?`).all(...D,B,oe);return{data_source:"sqlite_read_model",view:t,offset:oe,limit:B,total_count:J,has_more:oe+Ze.length<J,totals:K,rows:Ze}}if(!!(n.provider||n.model||n.agent||n.phase||n.status||n.origin||n.workType||n.priority||n.risk)){let C={task:"i.task_id",spec:"i.spec_id",prd:"i.prd_id",execution:"i.execution_id",conversation:"i.conversation_id"}[S],z=S==="task"?"tasks":S==="spec"?"specs":S==="prd"?"prds":null,V=[`${C} IS NOT NULL`],_e=[];n.from&&(V.push("i.occurred_day_sp >= ?"),_e.push(n.from.slice(0,10))),n.to&&(V.push("i.occurred_day_sp <= ?"),_e.push(n.to.slice(0,10))),n.agent&&(V.push("i.zaip_agent = ?"),_e.push(n.agent)),n.phase&&(V.push("i.phase = ?"),_e.push(n.phase)),n.status&&(V.push("i.status = ?"),_e.push(n.status)),n.risk&&(V.push("task_entity.risk = ?"),_e.push(n.risk)),n.origin&&V.push(n.origin==="prd"?"i.prd_id IS NOT NULL":n.origin==="spec"?"i.prd_id IS NULL AND i.spec_id IS NOT NULL":n.origin==="task"?"i.prd_id IS NULL AND i.spec_id IS NULL AND i.task_id IS NOT NULL":"i.prd_id IS NULL AND i.spec_id IS NULL AND i.task_id IS NULL"),(n.workType||n.priority)&&V.push("0");let ne=[];n.provider&&(n.provider==="unavailable"?V.push("NOT EXISTS (SELECT 1 FROM invocation_usage known_provider WHERE known_provider.agent_invocation_id=i.agent_invocation_id AND known_provider.provider IS NOT NULL AND known_provider.provider <> 'unavailable')"):(ne.push("u.provider = ?"),_e.push(n.provider))),n.model&&(n.model==="unavailable"?V.push("NOT EXISTS (SELECT 1 FROM invocation_usage known_model WHERE known_model.agent_invocation_id=i.agent_invocation_id AND known_model.model IS NOT NULL AND known_model.model <> 'unavailable')"):(ne.push("u.model = ?"),_e.push(n.model))),ne.length>0&&V.push(`EXISTS (SELECT 1 FROM invocation_usage u WHERE u.agent_invocation_id=i.agent_invocation_id AND ${ne.join(" AND ")})`),n.query&&(V.push(z===null?`${C} LIKE ?`:`(${C} LIKE ? OR COALESCE(entity.title, '') LIKE ?)`),_e.push(`%${n.query}%`,...z===null?[]:[`%${n.query}%`]));let N=`${z===null?"":`LEFT JOIN ${z} entity ON entity.id=${C}`} LEFT JOIN tasks task_entity ON task_entity.id=i.task_id`,A=V.join(" AND "),B=z===null?C:`COALESCE(MAX(entity.title), ${C})`,D=`WITH grouped AS (SELECT ${C} AS group_value, ${B} AS title, ${z===null?"NULL":"MAX(entity.status)"} AS status, MAX(task_entity.risk) AS risk, MAX(i.occurred_at) AS occurred_at, COUNT(*) AS invocation_count, SUM(i.duration_ms) AS total_duration, SUM(i.total_tokens) AS total_tokens, SUM(i.cost_usd) AS total_cost_usd, SUM(i.cost_brl) AS total_cost_brl FROM invocations i ${N} WHERE ${A} GROUP BY ${C})`,J=Math.min(200,Math.max(1,n.limit??50)),K=Math.max(0,n.offset??0),Ze=Number(this.database.prepare(`${D} SELECT COUNT(*) AS count FROM grouped`).get(..._e).count),qt=this.database.prepare(`${D} SELECT COUNT(*) AS entity_count, COALESCE(SUM(invocation_count), 0) AS invocation_count, ROUND(SUM(total_duration)) AS total_duration, SUM(total_tokens) AS total_tokens, SUM(total_cost_usd) AS total_cost_usd, SUM(total_cost_brl) AS total_cost_brl FROM grouped`).get(..._e),ct=this.database.prepare(`${D} SELECT group_value AS id, group_value AS key, title, status, risk, occurred_at, invocation_count, total_duration, total_tokens, total_cost_usd, total_cost_brl FROM grouped ORDER BY total_cost_brl DESC, group_value LIMIT ? OFFSET ?`).all(..._e,J,K);return{data_source:"sqlite_read_model",view:t,offset:K,limit:J,total_count:Ze,has_more:K+ct.length<Ze,totals:qt,rows:ct}}return xh(this.database,t,S,n)}let h=ld[t],v=[],E=[],x=t==="cost_monitor_monthly"||t==="cost_monitor_annual"||t==="operations_monthly"||t==="operations_annual";x&&n.from?(v.push("end_day >= ?"),E.push(n.from.slice(0,10))):h.date!==null&&n.from&&(v.push(`${h.date} >= ?`),E.push(n.from.slice(0,10))),x&&n.to?(v.push("start_day <= ?"),E.push(n.to.slice(0,10))):h.date!==null&&n.to&&(v.push(`${h.date} <= ?`),E.push(n.to.slice(0,10))),n.query&&["cost_monitor_daily","cost_monitor_monthly","cost_monitor_annual","cost_monitor_overview_view","operations_monthly","operations_annual"].includes(t)&&(v.push("period_key LIKE ?"),E.push(`%${n.query}%`)),n.query&&t==="operations_daily"&&(v.push("day LIKE ?"),E.push(`%${n.query}%`)),n.status&&["operations_work_list","operations_work_kanban","operations_executions","operations_conversations","operations_decisions","operations_changes","operations_agent_invocations","first_fold_task","first_fold_spec","first_fold_prd"].includes(t)&&(v.push("status = ?"),E.push(n.status)),n.risk&&["operations_work_list","operations_work_kanban","operations_executions","operations_conversations","operations_decisions","operations_changes","operations_agent_invocations","first_fold_task","first_fold_spec","first_fold_prd"].includes(t)&&(v.push("risk = ?"),E.push(n.risk)),n.query&&["operations_work_list","operations_work_kanban","first_fold_top_tasks","first_fold_task","first_fold_spec","first_fold_prd"].includes(t)&&(v.push("(id LIKE ? OR title LIKE ?)"),E.push(`%${n.query}%`,`%${n.query}%`)),n.query&&t==="operations_executions"&&(v.push("execution_id LIKE ?"),E.push(`%${n.query}%`)),n.query&&t==="operations_conversations"&&(v.push("conversation_id LIKE ?"),E.push(`%${n.query}%`)),n.query&&(t==="operations_decisions"||t==="operations_changes")&&(v.push("id LIKE ?"),E.push(`%${n.query}%`)),t==="operations_agent_invocations"&&(n.query&&(v.push("(agent_invocation_id LIKE ? OR task_id LIKE ? OR execution_id LIKE ?)"),E.push(`%${n.query}%`,`%${n.query}%`,`%${n.query}%`)),n.agent&&(v.push("zaip_agent = ?"),E.push(n.agent)),n.phase&&(v.push("phase = ?"),E.push(n.phase)),n.provider&&(v.push("provider = ?"),E.push(n.provider)),n.model&&(v.push("model = ?"),E.push(n.model)));let F=v.length===0?"":` WHERE ${v.join(" AND ")}`,Z=Number(this.database.prepare(`SELECT COUNT(*) AS count FROM ${t}${F}`).get(...E).count),W=Math.min(200,Math.max(1,n.limit??(t.includes("agent_invocations")?100:t==="first_fold_top_tasks"?5:50))),ue=Math.max(0,n.offset??0),be=this.database.prepare(`SELECT * FROM ${t}${F} ORDER BY ${h.order} LIMIT ? OFFSET ?`).all(...E,W,ue);if(t==="operations_daily"||t==="operations_monthly"||t==="operations_annual"){let O=t!=="operations_daily"&&(n.from||n.to),U=n.from?.slice(0,10)??null,M=n.to?.slice(0,10)??null,C=O?this.database.prepare("SELECT * FROM operations_daily WHERE (? IS NULL OR day >= ?) AND (? IS NULL OR day <= ?)").all(U,U,M,M):[],z=this.executionDurationByDay({from:n.from??null,to:n.to??null});for(let V of be){let _e=String(V.day??V.period_key);if(O){let ne=C.filter(b=>String(b.day).startsWith(_e)),ce=ne.map(b=>String(b.day)).sort();V.start_day=ce[0]??null,V.end_day=ce.at(-1)??null;for(let b of["prd_count","spec_count","task_count","validation_count","evidence_count","total_run_count","invocation_count","llm_call_count","total_tokens","total_cost_usd","total_cost_brl"])V[b]=ne.reduce((N,A)=>N+(typeof A[b]=="number"?Number(A[b]):0),0)}V.operations_total_duration=[...z].filter(([ne])=>t==="operations_daily"?ne===_e:ne.startsWith(_e)).reduce((ne,[,ce])=>ne+ce,0)}}return{data_source:"sqlite_read_model",view:t,offset:ue,limit:W,total_count:Z,has_more:ue+be.length<Z,rows:be}}metadata(){this.metadataValues===null&&(this.metadataValues=new Map(this.database.prepare("SELECT key, value FROM read_model_metadata").all().map(n=>[n.key,n.value])));let t=n=>Number(this.metadataValues?.get(n)??0);return{storage_mode:"sqlite_read_model",db_path:process.env.ZAIP_SQLITE_DB_PATH?"session-specific":kv,source_file_count:t("source_file_count"),excluded_source_count:t("excluded_source_count"),daily_aggregate_count:t("daily_aggregate_count"),activity_count:t("activity_count"),canonical_run_count:t("canonical_run_count"),agent_run_count:t("agent_run_count"),telemetry_summary_count:t("telemetry_summary_count"),unassisted_activity_count:t("unassisted_activity_count")}}};function zD(e,t){return encodeURIComponent(JSON.stringify([e,t]))}function FD(e){if(e===null)return null;try{let t=JSON.parse(decodeURIComponent(e));return Array.isArray(t)&&typeof t[0]=="string"&&typeof t[1]=="string"?[t[0],t[1]]:null}catch{return null}}0&&(module.exports={SqliteReadModelFileSystem,allocateAttributedTokenActiveMs,rebuildSqliteReadModel,sourceFingerprint,sqliteReadModelPath,sqliteViewMetadata,validateSqliteReadModelSchema});
1976
1976
  //# sourceMappingURL=sqlite-read-model.cjs.map