ripplo 0.15.2 → 0.17.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 (77) hide show
  1. package/README.md +26 -138
  2. package/dist/chunk-HA3VCAP6.js +3 -0
  3. package/dist/graphql-Z4UDRCDF.js +185 -0
  4. package/dist/index.js +345 -625
  5. package/package.json +10 -45
  6. package/dist/assets/browser-trace.js +0 -1
  7. package/dist/assets/rrweb.js +0 -54
  8. package/dist/capture-worker.js +0 -13892
  9. package/dist/chunk-3BPQWAUL.js +0 -4
  10. package/dist/chunk-47LLHHJH.js +0 -9
  11. package/dist/chunk-5HFJIZLI.js +0 -4
  12. package/dist/chunk-5RKZ44OU.js +0 -4
  13. package/dist/chunk-7WZ3VIUU.js +0 -4
  14. package/dist/chunk-AXROBTLA.js +0 -4
  15. package/dist/chunk-BFAWQ5U2.js +0 -61
  16. package/dist/chunk-BGY5F3IU.js +0 -5
  17. package/dist/chunk-BIB4JJKD.js +0 -84
  18. package/dist/chunk-C7SV6AR2.js +0 -48
  19. package/dist/chunk-CI6273ZU.js +0 -107
  20. package/dist/chunk-FEHVIHVA.js +0 -5
  21. package/dist/chunk-G6J2WIHJ.js +0 -4
  22. package/dist/chunk-HEOMRXZE.js +0 -4
  23. package/dist/chunk-HN55QF5N.js +0 -405
  24. package/dist/chunk-JJ4QQPAV.js +0 -4
  25. package/dist/chunk-JQ2CRYVX.js +0 -4
  26. package/dist/chunk-JS3DLVVI.js +0 -4
  27. package/dist/chunk-KH4QH23U.js +0 -4
  28. package/dist/chunk-KMZ3L5YA.js +0 -4
  29. package/dist/chunk-KOKEEAEF.js +0 -6
  30. package/dist/chunk-LCCJPRT5.js +0 -5
  31. package/dist/chunk-MHNGR6M7.js +0 -4
  32. package/dist/chunk-NNH3YVVO.js +0 -4
  33. package/dist/chunk-OQ6KNYPG.js +0 -4
  34. package/dist/chunk-PYDYI3AA.js +0 -23
  35. package/dist/chunk-Q2TF5WLS.js +0 -6
  36. package/dist/chunk-QEE4CNMY.js +0 -6
  37. package/dist/chunk-R4ZTRVDQ.js +0 -4
  38. package/dist/chunk-RIASQHPG.js +0 -4
  39. package/dist/chunk-RLB66SU3.js +0 -4
  40. package/dist/chunk-SXVWB7TZ.js +0 -6
  41. package/dist/chunk-T6WA2F3S.js +0 -16
  42. package/dist/chunk-TZPYILZK.js +0 -4
  43. package/dist/chunk-VHFITVRX.js +0 -13
  44. package/dist/chunk-W3CXPVVB.js +0 -7
  45. package/dist/chunk-WB3HHOCG.js +0 -11
  46. package/dist/chunk-XA6BMQTW.js +0 -8
  47. package/dist/chunk-XAMVRZJH.js +0 -23
  48. package/dist/chunk-Y52M43LO.js +0 -8
  49. package/dist/chunk-YD4VBOBY.js +0 -4
  50. package/dist/chunk-YRU6BOIP.js +0 -9
  51. package/dist/chunk-ZSD6QDYB.js +0 -56
  52. package/dist/cli-error-UYWIDE4L.js +0 -4
  53. package/dist/compile-write-QNV2EA5B.js +0 -4
  54. package/dist/daemon-D4UCHMHS.js +0 -175
  55. package/dist/daemon-LZTY7W4M.js +0 -4
  56. package/dist/daemon-lock-RPKO5SNE.js +0 -4
  57. package/dist/dsl-loader-G2CRA252.js +0 -4
  58. package/dist/dsl-typecheck-worker.js +0 -6
  59. package/dist/exit-plan-gate-44YWEKYS.js +0 -4
  60. package/dist/hook.js +0 -5
  61. package/dist/plan-reminder-EDDIUY43.js +0 -4
  62. package/dist/post-edit-4CM5P2G2.js +0 -4
  63. package/dist/post-edit-analyze-HKOTNA2H.js +0 -4
  64. package/dist/post-edit-flag-stubs-2HZMK4NQ.js +0 -4
  65. package/dist/pre-bash-run-gate-CDFNAIK3.js +0 -4
  66. package/dist/pre-edit-JZX36QX6.js +0 -4
  67. package/dist/pre-edit-ripplo-skill-gate-A6ETC3QN.js +0 -4
  68. package/dist/pre-edit-scope-gate-HNIQ7KOQ.js +0 -4
  69. package/dist/pre-edit-watch-gate-T2TWL66C.js +0 -4
  70. package/dist/prompt-submit-GVZHK3CI.js +0 -4
  71. package/dist/scope-reminder-A6GVTTVE.js +0 -4
  72. package/dist/session-preamble-IZQPIWST.js +0 -4
  73. package/dist/status-CNSPYNYP.js +0 -4
  74. package/dist/stop-enforce-NKKP2X4U.js +0 -64
  75. package/dist/tasks-reminder-TDWPD3KV.js +0 -4
  76. package/dist/track-skill-load-SXSDMHFO.js +0 -4
  77. package/dist/track-skill-prompt-7N4TQAD2.js +0 -4
package/dist/index.js CHANGED
@@ -1,690 +1,410 @@
1
1
  #!/usr/bin/env node
2
- import { createRequire as __ripploCreateRequire } from "node:module";
3
- const require = globalThis.require ?? __ripploCreateRequire(import.meta.url);
4
- import{a as Tt}from"./chunk-Y52M43LO.js";import{B as dr,D as Ct,E as ee,G as Et,H as $t,I as Pt,N as It,O as At,P as jt,Q as Mt,T as Lt,U as cr,a as L,b as I,c as lt,d as dt,e as ct,f as ut,g as ar,h as pt,i as ft,j as gt,m as yt,n as ht,o as kt,p as wt,q as bt,r as vt,s as St,t as xt,v as Rt}from"./chunk-HN55QF5N.js";import{j as lr,k as mt}from"./chunk-Q2TF5WLS.js";import{a as Fn,b as Wn,d as Dn,e as _n,f as Un,g as Vn,h as qn,i as Bn,j as Hn,k as zn,l as Gn,m as Kn,n as Jn}from"./chunk-47LLHHJH.js";import{a as et,c as sr,d as rt,e as nt,f as tt,g as ot,h as xe}from"./chunk-YRU6BOIP.js";import{b as Qn,c as Zn,d as Xn,f as Yn}from"./chunk-TZPYILZK.js";import{b as Se,c as F}from"./chunk-JQ2CRYVX.js";import{a as st,b as S}from"./chunk-WB3HHOCG.js";import{b as ae,c as jn,e as be,f as Mn}from"./chunk-BFAWQ5U2.js";import{a as we,b as Nn,c as ve}from"./chunk-QEE4CNMY.js";import{a as M}from"./chunk-OQ6KNYPG.js";import{a as Y,b as Ln,c as ir,d as On}from"./chunk-VHFITVRX.js";import{a as C,b as Tn,c as y}from"./chunk-JS3DLVVI.js";import{a as _r,b as it,c as at}from"./chunk-W3CXPVVB.js";import{a as w}from"./chunk-R4ZTRVDQ.js";import{b as Ur,c as ie,d as Vr,e as qr}from"./chunk-FEHVIHVA.js";import{a as x}from"./chunk-MHNGR6M7.js";import"./chunk-KOKEEAEF.js";import{b as Pn,h as In,j as X,m as An}from"./chunk-5RKZ44OU.js";import{$ as En,D as kn,E as wn,H as or,N as he,R as bn,S as vn,U as Sn,W as xn,X as Rn,Z as Cn,_ as ke,ca as $n,e as Q,f as u,g as mn,h as fn,m as tr,o as Z,p as gn,q as yn,s as hn}from"./chunk-BIB4JJKD.js";import{f as se,i as pn,j as J,l as ge,m as ye}from"./chunk-RLB66SU3.js";import{$ as q,Ia as dn,Ma as cn,Na as un,U as tn,V as N,Z as K,_ as on,ca as sn,ea as an,sa as j,t as nn,ta as ln}from"./chunk-ZSD6QDYB.js";import{a as rn}from"./chunk-7WZ3VIUU.js";import{b as en,e as nr}from"./chunk-KH4QH23U.js";import"./chunk-RIASQHPG.js";import{a as Br,b as Hr,c as zr,d,f as G,g as Gr,i as Kr,k as P,l as Jr,m as Qr,n as rr,o as Zr,p as Xr,q as Yr}from"./chunk-C7SV6AR2.js";import{b as fe}from"./chunk-HEOMRXZE.js";import"./chunk-NNH3YVVO.js";import"./chunk-KMZ3L5YA.js";import Kp from"update-notifier";import Jp from"yargs";import{hideBin as Qp}from"yargs/helpers";function Re({current:e,latest:r}){return r==null?`ripplo v${e} (latest: unknown)`:r===e?`ripplo v${e} (latest)`:`ripplo v${e} (latest: v${r} \u2014 run \`npx ripplo update\`)`}function Ot(){return"Update available {currentVersion} \u2192 {latestVersion}\nRun `npx ripplo update`"}import{graphql as ta}from"gql.tada";import{exec as Ks}from"child_process";import{createAuthClient as zs}from"better-auth/client";import{deviceAuthorizationClient as Gs}from"better-auth/client/plugins";function Nt({baseURL:e}){return zs({baseURL:e,fetchOptions:{headers:{"User-Agent":"Ripplo CLI"}},plugins:[Gs()]})}import{err as Ft,ok as Js}from"neverthrow";var Qs=5e3,Wt="ripplo-cli";async function Dt({onDeviceCode:e,url:r}){let n=r??Tn().RIPPLO_SERVER_URL,t=Nt({baseURL:n}),o=await t.device.code({client_id:Wt});if(o.error!=null)return Ft({description:o.error.error_description,kind:"oauth-device-code-failed"});let{device_code:i,user_code:s,verification_uri_complete:a}=o.data;return e({userCode:s,verificationUrl:a}),na(a),(await Zs({authClient:t,deviceCode:i})).map(c=>(Jr({serverUrl:n,token:c}),c))}async function Zs({authClient:e,deviceCode:r}){for(;;){await ea(Qs);let n=await e.device.token({client_id:Wt,device_code:r,grant_type:"urn:ietf:params:oauth:grant-type:device_code"});if(n.data?.access_token!=null)return Js(n.data.access_token);if(n.error==null)continue;if(!Ys(n.error.error))return Ft({code:n.error.error,description:n.error.error_description,kind:"oauth-authorization-failed"})}}var Xs=new Set(["authorization_pending","slow_down"]);function Ys(e){return Xs.has(e)}function ea(e){return new Promise(r=>{setTimeout(r,e)})}function ra(){return process.platform==="darwin"?"open":process.platform==="win32"?"start":"xdg-open"}function na(e){let r=ra();Ks(`${r} "${e}"`,()=>{})}var oa=ta(`
5
- query AuthViewer {
6
- currentUser {
7
- name
8
- email
9
- }
10
- }
11
- `);async function _t(){let e=C(),r=P(e);if(r!=null&&await ia(e,r))return;let t=(await Dt({url:e,onDeviceCode:a=>{process.stdout.write(`Opening your browser to finish sign-in.
12
- `),process.stdout.write(`If it didn't open, visit: ${a.verificationUrl}
13
- `),process.stdout.write(`Verification code: ${a.userCode}
2
+ import {createRequire}from'node:module';import {a,b,c}from'./chunk-HA3VCAP6.js';import {execFile,exec}from'child_process';import Ei,{readFileSync,existsSync,writeFile as writeFile$1,readdirSync,statSync}from'fs';import zh,{resolve,normalize,join,relative,extname,dirname,basename}from'path';import pA,{homedir}from'os';import {Agent,RetryAgent,setGlobalDispatcher}from'undici';import {strictEqual,notStrictEqual}from'assert';import {format,promisify,inspect,styleText}from'util';import {fileURLToPath}from'url';import {createRequire as createRequire$1}from'module';import {gunzipSync}from'zlib';import {readFile,mkdir,writeFile,rename,rm as rm$1}from'fs/promises';import {setTimeout as setTimeout$1}from'timers/promises';import {stdin,stdout}from'process';import fF from'readline';import'tty';import {randomUUID}from'crypto';globalThis.require ?? createRequire(import.meta.url);
3
+ var Wx=a((K8,Zx)=>{Zx.exports=function(t){if(t===void 0&&(t=2),t>=Error.stackTraceLimit)throw new TypeError("getCallerFile(position) requires position be less then Error.stackTraceLimit but position was: `"+t+"` and Error.stackTraceLimit was: `"+Error.stackTraceLimit+"`");var r=Error.prepareStackTrace;Error.prepareStackTrace=function(n,o){return o};var i=new Error().stack;if(Error.prepareStackTrace=r,i!==null&&typeof i=="object")return i[t]?i[t].getFileName():void 0};});var Mu=a((mV,Wh)=>{var Lu=process||{},XD=Lu.argv||[],Uu=Lu.env||{},VP=!(Uu.NO_COLOR||XD.includes("--no-color"))&&(!!Uu.FORCE_COLOR||XD.includes("--color")||Lu.platform==="win32"||(Lu.stdout||{}).isTTY&&Uu.TERM!=="dumb"||!!Uu.CI),ZP=(e,t,r=e)=>i=>{let n=""+i,o=n.indexOf(t,e.length);return ~o?e+WP(n,t,r,o)+t:e+n+t},WP=(e,t,r,i)=>{let n="",o=0;do n+=e.substring(o,i)+r,o=i+t.length,i=e.indexOf(t,o);while(~i);return n+e.substring(o)},QD=(e=VP)=>{let t=e?ZP:()=>String;return {isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Wh.exports=QD();Wh.exports.createColors=QD;});var iw=a(($V,rw)=>{var og={to(e,t){return t?`\x1B[${t+1};${e+1}H`:`\x1B[${e+1}G`},move(e,t){let r="";return e<0?r+=`\x1B[${-e}D`:e>0&&(r+=`\x1B[${e}C`),t<0?r+=`\x1B[${-t}A`:t>0&&(r+=`\x1B[${t}B`),r},up:(e=1)=>`\x1B[${e}A`,down:(e=1)=>`\x1B[${e}B`,forward:(e=1)=>`\x1B[${e}C`,backward:(e=1)=>`\x1B[${e}D`,nextLine:(e=1)=>"\x1B[E".repeat(e),prevLine:(e=1)=>"\x1B[F".repeat(e),left:"\x1B[G",hide:"\x1B[?25l",show:"\x1B[?25h",save:"\x1B7",restore:"\x1B8"},uF={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},cF={screen:"\x1B[2J",up:(e=1)=>"\x1B[1J".repeat(e),down:(e=1)=>"\x1B[J".repeat(e),line:"\x1B[2K",lineEnd:"\x1B[K",lineStart:"\x1B[1K",lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?og.up():"");return e&&(t+=og.left),t}};rw.exports={cursor:og,scroll:uF,erase:cF,beep:"\x07"};});var Fi={DOCUMENT:"Document",FRAGMENT_DEFINITION:"FragmentDefinition"};var lc=class extends Error{constructor(t,r,i,n,o,a,u){super(t),this.name="GraphQLError",this.message=t,o&&(this.path=o),r&&(this.nodes=Array.isArray(r)?r:[r]),i&&(this.source=i),n&&(this.positions=n),a&&(this.originalError=a);var c=u;if(!c&&a){var l=a.extensions;l&&typeof l=="object"&&(c=l);}this.extensions=c||{};}toJSON(){return {...this,message:this.message}}toString(){return this.message}get[Symbol.toStringTag](){return "GraphQLError"}},Z,I;function et(e){return new lc(`Syntax Error: Unexpected token at ${I} in ${e}`)}function pg(e){if(e.lastIndex=I,e.test(Z))return Z.slice(I,I=e.lastIndex)}var Ho=/ +(?=[^\s])/y;function p$(e){for(var t=e.split(`
4
+ `),r="",i=0,n=0,o=t.length-1,a=0;a<t.length;a++)Ho.lastIndex=0,Ho.test(t[a])&&(a&&(!i||Ho.lastIndex<i)&&(i=Ho.lastIndex),n=n||a,o=a);for(var u=n;u<=o;u++)u!==n&&(r+=`
5
+ `),r+=t[u].slice(i).replace(/\\"""/g,'"""');return r}function ae(){for(var e=0|Z.charCodeAt(I++);e===9||e===10||e===13||e===32||e===35||e===44||e===65279;e=0|Z.charCodeAt(I++))if(e===35)for(;(e=0|Z.charCodeAt(I++))&&e!==10&&e!==13;);I--;}function dc(){for(var e=I,t=0|Z.charCodeAt(I++);t>=48&&t<=57||t>=65&&t<=90||t===95||t>=97&&t<=122;t=0|Z.charCodeAt(I++));if(e===I-1)throw et("Name");var r=Z.slice(e,--I);return ae(),r}function st(){return {kind:"Name",value:dc()}}var f$=/(?:"""|(?:[\s\S]*?[^\\])""")/y,m$=/(?:(?:\.\d+)?[eE][+-]?\d+|\.\d+)/y;function zr(e){var t;switch(Z.charCodeAt(I)){case 91:I++,ae();for(var r=[];Z.charCodeAt(I)!==93;)r.push(zr(e));return I++,ae(),{kind:"ListValue",values:r};case 123:I++,ae();for(var i=[];Z.charCodeAt(I)!==125;){var n=st();if(Z.charCodeAt(I++)!==58)throw et("ObjectField");ae(),i.push({kind:"ObjectField",name:n,value:zr(e)});}return I++,ae(),{kind:"ObjectValue",fields:i};case 36:if(e)throw et("Variable");return I++,{kind:"Variable",name:st()};case 34:if(Z.charCodeAt(I+1)===34&&Z.charCodeAt(I+2)===34){if(I+=3,(t=pg(f$))==null)throw et("StringValue");return ae(),{kind:"StringValue",value:p$(t.slice(0,-3)),block:true}}else {var o=I,a;I++;var u=false;for(a=0|Z.charCodeAt(I++);a===92&&(I++,u=true)||a!==10&&a!==13&&a!==34&&a;a=0|Z.charCodeAt(I++));if(a!==34)throw et("StringValue");return t=Z.slice(o,I),ae(),{kind:"StringValue",value:u?JSON.parse(t):t.slice(1,-1),block:false}}case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:for(var c=I++,l;(l=0|Z.charCodeAt(I++))>=48&&l<=57;);var d=Z.slice(c,--I);if((l=Z.charCodeAt(I))===46||l===69||l===101){if((t=pg(m$))==null)throw et("FloatValue");return ae(),{kind:"FloatValue",value:d+t}}else return ae(),{kind:"IntValue",value:d};case 110:if(Z.charCodeAt(I+1)===117&&Z.charCodeAt(I+2)===108&&Z.charCodeAt(I+3)===108)return I+=4,ae(),{kind:"NullValue"};break;case 116:if(Z.charCodeAt(I+1)===114&&Z.charCodeAt(I+2)===117&&Z.charCodeAt(I+3)===101)return I+=4,ae(),{kind:"BooleanValue",value:true};break;case 102:if(Z.charCodeAt(I+1)===97&&Z.charCodeAt(I+2)===108&&Z.charCodeAt(I+3)===115&&Z.charCodeAt(I+4)===101)return I+=5,ae(),{kind:"BooleanValue",value:false};break}return {kind:"EnumValue",value:dc()}}function mg(e){if(Z.charCodeAt(I)===40){var t=[];I++,ae();do{var r=st();if(Z.charCodeAt(I++)!==58)throw et("Argument");ae(),t.push({kind:"Argument",name:r,value:zr(e)});}while(Z.charCodeAt(I)!==41);return I++,ae(),t}}function _n(e){if(Z.charCodeAt(I)===64){var t=[];do I++,t.push({kind:"Directive",name:st(),arguments:mg(e)});while(Z.charCodeAt(I)===64);return t}}function h$(){for(var e=0;Z.charCodeAt(I)===91;)e++,I++,ae();var t={kind:"NamedType",name:st()};do if(Z.charCodeAt(I)===33&&(I++,ae(),t={kind:"NonNullType",type:t}),e){if(Z.charCodeAt(I++)!==93)throw et("NamedType");ae(),t={kind:"ListType",type:t};}while(e--);return t}function Jo(){if(Z.charCodeAt(I++)!==123)throw et("SelectionSet");return ae(),Ko()}function Ko(){var e=[];do if(Z.charCodeAt(I)===46){if(Z.charCodeAt(++I)!==46||Z.charCodeAt(++I)!==46)throw et("SelectionSet");switch(I++,ae(),Z.charCodeAt(I)){case 64:e.push({kind:"InlineFragment",typeCondition:void 0,directives:_n(false),selectionSet:Jo()});break;case 111:Z.charCodeAt(I+1)===110?(I+=2,ae(),e.push({kind:"InlineFragment",typeCondition:{kind:"NamedType",name:st()},directives:_n(false),selectionSet:Jo()})):e.push({kind:"FragmentSpread",name:st(),directives:_n(false)});break;case 123:I++,ae(),e.push({kind:"InlineFragment",typeCondition:void 0,directives:void 0,selectionSet:Ko()});break;default:e.push({kind:"FragmentSpread",name:st(),directives:_n(false)});}}else {var t=st(),r=void 0;Z.charCodeAt(I)===58&&(I++,ae(),r=t,t=st());var i=mg(false),n=_n(false),o=void 0;Z.charCodeAt(I)===123&&(I++,ae(),o=Ko()),e.push({kind:"Field",alias:r,name:t,arguments:i,directives:n,selectionSet:o});}while(Z.charCodeAt(I)!==125);return I++,ae(),{kind:"SelectionSet",selections:e}}function g$(){if(ae(),Z.charCodeAt(I)===40){var e=[];I++,ae();do{var t=void 0;if(Z.charCodeAt(I)===34&&(t=zr(true)),Z.charCodeAt(I++)!==36)throw et("Variable");var r=st();if(Z.charCodeAt(I++)!==58)throw et("VariableDefinition");ae();var i=h$(),n=void 0;Z.charCodeAt(I)===61&&(I++,ae(),n=zr(true)),ae();var o={kind:"VariableDefinition",variable:{kind:"Variable",name:r},type:i,defaultValue:n,directives:_n(true)};t&&(o.description=t),e.push(o);}while(Z.charCodeAt(I)!==41);return I++,ae(),e}}function y$(e){var t=st();if(Z.charCodeAt(I++)!==111||Z.charCodeAt(I++)!==110)throw et("FragmentDefinition");ae();var r={kind:"FragmentDefinition",name:t,typeCondition:{kind:"NamedType",name:st()},directives:_n(false),selectionSet:Jo()};return e&&(r.description=e),r}function fg(){var e=[];do{var t=void 0;if(Z.charCodeAt(I)===34&&(t=zr(true)),Z.charCodeAt(I)===123){if(t)throw et("Document");I++,ae(),e.push({kind:"OperationDefinition",operation:"query",name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:Ko()});}else {var r=dc();switch(r){case "fragment":e.push(y$(t));break;case "query":case "mutation":case "subscription":var i,n=void 0;(i=Z.charCodeAt(I))!==40&&i!==64&&i!==123&&(n=st());var o={kind:"OperationDefinition",operation:r,name:n,variableDefinitions:g$(),directives:_n(false),selectionSet:Jo()};t&&(o.description=t),e.push(o);break;default:throw et("Document")}}}while(I<Z.length);return e}function hg(e,t){return Z=e.body?e.body:e,I=0,ae(),{kind:"Document",definitions:fg(),loc:{start:0,end:Z.length,startToken:void 0,endToken:void 0,source:{body:Z,name:"graphql.web",locationOffset:{line:1,column:1}}}}}var gg=0,pc=new Set;function v$(){function e(t,r){var i=hg(t).definitions,n=new Set;for(var o of r||[])for(var a of o.definitions)a.kind===Fi.FRAGMENT_DEFINITION&&!n.has(a)&&(i.push(a),n.add(a));var u;(u=i[0].kind===Fi.FRAGMENT_DEFINITION)&&i[0].directives&&(i[0].directives=i[0].directives.filter((l=>l.name.value!=="_unmask")));var c;return {kind:Fi.DOCUMENT,definitions:i,get loc(){if(!c&&u){var l=t+(function(p){try{gg++;var m="";for(var h of p)if(!pc.has(h)){pc.add(h);var{loc:v}=h;v&&(m+=v.source.body);}return m}finally{--gg==0&&pc.clear();}})(r||[]);return {start:0,end:l.length,source:{body:l,name:"GraphQLTada",locationOffset:{line:1,column:1}}}}return c},set loc(l){c=l;}}}return e.scalar=function(r,i){return i},e.persisted=function(r,i){return {kind:Fi.DOCUMENT,definitions:i?i.definitions:[],documentId:r}},e}var Ue=v$();var s={};b(s,{$brand:()=>Yo,$input:()=>Ad,$output:()=>Rd,NEVER:()=>fc,TimePrecision:()=>jd,ZodAny:()=>$f,ZodArray:()=>Cf,ZodBase64:()=>_s,ZodBase64URL:()=>Es,ZodBigInt:()=>mi,ZodBigIntFormat:()=>ks,ZodBoolean:()=>fi,ZodCIDRv4:()=>xs,ZodCIDRv6:()=>Ds,ZodCUID:()=>ms,ZodCUID2:()=>hs,ZodCatch:()=>Xf,ZodCodec:()=>js,ZodCustom:()=>mo,ZodCustomStringFormat:()=>di,ZodDate:()=>uo,ZodDefault:()=>Gf,ZodDiscriminatedUnion:()=>Af,ZodE164:()=>ws,ZodEmail:()=>ds,ZodEmoji:()=>ps,ZodEnum:()=>ci,ZodError:()=>G0,ZodExactOptional:()=>Vf,ZodFile:()=>Mf,ZodFirstPartyTypeKind:()=>lm,ZodFunction:()=>sm,ZodGUID:()=>ro,ZodIPv4:()=>bs,ZodIPv6:()=>Ss,ZodISODate:()=>as,ZodISODateTime:()=>os,ZodISODuration:()=>us,ZodISOTime:()=>ss,ZodIntersection:()=>Tf,ZodIssueCode:()=>H0,ZodJWT:()=>$s,ZodKSUID:()=>vs,ZodLazy:()=>im,ZodLiteral:()=>Lf,ZodMAC:()=>bf,ZodMap:()=>Nf,ZodNaN:()=>em,ZodNanoID:()=>fs,ZodNever:()=>If,ZodNonOptional:()=>Ps,ZodNull:()=>Ef,ZodNullable:()=>Wf,ZodNumber:()=>pi,ZodNumberFormat:()=>or,ZodObject:()=>lo,ZodOptional:()=>Ts,ZodPipe:()=>Fs,ZodPrefault:()=>Hf,ZodPromise:()=>am,ZodReadonly:()=>tm,ZodRealError:()=>lt,ZodRecord:()=>fo,ZodSet:()=>Uf,ZodString:()=>li,ZodStringFormat:()=>ge,ZodSuccess:()=>Yf,ZodSymbol:()=>Df,ZodTemplateLiteral:()=>rm,ZodTransform:()=>Bf,ZodTuple:()=>Ff,ZodType:()=>ee,ZodULID:()=>gs,ZodURL:()=>so,ZodUUID:()=>Qt,ZodUndefined:()=>_f,ZodUnion:()=>po,ZodUnknown:()=>kf,ZodVoid:()=>Of,ZodXID:()=>ys,ZodXor:()=>Rf,_ZodString:()=>ls,_default:()=>qf,_function:()=>Hv,any:()=>kv,array:()=>co,base64:()=>lv,base64url:()=>dv,bigint:()=>Dv,boolean:()=>xf,catch:()=>Qf,check:()=>Jv,cidrv4:()=>uv,cidrv6:()=>cv,clone:()=>tt,codec:()=>Wv,coerce:()=>dm,config:()=>$e,core:()=>hn,cuid:()=>ev,cuid2:()=>tv,custom:()=>Kv,date:()=>Ov,decode:()=>pf,decodeAsync:()=>mf,describe:()=>Yv,discriminatedUnion:()=>Pv,e164:()=>pv,email:()=>Zy,emoji:()=>Xy,encode:()=>df,encodeAsync:()=>ff,endsWith:()=>Xr,enum:()=>Rs,exactOptional:()=>Zf,file:()=>Mv,flattenError:()=>Zi,float32:()=>vv,float64:()=>bv,formatError:()=>Wi,fromJSONSchema:()=>ib,function:()=>Hv,getErrorMap:()=>K0,globalRegistry:()=>qe,gt:()=>Yt,gte:()=>nt,guid:()=>Wy,hash:()=>yv,hex:()=>gv,hostname:()=>hv,httpUrl:()=>Yy,includes:()=>Kr,instanceof:()=>Qv,int:()=>cs,int32:()=>Sv,int64:()=>_v,intersection:()=>Pf,ipv4:()=>ov,ipv6:()=>sv,iso:()=>si,json:()=>tb,jwt:()=>fv,keyof:()=>Cv,ksuid:()=>iv,lazy:()=>om,length:()=>rr,literal:()=>Lv,locales:()=>Qi,looseObject:()=>Av,looseRecord:()=>jv,lowercase:()=>Hr,lt:()=>Kt,lte:()=>mt,mac:()=>av,map:()=>zv,maxLength:()=>nr,maxSize:()=>Cn,meta:()=>Xv,mime:()=>Qr,minLength:()=>mn,minSize:()=>Xt,multipleOf:()=>On,nan:()=>Zv,nanoid:()=>Qy,nativeEnum:()=>Uv,negative:()=>Ja,never:()=>Is,nonnegative:()=>Ya,nonoptional:()=>Kf,nonpositive:()=>Ka,normalize:()=>ei,null:()=>wf,nullable:()=>oo,nullish:()=>Bv,number:()=>Sf,object:()=>Os,optional:()=>io,overwrite:()=>Ut,parse:()=>sf,parseAsync:()=>uf,partialRecord:()=>Fv,pipe:()=>ao,positive:()=>Ha,prefault:()=>Jf,preprocess:()=>nb,prettifyError:()=>wc,promise:()=>qv,property:()=>Xa,readonly:()=>nm,record:()=>zf,refine:()=>um,regex:()=>qr,regexes:()=>$t,registry:()=>ka,safeDecode:()=>gf,safeDecodeAsync:()=>vf,safeEncode:()=>hf,safeEncodeAsync:()=>yf,safeParse:()=>cf,safeParseAsync:()=>lf,set:()=>Nv,setErrorMap:()=>J0,size:()=>tr,slugify:()=>ii,startsWith:()=>Yr,strictObject:()=>Rv,string:()=>ui,stringFormat:()=>mv,stringbool:()=>eb,success:()=>Vv,superRefine:()=>cm,symbol:()=>wv,templateLiteral:()=>Gv,toJSONSchema:()=>ns,toLowerCase:()=>ni,toUpperCase:()=>ri,transform:()=>As,treeifyError:()=>Ec,trim:()=>ti,tuple:()=>jf,uint32:()=>xv,uint64:()=>Ev,ulid:()=>nv,undefined:()=>$v,union:()=>Cs,unknown:()=>ir,uppercase:()=>Jr,url:()=>Ky,util:()=>k,uuid:()=>Gy,uuidv4:()=>qy,uuidv6:()=>Hy,uuidv7:()=>Jy,void:()=>Iv,xid:()=>rv,xor:()=>Tv});var hn={};b(hn,{$ZodAny:()=>Ql,$ZodArray:()=>id,$ZodAsyncError:()=>Nt,$ZodBase64:()=>Vl,$ZodBase64URL:()=>Zl,$ZodBigInt:()=>Sa,$ZodBigIntFormat:()=>Jl,$ZodBoolean:()=>Ji,$ZodCIDRv4:()=>Ll,$ZodCIDRv6:()=>Ml,$ZodCUID:()=>Il,$ZodCUID2:()=>Ol,$ZodCatch:()=>Dd,$ZodCheck:()=>ye,$ZodCheckBigIntFormat:()=>il,$ZodCheckEndsWith:()=>gl,$ZodCheckGreaterThan:()=>fa,$ZodCheckIncludes:()=>ml,$ZodCheckLengthEquals:()=>ll,$ZodCheckLessThan:()=>pa,$ZodCheckLowerCase:()=>pl,$ZodCheckMaxLength:()=>ul,$ZodCheckMaxSize:()=>ol,$ZodCheckMimeType:()=>vl,$ZodCheckMinLength:()=>cl,$ZodCheckMinSize:()=>al,$ZodCheckMultipleOf:()=>nl,$ZodCheckNumberFormat:()=>rl,$ZodCheckOverwrite:()=>bl,$ZodCheckProperty:()=>yl,$ZodCheckRegex:()=>dl,$ZodCheckSizeEquals:()=>sl,$ZodCheckStartsWith:()=>hl,$ZodCheckStringFormat:()=>Wr,$ZodCheckUpperCase:()=>fl,$ZodCodec:()=>Yi,$ZodCustom:()=>Cd,$ZodCustomStringFormat:()=>ql,$ZodDate:()=>rd,$ZodDefault:()=>vd,$ZodDiscriminatedUnion:()=>sd,$ZodE164:()=>Wl,$ZodEmail:()=>El,$ZodEmoji:()=>$l,$ZodEncodeError:()=>En,$ZodEnum:()=>pd,$ZodError:()=>Vi,$ZodExactOptional:()=>gd,$ZodFile:()=>md,$ZodFunction:()=>kd,$ZodGUID:()=>Dl,$ZodIPv4:()=>zl,$ZodIPv6:()=>Nl,$ZodISODate:()=>Pl,$ZodISODateTime:()=>Tl,$ZodISODuration:()=>jl,$ZodISOTime:()=>Fl,$ZodIntersection:()=>ud,$ZodJWT:()=>Gl,$ZodKSUID:()=>Al,$ZodLazy:()=>Od,$ZodLiteral:()=>fd,$ZodMAC:()=>Ul,$ZodMap:()=>ld,$ZodNaN:()=>_d,$ZodNanoID:()=>kl,$ZodNever:()=>td,$ZodNonOptional:()=>Sd,$ZodNull:()=>Xl,$ZodNullable:()=>yd,$ZodNumber:()=>ba,$ZodNumberFormat:()=>Hl,$ZodObject:()=>Vg,$ZodObjectJIT:()=>od,$ZodOptional:()=>Da,$ZodPipe:()=>Ed,$ZodPrefault:()=>bd,$ZodPromise:()=>Id,$ZodReadonly:()=>wd,$ZodRealError:()=>ct,$ZodRecord:()=>cd,$ZodRegistry:()=>$a,$ZodSet:()=>dd,$ZodString:()=>er,$ZodStringFormat:()=>he,$ZodSuccess:()=>xd,$ZodSymbol:()=>Kl,$ZodTemplateLiteral:()=>$d,$ZodTransform:()=>hd,$ZodTuple:()=>xa,$ZodType:()=>X,$ZodULID:()=>Cl,$ZodURL:()=>wl,$ZodUUID:()=>_l,$ZodUndefined:()=>Yl,$ZodUnion:()=>Ki,$ZodUnknown:()=>ed,$ZodVoid:()=>nd,$ZodXID:()=>Rl,$ZodXor:()=>ad,$brand:()=>Yo,$constructor:()=>y,$input:()=>Ad,$output:()=>Rd,Doc:()=>Hi,JSONSchema:()=>By,JSONSchemaGenerator:()=>rs,NEVER:()=>fc,TimePrecision:()=>jd,_any:()=>rp,_array:()=>lp,_base64:()=>Za,_base64url:()=>Wa,_bigint:()=>Kd,_boolean:()=>Hd,_catch:()=>N0,_check:()=>My,_cidrv4:()=>Ba,_cidrv6:()=>Va,_coercedBigint:()=>Yd,_coercedBoolean:()=>Jd,_coercedDate:()=>up,_coercedNumber:()=>Bd,_coercedString:()=>Pd,_cuid:()=>Fa,_cuid2:()=>ja,_custom:()=>pp,_date:()=>sp,_decode:()=>ra,_decodeAsync:()=>oa,_default:()=>F0,_discriminatedUnion:()=>_0,_e164:()=>Ga,_email:()=>Ia,_emoji:()=>Ta,_encode:()=>na,_encodeAsync:()=>ia,_endsWith:()=>Xr,_enum:()=>O0,_file:()=>dp,_float32:()=>Zd,_float64:()=>Wd,_gt:()=>Yt,_gte:()=>nt,_guid:()=>eo,_includes:()=>Kr,_int:()=>Vd,_int32:()=>Gd,_int64:()=>Xd,_intersection:()=>E0,_ipv4:()=>La,_ipv6:()=>Ma,_isoDate:()=>Nd,_isoDateTime:()=>zd,_isoDuration:()=>Ld,_isoTime:()=>Ud,_jwt:()=>qa,_ksuid:()=>Ua,_lazy:()=>B0,_length:()=>rr,_literal:()=>R0,_lowercase:()=>Hr,_lt:()=>Kt,_lte:()=>mt,_mac:()=>Fd,_map:()=>k0,_max:()=>mt,_maxLength:()=>nr,_maxSize:()=>Cn,_mime:()=>Qr,_min:()=>nt,_minLength:()=>mn,_minSize:()=>Xt,_multipleOf:()=>On,_nan:()=>cp,_nanoid:()=>Pa,_nativeEnum:()=>C0,_negative:()=>Ja,_never:()=>op,_nonnegative:()=>Ya,_nonoptional:()=>j0,_nonpositive:()=>Ka,_normalize:()=>ei,_null:()=>np,_nullable:()=>P0,_number:()=>Md,_optional:()=>T0,_overwrite:()=>Ut,_parse:()=>Mr,_parseAsync:()=>Br,_pipe:()=>U0,_positive:()=>Ha,_promise:()=>V0,_property:()=>Xa,_readonly:()=>L0,_record:()=>$0,_refine:()=>fp,_regex:()=>qr,_safeDecode:()=>sa,_safeDecodeAsync:()=>ca,_safeEncode:()=>aa,_safeEncodeAsync:()=>ua,_safeParse:()=>Vr,_safeParseAsync:()=>Zr,_set:()=>I0,_size:()=>tr,_slugify:()=>ii,_startsWith:()=>Yr,_string:()=>Td,_stringFormat:()=>oi,_stringbool:()=>yp,_success:()=>z0,_superRefine:()=>mp,_symbol:()=>ep,_templateLiteral:()=>M0,_toLowerCase:()=>ni,_toUpperCase:()=>ri,_transform:()=>A0,_trim:()=>ti,_tuple:()=>w0,_uint32:()=>qd,_uint64:()=>Qd,_ulid:()=>za,_undefined:()=>tp,_union:()=>x0,_unknown:()=>ip,_uppercase:()=>Jr,_url:()=>to,_uuid:()=>Oa,_uuidv4:()=>Ca,_uuidv6:()=>Ra,_uuidv7:()=>Aa,_void:()=>ap,_xid:()=>Na,_xor:()=>D0,clone:()=>tt,config:()=>$e,createStandardJSONSchemaMethod:()=>ai,createToJSONSchemaMethod:()=>vp,decode:()=>G$,decodeAsync:()=>H$,describe:()=>hp,encode:()=>W$,encodeAsync:()=>q$,extractDefs:()=>An,finalize:()=>Tn,flattenError:()=>Zi,formatError:()=>Wi,globalConfig:()=>ji,globalRegistry:()=>qe,initializeContext:()=>Rn,isValidBase64:()=>Bl,isValidBase64URL:()=>Ug,isValidJWT:()=>Lg,locales:()=>Qi,meta:()=>gp,parse:()=>ea,parseAsync:()=>ta,prettifyError:()=>wc,process:()=>le,regexes:()=>$t,registry:()=>ka,safeDecode:()=>K$,safeDecodeAsync:()=>X$,safeEncode:()=>J$,safeEncodeAsync:()=>Y$,safeParse:()=>$c,safeParseAsync:()=>kc,toDotPath:()=>xg,toJSONSchema:()=>ns,treeifyError:()=>Ec,util:()=>k,version:()=>Sl});var fc=Object.freeze({status:"aborted"});function y(e,t,r){function i(u,c){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:false}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,c);let l=a.prototype,d=Object.keys(l);for(let p=0;p<d.length;p++){let m=d[p];m in u||(u[m]=l[m].bind(u));}}let n=r?.Parent??Object;class o extends n{}Object.defineProperty(o,"name",{value:e});function a(u){var c;let l=r?.Parent?new o:this;i(l,u),(c=l._zod).deferred??(c.deferred=[]);for(let d of l._zod.deferred)d();return l}return Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:u=>r?.Parent&&u instanceof r.Parent?true:u?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var Yo=Symbol("zod_brand"),Nt=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");}},En=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError";}},ji={};function $e(e){return e&&Object.assign(ji,e),ji}var k={};b(k,{BIGINT_FORMAT_RANGES:()=>_c,Class:()=>hc,NUMBER_FORMAT_RANGES:()=>Dc,aborted:()=>In,allowsEval:()=>vc,assert:()=>_$,assertEqual:()=>b$,assertIs:()=>x$,assertNever:()=>D$,assertNotEqual:()=>S$,assignProp:()=>$n,base64ToUint8Array:()=>vg,base64urlToUint8Array:()=>L$,cached:()=>Ur,captureStackTrace:()=>Qo,cleanEnum:()=>U$,cleanRegex:()=>Ui,clone:()=>tt,cloneDef:()=>w$,createTransparentProxy:()=>R$,defineLazy:()=>re,esc:()=>Xo,escapeRegex:()=>wt,extend:()=>P$,finalizeIssue:()=>ut,floatSafeRemainder:()=>gc,getElementAtPath:()=>$$,getEnumValues:()=>Ni,getLengthableOrigin:()=>Bi,getParsedType:()=>C$,getSizableOrigin:()=>Mi,hexToUint8Array:()=>B$,isObject:()=>Xn,isPlainObject:()=>kn,issue:()=>Lr,joinValues:()=>_,jsonStringifyReplacer:()=>Nr,merge:()=>j$,mergeDefs:()=>fn,normalizeParams:()=>C,nullish:()=>wn,numKeys:()=>O$,objectClone:()=>E$,omit:()=>T$,optionalKeys:()=>xc,parsedType:()=>$,partial:()=>z$,pick:()=>A$,prefixIssues:()=>ft,primitiveTypes:()=>Sc,promiseAllObject:()=>k$,propertyKeyTypes:()=>Li,randomString:()=>I$,required:()=>N$,safeExtend:()=>F$,shallowClone:()=>bc,slugify:()=>yc,stringifyPrimitive:()=>w,uint8ArrayToBase64:()=>bg,uint8ArrayToBase64url:()=>M$,uint8ArrayToHex:()=>V$,unwrapMessage:()=>zi});function b$(e){return e}function S$(e){return e}function x$(e){}function D$(e){throw new Error("Unexpected value in exhaustive check")}function _$(e){}function Ni(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,n])=>t.indexOf(+i)===-1).map(([i,n])=>n)}function _(e,t="|"){return e.map(r=>w(r)).join(t)}function Nr(e,t){return typeof t=="bigint"?t.toString():t}function Ur(e){return {get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}}}}function wn(e){return e==null}function Ui(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function gc(e,t){let r=(e.toString().split(".")[1]||"").length,i=t.toString(),n=(i.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(i)){let c=i.match(/\d?e-(\d?)/);c?.[1]&&(n=Number.parseInt(c[1]));}let o=r>n?r:n,a=Number.parseInt(e.toFixed(o).replace(".","")),u=Number.parseInt(t.toFixed(o).replace(".",""));return a%u/10**o}var yg=Symbol("evaluating");function re(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==yg)return i===void 0&&(i=yg,i=r()),i},set(n){Object.defineProperty(e,t,{value:n});},configurable:true});}function E$(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function $n(e,t,r){Object.defineProperty(e,t,{value:r,writable:true,enumerable:true,configurable:true});}function fn(...e){let t={};for(let r of e){let i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i);}return Object.defineProperties({},t)}function w$(e){return fn(e._zod.def)}function $$(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}function k$(e){let t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{let n={};for(let o=0;o<t.length;o++)n[t[o]]=i[o];return n})}function I$(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}function Xo(e){return JSON.stringify(e)}function yc(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Qo="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Xn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var vc=Ur(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return false;try{let e=Function;return new e(""),!0}catch{return false}});function kn(e){if(Xn(e)===false)return false;let t=e.constructor;if(t===void 0||typeof t!="function")return true;let r=t.prototype;return !(Xn(r)===false||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===false)}function bc(e){return kn(e)?{...e}:Array.isArray(e)?[...e]:e}function O$(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var C$=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}`)}},Li=new Set(["string","number","symbol"]),Sc=new Set(["string","number","bigint","boolean","symbol","undefined"]);function wt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function tt(e,t,r){let i=new e._zod.constr(t??e._zod.def);return (!t||r?.parent)&&(i._zod.parent=e),i}function C(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 R$(e){let t;return new Proxy({},{get(r,i,n){return t??(t=e()),Reflect.get(t,i,n)},set(r,i,n,o){return t??(t=e()),Reflect.set(t,i,n,o)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,n){return t??(t=e()),Reflect.defineProperty(t,i,n)}})}function w(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function xc(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var Dc={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]},_c={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function A$(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=fn(e._zod.def,{get shape(){let a={};for(let u in t){if(!(u in r.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(a[u]=r.shape[u]);}return $n(this,"shape",a),a},checks:[]});return tt(e,o)}function T$(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=fn(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let u in t){if(!(u in r.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete a[u];}return $n(this,"shape",a),a},checks:[]});return tt(e,o)}function P$(e,t){if(!kn(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.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 n=fn(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return $n(this,"shape",o),o}});return tt(e,n)}function F$(e,t){if(!kn(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=fn(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return $n(this,"shape",i),i}});return tt(e,r)}function j$(e,t){let r=fn(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return $n(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return tt(e,r)}function z$(e,t,r){let n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=fn(t._zod.def,{get shape(){let u=t._zod.def.shape,c={...u};if(r)for(let l in r){if(!(l in u))throw new Error(`Unrecognized key: "${l}"`);r[l]&&(c[l]=e?new e({type:"optional",innerType:u[l]}):u[l]);}else for(let l in u)c[l]=e?new e({type:"optional",innerType:u[l]}):u[l];return $n(this,"shape",c),c},checks:[]});return tt(t,a)}function N$(e,t,r){let i=fn(t._zod.def,{get shape(){let n=t._zod.def.shape,o={...n};if(r)for(let a in r){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(o[a]=new e({type:"nonoptional",innerType:n[a]}));}else for(let a in n)o[a]=new e({type:"nonoptional",innerType:n[a]});return $n(this,"shape",o),o}});return tt(t,i)}function In(e,t=0){if(e.aborted===true)return true;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==true)return true;return false}function ft(e,t){return t.map(r=>{var i;return (i=r).path??(i.path=[]),r.path.unshift(e),r})}function zi(e){return typeof e=="string"?e:e?.message}function ut(e,t,r){let i={...e,path:e.path??[]};if(!e.message){let n=zi(e.inst?._zod.def?.error?.(e))??zi(t?.error?.(e))??zi(r.customError?.(e))??zi(r.localeError?.(e))??"Invalid input";i.message=n;}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function Mi(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Bi(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function $(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 r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function Lr(...e){let[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function U$(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function vg(e){let t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function bg(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function L$(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return vg(t+r)}function M$(e){return bg(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function B$(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}function V$(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var hc=class{constructor(...t){}};var Sg=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:false}),Object.defineProperty(e,"issues",{value:t,enumerable:false}),e.message=JSON.stringify(t,Nr,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:false});},Vi=y("$ZodError",Sg),ct=y("$ZodError",Sg,{Parent:Error});function Zi(e,t=r=>r.message){let r={},i=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return {formErrors:i,fieldErrors:r}}function Wi(e,t=r=>r.message){let r={_errors:[]},i=n=>{for(let o of n.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(a=>i({issues:a}));else if(o.code==="invalid_key")i({issues:o.issues});else if(o.code==="invalid_element")i({issues:o.issues});else if(o.path.length===0)r._errors.push(t(o));else {let a=r,u=0;for(;u<o.path.length;){let c=o.path[u];u===o.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(t(o))):a[c]=a[c]||{_errors:[]},a=a[c],u++;}}};return i(e),r}function Ec(e,t=r=>r.message){let r={errors:[]},i=(n,o=[])=>{var a,u;for(let c of n.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>i({issues:l},c.path));else if(c.code==="invalid_key")i({issues:c.issues},c.path);else if(c.code==="invalid_element")i({issues:c.issues},c.path);else {let l=[...o,...c.path];if(l.length===0){r.errors.push(t(c));continue}let d=r,p=0;for(;p<l.length;){let m=l[p],h=p===l.length-1;typeof m=="string"?(d.properties??(d.properties={}),(a=d.properties)[m]??(a[m]={errors:[]}),d=d.properties[m]):(d.items??(d.items=[]),(u=d.items)[m]??(u[m]={errors:[]}),d=d.items[m]),h&&d.errors.push(t(c)),p++;}}};return i(e),r}function xg(e){let t=[],r=e.map(i=>typeof i=="object"?i.key:i);for(let i of r)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 wc(e){let t=[],r=[...e.issues].sort((i,n)=>(i.path??[]).length-(n.path??[]).length);for(let i of r)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${xg(i.path)}`);return t.join(`
6
+ `)}var Mr=e=>(t,r,i,n)=>{let o=i?Object.assign(i,{async:false}):{async:false},a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new Nt;if(a.issues.length){let u=new(n?.Err??e)(a.issues.map(c=>ut(c,o,$e())));throw Qo(u,n?.callee),u}return a.value},ea=Mr(ct),Br=e=>async(t,r,i,n)=>{let o=i?Object.assign(i,{async:true}):{async:true},a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let u=new(n?.Err??e)(a.issues.map(c=>ut(c,o,$e())));throw Qo(u,n?.callee),u}return a.value},ta=Br(ct),Vr=e=>(t,r,i)=>{let n=i?{...i,async:false}:{async:false},o=t._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new Nt;return o.issues.length?{success:false,error:new(e??Vi)(o.issues.map(a=>ut(a,n,$e())))}:{success:true,data:o.value}},$c=Vr(ct),Zr=e=>async(t,r,i)=>{let n=i?Object.assign(i,{async:true}):{async:true},o=t._zod.run({value:r,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length?{success:false,error:new e(o.issues.map(a=>ut(a,n,$e())))}:{success:true,data:o.value}},kc=Zr(ct),na=e=>(t,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Mr(e)(t,r,n)},W$=na(ct),ra=e=>(t,r,i)=>Mr(e)(t,r,i),G$=ra(ct),ia=e=>async(t,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Br(e)(t,r,n)},q$=ia(ct),oa=e=>async(t,r,i)=>Br(e)(t,r,i),H$=oa(ct),aa=e=>(t,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Vr(e)(t,r,n)},J$=aa(ct),sa=e=>(t,r,i)=>Vr(e)(t,r,i),K$=sa(ct),ua=e=>async(t,r,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Zr(e)(t,r,n)},Y$=ua(ct),ca=e=>async(t,r,i)=>Zr(e)(t,r,i),X$=ca(ct);var $t={};b($t,{base64:()=>Vc,base64url:()=>la,bigint:()=>Jc,boolean:()=>Yc,browserEmail:()=>ak,cidrv4:()=>Mc,cidrv6:()=>Bc,cuid:()=>Ic,cuid2:()=>Oc,date:()=>Wc,datetime:()=>qc,domain:()=>ck,duration:()=>Pc,e164:()=>Zc,email:()=>jc,emoji:()=>zc,extendedDuration:()=>Q$,guid:()=>Fc,hex:()=>lk,hostname:()=>uk,html5Email:()=>rk,idnEmail:()=>ok,integer:()=>Kc,ipv4:()=>Nc,ipv6:()=>Uc,ksuid:()=>Ac,lowercase:()=>el,mac:()=>Lc,md5_base64:()=>pk,md5_base64url:()=>fk,md5_hex:()=>dk,nanoid:()=>Tc,null:()=>Xc,number:()=>da,rfc5322Email:()=>ik,sha1_base64:()=>hk,sha1_base64url:()=>gk,sha1_hex:()=>mk,sha256_base64:()=>vk,sha256_base64url:()=>bk,sha256_hex:()=>yk,sha384_base64:()=>xk,sha384_base64url:()=>Dk,sha384_hex:()=>Sk,sha512_base64:()=>Ek,sha512_base64url:()=>wk,sha512_hex:()=>_k,string:()=>Hc,time:()=>Gc,ulid:()=>Cc,undefined:()=>Qc,unicodeEmail:()=>Dg,uppercase:()=>tl,uuid:()=>Qn,uuid4:()=>ek,uuid6:()=>tk,uuid7:()=>nk,xid:()=>Rc});var Ic=/^[cC][^\s-]{8,}$/,Oc=/^[0-9a-z]+$/,Cc=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Rc=/^[0-9a-vA-V]{20}$/,Ac=/^[A-Za-z0-9]{27}$/,Tc=/^[a-zA-Z0-9_-]{21}$/,Pc=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Q$=/^[-+]?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)?)??$/,Fc=/^([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})$/,Qn=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)$/,ek=Qn(4),tk=Qn(6),nk=Qn(7),jc=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,rk=/^[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])?)*$/,ik=/^(([^<>()\[\]\\.,;:\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,}))$/,Dg=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,ok=Dg,ak=/^[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])?)*$/,sk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function zc(){return new RegExp(sk,"u")}var Nc=/^(?:(?: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])$/,Uc=/^(([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}|:))$/,Lc=e=>{let t=wt(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Mc=/^((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])$/,Bc=/^(([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])$/,Vc=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,la=/^[A-Za-z0-9_-]*$/,uk=/^(?=.{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])?)*\.?$/,ck=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Zc=/^\+[1-9]\d{6,14}$/,_g="(?:(?:\\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])))",Wc=new RegExp(`^${_g}$`);function Eg(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 Gc(e){return new RegExp(`^${Eg(e)}$`)}function qc(e){let t=Eg({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${r.join("|")})`;return new RegExp(`^${_g}T(?:${i})$`)}var Hc=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Jc=/^-?\d+n?$/,Kc=/^-?\d+$/,da=/^-?\d+(?:\.\d+)?$/,Yc=/^(?:true|false)$/i,Xc=/^null$/i;var Qc=/^undefined$/i;var el=/^[^A-Z]*$/,tl=/^[^a-z]*$/,lk=/^[0-9a-fA-F]*$/;function Gi(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function qi(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var dk=/^[0-9a-fA-F]{32}$/,pk=Gi(22,"=="),fk=qi(22),mk=/^[0-9a-fA-F]{40}$/,hk=Gi(27,"="),gk=qi(27),yk=/^[0-9a-fA-F]{64}$/,vk=Gi(43,"="),bk=qi(43),Sk=/^[0-9a-fA-F]{96}$/,xk=Gi(64,""),Dk=qi(64),_k=/^[0-9a-fA-F]{128}$/,Ek=Gi(86,"=="),wk=qi(86);var ye=y("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[]);}),$g={number:"number",bigint:"bigint",object:"date"},pa=y("$ZodCheckLessThan",(e,t)=>{ye.init(e,t);let r=$g[typeof t.value];e._zod.onattach.push(i=>{let n=i._zod.bag,o=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value);}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort});};}),fa=y("$ZodCheckGreaterThan",(e,t)=>{ye.init(e,t);let r=$g[typeof t.value];e._zod.onattach.push(i=>{let n=i._zod.bag,o=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value);}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort});};}),nl=y("$ZodCheckMultipleOf",(e,t)=>{ye.init(e,t),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=t.value);}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):gc(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort});};}),rl=y("$ZodCheckNumberFormat",(e,t)=>{ye.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[n,o]=Dc[t.format];e._zod.onattach.push(a=>{let u=a._zod.bag;u.format=t.format,u.minimum=n,u.maximum=o,r&&(u.pattern=Kc);}),e._zod.check=a=>{let u=a.value;if(r){if(!Number.isInteger(u)){a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:false,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?a.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:true,continue:!t.abort}):a.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:true,continue:!t.abort});return}}u<n&&a.issues.push({origin:"number",input:u,code:"too_small",minimum:n,inclusive:true,inst:e,continue:!t.abort}),u>o&&a.issues.push({origin:"number",input:u,code:"too_big",maximum:o,inclusive:true,inst:e,continue:!t.abort});};}),il=y("$ZodCheckBigIntFormat",(e,t)=>{ye.init(e,t);let[r,i]=_c[t.format];e._zod.onattach.push(n=>{let o=n._zod.bag;o.format=t.format,o.minimum=r,o.maximum=i;}),e._zod.check=n=>{let o=n.value;o<r&&n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:true,inst:e,continue:!t.abort}),o>i&&n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:true,inst:e,continue:!t.abort});};}),ol=y("$ZodCheckMaxSize",(e,t)=>{var r;ye.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return !wn(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum);}),e._zod.check=i=>{let n=i.value;n.size<=t.maximum||i.issues.push({origin:Mi(n),code:"too_big",maximum:t.maximum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),al=y("$ZodCheckMinSize",(e,t)=>{var r;ye.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return !wn(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum);}),e._zod.check=i=>{let n=i.value;n.size>=t.minimum||i.issues.push({origin:Mi(n),code:"too_small",minimum:t.minimum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),sl=y("$ZodCheckSizeEquals",(e,t)=>{var r;ye.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return !wn(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size;}),e._zod.check=i=>{let n=i.value,o=n.size;if(o===t.size)return;let a=o>t.size;i.issues.push({origin:Mi(n),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:true,exact:true,input:i.value,inst:e,continue:!t.abort});};}),ul=y("$ZodCheckMaxLength",(e,t)=>{var r;ye.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return !wn(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum);}),e._zod.check=i=>{let n=i.value;if(n.length<=t.maximum)return;let a=Bi(n);i.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),cl=y("$ZodCheckMinLength",(e,t)=>{var r;ye.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return !wn(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum);}),e._zod.check=i=>{let n=i.value;if(n.length>=t.minimum)return;let a=Bi(n);i.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:true,input:n,inst:e,continue:!t.abort});};}),ll=y("$ZodCheckLengthEquals",(e,t)=>{var r;ye.init(e,t),(r=e._zod.def).when??(r.when=i=>{let n=i.value;return !wn(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{let n=i._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length;}),e._zod.check=i=>{let n=i.value,o=n.length;if(o===t.length)return;let a=Bi(n),u=o>t.length;i.issues.push({origin:a,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:true,exact:true,input:i.value,inst:e,continue:!t.abort});};}),Wr=y("$ZodCheckStringFormat",(e,t)=>{var r,i;ye.init(e,t),e._zod.onattach.push(n=>{let o=n._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern));}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort});}):(i=e._zod).check??(i.check=()=>{});}),dl=y("$ZodCheckRegex",(e,t)=>{Wr.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort});};}),pl=y("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=el),Wr.init(e,t);}),fl=y("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=tl),Wr.init(e,t);}),ml=y("$ZodCheckIncludes",(e,t)=>{ye.init(e,t);let r=wt(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i);}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort});};}),hl=y("$ZodCheckStartsWith",(e,t)=>{ye.init(e,t);let r=new RegExp(`^${wt(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{let n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r);}),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});};}),gl=y("$ZodCheckEndsWith",(e,t)=>{ye.init(e,t);let r=new RegExp(`.*${wt(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{let n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r);}),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 wg(e,t,r){e.issues.length&&t.issues.push(...ft(r,e.issues));}var yl=y("$ZodCheckProperty",(e,t)=>{ye.init(e,t),e._zod.check=r=>{let i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>wg(n,r,t.property));wg(i,r,t.property);};}),vl=y("$ZodCheckMimeType",(e,t)=>{ye.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime;}),e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort});};}),bl=y("$ZodCheckOverwrite",(e,t)=>{ye.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value);};});var Hi=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(`
7
+ `).filter(a=>a),n=Math.min(...i.map(a=>a.length-a.trimStart().length)),o=i.map(a=>a.slice(n)).map(a=>" ".repeat(this.indent*2)+a);for(let a of o)this.content.push(a);}compile(){let t=Function,r=this?.args,n=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...r,n.join(`
8
+ `))}};var Sl={major:4,minor:3,patch:6};var X=y("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Sl;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let n of i)for(let o of n._zod.onattach)o(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse;});else {let n=(a,u,c)=>{let l=In(a),d;for(let p of u){if(p._zod.def.when){if(!p._zod.def.when(a))continue}else if(l)continue;let m=a.issues.length,h=p._zod.check(a);if(h instanceof Promise&&c?.async===false)throw new Nt;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,a.issues.length!==m&&(l||(l=In(a,m)));});else {if(a.issues.length===m)continue;l||(l=In(a,m));}}return d?d.then(()=>a):a},o=(a,u,c)=>{if(In(a))return a.aborted=true,a;let l=n(u,i,c);if(l instanceof Promise){if(c.async===false)throw new Nt;return l.then(d=>e._zod.parse(d,c))}return e._zod.parse(l,c)};e._zod.run=(a,u)=>{if(u.skipChecks)return e._zod.parse(a,u);if(u.direction==="backward"){let l=e._zod.parse({value:a.value,issues:[]},{...u,skipChecks:true});return l instanceof Promise?l.then(d=>o(d,a,u)):o(l,a,u)}let c=e._zod.parse(a,u);if(c instanceof Promise){if(u.async===false)throw new Nt;return c.then(l=>n(l,i,u))}return n(c,i,u)};}re(e,"~standard",()=>({validate:n=>{try{let o=$c(e,n);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return kc(e,n).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}));}),er=y("$ZodString",(e,t)=>{X.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Hc(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value);}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r};}),he=y("$ZodStringFormat",(e,t)=>{Wr.init(e,t),er.init(e,t);}),Dl=y("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Fc),he.init(e,t);}),_l=y("$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=Qn(i));}else t.pattern??(t.pattern=Qn());he.init(e,t);}),El=y("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=jc),he.init(e,t);}),wl=y("$ZodURL",(e,t)=>{he.init(e,t),e._zod.check=r=>{try{let i=r.value.trim(),n=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});}};}),$l=y("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=zc()),he.init(e,t);}),kl=y("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Tc),he.init(e,t);}),Il=y("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Ic),he.init(e,t);}),Ol=y("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Oc),he.init(e,t);}),Cl=y("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Cc),he.init(e,t);}),Rl=y("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Rc),he.init(e,t);}),Al=y("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Ac),he.init(e,t);}),Tl=y("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=qc(t)),he.init(e,t);}),Pl=y("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Wc),he.init(e,t);}),Fl=y("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Gc(t)),he.init(e,t);}),jl=y("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Pc),he.init(e,t);}),zl=y("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Nc),he.init(e,t),e._zod.bag.format="ipv4";}),Nl=y("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Uc),he.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`);}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort});}};}),Ul=y("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Lc(t.delimiter)),he.init(e,t),e._zod.bag.format="mac";}),Ll=y("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Mc),he.init(e,t);}),Ml=y("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Bc),he.init(e,t),e._zod.check=r=>{let i=r.value.split("/");try{if(i.length!==2)throw new Error;let[n,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://[${n}]`);}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort});}};});function Bl(e){if(e==="")return true;if(e.length%4!==0)return false;try{return atob(e),!0}catch{return false}}var Vl=y("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Vc),he.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Bl(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort});};});function Ug(e){if(!la.test(e))return false;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Bl(r)}var Zl=y("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=la),he.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{Ug(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort});};}),Wl=y("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Zc),he.init(e,t);});function Lg(e,t=null){try{let r=e.split(".");if(r.length!==3)return !1;let[i]=r;if(!i)return !1;let n=JSON.parse(atob(i));return !("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return false}}var Gl=y("$ZodJWT",(e,t)=>{he.init(e,t),e._zod.check=r=>{Lg(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort});};}),ql=y("$ZodCustomStringFormat",(e,t)=>{he.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort});};}),ba=y("$ZodNumber",(e,t)=>{X.init(e,t),e._zod.pattern=e._zod.bag.pattern??da,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value);}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let o=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...o?{received:o}:{}}),r};}),Hl=y("$ZodNumberFormat",(e,t)=>{rl.init(e,t),ba.init(e,t);}),Ji=y("$ZodBoolean",(e,t)=>{X.init(e,t),e._zod.pattern=Yc,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value;}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r};}),Sa=y("$ZodBigInt",(e,t)=>{X.init(e,t),e._zod.pattern=Jc,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value);}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r};}),Jl=y("$ZodBigIntFormat",(e,t)=>{il.init(e,t),Sa.init(e,t);}),Kl=y("$ZodSymbol",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r};}),Yl=y("$ZodUndefined",(e,t)=>{X.init(e,t),e._zod.pattern=Qc,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r};}),Xl=y("$ZodNull",(e,t)=>{X.init(e,t),e._zod.pattern=Xc,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r};}),Ql=y("$ZodAny",(e,t)=>{X.init(e,t),e._zod.parse=r=>r;}),ed=y("$ZodUnknown",(e,t)=>{X.init(e,t),e._zod.parse=r=>r;}),td=y("$ZodNever",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r);}),nd=y("$ZodVoid",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r};}),rd=y("$ZodDate",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value);}catch{}let n=r.value,o=n instanceof Date;return o&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...o?{received:"Invalid Date"}:{},inst:e}),r};});function Ig(e,t,r){e.issues.length&&t.issues.push(...ft(r,e.issues)),t.value[r]=e.value;}var id=y("$ZodArray",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let o=[];for(let a=0;a<n.length;a++){let u=n[a],c=t.element._zod.run({value:u,issues:[]},i);c instanceof Promise?o.push(c.then(l=>Ig(l,r,a))):Ig(c,r,a);}return o.length?Promise.all(o).then(()=>r):r};});function va(e,t,r,i,n){if(e.issues.length){if(n&&!(r in i))return;t.issues.push(...ft(r,e.issues));}e.value===void 0?r in i&&(t.value[r]=void 0):t.value[r]=e.value;}function Mg(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 r=xc(e.shape);return {...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Bg(e,t,r,i,n,o){let a=[],u=n.keySet,c=n.catchall._zod,l=c.def.type,d=c.optout==="optional";for(let p in t){if(u.has(p))continue;if(l==="never"){a.push(p);continue}let m=c.run({value:t[p],issues:[]},i);m instanceof Promise?e.push(m.then(h=>va(h,r,p,t,d))):va(m,r,p,t,d);}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then(()=>r):r}var Vg=y("$ZodObject",(e,t)=>{if(X.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let u=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...u};return Object.defineProperty(t,"shape",{value:c}),c}});}let i=Ur(()=>Mg(t));re(e._zod,"propValues",()=>{let u=t.shape,c={};for(let l in u){let d=u[l]._zod;if(d.values){c[l]??(c[l]=new Set);for(let p of d.values)c[l].add(p);}}return c});let n=Xn,o=t.catchall,a;e._zod.parse=(u,c)=>{a??(a=i.value);let l=u.value;if(!n(l))return u.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),u;u.value={};let d=[],p=a.shape;for(let m of a.keys){let h=p[m],v=h._zod.optout==="optional",D=h._zod.run({value:l[m],issues:[]},c);D instanceof Promise?d.push(D.then(b=>va(b,u,m,l,v))):va(D,u,m,l,v);}return o?Bg(d,l,u,c,i.value,e):d.length?Promise.all(d).then(()=>u):u};}),od=y("$ZodObjectJIT",(e,t)=>{Vg.init(e,t);let r=e._zod.parse,i=Ur(()=>Mg(t)),n=m=>{let h=new Hi(["shape","payload","ctx"]),v=i.value,D=B=>{let A=Xo(B);return `shape[${A}]._zod.run({ value: input[${A}], issues: [] }, ctx)`};h.write("const input = payload.value;");let b=Object.create(null),U=0;for(let B of v.keys)b[B]=`key_${U++}`;h.write("const newResult = {};");for(let B of v.keys){let A=b[B],O=Xo(B),ne=m[B]?._zod?.optout==="optional";h.write(`const ${A} = ${D(B)};`),ne?h.write(`
9
+ if (${A}.issues.length) {
10
+ if (${O} in input) {
11
+ payload.issues = payload.issues.concat(${A}.issues.map(iss => ({
12
+ ...iss,
13
+ path: iss.path ? [${O}, ...iss.path] : [${O}]
14
+ })));
15
+ }
16
+ }
17
+
18
+ if (${A}.value === undefined) {
19
+ if (${O} in input) {
20
+ newResult[${O}] = undefined;
21
+ }
22
+ } else {
23
+ newResult[${O}] = ${A}.value;
24
+ }
25
+
26
+ `):h.write(`
27
+ if (${A}.issues.length) {
28
+ payload.issues = payload.issues.concat(${A}.issues.map(iss => ({
29
+ ...iss,
30
+ path: iss.path ? [${O}, ...iss.path] : [${O}]
31
+ })));
32
+ }
33
+
34
+ if (${A}.value === undefined) {
35
+ if (${O} in input) {
36
+ newResult[${O}] = undefined;
37
+ }
38
+ } else {
39
+ newResult[${O}] = ${A}.value;
40
+ }
41
+
42
+ `);}h.write("payload.value = newResult;"),h.write("return payload;");let H=h.compile();return (B,A)=>H(m,B,A)},o,a=Xn,u=!ji.jitless,l=u&&vc.value,d=t.catchall,p;e._zod.parse=(m,h)=>{p??(p=i.value);let v=m.value;return a(v)?u&&l&&h?.async===false&&h.jitless!==true?(o||(o=n(t.shape)),m=o(m,h),d?Bg([],v,m,h,p,e):m):r(m,h):(m.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),m)};});function Og(e,t,r,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let n=e.filter(o=>!In(o));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(a=>ut(a,i,$e())))}),t)}var Ki=y("$ZodUnion",(e,t)=>{X.init(e,t),re(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),re(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),re(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),re(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){let n=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${n.map(o=>Ui(o.source)).join("|")})$`)}});let r=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(n,o)=>{if(r)return i(n,o);let a=false,u=[];for(let c of t.options){let l=c._zod.run({value:n.value,issues:[]},o);if(l instanceof Promise)u.push(l),a=true;else {if(l.issues.length===0)return l;u.push(l);}}return a?Promise.all(u).then(c=>Og(c,n,e,o)):Og(u,n,e,o)};});function Cg(e,t,r,i){let n=e.filter(o=>o.issues.length===0);return n.length===1?(t.value=n[0].value,t):(n.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(a=>ut(a,i,$e())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:false}),t)}var ad=y("$ZodXor",(e,t)=>{Ki.init(e,t),t.inclusive=false;let r=t.options.length===1,i=t.options[0]._zod.run;e._zod.parse=(n,o)=>{if(r)return i(n,o);let a=false,u=[];for(let c of t.options){let l=c._zod.run({value:n.value,issues:[]},o);l instanceof Promise?(u.push(l),a=true):u.push(l);}return a?Promise.all(u).then(c=>Cg(c,n,e,o)):Cg(u,n,e,o)};}),sd=y("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=false,Ki.init(e,t);let r=e._zod.parse;re(e._zod,"propValues",()=>{let n={};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[u,c]of Object.entries(a)){n[u]||(n[u]=new Set);for(let l of c)n[u].add(l);}}return n});let i=Ur(()=>{let n=t.options,o=new Map;for(let a of n){let u=a._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let c of u){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,a);}}return o});e._zod.parse=(n,o)=>{let a=n.value;if(!Xn(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),n;let u=i.value.get(a?.[t.discriminator]);return u?u._zod.run(n,o):t.unionFallback?r(n,o):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),n)};}),ud=y("$ZodIntersection",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>{let n=r.value,o=t.left._zod.run({value:n,issues:[]},i),a=t.right._zod.run({value:n,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([c,l])=>Rg(r,c,l)):Rg(r,o,a)};});function xl(e,t){if(e===t)return {valid:true,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return {valid:true,data:e};if(kn(e)&&kn(t)){let r=Object.keys(t),i=Object.keys(e).filter(o=>r.indexOf(o)!==-1),n={...e,...t};for(let o of i){let a=xl(e[o],t[o]);if(!a.valid)return {valid:false,mergeErrorPath:[o,...a.mergeErrorPath]};n[o]=a.data;}return {valid:true,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return {valid:false,mergeErrorPath:[]};let r=[];for(let i=0;i<e.length;i++){let n=e[i],o=t[i],a=xl(n,o);if(!a.valid)return {valid:false,mergeErrorPath:[i,...a.mergeErrorPath]};r.push(a.data);}return {valid:true,data:r}}return {valid:false,mergeErrorPath:[]}}function Rg(e,t,r){let i=new Map,n;for(let u of t.issues)if(u.code==="unrecognized_keys"){n??(n=u);for(let c of u.keys)i.has(c)||i.set(c,{}),i.get(c).l=true;}else e.issues.push(u);for(let u of r.issues)if(u.code==="unrecognized_keys")for(let c of u.keys)i.has(c)||i.set(c,{}),i.get(c).r=true;else e.issues.push(u);let o=[...i].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(o.length&&n&&e.issues.push({...n,keys:o}),In(e))return e;let a=xl(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var xa=y("$ZodTuple",(e,t)=>{X.init(e,t);let r=t.items;e._zod.parse=(i,n)=>{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=[],u=[...r].reverse().findIndex(d=>d._zod.optin!=="optional"),c=u===-1?0:r.length-u;if(!t.rest){let d=o.length>r.length,p=o.length<c-1;if(d||p)return i.issues.push({...d?{code:"too_big",maximum:r.length,inclusive:true}:{code:"too_small",minimum:r.length},input:o,inst:e,origin:"array"}),i}let l=-1;for(let d of r){if(l++,l>=o.length&&l>=c)continue;let p=d._zod.run({value:o[l],issues:[]},n);p instanceof Promise?a.push(p.then(m=>ma(m,i,l))):ma(p,i,l);}if(t.rest){let d=o.slice(r.length);for(let p of d){l++;let m=t.rest._zod.run({value:p,issues:[]},n);m instanceof Promise?a.push(m.then(h=>ma(h,i,l))):ma(m,i,l);}}return a.length?Promise.all(a).then(()=>i):i};});function ma(e,t,r){e.issues.length&&t.issues.push(...ft(r,e.issues)),t.value[r]=e.value;}var cd=y("$ZodRecord",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!kn(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let o=[],a=t.keyType._zod.values;if(a){r.value={};let u=new Set;for(let l of a)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){u.add(typeof l=="number"?l.toString():l);let d=t.valueType._zod.run({value:n[l],issues:[]},i);d instanceof Promise?o.push(d.then(p=>{p.issues.length&&r.issues.push(...ft(l,p.issues)),r.value[l]=p.value;})):(d.issues.length&&r.issues.push(...ft(l,d.issues)),r.value[l]=d.value);}let c;for(let l in n)u.has(l)||(c=c??[],c.push(l));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:c});}else {r.value={};for(let u of Reflect.ownKeys(n)){if(u==="__proto__")continue;let c=t.keyType._zod.run({value:u,issues:[]},i);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&da.test(u)&&c.issues.length){let p=t.keyType._zod.run({value:Number(u),issues:[]},i);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(c=p);}if(c.issues.length){t.mode==="loose"?r.value[u]=n[u]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(p=>ut(p,i,$e())),input:u,path:[u],inst:e});continue}let d=t.valueType._zod.run({value:n[u],issues:[]},i);d instanceof Promise?o.push(d.then(p=>{p.issues.length&&r.issues.push(...ft(u,p.issues)),r.value[c.value]=p.value;})):(d.issues.length&&r.issues.push(...ft(u,d.issues)),r.value[c.value]=d.value);}}return o.length?Promise.all(o).then(()=>r):r};}),ld=y("$ZodMap",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let o=[];r.value=new Map;for(let[a,u]of n){let c=t.keyType._zod.run({value:a,issues:[]},i),l=t.valueType._zod.run({value:u,issues:[]},i);c instanceof Promise||l instanceof Promise?o.push(Promise.all([c,l]).then(([d,p])=>{Ag(d,p,r,a,n,e,i);})):Ag(c,l,r,a,n,e,i);}return o.length?Promise.all(o).then(()=>r):r};});function Ag(e,t,r,i,n,o,a){e.issues.length&&(Li.has(typeof i)?r.issues.push(...ft(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:e.issues.map(u=>ut(u,a,$e()))})),t.issues.length&&(Li.has(typeof i)?r.issues.push(...ft(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:t.issues.map(u=>ut(u,a,$e()))})),r.value.set(e.value,t.value);}var dd=y("$ZodSet",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let o=[];r.value=new Set;for(let a of n){let u=t.valueType._zod.run({value:a,issues:[]},i);u instanceof Promise?o.push(u.then(c=>Tg(c,r))):Tg(u,r);}return o.length?Promise.all(o).then(()=>r):r};});function Tg(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value);}var pd=y("$ZodEnum",(e,t)=>{X.init(e,t);let r=Ni(t.entries),i=new Set(r);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.filter(n=>Li.has(typeof n)).map(n=>typeof n=="string"?wt(n):n.toString()).join("|")})$`),e._zod.parse=(n,o)=>{let a=n.value;return i.has(a)||n.issues.push({code:"invalid_value",values:r,input:a,inst:e}),n};}),fd=y("$ZodLiteral",(e,t)=>{if(X.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?wt(i):i?wt(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,n)=>{let o=i.value;return r.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i};}),md=y("$ZodFile",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r};}),hd=y("$ZodTransform",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new En(e.constructor.name);let n=t.transform(r.value,r);if(i.async)return (n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r));if(n instanceof Promise)throw new Nt;return r.value=n,r};});function Pg(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var Da=y("$ZodOptional",(e,t)=>{X.init(e,t),e._zod.optin="optional",e._zod.optout="optional",re(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),re(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ui(r.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(t.innerType._zod.optin==="optional"){let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Pg(o,r.value)):Pg(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,i)};}),gd=y("$ZodExactOptional",(e,t)=>{Da.init(e,t),re(e._zod,"values",()=>t.innerType._zod.values),re(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i);}),yd=y("$ZodNullable",(e,t)=>{X.init(e,t),re(e._zod,"optin",()=>t.innerType._zod.optin),re(e._zod,"optout",()=>t.innerType._zod.optout),re(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ui(r.source)}|null)$`):void 0}),re(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i);}),vd=y("$ZodDefault",(e,t)=>{X.init(e,t),e._zod.optin="optional",re(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Fg(o,t)):Fg(n,t)};});function Fg(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var bd=y("$ZodPrefault",(e,t)=>{X.init(e,t),e._zod.optin="optional",re(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i));}),Sd=y("$ZodNonOptional",(e,t)=>{X.init(e,t),re(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(i=>i!==void 0)):void 0}),e._zod.parse=(r,i)=>{let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>jg(o,e)):jg(n,e)};});function jg(e,t){return !e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var xd=y("$ZodSuccess",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new En("ZodSuccess");let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.issues.length===0,r)):(r.value=n.issues.length===0,r)};}),Dd=y("$ZodCatch",(e,t)=>{X.init(e,t),re(e._zod,"optin",()=>t.innerType._zod.optin),re(e._zod,"optout",()=>t.innerType._zod.optout),re(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(a=>ut(a,i,$e()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(o=>ut(o,i,$e()))},input:r.value}),r.issues=[]),r)};}),_d=y("$ZodNaN",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r);}),Ed=y("$ZodPipe",(e,t)=>{X.init(e,t),re(e._zod,"values",()=>t.in._zod.values),re(e._zod,"optin",()=>t.in._zod.optin),re(e._zod,"optout",()=>t.out._zod.optout),re(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){let o=t.out._zod.run(r,i);return o instanceof Promise?o.then(a=>ha(a,t.in,i)):ha(o,t.in,i)}let n=t.in._zod.run(r,i);return n instanceof Promise?n.then(o=>ha(o,t.out,i)):ha(n,t.out,i)};});function ha(e,t,r){return e.issues.length?(e.aborted=true,e):t._zod.run({value:e.value,issues:e.issues},r)}var Yi=y("$ZodCodec",(e,t)=>{X.init(e,t),re(e._zod,"values",()=>t.in._zod.values),re(e._zod,"optin",()=>t.in._zod.optin),re(e._zod,"optout",()=>t.out._zod.optout),re(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){let o=t.in._zod.run(r,i);return o instanceof Promise?o.then(a=>ga(a,t,i)):ga(o,t,i)}else {let o=t.out._zod.run(r,i);return o instanceof Promise?o.then(a=>ga(a,t,i)):ga(o,t,i)}};});function ga(e,t,r){if(e.issues.length)return e.aborted=true,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(o=>ya(e,o,t.out,r)):ya(e,n,t.out,r)}else {let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(o=>ya(e,o,t.in,r)):ya(e,n,t.in,r)}}function ya(e,t,r,i){return e.issues.length?(e.aborted=true,e):r._zod.run({value:t,issues:e.issues},i)}var wd=y("$ZodReadonly",(e,t)=>{X.init(e,t),re(e._zod,"propValues",()=>t.innerType._zod.propValues),re(e._zod,"values",()=>t.innerType._zod.values),re(e._zod,"optin",()=>t.innerType?._zod?.optin),re(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(zg):zg(n)};});function zg(e){return e.value=Object.freeze(e.value),e}var $d=y("$ZodTemplateLiteral",(e,t)=>{X.init(e,t);let r=[];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 n=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let o=n.startsWith("^")?1:0,a=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(o,a));}else if(i===null||Sc.has(typeof i))r.push(wt(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,n)=>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);}),kd=y("$ZodFunction",(e,t)=>(X.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...i){let n=e._def.input?ea(e._def.input,i):i,o=Reflect.apply(r,this,n);return e._def.output?ea(e._def.output,o):o}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let n=e._def.input?await ta(e._def.input,i):i,o=await Reflect.apply(r,this,n);return e._def.output?await ta(e._def.output,o):o}},e._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let i=e.constructor;return Array.isArray(r[0])?new i({type:"function",input:new xa({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new i({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:r})},e)),Id=y("$ZodPromise",(e,t)=>{X.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},i));}),Od=y("$ZodLazy",(e,t)=>{X.init(e,t),re(e._zod,"innerType",()=>t.getter()),re(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),re(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),re(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),re(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i);}),Cd=y("$ZodCustom",(e,t)=>{ye.init(e,t),X.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{let i=r.value,n=t.fn(i);if(n instanceof Promise)return n.then(o=>Ng(o,r,i,e));Ng(n,r,i,e);};});function Ng(e,t,r,i){if(!e){let n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),t.issues.push(Lr(n));}}var Qi={};b(Qi,{ar:()=>Zg,az:()=>Wg,be:()=>qg,bg:()=>Hg,ca:()=>Jg,cs:()=>Kg,da:()=>Yg,de:()=>Xg,en:()=>_a,eo:()=>Qg,es:()=>ey,fa:()=>ty,fi:()=>ny,fr:()=>ry,frCA:()=>iy,he:()=>oy,hu:()=>ay,hy:()=>uy,id:()=>cy,is:()=>ly,it:()=>dy,ja:()=>py,ka:()=>fy,kh:()=>my,km:()=>Ea,ko:()=>hy,lt:()=>yy,mk:()=>vy,ms:()=>by,nl:()=>Sy,no:()=>xy,ota:()=>Dy,pl:()=>Ey,ps:()=>_y,pt:()=>wy,ru:()=>ky,sl:()=>Iy,sv:()=>Oy,ta:()=>Cy,th:()=>Ry,tr:()=>Ay,ua:()=>Ty,uk:()=>wa,ur:()=>Py,uz:()=>Fy,vi:()=>jy,yo:()=>Uy,zhCN:()=>zy,zhTW:()=>Ny});var kk=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.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 ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${u}`:`\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 ${u}`}case "invalid_value":return n.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 ${w(n.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: ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.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 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${n.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 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${n.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${n.minimum.toString()}`}case "invalid_format":{let o=n;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 "${n.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}`:`${r[o.format]??n.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 ${n.divisor}`;case "unrecognized_keys":return `\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${_(n.keys,"\u060C ")}`;case "invalid_key":return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.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 ${n.origin}`;default:return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function Zg(){return {localeError:kk()}}var Ik=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${u}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${u}`}case "invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${w(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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 ${r[o.format]??n.format}`}case "not_multiple_of":return `Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case "unrecognized_keys":return `Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${_(n.keys,", ")}`;case "invalid_key":return `${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case "invalid_union":return "Yanl\u0131\u015F d\u0259y\u0259r";case "invalid_element":return `${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return "Yanl\u0131\u015F d\u0259y\u0259r"}}};function Wg(){return {localeError:Ik()}}function Gg(e,t,r,i){let n=Math.abs(e),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?r:i}var Ok=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${u}`:`\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 ${u}`}case "invalid_value":return n.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 ${w(n.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 ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);if(a){let u=Number(n.maximum),c=Gg(u,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 ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${n.maximum.toString()} ${c}`}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 ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);if(a){let u=Number(n.minimum),c=Gg(u,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 ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${n.minimum.toString()} ${c}`}return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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 ${r[o.format]??n.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 ${n.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${_(n.keys,", ")}`;case "invalid_key":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.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 ${n.origin}`;default:return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function qg(){return {localeError:Ok()}}var Ck=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${u}`:`\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 ${u}`}case "invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${w(n.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 ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${n.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 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${n.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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} ${r[o.format]??n.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 ${n.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${n.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u043E\u0432\u0435":""}: ${_(n.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${n.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 ${n.origin}`;default:return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function Hg(){return {localeError:Ck()}}var Rk=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${u}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${u}`}case "invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${w(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${_(n.values," o ")}`;case "too_big":{let o=n.inclusive?"com a m\xE0xim":"menys de",a=t(n.origin);return a?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${o} ${n.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${o} ${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(n.origin);return a?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${o} ${n.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${o} ${n.minimum.toString()}`}case "invalid_format":{let o=n;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 ${r[o.format]??n.format}`}case "not_multiple_of":return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case "unrecognized_keys":return `Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${_(n.keys,", ")}`;case "invalid_key":return `Clau inv\xE0lida a ${n.origin}`;case "invalid_union":return "Entrada inv\xE0lida";case "invalid_element":return `Element inv\xE0lid a ${n.origin}`;default:return "Entrada inv\xE0lida"}}};function Jg(){return {localeError:Rk()}}var Ak=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${u}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${u}`}case "invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${w(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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 ${r[o.format]??n.format}`}case "not_multiple_of":return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case "unrecognized_keys":return `Nezn\xE1m\xE9 kl\xED\u010De: ${_(n.keys,", ")}`;case "invalid_key":return `Neplatn\xFD kl\xED\u010D v ${n.origin}`;case "invalid_union":return "Neplatn\xFD vstup";case "invalid_element":return `Neplatn\xE1 hodnota v ${n.origin}`;default:return "Neplatn\xFD vstup"}}};function Kg(){return {localeError:Ak()}}var Tk=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${u}`:`Ugyldigt input: forventede ${o}, fik ${u}`}case "invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${w(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin),u=i[n.origin]??n.origin;return a?`For stor: forventede ${u??"value"} ${a.verb} ${o} ${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${u??"value"} havde ${o} ${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin),u=i[n.origin]??n.origin;return a?`For lille: forventede ${u} ${a.verb} ${o} ${n.minimum.toString()} ${a.unit}`:`For lille: forventede ${u} havde ${o} ${n.minimum.toString()}`}case "invalid_format":{let o=n;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 ${r[o.format]??n.format}`}case "not_multiple_of":return `Ugyldigt tal: skal v\xE6re deleligt med ${n.divisor}`;case "unrecognized_keys":return `${n.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${_(n.keys,", ")}`;case "invalid_key":return `Ugyldig n\xF8gle i ${n.origin}`;case "invalid_union":return "Ugyldigt input: matcher ingen af de tilladte typer";case "invalid_element":return `Ugyldig v\xE6rdi i ${n.origin}`;default:return "Ugyldigt input"}}};function Yg(){return {localeError:Tk()}}var Pk=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${u}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${u}`}case "invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${w(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ist`}case "invalid_format":{let o=n;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: ${r[o.format]??n.format}`}case "not_multiple_of":return `Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case "unrecognized_keys":return `${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${_(n.keys,", ")}`;case "invalid_key":return `Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case "invalid_union":return "Ung\xFCltige Eingabe";case "invalid_element":return `Ung\xFCltiger Wert in ${n.origin}`;default:return "Ung\xFCltige Eingabe"}}};function Xg(){return {localeError:Pk()}}var Fk=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return `Invalid input: expected ${o}, received ${u}`}case "invalid_value":return n.values.length===1?`Invalid input: expected ${w(n.values[0])}`:`Invalid option: expected one of ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Too big: expected ${n.origin??"value"} to have ${o}${n.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Too small: expected ${n.origin} to have ${o}${n.minimum.toString()} ${a.unit}`:`Too small: expected ${n.origin} to be ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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 ${r[o.format]??n.format}`}case "not_multiple_of":return `Invalid number: must be a multiple of ${n.divisor}`;case "unrecognized_keys":return `Unrecognized key${n.keys.length>1?"s":""}: ${_(n.keys,", ")}`;case "invalid_key":return `Invalid key in ${n.origin}`;case "invalid_union":return "Invalid input";case "invalid_element":return `Invalid value in ${n.origin}`;default:return "Invalid input"}}};function _a(){return {localeError:Fk()}}var jk=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${u}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${u}`}case "invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${w(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${o}${n.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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 ${r[o.format]??n.format}`}case "not_multiple_of":return `Nevalida nombro: devas esti oblo de ${n.divisor}`;case "unrecognized_keys":return `Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${_(n.keys,", ")}`;case "invalid_key":return `Nevalida \u015Dlosilo en ${n.origin}`;case "invalid_union":return "Nevalida enigo";case "invalid_element":return `Nevalida valoro en ${n.origin}`;default:return "Nevalida enigo"}}};function Qg(){return {localeError:jk()}}var zk=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${u}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${u}`}case "invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${w(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin),u=i[n.origin]??n.origin;return a?`Demasiado grande: se esperaba que ${u??"valor"} tuviera ${o}${n.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${u??"valor"} fuera ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin),u=i[n.origin]??n.origin;return a?`Demasiado peque\xF1o: se esperaba que ${u} tuviera ${o}${n.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${u} fuera ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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 ${r[o.format]??n.format}`}case "not_multiple_of":return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case "unrecognized_keys":return `Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${_(n.keys,", ")}`;case "invalid_key":return `Llave inv\xE1lida en ${i[n.origin]??n.origin}`;case "invalid_union":return "Entrada inv\xE1lida";case "invalid_element":return `Valor inv\xE1lido en ${i[n.origin]??n.origin}`;default:return "Entrada inv\xE1lida"}}};function ey(){return {localeError:zk()}}var Nk=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${u} \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 ${u} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case "invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${w(n.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 ${_(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case "invalid_format":{let o=n;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`:`${r[o.format]??n.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 ${n.divisor} \u0628\u0627\u0634\u062F`;case "unrecognized_keys":return `\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${_(n.keys,", ")}`;case "invalid_key":return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.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 ${n.origin}`;default:return "\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function ty(){return {localeError:Nk()}}var Uk=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${u}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${u}`}case "invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${w(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${o}${n.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${o}${n.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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 ${r[o.format]??n.format}`}case "not_multiple_of":return `Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case "unrecognized_keys":return `${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${_(n.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 ny(){return {localeError:Uk()}}var Lk=()=>{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(n){return e[n]??null}let r={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={nan:"NaN",number:"nombre",array:"tableau"};return n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${u} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${u} re\xE7u`}case "invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${w(n.values[0])} attendu`:`Option invalide : une valeur parmi ${_(n.values,"|")} attendue`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Trop grand : ${n.origin??"valeur"} doit ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n.origin??"valeur"} doit \xEAtre ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Trop petit : ${n.origin} doit ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : ${n.origin} doit \xEAtre ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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}`:`${r[o.format]??n.format} invalide`}case "not_multiple_of":return `Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case "unrecognized_keys":return `Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${_(n.keys,", ")}`;case "invalid_key":return `Cl\xE9 invalide dans ${n.origin}`;case "invalid_union":return "Entr\xE9e invalide";case "invalid_element":return `Valeur invalide dans ${n.origin}`;default:return "Entr\xE9e invalide"}}};function ry(){return {localeError:Lk()}}var Mk=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${u}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${u}`}case "invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${w(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"\u2264":"<",a=t(n.origin);return a?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?"\u2265":">",a=t(n.origin);return a?`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${n.origin} soit ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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}`:`${r[o.format]??n.format} invalide`}case "not_multiple_of":return `Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case "unrecognized_keys":return `Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${_(n.keys,", ")}`;case "invalid_key":return `Cl\xE9 invalide dans ${n.origin}`;case "invalid_union":return "Entr\xE9e invalide";case "invalid_element":return `Valeur invalide dans ${n.origin}`;default:return "Entr\xE9e invalide"}}};function iy(){return {localeError:Mk()}}var Bk=()=>{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"}},r=l=>l?e[l]:void 0,i=l=>{let d=r(l);return d?d.label:l??e.unknown.label},n=l=>`\u05D4${i(l)}`,o=l=>(r(l)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=l=>l?t[l]??null:null,u={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"}},c={nan:"NaN"};return l=>{switch(l.code){case "invalid_type":{let d=l.expected,p=c[d??""]??i(d),m=$(l.input),h=c[m]??e[m]?.label??m;return /^[A-Z]/.test(l.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${l.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`}case "invalid_value":{if(l.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 ${w(l.values[0])}`;let d=l.values.map(h=>w(h));if(l.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 ${d[0]} \u05D0\u05D5 ${d[1]}`;let p=d[d.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 ${d.slice(0,-1).join(", ")} \u05D0\u05D5 ${p}`}case "too_big":{let d=a(l.origin),p=n(l.origin??"value");if(l.origin==="string")return `${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${d?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let v=l.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${l.maximum}`;return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${v}`}if(l.origin==="array"||l.origin==="set"){let v=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",D=l.inclusive?`${l.maximum} ${d?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${d?.unit??""}`;return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${D}`.trim()}let m=l.inclusive?"<=":"<",h=o(l.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${p} ${h} ${m}${l.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${p} ${h} ${m}${l.maximum.toString()}`}case "too_small":{let d=a(l.origin),p=n(l.origin??"value");if(l.origin==="string")return `${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${d?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let v=l.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${l.minimum}`;return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${v}`}if(l.origin==="array"||l.origin==="set"){let v=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let b=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${b}`}let D=l.inclusive?`${l.minimum} ${d?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${d?.unit??""}`;return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${D}`.trim()}let m=l.inclusive?">=":">",h=o(l.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${p} ${h} ${m}${l.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${p} ${h} ${m}${l.minimum.toString()}`}case "invalid_format":{let d=l;if(d.format==="starts_with")return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${d.prefix}"`;if(d.format==="ends_with")return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${d.suffix}"`;if(d.format==="includes")return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${d.includes}"`;if(d.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 ${d.pattern}`;let p=u[d.format],m=p?.label??d.format,v=(p?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return `${m} \u05DC\u05D0 ${v}`}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 ${l.divisor}`;case "unrecognized_keys":return `\u05DE\u05E4\u05EA\u05D7${l.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${l.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${_(l.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${n(l.origin??"array")}`;default:return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function oy(){return {localeError:Bk()}}var 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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${u}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${u}`}case "invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${w(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${n.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${o}${n.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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 ${r[o.format]??n.format}`}case "not_multiple_of":return `\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case "unrecognized_keys":return `Ismeretlen kulcs${n.keys.length>1?"s":""}: ${_(n.keys,", ")}`;case "invalid_key":return `\xC9rv\xE9nytelen kulcs ${n.origin}`;case "invalid_union":return "\xC9rv\xE9nytelen bemenet";case "invalid_element":return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return "\xC9rv\xE9nytelen bemenet"}}};function ay(){return {localeError:Vk()}}function sy(e,t,r){return Math.abs(e)===1?t:r}function Gr(e){if(!e)return "";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}var Zk=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.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 ${n.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${u}`:`\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 ${u}`}case "invalid_value":return n.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 ${w(n.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 ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);if(a){let u=Number(n.maximum),c=sy(u,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 ${Gr(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${n.maximum.toString()} ${c}`}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 ${Gr(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);if(a){let u=Number(n.minimum),c=sy(u,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 ${Gr(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${n.minimum.toString()} ${c}`}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 ${Gr(n.origin)} \u056C\u056B\u0576\u056B ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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 ${r[o.format]??n.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 ${n.divisor}-\u056B`;case "unrecognized_keys":return `\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${n.keys.length>1?"\u0576\u0565\u0580":""}. ${_(n.keys,", ")}`;case "invalid_key":return `\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Gr(n.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 ${Gr(n.origin)}-\u0578\u0582\u0574`;default:return "\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function uy(){return {localeError:Zk()}}var Wk=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${u}`:`Input tidak valid: diharapkan ${o}, diterima ${u}`}case "invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${w(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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}`:`${r[o.format]??n.format} tidak valid`}case "not_multiple_of":return `Angka tidak valid: harus kelipatan dari ${n.divisor}`;case "unrecognized_keys":return `Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${_(n.keys,", ")}`;case "invalid_key":return `Kunci tidak valid di ${n.origin}`;case "invalid_union":return "Input tidak valid";case "invalid_element":return `Nilai tidak valid di ${n.origin}`;default:return "Input tidak valid"}}};function cy(){return {localeError:Wk()}}var Gk=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${u} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${u} \xFEar sem \xE1 a\xF0 vera ${o}`}case "invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${w(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${o}${n.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${o}${n.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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 ${r[o.format]??n.format}`}case "not_multiple_of":return `R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${n.divisor}`;case "unrecognized_keys":return `\xD3\xFEekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${_(n.keys,", ")}`;case "invalid_key":return `Rangur lykill \xED ${n.origin}`;case "invalid_union":return "Rangt gildi";case "invalid_element":return `Rangt gildi \xED ${n.origin}`;default:return "Rangt gildi"}}};function ly(){return {localeError:Gk()}}var qk=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${u}`:`Input non valido: atteso ${o}, ricevuto ${u}`}case "invalid_value":return n.values.length===1?`Input non valido: atteso ${w(n.values[0])}`:`Opzione non valida: atteso uno tra ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${n.origin} deve essere ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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}`:`Invalid ${r[o.format]??n.format}`}case "not_multiple_of":return `Numero non valido: deve essere un multiplo di ${n.divisor}`;case "unrecognized_keys":return `Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${_(n.keys,", ")}`;case "invalid_key":return `Chiave non valida in ${n.origin}`;case "invalid_union":return "Input non valido";case "invalid_element":return `Valore non valido in ${n.origin}`;default:return "Input non valido"}}};function dy(){return {localeError:qk()}}var Hk=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${u}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${u}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case "invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${w(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${_(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case "too_big":{let o=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(n.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${a.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case "too_small":{let o=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(n.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${a.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case "invalid_format":{let o=n;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${r[o.format]??n.format}`}case "not_multiple_of":return `\u7121\u52B9\u306A\u6570\u5024: ${n.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${n.keys.length>1?"\u7FA4":""}: ${_(n.keys,"\u3001")}`;case "invalid_key":return `${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case "invalid_union":return "\u7121\u52B9\u306A\u5165\u529B";case "invalid_element":return `${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return "\u7121\u52B9\u306A\u5165\u529B"}}};function py(){return {localeError:Hk()}}var Jk=()=>{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(n){return e[n]??null}let r={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 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.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 ${n.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${u}`:`\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 ${u}`}case "invalid_value":return n.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 ${w(n.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 ${_(n.values,"|")}-\u10D3\u10D0\u10DC`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.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 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${o}${n.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 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.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 ${n.origin} ${a.verb} ${o}${n.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 ${n.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\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 ${r[o.format]??n.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 ${n.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${n.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${_(n.keys,", ")}`;case "invalid_key":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${n.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 ${n.origin}-\u10E8\u10D8`;default:return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function fy(){return {localeError:Jk()}}var Kk=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.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 ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${u}`:`\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 ${u}`}case "invalid_value":return n.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 ${w(n.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 ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${n.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()}`}case "invalid_format":{let o=n;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 ${r[o.format]??n.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 ${n.divisor}`;case "unrecognized_keys":return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${_(n.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 ${n.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 ${n.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 Ea(){return {localeError:Kk()}}function my(){return Ea()}var Yk=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${u}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${u}\uC785\uB2C8\uB2E4`}case "invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${w(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${_(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case "too_big":{let o=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",u=t(n.origin),c=u?.unit??"\uC694\uC18C";return u?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${o}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${o}${a}`}case "too_small":{let o=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",u=t(n.origin),c=u?.unit??"\uC694\uC18C";return u?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${o}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${o}${a}`}case "invalid_format":{let o=n;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 ${r[o.format]??n.format}`}case "not_multiple_of":return `\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case "unrecognized_keys":return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${_(n.keys,", ")}`;case "invalid_key":return `\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case "invalid_union":return "\uC798\uBABB\uB41C \uC785\uB825";case "invalid_element":return `\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return "\uC798\uBABB\uB41C \uC785\uB825"}}};function hy(){return {localeError:Yk()}}var Xi=e=>e.charAt(0).toUpperCase()+e.slice(1);function gy(e){let t=Math.abs(e),r=t%10,i=t%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}var Xk=()=>{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(n,o,a,u){let c=e[n]??null;return c===null?c:{unit:c.unit[o],verb:c.verb[u][a?"inclusive":"notInclusive"]}}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`Gautas tipas ${u}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${u}, o tik\u0117tasi - ${o}`}case "invalid_value":return n.values.length===1?`Privalo b\u016Bti ${w(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${_(n.values,"|")} pasirinkim\u0173`;case "too_big":{let o=i[n.origin]??n.origin,a=t(n.origin,gy(Number(n.maximum)),n.inclusive??false,"smaller");if(a?.verb)return `${Xi(o??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.maximum.toString()} ${a.unit??"element\u0173"}`;let u=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return `${Xi(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${u} ${n.maximum.toString()} ${a?.unit}`}case "too_small":{let o=i[n.origin]??n.origin,a=t(n.origin,gy(Number(n.minimum)),n.inclusive??false,"bigger");if(a?.verb)return `${Xi(o??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.minimum.toString()} ${a.unit??"element\u0173"}`;let u=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return `${Xi(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${u} ${n.minimum.toString()} ${a?.unit}`}case "invalid_format":{let o=n;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 ${r[o.format]??n.format}`}case "not_multiple_of":return `Skai\u010Dius privalo b\u016Bti ${n.divisor} kartotinis.`;case "unrecognized_keys":return `Neatpa\u017Eint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${_(n.keys,", ")}`;case "invalid_key":return "Rastas klaidingas raktas";case "invalid_union":return "Klaidinga \u012Fvestis";case "invalid_element":{let o=i[n.origin]??n.origin;return `${Xi(o??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return "Klaidinga \u012Fvestis"}}};function yy(){return {localeError:Xk()}}var Qk=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${u}`:`\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 ${u}`}case "invalid_value":return n.values.length===1?`Invalid input: expected ${w(n.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 ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.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 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${n.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 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${n.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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 ${r[o.format]??n.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 ${n.divisor}`;case "unrecognized_keys":return `${n.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"}: ${_(n.keys,", ")}`;case "invalid_key":return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.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 ${n.origin}`;default:return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function vy(){return {localeError:Qk()}}var e0=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${u}`:`Input tidak sah: dijangka ${o}, diterima ${u}`}case "invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${w(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: dijangka ${n.origin??"nilai"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: dijangka ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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}`:`${r[o.format]??n.format} tidak sah`}case "not_multiple_of":return `Nombor tidak sah: perlu gandaan ${n.divisor}`;case "unrecognized_keys":return `Kunci tidak dikenali: ${_(n.keys,", ")}`;case "invalid_key":return `Kunci tidak sah dalam ${n.origin}`;case "invalid_union":return "Input tidak sah";case "invalid_element":return `Nilai tidak sah dalam ${n.origin}`;default:return "Input tidak sah"}}};function by(){return {localeError:e0()}}var t0=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${u}`:`Ongeldige invoer: verwacht ${o}, ontving ${u}`}case "invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${w(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin),u=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return a?`Te ${u}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${u}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin),u=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return a?`Te ${u}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${u}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} is`}case "invalid_format":{let o=n;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: ${r[o.format]??n.format}`}case "not_multiple_of":return `Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case "unrecognized_keys":return `Onbekende key${n.keys.length>1?"s":""}: ${_(n.keys,", ")}`;case "invalid_key":return `Ongeldige key in ${n.origin}`;case "invalid_union":return "Ongeldige invoer";case "invalid_element":return `Ongeldige waarde in ${n.origin}`;default:return "Ongeldige invoer"}}};function Sy(){return {localeError:t0()}}var n0=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${u}`:`Ugyldig input: forventet ${o}, fikk ${u}`}case "invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${w(n.values[0])}`:`Ugyldig valg: forventet en av ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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 ${r[o.format]??n.format}`}case "not_multiple_of":return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case "unrecognized_keys":return `${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${_(n.keys,", ")}`;case "invalid_key":return `Ugyldig n\xF8kkel i ${n.origin}`;case "invalid_union":return "Ugyldig input";case "invalid_element":return `Ugyldig verdi i ${n.origin}`;default:return "Ugyldig input"}}};function xy(){return {localeError:n0()}}var r0=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${u}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${u}`}case "invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${w(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} olmal\u0131yd\u0131.`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} olmal\u0131yd\u0131.`}case "invalid_format":{let o=n;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 ${r[o.format]??n.format}`}case "not_multiple_of":return `F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case "unrecognized_keys":return `Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${_(n.keys,", ")}`;case "invalid_key":return `${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case "invalid_union":return "Giren tan\u0131namad\u0131.";case "invalid_element":return `${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return "K\u0131ymet tan\u0131namad\u0131."}}};function Dy(){return {localeError:r0()}}var i0=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${u} \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 ${u} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case "invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${w(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${_(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} \u0648\u064A`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} \u0648\u064A`}case "invalid_format":{let o=n;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`:`${r[o.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case "not_multiple_of":return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case "unrecognized_keys":return `\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${_(n.keys,", ")}`;case "invalid_key":return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.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 ${n.origin} \u06A9\u06D0`;default:return "\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function _y(){return {localeError:i0()}}var o0=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${u}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${u}`}case "invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${w(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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) ${r[o.format]??n.format}`}case "not_multiple_of":return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case "unrecognized_keys":return `Nierozpoznane klucze${n.keys.length>1?"s":""}: ${_(n.keys,", ")}`;case "invalid_key":return `Nieprawid\u0142owy klucz w ${n.origin}`;case "invalid_union":return "Nieprawid\u0142owe dane wej\u015Bciowe";case "invalid_element":return `Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return "Nieprawid\u0142owe dane wej\u015Bciowe"}}};function Ey(){return {localeError:o0()}}var a0=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${u}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${u}`}case "invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${w(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${o}${n.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Muito pequeno: esperado que ${n.origin} tivesse ${o}${n.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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}`:`${r[o.format]??n.format} inv\xE1lido`}case "not_multiple_of":return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case "unrecognized_keys":return `Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${_(n.keys,", ")}`;case "invalid_key":return `Chave inv\xE1lida em ${n.origin}`;case "invalid_union":return "Entrada inv\xE1lida";case "invalid_element":return `Valor inv\xE1lido em ${n.origin}`;default:return "Campo inv\xE1lido"}}};function wy(){return {localeError:a0()}}function $y(e,t,r,i){let n=Math.abs(e),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?r:i}var s0=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${u}`:`\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 ${u}`}case "invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${w(n.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 ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);if(a){let u=Number(n.maximum),c=$y(u,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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${n.maximum.toString()} ${c}`}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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);if(a){let u=Number(n.minimum),c=$y(u,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 ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${n.minimum.toString()} ${c}`}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 ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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 ${r[o.format]??n.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 ${n.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${_(n.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.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 ${n.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 ky(){return {localeError:s0()}}var u0=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${u}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${u}`}case "invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${w(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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 ${r[o.format]??n.format}`}case "not_multiple_of":return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case "unrecognized_keys":return `Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${_(n.keys,", ")}`;case "invalid_key":return `Neveljaven klju\u010D v ${n.origin}`;case "invalid_union":return "Neveljaven vnos";case "invalid_element":return `Neveljavna vrednost v ${n.origin}`;default:return "Neveljaven vnos"}}};function Iy(){return {localeError:u0()}}var c0=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${u}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${u}`}case "invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${w(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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) ${r[o.format]??n.format}`}case "not_multiple_of":return `Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case "unrecognized_keys":return `${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${_(n.keys,", ")}`;case "invalid_key":return `Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case "invalid_union":return "Ogiltig input";case "invalid_element":return `Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return "Ogiltig input"}}};function Oy(){return {localeError:c0()}}var l0=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.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 ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u}`:`\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 ${u}`}case "invalid_value":return n.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 ${w(n.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 ${_(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.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 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${n.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 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.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 ${n.origin} ${o}${n.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 ${n.origin} ${o}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case "invalid_format":{let o=n;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 ${r[o.format]??n.format}`}case "not_multiple_of":return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.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${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${_(n.keys,", ")}`;case "invalid_key":return `${n.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 `${n.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 Cy(){return {localeError:l0()}}var d0=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.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 ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${u}`:`\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 ${u}`}case "invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${w(n.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 ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(n.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(n.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.minimum.toString()}`}case "invalid_format":{let o=n;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: ${r[o.format]??n.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 ${n.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: ${_(n.keys,", ")}`;case "invalid_key":return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.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 ${n.origin}`;default:return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function Ry(){return {localeError:d0()}}var p0=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${u}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${u}`}case "invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${w(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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 ${r[o.format]??n.format}`}case "not_multiple_of":return `Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case "unrecognized_keys":return `Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${_(n.keys,", ")}`;case "invalid_key":return `${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case "invalid_union":return "Ge\xE7ersiz de\u011Fer";case "invalid_element":return `${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return "Ge\xE7ersiz de\u011Fer"}}};function Ay(){return {localeError:p0()}}var f0=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.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 ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${u}`:`\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 ${u}`}case "invalid_value":return n.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 ${w(n.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 ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${o}${n.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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.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 ${n.origin} ${a.verb} ${o}${n.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 ${n.origin} \u0431\u0443\u0434\u0435 ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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 ${r[o.format]??n.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 ${n.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${_(n.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.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 ${n.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 wa(){return {localeError:f0()}}function Ty(){return wa()}var m0=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${u} \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 ${u} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case "invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${w(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${_(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${n.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: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${o}${n.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${o}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case "invalid_format":{let o=n;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 ${r[o.format]??n.format}`}case "not_multiple_of":return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.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${n.keys.length>1?"\u0632":""}: ${_(n.keys,"\u060C ")}`;case "invalid_key":return `${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case "invalid_union":return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case "invalid_element":return `${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function Py(){return {localeError:m0()}}var h0=()=>{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"}};function t(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${u}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${u}`}case "invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${w(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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 ${r[o.format]??n.format}`}case "not_multiple_of":return `Noto\u2018g\u2018ri raqam: ${n.divisor} ning karralisi bo\u2018lishi kerak`;case "unrecognized_keys":return `Noma\u2019lum kalit${n.keys.length>1?"lar":""}: ${_(n.keys,", ")}`;case "invalid_key":return `${n.origin} dagi kalit noto\u2018g\u2018ri`;case "invalid_union":return "Noto\u2018g\u2018ri kirish";case "invalid_element":return `${n.origin} da noto\u2018g\u2018ri qiymat`;default:return "Noto\u2018g\u2018ri kirish"}}};function Fy(){return {localeError:h0()}}var g0=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${u}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${u}`}case "invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${w(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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}`:`${r[o.format]??n.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 ${n.divisor}`;case "unrecognized_keys":return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${_(n.keys,", ")}`;case "invalid_key":return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.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 ${n.origin}`;default:return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function jy(){return {localeError:g0()}}var y0=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${u}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${u}`}case "invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${w(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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${r[o.format]??n.format}`}case "not_multiple_of":return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case "unrecognized_keys":return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${_(n.keys,", ")}`;case "invalid_key":return `${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case "invalid_union":return "\u65E0\u6548\u8F93\u5165";case "invalid_element":return `${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return "\u65E0\u6548\u8F93\u5165"}}};function zy(){return {localeError:y0()}}var v0=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.expected}\uFF0C\u4F46\u6536\u5230 ${u}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${u}`}case "invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${w(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()}`}case "invalid_format":{let o=n;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 ${r[o.format]??n.format}`}case "not_multiple_of":return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case "unrecognized_keys":return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${_(n.keys,"\u3001")}`;case "invalid_key":return `${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case "invalid_union":return "\u7121\u6548\u7684\u8F38\u5165\u503C";case "invalid_element":return `${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return "\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Ny(){return {localeError:v0()}}var b0=()=>{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(n){return e[n]??null}let r={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 n=>{switch(n.code){case "invalid_type":{let o=i[n.expected]??n.expected,a=$(n.input),u=i[a]??a;return /^[A-Z]/.test(n.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${u}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${u}`}case "invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${w(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${_(n.values,"|")}`;case "too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${a.verb} ${o}${n.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${n.maximum}`}case "too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${a.verb} ${o}${n.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${n.minimum}`}case "invalid_format":{let o=n;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: ${r[o.format]??n.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 ${n.divisor}`;case "unrecognized_keys":return `B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${_(n.keys,", ")}`;case "invalid_key":return `B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.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 ${n.origin}`;default:return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function Uy(){return {localeError:b0()}}var Ly,Rd=Symbol("ZodOutput"),Ad=Symbol("ZodInput"),$a=class{constructor(){this._map=new WeakMap,this._idmap=new Map;}add(t,...r){let i=r[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 r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let i={...this.get(r)??{}};delete i.id;let n={...i,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function ka(){return new $a}(Ly=globalThis).__zod_globalRegistry??(Ly.__zod_globalRegistry=ka());var qe=globalThis.__zod_globalRegistry;function Td(e,t){return new e({type:"string",...C(t)})}function Pd(e,t){return new e({type:"string",coerce:true,...C(t)})}function Ia(e,t){return new e({type:"string",format:"email",check:"string_format",abort:false,...C(t)})}function eo(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:false,...C(t)})}function Oa(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,...C(t)})}function Ca(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v4",...C(t)})}function Ra(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v6",...C(t)})}function Aa(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v7",...C(t)})}function to(e,t){return new e({type:"string",format:"url",check:"string_format",abort:false,...C(t)})}function Ta(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:false,...C(t)})}function Pa(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:false,...C(t)})}function Fa(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:false,...C(t)})}function ja(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:false,...C(t)})}function za(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:false,...C(t)})}function Na(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:false,...C(t)})}function Ua(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:false,...C(t)})}function La(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:false,...C(t)})}function Ma(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:false,...C(t)})}function Fd(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:false,...C(t)})}function Ba(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:false,...C(t)})}function Va(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:false,...C(t)})}function Za(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:false,...C(t)})}function Wa(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:false,...C(t)})}function Ga(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:false,...C(t)})}function qa(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:false,...C(t)})}var jd={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function zd(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:false,local:false,precision:null,...C(t)})}function Nd(e,t){return new e({type:"string",format:"date",check:"string_format",...C(t)})}function Ud(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...C(t)})}function Ld(e,t){return new e({type:"string",format:"duration",check:"string_format",...C(t)})}function Md(e,t){return new e({type:"number",checks:[],...C(t)})}function Bd(e,t){return new e({type:"number",coerce:true,checks:[],...C(t)})}function Vd(e,t){return new e({type:"number",check:"number_format",abort:false,format:"safeint",...C(t)})}function Zd(e,t){return new e({type:"number",check:"number_format",abort:false,format:"float32",...C(t)})}function Wd(e,t){return new e({type:"number",check:"number_format",abort:false,format:"float64",...C(t)})}function Gd(e,t){return new e({type:"number",check:"number_format",abort:false,format:"int32",...C(t)})}function qd(e,t){return new e({type:"number",check:"number_format",abort:false,format:"uint32",...C(t)})}function Hd(e,t){return new e({type:"boolean",...C(t)})}function Jd(e,t){return new e({type:"boolean",coerce:true,...C(t)})}function Kd(e,t){return new e({type:"bigint",...C(t)})}function Yd(e,t){return new e({type:"bigint",coerce:true,...C(t)})}function Xd(e,t){return new e({type:"bigint",check:"bigint_format",abort:false,format:"int64",...C(t)})}function Qd(e,t){return new e({type:"bigint",check:"bigint_format",abort:false,format:"uint64",...C(t)})}function ep(e,t){return new e({type:"symbol",...C(t)})}function tp(e,t){return new e({type:"undefined",...C(t)})}function np(e,t){return new e({type:"null",...C(t)})}function rp(e){return new e({type:"any"})}function ip(e){return new e({type:"unknown"})}function op(e,t){return new e({type:"never",...C(t)})}function ap(e,t){return new e({type:"void",...C(t)})}function sp(e,t){return new e({type:"date",...C(t)})}function up(e,t){return new e({type:"date",coerce:true,...C(t)})}function cp(e,t){return new e({type:"nan",...C(t)})}function Kt(e,t){return new pa({check:"less_than",...C(t),value:e,inclusive:false})}function mt(e,t){return new pa({check:"less_than",...C(t),value:e,inclusive:true})}function Yt(e,t){return new fa({check:"greater_than",...C(t),value:e,inclusive:false})}function nt(e,t){return new fa({check:"greater_than",...C(t),value:e,inclusive:true})}function Ha(e){return Yt(0,e)}function Ja(e){return Kt(0,e)}function Ka(e){return mt(0,e)}function Ya(e){return nt(0,e)}function On(e,t){return new nl({check:"multiple_of",...C(t),value:e})}function Cn(e,t){return new ol({check:"max_size",...C(t),maximum:e})}function Xt(e,t){return new al({check:"min_size",...C(t),minimum:e})}function tr(e,t){return new sl({check:"size_equals",...C(t),size:e})}function nr(e,t){return new ul({check:"max_length",...C(t),maximum:e})}function mn(e,t){return new cl({check:"min_length",...C(t),minimum:e})}function rr(e,t){return new ll({check:"length_equals",...C(t),length:e})}function qr(e,t){return new dl({check:"string_format",format:"regex",...C(t),pattern:e})}function Hr(e){return new pl({check:"string_format",format:"lowercase",...C(e)})}function Jr(e){return new fl({check:"string_format",format:"uppercase",...C(e)})}function Kr(e,t){return new ml({check:"string_format",format:"includes",...C(t),includes:e})}function Yr(e,t){return new hl({check:"string_format",format:"starts_with",...C(t),prefix:e})}function Xr(e,t){return new gl({check:"string_format",format:"ends_with",...C(t),suffix:e})}function Xa(e,t,r){return new yl({check:"property",property:e,schema:t,...C(r)})}function Qr(e,t){return new vl({check:"mime_type",mime:e,...C(t)})}function Ut(e){return new bl({check:"overwrite",tx:e})}function ei(e){return Ut(t=>t.normalize(e))}function ti(){return Ut(e=>e.trim())}function ni(){return Ut(e=>e.toLowerCase())}function ri(){return Ut(e=>e.toUpperCase())}function ii(){return Ut(e=>yc(e))}function lp(e,t,r){return new e({type:"array",element:t,...C(r)})}function x0(e,t,r){return new e({type:"union",options:t,...C(r)})}function D0(e,t,r){return new e({type:"union",options:t,inclusive:false,...C(r)})}function _0(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...C(i)})}function E0(e,t,r){return new e({type:"intersection",left:t,right:r})}function w0(e,t,r,i){let n=r instanceof X,o=n?i:r,a=n?r:null;return new e({type:"tuple",items:t,rest:a,...C(o)})}function $0(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...C(i)})}function k0(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...C(i)})}function I0(e,t,r){return new e({type:"set",valueType:t,...C(r)})}function O0(e,t,r){let i=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:i,...C(r)})}function C0(e,t,r){return new e({type:"enum",entries:t,...C(r)})}function R0(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...C(r)})}function dp(e,t){return new e({type:"file",...C(t)})}function A0(e,t){return new e({type:"transform",transform:t})}function T0(e,t){return new e({type:"optional",innerType:t})}function P0(e,t){return new e({type:"nullable",innerType:t})}function F0(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():bc(r)}})}function j0(e,t,r){return new e({type:"nonoptional",innerType:t,...C(r)})}function z0(e,t){return new e({type:"success",innerType:t})}function N0(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function U0(e,t,r){return new e({type:"pipe",in:t,out:r})}function L0(e,t){return new e({type:"readonly",innerType:t})}function M0(e,t,r){return new e({type:"template_literal",parts:t,...C(r)})}function B0(e,t){return new e({type:"lazy",getter:t})}function V0(e,t){return new e({type:"promise",innerType:t})}function pp(e,t,r){let i=C(r);return i.abort??(i.abort=true),new e({type:"custom",check:"custom",fn:t,...i})}function fp(e,t,r){return new e({type:"custom",check:"custom",fn:t,...C(r)})}function mp(e){let t=My(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(Lr(i,r.value,t._zod.def));else {let n=i;n.fatal&&(n.continue=false),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),r.issues.push(Lr(n));}},e(r.value,r)));return t}function My(e,t){let r=new ye({check:"custom",...C(t)});return r._zod.check=e,r}function hp(e){let t=new ye({check:"describe"});return t._zod.onattach=[r=>{let i=qe.get(r)??{};qe.add(r,{...i,description:e});}],t._zod.check=()=>{},t}function gp(e){let t=new ye({check:"meta"});return t._zod.onattach=[r=>{let i=qe.get(r)??{};qe.add(r,{...i,...e});}],t._zod.check=()=>{},t}function yp(e,t){let r=C(t),i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(h=>typeof h=="string"?h.toLowerCase():h),n=n.map(h=>typeof h=="string"?h.toLowerCase():h));let o=new Set(i),a=new Set(n),u=e.Codec??Yi,c=e.Boolean??Ji,l=e.String??er,d=new l({type:"string",error:r.error}),p=new c({type:"boolean",error:r.error}),m=new u({type:"pipe",in:d,out:p,transform:((h,v)=>{let D=h;return r.case!=="sensitive"&&(D=D.toLowerCase()),o.has(D)?true:a.has(D)?false:(v.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:v.value,inst:m,continue:false}),{})}),reverseTransform:((h,v)=>h===true?i[0]||"true":n[0]||"false"),error:r.error});return m}function oi(e,t,r,i={}){let n=C(i),o={...C(i),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:u=>r.test(u),...n};return r instanceof RegExp&&(o.pattern=r),new e(o)}function Rn(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??qe,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 le(e,t,r={path:[],schemaPath:[]}){var i;let n=e._zod.def,o=t.seen.get(e);if(o)return o.count++,r.schemaPath.includes(e)&&(o.cycle=r.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);let u=e._zod.toJSONSchema?.();if(u)a.schema=u;else {let d={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,d);else {let m=a.schema,h=t.processors[n.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);h(e,t,m,d);}let p=e._zod.parent;p&&(a.ref||(a.ref=p),le(p,t,d),t.seen.get(p).isParent=true);}let c=t.metadataRegistry.get(e);return c&&Object.assign(a.schema,c),t.io==="input"&&rt(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&a.schema._prefault&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function An(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let a of e.seen.entries()){let u=e.metadataRegistry.get(a[0])?.id;if(u){let c=i.get(u);if(c&&c!==a[0])throw new Error(`Duplicate schema id "${u}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(u,a[0]);}}let n=a=>{let u=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(a[0])?.id,m=e.external.uri??(v=>v);if(p)return {ref:m(p)};let h=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=h,{defId:h,ref:`${m("__shared")}#/${u}/${h}`}}if(a[1]===r)return {ref:"#"};let l=`#/${u}/`,d=a[1].schema.id??`__schema${e.counter++}`;return {defId:d,ref:l+d}},o=a=>{if(a[1].schema.$ref)return;let u=a[1],{ref:c,defId:l}=n(a);u.def={...u.schema},l&&(u.defId=l);let d=u.schema;for(let p in d)delete d[p];d.$ref=c;};if(e.cycles==="throw")for(let a of e.seen.entries()){let u=a[1];if(u.cycle)throw new Error(`Cycle detected: #/${u.cycle?.join("/")}/<root>
43
+
44
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let u=a[1];if(t===a[0]){o(a);continue}if(e.external){let l=e.external.registry.get(a[0])?.id;if(t!==a[0]&&l){o(a);continue}}if(e.metadataRegistry.get(a[0])?.id){o(a);continue}if(u.cycle){o(a);continue}if(u.count>1&&e.reused==="ref"){o(a);continue}}}function Tn(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=a=>{let u=e.seen.get(a);if(u.ref===null)return;let c=u.def??u.schema,l={...c},d=u.ref;if(u.ref=null,d){i(d);let m=e.seen.get(d),h=m.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(h)):Object.assign(c,h),Object.assign(c,l),a._zod.parent===d)for(let D in c)D==="$ref"||D==="allOf"||D in l||delete c[D];if(h.$ref&&m.def)for(let D in c)D==="$ref"||D==="allOf"||D in m.def&&JSON.stringify(c[D])===JSON.stringify(m.def[D])&&delete c[D];}let p=a._zod.parent;if(p&&p!==d){i(p);let m=e.seen.get(p);if(m?.schema.$ref&&(c.$ref=m.schema.$ref,m.def))for(let h in c)h==="$ref"||h==="allOf"||h in m.def&&JSON.stringify(c[h])===JSON.stringify(m.def[h])&&delete c[h];}e.override({zodSchema:a,jsonSchema:c,path:u.path??[]});};for(let a of [...e.seen.entries()].reverse())i(a[0]);let n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(a);}Object.assign(n,r.def??r.schema);let o=e.external?.defs??{};for(let a of e.seen.entries()){let u=a[1];u.def&&u.defId&&(o[u.defId]=u.def);}e.external||Object.keys(o).length>0&&(e.target==="draft-2020-12"?n.$defs=o:n.definitions=o);try{let a=JSON.parse(JSON.stringify(n));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:ai(t,"input",e.processors),output:ai(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function rt(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return false;r.seen.add(e);let i=e._zod.def;if(i.type==="transform")return true;if(i.type==="array")return rt(i.element,r);if(i.type==="set")return rt(i.valueType,r);if(i.type==="lazy")return rt(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return rt(i.innerType,r);if(i.type==="intersection")return rt(i.left,r)||rt(i.right,r);if(i.type==="record"||i.type==="map")return rt(i.keyType,r)||rt(i.valueType,r);if(i.type==="pipe")return rt(i.in,r)||rt(i.out,r);if(i.type==="object"){for(let n in i.shape)if(rt(i.shape[n],r))return true;return false}if(i.type==="union"){for(let n of i.options)if(rt(n,r))return true;return false}if(i.type==="tuple"){for(let n of i.items)if(rt(n,r))return true;return !!(i.rest&&rt(i.rest,r))}return false}var vp=(e,t={})=>r=>{let i=Rn({...r,processors:t});return le(e,i),An(i,e),Tn(i,e)},ai=(e,t,r={})=>i=>{let{libraryOptions:n,target:o}=i??{},a=Rn({...n??{},target:o,io:t,processors:r});return le(e,a),An(a,e),Tn(a,e)};var Z0={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},bp=(e,t,r,i)=>{let n=r;n.type="string";let{minimum:o,maximum:a,format:u,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof o=="number"&&(n.minLength=o),typeof a=="number"&&(n.maxLength=a),u&&(n.format=Z0[u]??u,n.format===""&&delete n.format,u==="time"&&delete n.format),l&&(n.contentEncoding=l),c&&c.size>0){let d=[...c];d.length===1?n.pattern=d[0].source:d.length>1&&(n.allOf=[...d.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))]);}},Sp=(e,t,r,i)=>{let n=r,{minimum:o,maximum:a,format:u,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:d}=e._zod.bag;typeof u=="string"&&u.includes("int")?n.type="integer":n.type="number",typeof d=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.minimum=d,n.exclusiveMinimum=true):n.exclusiveMinimum=d),typeof o=="number"&&(n.minimum=o,typeof d=="number"&&t.target!=="draft-04"&&(d>=o?delete n.minimum:delete n.exclusiveMinimum)),typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.maximum=l,n.exclusiveMaximum=true):n.exclusiveMaximum=l),typeof a=="number"&&(n.maximum=a,typeof l=="number"&&t.target!=="draft-04"&&(l<=a?delete n.maximum:delete n.exclusiveMaximum)),typeof c=="number"&&(n.multipleOf=c);},xp=(e,t,r,i)=>{r.type="boolean";},Dp=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},_p=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Ep=(e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=true,r.enum=[null]):r.type="null";},wp=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},$p=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},kp=(e,t,r,i)=>{r.not={};},Ip=(e,t,r,i)=>{},Op=(e,t,r,i)=>{},Cp=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Rp=(e,t,r,i)=>{let n=e._zod.def,o=Ni(n.entries);o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),r.enum=o;},Ap=(e,t,r,i)=>{let n=e._zod.def,o=[];for(let a of n.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];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a;}else o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),o.every(a=>typeof a=="boolean")&&(r.type="boolean"),o.every(a=>a===null)&&(r.type="null"),r.enum=o;},Tp=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Pp=(e,t,r,i)=>{let n=r,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=o.source;},Fp=(e,t,r,i)=>{let n=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:u,mime:c}=e._zod.bag;a!==void 0&&(o.minLength=a),u!==void 0&&(o.maxLength=u),c?c.length===1?(o.contentMediaType=c[0],Object.assign(n,o)):(Object.assign(n,o),n.anyOf=c.map(l=>({contentMediaType:l}))):Object.assign(n,o);},jp=(e,t,r,i)=>{r.type="boolean";},zp=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Np=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Up=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Lp=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Mp=(e,t,r,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Bp=(e,t,r,i)=>{let n=r,o=e._zod.def,{minimum:a,maximum:u}=e._zod.bag;typeof a=="number"&&(n.minItems=a),typeof u=="number"&&(n.maxItems=u),n.type="array",n.items=le(o.element,t,{...i,path:[...i.path,"items"]});},Vp=(e,t,r,i)=>{let n=r,o=e._zod.def;n.type="object",n.properties={};let a=o.shape;for(let l in a)n.properties[l]=le(a[l],t,{...i,path:[...i.path,"properties",l]});let u=new Set(Object.keys(a)),c=new Set([...u].filter(l=>{let d=o.shape[l]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));c.size>0&&(n.required=Array.from(c)),o.catchall?._zod.def.type==="never"?n.additionalProperties=false:o.catchall?o.catchall&&(n.additionalProperties=le(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=false);},es=(e,t,r,i)=>{let n=e._zod.def,o=n.inclusive===false,a=n.options.map((u,c)=>le(u,t,{...i,path:[...i.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=a:r.anyOf=a;},Zp=(e,t,r,i)=>{let n=e._zod.def,o=le(n.left,t,{...i,path:[...i.path,"allOf",0]}),a=le(n.right,t,{...i,path:[...i.path,"allOf",1]}),u=l=>"allOf"in l&&Object.keys(l).length===1,c=[...u(o)?o.allOf:[o],...u(a)?a.allOf:[a]];r.allOf=c;},Wp=(e,t,r,i)=>{let n=r,o=e._zod.def;n.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",u=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((m,h)=>le(m,t,{...i,path:[...i.path,a,h]})),l=o.rest?le(o.rest,t,{...i,path:[...i.path,u,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=c,l&&(n.items=l)):t.target==="openapi-3.0"?(n.items={anyOf:c},l&&n.items.anyOf.push(l),n.minItems=c.length,l||(n.maxItems=c.length)):(n.items=c,l&&(n.additionalItems=l));let{minimum:d,maximum:p}=e._zod.bag;typeof d=="number"&&(n.minItems=d),typeof p=="number"&&(n.maxItems=p);},Gp=(e,t,r,i)=>{let n=r,o=e._zod.def;n.type="object";let a=o.keyType,c=a._zod.bag?.patterns;if(o.mode==="loose"&&c&&c.size>0){let d=le(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});n.patternProperties={};for(let p of c)n.patternProperties[p.source]=d;}else (t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=le(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),n.additionalProperties=le(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let l=a._zod.values;if(l){let d=[...l].filter(p=>typeof p=="string"||typeof p=="number");d.length>0&&(n.required=d);}},qp=(e,t,r,i)=>{let n=e._zod.def,o=le(n.innerType,t,i),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=n.innerType,r.nullable=true):r.anyOf=[o,{type:"null"}];},Hp=(e,t,r,i)=>{let n=e._zod.def;le(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType;},Jp=(e,t,r,i)=>{let n=e._zod.def;le(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue));},Kp=(e,t,r,i)=>{let n=e._zod.def;le(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)));},Yp=(e,t,r,i)=>{let n=e._zod.def;le(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType;let a;try{a=n.catchValue(void 0);}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a;},Xp=(e,t,r,i)=>{let n=e._zod.def,o=t.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;le(o,t,i);let a=t.seen.get(e);a.ref=o;},Qp=(e,t,r,i)=>{let n=e._zod.def;le(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType,r.readOnly=true;},ef=(e,t,r,i)=>{let n=e._zod.def;le(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType;},ts=(e,t,r,i)=>{let n=e._zod.def;le(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType;},tf=(e,t,r,i)=>{let n=e._zod.innerType;le(n,t,i);let o=t.seen.get(e);o.ref=n;},Qa={string:bp,number:Sp,boolean:xp,bigint:Dp,symbol:_p,null:Ep,undefined:wp,void:$p,never:kp,any:Ip,unknown:Op,date:Cp,enum:Rp,literal:Ap,nan:Tp,template_literal:Pp,file:Fp,success:jp,custom:zp,function:Np,transform:Up,map:Lp,set:Mp,array:Bp,object:Vp,union:es,intersection:Zp,tuple:Wp,record:Gp,nullable:qp,nonoptional:Hp,default:Jp,prefault:Kp,catch:Yp,pipe:Xp,readonly:Qp,promise:ef,optional:ts,lazy:tf};function ns(e,t){if("_idmap"in e){let i=e,n=Rn({...t,processors:Qa}),o={};for(let c of i._idmap.entries()){let[l,d]=c;le(d,n);}let a={},u={registry:i,uri:t?.uri,defs:o};n.external=u;for(let c of i._idmap.entries()){let[l,d]=c;An(n,d),a[l]=Tn(n,d);}if(Object.keys(o).length>0){let c=n.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:o};}return {schemas:a}}let r=Rn({...t,processors:Qa});return le(e,r),An(r,e),Tn(r,e)}var rs=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 r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=Rn({processors:Qa,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}});}process(t,r={path:[],schemaPath:[]}){return le(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),An(this.ctx,t);let i=Tn(this.ctx,t),{"~standard":n,...o}=i;return o}};var By={};var no={};b(no,{ZodAny:()=>$f,ZodArray:()=>Cf,ZodBase64:()=>_s,ZodBase64URL:()=>Es,ZodBigInt:()=>mi,ZodBigIntFormat:()=>ks,ZodBoolean:()=>fi,ZodCIDRv4:()=>xs,ZodCIDRv6:()=>Ds,ZodCUID:()=>ms,ZodCUID2:()=>hs,ZodCatch:()=>Xf,ZodCodec:()=>js,ZodCustom:()=>mo,ZodCustomStringFormat:()=>di,ZodDate:()=>uo,ZodDefault:()=>Gf,ZodDiscriminatedUnion:()=>Af,ZodE164:()=>ws,ZodEmail:()=>ds,ZodEmoji:()=>ps,ZodEnum:()=>ci,ZodExactOptional:()=>Vf,ZodFile:()=>Mf,ZodFunction:()=>sm,ZodGUID:()=>ro,ZodIPv4:()=>bs,ZodIPv6:()=>Ss,ZodIntersection:()=>Tf,ZodJWT:()=>$s,ZodKSUID:()=>vs,ZodLazy:()=>im,ZodLiteral:()=>Lf,ZodMAC:()=>bf,ZodMap:()=>Nf,ZodNaN:()=>em,ZodNanoID:()=>fs,ZodNever:()=>If,ZodNonOptional:()=>Ps,ZodNull:()=>Ef,ZodNullable:()=>Wf,ZodNumber:()=>pi,ZodNumberFormat:()=>or,ZodObject:()=>lo,ZodOptional:()=>Ts,ZodPipe:()=>Fs,ZodPrefault:()=>Hf,ZodPromise:()=>am,ZodReadonly:()=>tm,ZodRecord:()=>fo,ZodSet:()=>Uf,ZodString:()=>li,ZodStringFormat:()=>ge,ZodSuccess:()=>Yf,ZodSymbol:()=>Df,ZodTemplateLiteral:()=>rm,ZodTransform:()=>Bf,ZodTuple:()=>Ff,ZodType:()=>ee,ZodULID:()=>gs,ZodURL:()=>so,ZodUUID:()=>Qt,ZodUndefined:()=>_f,ZodUnion:()=>po,ZodUnknown:()=>kf,ZodVoid:()=>Of,ZodXID:()=>ys,ZodXor:()=>Rf,_ZodString:()=>ls,_default:()=>qf,_function:()=>Hv,any:()=>kv,array:()=>co,base64:()=>lv,base64url:()=>dv,bigint:()=>Dv,boolean:()=>xf,catch:()=>Qf,check:()=>Jv,cidrv4:()=>uv,cidrv6:()=>cv,codec:()=>Wv,cuid:()=>ev,cuid2:()=>tv,custom:()=>Kv,date:()=>Ov,describe:()=>Yv,discriminatedUnion:()=>Pv,e164:()=>pv,email:()=>Zy,emoji:()=>Xy,enum:()=>Rs,exactOptional:()=>Zf,file:()=>Mv,float32:()=>vv,float64:()=>bv,function:()=>Hv,guid:()=>Wy,hash:()=>yv,hex:()=>gv,hostname:()=>hv,httpUrl:()=>Yy,instanceof:()=>Qv,int:()=>cs,int32:()=>Sv,int64:()=>_v,intersection:()=>Pf,ipv4:()=>ov,ipv6:()=>sv,json:()=>tb,jwt:()=>fv,keyof:()=>Cv,ksuid:()=>iv,lazy:()=>om,literal:()=>Lv,looseObject:()=>Av,looseRecord:()=>jv,mac:()=>av,map:()=>zv,meta:()=>Xv,nan:()=>Zv,nanoid:()=>Qy,nativeEnum:()=>Uv,never:()=>Is,nonoptional:()=>Kf,null:()=>wf,nullable:()=>oo,nullish:()=>Bv,number:()=>Sf,object:()=>Os,optional:()=>io,partialRecord:()=>Fv,pipe:()=>ao,prefault:()=>Jf,preprocess:()=>nb,promise:()=>qv,readonly:()=>nm,record:()=>zf,refine:()=>um,set:()=>Nv,strictObject:()=>Rv,string:()=>ui,stringFormat:()=>mv,stringbool:()=>eb,success:()=>Vv,superRefine:()=>cm,symbol:()=>wv,templateLiteral:()=>Gv,transform:()=>As,tuple:()=>jf,uint32:()=>xv,uint64:()=>Ev,ulid:()=>nv,undefined:()=>$v,union:()=>Cs,unknown:()=>ir,url:()=>Ky,uuid:()=>Gy,uuidv4:()=>qy,uuidv6:()=>Hy,uuidv7:()=>Jy,void:()=>Iv,xid:()=>rv,xor:()=>Tv});var is={};b(is,{endsWith:()=>Xr,gt:()=>Yt,gte:()=>nt,includes:()=>Kr,length:()=>rr,lowercase:()=>Hr,lt:()=>Kt,lte:()=>mt,maxLength:()=>nr,maxSize:()=>Cn,mime:()=>Qr,minLength:()=>mn,minSize:()=>Xt,multipleOf:()=>On,negative:()=>Ja,nonnegative:()=>Ya,nonpositive:()=>Ka,normalize:()=>ei,overwrite:()=>Ut,positive:()=>Ha,property:()=>Xa,regex:()=>qr,size:()=>tr,slugify:()=>ii,startsWith:()=>Yr,toLowerCase:()=>ni,toUpperCase:()=>ri,trim:()=>ti,uppercase:()=>Jr});var si={};b(si,{ZodISODate:()=>as,ZodISODateTime:()=>os,ZodISODuration:()=>us,ZodISOTime:()=>ss,date:()=>rf,datetime:()=>nf,duration:()=>af,time:()=>of});var os=y("ZodISODateTime",(e,t)=>{Tl.init(e,t),ge.init(e,t);});function nf(e){return zd(os,e)}var as=y("ZodISODate",(e,t)=>{Pl.init(e,t),ge.init(e,t);});function rf(e){return Nd(as,e)}var ss=y("ZodISOTime",(e,t)=>{Fl.init(e,t),ge.init(e,t);});function of(e){return Ud(ss,e)}var us=y("ZodISODuration",(e,t)=>{jl.init(e,t),ge.init(e,t);});function af(e){return Ld(us,e)}var Vy=(e,t)=>{Vi.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Wi(e,r)},flatten:{value:r=>Zi(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Nr,2);}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Nr,2);}},isEmpty:{get(){return e.issues.length===0}}});},G0=y("ZodError",Vy),lt=y("ZodError",Vy,{Parent:Error});var sf=Mr(lt),uf=Br(lt),cf=Vr(lt),lf=Zr(lt),df=na(lt),pf=ra(lt),ff=ia(lt),mf=oa(lt),hf=aa(lt),gf=sa(lt),yf=ua(lt),vf=ca(lt);var ee=y("ZodType",(e,t)=>(X.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:ai(e,"input"),output:ai(e,"output")}}),e.toJSONSchema=vp(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(k.mergeDefs(t,{checks:[...t.checks??[],...r.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:true}),e.with=e.check,e.clone=(r,i)=>tt(e,r,i),e.brand=()=>e,e.register=((r,i)=>(r.add(e,i),e)),e.parse=(r,i)=>sf(e,r,i,{callee:e.parse}),e.safeParse=(r,i)=>cf(e,r,i),e.parseAsync=async(r,i)=>uf(e,r,i,{callee:e.parseAsync}),e.safeParseAsync=async(r,i)=>lf(e,r,i),e.spa=e.safeParseAsync,e.encode=(r,i)=>df(e,r,i),e.decode=(r,i)=>pf(e,r,i),e.encodeAsync=async(r,i)=>ff(e,r,i),e.decodeAsync=async(r,i)=>mf(e,r,i),e.safeEncode=(r,i)=>hf(e,r,i),e.safeDecode=(r,i)=>gf(e,r,i),e.safeEncodeAsync=async(r,i)=>yf(e,r,i),e.safeDecodeAsync=async(r,i)=>vf(e,r,i),e.refine=(r,i)=>e.check(um(r,i)),e.superRefine=r=>e.check(cm(r)),e.overwrite=r=>e.check(Ut(r)),e.optional=()=>io(e),e.exactOptional=()=>Zf(e),e.nullable=()=>oo(e),e.nullish=()=>io(oo(e)),e.nonoptional=r=>Kf(e,r),e.array=()=>co(e),e.or=r=>Cs([e,r]),e.and=r=>Pf(e,r),e.transform=r=>ao(e,As(r)),e.default=r=>qf(e,r),e.prefault=r=>Jf(e,r),e.catch=r=>Qf(e,r),e.pipe=r=>ao(e,r),e.readonly=()=>nm(e),e.describe=r=>{let i=e.clone();return qe.add(i,{description:r}),i},Object.defineProperty(e,"description",{get(){return qe.get(e)?.description},configurable:true}),e.meta=(...r)=>{if(r.length===0)return qe.get(e);let i=e.clone();return qe.add(i,r[0]),i},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),ls=y("_ZodString",(e,t)=>{er.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(i,n,o)=>bp(e,i,n);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...i)=>e.check(qr(...i)),e.includes=(...i)=>e.check(Kr(...i)),e.startsWith=(...i)=>e.check(Yr(...i)),e.endsWith=(...i)=>e.check(Xr(...i)),e.min=(...i)=>e.check(mn(...i)),e.max=(...i)=>e.check(nr(...i)),e.length=(...i)=>e.check(rr(...i)),e.nonempty=(...i)=>e.check(mn(1,...i)),e.lowercase=i=>e.check(Hr(i)),e.uppercase=i=>e.check(Jr(i)),e.trim=()=>e.check(ti()),e.normalize=(...i)=>e.check(ei(...i)),e.toLowerCase=()=>e.check(ni()),e.toUpperCase=()=>e.check(ri()),e.slugify=()=>e.check(ii());}),li=y("ZodString",(e,t)=>{er.init(e,t),ls.init(e,t),e.email=r=>e.check(Ia(ds,r)),e.url=r=>e.check(to(so,r)),e.jwt=r=>e.check(qa($s,r)),e.emoji=r=>e.check(Ta(ps,r)),e.guid=r=>e.check(eo(ro,r)),e.uuid=r=>e.check(Oa(Qt,r)),e.uuidv4=r=>e.check(Ca(Qt,r)),e.uuidv6=r=>e.check(Ra(Qt,r)),e.uuidv7=r=>e.check(Aa(Qt,r)),e.nanoid=r=>e.check(Pa(fs,r)),e.guid=r=>e.check(eo(ro,r)),e.cuid=r=>e.check(Fa(ms,r)),e.cuid2=r=>e.check(ja(hs,r)),e.ulid=r=>e.check(za(gs,r)),e.base64=r=>e.check(Za(_s,r)),e.base64url=r=>e.check(Wa(Es,r)),e.xid=r=>e.check(Na(ys,r)),e.ksuid=r=>e.check(Ua(vs,r)),e.ipv4=r=>e.check(La(bs,r)),e.ipv6=r=>e.check(Ma(Ss,r)),e.cidrv4=r=>e.check(Ba(xs,r)),e.cidrv6=r=>e.check(Va(Ds,r)),e.e164=r=>e.check(Ga(ws,r)),e.datetime=r=>e.check(nf(r)),e.date=r=>e.check(rf(r)),e.time=r=>e.check(of(r)),e.duration=r=>e.check(af(r));});function ui(e){return Td(li,e)}var ge=y("ZodStringFormat",(e,t)=>{he.init(e,t),ls.init(e,t);}),ds=y("ZodEmail",(e,t)=>{El.init(e,t),ge.init(e,t);});function Zy(e){return Ia(ds,e)}var ro=y("ZodGUID",(e,t)=>{Dl.init(e,t),ge.init(e,t);});function Wy(e){return eo(ro,e)}var Qt=y("ZodUUID",(e,t)=>{_l.init(e,t),ge.init(e,t);});function Gy(e){return Oa(Qt,e)}function qy(e){return Ca(Qt,e)}function Hy(e){return Ra(Qt,e)}function Jy(e){return Aa(Qt,e)}var so=y("ZodURL",(e,t)=>{wl.init(e,t),ge.init(e,t);});function Ky(e){return to(so,e)}function Yy(e){return to(so,{protocol:/^https?$/,hostname:$t.domain,...k.normalizeParams(e)})}var ps=y("ZodEmoji",(e,t)=>{$l.init(e,t),ge.init(e,t);});function Xy(e){return Ta(ps,e)}var fs=y("ZodNanoID",(e,t)=>{kl.init(e,t),ge.init(e,t);});function Qy(e){return Pa(fs,e)}var ms=y("ZodCUID",(e,t)=>{Il.init(e,t),ge.init(e,t);});function ev(e){return Fa(ms,e)}var hs=y("ZodCUID2",(e,t)=>{Ol.init(e,t),ge.init(e,t);});function tv(e){return ja(hs,e)}var gs=y("ZodULID",(e,t)=>{Cl.init(e,t),ge.init(e,t);});function nv(e){return za(gs,e)}var ys=y("ZodXID",(e,t)=>{Rl.init(e,t),ge.init(e,t);});function rv(e){return Na(ys,e)}var vs=y("ZodKSUID",(e,t)=>{Al.init(e,t),ge.init(e,t);});function iv(e){return Ua(vs,e)}var bs=y("ZodIPv4",(e,t)=>{zl.init(e,t),ge.init(e,t);});function ov(e){return La(bs,e)}var bf=y("ZodMAC",(e,t)=>{Ul.init(e,t),ge.init(e,t);});function av(e){return Fd(bf,e)}var Ss=y("ZodIPv6",(e,t)=>{Nl.init(e,t),ge.init(e,t);});function sv(e){return Ma(Ss,e)}var xs=y("ZodCIDRv4",(e,t)=>{Ll.init(e,t),ge.init(e,t);});function uv(e){return Ba(xs,e)}var Ds=y("ZodCIDRv6",(e,t)=>{Ml.init(e,t),ge.init(e,t);});function cv(e){return Va(Ds,e)}var _s=y("ZodBase64",(e,t)=>{Vl.init(e,t),ge.init(e,t);});function lv(e){return Za(_s,e)}var Es=y("ZodBase64URL",(e,t)=>{Zl.init(e,t),ge.init(e,t);});function dv(e){return Wa(Es,e)}var ws=y("ZodE164",(e,t)=>{Wl.init(e,t),ge.init(e,t);});function pv(e){return Ga(ws,e)}var $s=y("ZodJWT",(e,t)=>{Gl.init(e,t),ge.init(e,t);});function fv(e){return qa($s,e)}var di=y("ZodCustomStringFormat",(e,t)=>{ql.init(e,t),ge.init(e,t);});function mv(e,t,r={}){return oi(di,e,t,r)}function hv(e){return oi(di,"hostname",$t.hostname,e)}function gv(e){return oi(di,"hex",$t.hex,e)}function yv(e,t){let r=t?.enc??"hex",i=`${e}_${r}`,n=$t[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return oi(di,i,n,t)}var pi=y("ZodNumber",(e,t)=>{ba.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Sp(e,i,n),e.gt=(i,n)=>e.check(Yt(i,n)),e.gte=(i,n)=>e.check(nt(i,n)),e.min=(i,n)=>e.check(nt(i,n)),e.lt=(i,n)=>e.check(Kt(i,n)),e.lte=(i,n)=>e.check(mt(i,n)),e.max=(i,n)=>e.check(mt(i,n)),e.int=i=>e.check(cs(i)),e.safe=i=>e.check(cs(i)),e.positive=i=>e.check(Yt(0,i)),e.nonnegative=i=>e.check(nt(0,i)),e.negative=i=>e.check(Kt(0,i)),e.nonpositive=i=>e.check(mt(0,i)),e.multipleOf=(i,n)=>e.check(On(i,n)),e.step=(i,n)=>e.check(On(i,n)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=true,e.format=r.format??null;});function Sf(e){return Md(pi,e)}var or=y("ZodNumberFormat",(e,t)=>{Hl.init(e,t),pi.init(e,t);});function cs(e){return Vd(or,e)}function vv(e){return Zd(or,e)}function bv(e){return Wd(or,e)}function Sv(e){return Gd(or,e)}function xv(e){return qd(or,e)}var fi=y("ZodBoolean",(e,t)=>{Ji.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>xp(e,r,i);});function xf(e){return Hd(fi,e)}var mi=y("ZodBigInt",(e,t)=>{Sa.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Dp(e,i),e.gte=(i,n)=>e.check(nt(i,n)),e.min=(i,n)=>e.check(nt(i,n)),e.gt=(i,n)=>e.check(Yt(i,n)),e.gte=(i,n)=>e.check(nt(i,n)),e.min=(i,n)=>e.check(nt(i,n)),e.lt=(i,n)=>e.check(Kt(i,n)),e.lte=(i,n)=>e.check(mt(i,n)),e.max=(i,n)=>e.check(mt(i,n)),e.positive=i=>e.check(Yt(BigInt(0),i)),e.negative=i=>e.check(Kt(BigInt(0),i)),e.nonpositive=i=>e.check(mt(BigInt(0),i)),e.nonnegative=i=>e.check(nt(BigInt(0),i)),e.multipleOf=(i,n)=>e.check(On(i,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null;});function Dv(e){return Kd(mi,e)}var ks=y("ZodBigIntFormat",(e,t)=>{Jl.init(e,t),mi.init(e,t);});function _v(e){return Xd(ks,e)}function Ev(e){return Qd(ks,e)}var Df=y("ZodSymbol",(e,t)=>{Kl.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>_p(e,r);});function wv(e){return ep(Df,e)}var _f=y("ZodUndefined",(e,t)=>{Yl.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>wp(e,r);});function $v(e){return tp(_f,e)}var Ef=y("ZodNull",(e,t)=>{Xl.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ep(e,r,i);});function wf(e){return np(Ef,e)}var $f=y("ZodAny",(e,t)=>{Ql.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ip();});function kv(){return rp($f)}var kf=y("ZodUnknown",(e,t)=>{ed.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Op();});function ir(){return ip(kf)}var If=y("ZodNever",(e,t)=>{td.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>kp(e,r,i);});function Is(e){return op(If,e)}var Of=y("ZodVoid",(e,t)=>{nd.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>$p(e,r);});function Iv(e){return ap(Of,e)}var uo=y("ZodDate",(e,t)=>{rd.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Cp(e,i),e.min=(i,n)=>e.check(nt(i,n)),e.max=(i,n)=>e.check(mt(i,n));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null;});function Ov(e){return sp(uo,e)}var Cf=y("ZodArray",(e,t)=>{id.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Bp(e,r,i,n),e.element=t.element,e.min=(r,i)=>e.check(mn(r,i)),e.nonempty=r=>e.check(mn(1,r)),e.max=(r,i)=>e.check(nr(r,i)),e.length=(r,i)=>e.check(rr(r,i)),e.unwrap=()=>e.element;});function co(e,t){return lp(Cf,e,t)}function Cv(e){let t=e._zod.def.shape;return Rs(Object.keys(t))}var lo=y("ZodObject",(e,t)=>{od.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Vp(e,r,i,n),k.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>Rs(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ir()}),e.loose=()=>e.clone({...e._zod.def,catchall:ir()}),e.strict=()=>e.clone({...e._zod.def,catchall:Is()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>k.extend(e,r),e.safeExtend=r=>k.safeExtend(e,r),e.merge=r=>k.merge(e,r),e.pick=r=>k.pick(e,r),e.omit=r=>k.omit(e,r),e.partial=(...r)=>k.partial(Ts,e,r[0]),e.required=(...r)=>k.required(Ps,e,r[0]);});function Os(e,t){let r={type:"object",shape:e??{},...k.normalizeParams(t)};return new lo(r)}function Rv(e,t){return new lo({type:"object",shape:e,catchall:Is(),...k.normalizeParams(t)})}function Av(e,t){return new lo({type:"object",shape:e,catchall:ir(),...k.normalizeParams(t)})}var po=y("ZodUnion",(e,t)=>{Ki.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>es(e,r,i,n),e.options=t.options;});function Cs(e,t){return new po({type:"union",options:e,...k.normalizeParams(t)})}var Rf=y("ZodXor",(e,t)=>{po.init(e,t),ad.init(e,t),e._zod.processJSONSchema=(r,i,n)=>es(e,r,i,n),e.options=t.options;});function Tv(e,t){return new Rf({type:"union",options:e,inclusive:false,...k.normalizeParams(t)})}var Af=y("ZodDiscriminatedUnion",(e,t)=>{po.init(e,t),sd.init(e,t);});function Pv(e,t,r){return new Af({type:"union",options:t,discriminator:e,...k.normalizeParams(r)})}var Tf=y("ZodIntersection",(e,t)=>{ud.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Zp(e,r,i,n);});function Pf(e,t){return new Tf({type:"intersection",left:e,right:t})}var Ff=y("ZodTuple",(e,t)=>{xa.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Wp(e,r,i,n),e.rest=r=>e.clone({...e._zod.def,rest:r});});function jf(e,t,r){let i=t instanceof X,n=i?r:t,o=i?t:null;return new Ff({type:"tuple",items:e,rest:o,...k.normalizeParams(n)})}var fo=y("ZodRecord",(e,t)=>{cd.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Gp(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType;});function zf(e,t,r){return new fo({type:"record",keyType:e,valueType:t,...k.normalizeParams(r)})}function Fv(e,t,r){let i=tt(e);return i._zod.values=void 0,new fo({type:"record",keyType:i,valueType:t,...k.normalizeParams(r)})}function jv(e,t,r){return new fo({type:"record",keyType:e,valueType:t,mode:"loose",...k.normalizeParams(r)})}var Nf=y("ZodMap",(e,t)=>{ld.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Lp(e,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Xt(...r)),e.nonempty=r=>e.check(Xt(1,r)),e.max=(...r)=>e.check(Cn(...r)),e.size=(...r)=>e.check(tr(...r));});function zv(e,t,r){return new Nf({type:"map",keyType:e,valueType:t,...k.normalizeParams(r)})}var Uf=y("ZodSet",(e,t)=>{dd.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Mp(e,r),e.min=(...r)=>e.check(Xt(...r)),e.nonempty=r=>e.check(Xt(1,r)),e.max=(...r)=>e.check(Cn(...r)),e.size=(...r)=>e.check(tr(...r));});function Nv(e,t){return new Uf({type:"set",valueType:e,...k.normalizeParams(t)})}var ci=y("ZodEnum",(e,t)=>{pd.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Rp(e,i,n),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(i,n)=>{let o={};for(let a of i)if(r.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new ci({...t,checks:[],...k.normalizeParams(n),entries:o})},e.exclude=(i,n)=>{let o={...t.entries};for(let a of i)if(r.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new ci({...t,checks:[],...k.normalizeParams(n),entries:o})};});function Rs(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new ci({type:"enum",entries:r,...k.normalizeParams(t)})}function Uv(e,t){return new ci({type:"enum",entries:e,...k.normalizeParams(t)})}var Lf=y("ZodLiteral",(e,t)=>{fd.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ap(e,r,i),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 Lv(e,t){return new Lf({type:"literal",values:Array.isArray(e)?e:[e],...k.normalizeParams(t)})}var Mf=y("ZodFile",(e,t)=>{md.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Fp(e,r,i),e.min=(r,i)=>e.check(Xt(r,i)),e.max=(r,i)=>e.check(Cn(r,i)),e.mime=(r,i)=>e.check(Qr(Array.isArray(r)?r:[r],i));});function Mv(e){return dp(Mf,e)}var Bf=y("ZodTransform",(e,t)=>{hd.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Up(e,r),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new En(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(k.issue(o,r.value,t));else {let a=o;a.fatal&&(a.continue=false),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(k.issue(a));}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)};});function As(e){return new Bf({type:"transform",transform:e})}var Ts=y("ZodOptional",(e,t)=>{Da.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ts(e,r,i,n),e.unwrap=()=>e._zod.def.innerType;});function io(e){return new Ts({type:"optional",innerType:e})}var Vf=y("ZodExactOptional",(e,t)=>{gd.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ts(e,r,i,n),e.unwrap=()=>e._zod.def.innerType;});function Zf(e){return new Vf({type:"optional",innerType:e})}var Wf=y("ZodNullable",(e,t)=>{yd.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>qp(e,r,i,n),e.unwrap=()=>e._zod.def.innerType;});function oo(e){return new Wf({type:"nullable",innerType:e})}function Bv(e){return io(oo(e))}var Gf=y("ZodDefault",(e,t)=>{vd.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Jp(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap;});function qf(e,t){return new Gf({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():k.shallowClone(t)}})}var Hf=y("ZodPrefault",(e,t)=>{bd.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Kp(e,r,i,n),e.unwrap=()=>e._zod.def.innerType;});function Jf(e,t){return new Hf({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():k.shallowClone(t)}})}var Ps=y("ZodNonOptional",(e,t)=>{Sd.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Hp(e,r,i,n),e.unwrap=()=>e._zod.def.innerType;});function Kf(e,t){return new Ps({type:"nonoptional",innerType:e,...k.normalizeParams(t)})}var Yf=y("ZodSuccess",(e,t)=>{xd.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>jp(e,r,i),e.unwrap=()=>e._zod.def.innerType;});function Vv(e){return new Yf({type:"success",innerType:e})}var Xf=y("ZodCatch",(e,t)=>{Dd.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Yp(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap;});function Qf(e,t){return new Xf({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var em=y("ZodNaN",(e,t)=>{_d.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Tp(e,r);});function Zv(e){return cp(em,e)}var Fs=y("ZodPipe",(e,t)=>{Ed.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Xp(e,r,i,n),e.in=t.in,e.out=t.out;});function ao(e,t){return new Fs({type:"pipe",in:e,out:t})}var js=y("ZodCodec",(e,t)=>{Fs.init(e,t),Yi.init(e,t);});function Wv(e,t,r){return new js({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}var tm=y("ZodReadonly",(e,t)=>{wd.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Qp(e,r,i,n),e.unwrap=()=>e._zod.def.innerType;});function nm(e){return new tm({type:"readonly",innerType:e})}var rm=y("ZodTemplateLiteral",(e,t)=>{$d.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Pp(e,r,i);});function Gv(e,t){return new rm({type:"template_literal",parts:e,...k.normalizeParams(t)})}var im=y("ZodLazy",(e,t)=>{Od.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>tf(e,r,i,n),e.unwrap=()=>e._zod.def.getter();});function om(e){return new im({type:"lazy",getter:e})}var am=y("ZodPromise",(e,t)=>{Id.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>ef(e,r,i,n),e.unwrap=()=>e._zod.def.innerType;});function qv(e){return new am({type:"promise",innerType:e})}var sm=y("ZodFunction",(e,t)=>{kd.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Np(e,r);});function Hv(e){return new sm({type:"function",input:Array.isArray(e?.input)?jf(e?.input):e?.input??co(ir()),output:e?.output??ir()})}var mo=y("ZodCustom",(e,t)=>{Cd.init(e,t),ee.init(e,t),e._zod.processJSONSchema=(r,i,n)=>zp(e,r);});function Jv(e){let t=new ye({check:"custom"});return t._zod.check=e,t}function Kv(e,t){return pp(mo,e??(()=>true),t)}function um(e,t={}){return fp(mo,e,t)}function cm(e){return mp(e)}var Yv=hp,Xv=gp;function Qv(e,t={}){let r=new mo({type:"custom",check:"custom",fn:i=>i instanceof e,abort:true,...k.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]});},r}var eb=(...e)=>yp({Codec:js,Boolean:fi,String:li},...e);function tb(e){let t=om(()=>Cs([ui(e),Sf(),xf(),wf(),co(t),zf(ui(),t)]));return t}function nb(e,t){return ao(As(e),t)}var H0={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"};function J0(e){$e({customError:e});}function K0(){return $e().customError}var lm;lm||(lm={});var P={...no,...is,iso:si},Y0=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 X0(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function Q0(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){let n=r[1];if(!n||!t.defs[n])throw new Error(`Reference not found: ${e}`);return t.defs[n]}throw new Error(`Reference not found: ${e}`)}function rb(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return P.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 n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return P.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let o=Q0(n,t),a=He(o,t);return t.refs.set(n,a),t.processing.delete(n),a}if(e.enum!==void 0){let n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===true&&n.length===1&&n[0]===null)return P.null();if(n.length===0)return P.never();if(n.length===1)return P.literal(n[0]);if(n.every(a=>typeof a=="string"))return P.enum(n);let o=n.map(a=>P.literal(a));return o.length<2?o[0]:P.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return P.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map(o=>{let a={...e,type:o};return rb(a,t)});return n.length===0?P.never():n.length===1?n[0]:P.union(n)}if(!r)return P.any();let i;switch(r){case "string":{let n=P.string();if(e.format){let o=e.format;o==="email"?n=n.check(P.email()):o==="uri"||o==="uri-reference"?n=n.check(P.url()):o==="uuid"||o==="guid"?n=n.check(P.uuid()):o==="date-time"?n=n.check(P.iso.datetime()):o==="date"?n=n.check(P.iso.date()):o==="time"?n=n.check(P.iso.time()):o==="duration"?n=n.check(P.iso.duration()):o==="ipv4"?n=n.check(P.ipv4()):o==="ipv6"?n=n.check(P.ipv6()):o==="mac"?n=n.check(P.mac()):o==="cidr"?n=n.check(P.cidrv4()):o==="cidr-v6"?n=n.check(P.cidrv6()):o==="base64"?n=n.check(P.base64()):o==="base64url"?n=n.check(P.base64url()):o==="e164"?n=n.check(P.e164()):o==="jwt"?n=n.check(P.jwt()):o==="emoji"?n=n.check(P.emoji()):o==="nanoid"?n=n.check(P.nanoid()):o==="cuid"?n=n.check(P.cuid()):o==="cuid2"?n=n.check(P.cuid2()):o==="ulid"?n=n.check(P.ulid()):o==="xid"?n=n.check(P.xid()):o==="ksuid"&&(n=n.check(P.ksuid()));}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),i=n;break}case "number":case "integer":{let n=r==="integer"?P.number().int():P.number();typeof e.minimum=="number"&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===true&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===true&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),i=n;break}case "boolean":{i=P.boolean();break}case "null":{i=P.null();break}case "object":{let n={},o=e.properties||{},a=new Set(e.required||[]);for(let[c,l]of Object.entries(o)){let d=He(l,t);n[c]=a.has(c)?d:d.optional();}if(e.propertyNames){let c=He(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?He(e.additionalProperties,t):P.any();if(Object.keys(n).length===0){i=P.record(c,l);break}let d=P.object(n).passthrough(),p=P.looseRecord(c,l);i=P.intersection(d,p);break}if(e.patternProperties){let c=e.patternProperties,l=Object.keys(c),d=[];for(let m of l){let h=He(c[m],t),v=P.string().regex(new RegExp(m));d.push(P.looseRecord(v,h));}let p=[];if(Object.keys(n).length>0&&p.push(P.object(n).passthrough()),p.push(...d),p.length===0)i=P.object({}).passthrough();else if(p.length===1)i=p[0];else {let m=P.intersection(p[0],p[1]);for(let h=2;h<p.length;h++)m=P.intersection(m,p[h]);i=m;}break}let u=P.object(n);e.additionalProperties===false?i=u.strict():typeof e.additionalProperties=="object"?i=u.catchall(He(e.additionalProperties,t)):i=u.passthrough();break}case "array":{let n=e.prefixItems,o=e.items;if(n&&Array.isArray(n)){let a=n.map(c=>He(c,t)),u=o&&typeof o=="object"&&!Array.isArray(o)?He(o,t):void 0;u?i=P.tuple(a).rest(u):i=P.tuple(a),typeof e.minItems=="number"&&(i=i.check(P.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(P.maxLength(e.maxItems)));}else if(Array.isArray(o)){let a=o.map(c=>He(c,t)),u=e.additionalItems&&typeof e.additionalItems=="object"?He(e.additionalItems,t):void 0;u?i=P.tuple(a).rest(u):i=P.tuple(a),typeof e.minItems=="number"&&(i=i.check(P.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(P.maxLength(e.maxItems)));}else if(o!==void 0){let a=He(o,t),u=P.array(a);typeof e.minItems=="number"&&(u=u.min(e.minItems)),typeof e.maxItems=="number"&&(u=u.max(e.maxItems)),i=u;}else i=P.array(P.any());break}default:throw new Error(`Unsupported type: ${r}`)}return e.description&&(i=i.describe(e.description)),e.default!==void 0&&(i=i.default(e.default)),i}function He(e,t){if(typeof e=="boolean")return e?P.any():P.never();let r=rb(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let u=e.anyOf.map(l=>He(l,t)),c=P.union(u);r=i?P.intersection(r,c):c;}if(e.oneOf&&Array.isArray(e.oneOf)){let u=e.oneOf.map(l=>He(l,t)),c=P.xor(u);r=i?P.intersection(r,c):c;}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=i?r:P.any();else {let u=i?r:He(e.allOf[0],t),c=i?0:1;for(let l=c;l<e.allOf.length;l++)u=P.intersection(u,He(e.allOf[l],t));r=u;}e.nullable===true&&t.version==="openapi-3.0"&&(r=P.nullable(r)),e.readOnly===true&&(r=P.readonly(r));let n={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let u of o)u in e&&(n[u]=e[u]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let u of a)u in e&&(n[u]=e[u]);for(let u of Object.keys(e))Y0.has(u)||(n[u]=e[u]);return Object.keys(n).length>0&&t.registry.add(r,n),r}function ib(e,t){if(typeof e=="boolean")return e?P.any():P.never();let r=X0(e,t?.defaultTarget),i=e.$defs||e.definitions||{},n={version:r,defs:i,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??qe};return He(e,n)}var dm={};b(dm,{bigint:()=>rI,boolean:()=>nI,date:()=>iI,number:()=>tI,string:()=>eI});function eI(e){return Pd(li,e)}function tI(e){return Bd(pi,e)}function nI(e){return Jd(fi,e)}function rI(e){return Yd(mi,e)}function iI(e){return up(uo,e)}$e(_a());async function ob({ms:e,signal:t}){t?.throwIfAborted(),await new Promise(r=>{let n=setTimeout(()=>{t?.removeEventListener("abort",o),r();},e),o=()=>{clearTimeout(n),r();};t?.addEventListener("abort",o,{once:true});}),t?.throwIfAborted();}var aI=300;function ab(e){return sb({...e,attempt:1})}async function sb(e){let t=await sI(e);return !t.retryable||e.attempt>=e.policy.attempts?t.outcome:(await ob({ms:uI(e.attempt),signal:e.init.signal??void 0}),sb({...e,attempt:e.attempt+1}))}async function sI({fetch:e,init:t,policy:r,url:i}){try{t.signal?.throwIfAborted();let n=AbortSignal.timeout(r.timeoutMs),o=t.signal==null?n:AbortSignal.any([t.signal,n]),a=await e(i,{...t,signal:o});return {outcome:{kind:"response",response:a},retryable:a.status>=500}}catch(n){return t.signal?.throwIfAborted(),{outcome:{detail:n instanceof Error?n.message:String(n),kind:"unreachable"},retryable:true}}}function uI(e){return aI*3**(e-1)*(.5+Math.random())}var cI=15e3,lI=3,zs=class extends Error{detail;serverUrl;constructor({detail:t,serverUrl:r}){super(`Failed to connect to Ripplo server at ${r}. Check the server is running and reachable. Details: ${t}`),this.name="GqlConnectionError",this.detail=t,this.serverUrl=r;}},ar=class extends Error{errors;constructor(t){super(t.map(r=>r.message).join(", ")),this.name="GqlRequestError",this.errors=t;}};function pm(e){if(e instanceof ar)return e.errors[0]?.extensions?.code}var dI={attempts:lI,timeoutMs:cI};async function Ae(e){return pI({headers:{},params:e,policy:dI,signal:void 0})}async function pI(e){let{headers:t,params:r,policy:i}=e,{print:n}=await import('./graphql-Z4UDRCDF.js'),o=n(r.document),a=JSON.stringify({query:o,variables:r.variables}),u=`${r.config.ripploServerUrl}/graphql`,c=await fI({init:{body:a,headers:{...t,Authorization:`Bearer ${r.config.token}`,"Content-Type":"application/json"},method:"POST",signal:e.signal},policy:i,serverUrl:r.config.ripploServerUrl,url:u}),l=await mI({res:c,url:u});if(!hI(l))throw new Error("Invalid GraphQL response");if(gI(l))throw new ar(l.errors);if(l.data==null)throw new Error("No data returned from server");return l.data}async function fI({init:e,policy:t,serverUrl:r,url:i}){let n=await ab({fetch:globalThis.fetch,init:e,policy:t,url:i});if(n.kind==="response"&&n.response.status<500)return n.response;throw new zs({detail:n.kind==="response"?`server returned status ${String(n.response.status)}`:n.detail,serverUrl:r})}async function mI({res:e,url:t}){let r=await e.text();if(r.length===0)throw new Error(`Empty response from Ripplo server at ${t} (status ${String(e.status)}). The server may have restarted or the request was rejected before a body was sent.`);try{return JSON.parse(r)}catch{throw new Error(`Non-JSON response from Ripplo server at ${t} (status ${String(e.status)}): ${r.slice(0,200)}`)}}function hI(e){return typeof e=="object"&&e!=null&&("data"in e||"errors"in e)}function gI(e){return Array.isArray(e.errors)&&e.errors.length>0}var hi=s.enum(["gt","gte","lt","lte"]),gi=s.union([s.string(),s.number(),s.boolean(),s.null()]),Te=s.json();s.record(s.string().min(1),Te);var ue=s.object({path:s.array(s.string().min(1)),source:s.string().min(1)}),yI=s.enum(["observed","setup"]),ub=s.intersection(ue,s.object({ownership:yI}));var dt=s.lazy(()=>s.discriminatedUnion("kind",[s.object({kind:s.literal("value"),value:gi}),s.object({kind:s.literal("reference"),path:s.array(s.string().min(1)).min(1),record:s.string().min(1)}),s.object({kind:s.literal("path"),selector:ue}),s.object({kind:s.literal("count"),selection:ho}),s.object({kind:s.literal("add"),left:dt,right:dt}),s.object({dividend:dt,divisor:dt,kind:s.literal("divide")}),s.object({kind:s.literal("concat"),values:s.array(dt).min(1)}),s.object({kind:s.literal("invert"),value:dt}),s.object({kind:s.literal("before")}),s.object({kind:s.literal("after")})])),Lt=s.lazy(()=>s.discriminatedUnion("kind",[s.object({kind:s.literal("equals"),left:dt,right:dt}),s.object({kind:s.literal("compare"),left:dt,op:hi,right:dt}),s.object({kind:s.literal("text"),left:dt,op:s.enum(["contains","startsWith"]),right:dt}),s.object({kind:s.literal("exists"),selection:ho}),s.object({kind:s.literal("not"),relation:Lt}),s.object({kind:s.literal("and"),relations:s.array(Lt).min(1)}),s.object({kind:s.literal("or"),relations:s.array(Lt).min(1)})])),ho=s.lazy(()=>s.object({alias:s.string().min(1),relation:Lt.nullable(),selector:ue}));var cb=s.enum(["fast","slow","async"]),go=s.object({ref:s.string().min(1)}),ur=s.union([s.string(),s.number(),s.boolean()]);var Ns=s.object({template:s.array(s.union([s.string(),go,dt])).min(1)}),lb=s.lazy(()=>s.union([go,ur,Ns])),sr=s.lazy(()=>s.union([lb,s.null()])),vI=s.lazy(()=>s.discriminatedUnion("kind",[s.object({kind:s.literal("not"),value:sr}),s.object({kind:s.literal("compare"),op:hi,value:sr}),s.object({kind:s.literal("anyOf"),values:s.array(sr).min(1)}),s.object({kind:s.literal("contains"),value:Mt}),s.object({kind:s.literal("startsWith"),value:Mt})])),bI=s.lazy(()=>s.object({entity:s.string().min(1),where:s.record(s.string().min(1),xI).default({})})),SI=s.lazy(()=>s.object({field:s.string().min(1),kind:s.literal("within"),selection:bI})),xI=s.lazy(()=>s.union([sr,SI,vI])),fm=s.lazy(()=>s.union([Mt,s.object({kind:s.literal("contains"),value:Mt}),s.object({kind:s.literal("startsWith"),value:Mt})])),DI=s.union([s.literal("increased"),s.literal("decreased")]),_I=s.object({direction:s.union([DI,s.undefined()]).optional().transform(e=>e),kind:s.literal("changed")});s.union([sr,_I]);var Mt=s.union([s.string(),go,Ns]);var EI=s.object({by:s.literal("role"),name:s.union([Mt,s.undefined()]).optional().transform(e=>e),role:s.string().min(1)}),wI=s.object({by:s.literal("testId"),value:Mt}),$I=s.object({by:s.literal("inside"),scope:s.lazy(()=>Ve),target:s.lazy(()=>Ve)}),kI=s.object({by:s.literal("surface"),container:s.lazy(()=>Ve),overlay:s.boolean()}),II=s.object({by:s.literal("frame"),element:s.lazy(()=>Ve)}),Ve=s.discriminatedUnion("by",[EI,wI,s.object({by:s.literal("element"),name:s.string().min(1),values:s.record(s.string().min(1),lb)}),$I,kI,II]),yo=s.enum(["string","number","boolean"]),db=s.enum(["strict","eventual"]),OI=s.enum(["companyName","email","fullName","id","slug","url","word"]),CI=s.object({kind:s.literal("pattern"),maxLength:s.number().int().positive().optional(),minLength:s.number().int().nonnegative().optional(),name:s.string().min(1),pattern:s.string().min(1),refine:s.string().min(1).optional(),sampler:OI.optional()}),RI=s.object({kind:s.literal("enum"),name:s.string().min(1),values:s.array(ur).min(1)}),AI=s.object({kind:s.literal("number"),max:s.number().int(),min:s.number().int(),name:s.string().min(1)}),TI=s.object({kind:s.literal("boolean"),name:s.string().min(1)}),PI=s.object({kind:s.literal("datetime"),maxOffsetDays:s.number().int(),minOffsetDays:s.number().int(),name:s.string().min(1)}),pb=s.discriminatedUnion("kind",[CI,RI,AI,TI,PI]);var FI=s.object({consistency:db.default("strict"),optional:s.boolean(),type:yo,valueSpace:s.string().min(1).optional()}),fb=s.enum(["backend","client"]);s.object({description:s.string().optional(),identity:s.array(s.string().min(1)).min(1),identityKind:s.enum(["surrogate","natural"]),name:s.string().min(1),principal:s.boolean().default(false),props:s.record(s.string().min(1),FI),source:fb.default("backend")});s.object({consistency:db.default("strict"),default:ur,description:s.string().optional(),name:s.string().min(1),source:fb.default("backend"),type:yo,valueSpace:s.string().min(1).optional()});var mb=s.enum(["url","title","viewport"]),hb=s.enum(["mobile","desktop"]);var _e=s.lazy(()=>s.discriminatedUnion("by",[s.object({by:s.literal("role"),name:s.union([s.string(),s.undefined()]).optional().transform(e=>e),role:s.string()}),s.object({by:s.literal("testId"),value:s.string()}),s.object({by:s.literal("element"),name:s.string().min(1),values:s.record(s.string(),ur)}),s.object({by:s.literal("inside"),scope:_e,target:_e}),s.object({by:s.literal("surface"),container:_e,overlay:s.boolean()}),s.object({by:s.literal("frame"),element:_e})])),gb=s.union([s.string(),s.number(),s.boolean(),s.null()]),Us=s.discriminatedUnion("kind",[s.object({kind:s.literal("goto"),url:s.string()}),s.object({kind:s.literal("fill"),locator:_e,value:gb}),s.object({kind:s.literal("clear"),locator:_e}),s.object({kind:s.literal("click"),locator:_e}),s.object({kind:s.literal("dblclick"),locator:_e}),s.object({kind:s.literal("select"),locator:_e,value:gb}),s.object({kind:s.literal("check"),locator:_e}),s.object({kind:s.literal("uncheck"),locator:_e}),s.object({kind:s.literal("hover"),locator:_e}),s.object({files:s.array(s.string().min(1)).min(1),kind:s.literal("upload"),locator:_e}),s.object({key:s.string().min(1),kind:s.literal("press"),locator:_e.optional()}),s.object({kind:s.literal("drag"),source:_e,target:_e})]);var jI=s.object({actual:s.string(),expected:s.string(),log:s.array(s.string()),name:s.string(),timeoutMs:s.number().int().nullable()}),zI=s.object({label:s.string().min(1),role:s.string().min(1)}),NI=3,Ls=s.object({ancestors:s.array(zI).max(NI),name:s.string().nullable(),role:s.string().nullable(),tag:s.string(),visible:s.boolean()}),yi={expectedRole:s.string().nullable()},vo={...yi,description:s.string()},Ms=s.discriminatedUnion("kind",[s.object({...vo,issues:s.array(s.string()),kind:s.literal("binding-values-invalid")}),s.object({...vo,kind:s.literal("binding-unbound"),locator:_e}),s.object({...vo,kind:s.literal("binding-missed"),locator:_e}),s.object({...vo,aliasOf:s.string().min(1),kind:s.literal("binding-alias")}),s.object({...vo,kind:s.literal("binding-unattributed"),reason:s.enum(["unbound","missed"])})]);new Set(Ms.options.map(e=>e.shape.kind.value));var UI=s.discriminatedUnion("kind",[...Ms.options,s.object({...yi,kind:s.literal("absent")}),s.object({...yi,kind:s.literal("hidden"),matches:s.array(Ls).min(1)}),s.object({...yi,kind:s.literal("ambiguous"),matches:s.array(Ls).min(2)}),s.object({...yi,kind:s.literal("text-elsewhere"),match:Ls,partial:s.boolean()}),s.object({...yi,actualName:s.string(),kind:s.literal("name-differs"),match:Ls})]),en=s.object({ariaSnapshot:s.string().nullable(),matcher:jI.nullable(),message:s.string(),miss:UI.nullable()});var Bs=s.object({path:s.array(s.string().min(1)),recordKeyIndex:s.number().int().nonnegative().nullable(),source:s.string().min(1)});var LI=s.record(s.string(),Te),MI=s.object({module:s.string().min(1)}),BI=s.object({implementation:MI.optional(),jsonSchema:LI,name:s.string().min(1),schemaHash:s.string().regex(/^[0-9a-f]{64}$/u)});s.object({binding:BI,datetimePaths:s.array(Bs).default([]),eventualPaths:s.array(Bs).default([]),recordPaths:s.array(ub).default([]),setupPaths:s.array(Bs).default([])});var yb=s.discriminatedUnion("kind",[s.object({kind:s.literal("equals"),selector:ue,value:Te}),s.object({kind:s.literal("absent-path"),selector:ue}),s.object({alias:s.string().min(1),fields:s.record(s.string().min(1),Te),kind:s.literal("required-record"),selector:ue}),s.object({fields:s.record(s.string().min(1),Te),kind:s.literal("absent-record"),selector:ue}),s.object({kind:s.literal("closed-record"),rows:s.array(Te),selector:ue}),s.object({kind:s.literal("relation"),label:s.string().min(1),relation:Lt})]);var VI=s.discriminatedUnion("kind",[s.object({kind:s.literal("transform"),relation:Lt}),s.object({kind:s.literal("value"),value:Te}),s.object({kind:s.literal("reference"),path:s.array(s.string().min(1)).min(1),record:s.string().min(1)})]),ZI=s.discriminatedUnion("kind",[s.object({kind:s.literal("null")}),s.object({kind:s.literal("scalar"),nullable:s.boolean(),type:yo})]),vb=s.object({domain:ZI,kind:s.literal("state-ref"),path:s.array(s.string().min(1)).min(1)}),WI=s.discriminatedUnion("kind",[s.object({kind:s.literal("absent")}),s.object({kind:s.literal("generated")}),vb,s.object({kind:s.literal("value"),value:Te}),s.object({kind:s.literal("reference"),path:s.array(s.string().min(1)).min(1),record:s.string().min(1)})]),Vs=s.discriminatedUnion("kind",[s.object({kind:s.literal("set"),selector:ue,value:Te}),s.object({kind:s.literal("transform"),relation:Lt,selector:ue}),s.object({kind:s.literal("create-path"),selector:ue,value:Te}),s.object({kind:s.literal("delete-path"),selector:ue}),s.object({as:s.string().min(1),fields:s.record(s.string().min(1),WI),kind:s.literal("create-record"),selector:ue}),s.object({kind:s.literal("delete-selected-records"),selection:ho,selector:ue}),s.object({changes:s.record(s.string().min(1),VI),kind:s.literal("update-selected-records"),selection:ho,selector:ue})]);s.object({constraints:s.array(yb),effects:s.array(Vs)});var gn=s.discriminatedUnion("present",[s.object({present:s.literal(false)}),s.object({present:s.literal(true),value:Te})]),mm=s.discriminatedUnion("kind",[s.object({actual:gn,constraint:yb,kind:s.literal("constraint"),selector:ue}),s.object({actual:gn,before:gn,effect:Vs,kind:s.literal("effect"),selector:ue,targetKeys:s.array(s.string())}),s.object({actual:gn,before:gn,kind:s.literal("unexpected-change"),selector:ue})]);s.object({mismatches:s.array(mm),requiredStateHolds:s.boolean()});var GI=s.discriminatedUnion("kind",[s.object({kind:s.literal("state")}),s.object({kind:s.literal("record"),path:s.array(s.string().min(1)).min(1)})]),Pn=s.lazy(()=>s.discriminatedUnion("kind",[s.object({fields:s.record(s.string().min(1),Pn),kind:s.literal("object")}),s.object({items:s.array(Pn),kind:s.literal("array")}),s.object({kind:s.literal("generate"),name:s.string().min(1),nullable:s.boolean(),space:pb,type:yo}),s.object({kind:s.literal("reference"),operation:s.string().min(1),path:s.array(s.string().min(1))}),vb,s.object({kind:s.literal("value"),value:Te})]));var qI=s.object({id:s.string().min(1),input:Pn,optional:s.boolean(),source:s.string().min(1),target:GI});var bo=s.discriminatedUnion("kind",[s.object({kind:s.literal("equals"),selector:ue,value:Pn}),s.object({kind:s.literal("absent-path"),selector:ue}),s.object({alias:s.string().min(1),kind:s.literal("optional-path"),operation:s.string().min(1),selector:ue,value:Pn}),s.object({alias:s.string().min(1),fields:s.record(s.string().min(1),Pn),kind:s.literal("required-record"),selector:ue}),s.object({alias:s.string().min(1),fields:s.record(s.string().min(1),Pn),kind:s.literal("optional-record"),selector:ue}),s.object({fields:s.record(s.string().min(1),Pn),kind:s.literal("absent-record"),selector:ue}),s.object({kind:s.literal("closed-record"),operations:s.array(s.string().min(1)),selector:ue}),s.object({kind:s.literal("relation"),label:s.string().min(1),relation:Lt})]);s.object({constraints:s.array(bo),operations:s.array(qI)});var HI=s.object({added:s.array(Te),collection:s.string().min(1),declared:s.record(s.string().min(1),Te),pending:s.record(s.string().min(1),s.enum(["absent","generated","reference","unresolved"]))}),hm=s.enum(["create-session","teardown"]),JI=s.enum(["unconfigured","navigate","not-signed-in","ticket-rejected"]),KI=s.enum(["create","read","setup"]),YI=s.discriminatedUnion("kind",[s.object({kind:s.literal("field"),name:s.string()}),s.object({kind:s.literal("record-entry")}),s.object({kind:s.literal("array-entry")})]),XI=s.object({issues:s.array(s.object({branches:s.array(s.number().int().nonnegative()),code:s.enum(["invalid_type","too_big","too_small","invalid_format","not_multiple_of","unrecognized_keys","invalid_union","invalid_key","invalid_element","invalid_value","custom"]),path:s.array(s.union([s.string(),s.number()])),schemaPath:s.array(YI)})).min(1),schemaHash:s.string()}),bb=[s.object({detail:s.string(),kind:s.literal("authentication-http"),operation:hm,status:s.number().int()}),s.object({code:s.string().nullable(),kind:s.literal("authentication-network"),message:s.string(),operation:hm}),s.object({kind:s.literal("app-not-ready"),timeoutMs:s.number().int()}),s.object({kind:s.literal("authentication-response"),message:s.string(),operation:hm}),s.object({detail:s.string(),kind:s.literal("sign-in-failed"),stage:JI}),s.object({kind:s.literal("binding-failed"),message:s.string(),operation:KI,validation:XI.optional()}),s.object({kind:s.literal("state-setup"),message:s.string()}),s.object({fields:s.record(s.string().min(1),Te),kind:s.literal("read-only-record-unmatched"),selector:ue}),s.object({kind:s.literal("driver-launch"),message:s.string()}),s.object({kind:s.literal("state-effect-reference"),path:s.array(s.string()),record:s.string(),unbound:s.array(HI).optional()}),s.object({kind:s.literal("run-failed"),message:s.string()}),s.object({kind:s.literal("model-preparation"),message:s.string()}),s.object({action:s.string().optional(),kind:s.literal("workflow-plan"),reason:s.enum(["required-state-unsatisfied","no-effect","unresolvable","contradictory-expectations","action-relationship-unmet","invalid-state-effect"]),stepIndex:s.number().int().nonnegative(),test:s.string().min(1),unmet:s.string().optional()}),s.object({binding:Ms.optional(),kind:s.literal("page-read"),message:s.string()}),s.object({kind:s.literal("state-mismatch"),mismatches:s.array(mm).min(1)}),s.object({kind:s.literal("aborted")})],Sb=s.discriminatedUnion("kind",[...bb]);s.discriminatedUnion("kind",[...bb,s.object({action:s.string(),failure:en,kind:s.literal("action-failed")}),s.object({failure:en,kind:s.literal("check-failed")})]);var QI=new Set(["localhost","127.0.0.1","[::1]"]),xb="*";var gm="zz-ripplo-wildcard-zz",eO=2;function vi(e){let t=URL.parse(tO(e));if(t==null||!ym(t)||e.includes("#"))return null;let r=e.split(xb).length-1;if(r===0)return {kind:"exact",url:e};if(r>1||!t.hostname.includes(gm))return null;let i=t.hostname.split("."),n=i.findIndex(o=>o.includes(gm));return i.length-n-1<eO?null:{kind:"host-pattern",url:e}}function tO(e){return e.replace(xb,gm)}function ym(e){return e.protocol==="https:"?true:e.protocol==="http:"&&QI.has(e.hostname)}var vm=500,nO=/^(?:\d{1,3}(?:\.\d{1,3}){3}|\[.*\])$/u,Zs=s.string().trim().max(vm).refine(e=>wb(e),{message:"Must be an https URL with a hostname such as example.com, not an IP address. Plain http is allowed only on localhost."}),Ws=s.string().trim().min(1,"Required.").max(vm).refine(e=>e.startsWith("/")||wb(e),{message:"Must be a path starting with / or a full https URL. Plain http is allowed only on localhost."}),Db=s.string().trim().min(1,"Required.").max(60).regex(/^\S+$/u,"No spaces. The name is typed as auth=<name> in a GitHub comment."),cr=s.string().trim().min(1,"Required.").max(vm).refine(e=>vi(e)!=null,{message:"Must be an https address with no fragment. Plain http is allowed only on localhost. One * is allowed in the hostname, not in its last two labels."}),rO={name:Db,redirectUris:s.array(s.object({value:cr})).min(1,"Add at least one redirect URI."),signInEntry:Ws},_b="********",iO=s.object({enabled:s.literal(false)}),oO=s.object({baseUrl:Zs,enabled:s.literal(true),token:s.string().min(1,"Required.")}),Eb={...rO,scim:s.discriminatedUnion("enabled",[iO,oO])};s.object(Eb).transform(({redirectUris:e,scim:t,...r})=>({...r,redirectUris:e.map(i=>i.value),scim:t.enabled?{baseUrl:t.baseUrl,token:t.token}:null}));s.object(Eb).transform(({redirectUris:e,scim:t,...r})=>({...r,redirectUris:e.map(i=>i.value),scim:t.enabled?{baseUrl:t.baseUrl,token:t.token===_b?null:t.token}:null}));function wb(e){let t=URL.parse(e);return t!=null&&ym(t)&&t.hostname.length>0&&!nO.test(t.hostname)}var bm=cr;function Gs(e){let t=s.discriminatedUnion("expect",[s.object({expect:s.literal("is"),value:e}),s.object({expect:s.literal("not"),value:e}),s.object({expect:s.literal("absent")})]);return s.union([t,s.object({clauses:s.tuple([t,t]).rest(t).readonly(),expect:s.literal("all")})])}var uO=s.discriminatedUnion("kind",[s.object({kind:s.literal("path")}),s.object({key:s.string().min(1),kind:s.literal("query")}),s.object({kind:s.literal("hash")})]),Bt=s.union([cb,s.undefined()]).optional().transform(e=>e),tn=s.union([s.boolean(),s.undefined()]).optional().transform(e=>e),xm=s.object({alias:s.string().min(1),kind:s.literal("optional-record")}),Dm=s.object({alias:s.string().min(1),kind:s.literal("optional-path")}),_m=s.object({kind:s.literal("state-equals"),selector:ue,value:gi}),Em=s.object({kind:s.literal("state-compare"),op:hi,selector:ue,value:s.union([s.number(),s.string()])}),wm=s.object({kind:s.literal("state-relation"),relation:Lt}),cO=s.object({kind:s.literal("viewport"),value:hb}),Sm=s.lazy(()=>s.discriminatedUnion("kind",[Dm,xm,Em,_m,wm,s.object({kind:s.literal("not"),predicate:Sm}),s.object({kind:s.literal("and"),predicates:s.array(Sm)}),s.object({kind:s.literal("or"),predicates:s.array(Sm).min(1)})])),qs=s.lazy(()=>s.discriminatedUnion("kind",[Dm,xm,Em,_m,wm,cO,s.object({kind:s.literal("not"),predicate:qs}),s.object({kind:s.literal("and"),predicates:s.array(qs)}),s.object({kind:s.literal("or"),predicates:s.array(qs).min(1)})])),lO=s.lazy(()=>s.object({condition:s.union([qs,s.undefined()]).optional().transform(e=>e),consequence:s.array(bi),effects:s.array(Vs).default([]),name:s.string().min(1)})),bi=s.lazy(()=>s.discriminatedUnion("kind",[s.object({ephemeral:tn,kind:s.literal("visible"),locator:Ve,wait:Bt}),s.object({ephemeral:tn,kind:s.literal("unobstructed"),locator:Ve,wait:Bt}),s.object({ephemeral:tn,kind:s.literal("disabled"),locator:Ve,wait:Bt}),s.object({ephemeral:tn,kind:s.literal("enabled"),locator:Ve,wait:Bt}),s.object({ephemeral:tn,kind:s.literal("focused"),locator:Ve,wait:Bt}),s.object({ephemeral:tn,kind:s.literal("checked"),locator:Ve,wait:Bt}),s.object({ephemeral:tn,kind:s.literal("expanded"),locator:Ve,wait:Bt}),s.object({ephemeral:tn,kind:s.literal("pressed"),locator:Ve,wait:Bt}),s.object({ephemeral:tn,kind:s.literal("value"),locator:Ve,value:fm,wait:Bt}),s.object({ephemeral:tn,kind:s.literal("text"),locator:Ve,value:fm,wait:Bt}),s.object({kind:s.literal("browser"),name:mb,part:s.union([uO,s.undefined()]).optional().transform(e=>e),value:s.union([Mt,s.null()]),wait:Bt}),s.object({kind:s.literal("not"),predicate:bi}),s.object({kind:s.literal("and"),predicates:s.array(bi)}),s.object({kind:s.literal("or"),predicates:s.array(bi).min(1)}),Dm,xm,Em,_m,wm,s.object({branches:s.array(lO),kind:s.literal("when")})]));var $m=s.enum(["visible","enabled","focused","checked","expanded","pressed","value","text"]),km=s.discriminatedUnion("kind",[s.object({kind:s.literal("variable"),name:s.string().min(1)}),s.object({kind:s.literal("path")}),s.object({key:s.string().min(1),kind:s.literal("query")}),s.object({kind:s.literal("hash")}),s.object({kind:s.literal("title")}),s.object({kind:s.literal("viewport")})]),dO=s.discriminatedUnion("kind",[...km.options,s.object({kind:s.literal("element"),locator:Ve,state:$m})]),pO=Gs(sr),fO=s.object({expect:pO,subject:dO}),Hs=s.number().int().nonnegative(),mO=s.discriminatedUnion("kind",[s.object({kind:s.literal("user")}),s.object({kind:s.literal("anonymous")}),s.object({kind:s.literal("any")})]),$b=s.discriminatedUnion("kind",[s.object({kind:s.literal("user")}),s.object({kind:s.literal("anonymous")})]),hO=s.object({actor:mO.default({kind:"any"}),scalars:s.array(Hs)}),gO=s.discriminatedUnion("kind",[s.object({kind:s.literal("test"),test:s.string().min(1)}),s.object({kind:s.literal("declared"),name:s.string().min(1)})]),yO=s.object({consequence:bi,localConsequence:s.boolean(),logicalWhen:s.array(bo).default([]),origin:s.union([gO,s.undefined()]).optional().transform(e=>e),refs:s.array(s.string()),when:Hs}),vO=s.object({facts:s.array(yO),overrides:s.record(s.string(),s.array(s.string()))}),bO=s.object({stepIndex:s.union([s.number().int().nonnegative(),s.undefined()]).optional().transform(e=>e),testRef:s.string().min(1),testSlug:s.string().min(1),workflowIntent:s.string().min(1),workflowSlug:s.string().min(1)}),SO=s.object({steps:s.array(s.object({borrowed:s.array(Hs),stepIndex:s.number().int().nonnegative()})),testRef:s.string().min(1),testSlug:s.string().min(1),workflowSlug:s.string().min(1)}),xO=s.object({fact:Hs,origins:s.array(bO)});vO.extend({epoch:s.string().optional(),factPool:s.array(xO),factReports:s.array(SO),patternTable:s.array(hO),scalarTable:s.array(fO)});var kb=s.object({__codec:s.string().min(1),data:s.unknown(),version:s.number().int().positive()}),Js=class extends Error{codec;currentVersion;gotVersion;constructor(t){super(`Unsupported ${t.codec} version ${String(t.gotVersion)} (current ${String(t.currentVersion)}). Upgrade Ripplo or rebuild with a compatible CLI.`),this.name="CodecVersionError",this.codec=t.codec,this.currentVersion=t.currentVersion,this.gotVersion=t.gotVersion;}},Ks=class extends Error{constructor(t){super(`Codec mismatch: expected "${t.expected}", got "${t.got}"`),this.name="CodecMismatchError";}};function Ib({name:e,schema:t,steps:r=[]}){let i=r.length+1;return {currentVersion:i,minimumVersion:r.reduce((n,o,a)=>o.kind==="semantic"?a+2:n,1),name:e,decode:n=>DO({name:e,raw:n,schema:t,steps:r}),encode:n=>({__codec:e,data:n,version:i}),versionOf:n=>{let o=kb.parse(n);if(o.__codec!==e)throw new Ks({expected:e,got:o.__codec});return o.version}}}function DO({name:e,raw:t,schema:r,steps:i}){let n=i.length+1,o=kb.parse(t);if(o.__codec!==e)throw new Ks({expected:e,got:o.__codec});if(o.version>n)throw new Js({codec:e,currentVersion:n,gotVersion:o.version});let a=i.slice(o.version-1);if(a.some(c=>c.kind==="semantic"))throw new Js({codec:e,currentVersion:n,gotVersion:o.version});let u=a.reduce((c,l)=>l.kind==="reshape"?l.migrate(c):c,o.data);return r.parse(u)}var Im={boundAlias:void 0,braced:false};function Ys(e,t=Im){return e.kind==="not"?`not ${Ys(e.relation,t)}`:e.kind==="and"||e.kind==="or"?e.relations.map(r=>Ys(r,t)).join(` ${e.kind} `):e.kind==="exists"?`${Ob(e.selection,t)} exists`:e.kind==="text"?`${Je(e.left,t)} ${e.op} ${Je(e.right,t)}`:e.kind==="compare"?`${Je(e.left,t)} is ${e.op} ${Je(e.right,t)}`:`${Je(e.left,t)} is ${Je(e.right,t)}`}function Ob(e,t=Im){let r=e.selector.path.join("."),i=r.length===0?e.selector.source:r;return e.relation==null?`records in ${i}`:`records in ${i} where ${Ys(e.relation,{...t,boundAlias:e.alias})}`}function Je(e,t=Im){switch(e.kind){case "value":return JSON.stringify(e.value);case "reference":{if(e.record===t.boundAlias)return e.path.join(".");let r=`${e.record}.${e.path.join(".")}`;return t.braced?`{{${r}}}`:r}case "path":return _O(e);case "count":return `count of ${Ob(e.selection,t)}`;case "add":return `${Je(e.left,t)} + ${Je(e.right,t)}`;case "divide":return `${Je(e.dividend,t)} / ${Je(e.divisor,t)}`;case "concat":return e.values.map(r=>Je(r,t)).join(" + ");case "invert":return `opposite of ${Je(e.value,t)}`;case "after":case "before":return e.kind}}function _O(e){let t=e.selector.path.join(".");return t.length===0?e.selector.source:t}function So(e){return e===null?"null":typeof e=="string"||typeof e=="number"||typeof e=="boolean"?String(e):"ref"in e?`{{${e.ref}}}`:e.template.map(t=>typeof t=="string"?t:"ref"in t?`{{${t.ref}}}`:`{{${Je(t)}}}`).join("")}function yn(e){return typeof e=="string"?e:"ref"in e?`{{${e.ref}}}`:e.template.map(t=>EO(t)).join("")}function EO(e){return typeof e=="string"?e:"ref"in e?`{{${e.ref}}}`:`{{${Je(e)}}}`}function Si(e){if(e.by==="element"){let t=Object.entries(e.values).map(([r,i])=>`${r}: ${So(i)}`).join(", ");return `${e.name}(${t})`}if(e.by==="role"){let t=e.name==null?"":` "${yn(e.name)}"`;return `${e.role}${t}`}return e.by==="testId"?`[${yn(e.value)}]`:e.by==="surface"?Si(e.container):e.by==="frame"?`frame ${Si(e.element)}`:`${Si(e.target)} in ${Si(e.scope)}`}function Vt(e){if(e.by==="element")return Si(e);if(e.by==="testId")return `testId=${yn(e.value)}`;if(e.by==="inside")return `${Vt(e.scope)} \u25B8 ${Vt(e.target)}`;if(e.by==="surface")return Vt(e.container);if(e.by==="frame")return `frame ${Vt(e.element)}`;let t=e.name==null?"":yn(e.name);return `${e.role} ${t}`.trim()}var wO=["visible","unobstructed","disabled","enabled","focused","checked","expanded","pressed"],$O=["value","text"],Cm=s.enum(wO),Rm=s.enum($O),kO=s.discriminatedUnion("kind",[s.object({checkId:s.string(),kind:s.literal("step")}),s.object({factId:s.string(),kind:s.literal("fact")}),s.object({kind:s.literal("dataRule"),ruleId:s.string()})]),Cb=s.discriminatedUnion("kind",[s.object({kind:s.literal("wrongScalar"),observed:s.string().nullable()})]),IO=s.enum(["increased","decreased"]),xo={entity:s.string(),key:s.string()},OO=s.object({declared:s.string(),field:s.string(),read:s.string()}),Tb=s.discriminatedUnion("kind",[s.object({...xo,expected:s.string(),field:s.string(),kind:s.literal("wrongValue"),observed:s.string()}),s.object({...xo,kind:s.literal("missingRow"),nearest:s.array(OO)}),s.object({...xo,kind:s.literal("unexpectedRow")}),s.object({...xo,kind:s.literal("unexpectedlyDeleted")}),s.object({...xo,direction:IO.nullable(),field:s.string(),from:s.string(),kind:s.literal("neverChanged"),observed:s.string()}),s.object({entity:s.string(),expected:s.number().int(),kind:s.literal("wrongCount"),observed:s.number().int()})]),Om=s.object({stepIndex:s.number().int(),testRef:s.string()}).nullable(),CO=s.discriminatedUnion("kind",[...Tb.options,s.object({declaredAt:Om,expected:s.string().nullable(),kind:s.literal("wrongScalar"),observed:s.string().nullable(),subject:s.string(),subjectKey:s.string()}),s.object({checkKind:Cm,declaredAt:Om,kind:s.literal("wrongElementState"),observed:s.boolean(),subject:s.string(),subjectKey:s.string()}),s.object({checkKind:Rm,declaredAt:Om,expected:s.string().nullable(),kind:s.literal("wrongElementContent"),observed:s.string().nullable(),subject:s.string(),subjectKey:s.string()})]);function Fn(e){return s.discriminatedUnion("kind",[s.object({kind:s.literal("passed")}),s.object({kind:s.literal("failed"),reason:e})])}function Am(e,t){return s.discriminatedUnion("kind",[s.object({kind:s.literal("passed"),observed:t.optional()}),s.object({kind:s.literal("failed"),observed:t.optional(),reason:e})])}var RO=s.array(s.record(s.string().min(1),gn)),Zt={ephemeral:s.boolean(),kind:s.literal("check"),ordinal:s.number().int().optional(),origin:kO,rrwebIds:s.array(s.number()),source:s.literal("verifier"),stepIndex:s.number().int(),timeNanos:s.string(),waitedMs:s.number()},Rb=s.enum(["variable","path","query","hash","title","viewport","element"]),Ab=s.enum(["exact","contains","startsWith"]),AO=s.discriminatedUnion("shape",[s.object({...Zt,checkKind:Cm,family:s.literal("element"),negated:s.boolean(),outcome:Fn(en),shape:s.literal("legacy"),subject:s.string()}),s.object({...Zt,checkKind:Cm,family:s.literal("element"),locator:_e,negated:s.boolean(),outcome:Fn(en),shape:s.literal("concrete")})]),TO=s.discriminatedUnion("shape",[s.object({...Zt,checkKind:Rm,expected:s.string(),family:s.literal("content"),match:Ab,negated:s.boolean(),outcome:Fn(en),shape:s.literal("legacy"),subject:s.string()}),s.object({...Zt,checkKind:Rm,expected:s.string(),family:s.literal("content"),locator:_e,match:Ab,negated:s.boolean(),outcome:Fn(en),shape:s.literal("concrete")})]),PO=s.discriminatedUnion("shape",[s.object({...Zt,expected:s.string().nullable(),family:s.literal("scalar"),negated:s.boolean(),outcome:Am(Cb,gn),shape:s.literal("legacy"),subject:s.string(),subjectKey:s.string(),subjectKind:Rb}),s.object({...Zt,expected:s.string().nullable(),family:s.literal("scalar"),locator:_e.nullable(),negated:s.boolean(),outcome:Am(Cb,gn),shape:s.literal("concrete"),subject:s.string().nullable(),subjectKey:s.string(),subjectKind:Rb})]),FO=s.discriminatedUnion("shape",[s.object({...Zt,actionKind:s.string(),family:s.literal("action"),outcome:Fn(en),shape:s.literal("legacy"),subject:s.string(),value:s.string().nullable()}),s.object({...Zt,action:Us,family:s.literal("action"),outcome:Fn(en),shape:s.literal("concrete")})]),Pb=s.discriminatedUnion("family",[AO,TO,PO,s.object({...Zt,assertion:s.enum(["created","updated","deleted","exists","absent","count"]),entity:s.string(),family:s.literal("state"),outcome:Am(Tb,RO),subject:s.string()}),s.object({...Zt,family:s.literal("frame"),outcome:Fn(CO)}),FO,s.object({...Zt,family:s.literal("dataRule"),outcome:Fn(s.discriminatedUnion("kind",[s.object({kind:s.literal("violated")})])),rule:s.string()})]),Fb=s.object({error:Sb,kind:s.literal("stepError"),source:s.literal("verifier"),stepIndex:s.number().int(),timeNanos:s.string()});var Tm=s.intersection(s.union([Ns,go]),s.object({deferred:s.literal(true)})),jb=s.union([s.string(),Tm]),jO=s.union([gi,Tm]),Do=s.lazy(()=>s.discriminatedUnion("by",[s.object({by:s.literal("role"),name:s.union([jb,s.undefined()]).optional().transform(e=>e),role:s.string()}),s.object({by:s.literal("testId"),value:jb}),s.object({by:s.literal("element"),name:s.string(),values:s.record(s.string(),s.union([ur,Tm]))}),s.object({by:s.literal("inside"),scope:Do,target:Do}),s.object({by:s.literal("surface"),container:Do,overlay:s.boolean()}),s.object({by:s.literal("frame"),element:Do})])),zO=s.discriminatedUnion("kind",[...km.options,s.object({kind:s.literal("element"),locator:Do,state:$m})]),NO=Gs(jO),UO=s.object({declared:s.boolean(),expect:NO,subject:zO}),zb=s.object({actor:$b,scalars:s.array(UO).readonly()});var Nb={logical:s.array(bo).readonly(),result:s.string().regex(/^[a-f0-9]{64}$/u),snapshot:zb},LO=s.discriminatedUnion("kind",[s.object({...Nb,kind:s.literal("admission")}),s.object({...Nb,assertedScalars:s.array(s.string()).readonly(),kind:s.literal("checks")})]),MO=s.object({identity:s.string().regex(/^[a-f0-9]{64}$/u),queries:s.array(LO).min(1).readonly()}),Ub=s.object({coverage:MO,kind:s.literal("coverage"),source:s.literal("verifier"),timeNanos:s.string()});var Lb=s.record(s.string(),s.unknown()),BO="recorded-description";function lr({path:e,transform:t,value:r}){let[i,...n]=e;if(i==null)return t(r);if(i==="*")return s.array(s.unknown()).parse(r).map(a=>lr({path:n,transform:t,value:a}));let o=Lb.parse(r);return o[i]==null?o:{...o,[i]:lr({path:n,transform:t,value:o[i]})}}function Mb({transform:e,value:t}){if(t==null)return t;let r=Lb.parse(t),i=r.by==="inside"?["scope","target"]:[],n=r.by==="surface"?["container"]:[],o=r.by==="frame"?["element"]:[],a=[...i,...n,...o];return a.length===0?e(r):Object.fromEntries(Object.entries(r).map(([u,c])=>[u,a.includes(u)?Mb({transform:e,value:c}):c]))}function xi(e){return Mb({transform:VO,value:e})}function VO(e){return e.by==="describe"?{by:"element",name:BO,values:{description:Mt.parse(e.description)}}:e}function Xs({paths:e,transform:t,value:r}){return e.reduce((i,n)=>lr({path:n,transform:t,value:i}),r)}function Bb({locator:e,value:t}){return Xs({paths:[["locator"],["source"],["target"]],transform:e,value:t})}function Vb(e){return s.array(s.record(s.string(),s.unknown())).parse(e).map(t=>ZO(t))}function ZO(e){switch(e.kind){case "check":{let t=lr({path:["action"],value:e,transform:r=>Bb({locator:xi,value:r})});return Xs({paths:[["locator"],["outcome","reason","miss","locator"]],transform:xi,value:t})}case "stepError":return Xs({paths:[["error","binding","locator"],["error","failure","miss","locator"]],transform:xi,value:e});case "coverage":return lr({path:["coverage","queries","*","snapshot","scalars","*","subject","locator"],transform:xi,value:e});default:return e}}function Zb(e){return Array.isArray(e)?e.map(t=>Pm(t)):e}var WO=s.object({container:s.string().nullable(),name:s.string().nullable(),role:s.string().nullable(),tag:s.string(),visible:s.boolean()}),GO=/^(\S+) ("(?:[^"\\]|\\.)*")$/u;function Pm(e){if(Array.isArray(e))return e.map(r=>Pm(r));if(typeof e!="object"||e==null)return e;let t=WO.safeParse(e);if(t.success){let{container:r,...i}=t.data;return {...i,ancestors:qO(r)}}return Object.fromEntries(Object.entries(e).map(([r,i])=>[r,Pm(i)]))}function qO(e){let t=e==null?null:GO.exec(e);return t?.[1]==null||t[2]==null?[]:[{label:s.string().parse(JSON.parse(t[2])),role:t[1]}]}var HO=["unspecified","internal","server","client","producer","consumer"],JO=["unset","ok","error"],KO=s.looseObject({node:s.looseObject({id:s.number()}).optional(),parentId:s.number().nullable().optional()}),YO=s.looseObject({data:s.looseObject({adds:s.array(KO).optional(),attributes:s.array(s.looseObject({id:s.number()})).optional(),removes:s.array(s.looseObject({id:s.number()})).optional(),source:s.number().optional(),texts:s.array(s.looseObject({id:s.number()})).optional()}).optional(),timestamp:s.number(),type:s.number()}),nn=s.string(),XO=s.object({action:s.string(),kind:s.literal("action"),source:s.literal("test"),target:s.string().optional(),timeNanos:nn,value:s.string().optional()}),QO=s.object({event:YO,kind:s.literal("rrweb"),rrwebType:s.string(),source:s.literal("browser"),timeNanos:nn}),eC=s.object({durationMs:s.number().optional(),kind:s.literal("network"),method:s.string(),requestBody:s.string().optional(),resourceType:s.string(),responseBody:s.string().optional(),source:s.literal("browser"),spanId:s.string().optional(),status:s.number(),timeNanos:nn,traceId:s.string().optional(),url:s.string()}),tC=s.object({kind:s.literal("console"),level:s.string(),source:s.literal("browser"),text:s.string(),timeNanos:nn}),nC=s.discriminatedUnion("problem",[s.object({message:s.string(),problem:s.literal("page-error"),stack:s.string().optional()}),s.object({method:s.string(),path:s.string(),problem:s.literal("server-error"),status:s.number()}),s.object({method:s.string(),path:s.string(),problem:s.literal("request-failed"),reason:s.string()})]),rC=s.object({count:s.number().int().min(1),detail:nC,kind:s.literal("health"),source:s.literal("browser"),stepIndex:s.number().int().min(0).optional(),timeNanos:nn}),iC=s.object({clientVersion:s.string(),kind:s.literal("meta"),source:s.literal("capture"),timeNanos:nn}),oC=s.object({kind:s.literal("notice"),message:s.string(),source:s.literal("capture"),timeNanos:nn}),aC=s.discriminatedUnion("kind",[s.object({kind:s.literal("unrunnable"),reason:s.enum(["requiredStateUnsatisfied","noEffect","unresolvable","contradictoryExpectations","actionRelationshipUnmet","invalidStateEffect"]),unmet:s.string().nullable()}),s.object({action:s.string(),kind:s.literal("impossibleAction"),subject:s.string()}),s.object({declaredIndex:s.number(),kind:s.literal("liftVisibility"),subject:s.string(),visibleIndex:s.number()})]),sC=s.object({kind:s.literal("finding"),payload:aC,source:s.literal("verifier"),step:s.string(),stepIndex:s.number(),timeNanos:nn}),uC=s.object({changed:s.boolean(),field:s.string(),generated:s.boolean(),value:s.string().nullable()}),cC=s.object({entity:s.string(),fields:s.array(uC),key:s.string(),label:s.string(),status:s.enum(["present","created","deleted"])}),lC=s.object({changed:s.boolean(),generated:s.boolean(),name:s.string(),value:s.string().nullable()}),Wb={duration:s.number(),executedBranches:s.array(s.string()).default([]),kind:s.literal("step"),nodeType:s.string(),pageUrl:s.string().nullable(),recordingEndMs:s.number(),recordingStartMs:s.number(),source:s.literal("verifier"),sourceTest:s.string().nullable(),stateBindings:s.record(s.string(),s.json()).default({}),stateRows:s.array(cC),stateSingletons:s.array(lC),status:s.enum(["failed","passed","pending"]).optional(),stepIndex:s.number(),timeNanos:nn},dC=s.discriminatedUnion("shape",[s.object({...Wb,shape:s.literal("legacy"),title:s.string()}),s.object({...Wb,action:Us.nullable(),shape:s.literal("concrete")})]),Hb=s.object({attributes:s.record(s.string(),s.string()),durationMs:s.number(),kind:s.literal("span"),name:s.string(),parentSpanId:s.string().optional(),source:s.literal("server"),spanId:s.string(),spanKind:s.enum(HO),status:s.object({code:s.enum(JO),message:s.string().optional()}),timeNanos:nn,traceId:s.string()}),pC=s.discriminatedUnion("kind",[XO,QO,eC,tC,rC,iC,oC,sC,Pb,Fb,Hb,dC,Ub]),Jb=Ib({name:"ripplo-behavior",schema:s.array(s.unknown()),steps:[{kind:"semantic"},{kind:"semantic"},{kind:"reshape",migrate:e=>e},{kind:"reshape",migrate:xC},{kind:"semantic"},{kind:"reshape",migrate:wC},{kind:"reshape",migrate:IC},{kind:"reshape",migrate:e=>e},{kind:"reshape",migrate:e=>e},{kind:"reshape",migrate:e=>e},{kind:"reshape",migrate:e=>e},{kind:"reshape",migrate:e=>e},{kind:"reshape",migrate:e=>e},{kind:"reshape",migrate:e=>e},{kind:"reshape",migrate:vC},{kind:"reshape",migrate:hC},{kind:"reshape",migrate:Vb},{kind:"reshape",migrate:fC},{kind:"reshape",migrate:Zb},{kind:"reshape",migrate:e=>e}]});function fC(e){return Array.isArray(e)?e.map(t=>mC(t)):e}function mC(e){let t=Ke.safeParse(e);if(!t.success||t.data.kind!=="check")return e;let r=Ke.safeParse(t.data.outcome);if(!r.success)return e;let i=Ke.safeParse(r.data.reason);return !i.success||i.data.kind!=="missingRow"||"nearest"in i.data?e:{...t.data,outcome:{...r.data,reason:{...i.data,nearest:[]}}}}function hC(e){return Array.isArray(e)?e.map(t=>gC(t)):e}function gC(e){let t=Ke.safeParse(e);if(!t.success||t.data.kind!=="execution-witness")return e;let{witness:r,...i}=t.data,n=Ke.safeParse(r);if(!n.success)return e;let{localIdentity:o,...a}=n.data;return {...i,coverage:{...a,identity:o},kind:"coverage"}}var yC=s.object({description:s.string(),expectedRole:s.string().nullable(),kind:s.literal("binding-unresolved"),locator:Te.optional(),reason:s.enum(["unbound","missed","missing-values"])});function vC(e){return Array.isArray(e)?e.map(t=>bC(t)):e}function bC(e){let t=Ke.safeParse(e);if(!t.success)return e;if(t.data.kind==="stepError"){let n=Ke.safeParse(t.data.error);return n.success&&"binding"in n.data?{...t.data,error:{...n.data,binding:Gb(n.data.binding)}}:e}let r=Ke.safeParse(t.data.outcome),i=r.success?Ke.safeParse(r.data.reason):void 0;return !r.success||i?.success!==true||!("miss"in i.data)?e:{...t.data,outcome:{...r.data,reason:{...i.data,miss:Gb(i.data.miss)}}}}function Gb(e){let t=yC.safeParse(e);if(!t.success)return e;let{description:r,expectedRole:i,locator:n,reason:o}=t.data,a={description:r,expectedRole:i};return o==="missing-values"?{...a,issues:[],kind:"binding-values-invalid"}:n===void 0?{...a,kind:"binding-unattributed",reason:o}:{...a,kind:o==="missed"?"binding-missed":"binding-unbound",locator:n}}var SC=s.object({by:s.string().optional(),count:s.number().optional(),kind:s.string(),message:s.string().optional(),observed:s.unknown().optional()});function xC(e){return Array.isArray(e)?e.map(t=>DC(t)):e}var Ke=s.record(s.string(),Te);function DC(e){let t=Ke.safeParse(e);if(!t.success)return e;let r=Ke.safeParse(t.data.outcome);if(!r.success)return e;let i=SC.safeParse(r.data.reason);return i.success?{...t.data,outcome:{...r.data,reason:_C(i.data)}}:e}function _C(e){return {ariaSnapshot:null,matcher:null,message:CC(e),miss:null}}var EC=s.object({ariaSnapshot:s.unknown(),matcher:s.unknown(),message:s.string()});function wC(e){return Array.isArray(e)?e.map(t=>$C(t)):e}function $C(e){let t=Ke.safeParse(e);if(!t.success)return e;let r=Ke.safeParse(t.data.outcome);if(!r.success)return e;let i=r.data.reason,n=EC.safeParse(i);return !n.success||typeof i=="object"&&i!=null&&"miss"in i?e:{...t.data,outcome:{...r.data,reason:{...n.data,miss:null}}}}var kC=s.object({kind:s.enum(["wrongScalar","wrongElementState","wrongElementContent"]),subjectKey:s.string()});function IC(e){return Array.isArray(e)?e.map(t=>OC(t)):e}function OC(e){let t=Ke.safeParse(e);if(!t.success||t.data.family!=="frame")return e;let r=Ke.safeParse(t.data.outcome);if(!r.success)return e;let i=Ke.safeParse(r.data.reason);return !i.success||!kC.safeParse(i.data).success||"declaredAt"in i.data?e:{...t.data,outcome:{...r.data,reason:{...i.data,declaredAt:null}}}}function CC(e){return e.kind==="notFound"?"expected visible, matched 0 elements":e.kind==="multipleMatches"?`matched ${String(e.count??0)} elements`:e.kind==="covered"?`covered by ${e.by??"another element"}`:e.kind==="notPossible"?"the action is not possible on this element":e.kind==="unclassified"?e.message??"":JSON.stringify(e)}var RC=s.object({__codec:s.string().min(1),version:s.number().int().positive()});function _o(e){let t=e.split(`
45
+ `).filter(u=>u.length>0),r=t[0],i=r==null?null:qb(r),n=RC.parse(i),o=t.slice(1).flatMap(u=>{let c=qb(u);return c==null?[]:[c]});return Jb.decode({...n,data:o}).flatMap(u=>{let c=pC.safeParse(u);return c.success?[c.data]:[]})}function dr(e){return Number(BigInt(e)/1000000n)}function qb(e){try{return JSON.parse(e)}catch{return null}}function Kb({differences:e,labels:t}){let r=e.slice(0,5).map(({declared:a,field:u,read:c})=>`${u} (${t.declared} ${a}, ${t.read} ${c})`).join(", "),i=e.length-5,n=i>0?`, and ${String(i)} more`:"",o=e.length===1?"field":"fields";return `The closest row differs in ${String(e.length)} ${o}: ${r}${n}.`}function pr(e){return e.shape==="legacy"?e.subject:e.family==="action"?Yb(e.action):e.family==="scalar"?AC(e):Vt(e.locator)}function AC(e){if(e.locator!=null)return Vt(e.locator);if(e.subject==null)throw new Error(`Concrete scalar check "${e.subjectKey}" has neither locator nor subject`);return e.subject}function Yb(e){return e.kind==="goto"?e.url:e.kind==="drag"?`${Vt(e.source)} to ${Vt(e.target)}`:e.kind==="press"?e.locator==null?e.key:Vt(e.locator):Vt(e.locator)}function Xb(e){return e.shape==="legacy"?e.actionKind:e.action.kind}function Fm(e){if(e.outcome.kind!=="passed")switch(e.family){case "element":return TC(e,e.outcome.reason);case "content":return PC(e,e.outcome.reason);case "scalar":return FC(e,e.outcome.reason.observed);case "state":return jm(e.outcome.reason);case "frame":return Qb(e.outcome.reason);case "action":return `Could not ${Xb(e)} ${pr(e)} \u2014 ${Nm(e.outcome.reason)}`;case "dataRule":return `Data rule ${e.rule} broke \u2014 a referenced row went missing`}}function TC(e,t){let r=pr(e),i=qC(e.negated,e.checkKind),n=rS(t);return n==null?`${r} was expected ${i} \u2014 ${Nm(t)}`:`${r} was expected ${i} but was ${n}`}function PC(e,t){let r=pr(e),i=e.negated?"not ":"",n=`${r} was expected ${i}to show ${ht(e.expected)}`,o=rS(t);return o==null?`${n} \u2014 ${Nm(t)}`:`${n} but showed ${ht(o)}`}function FC(e,t){let r=pr(e),i=jn(e.expected);return e.negated?`${r} was expected not to be ${i} but still was`:`${r} was expected to be ${i} but was ${jn(t)}`}function Qb(e){return `Undeclared change: ${eS(e)}. ${UC(e)}`}function jm(e){switch(e.kind){case "wrongValue":return `${e.entity}.${e.field} for row ${e.key} was declared ${e.expected} but is ${e.observed}. If the app is right, fix the declared value on this step. If ${e.expected} is right, this is an app bug`;case "missingRow":return `no ${e.entity} row matching ${e.key} exists, but this step declares creates(...) for it. ${jC(e.nearest)}If the app is right, remove the creates(...) effect. If the row should exist, this is an app bug`;case "unexpectedRow":return `the ${e.entity} row ${e.key} still exists, but this step declares its deletion. If the app is right, correct the deletes(...) effect. If the row should have been deleted, this is an app bug`;case "unexpectedlyDeleted":return `the ${e.entity} row ${e.key} was deleted, but no effect on this step deletes it. If the app is right, add deletes(...) for it to this step. If the row should have stayed, this is a cascade bug`;case "neverChanged":return `${e.entity}.${e.field} for row ${e.key} was declared to ${zC(e.direction)} from ${e.from} but stayed at ${e.observed}. If the app is right, remove that effect from this step. If it should have changed, this is an app bug`;case "wrongCount":return `${e.entity} was declared to have ${String(e.expected)} rows but has ${String(e.observed)}. If the app is right, fix the declared effects on this step. If the count is wrong, this is an app bug`}}function jC(e){return e.length===0?"":`${Kb({differences:e,labels:{declared:"declared",read:"read"}})} `}function zC(e){return e==="increased"?"increase":e==="decreased"?"decrease":"change"}function eS(e){switch(e.kind){case "wrongElementState":return `${e.subject} is ${NC(e)}`;case "wrongElementContent":return `${e.subject} ${e.checkKind==="text"?"shows":"holds"} ${jn(e.observed)}, not ${jn(e.expected)}`;case "wrongScalar":return `${e.subject} became ${jn(e.observed)}, not ${jn(e.expected)}`;case "wrongValue":case "missingRow":case "unexpectedRow":case "unexpectedlyDeleted":case "neverChanged":case "wrongCount":return jm(e)}}function NC(e){return e.checkKind==="visible"&&!e.observed?"no longer visible":`now ${HC(e.observed,e.checkKind)}`}function UC(e){switch(e.kind){case "wrongElementState":case "wrongElementContent":case "wrongScalar":return `${LC(e)}If the app is right, add .expect(${BC(e)}) to this step. If it should have stayed, this is an app bug.`;case "wrongValue":case "missingRow":case "unexpectedRow":case "unexpectedlyDeleted":case "neverChanged":case "wrongCount":return ""}}function LC(e){let{declaredAt:t}=e;return t==null?"":`Step ${String(t.stepIndex+1)} of ${t.testRef} declared ${MC(e)} and no later step declared it changed. `}function MC(e){switch(e.kind){case "wrongElementState":return tS({checkKind:e.checkKind,on:!e.observed,subject:e.subject});case "wrongElementContent":return `${e.checkKind}(${e.subject}, ${iS(e.expected)})`;case "wrongScalar":return `${e.subject} = ${jn(e.expected)}`}}function BC(e){switch(e.kind){case "wrongElementState":return tS({checkKind:e.checkKind,on:e.observed,subject:e.subject});case "wrongElementContent":return `${e.checkKind}(${e.subject}, ${iS(e.observed)})`;case "wrongScalar":return `${e.subject} = ${jn(e.observed)}`}}function tS({checkKind:e,on:t,subject:r}){let i=`${e}(${r})`;return t?i:`not(${i})`}function VC(e){let t=e.expectedRole??"element";switch(e.kind){case "binding-unbound":return `the description ${ht(e.description)} has no element binding yet.`;case "binding-missed":return `the element binding for ${ht(e.description)} did not resolve to one element on this page.`;case "binding-values-invalid":return `the inputs for ${ht(e.description)} do not match its declaration: ${e.issues.join(", ")}.`;case "binding-alias":return `the element ${ht(e.description)} resolved to the same control as ${ht(e.aliasOf)} at this step. One control is one element: declare it once and import that handle.`;case "binding-unattributed":return `the description ${ht(e.description)} needs a verified element binding (${e.reason}).`;case "absent":return "the locator matched no element in its recorded scope. Check the frame and the starting state before changing the locator.";case "hidden":return ZC(e.matches);case "ambiguous":return `it matched multiple visible elements. Recorded matches: ${zm(e.matches)}. Scope it with inside(<container>) or use a name only one of them has.`;case "text-elsewhere":return GC(e);case "name-differs":return WC({miss:e,role:t})}}function ZC(e){let t=e[0];return e.length===1&&t!=null?`it exists (${t.tag}, ${t.role??"role not recorded"}) but is hidden. If an earlier step should reveal it, declare that reveal there \u2014 otherwise this is an app bug.`:`all matching elements are hidden. Recorded matches: ${zm(e)}. If an earlier step should reveal it, declare that reveal there \u2014 otherwise this is an app bug.`}function WC({miss:e,role:t}){let r=nS(e.match.ancestors);return `no ${t} has the declared name. The page has ${t} ${ht(e.actualName)}${r}. Change the declared name to ${ht(e.actualName)} when the app copy is intended, or fix the app copy when the declaration is right.`}function GC(e){let t=e.expectedRole??"element";return e.partial?`no ${t} has the declared name, and only part of it appears on the page, as ${Qs(e.match)}. Compare the two texts before changing the declaration.`:`no ${t} has the declared name, but the text appears as ${Qs(e.match)}. Declare that element by its own role, or give the app element the role ${t}.`}function zm(e){let t=e.slice(0,5).map(i=>Qs(i)).join(", "),r=e.length-5;return r>0?`${t}, and ${String(r)} more`:t}function Qs(e){return `${`<${e.tag}> ${e.role??"role not recorded"} ${ht(e.name??"")}`}${nS(e.ancestors)}`}function nS(e){return e.length===0?"":` inside ${e.toReversed().map(r=>`${r.role} ${ht(r.label)}`).join(" > ")}`}function rS(e){return e.miss!=null||e.matcher==null||e.matcher.actual.length===0?null:e.matcher.actual}function Nm(e){if(e.miss!=null)return VC(e.miss);let t=e.message.split(`
46
+ `).find(r=>r.trim().length>0);if(t==null)throw new Error("Failure carries no message");return t.trim()}function qC(e,t){return `${e?"not ":""}${t}`}function HC(e,t){return `${e?"":"not "}${t}`}function iS(e){return e==null?"absent":ht(e)}function jn(e){return e??"absent"}function ht(e){return JSON.stringify(e)}function Um(e){let t=Nn(e.kind);if(e.kind==="goto")return [t,tR(yn(e.url))];if(e.kind==="fill"||e.kind==="select")return [t,...zn(e.locator),Nn("with"),tu(`"${So(e.value)}"`)];if(e.kind==="press"){let r=e.locator==null?[]:zn(e.locator);return [t,...r,tu(`"${e.key}"`)]}return e.kind==="drag"?[t,...zn(e.source),Nn("to"),...zn(e.target)]:[t,...zn(e.locator)]}var Nn=e=>({kind:"g",text:e}),eu=e=>({kind:"label",text:e}),tu=e=>({kind:"screen",text:e}),gt={display:void 0,name:"label"},fe={display:void 0,name:"screen"},JC={alert:fe,alertdialog:fe,banner:fe,button:gt,cell:fe,checkbox:gt,columnheader:fe,combobox:gt,complementary:fe,contentinfo:fe,dialog:fe,form:fe,grid:fe,group:fe,heading:fe,img:fe,link:gt,list:fe,listbox:fe,listitem:fe,main:fe,menu:fe,menuitem:{display:"menu item",name:"label"},menuitemcheckbox:{display:"menu item checkbox",name:"label"},menuitemradio:{display:"menu item radio",name:"label"},navigation:fe,option:gt,progressbar:fe,radio:gt,radiogroup:fe,region:fe,row:fe,searchbox:gt,slider:gt,spinbutton:gt,status:fe,switch:gt,tab:gt,table:fe,tablist:fe,tabpanel:fe,textbox:gt,toolbar:fe,treeitem:gt};var KC=new Map(Object.entries(JC));function YC(e){return KC.get(e)??fe}function XC(e){let t=YC(e.role),r=Nn(t.display??e.role);if(e.name==null)return [r];let i=yn(e.name),n=t.name==="label"?eu(i):tu(`"${i}"`);return [r,n]}function zn(e){return aS(Eo(e).map(t=>QC(t)),Nn(oS))}var oS="\u25B8";function Eo(e){return e.by==="inside"?[...Eo(e.scope),...Eo(e.target)]:e.by==="surface"?Eo(e.container):[e]}function QC(e){return e.by==="element"?eR(e):e.by==="role"?XC(e):e.by==="testId"?[eu(yn(e.value))]:e.by==="frame"?[Nn("frame"),...zn(e.element)]:zn(e)}function eR(e){let t=Object.entries(e.values).map(([r,i])=>[Nn(r),eu(So(i))]);return [eu(e.name),...aS(t,Nn("\xB7"))]}function tR(e){return e.startsWith("/")?{kind:"path",text:e}:tu(`"${e}"`)}function aS(e,t){return e.flatMap((r,i)=>i===0?r:[t,...r])}var Lm=["* { scroll-behavior: auto !important; }","*, *::before, *::after { animation-duration: 0s !important; animation-delay: 0s !important; transition-duration: 0s !important; transition-delay: 0s !important; }","noscript { display: none !important; }"];function Mm({base:e,taken:t}){let r=new Set(t.map(o=>o.toLowerCase())),n=[e,...Array.from({length:t.length+1},(o,a)=>`${e}-${String(a+2)}`)].find(o=>!r.has(o.toLowerCase()));if(n==null)throw new Error("connection-name-candidates-exhausted");return n}var nu=Symbol.for("better-auth:broadcast-channel"),nR=()=>Math.floor(Date.now()/1e3),rR=class{listeners=new Set;name;constructor(e="better-auth.message"){this.name=e;}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e);}}post(e){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:nR()}));}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return ()=>{};let e=t=>{if(t.key!==this.name)return;let r=JSON.parse(t.newValue??"{}");r?.event!=="session"||!r?.data||this.listeners.forEach(i=>i(r));};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e);}}};function wo(e="better-auth.message"){return globalThis[nu]||(globalThis[nu]=new rR(e)),globalThis[nu]}var ru=Symbol.for("better-auth:focus-manager"),iR=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e);}}setFocused(e){this.listeners.forEach(t=>t(e));}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return ()=>{};let e=()=>{document.visibilityState==="visible"&&this.setFocused(true);};return document.addEventListener("visibilitychange",e,false),()=>{document.removeEventListener("visibilitychange",e,false);}}};function Bm(){return globalThis[ru]||(globalThis[ru]=new iR),globalThis[ru]}var iu=Symbol.for("better-auth:online-manager"),oR=class{listeners=new Set;isOnline=typeof navigator<"u"?navigator.onLine:true;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e);}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e));}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return ()=>{};let e=()=>this.setOnline(true),t=()=>this.setOnline(false);return window.addEventListener("online",e,false),window.addEventListener("offline",t,false),()=>{window.removeEventListener("online",e,false),window.removeEventListener("offline",t,false);}}};function ou(){return globalThis[iu]||(globalThis[iu]=new oR),globalThis[iu]}var aR={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},sR=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,uS={true:true,false:false,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},uR=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function cR(e){return e instanceof Date&&!isNaN(e.getTime())}function lR(e){let t=uR.exec(e);if(!t)return null;let[,r,i,n,o,a,u,c,l,d,p]=t,m=new Date(Date.UTC(parseInt(r,10),parseInt(i,10)-1,parseInt(n,10),parseInt(o,10),parseInt(a,10),parseInt(u,10),c?parseInt(c.padEnd(3,"0"),10):0));if(l){let h=(parseInt(d,10)*60+parseInt(p,10))*(l==="+"?-1:1);m.setUTCMinutes(m.getUTCMinutes()+h);}return cR(m)?m:null}function dR(e,t={}){let{strict:r=false,warnings:i=false,reviver:n,parseDates:o=true}=t;if(typeof e!="string")return e;let a=e.trim();if(a.length>0&&a[0]==='"'&&a.endsWith('"')&&!a.slice(1,-1).includes('"'))return a.slice(1,-1);let u=a.toLowerCase();if(u.length<=9&&u in uS)return uS[u];if(!sR.test(a)){if(r)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(aR).some(([c,l])=>{let d=l.test(a);return d&&i&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${c} pattern`),d})&&r)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(a,(l,d)=>{if(l==="__proto__"||l==="constructor"&&d&&typeof d=="object"&&"prototype"in d){i&&console.warn(`[better-json] Dropping "${l}" key to prevent prototype pollution`);return}if(o&&typeof d=="string"){let p=lR(d);if(p)return p}return n?n(l,d):d})}catch(c){if(r)throw c;return e}}function Vm(e,t={strict:true}){return dR(e,t)}var $o=Symbol("clean");var Wt=[],Un=0,au=4,ko=e=>{let t=[],r={get(){return r.lc||r.listen(()=>{})(),r.value},lc:0,listen(i){return r.lc=t.push(i),()=>{for(let o=Un+au;o<Wt.length;)Wt[o]===i?Wt.splice(o,au):o+=au;let n=t.indexOf(i);~n&&(t.splice(n,1),--r.lc||r.off());}},notify(i,n){let o=!Wt.length;for(let a of t)Wt.push(a,r.value,i,n);if(o){for(Un=0;Un<Wt.length;Un+=au)Wt[Un](Wt[Un+1],Wt[Un+2],Wt[Un+3]);Wt.length=0;}},off(){},set(i){let n=r.value;n!==i&&(r.value=i,r.notify(n));},subscribe(i){let n=r.listen(i);return i(r.value),n},value:e};return process.env.NODE_ENV!=="production"&&(r[$o]=()=>{t=[],r.lc=0,r.off();}),r};var fR=5,Di=6,su=10,mR=(e,t,r,i)=>(e.events=e.events||{},e.events[r+su]||(e.events[r+su]=i(n=>{e.events[r].reduceRight((o,a)=>(a(o),o),{shared:{},...n});})),e.events[r]=e.events[r]||[],e.events[r].push(t),()=>{let n=e.events[r],o=n.indexOf(t);n.splice(o,1),n.length||(delete e.events[r],e.events[r+su](),delete e.events[r+su]);});var cS=1e3,Io=(e,t)=>mR(e,i=>{let n=t(i);n&&e.events[Di].push(n);},fR,i=>{let n=e.listen;e.listen=(...a)=>(!e.lc&&!e.active&&(e.active=true,i()),n(...a));let o=e.off;if(e.events[Di]=[],e.off=()=>{o(),setTimeout(()=>{if(e.active&&!e.lc){e.active=false;for(let a of e.events[Di])a();e.events[Di]=[];}},cS);},process.env.NODE_ENV!=="production"){let a=e[$o];e[$o]=()=>{for(let u of e.events[Di])u();e.events[Di]=[],e.active=false,a();};}return ()=>{e.listen=n,e.off=o;}});var hR=()=>typeof window>"u",uu=(e,t,r,i)=>{let n=ko({data:null,error:null,isPending:true,isRefetching:false,refetch:u=>o(u)}),o=async u=>new Promise(c=>{let l=typeof i=="function"?i({data:n.get().data,error:n.get().error,isPending:n.get().isPending}):i;r(t,{...l,query:{...l?.query,...u?.query},async onSuccess(d){n.set({data:d.data,error:null,isPending:false,isRefetching:false,refetch:n.value.refetch}),await l?.onSuccess?.(d);},async onError(d){let{request:p}=d,m=typeof p.retry=="number"?p.retry:p.retry?.attempts,h=p.retryAttempt||0;if(m&&h<m)return;let v=d.error.status===401;n.set({error:d.error,data:v?null:n.get().data,isPending:false,isRefetching:false,refetch:n.value.refetch}),await l?.onError?.(d);},async onRequest(d){let p=n.get();n.set({isPending:p.data===null,data:p.data,error:null,isRefetching:true,refetch:n.value.refetch}),await l?.onRequest?.(d);}}).catch(d=>{n.set({error:d,data:n.get().data,isPending:false,isRefetching:false,refetch:n.value.refetch});}).finally(()=>{c(void 0);});});e=Array.isArray(e)?e:[e];let a=false;for(let u of e)u.subscribe(async()=>{hR()||(a?await o():Io(n,()=>{let c=setTimeout(async()=>{a||(await o(),a=true);},0);return ()=>{n.off(),u.off(),clearTimeout(c);}}));});return n};var _i=()=>Math.floor(Date.now()/1e3);function lS(e){return typeof e=="object"&&e!==null&&"data"in e&&"error"in e?e:{data:e,error:null}}var gR=5;function Zm(e){let{sessionAtom:t,sessionSignal:r,$fetch:i,options:n={}}=e,o=n.sessionOptions?.refetchInterval??0,a=n.sessionOptions?.refetchOnWindowFocus??true,u=n.sessionOptions?.refetchWhenOffline??false,c={lastSync:0,lastSessionRequest:0,cachedSession:void 0},l=()=>u||ou().isOnline,d=H=>{if(!l())return;if(H?.event==="storage"){c.lastSync=_i(),r.set(!r.get());return}let B=t.get(),A=()=>{c.lastSessionRequest=_i(),i("/get-session").then(async O=>{let{data:z,error:ne}=lS(O);if(z?.needsRefresh)try{let be=await i("/get-session",{method:"POST"});({data:z,error:ne}=lS(be));}catch{}let ce=z?.session&&z?.user?z:null;t.set({...B,data:ce,error:ne}),c.lastSync=_i(),r.set(!r.get());}).catch(()=>{});};if(H?.event==="poll"){A();return}if(H?.event==="visibilitychange"){if(_i()-c.lastSessionRequest<gR)return;c.lastSessionRequest=_i();}if(H?.event==="visibilitychange"){A();return}(B?.data===null||B?.data===void 0)&&(c.lastSync=_i(),r.set(!r.get()));},p=H=>{wo().post({event:"session",data:{trigger:H},clientId:Math.random().toString(36).substring(7)});},m=()=>{o&&o>0&&(c.pollInterval=setInterval(()=>{t.get()?.data&&d({event:"poll"});},o*1e3));},h=()=>{c.unsubscribeBroadcast=wo().subscribe(()=>{d({event:"storage"});});},v=()=>{a&&(c.unsubscribeFocus=Bm().subscribe(()=>{d({event:"visibilitychange"});}));},D=()=>{c.unsubscribeOnline=ou().subscribe(H=>{H&&d({event:"visibilitychange"});});};return {init:()=>{m(),h(),v(),D(),wo().setup(),Bm().setup(),ou().setup();},cleanup:()=>{c.pollInterval&&(clearInterval(c.pollInterval),c.pollInterval=void 0),c.unsubscribeBroadcast&&(c.unsubscribeBroadcast(),c.unsubscribeBroadcast=void 0),c.unsubscribeFocus&&(c.unsubscribeFocus(),c.unsubscribeFocus=void 0),c.unsubscribeOnline&&(c.unsubscribeOnline(),c.unsubscribeOnline=void 0),c.lastSync=0,c.lastSessionRequest=0,c.cachedSession=void 0;},triggerRefetch:d,broadcastSessionUpdate:p}}var cu=Object.create(null),Oo=e=>globalThis.process?.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?cu:globalThis),it=new Proxy(cu,{get(e,t){return Oo()[t]??cu[t]},has(e,t){return t in Oo()||t in cu},set(e,t,r){let i=Oo(true);return i[t]=r,true},deleteProperty(e,t){if(!t)return false;let r=Oo(true);return delete r[t],true},ownKeys(){let e=Oo(true);return Object.keys(e)}});typeof process<"u"&&process.env&&process.env.NODE_ENV||"";function me(e,t){return typeof process<"u"&&process.env?process.env[e]??t:typeof Deno<"u"?Deno.env.get(e)??t:typeof Bun<"u"?Bun.env[e]??t:t}var Co=1,Ze=4,rn=8,yt=24,dS={eterm:Ze,cons25:Ze,console:Ze,cygwin:Ze,dtterm:Ze,gnome:Ze,hurd:Ze,jfbterm:Ze,konsole:Ze,kterm:Ze,mlterm:Ze,mosh:yt,putty:Ze,st:Ze,"rxvt-unicode-24bit":yt,terminator:yt,"xterm-kitty":yt},bR=new Map(Object.entries({APPVEYOR:rn,BUILDKITE:rn,CIRCLECI:yt,DRONE:rn,GITEA_ACTIONS:yt,GITHUB_ACTIONS:yt,GITLAB_CI:rn,TRAVIS:rn})),SR=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function Wm(){if(me("FORCE_COLOR")!==void 0)switch(me("FORCE_COLOR")){case "":case "1":case "true":return Ze;case "2":return rn;case "3":return yt;default:return Co}if(me("NODE_DISABLE_COLORS")!==void 0&&me("NODE_DISABLE_COLORS")!==""||me("NO_COLOR")!==void 0&&me("NO_COLOR")!==""||me("TERM")==="dumb")return Co;if(me("TMUX"))return yt;if("TF_BUILD"in it&&"AGENT_NAME"in it)return Ze;if("CI"in it){for(let{0:e,1:t}of bR)if(e in it)return t;return me("CI_NAME")==="codeship"?rn:Co}if("TEAMCITY_VERSION"in it)return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(me("TEAMCITY_VERSION"))!==null?Ze:Co;switch(me("TERM_PROGRAM")){case "iTerm.app":return !me("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(me("TERM_PROGRAM_VERSION"))!==null?rn:yt;case "HyperTerm":case "MacTerm":return yt;case "Apple_Terminal":return rn}if(me("COLORTERM")==="truecolor"||me("COLORTERM")==="24bit")return yt;if(me("TERM")){if(/truecolor/.exec(me("TERM"))!==null)return yt;if(/^xterm-256/.exec(me("TERM"))!==null)return rn;let e=me("TERM").toLowerCase();if(dS[e])return dS[e];if(SR.some(t=>t.exec(e)!==null))return Ze}return me("COLORTERM")?Ze:Co}var Gt={reset:"\x1B[0m",bright:"\x1B[1m",dim:"\x1B[2m",fg:{red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m"}},lu=["debug","info","success","warn","error"];function pS(e,t){return lu.indexOf(t)>=lu.indexOf(e)}var xR={info:Gt.fg.blue,success:Gt.fg.green,warn:Gt.fg.yellow,error:Gt.fg.red,debug:Gt.fg.magenta},DR=(e,t,r)=>{let i=new Date().toISOString();return r?`${Gt.dim}${i}${Gt.reset} ${xR[e]}${e.toUpperCase()}${Gt.reset} ${Gt.bright}[Better Auth]:${Gt.reset} ${t}`:`${i} ${e.toUpperCase()} [Better Auth]: ${t}`},fS=e=>{let r="warn",i=Wm()!==1,n=(o,a,u=[])=>{if(!pS(r,o))return;let c=DR(o,a,i);{o==="error"?console.error(c,...u):o==="warn"?console.warn(c,...u):console.log(c,...u);return}};return {...Object.fromEntries(lu.map(o=>[o,(...[a,...u])=>n(o,a,u)])),get level(){return r}}};fS();function Pe(e){return Object.fromEntries(Object.entries(e).map(([t,r])=>[t,{code:t,message:r,toString:()=>t}]))}Pe({USER_NOT_FOUND:"User not found",FAILED_TO_CREATE_USER:"Failed to create user",FAILED_TO_CREATE_SESSION:"Failed to create session",FAILED_TO_UPDATE_USER:"Failed to update user",FAILED_TO_GET_SESSION:"Failed to get session",INVALID_PASSWORD:"Invalid password",INVALID_EMAIL:"Invalid email",INVALID_EMAIL_OR_PASSWORD:"Invalid email or password",INVALID_USER:"Invalid user",SOCIAL_ACCOUNT_ALREADY_LINKED:"Social account already linked",PROVIDER_NOT_FOUND:"Provider not found",INVALID_TOKEN:"Invalid token",TOKEN_EXPIRED:"Token expired",ID_TOKEN_NOT_SUPPORTED:"id_token not supported",FAILED_TO_GET_USER_INFO:"Failed to get user info",USER_EMAIL_NOT_FOUND:"User email not found",EMAIL_NOT_VERIFIED:"Email not verified",PASSWORD_TOO_SHORT:"Password too short",PASSWORD_TOO_LONG:"Password too long",USER_ALREADY_EXISTS:"User already exists.",USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL:"User already exists. Use another email.",EMAIL_CAN_NOT_BE_UPDATED:"Email can not be updated",CREDENTIAL_ACCOUNT_NOT_FOUND:"Credential account not found",SESSION_EXPIRED:"Session expired. Re-authenticate to perform this action.",FAILED_TO_UNLINK_LAST_ACCOUNT:"You can't unlink your last account",ACCOUNT_NOT_FOUND:"Account not found",USER_ALREADY_HAS_PASSWORD:"User already has a password. Provide that to delete the account.",CROSS_SITE_NAVIGATION_LOGIN_BLOCKED:"Cross-site navigation login blocked. This request appears to be a CSRF attack.",VERIFICATION_EMAIL_NOT_ENABLED:"Verification email isn't enabled",EMAIL_ALREADY_VERIFIED:"Email is already verified",EMAIL_MISMATCH:"Email mismatch",SESSION_NOT_FRESH:"Session is not fresh",LINKED_ACCOUNT_ALREADY_EXISTS:"Linked account already exists",INVALID_ORIGIN:"Invalid origin",INVALID_CALLBACK_URL:"Invalid callbackURL",INVALID_REDIRECT_URL:"Invalid redirectURL",INVALID_ERROR_CALLBACK_URL:"Invalid errorCallbackURL",INVALID_NEW_USER_CALLBACK_URL:"Invalid newUserCallbackURL",MISSING_OR_NULL_ORIGIN:"Missing or null Origin",CALLBACK_URL_REQUIRED:"callbackURL is required",FAILED_TO_CREATE_VERIFICATION:"Unable to create verification",FIELD_NOT_ALLOWED:"Field not allowed to be set",ASYNC_VALIDATION_NOT_SUPPORTED:"Async validation is not supported",VALIDATION_ERROR:"Validation Error",MISSING_FIELD:"Field is required",METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED:"POST method requires deferSessionRefresh to be enabled in session config",BODY_MUST_BE_AN_OBJECT:"Body must be an object",PASSWORD_ALREADY_SET:"User already has a password set"});var Ln=class extends Error{constructor(e,t){super(e,t),this.name="BetterAuthError",this.message=e,this.stack="";}};function RR(e){try{return (new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new Ln(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function AR(e){try{let t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new Ln(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof Ln?t:new Ln(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function Ro(e,t="/api/auth"){if(AR(e),RR(e))return e;let r=e.replace(/\/+$/,"");return !t||t==="/"?r:(t=t.startsWith("/")?t:`/${t}`,`${r}${t}`)}function hS(e,t,r,i,n){if(e)return Ro(e,t);{let u=it.BETTER_AUTH_URL||it.NEXT_PUBLIC_BETTER_AUTH_URL||it.PUBLIC_BETTER_AUTH_URL||it.NUXT_PUBLIC_BETTER_AUTH_URL||it.NUXT_PUBLIC_AUTH_URL||(it.BASE_URL!=="/"?it.BASE_URL:void 0);if(u)return Ro(u,t)}if(typeof window<"u"&&window.location)return Ro(window.location.origin,t)}var gS={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<"u"&&window.location&&window.location)try{window.location.href=e.data.url;}catch{}}}};function yS(e,t){let r=ko(false),i=uu(r,"/get-session",e,{method:"GET"}),n=()=>{};return Io(i,()=>{let o=Zm({sessionAtom:i,sessionSignal:r,$fetch:e,options:t});return o.init(),n=o.broadcastSessionUpdate,()=>{o.cleanup();}}),{session:i,$sessionSignal:r,broadcastSessionUpdate:o=>n(o)}}function Gm(e){if(e===null||typeof e!="object")return false;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?false:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":true}function qm(e,t,r=".",i){if(!Gm(t))return qm(e,{},r,i);let n=Object.assign({},t);for(let o in e){if(o==="__proto__"||o==="constructor")continue;let a=e[o];a!=null&&(i&&i(n,o,a,r)||(Array.isArray(a)&&Array.isArray(n[o])?n[o]=[...a,...n[o]]:Gm(a)&&Gm(n[o])?n[o]=qm(a,n[o],(r?`${r}.`:"")+o.toString(),i):n[o]=a));}return n}function Hm(e){return (...t)=>t.reduce((r,i)=>qm(r,i,"",e),{})}var vS=Hm();var PR=Object.defineProperty,FR=Object.defineProperties,jR=Object.getOwnPropertyDescriptors,bS=Object.getOwnPropertySymbols,zR=Object.prototype.hasOwnProperty,NR=Object.prototype.propertyIsEnumerable,SS=(e,t,r)=>t in e?PR(e,t,{enumerable:true,configurable:true,writable:true,value:r}):e[t]=r,qt=(e,t)=>{for(var r in t||(t={}))zR.call(t,r)&&SS(e,r,t[r]);if(bS)for(var r of bS(t))NR.call(t,r)&&SS(e,r,t[r]);return e},on=(e,t)=>FR(e,jR(t)),UR=class extends Error{constructor(e,t,r){super(t||e.toString(),{cause:r}),this.status=e,this.statusText=t,this.error=r,Error.captureStackTrace(this,this.constructor);}},LR=async(e,t)=>{var r,i,n,o,a,u;let c=t||{},l={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return {url:e,options:c,hooks:l};for(let d of t?.plugins||[]){if(d.init){let p=await((r=d.init)==null?void 0:r.call(d,e.toString(),t));c=p.options||c,e=p.url;}l.onRequest.push((i=d.hooks)==null?void 0:i.onRequest),l.onResponse.push((n=d.hooks)==null?void 0:n.onResponse),l.onSuccess.push((o=d.hooks)==null?void 0:o.onSuccess),l.onError.push((a=d.hooks)==null?void 0:a.onError),l.onRetry.push((u=d.hooks)==null?void 0:u.onRetry);}return {url:e,options:c,hooks:l}},xS=class{constructor(e){this.options=e;}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},MR=class{constructor(e){this.options=e;}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function BR(e){if(typeof e=="number")return new xS({type:"linear",attempts:e,delay:1e3});switch(e.type){case "linear":return new xS(e);case "exponential":return new MR(e);default:throw new Error("Invalid retry strategy")}}var VR=async e=>{let t={},r=async i=>typeof i=="function"?await i():i;if(e?.auth){if(e.auth.type==="Bearer"){let i=await r(e.auth.token);if(!i)return t;t.authorization=`Bearer ${i}`;}else if(e.auth.type==="Basic"){let[i,n]=await Promise.all([r(e.auth.username),r(e.auth.password)]);if(!i||!n)return t;t.authorization=`Basic ${btoa(`${i}:${n}`)}`;}else if(e.auth.type==="Custom"){let[i,n]=await Promise.all([r(e.auth.prefix),r(e.auth.value)]);if(!n)return t;t.authorization=`${i??""} ${n}`;}}return t},ZR=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function WR(e){let t=e.headers.get("content-type"),r=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return "json";let i=t.split(";").shift()||"";return ZR.test(i)?"json":r.has(i)||i.startsWith("text/")?"text":"blob"}function GR(e){try{return JSON.parse(e),!0}catch{return false}}function Jm(e){if(e===void 0)return false;let t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?true:t!=="object"?false:Array.isArray(e)?true:e.buffer?false:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}function DS(e){try{return JSON.parse(e)}catch{return e}}function _S(e){return typeof e=="function"}function qR(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&_S(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&_S(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function HR(e){let t=new Headers(e?.headers),r=await VR(e);for(let[i,n]of Object.entries(r||{}))t.set(i,n);if(!t.has("content-type")){let i=JR(e?.body);i&&t.set("content-type",i);}return t}function JR(e){return Jm(e)?"application/json":null}function KR(e){if(!e?.body)return null;let t=new Headers(e?.headers);if(Jm(e.body)&&!t.has("content-type")){for(let[r,i]of Object.entries(e?.body))i instanceof Date&&(e.body[r]=i.toISOString());return JSON.stringify(e.body)}return t.has("content-type")&&t.get("content-type")==="application/x-www-form-urlencoded"&&Jm(e.body)?new URLSearchParams(e.body).toString():e.body}function YR(e,t){var r;if(t?.method)return t.method.toUpperCase();if(e.startsWith("@")){let i=(r=e.split("@")[1])==null?void 0:r.split("/")[0];return wS.includes(i)?i.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function XR(e,t){let r;return !e?.signal&&e?.timeout&&(r=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:r,clearTimeout:()=>{r&&clearTimeout(r);}}}var QR=class ES extends Error{constructor(t,r){super(r||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,ES.prototype);}};async function du(e,t){let r=await e["~standard"].validate(t);if(r.issues)throw new QR(r.issues);return r.value}var wS=["get","post","put","patch","delete"];var eA=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,r){var i,n,o,a;let u=((n=(i=e.plugins)==null?void 0:i.find(c=>{var l;return (l=c.schema)!=null&&l.config?t.startsWith(c.schema.config.baseURL||"")||t.startsWith(c.schema.config.prefix||""):false}))==null?void 0:n.schema)||e.schema;if(u){let c=t;(o=u.config)!=null&&o.prefix&&c.startsWith(u.config.prefix)&&(c=c.replace(u.config.prefix,""),u.config.baseURL&&(t=t.replace(u.config.prefix,u.config.baseURL))),(a=u.config)!=null&&a.baseURL&&c.startsWith(u.config.baseURL)&&(c=c.replace(u.config.baseURL,""));let l=u.schema[c];if(l){let d=on(qt({},r),{method:l.method,output:l.output});return r?.disableValidation||(d=on(qt({},d),{body:l.input?await du(l.input,r?.body):r?.body,params:l.params?await du(l.params,r?.params):r?.params,query:l.query?await du(l.query,r?.query):r?.query})),{url:t,options:d}}}return {url:t,options:r}}}),$S=e=>{async function t(r,i){let n=on(qt(qt({},e),i),{plugins:[...e?.plugins||[],eA(e||{}),...i?.plugins||[]]});if(e?.catchAllError)try{return await Km(r,n)}catch(o){return {data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:o}}}return await Km(r,n)}return t};function tA(e,t){let{baseURL:r,params:i,query:n}=t||{query:{},params:{},baseURL:""},o=e.startsWith("http")?e.split("/").slice(0,3).join("/"):r||"";if(e.startsWith("@")){let p=e.toString().split("@")[1].split("/")[0];wS.includes(p)&&(e=e.replace(`@${p}/`,"/"));}o.endsWith("/")||(o+="/");let[a,u]=e.replace(o,"").split("?"),c=new URLSearchParams(u);for(let[p,m]of Object.entries(n||{})){if(m==null)continue;let h;if(typeof m=="string")h=m;else if(Array.isArray(m)){for(let v of m)c.append(p,v);continue}else h=JSON.stringify(m);c.set(p,h);}if(i)if(Array.isArray(i)){let p=a.split("/").filter(m=>m.startsWith(":"));for(let[m,h]of p.entries()){let v=i[m];a=a.replace(h,v);}}else for(let[p,m]of Object.entries(i))a=a.replace(`:${p}`,String(m));a=a.split("/").map(encodeURIComponent).join("/"),a.startsWith("/")&&(a=a.slice(1));let l=c.toString();return l=l.length>0?`?${l}`.replace(/\+/g,"%20"):"",o.startsWith("http")?new URL(`${a}${l}`,o):`${o}${a}${l}`}var Km=async(e,t)=>{var r,i,n,o,a,u,c,l;let{hooks:d,url:p,options:m}=await LR(e,t),h=qR(m),v=new AbortController,D=(r=m.signal)!=null?r:v.signal,b=tA(p,m),U=KR(m),H=await HR(m),B=YR(p,m),A=on(qt({},m),{url:b,headers:H,body:U,method:B,signal:D});for(let T of d.onRequest)if(T){let V=await T(A);typeof V=="object"&&V!==null&&(A=V);}("pipeTo"in A&&typeof A.pipeTo=="function"||typeof((i=t?.body)==null?void 0:i.pipe)=="function")&&("duplex"in A||(A.duplex="half"));let{clearTimeout:O}=XR(m,v),z=await h(A.url,A);O();let ne={response:z,request:A};for(let T of d.onResponse)if(T){let V=await T(on(qt({},ne),{response:(n=t?.hookOptions)!=null&&n.cloneResponse?z.clone():z}));V instanceof Response?z=V:typeof V=="object"&&V!==null&&(z=V.response);}if(z.ok){if(!(A.method!=="HEAD"))return {data:"",error:null};let V=WR(z),te={data:null,response:z,request:A};if(V==="json"||V==="text"){let pe=await z.text(),se=(o=A.jsonParser)!=null?o:DS;te.data=await se(pe);}else te.data=await z[V]();A?.output&&A.output&&!A.disableValidation&&(te.data=await du(A.output,te.data));for(let pe of d.onSuccess)pe&&await pe(on(qt({},te),{response:(a=t?.hookOptions)!=null&&a.cloneResponse?z.clone():z}));return t?.throw?te.data:{data:te.data,error:null}}let ce=(u=t?.jsonParser)!=null?u:DS,be=await z.text(),ie=GR(be),F=ie?await ce(be):null,j={response:z,responseText:be,request:A,error:on(qt({},F),{status:z.status,statusText:z.statusText})};for(let T of d.onError)T&&await T(on(qt({},j),{response:(c=t?.hookOptions)!=null&&c.cloneResponse?z.clone():z}));if(t?.retry){let T=BR(t.retry),V=(l=t.retryAttempt)!=null?l:0;if(await T.shouldAttemptRetry(V,z)){for(let pe of d.onRetry)pe&&await pe(ne);let te=T.getDelay(V);return await new Promise(pe=>setTimeout(pe,te)),await Km(e,on(qt({},t),{retryAttempt:V+1}))}}if(t?.throw)throw new UR(z.status,z.statusText,ie?F:be);return {data:null,error:on(qt({},F),{status:z.status,statusText:z.statusText})}};var nA=e=>{if(typeof process>"u")return;let t=e??"/api/auth";if(process.env.NEXT_PUBLIC_AUTH_URL)return process.env.NEXT_PUBLIC_AUTH_URL;if(typeof window>"u"){if(process.env.NEXTAUTH_URL)try{return process.env.NEXTAUTH_URL}catch{}if(process.env.VERCEL_URL)try{let r=process.env.VERCEL_URL.startsWith("http")?"":"https://";return `${new URL(`${r}${process.env.VERCEL_URL}`).origin}${t}`}catch{}}},kS=(e,t)=>{let r="credentials"in Request.prototype,i=hS(e?.baseURL,e?.basePath)??nA(e?.basePath)??"/api/auth",n=e?.plugins?.flatMap(O=>O.fetchPlugins).filter(O=>O!==void 0)||[],o={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:a,onError:u,onRequest:c,onResponse:l,...d}=e?.fetchOptions||{},p=$S({baseURL:i,...r?{credentials:"include"}:{},method:"GET",jsonParser(O){return O?Vm(O,{strict:false}):null},customFetchImpl:fetch,...d,plugins:[o,...d.plugins||[],...e?.disableDefaultFetchPlugins?[]:[gS],...n]}),{$sessionSignal:m,session:h,broadcastSessionUpdate:v}=yS(p,e),D=e?.plugins||[],b={},U={$sessionSignal:m,session:h},H={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},B=[{signal:"$sessionSignal",matcher(O){return O==="/sign-out"||O==="/update-user"||O==="/update-session"||O==="/sign-up/email"||O==="/sign-in/email"||O==="/delete-user"||O==="/verify-email"||O==="/revoke-sessions"||O==="/revoke-session"||O==="/change-email"},callback(O){O==="/sign-out"?v("signout"):(O==="/update-user"||O==="/update-session")&&v("updateUser");}}];for(let O of D)O.getAtoms&&Object.assign(U,O.getAtoms?.(p)),O.pathMethods&&Object.assign(H,O.pathMethods),O.atomListeners&&B.push(...O.atomListeners);let A={notify:O=>{U[O].set(!U[O].get());},listen:(O,z)=>{U[O].subscribe(z);},atoms:U};for(let O of D)O.getActions&&(b=vS(O.getActions?.(p,A,e)??{},b));return {get baseURL(){return i},pluginsActions:b,pluginsAtoms:U,pluginPathMethods:H,atomListeners:B,$fetch:p,$store:A}};function IS(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function rA(e,t,r){let i=t[e],{fetchOptions:n,query:o,...a}=r||{};return i||(n?.method?n.method:a&&Object.keys(a).length>0?"POST":"GET")}function OS(e,t,r,i,n){function o(a=[]){return new Proxy(function(){},{get(u,c){if(typeof c!="string"||c==="then"||c==="catch"||c==="finally")return;let l=[...a,c],d=e;for(let p of l)if(d&&typeof d=="object"&&p in d)d=d[p];else {d=void 0;break}return typeof d=="function"||IS(d)?d:o(l)},apply:async(u,c,l)=>{let d="/"+a.map(H=>H.replace(/[A-Z]/g,B=>`-${B.toLowerCase()}`)).join("/"),p=l[0]||{},m=l[1]||{},{query:h,fetchOptions:v,...D}=p,b={...m,...v},U=rA(d,r,p);return await t(d,{...b,body:U==="GET"?void 0:{...D,...b?.body||{}},query:h||b?.query,method:U,async onSuccess(H){if(await b?.onSuccess?.(H),!n||b.disableSignal)return;let B=n.filter(O=>O.matcher(d));if(!B.length)return;let A=new Set;for(let O of B){let z=i[O.signal];if(!z)return;if(A.has(O.signal))continue;A.add(O.signal);let ne=z.get();setTimeout(()=>{z.set(!ne);},10),O.callback?.(d);}}})}})}return o()}function CS(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Ym(e){let{pluginPathMethods:t,pluginsActions:r,pluginsAtoms:i,$fetch:n,atomListeners:o,$store:a}=kS(e),u={};for(let[c,l]of Object.entries(i))u[`use${CS(c)}`]=l;return OS({...r,...u,$fetch:n,$store:a},n,t,i,o)}Pe({FAILED_TO_CREATE_USER:"Failed to create user",USER_ALREADY_EXISTS:"User already exists.",USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL:"User already exists. Use another email.",YOU_CANNOT_BAN_YOURSELF:"You cannot ban yourself",YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE:"You are not allowed to change users role",YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS:"You are not allowed to create users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS:"You are not allowed to list users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS:"You are not allowed to list users sessions",YOU_ARE_NOT_ALLOWED_TO_BAN_USERS:"You are not allowed to ban users",YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS:"You are not allowed to impersonate users",YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS:"You are not allowed to revoke users sessions",YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS:"You are not allowed to delete users",YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD:"You are not allowed to set users password",BANNED_USER:"You have been banned from this application",YOU_ARE_NOT_ALLOWED_TO_GET_USER:"You are not allowed to get user",NO_DATA_TO_UPDATE:"No data to update",YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS:"You are not allowed to update users",YOU_CANNOT_REMOVE_YOURSELF:"You cannot remove yourself",YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE:"You are not allowed to set a non-existent role value",YOU_CANNOT_IMPERSONATE_ADMINS:"You cannot impersonate admins",INVALID_ROLE_TYPE:"Invalid role type"});Pe({INVALID_EMAIL_FORMAT:"Email was not generated in a valid format",FAILED_TO_CREATE_USER:"Failed to create user",COULD_NOT_CREATE_SESSION:"Could not create session",ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY:"Anonymous users cannot sign in again anonymously",FAILED_TO_DELETE_ANONYMOUS_USER:"Failed to delete anonymous user",USER_IS_NOT_ANONYMOUS:"User is not anonymous",DELETE_ANONYMOUS_USER_DISABLED:"Deleting anonymous users is disabled"});var Qm=()=>({id:"device-authorization",$InferServerPlugin:{},pathMethods:{"/device/code":"POST","/device/token":"POST","/device":"GET","/device/approve":"POST","/device/deny":"POST"}});Pe({OTP_EXPIRED:"OTP expired",INVALID_OTP:"Invalid OTP",TOO_MANY_ATTEMPTS:"Too many attempts"});Pe({INVALID_OAUTH_CONFIGURATION:"Invalid OAuth configuration",TOKEN_URL_NOT_FOUND:"Invalid OAuth configuration. Token URL not found.",PROVIDER_CONFIG_NOT_FOUND:"No config found for provider",PROVIDER_ID_REQUIRED:"Provider ID is required",INVALID_OAUTH_CONFIG:"Invalid OAuth configuration.",SESSION_REQUIRED:"Session is required",ISSUER_MISMATCH:"OAuth issuer mismatch. The authorization server issuer does not match the expected value (RFC 9207).",ISSUER_MISSING:"OAuth issuer parameter missing. The authorization server did not include the required iss parameter (RFC 9207)."});Pe({INVALID_SESSION_TOKEN:"Invalid session token"});Pe({YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION:"You are not allowed to create a new organization",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS:"You have reached the maximum number of organizations",ORGANIZATION_ALREADY_EXISTS:"Organization already exists",ORGANIZATION_SLUG_ALREADY_TAKEN:"Organization slug already taken",ORGANIZATION_NOT_FOUND:"Organization not found",USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION:"User is not a member of the organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION:"You are not allowed to update this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION:"You are not allowed to delete this organization",NO_ACTIVE_ORGANIZATION:"No active organization",USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION:"User is already a member of this organization",MEMBER_NOT_FOUND:"Member not found",ROLE_NOT_FOUND:"Role not found",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM:"You are not allowed to create a new team",TEAM_ALREADY_EXISTS:"Team already exists",TEAM_NOT_FOUND:"Team not found",YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER:"You cannot leave the organization as the only owner",YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER:"You cannot leave the organization without an owner",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER:"You are not allowed to delete this member",YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION:"You are not allowed to invite users to this organization",USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION:"User is already invited to this organization",INVITATION_NOT_FOUND:"Invitation not found",YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION:"You are not the recipient of the invitation",EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION:"Email verification required before accepting or rejecting invitation",YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION:"You are not allowed to cancel this invitation",INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION:"Inviter is no longer a member of the organization",YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE:"You are not allowed to invite a user with this role",FAILED_TO_RETRIEVE_INVITATION:"Failed to retrieve invitation",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS:"You have reached the maximum number of teams",UNABLE_TO_REMOVE_LAST_TEAM:"Unable to remove last team",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER:"You are not allowed to update this member",ORGANIZATION_MEMBERSHIP_LIMIT_REACHED:"Organization membership limit reached",YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to create teams in this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to delete teams in this organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM:"You are not allowed to update this team",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM:"You are not allowed to delete this team",INVITATION_LIMIT_REACHED:"Invitation limit reached",TEAM_MEMBER_LIMIT_REACHED:"Team member limit reached",USER_IS_NOT_A_MEMBER_OF_THE_TEAM:"User is not a member of the team",YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM:"You are not allowed to list the members of this team",YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM:"You do not have an active team",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER:"You are not allowed to create a new member",YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER:"You are not allowed to remove a team member",YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION:"You are not allowed to access this organization as an owner",YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION:"You are not a member of this organization",MISSING_AC_INSTANCE:"Dynamic Access Control requires a pre-defined ac instance on the server auth plugin. Read server logs for more information",YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE:"You must be in an organization to create a role",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE:"You are not allowed to create a role",YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE:"You are not allowed to update a role",YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE:"You are not allowed to delete a role",YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE:"You are not allowed to read a role",YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE:"You are not allowed to list a role",YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE:"You are not allowed to get a role",TOO_MANY_ROLES:"This organization has too many roles",INVALID_RESOURCE:"The provided permission includes an invalid resource",ROLE_NAME_IS_ALREADY_TAKEN:"That role name is already taken",CANNOT_DELETE_A_PRE_DEFINED_ROLE:"Cannot delete a pre-defined role",ROLE_IS_ASSIGNED_TO_MEMBERS:"Cannot delete a role that is assigned to members. Please reassign the members to a different role first"});Pe({INVALID_PHONE_NUMBER:"Invalid phone number",PHONE_NUMBER_EXIST:"Phone number already exists",PHONE_NUMBER_NOT_EXIST:"phone number isn't registered",INVALID_PHONE_NUMBER_OR_PASSWORD:"Invalid phone number or password",UNEXPECTED_ERROR:"Unexpected error",OTP_NOT_FOUND:"OTP not found",OTP_EXPIRED:"OTP expired",INVALID_OTP:"Invalid OTP",PHONE_NUMBER_NOT_VERIFIED:"Phone number not verified",PHONE_NUMBER_CANNOT_BE_UPDATED:"Phone number cannot be updated",SEND_OTP_NOT_IMPLEMENTED:"sendOTP not implemented",TOO_MANY_ATTEMPTS:"Too many attempts"});Pe({OTP_NOT_ENABLED:"OTP not enabled",OTP_HAS_EXPIRED:"OTP has expired",TOTP_NOT_ENABLED:"TOTP not enabled",TWO_FACTOR_NOT_ENABLED:"Two factor isn't enabled",BACKUP_CODES_NOT_ENABLED:"Backup codes aren't enabled",INVALID_BACKUP_CODE:"Invalid backup code",INVALID_CODE:"Invalid code",TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:"Too many attempts. Please request a new code.",INVALID_TWO_FACTOR_COOKIE:"Invalid two factor cookie"});Pe({INVALID_USERNAME_OR_PASSWORD:"Invalid username or password",EMAIL_NOT_VERIFIED:"Email not verified",UNEXPECTED_ERROR:"Unexpected error",USERNAME_IS_ALREADY_TAKEN:"Username is already taken. Please try another.",USERNAME_TOO_SHORT:"Username is too short",USERNAME_TOO_LONG:"Username is too long",INVALID_USERNAME:"Username is invalid",INVALID_DISPLAY_USERNAME:"Display username is invalid"});var sA={withStackTrace:false},KS=(e,t,r=sA)=>{let i=t.isOk()?{type:"Ok",value:t.value}:{type:"Err",value:t.error},n=r.withStackTrace?new Error().stack:void 0;return {data:i,message:e,stack:n}};function fr(e,t,r,i){function n(o){return o instanceof r?o:new r(function(a){a(o);})}return new(r||(r=Promise))(function(o,a){function u(d){try{l(i.next(d));}catch(p){a(p);}}function c(d){try{l(i.throw(d));}catch(p){a(p);}}function l(d){d.done?o(d.value):n(d.value).then(u,c);}l((i=i.apply(e,[])).next());})}function HS(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return {next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function an(e){return this instanceof an?(this.v=e,this):new an(e)}function JS(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=r.apply(e,t||[]),n,o=[];return n=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",a),n[Symbol.asyncIterator]=function(){return this},n;function a(h){return function(v){return Promise.resolve(v).then(h,p)}}function u(h,v){i[h]&&(n[h]=function(D){return new Promise(function(b,U){o.push([h,D,b,U])>1||c(h,D);})},v&&(n[h]=v(n[h])));}function c(h,v){try{l(i[h](v));}catch(D){m(o[0][3],D);}}function l(h){h.value instanceof an?Promise.resolve(h.value.v).then(d,p):m(o[0][2],h);}function d(h){c("next",h);}function p(h){c("throw",h);}function m(h,v){h(v),o.shift(),o.length&&c(o[0][0],o[0][1]);}}function uA(e){var t,r;return t={},i("next"),i("throw",function(n){throw n}),i("return"),t[Symbol.iterator]=function(){return this},t;function i(n,o){t[n]=e[n]?function(a){return (r=!r)?{value:an(e[n](a)),done:false}:o?o(a):a}:o;}}function cA(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof HS=="function"?HS(e):e[Symbol.iterator](),r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r);function i(o){r[o]=e[o]&&function(a){return new Promise(function(u,c){a=e[o](a),n(u,c,a.done,a.value);})};}function n(o,a,u,c){Promise.resolve(c).then(function(l){o({value:l,done:u});},a);}}var vn=class e{constructor(t){this._promise=t;}static fromSafePromise(t){let r=t.then(i=>new kt(i));return new e(r)}static fromPromise(t,r){let i=t.then(n=>new kt(n)).catch(n=>new vt(r(n)));return new e(i)}static fromThrowable(t,r){return (...i)=>new e(fr(this,void 0,void 0,function*(){try{return new kt(yield t(...i))}catch(n){return new vt(r?r(n):n)}}))}static combine(t){return lA(t)}static combineWithAllErrors(t){return dA(t)}map(t){return new e(this._promise.then(r=>fr(this,void 0,void 0,function*(){return r.isErr()?new vt(r.error):new kt(yield t(r.value))})))}andThrough(t){return new e(this._promise.then(r=>fr(this,void 0,void 0,function*(){if(r.isErr())return new vt(r.error);let i=yield t(r.value);return i.isErr()?new vt(i.error):new kt(r.value)})))}andTee(t){return new e(this._promise.then(r=>fr(this,void 0,void 0,function*(){if(r.isErr())return new vt(r.error);try{yield t(r.value);}catch{}return new kt(r.value)})))}orTee(t){return new e(this._promise.then(r=>fr(this,void 0,void 0,function*(){if(r.isOk())return new kt(r.value);try{yield t(r.error);}catch{}return new vt(r.error)})))}mapErr(t){return new e(this._promise.then(r=>fr(this,void 0,void 0,function*(){return r.isOk()?new kt(r.value):new vt(yield t(r.error))})))}andThen(t){return new e(this._promise.then(r=>{if(r.isErr())return new vt(r.error);let i=t(r.value);return i instanceof e?i._promise:i}))}orElse(t){return new e(this._promise.then(r=>fr(this,void 0,void 0,function*(){return r.isErr()?t(r.error):new kt(r.value)})))}match(t,r){return this._promise.then(i=>i.match(t,r))}unwrapOr(t){return this._promise.then(r=>r.unwrapOr(t))}safeUnwrap(){return JS(this,arguments,function*(){return yield an(yield an(yield*uA(cA(yield an(this._promise.then(r=>r.safeUnwrap()))))))})}then(t,r){return this._promise.then(t,r)}[Symbol.asyncIterator](){return JS(this,arguments,function*(){let r=yield an(this._promise);return r.isErr()&&(yield yield an(fu(r.error))),yield an(r.value)})}};function fu(e){return new vn(Promise.resolve(new vt(e)))}var YS=e=>{let t=Fe([]);for(let r of e)if(r.isErr()){t=de(r.error);break}else t.map(i=>i.push(r.value));return t},lA=e=>vn.fromSafePromise(Promise.all(e)).andThen(YS),XS=e=>{let t=Fe([]);for(let r of e)r.isErr()&&t.isErr()?t.error.push(r.error):r.isErr()&&t.isOk()?t=de([r.error]):r.isOk()&&t.isOk()&&t.value.push(r.value);return t},dA=e=>vn.fromSafePromise(Promise.all(e)).andThen(XS),eh;(function(e){function t(n,o){return (...a)=>{try{let u=n(...a);return Fe(u)}catch(u){return de(o?o(u):u)}}}e.fromThrowable=t;function r(n){return YS(n)}e.combine=r;function i(n){return XS(n)}e.combineWithAllErrors=i;})(eh||(eh={}));function Fe(e){return new kt(e)}function de(e){return new vt(e)}var kt=class{constructor(t){this.value=t;}isOk(){return true}isErr(){return !this.isOk()}map(t){return Fe(t(this.value))}mapErr(t){return Fe(this.value)}andThen(t){return t(this.value)}andThrough(t){return t(this.value).map(r=>this.value)}andTee(t){try{t(this.value);}catch{}return Fe(this.value)}orTee(t){return Fe(this.value)}orElse(t){return Fe(this.value)}asyncAndThen(t){return t(this.value)}asyncAndThrough(t){return t(this.value).map(()=>this.value)}asyncMap(t){return vn.fromSafePromise(t(this.value))}unwrapOr(t){return this.value}match(t,r){return t(this.value)}safeUnwrap(){let t=this.value;return (function*(){return t})()}_unsafeUnwrap(t){return this.value}_unsafeUnwrapErr(t){throw KS("Called `_unsafeUnwrapErr` on an Ok",this,t)}*[Symbol.iterator](){return this.value}},vt=class{constructor(t){this.error=t;}isOk(){return false}isErr(){return !this.isOk()}map(t){return de(this.error)}mapErr(t){return de(t(this.error))}andThrough(t){return de(this.error)}andTee(t){return de(this.error)}orTee(t){try{t(this.error);}catch{}return de(this.error)}andThen(t){return de(this.error)}orElse(t){return t(this.error)}asyncAndThen(t){return fu(this.error)}asyncAndThrough(t){return fu(this.error)}asyncMap(t){return fu(this.error)}unwrapOr(t){return t}match(t,r){return r(this.error)}safeUnwrap(){let t=this.error;return (function*(){throw yield de(t),new Error("Do not use this generator out of `safeTry`")})()}_unsafeUnwrap(t){throw KS("Called `_unsafeUnwrap` on an Err",this,t)}_unsafeUnwrapErr(t){return this.error}*[Symbol.iterator](){let t=this;return yield t,t}};eh.fromThrowable;var fA=".ripplo";function ex(){return zh.join(pA.homedir(),fA)}function tx(){let e=ex();return Ei.existsSync(e)?Ei.chmodSync(e,448):Ei.mkdirSync(e,{mode:448,recursive:true}),e}function nx(e){return zh.join(ex(),e)}function To(e){let t=process.env.RIPPLO_TOKEN;if(t!=null&&t.trim().length>0)return t.trim();let r=mr(e);if(!Ei.existsSync(r))return null;let i=Ei.readFileSync(r,"utf8").trim();return i.length===0?null:i}function nh({serverUrl:e,token:t}){tx();let r=mr(e);Ei.mkdirSync(zh.dirname(r),{mode:448,recursive:true}),Ei.writeFileSync(r,t+`
47
+ `,{mode:384});}function rh(e){let t=mr(e);return Ei.existsSync(t)?(Ei.unlinkSync(t),true):false}function mr(e){return nx(zh.join("tokens",mA(e)))}function mA(e){return new URL(e).host.replaceAll(/[^a-zA-Z0-9.]/g,"_")}var gA=5e3,ix="ripplo-cli",yA=new Set(["authorization_pending","slow_down"]);async function ox({onDeviceCode:e,serverUrl:t}){let r=vA(t),i=await r.device.code({client_id:ix});if(i.error!=null)return de({description:i.error.error_description,kind:"device-code-failed"});let{device_code:n,user_code:o,verification_uri_complete:a}=i.data;return e({userCode:o,verificationUrl:a}),hr(a),(await bA({authClient:r,deviceCode:n})).map(c=>(nh({serverUrl:t,token:c}),c))}function vA(e){return Ym({baseURL:e,fetchOptions:{headers:{"User-Agent":"Ripplo CLI"}},plugins:[Qm()]})}async function bA({authClient:e,deviceCode:t}){for(;;){await SA(gA);let r=await e.device.token({client_id:ix,device_code:t,grant_type:"urn:ietf:params:oauth:grant-type:device_code"});if(r.data?.access_token!=null)return Fe(r.data.access_token);if(r.error!=null&&!yA.has(r.error.error))return de({code:r.error.error,description:r.error.error_description,kind:"authorization-failed"})}}function SA(e){return new Promise(t=>{setTimeout(t,e);})}function hr(e){let t=xA();exec(`${t} "${e}"`,()=>{});}function xA(){return process.platform==="darwin"?"open":process.platform==="win32"?"start":"xdg-open"}async function Po({lookupViewer:e,serverUrl:t}){let r=To(t);if(r!=null&&await _A({lookupViewer:e,serverUrl:t,token:r}))return;let n=(await ox({onDeviceCode:DA,serverUrl:t})).match(u=>u,u=>{process.stderr.write(`${EA(u)}
48
+ `),process.exit(1);}),o=await e({serverUrl:t,token:n}),a="Welcome to Ripplo";process.stdout.write(`
49
+ `),process.stdout.write(o.kind==="ok"?`${a}, ${wA(o.viewer)}.
50
+ `:`${a}.
51
+ `),process.stdout.write(`Session saved to ${mr(t)}.
52
+ `);}function Fo(e){if(!rh(e)){process.stdout.write(`Already signed out.
53
+ `);return}process.stdout.write(`Signed out. Removed ${mr(e)}.
54
+ `);}function DA(e){process.stdout.write(`Opening your browser to finish sign-in.
55
+ `),process.stdout.write(`If it didn't open, visit: ${e.verificationUrl}
56
+ `),process.stdout.write(`Verification code: ${e.userCode}
14
57
 
15
58
  `),process.stdout.write(`Waiting for approval...
16
- `)}})).match(a=>a,a=>{process.stderr.write(`${S(a)}
17
- `),process.exit(1)});await I("cli_login_completed");let o=await ur({serverUrl:e,token:t}),i=rn(process.cwd()),s=i?"Welcome back":"Welcome to Ripplo";process.stdout.write(`
18
- `),process.stdout.write(o.kind==="ok"?`${s}, ${sa(o.viewer)}.
19
- `:`${s}.
20
- `),process.stdout.write(`Session saved to ${rr(e)}.
21
- `),i||(process.stdout.write("\nNext: run `npx ripplo setup` to wire Ripplo into this project,\n"),process.stdout.write("or `npx ripplo init` to set it up by hand.\n"))}async function ia(e,r){let n=await ur({serverUrl:e,token:r});return n.kind==="ok"?(process.stdout.write(`Already signed in as ${n.viewer.email}. Run \`npx ripplo auth logout\` to switch accounts.
22
- `),!0):(n.kind==="unreachable"&&(process.stdout.write(`Could not reach the Ripplo server at ${e} (${n.message}). Your saved session may still be valid \u2014 fix connectivity and retry.
59
+ `);}async function _A({lookupViewer:e,serverUrl:t,token:r}){let i=await e({serverUrl:t,token:r});return i.kind==="ok"?(process.stdout.write(`Already signed in as ${i.viewer.email}. Run \`npx ripplo logout\` to switch accounts.
60
+ `),true):(i.kind==="unreachable"&&(process.stdout.write(`Could not reach the Ripplo server at ${t} (${i.message}). Your saved session may still be valid \u2014 fix connectivity and retry.
23
61
  `),process.exit(1)),process.stdout.write(`Your session expired \u2014 signing you back in.
24
62
 
25
- `),!1)}async function Ut(){let e=C(),r=P(e);r==null&&(process.stdout.write("Not signed in. Run `npx ripplo auth login`.\n"),process.exit(1));let n=await ur({serverUrl:e,token:r});n.kind==="unreachable"&&(process.stdout.write(`Could not reach the Ripplo server at ${e} (${n.message}). The token may still be valid \u2014 check the server / network and retry.
26
- `),process.exit(1)),n.kind==="rejected"&&(process.stdout.write("Token rejected by the server. Run `npx ripplo auth login` to sign in again.\n"),process.stdout.write(`(Claude Code: run it yourself in the background \u2014 the user just approves in the browser.)
27
- `),process.exit(1)),process.stdout.write(`Signed in as ${n.viewer.name} <${n.viewer.email}> (${e})
28
- `)}function Vt(){let e=C();if(!Qr(e)){process.stdout.write(`Already signed out.
29
- `);return}process.stdout.write(`Signed out. Removed ${rr(e)}.
30
- `)}async function ur({serverUrl:e,token:r}){try{let t=(await d({config:L({serverUrl:e,token:r}),document:oa,variables:void 0})).currentUser;return t==null?{kind:"rejected"}:{kind:"ok",viewer:{email:t.email,name:t.name}}}catch(n){return zr(n)==="UNAUTHENTICATED"?{kind:"rejected"}:{kind:"unreachable",message:n instanceof Error?n.message:String(n)}}}function sa(e){let r=e.name.trim().split(/\s+/)[0];return r!=null&&r.length>0?r:e.email}import{readFile as aa,writeFile as la}from"fs/promises";import da from"path";async function qt(e){let r=process.cwd(),n=await ye(r);n.isErr()&&Ce(Y(n.error));let t=n.value,o=we({cwd:r,lockfile:t});o.length>0&&Ce(ve(o));let i=await X(r,t),s=tn(j,i),a=da.join(r,J);if(e.check){await ca(a,i);return}await la(a,s),pn(r,s),await I("compile_succeeded"),pa(i)}function Ce(e){process.stderr.write(`${e}
31
- `),process.exit(1)}async function ca(e,r){let n=await aa(e,"utf8").catch(()=>null);n==null&&Ce(ir("missing")),ua(n,r)||Ce(ir("stale")),process.stdout.write(`${Ln()}
32
- `)}function ua(e,r){try{let n=N(j,e);return n.checks==null?!1:Pn(n,r)}catch{return!1}}function pa(e){let r=e.workflows.reduce((t,o)=>t+o.tests.length,0),n=[On(),Nn(r)];process.stdout.write(`${n.join(`
33
- `)}
34
- `)}import{graphql as Bt}from"gql.tada";function pr(e){return e==null?"Max local concurrent runs: unknown (not signed in?)":`Max local concurrent runs: ${String(e)} (the daemon applies changes live)`}import{graphql as ma}from"gql.tada";var fa=ma(`
35
- query DevSessionCheckPreflight($projectId: String!, $cwd: String!) {
36
- project(id: $projectId) {
37
- id
38
- devSession(cwd: $cwd) {
39
- id
40
- }
41
- }
42
- }
43
- `);function b(){return y(process.cwd()).match(e=>e,e=>{process.stderr.write(`${S(e)}
44
- `),process.stderr.write(`${x("setup")}
45
- `),process.exit(1)})}async function R(e){(await d({config:e,document:fa,variables:{cwd:e.cwd,projectId:e.projectId}})).project?.devSession==null&&(process.stderr.write("No active dev session. Start `npx ripplo daemon` as a background process (your app's dev server must also be running), then retry. Or run `/ripplo:start` in Claude Code.\n"),process.stderr.write(`${x("setup")}
46
- `),process.exit(1))}var ga=Bt(`
47
- mutation CliUpdateMaxLocalConcurrentRuns($value: Int!) {
48
- updateMaxLocalConcurrentRuns(value: $value) {
49
- id
50
- maxLocalConcurrentRuns
51
- }
52
- }
53
- `),ya=Bt(`
54
- query CliMaxLocalConcurrentRuns {
55
- currentUser {
56
- id
57
- maxLocalConcurrentRuns
58
- }
59
- }
60
- `);async function Ht({value:e}){let r=b();if(e==null){let t=await d({config:r,document:ya,variables:{}});process.stdout.write(`${pr(t.currentUser?.maxLocalConcurrentRuns)}
61
- `);return}let n=await d({config:r,document:ga,variables:{value:e}});process.stdout.write(`${pr(n.updateMaxLocalConcurrentRuns?.maxLocalConcurrentRuns)}
62
- `)}function zt(e){return e.status==="match"?"\u2713 Webhook secret: your app and Ripplo agree":e.status==="missing-local"?"! Webhook secret: RIPPLO_WEBHOOK_SECRET is not set \u2014 the engine adapter needs it to verify Ripplo's calls":e.status==="unknown"?"! Webhook secret: could not read this project's secret from Ripplo, so a mismatch would not be caught here":`\u2717 Webhook secret: RIPPLO_WEBHOOK_SECRET does not match the secret Ripplo holds for this project (${ha(e)}). Local runs still pass because your app verifies against the same local value, but cloud runs will be rejected. Copy the secret from the project settings into your env file.`}function ha(e){let r=e.localFingerprint??"unset",n=e.serverFingerprint??"unknown";return`yours ${r}, Ripplo's ${n}`}function Gt(e){switch(e.type){case"settings":return ka(e);case"env-files":return wa(e);case"token":return ba(e);case"dev-server":return va(e);case"dev-session":return dt(e);case"state-sources":return Sa(e);case"webhook-verification":return xa(e);case"model-validation":return Ra(e);case"workflows":return Ca(e);case"browser":return $a(e);case"engine-endpoint":return e.reachable?`\u2713 Engine endpoint: ${e.url} is reachable`:`\u2717 Engine endpoint: ${e.url} is not reachable`;case"adapter-enabled":return Pa(e);case"lockfile":return Ia(e);case"pre-commit-hook":return Aa(e);case"plugin-version":return Ta(e);case"stale-build":return ja(e);case"webhook-secret":return zt(e)}}function ka(e){return e.valid?"\u2713 Settings: project configured":`\u2717 Settings: missing fields: ${e.missingFields.join(", ")}`}function wa(e){return e.missing.length===0?"\u2713 Env files: declared files present":`\u2717 Env files: declared in .ripplo/project.json but missing:
63
- ${e.missing.map(n=>` ${n}`).join(`
64
- `)}
65
- In a git worktree? Copy the env file from the main checkout, or symlink to a shared file outside the working tree.`}function ba(e){switch(e.status){case"valid":return`\u2713 Auth: signed in as ${e.email??"unknown"}`;case"missing":return"\u2717 Auth: not signed in. Run `npx ripplo auth login`.\n (Claude Code: run it yourself in the background \u2014 the user just approves in the browser.)";case"invalid":return"\u2717 Auth: saved token rejected by the server. Run `npx ripplo auth login` to sign in again.\n (Claude Code: run it yourself in the background \u2014 the user just approves in the browser.)";case"unreachable":return`! Auth: could not reach ${C()} to validate the token.`}}function va(e){return e.reachable?`\u2713 Dev server: ${e.appUrl} is reachable`:`\u2717 Dev server: ${e.appUrl} is not responding. Start your dev server.`}function Sa(e){return e.count===0?"! State sources: none use HTTP":e.configured?e.endpointReachable===void 0?`! State sources: ${String(e.count)} use HTTP, but the engine endpoint was not verified`:`\u2713 State sources: ${String(e.count)} HTTP sources configured`:`\u2717 State sources: ${String(e.count)} use HTTP but RIPPLO_ENGINE_URL is not set`}function xa(e){return e.rejectsUnsigned?"\u2713 Webhook verification: unsigned requests rejected":"\u2717 Webhook verification: endpoint accepted an unsigned request \u2014 signature verification may be missing or misconfigured."}function Ra(e){if(!e.found)return"\u2717 Model: DSL failed to compile";if(e.valid)return"\u2713 Model: valid";let r=e.errors.map(n=>` - ${n.path===""?"":n.path+": "}${n.message}`);return`\u2717 Model: ${String(e.errorCount)} validation error${e.errorCount===1?"":"s"}
66
- ${r.join(`
67
- `)}`}function Ca(e){if(e.total===0)return"! Tests: none defined";if(e.invalidNames.length===0)return`\u2713 Tests: ${String(e.total)} valid`;let r=e.invalidWorkflows.map(n=>Ea(n));return`\u2717 Tests: ${String(e.invalidNames.length)} invalid
68
- ${r.join(`
69
- `)}`}function Ea(e){let r=e.errors.map(n=>" - "+(n.path===""?"":n.path+": ")+n.message);return" "+e.name+`:
70
- `+r.join(`
71
- `)}function $a(e){return e.installed?"\u2713 Browser: Chromium installed":"\u2717 Browser: Chromium not installed. Run `npx playwright install chromium`."}function Pa(e){switch(e.status){case"enabled":return`\u2713 Adapter: enabled at ${e.url}`;case"disabled":return"\u2717 Adapter: disabled (handler returned 404). Set ENABLE_RIPPLO_TESTING=true in your app's env (e.g. apps/<app>/.env.local for Next.js) and restart the dev server.";case"bad-secret":return"\u2717 Adapter: webhook signature rejected. RIPPLO_WEBHOOK_SECRET seen by your dev server does not match the one in your env file.";case"unreachable":return`\u2717 Adapter: ${e.url} could not be reached for signed probe.`;case"no-secret":return"\u2717 Adapter: RIPPLO_WEBHOOK_SECRET is not set in your env file (declared in .ripplo/project.json)."}}function Ia(e){switch(e.status){case"match":return`\u2713 Lockfile: ${J} is up to date`;case"missing":return`\u2717 Lockfile: ${J} is missing \u2014 run \`npx ripplo compile\` and commit it`;case"stale":return`\u2717 Lockfile: ${J} is out of date \u2014 run \`npx ripplo compile\` and commit it`}}function Aa(e){return e.installed?"\u2713 Pre-commit hook: .git/hooks/pre-commit runs `ripplo compile --check`":"! Pre-commit hook: .git/hooks/pre-commit does not run `ripplo compile --check` \u2014 see the setup skill for the snippet"}function Ta(e){return e.installed===e.cliVersion?`\u2713 Claude plugin: v${e.installed} matches CLI`:`! Claude plugin: installed v${e.installed}, CLI v${e.cliVersion} \u2014 run \`npx ripplo update\` (or /plugin in Claude Code)`}function ja(e){return e.freshness.kind==="foreign-binary"?"! Build: running a ripplo binary from outside this workspace \u2014 its bundle may not match your source. Run `npx ripplo` from this workspace after `pnpm build`.":e.freshness.kind==="stale"?`! Build: source is newer than the built bundles (${e.freshness.packages.join(", ")}) \u2014 the daemon and engine may be serving stale code. Run \`pnpm build\`, then \`npx ripplo daemon stop\` and start it again.`:"\u2713 Build: bundles up to date"}import $e from"fs";import Va from"os";import mr from"path";import{z as W}from"zod";import Ma from"latest-version";import Kt from"semver";async function Ee(e){try{return await Promise.race([Ma("ripplo"),new Promise(r=>setTimeout(()=>{r(void 0)},e))])}catch{return}}function Jt(e){return e.filter(r=>Kt.valid(r)!=null).toSorted(Kt.rcompare)[0]}import{createHash as La}from"crypto";import{graphql as Oa}from"gql.tada";var Na=Oa(`
72
- query ProjectWebhookSecret($projectId: String!) {
73
- project(id: $projectId) {
74
- id
75
- webhookSecret
76
- }
77
- }
78
- `);async function Zt(e){let r=y(e).unwrapOr(void 0),n=r==null?null:Qt(r.webhookSecret);if(r==null||n==null)return{localFingerprint:null,serverFingerprint:null,status:"missing-local",type:"webhook-secret"};let t=await Wa(r),o=t==null?null:Qt(t);return o==null?{localFingerprint:n,serverFingerprint:null,status:"unknown",type:"webhook-secret"}:{localFingerprint:n,serverFingerprint:o,status:n===o?"match":"drifted",type:"webhook-secret"}}function Qt(e){return e.length===0?null:La("sha256").update(e).digest("hex").slice(0,Fa)}var Fa=8;async function Wa(e){return(await d({config:e,document:Na,variables:{projectId:e.projectId}}).catch(()=>null))?.project?.webhookSecret??null}import{graphql as Da}from"gql.tada";var _a=Da(`
79
- query DoctorAuthViewer {
80
- currentUser {
81
- name
82
- email
83
- }
84
- }
85
- `),Ua="Failed to connect to Ripplo server";async function Xt({serverUrl:e,token:r}){try{let n=await d({config:L({serverUrl:e,token:r}),document:_a,variables:void 0});return n.currentUser==null?{kind:"invalid"}:{email:n.currentUser.email,kind:"valid"}}catch(n){return(n instanceof Error?n.message:String(n)).startsWith(Ua)?{kind:"unreachable"}:{kind:"invalid"}}}function Yt(e){switch(e.type){case"settings":return!e.valid;case"env-files":return e.missing.length>0;case"token":return e.status==="missing"||e.status==="invalid";case"dev-server":return!e.reachable;case"dev-session":return e.status!=="active";case"state-sources":return e.count>0&&!e.configured;case"engine-endpoint":return!e.reachable;case"adapter-enabled":return e.status!=="enabled";case"webhook-verification":return!e.rejectsUnsigned;case"webhook-secret":return e.status==="drifted";case"model-validation":return!e.valid;case"workflows":return e.invalidNames.length>0;case"browser":return!e.installed;case"lockfile":return e.status!=="match";case"pre-commit-hook":return!e.installed;case"plugin-version":return!1;case"stale-build":return!1}}async function eo(e){let r=await za(e),n={missing:qr(e),type:"env-files"},t=await Ga(),o=await Ka(),i=await ye(e),s=Ja(e,i),a=Qa(i),l=await Za(e,i),c=Xa(e),g=Ha(e),m=qa(),p=await nl(r,i);return[r,n,t,...p,s,a,l,c,o,...g==null?[]:[g],...m==null?[]:[m]]}function qa(){let e=F();return e.kind==="fresh"?null:{freshness:e,type:"stale-build"}}var Ba=W.object({plugins:W.record(W.string(),W.array(W.object({projectPath:W.string().optional(),scope:W.string().optional(),version:W.string()})))});function Ha(e){let r=mr.join(Va.homedir(),".claude","plugins","installed_plugins.json"),n=$e.existsSync(r)?$e.readFileSync(r,"utf8"):null;if(n==null)return null;let t=Ba.safeParse(JSON.parse(n));if(!t.success)return null;let o=Object.entries(t.data.plugins).filter(([s])=>s.startsWith("ripplo@")).flatMap(([,s])=>s).filter(s=>s.scope==="user"||s.projectPath===e).map(s=>s.version),i=Jt(o);return i==null?null:{cliVersion:w(),installed:i,type:"plugin-version"}}async function za(e){let r=await ut(e);return r.valid?{missingFields:[],type:"settings",valid:!0}:{missingFields:r.errors.map(t=>t.path).filter(t=>t.length>0),type:"settings",valid:!1}}async function Ga(){let e=C(),r=P(e);if(r==null||r.length===0)return{email:void 0,status:"missing",type:"token"};let n=await Xt({serverUrl:e,token:r});return n.kind==="valid"?{email:n.email,status:"valid",type:"token"}:{email:void 0,status:n.kind,type:"token"}}async function Ka(){let{chromium:e}=await import("playwright"),r=e.executablePath();return{installed:$e.existsSync(r),type:"browser"}}function Ja(e,r){if(r.isErr())return{errorCount:1,errors:[{message:Y(r.error),path:".ripplo/"}],found:!1,type:"model-validation",valid:!1};let n=we({cwd:e,lockfile:r.value});return{errorCount:n.length,errors:n.length===0?[]:[{message:ve(n),path:""}],found:!0,type:"model-validation",valid:n.length===0}}function Qa(e){if(e.isErr())return{invalidNames:[],invalidWorkflows:[],total:0,type:"workflows",valid:0};let r=e.value.workflows.length;return{invalidNames:[],invalidWorkflows:[],total:r,type:"workflows",valid:r}}async function Za(e,r){return r.isErr()?{status:"missing",type:"lockfile"}:{status:await An(e,r.value),type:"lockfile"}}function Xa(e){return{installed:Ya(e).some(n=>rl(n).includes("ripplo compile --check")),type:"pre-commit-hook"}}function Ya(e){let r=[el(e)??mr.join(".git","hooks"),".husky"];return[...new Set(r)].map(n=>mr.resolve(e,n,"pre-commit"))}function el(e){let r=en(["rev-parse","--git-path","hooks"],e).trim();return r.length===0?void 0:r}function rl(e){try{return $e.readFileSync(e,"utf8")}catch{return""}}async function nl(e,r){let n=Vr().map(s=>({appUrl:s.appUrl,engineUrl:s.engineUrl,webhookSecret:s.webhookSecret})).unwrapOr(void 0);if(n==null)return[];let t=[],o=await ar(n.appUrl)==null;t.push({appUrl:n.appUrl,reachable:o,type:"dev-server"});let i=await ct(process.cwd());if(t.push(i),e.valid&&r.isOk()){let s=await tl(n,r);t.push(...s)}return t}async function tl(e,r){let n=r.isOk()?r.value.state.sources.filter(g=>g.transport==="http").length:0,t=e.engineUrl.length>0,o={configured:t,count:n,endpointReachable:void 0,type:"state-sources"};if(n===0||!t)return[o];let i=il(e.appUrl,e.engineUrl);if(i==null)return[o];let s=await ar(i)==null,a=[];if(a.push({configured:!0,count:n,endpointReachable:s,type:"state-sources"}),ro(e.engineUrl)&&a.push({reachable:s,type:"engine-endpoint",url:i}),!s)return a;let l=await pt({appUrl:e.appUrl,engineUrl:e.engineUrl});a.push({rejectsUnsigned:l==null,type:"webhook-verification"});let c=await ol({engineUrl:i,webhookSecret:e.webhookSecret});return a.push({status:c,type:"adapter-enabled",url:i},await Zt(process.cwd())),a}async function ol({engineUrl:e,webhookSecret:r}){if(r.length===0)return"no-secret";let n=JSON.stringify({});try{let t=await fetch(`${e}/setup`,{body:n,headers:{"Content-Type":"application/json",...Xr({body:n,secret:r})},method:"PUT",signal:AbortSignal.timeout(5e3)});return t.status===404?"disabled":t.status===401||t.status===403?"bad-secret":"enabled"}catch{return"unreachable"}}function ro(e){return e.startsWith("http://")||e.startsWith("https://")}function il(e,r){return ro(r)?r:`${e}${r}`}var sl=3e3;async function no(){let e=process.cwd(),[r,n]=await Promise.all([Ee(sl),eo(e)]);process.stdout.write(`${Re({current:w(),latest:r})}
86
- `);let t=n.map(i=>Gt(i));process.stdout.write(t.join(`
87
- `)+`
88
- `);let o=n.some(i=>Yt(i));process.exit(o?1:0)}import Pe from"fs";import{graphql as al}from"gql.tada";var ll=al(`
89
- mutation CliSetHooksPaused($projectId: String!, $paused: Boolean!) {
90
- setHooksPaused(projectId: $projectId, paused: $paused) {
91
- id
92
- }
93
- }
94
- `);async function to(){let e=process.cwd();Kr(e);let r=nr(e);if(Pe.existsSync(r)){process.stdout.write("Hooks already paused. Run `npx ripplo hooks resume` to re-enable.\n");return}Pe.writeFileSync(r,""),await io(e,!0),process.stdout.write("Hooks paused. Pre-edit gates and stop enforcement are off until you run `npx ripplo hooks resume`.\n")}async function oo(){let e=process.cwd(),r=nr(e);if(!Pe.existsSync(r)){process.stdout.write(`Hooks already active.
95
- `);return}Pe.unlinkSync(r),await io(e,!1),process.stdout.write(`Hooks resumed.
96
- `)}async function io(e,r){let n=y(e).unwrapOr(void 0);n!=null&&await d({config:n,document:ll,variables:{paused:r,projectId:n.projectId}}).catch(t=>{process.stderr.write(`Warning: could not push hook-pause state to the server (${t instanceof Error?t.message:String(t)}) \u2014 the dashboard may show stale hook status.
97
- `)})}import re from"fs";import ne from"path";import{input as ho,select as ko}from"@inquirer/prompts";import{graphql as Bl}from"gql.tada";import{exec as dl,execFile as cl}from"child_process";import{err as ul,ok as so}from"neverthrow";import f from"fs";import{createRequire as pl}from"module";import k from"path";import{promisify as co}from"util";import{minVersion as ml}from"semver";import{z as h}from"zod";var fl=["ripplo","@ripplo/testing","@ripplo/instrument"],ao=[h.core.version.major,h.core.version.minor,h.core.version.patch].map(String).join("."),gl=4,lo=".ripplo/ripplo.lock linguist-generated=true",yl=[".ripplo/debug/",".ripplo/.local/"],hl=h.object({dependencies:h.record(h.string(),h.string()).optional(),devDependencies:h.record(h.string(),h.string()).optional(),optionalDependencies:h.record(h.string(),h.string()).optional(),peerDependencies:h.record(h.string(),h.string()).optional()}),kl=co(dl),wl=co(cl);async function uo({cwd:e,onStep:r}){let n=fo(e);r("Scaffolding project files..."),Tl({cwd:e,zodImportPath:n.importPath}),r("Updating .gitignore..."),Ml(e),r("Marking ripplo.lock as generated..."),El(e),r("Installing dependencies...");let t=w(),o=await vl({cwd:e,version:t}),i=[];o.ok||i.push({manualCommand:o.cmd,message:`Couldn't auto-install dev dependencies (${o.reason}). Run the command below, then run \`npx ripplo compile\` to build the lockfile.`});let s=o.ok?po(e):void 0;if(s!=null&&s!==t&&i.push({manualCommand:void 0,message:`Installed ripplo ${s}, but ${t} was requested. A registry policy such as pnpm's minimumReleaseAge can silently resolve an older version \u2014 allow the newer version and reinstall so the installed package matches the scaffolded files.`}),o.ok){r("Compiling initial lockfile...");let l=await Cl(e);l!=null&&i.push({manualCommand:void 0,message:l})}return r("Setting up browser..."),(await bl()).map(()=>i)}async function bl(){let{chromium:e}=await import("playwright"),r=e.executablePath();if(f.existsSync(r))return so(void 0);G.info("Chromium not found. Installing via Playwright...");let n=pl(import.meta.url),t=k.dirname(n.resolve("playwright/package.json")),o=k.join(t,"cli.js");return await wl(process.execPath,[o,"install","chromium"]),f.existsSync(r)?so(void 0):ul({kind:"playwright-install-failed"})}async function vl({cwd:e,version:r}){let n=fr({cwd:e,pm:gr(e),version:r});G.info("Installing dependencies: %s",n);try{return await kl(n,{cwd:e}),{ok:!0}}catch(t){let o=Rl(t);return G.warn("Install failed (%s): %s",n,o),{cmd:n,ok:!1,reason:o}}}var Sl=h.object({version:h.string()});function po(e){let r=k.join(e,"node_modules","ripplo","package.json");if(!f.existsSync(r)){let n=k.dirname(e);return n===e?void 0:po(n)}try{let n=Sl.safeParse(JSON.parse(f.readFileSync(r,"utf8")));return n.success?n.data.version:void 0}catch{return}}var xl=h.object({stderr:h.string().optional(),stdout:h.string().optional()});function Rl(e){let r=xl.safeParse(e),t=(r.success?[r.data.stderr,r.data.stdout]:[]).flatMap(o=>o==null?[]:o.split(`
98
- `)).map(o=>o.trim()).filter(o=>o.length>0).slice(-gl);return t.length>0?t.join(" "):e instanceof Error?e.message:String(e)}async function Cl(e){try{await In(e);return}catch(r){return`Couldn't compile initial lockfile: ${r instanceof Error?r.message:String(r)}.`}}function El(e){let r=k.join(e,".gitattributes"),n=f.existsSync(r)?f.readFileSync(r,"utf8"):"";if(n.includes(lo))return;let t=n.length===0||n.endsWith(`
99
- `)?"":`
100
- `;f.writeFileSync(r,`${n}${t}${lo}
101
- `)}function fr({cwd:e,pm:r,version:n}){let t=fl.map(s=>`${s}@${n}`),o=fo(e),i=[...t,o.installSpec].join(" ");return r==="pnpm"?$l(e)?`pnpm add -wD --save-exact ${i}`:`pnpm add -D --save-exact ${i}`:r==="yarn"?Pl({cwd:e,deps:i}):r==="bun"?`bun add -d --exact ${i}`:`npm install -D --save-exact ${i}`}function gr(e){return f.existsSync(k.join(e,"pnpm-lock.yaml"))?"pnpm":f.existsSync(k.join(e,"yarn.lock"))?"yarn":f.existsSync(k.join(e,"bun.lockb"))||f.existsSync(k.join(e,"bun.lock"))?"bun":"npm"}function $l(e){return f.existsSync(k.join(e,"pnpm-workspace.yaml"))||f.existsSync(k.join(e,"pnpm-workspace.yml"))}function Pl({cwd:e,deps:r}){return Il(e)?`yarn add -D --exact ${r}`:Al(e)?`yarn add -WD --exact ${r}`:`yarn add -D --exact ${r}`}function Il(e){if(f.existsSync(k.join(e,".yarnrc.yml"))||f.existsSync(k.join(e,".pnp.cjs"))||f.existsSync(k.join(e,".pnp.js")))return!0;let r=k.join(e,"package.json");if(!f.existsSync(r))return!1;try{let n=JSON.parse(f.readFileSync(r,"utf8"));if(n==null||typeof n!="object"||!("packageManager"in n))return!1;let t=n.packageManager;if(typeof t!="string")return!1;let o=/^yarn@(\d+)/.exec(t);return o!=null&&Number(o[1])>=2}catch{return!1}}function Al(e){let r=k.join(e,"package.json");if(!f.existsSync(r))return!1;try{let n=JSON.parse(f.readFileSync(r,"utf8"));if(n==null||typeof n!="object"||!("workspaces"in n))return!1;let t=n.workspaces;return Array.isArray(t)||t!=null&&typeof t=="object"}catch{return!1}}function Tl({cwd:e,zodImportPath:r}){let n=k.join(e,".ripplo");mo({zodImportPath:r}).forEach(({content:t,relPath:o})=>{let i=k.join(n,o);f.mkdirSync(k.dirname(i),{recursive:!0}),jl(i,t)})}function jl(e,r){f.existsSync(e)||f.writeFileSync(e,r)}function Ml(e){let r=k.join(e,".gitignore");if(!f.existsSync(r))return;let n=f.readFileSync(r,"utf8"),t=yl.filter(i=>!n.includes(i));if(t.length===0)return;let o=n.endsWith(`
102
- `)?"":`
103
- `;f.writeFileSync(r,n+o+t.join(`
104
- `)+`
105
- `)}var Ll=`import { createRipplo } from "@ripplo/testing";
106
- import { facts } from "./facts";
107
- import { state } from "./state";
108
- import { workflows } from "./workflows/index";
63
+ `),false)}function EA(e){return e.kind==="device-code-failed"?[`Could not start sign-in (device-code request failed): ${e.description}`,"Is the Ripplo server reachable? Check RIPPLO_SERVER_URL and retry."].join(`
64
+ `):[`Sign-in failed (${e.code}): ${e.description}`,e.code==="expired_token"?"The approval window expired \u2014 run `npx ripplo login` again.":"Run `npx ripplo login` to retry."].join(`
65
+ `)}function wA(e){let t=e.name.trim().split(/\s+/)[0];return t!=null&&t.length>0?t:e.email}var OA=1500,CA=4e3,RA=3,AA=50,TA=100,ax=false;function ih(){if(ax)return;ax=true;let e=new Agent({connections:TA,keepAliveMaxTimeout:CA,keepAliveTimeout:OA}),t=new RetryAgent(e,{errorCodes:["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT","UND_ERR_SOCKET"],maxRetries:RA,methods:["GET","POST","HEAD","OPTIONS","DELETE"],minTimeout:AA,statusCodes:[]});setGlobalDispatcher(t);}function mu(e,t,r){let i=e===1?t:`${t}s`;return `${String(e)} ${i}`}var PA={right:UA,center:LA},FA=0,hu=1,jA=2,gu=3,oh=class{constructor(t){var r;this.width=t.width,this.wrap=(r=t.wrap)!==null&&r!==void 0?r:true,this.rows=[];}span(...t){let r=this.div(...t);r.span=true;}resetOutput(){this.rows=[];}div(...t){if(t.length===0&&this.div(""),this.wrap&&this.shouldApplyLayoutDSL(...t)&&typeof t[0]=="string")return this.applyLayoutDSL(t[0]);let r=t.map(i=>typeof i=="string"?this.colFromString(i):i);return this.rows.push(r),r}shouldApplyLayoutDSL(...t){return t.length===1&&typeof t[0]=="string"&&/[\t\n]/.test(t[0])}applyLayoutDSL(t){let r=t.split(`
66
+ `).map(n=>n.split(" ")),i=0;return r.forEach(n=>{n.length>1&&bt.stringWidth(n[0])>i&&(i=Math.min(Math.floor(this.width*.5),bt.stringWidth(n[0])));}),r.forEach(n=>{this.div(...n.map((o,a)=>({text:o.trim(),padding:this.measurePadding(o),width:a===0&&n.length>1?i:void 0})));}),this.rows[this.rows.length-1]}colFromString(t){return {text:t,padding:this.measurePadding(t)}}measurePadding(t){let r=bt.stripAnsi(t);return [0,r.match(/\s*$/)[0].length,0,r.match(/^\s*/)[0].length]}toString(){let t=[];return this.rows.forEach(r=>{this.rowToString(r,t);}),t.filter(r=>!r.hidden).map(r=>r.text).join(`
67
+ `)}rowToString(t,r){return this.rasterize(t).forEach((i,n)=>{let o="";i.forEach((a,u)=>{let{width:c}=t[u],l=this.negatePadding(t[u]),d=a;if(l>bt.stringWidth(a)&&(d+=" ".repeat(l-bt.stringWidth(a))),t[u].align&&t[u].align!=="left"&&this.wrap){let m=PA[t[u].align];d=m(d,l),bt.stringWidth(d)<l&&(d+=" ".repeat((c||0)-bt.stringWidth(d)-1));}let p=t[u].padding||[0,0,0,0];p[gu]&&(o+=" ".repeat(p[gu])),o+=sx(t[u],d,"| "),o+=d,o+=sx(t[u],d," |"),p[hu]&&(o+=" ".repeat(p[hu])),n===0&&r.length>0&&(o=this.renderInline(o,r[r.length-1]));}),r.push({text:o.replace(/ +$/,""),span:t.span});}),r}renderInline(t,r){let i=t.match(/^ */),n=i?i[0].length:0,o=r.text,a=bt.stringWidth(o.trimRight());return r.span?this.wrap?n<a?t:(r.hidden=true,o.trimRight()+" ".repeat(n-a)+t.trimLeft()):(r.hidden=true,o+t):t}rasterize(t){let r=[],i=this.columnWidths(t),n;return t.forEach((o,a)=>{o.width=i[a],this.wrap?n=bt.wrap(o.text,this.negatePadding(o),{hard:true}).split(`
68
+ `):n=o.text.split(`
69
+ `),o.border&&(n.unshift("."+"-".repeat(this.negatePadding(o)+2)+"."),n.push("'"+"-".repeat(this.negatePadding(o)+2)+"'")),o.padding&&(n.unshift(...new Array(o.padding[FA]||0).fill("")),n.push(...new Array(o.padding[jA]||0).fill(""))),n.forEach((u,c)=>{r[c]||r.push([]);let l=r[c];for(let d=0;d<a;d++)l[d]===void 0&&l.push("");l.push(u);});}),r}negatePadding(t){let r=t.width||0;return t.padding&&(r-=(t.padding[gu]||0)+(t.padding[hu]||0)),t.border&&(r-=4),r}columnWidths(t){if(!this.wrap)return t.map(a=>a.width||bt.stringWidth(a.text));let r=t.length,i=this.width,n=t.map(a=>{if(a.width)return r--,i-=a.width,a.width}),o=r?Math.floor(i/r):0;return n.map((a,u)=>a===void 0?Math.max(o,zA(t[u])):a)}};function sx(e,t,r){return e.border?/[.']-+[.']/.test(t)?"":t.trim().length!==0?r:" ":""}function zA(e){let t=e.padding||[],r=1+(t[gu]||0)+(t[hu]||0);return e.border?r+4:r}function NA(){return typeof process=="object"&&process.stdout&&process.stdout.columns?process.stdout.columns:80}function UA(e,t){e=e.trim();let r=bt.stringWidth(e);return r<t?" ".repeat(t-r)+e:e}function LA(e,t){e=e.trim();let r=bt.stringWidth(e);return r>=t?e:" ".repeat(t-r>>1)+e}var bt;function ux(e,t){return bt=t,new oh({width:e?.width||NA(),wrap:e?.wrap})}function ah({onlyFirst:e=false}={}){let n="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(n,e?void 0:"g")}var MA=ah();function gr(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return !e.includes("\x1B")&&!e.includes("\x9B")?e:e.replace(MA,"")}var cx=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],lx=12288,dx=65510,px=[12288,12288,65281,65376,65504,65510];var fx=4352,mx=262141,sh=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141];var yu=(e,t)=>{let r=0,i=Math.floor(e.length/2)-1;for(;r<=i;){let n=Math.floor((r+i)/2),o=n*2;if(t<e[o])i=n-1;else if(t>e[o+1])r=n+1;else return true}return false};var hx=19968,[ZA,WA]=GA(sh);function GA(e){let t=e[0],r=e[1];for(let i=0;i<e.length;i+=2){let n=e[i],o=e[i+1];if(hx>=n&&hx<=o)return [n,o];o-n>r-t&&(t=n,r=o);}return [t,r]}var gx=e=>e<161||e>1114109?false:yu(cx,e),yx=e=>e<lx||e>dx?false:yu(px,e);var vx=e=>e>=ZA&&e<=WA?true:e<fx||e>mx?false:yu(sh,e);function qA(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function bx(e,{ambiguousAsWide:t=false}={}){return qA(e),yx(e)||vx(e)||t&&gx(e)?2:1}var Sx=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;var HA=new Intl.Segmenter,JA=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function Ht(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:r=true,countAnsiEscapeCodes:i=false}=t;if(i||(e=gr(e)),e.length===0)return 0;let n=0,o={ambiguousAsWide:!r};for(let{segment:a}of HA.segment(e)){let u=a.codePointAt(0);if(!(u<=31||u>=127&&u<=159)&&!(u>=8203&&u<=8207||u===65279)&&!(u>=768&&u<=879||u>=6832&&u<=6911||u>=7616&&u<=7679||u>=8400&&u<=8447||u>=65056&&u<=65071)&&!(u>=55296&&u<=57343)&&!(u>=65024&&u<=65039)&&!JA.test(a)){if(Sx().test(a)){n+=2;continue}n+=bx(u,o);}}return n}var xx=(e=0)=>t=>`\x1B[${t+e}m`,Dx=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,_x=(e=0)=>(t,r,i)=>`\x1B[${38+e};2;${t};${r};${i}m`,xe={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(xe.modifier);var KA=Object.keys(xe.color),YA=Object.keys(xe.bgColor);[...KA,...YA];function XA(){let e=new Map;for(let[t,r]of Object.entries(xe)){for(let[i,n]of Object.entries(r))xe[i]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},r[i]=xe[i],e.set(n[0],n[1]);Object.defineProperty(xe,t,{value:r,enumerable:false});}return Object.defineProperty(xe,"codes",{value:e,enumerable:false}),xe.color.close="\x1B[39m",xe.bgColor.close="\x1B[49m",xe.color.ansi=xx(),xe.color.ansi256=Dx(),xe.color.ansi16m=_x(),xe.bgColor.ansi=xx(10),xe.bgColor.ansi256=Dx(10),xe.bgColor.ansi16m=_x(10),Object.defineProperties(xe,{rgbToAnsi256:{value(t,r,i){return t===r&&r===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(i/255*5)},enumerable:false},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return [0,0,0];let[i]=r;i.length===3&&(i=[...i].map(o=>o+o).join(""));let n=Number.parseInt(i,16);return [n>>16&255,n>>8&255,n&255]},enumerable:false},hexToAnsi256:{value:t=>xe.rgbToAnsi256(...xe.hexToRgb(t)),enumerable:false},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,i,n;if(t>=232)r=((t-232)*10+8)/255,i=r,n=r;else {t-=16;let u=t%36;r=Math.floor(t/36)/5,i=Math.floor(u/6)/5,n=u%6/5;}let o=Math.max(r,i,n)*2;if(o===0)return 30;let a=30+(Math.round(n)<<2|Math.round(i)<<1|Math.round(r));return o===2&&(a+=60),a},enumerable:false},rgbToAnsi:{value:(t,r,i)=>xe.ansi256ToAnsi(xe.rgbToAnsi256(t,r,i)),enumerable:false},hexToAnsi:{value:t=>xe.ansi256ToAnsi(xe.hexToAnsi256(t)),enumerable:false}}),xe}var QA=XA(),Ex=QA;var bu=new Set(["\x1B","\x9B"]),eT=39,ch="\x07",kx="[",tT="]",Ix="m",vu=`${tT}8;;`,wx=e=>`${bu.values().next().value}${kx}${e}${Ix}`,$x=e=>`${bu.values().next().value}${vu}${e}${ch}`,nT=e=>e.split(" ").map(t=>Ht(t)),uh=(e,t,r)=>{let i=[...t],n=false,o=false,a=Ht(gr(e.at(-1)));for(let[u,c]of i.entries()){let l=Ht(c);if(a+l<=r?e[e.length-1]+=c:(e.push(c),a=0),bu.has(c)&&(n=true,o=i.slice(u+1,u+1+vu.length).join("")===vu),n){o?c===ch&&(n=false,o=false):c===Ix&&(n=false);continue}a+=l,a===r&&u<i.length-1&&(e.push(""),a=0);}!a&&e.at(-1).length>0&&e.length>1&&(e[e.length-2]+=e.pop());},rT=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(Ht(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},iT=(e,t,r={})=>{if(r.trim!==false&&e.trim()==="")return "";let i="",n,o,a=nT(e),u=[""];for(let[p,m]of e.split(" ").entries()){r.trim!==false&&(u[u.length-1]=u.at(-1).trimStart());let h=Ht(u.at(-1));if(p!==0&&(h>=t&&(r.wordWrap===false||r.trim===false)&&(u.push(""),h=0),(h>0||r.trim===false)&&(u[u.length-1]+=" ",h++)),r.hard&&a[p]>t){let v=t-h,D=1+Math.floor((a[p]-v-1)/t);Math.floor((a[p]-1)/t)<D&&u.push(""),uh(u,m,t);continue}if(h+a[p]>t&&h>0&&a[p]>0){if(r.wordWrap===false&&h<t){uh(u,m,t);continue}u.push("");}if(h+a[p]>t&&r.wordWrap===false){uh(u,m,t);continue}u[u.length-1]+=m;}r.trim!==false&&(u=u.map(p=>rT(p)));let c=u.join(`
70
+ `),l=[...c],d=0;for(let[p,m]of l.entries()){if(i+=m,bu.has(m)){let{groups:v}=new RegExp(`(?:\\${kx}(?<code>\\d+)m|\\${vu}(?<uri>.*)${ch})`).exec(c.slice(d))||{groups:{}};if(v.code!==void 0){let D=Number.parseFloat(v.code);n=D===eT?void 0:D;}else v.uri!==void 0&&(o=v.uri.length===0?void 0:v.uri);}let h=Ex.codes.get(Number(n));l[p+1]===`
71
+ `?(o&&(i+=$x("")),n&&h&&(i+=wx(h))):m===`
72
+ `&&(n&&h&&(i+=wx(n)),o&&(i+=$x(o))),d+=m.length;}return i};function lh(e,t,r){return String(e).normalize().replaceAll(`\r
73
+ `,`
74
+ `).split(`
75
+ `).map(i=>iT(i,t,r)).join(`
76
+ `)}function dh(e){return ux(e,{stringWidth:Ht,stripAnsi:gr,wrap:lh})}function Rx(e,t){let r=resolve(".",e),i;for(statSync(r).isDirectory()||(r=dirname(r));;){if(i=t(r,readdirSync(r)),i)return resolve(r,i);if(r=dirname(i=r),i===r)break}}function yr(e){if(e!==e.toLowerCase()&&e!==e.toUpperCase()||(e=e.toLowerCase()),e.indexOf("-")===-1&&e.indexOf("_")===-1)return e;{let r="",i=false,n=e.match(/^-+/);for(let o=n?n[0].length:0;o<e.length;o++){let a=e.charAt(o);i&&(i=false,a=a.toUpperCase()),o!==0&&(a==="-"||a==="_")?i=true:a!=="-"&&a!=="_"&&(r+=a);}return r}}function Su(e,t){let r=e.toLowerCase();t=t||"-";let i="";for(let n=0;n<e.length;n++){let o=r.charAt(n),a=e.charAt(n);o!==a&&n>0?i+=`${t}${r.charAt(n)}`:i+=a;}return i}function xu(e){return e==null?false:typeof e=="number"||/^0x[0-9a-f]+$/i.test(e)?true:/^0[^.]/.test(e)?false:/^[-]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function Ax(e){if(Array.isArray(e))return e.map(a=>typeof a!="string"?a+"":a);e=e.trim();let t=0,r=null,i=null,n=null,o=[];for(let a=0;a<e.length;a++){if(r=i,i=e.charAt(a),i===" "&&!n){r!==" "&&t++;continue}i===n?n=null:(i==="'"||i==='"')&&!n&&(n=i),o[t]||(o[t]=""),o[t]+=i;}return o}var It;(function(e){e.BOOLEAN="boolean",e.STRING="string",e.NUMBER="number",e.ARRAY="array";})(It||(It={}));var bn,Du=class{constructor(t){bn=t;}parse(t,r){let i=Object.assign({alias:void 0,array:void 0,boolean:void 0,config:void 0,configObjects:void 0,configuration:void 0,coerce:void 0,count:void 0,default:void 0,envPrefix:void 0,narg:void 0,normalize:void 0,string:void 0,number:void 0,__:void 0,key:void 0},r),n=Ax(t),o=typeof t=="string",a=sT(Object.assign(Object.create(null),i.alias)),u=Object.assign({"boolean-negation":true,"camel-case-expansion":true,"combine-arrays":false,"dot-notation":true,"duplicate-arguments-array":true,"flatten-duplicate-arrays":true,"greedy-arrays":true,"halt-at-non-option":false,"nargs-eats-options":false,"negation-prefix":"no-","parse-numbers":true,"parse-positional-numbers":true,"populate--":false,"set-placeholder-key":false,"short-option-groups":true,"strip-aliased":false,"strip-dashed":false,"unknown-options-as-args":false},i.configuration),c=Object.assign(Object.create(null),i.default),l=i.configObjects||[],d=i.envPrefix,p=u["populate--"],m=p?"--":"_",h=Object.create(null),v=Object.create(null),D=i.__||bn.format,b={aliases:Object.create(null),arrays:Object.create(null),bools:Object.create(null),strings:Object.create(null),numbers:Object.create(null),counts:Object.create(null),normalize:Object.create(null),configs:Object.create(null),nargs:Object.create(null),coercions:Object.create(null),keys:[]},U=/^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/,H=new RegExp("^--"+u["negation-prefix"]+"(.+)");[].concat(i.array||[]).filter(Boolean).forEach(function(g){let x=typeof g=="object"?g.key:g,R=Object.keys(g).map(function(E){return {boolean:"bools",string:"strings",number:"numbers"}[E]}).filter(Boolean).pop();R&&(b[R][x]=true),b.arrays[x]=true,b.keys.push(x);}),[].concat(i.boolean||[]).filter(Boolean).forEach(function(g){b.bools[g]=true,b.keys.push(g);}),[].concat(i.string||[]).filter(Boolean).forEach(function(g){b.strings[g]=true,b.keys.push(g);}),[].concat(i.number||[]).filter(Boolean).forEach(function(g){b.numbers[g]=true,b.keys.push(g);}),[].concat(i.count||[]).filter(Boolean).forEach(function(g){b.counts[g]=true,b.keys.push(g);}),[].concat(i.normalize||[]).filter(Boolean).forEach(function(g){b.normalize[g]=true,b.keys.push(g);}),typeof i.narg=="object"&&Object.entries(i.narg).forEach(([g,x])=>{typeof x=="number"&&(b.nargs[g]=x,b.keys.push(g));}),typeof i.coerce=="object"&&Object.entries(i.coerce).forEach(([g,x])=>{typeof x=="function"&&(b.coercions[g]=x,b.keys.push(g));}),typeof i.config<"u"&&(Array.isArray(i.config)||typeof i.config=="string"?[].concat(i.config).filter(Boolean).forEach(function(g){b.configs[g]=true;}):typeof i.config=="object"&&Object.entries(i.config).forEach(([g,x])=>{(typeof x=="boolean"||typeof x=="function")&&(b.configs[g]=x);})),Yn(i.key,a,i.default,b.arrays),Object.keys(c).forEach(function(g){(b.aliases[g]||[]).forEach(function(x){c[x]=c[g];});});let B=null;qo();let A=[],O=Object.assign(Object.create(null),{_:[]}),z={};for(let g=0;g<n.length;g++){let x=n[g],R=x.replace(/^-{3,}/,"---"),E,S,W,N,q,Be;if(x!=="--"&&/^-/.test(x)&&Ee(x))ne(x);else if(R.match(/^---+(=|$)/)){ne(x);continue}else if(x.match(/^--.+=/)||!u["short-option-groups"]&&x.match(/^-.+=/))N=x.match(/^--?([^=]+)=([\s\S]*)$/),N!==null&&Array.isArray(N)&&N.length>=3&&(Y(N[1],b.arrays)?g=be(g,N[1],n,N[2]):Y(N[1],b.nargs)!==false?g=ce(g,N[1],n,N[2]):ie(N[1],N[2],true));else if(x.match(H)&&u["boolean-negation"])N=x.match(H),N!==null&&Array.isArray(N)&&N.length>=2&&(S=N[1],ie(S,Y(S,b.arrays)?[false]:false));else if(x.match(/^--.+/)||!u["short-option-groups"]&&x.match(/^-[^-]+/))N=x.match(/^--?(.+)/),N!==null&&Array.isArray(N)&&N.length>=2&&(S=N[1],Y(S,b.arrays)?g=be(g,S,n):Y(S,b.nargs)!==false?g=ce(g,S,n):(q=n[g+1],q!==void 0&&(!q.match(/^-/)||q.match(U))&&!Y(S,b.bools)&&!Y(S,b.counts)||/^(true|false)$/.test(q)?(ie(S,q),g++):ie(S,we(S))));else if(x.match(/^-.\..+=/))N=x.match(/^-([^=]+)=([\s\S]*)$/),N!==null&&Array.isArray(N)&&N.length>=3&&ie(N[1],N[2]);else if(x.match(/^-.\..+/)&&!x.match(U))q=n[g+1],N=x.match(/^-(.\..+)/),N!==null&&Array.isArray(N)&&N.length>=2&&(S=N[1],q!==void 0&&!q.match(/^-/)&&!Y(S,b.bools)&&!Y(S,b.counts)?(ie(S,q),g++):ie(S,we(S)));else if(x.match(/^-[^-]+/)&&!x.match(U)){W=x.slice(1,-1).split(""),E=false;for(let Qe=0;Qe<W.length;Qe++){if(q=x.slice(Qe+2),W[Qe+1]&&W[Qe+1]==="="){Be=x.slice(Qe+3),S=W[Qe],Y(S,b.arrays)?g=be(g,S,n,Be):Y(S,b.nargs)!==false?g=ce(g,S,n,Be):ie(S,Be),E=true;break}if(q==="-"){ie(W[Qe],q);continue}if(/[A-Za-z]/.test(W[Qe])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(q)&&Y(q,b.bools)===false){ie(W[Qe],q),E=true;break}if(W[Qe+1]&&W[Qe+1].match(/\W/)){ie(W[Qe],q),E=true;break}else ie(W[Qe],we(W[Qe]));}S=x.slice(-1)[0],!E&&S!=="-"&&(Y(S,b.arrays)?g=be(g,S,n):Y(S,b.nargs)!==false?g=ce(g,S,n):(q=n[g+1],q!==void 0&&(!/^(-|--)[^-]/.test(q)||q.match(U))&&!Y(S,b.bools)&&!Y(S,b.counts)||/^(true|false)$/.test(q)?(ie(S,q),g++):ie(S,we(S))));}else if(x.match(/^-[0-9]$/)&&x.match(U)&&Y(x.slice(1),b.bools))S=x.slice(1),ie(S,we(S));else if(x==="--"){A=n.slice(g+1);break}else if(u["halt-at-non-option"]){A=n.slice(g);break}else ne(x);}se(O,true),se(O,false),V(O),pe(),De(O,b.aliases,c,true),Ne(O),u["set-placeholder-key"]&&Kn(O),Object.keys(b.counts).forEach(function(g){ln(O,g.split("."))||ie(g,0);}),p&&A.length&&(O[m]=[]),A.forEach(function(g){O[m].push(g);}),u["camel-case-expansion"]&&u["strip-dashed"]&&Object.keys(O).filter(g=>g!=="--"&&g.includes("-")).forEach(g=>{delete O[g];}),u["strip-aliased"]&&[].concat(...Object.keys(a).map(g=>a[g])).forEach(g=>{u["camel-case-expansion"]&&g.includes("-")&&delete O[g.split(".").map(x=>yr(x)).join(".")],delete O[g];});function ne(g){let x=T("_",g);(typeof x=="string"||typeof x=="number")&&O._.push(x);}function ce(g,x,R,E){let S,W=Y(x,b.nargs);if(W=typeof W!="number"||isNaN(W)?1:W,W===0)return zt(E)||(B=Error(D("Argument unexpected for: %s",x))),ie(x,we(x)),g;let N=zt(E)?0:1;if(u["nargs-eats-options"])R.length-(g+1)+N<W&&(B=Error(D("Not enough arguments following: %s",x))),N=W;else {for(S=g+1;S<R.length&&(!R[S].match(/^-[^0-9]/)||R[S].match(U)||Ee(R[S]));S++)N++;N<W&&(B=Error(D("Not enough arguments following: %s",x)));}let q=Math.min(N,W);for(!zt(E)&&q>0&&(ie(x,E),q--),S=g+1;S<q+g+1;S++)ie(x,R[S]);return g+q}function be(g,x,R,E){let S=[],W=E||R[g+1],N=Y(x,b.nargs);if(Y(x,b.bools)&&!/^(true|false)$/.test(W))S.push(true);else if(zt(W)||zt(E)&&/^-/.test(W)&&!U.test(W)&&!Ee(W)){if(c[x]!==void 0){let q=c[x];S=Array.isArray(q)?q:[q];}}else {zt(E)||S.push(j(x,E,true));for(let q=g+1;q<R.length&&!(!u["greedy-arrays"]&&S.length>0||N&&typeof N=="number"&&S.length>=N||(W=R[q],/^-/.test(W)&&!U.test(W)&&!Ee(W)));q++)g=q,S.push(j(x,W,o));}return typeof N=="number"&&(N&&S.length<N||isNaN(N)&&S.length===0)&&(B=Error(D("Not enough arguments following: %s",x))),ie(x,S),g}function ie(g,x,R=o){if(/-/.test(g)&&u["camel-case-expansion"]){let W=g.split(".").map(function(N){return yr(N)}).join(".");F(g,W);}let E=j(g,x,R),S=g.split(".");dn(O,S,E),b.aliases[g]&&b.aliases[g].forEach(function(W){let N=W.split(".");dn(O,N,E);}),S.length>1&&u["dot-notation"]&&(b.aliases[S[0]]||[]).forEach(function(W){let N=W.split("."),q=[].concat(S);q.shift(),N=N.concat(q),(b.aliases[g]||[]).includes(N.join("."))||dn(O,N,E);}),Y(g,b.normalize)&&!Y(g,b.arrays)&&[g].concat(b.aliases[g]||[]).forEach(function(N){Object.defineProperty(z,N,{enumerable:true,get(){return x},set(q){x=typeof q=="string"?bn.normalize(q):q;}});});}function F(g,x){b.aliases[g]&&b.aliases[g].length||(b.aliases[g]=[x],h[x]=true),b.aliases[x]&&b.aliases[x].length||F(x,g);}function j(g,x,R){R&&(x=uT(x)),(Y(g,b.bools)||Y(g,b.counts))&&typeof x=="string"&&(x=x==="true");let E=Array.isArray(x)?x.map(function(S){return T(g,S)}):T(g,x);return Y(g,b.counts)&&(zt(E)||typeof E=="boolean")&&(E=ph()),Y(g,b.normalize)&&Y(g,b.arrays)&&(Array.isArray(x)?E=x.map(S=>bn.normalize(S)):E=bn.normalize(x)),E}function T(g,x){return !u["parse-positional-numbers"]&&g==="_"||!Y(g,b.strings)&&!Y(g,b.bools)&&!Array.isArray(x)&&(xu(x)&&u["parse-numbers"]&&Number.isSafeInteger(Math.floor(parseFloat(`${x}`)))||!zt(x)&&Y(g,b.numbers))&&(x=Number(x)),x}function V(g){let x=Object.create(null);De(x,b.aliases,c),Object.keys(b.configs).forEach(function(R){let E=g[R]||x[R];if(E)try{let S=null,W=bn.resolve(bn.cwd(),E),N=b.configs[R];if(typeof N=="function"){try{S=N(W);}catch(q){S=q;}if(S instanceof Error){B=S;return}}else S=bn.require(W);te(S);}catch(S){S.name==="PermissionDenied"?B=S:g[R]&&(B=Error(D("Invalid JSON config file: %s",E)));}});}function te(g,x){Object.keys(g).forEach(function(R){let E=g[R],S=x?x+"."+R:R;typeof E=="object"&&E!==null&&!Array.isArray(E)&&u["dot-notation"]?te(E,S):(!ln(O,S.split("."))||Y(S,b.arrays)&&u["combine-arrays"])&&ie(S,E);});}function pe(){typeof l<"u"&&l.forEach(function(g){te(g);});}function se(g,x){if(typeof d>"u")return;let R=typeof d=="string"?d:"",E=bn.env();Object.keys(E).forEach(function(S){if(R===""||S.lastIndexOf(R,0)===0){let W=S.split("__").map(function(N,q){return q===0&&(N=N.substring(R.length)),yr(N)});(x&&b.configs[W.join(".")]||!x)&&!ln(g,W)&&ie(W.join("."),E[S]);}});}function Ne(g){let x,R=new Set;Object.keys(g).forEach(function(E){if(!R.has(E)&&(x=Y(E,b.coercions),typeof x=="function"))try{let S=T(E,x(g[E]));[].concat(b.aliases[E]||[],E).forEach(W=>{R.add(W),g[W]=S;});}catch(S){B=S;}});}function Kn(g){return b.keys.forEach(x=>{~x.indexOf(".")||typeof g[x]>"u"&&(g[x]=void 0);}),g}function De(g,x,R,E=false){Object.keys(R).forEach(function(S){ln(g,S.split("."))||(dn(g,S.split("."),R[S]),E&&(v[S]=true),(x[S]||[]).forEach(function(W){ln(g,W.split("."))||dn(g,W.split("."),R[S]);}));});}function ln(g,x){let R=g;u["dot-notation"]||(x=[x.join(".")]),x.slice(0,-1).forEach(function(S){R=R[S]||{};});let E=x[x.length-1];return typeof R!="object"?false:E in R}function dn(g,x,R){let E=g;u["dot-notation"]||(x=[x.join(".")]),x.slice(0,-1).forEach(function(Be){Be=Tx(Be),typeof E=="object"&&E[Be]===void 0&&(E[Be]={}),typeof E[Be]!="object"||Array.isArray(E[Be])?(Array.isArray(E[Be])?E[Be].push({}):E[Be]=[E[Be],{}],E=E[Be][E[Be].length-1]):E=E[Be];});let S=Tx(x[x.length-1]),W=Y(x.join("."),b.arrays),N=Array.isArray(R),q=u["duplicate-arguments-array"];!q&&Y(S,b.nargs)&&(q=true,(!zt(E[S])&&b.nargs[S]===1||Array.isArray(E[S])&&E[S].length===b.nargs[S])&&(E[S]=void 0)),R===ph()?E[S]=ph(E[S]):Array.isArray(E[S])?q&&W&&N?E[S]=u["flatten-duplicate-arrays"]?E[S].concat(R):(Array.isArray(E[S][0])?E[S]:[E[S]]).concat([R]):!q&&!!W==!!N?E[S]=R:E[S]=E[S].concat([R]):E[S]===void 0&&W?E[S]=N?R:[R]:q&&!(E[S]===void 0||Y(S,b.counts)||Y(S,b.bools))?E[S]=[E[S],R]:E[S]=R;}function Yn(...g){g.forEach(function(x){Object.keys(x||{}).forEach(function(R){b.aliases[R]||(b.aliases[R]=[].concat(a[R]||[]),b.aliases[R].concat(R).forEach(function(E){if(/-/.test(E)&&u["camel-case-expansion"]){let S=yr(E);S!==R&&b.aliases[R].indexOf(S)===-1&&(b.aliases[R].push(S),h[S]=true);}}),b.aliases[R].concat(R).forEach(function(E){if(E.length>1&&/[A-Z]/.test(E)&&u["camel-case-expansion"]){let S=Su(E,"-");S!==R&&b.aliases[R].indexOf(S)===-1&&(b.aliases[R].push(S),h[S]=true);}}),b.aliases[R].forEach(function(E){b.aliases[E]=[R].concat(b.aliases[R].filter(function(S){return E!==S}));}));});});}function Y(g,x){let R=[].concat(b.aliases[g]||[],g),E=Object.keys(x),S=R.find(W=>E.includes(W));return S?x[S]:false}function uc(g){let x=Object.keys(b);return [].concat(x.map(E=>b[E])).some(function(E){return Array.isArray(E)?E.includes(g):E[g]})}function J(g,...x){return [].concat(...x).some(function(E){let S=g.match(E);return S&&uc(S[1])})}function Se(g){if(g.match(U)||!g.match(/^-[^-]+/))return false;let x=true,R,E=g.slice(1).split("");for(let S=0;S<E.length;S++){if(R=g.slice(S+2),!uc(E[S])){x=false;break}if(E[S+1]&&E[S+1]==="="||R==="-"||/[A-Za-z]/.test(E[S])&&/^-?\d+(\.\d*)?(e-?\d+)?$/.test(R)||E[S+1]&&E[S+1].match(/\W/))break}return x}function Ee(g){return u["unknown-options-as-args"]&&oe(g)}function oe(g){return g=g.replace(/^-{3,}/,"--"),g.match(U)||Se(g)?false:!J(g,/^-+([^=]+?)=[\s\S]*$/,H,/^-+([^=]+?)$/,/^-+([^=]+?)-$/,/^-+([^=]+?\d+)$/,/^-+([^=]+?)\W+.*$/)}function we(g){return !Y(g,b.bools)&&!Y(g,b.counts)&&`${g}`in c?c[g]:Oe(jt(g))}function Oe(g){return {[It.BOOLEAN]:true,[It.STRING]:"",[It.NUMBER]:void 0,[It.ARRAY]:[]}[g]}function jt(g){let x=It.BOOLEAN;return Y(g,b.strings)?x=It.STRING:Y(g,b.numbers)?x=It.NUMBER:Y(g,b.bools)?x=It.BOOLEAN:Y(g,b.arrays)&&(x=It.ARRAY),x}function zt(g){return g===void 0}function qo(){Object.keys(b.counts).find(g=>Y(g,b.arrays)?(B=Error(D("Invalid configuration: %s, opts.count excludes opts.array.",g)),true):Y(g,b.nargs)?(B=Error(D("Invalid configuration: %s, opts.count excludes opts.narg.",g)),true):false);}return {aliases:Object.assign({},b.aliases),argv:Object.assign(z,O),configuration:u,defaulted:Object.assign({},v),error:B,newAliases:Object.assign({},h)}}};function sT(e){let t=[],r=Object.create(null),i=true;for(Object.keys(e).forEach(function(n){t.push([].concat(e[n],n));});i;){i=false;for(let n=0;n<t.length;n++)for(let o=n+1;o<t.length;o++)if(t[n].filter(function(u){return t[o].indexOf(u)!==-1}).length){t[n]=t[n].concat(t[o]),t.splice(o,1),i=true;break}}return t.forEach(function(n){n=n.filter(function(a,u,c){return c.indexOf(a)===u});let o=n.pop();o!==void 0&&typeof o=="string"&&(r[o]=n);}),r}function ph(e){return e!==void 0?e+1:1}function Tx(e){return e==="__proto__"?"___proto___":e}function uT(e){return typeof e=="string"&&(e[0]==="'"||e[0]==='"')&&e[e.length-1]===e[0]?e.substring(1,e.length-1):e}var fh,mh,hh,Fx=process&&process.env&&process.env.YARGS_MIN_NODE_VERSION?Number(process.env.YARGS_MIN_NODE_VERSION):20,jx=(mh=(fh=process==null?void 0:process.versions)===null||fh===void 0?void 0:fh.node)!==null&&mh!==void 0?mh:(hh=process==null?void 0:process.version)===null||hh===void 0?void 0:hh.slice(1);if(jx&&Number(jx.match(/^([^.]+)/)[1])<Fx)throw Error(`yargs parser supports a minimum Node.js version of ${Fx}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);var fT=process?process.env:{},zx=createRequire$1?createRequire$1(import.meta.url):void 0,Nx=new Du({cwd:process.cwd,env:()=>fT,format:format,normalize:normalize,resolve:resolve,require:e=>{if(typeof zx<"u")return zx(e);if(e.match(/\.json$/))return JSON.parse(readFileSync(e,"utf8"));throw Error("only .json config files are supported in ESM")}}),jo=function(t,r){return Nx.parse(t.slice(),r).argv};jo.detailed=function(e,t){return Nx.parse(e.slice(),t)};jo.camelCase=yr;jo.decamelize=Su;jo.looksLikeNumber=xu;var gh=jo;function Ux(){return mT()?0:1}function mT(){return hT()&&!process.defaultApp}function hT(){return !!process.versions.electron}function yh(e){return e.slice(Ux()+1)}function Lx(){return process.argv[Ux()]}var Mx={fs:{readFileSync:readFileSync,writeFile:writeFile$1},format:format,resolve:resolve,exists:e=>{try{return statSync(e).isFile()}catch{return false}}};var Jt,vh=class{constructor(t){t=t||{},this.directory=t.directory||"./locales",this.updateFiles=typeof t.updateFiles=="boolean"?t.updateFiles:true,this.locale=t.locale||"en",this.fallbackToLanguage=typeof t.fallbackToLanguage=="boolean"?t.fallbackToLanguage:true,this.cache=Object.create(null),this.writeQueue=[];}__(...t){if(typeof arguments[0]!="string")return this._taggedLiteral(arguments[0],...arguments);let r=t.shift(),i=function(){};return typeof t[t.length-1]=="function"&&(i=t.pop()),i=i||function(){},this.cache[this.locale]||this._readLocaleFile(),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]=r,this._enqueueWrite({directory:this.directory,locale:this.locale,cb:i})):i(),Jt.format.apply(Jt.format,[this.cache[this.locale][r]||r].concat(t))}__n(){let t=Array.prototype.slice.call(arguments),r=t.shift(),i=t.shift(),n=t.shift(),o=function(){};typeof t[t.length-1]=="function"&&(o=t.pop()),this.cache[this.locale]||this._readLocaleFile();let a=n===1?r:i;this.cache[this.locale][r]&&(a=this.cache[this.locale][r][n===1?"one":"other"]),!this.cache[this.locale][r]&&this.updateFiles?(this.cache[this.locale][r]={one:r,other:i},this._enqueueWrite({directory:this.directory,locale:this.locale,cb:o})):o();let u=[a];return ~a.indexOf("%d")&&u.push(n),Jt.format.apply(Jt.format,u.concat(t))}setLocale(t){this.locale=t;}getLocale(){return this.locale}updateLocale(t){this.cache[this.locale]||this._readLocaleFile();for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this.cache[this.locale][r]=t[r]);}_taggedLiteral(t,...r){let i="";return t.forEach(function(n,o){let a=r[o+1];i+=n,typeof a<"u"&&(i+="%s");}),this.__.apply(this,[i].concat([].slice.call(r,1)))}_enqueueWrite(t){this.writeQueue.push(t),this.writeQueue.length===1&&this._processWriteQueue();}_processWriteQueue(){let t=this,r=this.writeQueue[0],i=r.directory,n=r.locale,o=r.cb,a=this._resolveLocaleFile(i,n),u=JSON.stringify(this.cache[n],null,2);Jt.fs.writeFile(a,u,"utf-8",function(c){t.writeQueue.shift(),t.writeQueue.length>0&&t._processWriteQueue(),o(c);});}_readLocaleFile(){let t={},r=this._resolveLocaleFile(this.directory,this.locale);try{Jt.fs.readFileSync&&(t=JSON.parse(Jt.fs.readFileSync(r,"utf-8")));}catch(i){if(i instanceof SyntaxError&&(i.message="syntax error in "+r),i.code==="ENOENT")t={};else throw i}this.cache[this.locale]=t;}_resolveLocaleFile(t,r){let i=Jt.resolve(t,"./",r+".json");if(this.fallbackToLanguage&&!this._fileExistsSync(i)&&~r.lastIndexOf("_")){let n=Jt.resolve(t,"./",r.split("_")[0]+".json");this._fileExistsSync(n)&&(i=n);}return i}_fileExistsSync(t){return Jt.exists(t)}};function Bx(e,t){Jt=t;let r=new vh(e);return {__:r.__.bind(r),__n:r.__n.bind(r),setLocale:r.setLocale.bind(r),getLocale:r.getLocale.bind(r),updateLocale:r.updateLocale.bind(r),locale:r.locale}}var xT=e=>Bx(e,Mx),Vx=xT;var Hx=c(Wx(),1);var bh=fileURLToPath(import.meta.url),TT=bh.substring(0,bh.lastIndexOf("node_modules")),PT=createRequire$1(import.meta.url),Sh={assert:{notStrictEqual:notStrictEqual,strictEqual:strictEqual},cliui:dh,findUp:Rx,getEnv:e=>process.env[e],inspect:inspect,getProcessArgvBin:Lx,mainFilename:TT||process.cwd(),Parser:gh,path:{basename:basename,dirname:dirname,extname:extname,relative:relative,resolve:resolve,join:join},process:{argv:()=>process.argv,cwd:process.cwd,emitWarning:(e,t)=>process.emitWarning(e,t),execPath:()=>process.execPath,exit:e=>{process.exit(e);},nextTick:process.nextTick,stdColumns:typeof process.stdout.columns<"u"?process.stdout.columns:null},readFileSync:readFileSync,readdirSync:readdirSync,require:PT,getCallerFile:()=>{let e=(0, Hx.default)(3);return e.match(/^file:\/\//)?fileURLToPath(e):e},stringWidth:Ht,y18n:Vx({directory:resolve(bh,"../../../locales"),updateFiles:false})};function ot(e,t,r,i){r.assert.notStrictEqual(e,t,i);}function xh(e,t){t.assert.strictEqual(typeof e,"string");}function wi(e){return Object.keys(e)}function ve(e){return !!e&&!!e.then&&typeof e.then=="function"}var Ce=class e extends Error{constructor(t){super(t||"yargs error"),this.name="YError",Error.captureStackTrace&&Error.captureStackTrace(this,e);}};function Mn(e){let r=e.replace(/\s{2,}/g," ").split(/\s+(?![^[]*]|[^<]*>)/),i=/\.*[\][<>]/g,n=r.shift();if(!n)throw new Error(`No command found in: ${e}`);let o={cmd:n.replace(i,""),demanded:[],optional:[]};return r.forEach((a,u)=>{let c=false;a=a.replace(/\s/g,""),/\.+[\]>]/.test(a)&&u===r.length-1&&(c=true),/^\[/.test(a)?o.optional.push({cmd:a.replace(i,"").split("|"),variadic:c}):o.demanded.push({cmd:a.replace(i,"").split("|"),variadic:c});}),o}var FT=["first","second","third","fourth","fifth","sixth"];function L(e,t,r){function i(){return typeof e=="object"?[{demanded:[],optional:[]},e,t]:[Mn(`cmd ${e}`),t,r]}try{let n=0,[o,a,u]=i(),c=[].slice.call(a);for(;c.length&&c[c.length-1]===void 0;)c.pop();let l=u||c.length;if(l<o.demanded.length)throw new Ce(`Not enough arguments provided. Expected ${o.demanded.length} but received ${c.length}.`);let d=o.demanded.length+o.optional.length;if(l>d)throw new Ce(`Too many arguments provided. Expected max ${d} but received ${l}.`);o.demanded.forEach(p=>{let m=c.shift(),h=Jx(m);p.cmd.filter(D=>D===h||D==="*").length===0&&Kx(h,p.cmd,n),n+=1;}),o.optional.forEach(p=>{if(c.length===0)return;let m=c.shift(),h=Jx(m);p.cmd.filter(D=>D===h||D==="*").length===0&&Kx(h,p.cmd,n),n+=1;});}catch(n){console.warn(n.stack);}}function Jx(e){return Array.isArray(e)?"array":e===null?"null":typeof e}function Kx(e,t,r){throw new Ce(`Invalid ${FT[r]||"manyith"} argument. Expected ${t.join(" or ")} but received ${e}.`)}var _u=class{constructor(t){this.globalMiddleware=[],this.frozens=[],this.yargs=t;}addMiddleware(t,r,i=true,n=false){if(L("<array|function> [boolean] [boolean] [boolean]",[t,r,i],arguments.length),Array.isArray(t)){for(let o=0;o<t.length;o++){if(typeof t[o]!="function")throw Error("middleware must be a function");let a=t[o];a.applyBeforeValidation=r,a.global=i;}Array.prototype.push.apply(this.globalMiddleware,t);}else if(typeof t=="function"){let o=t;o.applyBeforeValidation=r,o.global=i,o.mutates=n,this.globalMiddleware.push(t);}return this.yargs}addCoerceMiddleware(t,r){let i=this.yargs.getAliases();return this.globalMiddleware=this.globalMiddleware.filter(n=>{let o=[...i[r]||[],r];return n.option?!o.includes(n.option):true}),t.option=r,this.addMiddleware(t,true,true,true)}getMiddleware(){return this.globalMiddleware}freeze(){this.frozens.push([...this.globalMiddleware]);}unfreeze(){let t=this.frozens.pop();t!==void 0&&(this.globalMiddleware=t);}reset(){this.globalMiddleware=this.globalMiddleware.filter(t=>t.global);}};function Yx(e){return e?e.map(t=>(t.applyBeforeValidation=false,t)):[]}function vr(e,t,r,i){return r.reduce((n,o)=>{if(o.applyBeforeValidation!==i)return n;if(o.mutates){if(o.applied)return n;o.applied=true;}if(ve(n))return n.then(a=>Promise.all([a,o(a,t)])).then(([a,u])=>Object.assign(a,u));{let a=o(n,t);return ve(a)?a.then(u=>Object.assign(n,u)):Object.assign(n,a)}},e)}function br(e,t,r=i=>{throw i}){try{let i=jT(e)?e():e;return ve(i)?i.then(n=>t(n)):t(i)}catch(i){return r(i)}}function jT(e){return typeof e=="function"}var $i=/(^\*)|(^\$0)/,Dh=class{constructor(t,r,i,n){this.requireCache=new Set,this.handlers={},this.aliasMap={},this.frozens=[],this.shim=n,this.usage=t,this.globalMiddleware=i,this.validation=r;}addDirectory(t,r,i,n){n=n||{},this.requireCache.add(i);let o=this.shim.path.resolve(this.shim.path.dirname(i),t),a=this.shim.readdirSync(o,{recursive:!!n.recurse});Array.isArray(n.extensions)||(n.extensions=["js"]);let u=typeof n.visit=="function"?n.visit:c=>c;for(let c of a){let l=c.toString();if(n.exclude){let p=false;if(typeof n.exclude=="function"?p=n.exclude(l):p=n.exclude.test(l),p)continue}if(n.include){let p=false;if(typeof n.include=="function"?p=n.include(l):p=n.include.test(l),!p)continue}let d=false;for(let p of n.extensions)l.endsWith(p)&&(d=true);if(d){let p=this.shim.path.join(o,l),m=r(p),h=Object.create(null,Object.getOwnPropertyDescriptors({...m}));if(u(h,p,l)){if(this.requireCache.has(p))continue;this.requireCache.add(p),h.command||(h.command=this.shim.path.basename(p,this.shim.path.extname(p))),this.addHandler(h);}}}}addHandler(t,r,i,n,o,a){let u=[],c=Yx(o);if(n=n||(()=>{}),Array.isArray(t))if(zT(t))[t,...u]=t;else for(let l of t)this.addHandler(l);else if(UT(t)){let l=Array.isArray(t.command)||typeof t.command=="string"?t.command:null;if(l===null)throw new Error(`No command name given for module: ${this.shim.inspect(t)}`);t.aliases&&(l=[].concat(l).concat(t.aliases)),this.addHandler(l,this.extractDesc(t),t.builder,t.handler,t.middlewares,t.deprecated);return}else if(Xx(i)){this.addHandler([t].concat(u),r,i.builder,i.handler,i.middlewares,i.deprecated);return}if(typeof t=="string"){let l=Mn(t);u=u.map(m=>Mn(m).cmd);let d=false,p=[l.cmd].concat(u).filter(m=>$i.test(m)?(d=true,false):true);p.length===0&&d&&p.push("$0"),d&&(l.cmd=p[0],u=p.slice(1),t=t.replace($i,l.cmd)),u.forEach(m=>{this.aliasMap[m]=l.cmd;}),r!==false&&this.usage.command(t,r,d,u,a),this.handlers[l.cmd]={original:t,description:r,handler:n,builder:i||{},middlewares:c,deprecated:a,demanded:l.demanded,optional:l.optional},d&&(this.defaultCommand=this.handlers[l.cmd]);}}getCommandHandlers(){return this.handlers}getCommands(){return Object.keys(this.handlers).concat(Object.keys(this.aliasMap))}hasDefaultCommand(){return !!this.defaultCommand}runCommand(t,r,i,n,o,a){let u=this.handlers[t]||this.handlers[this.aliasMap[t]]||this.defaultCommand,c=r.getInternalMethods().getContext(),l=c.commands.slice(),d=!t;t&&(c.commands.push(t),c.fullCommands.push(u.original));let p=this.applyBuilderUpdateUsageAndParse(d,u,r,i.aliases,l,n,o,a);return ve(p)?p.then(m=>this.applyMiddlewareAndGetResult(d,u,m.innerArgv,c,o,m.aliases,r)):this.applyMiddlewareAndGetResult(d,u,p.innerArgv,c,o,p.aliases,r)}applyBuilderUpdateUsageAndParse(t,r,i,n,o,a,u,c){let l=r.builder,d=i;if(Eu(l)){i.getInternalMethods().getUsageInstance().freeze();let p=l(i.getInternalMethods().reset(n),c);if(ve(p))return p.then(m=>(d=eD(m)?m:i,this.parseAndUpdateUsage(t,r,d,o,a,u)))}else NT(l)&&(i.getInternalMethods().getUsageInstance().freeze(),d=i.getInternalMethods().reset(n),Object.keys(r.builder).forEach(p=>{d.option(p,l[p]);}));return this.parseAndUpdateUsage(t,r,d,o,a,u)}parseAndUpdateUsage(t,r,i,n,o,a){t&&i.getInternalMethods().getUsageInstance().unfreeze(true),this.shouldUpdateUsage(i)&&i.getInternalMethods().getUsageInstance().usage(this.usageFromParentCommandsCommandHandler(n,r),r.description);let u=i.getInternalMethods().runYargsParserAndExecuteCommands(null,void 0,true,o,a);return ve(u)?u.then(c=>({aliases:i.parsed.aliases,innerArgv:c})):{aliases:i.parsed.aliases,innerArgv:u}}shouldUpdateUsage(t){return !t.getInternalMethods().getUsageInstance().getUsageDisabled()&&t.getInternalMethods().getUsageInstance().getUsage().length===0}usageFromParentCommandsCommandHandler(t,r){let i=$i.test(r.original)?r.original.replace($i,"").trim():r.original,n=t.filter(o=>!$i.test(o));return n.push(i),`$0 ${n.join(" ")}`}handleValidationAndGetResult(t,r,i,n,o,a,u,c){if(!a.getInternalMethods().getHasOutput()){let l=a.getInternalMethods().runValidation(o,c,a.parsed.error,t);i=br(i,d=>(l(d),d));}if(r.handler&&!a.getInternalMethods().getHasOutput()){a.getInternalMethods().setHasOutput();let l=!!a.getOptions().configuration["populate--"];a.getInternalMethods().postProcess(i,l,false,false),i=vr(i,a,u,false),i=br(i,d=>{let p=r.handler(d);return ve(p)?p.then(()=>d):d}),t||a.getInternalMethods().getUsageInstance().cacheHelpMessage(),ve(i)&&!a.getInternalMethods().hasParseCallback()&&i.catch(d=>{try{a.getInternalMethods().getUsageInstance().fail(null,d);}catch{}});}return t||(n.commands.pop(),n.fullCommands.pop()),i}applyMiddlewareAndGetResult(t,r,i,n,o,a,u){let c={};if(o)return i;u.getInternalMethods().getHasOutput()||(c=this.populatePositionals(r,i,n,u));let l=this.globalMiddleware.getMiddleware().slice(0).concat(r.middlewares),d=vr(i,u,l,true);return ve(d)?d.then(p=>this.handleValidationAndGetResult(t,r,p,n,a,u,l,c)):this.handleValidationAndGetResult(t,r,d,n,a,u,l,c)}populatePositionals(t,r,i,n){r._=r._.slice(i.commands.length);let o=t.demanded.slice(0),a=t.optional.slice(0),u={};for(this.validation.positionalCount(o.length,r._.length);o.length;){let c=o.shift();this.populatePositional(c,r,u);}for(;a.length;){let c=a.shift();this.populatePositional(c,r,u);}return r._=i.commands.concat(r._.map(c=>""+c)),this.postProcessPositionals(r,u,this.cmdToParseOptions(t.original),n),u}populatePositional(t,r,i){let n=t.cmd[0];t.variadic?i[n]=r._.splice(0).map(String):r._.length&&(i[n]=[String(r._.shift())]);}cmdToParseOptions(t){let r={array:[],default:{},alias:{},demand:{}},i=Mn(t);return i.demanded.forEach(n=>{let[o,...a]=n.cmd;n.variadic&&(r.array.push(o),r.default[o]=[]),r.alias[o]=a,r.demand[o]=true;}),i.optional.forEach(n=>{let[o,...a]=n.cmd;n.variadic&&(r.array.push(o),r.default[o]=[]),r.alias[o]=a;}),r}postProcessPositionals(t,r,i,n){let o=Object.assign({},n.getOptions());o.default=Object.assign(i.default,o.default);for(let l of Object.keys(i.alias))o.alias[l]=(o.alias[l]||[]).concat(i.alias[l]);o.array=o.array.concat(i.array),o.config={};let a=[];if(Object.keys(r).forEach(l=>{r[l].map(d=>{o.configuration["unknown-options-as-args"]&&(o.key[l]=true),a.push(`--${l}`),a.push(d);});}),!a.length)return;let u=Object.assign({},o.configuration,{"populate--":false}),c=this.shim.Parser.detailed(a,Object.assign({},o,{configuration:u}));if(c.error)n.getInternalMethods().getUsageInstance().fail(c.error.message,c.error);else {let l=Object.keys(r);Object.keys(r).forEach(d=>{l.push(...c.aliases[d]);}),Object.keys(c.argv).forEach(d=>{l.includes(d)&&(r[d]||(r[d]=c.argv[d]),!this.isInConfigs(n,d)&&!this.isDefaulted(n,d)&&Object.prototype.hasOwnProperty.call(t,d)&&Object.prototype.hasOwnProperty.call(c.argv,d)&&(Array.isArray(t[d])||Array.isArray(c.argv[d]))?t[d]=[].concat(t[d],c.argv[d]):t[d]=c.argv[d]);});}}isDefaulted(t,r){let{default:i}=t.getOptions();return Object.prototype.hasOwnProperty.call(i,r)||Object.prototype.hasOwnProperty.call(i,this.shim.Parser.camelCase(r))}isInConfigs(t,r){let{configObjects:i}=t.getOptions();return i.some(n=>Object.prototype.hasOwnProperty.call(n,r))||i.some(n=>Object.prototype.hasOwnProperty.call(n,this.shim.Parser.camelCase(r)))}runDefaultBuilderOn(t){if(!this.defaultCommand)return;if(this.shouldUpdateUsage(t)){let i=$i.test(this.defaultCommand.original)?this.defaultCommand.original:this.defaultCommand.original.replace(/^[^[\]<>]*/,"$0 ");t.getInternalMethods().getUsageInstance().usage(i,this.defaultCommand.description);}let r=this.defaultCommand.builder;if(Eu(r))return r(t,true);Xx(r)||Object.keys(r).forEach(i=>{t.option(i,r[i]);});}extractDesc({describe:t,description:r,desc:i}){for(let n of [t,r,i]){if(typeof n=="string"||n===false)return n;ot(n,true,this.shim);}return false}freeze(){this.frozens.push({handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand});}unfreeze(){let t=this.frozens.pop();ot(t,void 0,this.shim),{handlers:this.handlers,aliasMap:this.aliasMap,defaultCommand:this.defaultCommand}=t;}reset(){return this.handlers={},this.aliasMap={},this.defaultCommand=void 0,this.requireCache=new Set,this}};function Qx(e,t,r,i){return new Dh(e,t,r,i)}function Xx(e){return typeof e=="object"&&!!e.builder&&typeof e.handler=="function"}function zT(e){return e.every(t=>typeof t=="string")}function Eu(e){return typeof e=="function"}function NT(e){return typeof e=="object"}function UT(e){return typeof e=="object"&&!Array.isArray(e)}function Bn(e={},t=()=>true){let r={};return wi(e).forEach(i=>{t(i,e[i])&&(r[i]=e[i]);}),r}function Vn(e){typeof process>"u"||[process.stdout,process.stderr].forEach(t=>{let r=t;r._handle&&r.isTTY&&typeof r._handle.setBlocking=="function"&&r._handle.setBlocking(e);});}function LT(e){return typeof e=="boolean"}function nD(e,t){let r=t.y18n.__,i={},n=[];i.failFn=function(j){n.push(j);};let o=null,a=null,u=true;i.showHelpOnFail=function(j=true,T){let[V,te]=typeof j=="string"?[true,j]:[j,T];return e.getInternalMethods().isGlobalContext()&&(a=te),o=te,u=V,i};let c=false;i.fail=function(j,T){let V=e.getInternalMethods().getLoggerInstance();if(n.length)for(let te=n.length-1;te>=0;--te){let pe=n[te];if(LT(pe)){if(T)throw T;if(j)throw Error(j)}else pe(j,T,i);}else {if(e.getExitProcess()&&Vn(true),!c){c=true,u&&(e.showHelp("error"),V.error()),(j||T)&&V.error(j||T);let te=o||a;te&&((j||T)&&V.error(""),V.error(te));}if(T=T||new Ce(j),e.getExitProcess())return e.exit(1);if(e.getInternalMethods().hasParseCallback())return e.exit(1,T);throw T}};let l=[],d=false;i.usage=(F,j)=>F===null?(d=true,l=[],i):(d=false,l.push([F,j||""]),i),i.getUsage=()=>l,i.getUsageDisabled=()=>d,i.getPositionalGroupName=()=>r("Positionals:");let p=[];i.example=(F,j)=>{p.push([F,j||""]);};let m=[];i.command=function(j,T,V,te,pe=false){V&&(m=m.map(se=>(se[2]=false,se))),m.push([j,T||"",V,te,pe]);},i.getCommands=()=>m;let h={};i.describe=function(j,T){Array.isArray(j)?j.forEach(V=>{i.describe(V,T);}):typeof j=="object"?Object.keys(j).forEach(V=>{i.describe(V,j[V]);}):h[j]=T;},i.getDescriptions=()=>h;let v=[];i.epilog=F=>{v.push(F);};let D=false,b;i.wrap=F=>{D=true,b=F;},i.getWrap=()=>t.getEnv("YARGS_DISABLE_WRAP")?null:(D||(b=ce(),D=true),b);let U="__yargsString__:";i.deferY18nLookup=F=>U+F,i.help=function(){if(A)return A;B();let j=e.customScriptName?e.$0:t.path.basename(e.$0),T=e.getDemandedOptions(),V=e.getDemandedCommands(),te=e.getDeprecatedOptions(),pe=e.getGroups(),se=e.getOptions(),Ne=[];Ne=Ne.concat(Object.keys(h)),Ne=Ne.concat(Object.keys(T)),Ne=Ne.concat(Object.keys(V)),Ne=Ne.concat(Object.keys(se.default)),Ne=Ne.filter(z),Ne=Object.keys(Ne.reduce((J,Se)=>(Se!=="_"&&(J[Se]=true),J),{}));let Kn=i.getWrap(),De=t.cliui({width:Kn,wrap:!!Kn});if(!d){if(l.length)l.forEach(J=>{De.div({text:`${J[0].replace(/\$0/g,j)}`}),J[1]&&De.div({text:`${J[1]}`,padding:[1,0,0,0]});}),De.div();else if(m.length){let J=null;V._?J=`${j} <${r("command")}>
77
+ `:J=`${j} [${r("command")}]
78
+ `,De.div(`${J}`);}}if(m.length>1||m.length===1&&!m[0][2]){De.div(r("Commands:"));let J=e.getInternalMethods().getContext(),Se=J.commands.length?`${J.commands.join(" ")} `:"";e.getInternalMethods().getParserConfiguration()["sort-commands"]===true&&(m=m.sort((oe,we)=>oe[0].localeCompare(we[0])));let Ee=j?`${j} `:"";m.forEach(oe=>{let we=`${Ee}${Se}${oe[0].replace(/^\$0 ?/,"")}`;De.span({text:we,padding:[0,2,0,2],width:H(m,Kn,`${j}${Se}`)+4},{text:oe[1]});let Oe=[];oe[2]&&Oe.push(`[${r("default")}]`),oe[3]&&oe[3].length&&Oe.push(`[${r("aliases:")} ${oe[3].join(", ")}]`),oe[4]&&(typeof oe[4]=="string"?Oe.push(`[${r("deprecated: %s",oe[4])}]`):Oe.push(`[${r("deprecated")}]`)),Oe.length?De.div({text:Oe.join(" "),padding:[0,0,0,2],align:"right"}):De.div();}),De.div();}let ln=(Object.keys(se.alias)||[]).concat(Object.keys(e.parsed.newAliases)||[]);Ne=Ne.filter(J=>!e.parsed.newAliases[J]&&ln.every(Se=>(se.alias[Se]||[]).indexOf(J)===-1));let dn=r("Options:");pe[dn]||(pe[dn]=[]),O(Ne,se.alias,pe,dn);let Yn=J=>/^--/.test(wu(J)),Y=Object.keys(pe).filter(J=>pe[J].length>0).map(J=>{let Se=pe[J].filter(z).map(Ee=>{if(ln.includes(Ee))return Ee;for(let oe=0,we;(we=ln[oe])!==void 0;oe++)if((se.alias[we]||[]).includes(Ee))return we;return Ee});return {groupName:J,normalizedKeys:Se}}).filter(({normalizedKeys:J})=>J.length>0).map(({groupName:J,normalizedKeys:Se})=>{let Ee=Se.reduce((oe,we)=>(oe[we]=[we].concat(se.alias[we]||[]).map(Oe=>J===i.getPositionalGroupName()?Oe:(/^[0-9]$/.test(Oe)?se.boolean.includes(we)?"-":"--":Oe.length>1?"--":"-")+Oe).sort((Oe,jt)=>Yn(Oe)===Yn(jt)?0:Yn(Oe)?1:-1).join(", "),oe),{});return {groupName:J,normalizedKeys:Se,switches:Ee}});if(Y.filter(({groupName:J})=>J!==i.getPositionalGroupName()).some(({normalizedKeys:J,switches:Se})=>!J.every(Ee=>Yn(Se[Ee])))&&Y.filter(({groupName:J})=>J!==i.getPositionalGroupName()).forEach(({normalizedKeys:J,switches:Se})=>{J.forEach(Ee=>{Yn(Se[Ee])&&(Se[Ee]=MT(Se[Ee],4));});}),Y.forEach(({groupName:J,normalizedKeys:Se,switches:Ee})=>{De.div(J),Se.forEach(oe=>{let we=Ee[oe],Oe=h[oe]||"",jt=null;Oe.includes(U)&&(Oe=r(Oe.substring(U.length))),se.boolean.includes(oe)&&(jt=`[${r("boolean")}]`),se.count.includes(oe)&&(jt=`[${r("count")}]`),se.string.includes(oe)&&(jt=`[${r("string")}]`),se.normalize.includes(oe)&&(jt=`[${r("string")}]`),se.array.includes(oe)&&(jt=`[${r("array")}]`),se.number.includes(oe)&&(jt=`[${r("number")}]`);let zt=x=>typeof x=="string"?`[${r("deprecated: %s",x)}]`:`[${r("deprecated")}]`,qo=[oe in te?zt(te[oe]):null,jt,oe in T?`[${r("required")}]`:null,se.choices&&se.choices[oe]?`[${r("choices:")} ${i.stringifiedValues(se.choices[oe])}]`:null,ne(se.default[oe],se.defaultDescription[oe])].filter(Boolean).join(" ");De.span({text:wu(we),padding:[0,2,0,2+tD(we)],width:H(Ee,Kn)+4},Oe);let g=e.getInternalMethods().getUsageConfiguration()["hide-types"]===true;qo&&!g?De.div({text:qo,padding:[0,0,0,2],align:"right"}):De.div();}),De.div();}),p.length&&(De.div(r("Examples:")),p.forEach(J=>{J[0]=J[0].replace(/\$0/g,j);}),p.forEach(J=>{J[1]===""?De.div({text:J[0],padding:[0,2,0,2]}):De.div({text:J[0],padding:[0,2,0,2],width:H(p,Kn)+4},{text:J[1]});}),De.div()),v.length>0){let J=v.map(Se=>Se.replace(/\$0/g,j)).join(`
79
+ `);De.div(`${J}
80
+ `);}return De.toString().replace(/\s*$/,"")};function H(F,j,T){let V=0;return Array.isArray(F)||(F=Object.values(F).map(te=>[te])),F.forEach(te=>{V=Math.max(t.stringWidth(T?`${T} ${wu(te[0])}`:wu(te[0]))+tD(te[0]),V);}),j&&(V=Math.min(V,parseInt((j*.5).toString(),10))),V}function B(){let F=e.getDemandedOptions(),j=e.getOptions();(Object.keys(j.alias)||[]).forEach(T=>{j.alias[T].forEach(V=>{h[V]&&i.describe(T,h[V]),V in F&&e.demandOption(T,F[V]),j.boolean.includes(V)&&e.boolean(T),j.count.includes(V)&&e.count(T),j.string.includes(V)&&e.string(T),j.normalize.includes(V)&&e.normalize(T),j.array.includes(V)&&e.array(T),j.number.includes(V)&&e.number(T);});});}let A;i.cacheHelpMessage=function(){A=this.help();},i.clearCachedHelpMessage=function(){A=void 0;},i.hasCachedHelpMessage=function(){return !!A};function O(F,j,T,V){let te=[],pe=null;return Object.keys(T).forEach(se=>{te=te.concat(T[se]);}),F.forEach(se=>{pe=[se].concat(j[se]),pe.some(Ne=>te.indexOf(Ne)!==-1)||T[V].push(se);}),te}function z(F){return e.getOptions().hiddenOptions.indexOf(F)<0||e.parsed.argv[e.getOptions().showHiddenOpt]}i.showHelp=F=>{let j=e.getInternalMethods().getLoggerInstance();F||(F="error"),(typeof F=="function"?F:j[F])(i.help());},i.functionDescription=F=>["(",F.name?t.Parser.decamelize(F.name,"-"):r("generated-value"),")"].join(""),i.stringifiedValues=function(j,T){let V="",te=T||", ",pe=[].concat(j);return !j||!pe.length||pe.forEach(se=>{V.length&&(V+=te),V+=JSON.stringify(se);}),V};function ne(F,j){let T=`[${r("default:")} `;if(F===void 0&&!j)return null;if(j)T+=j;else switch(typeof F){case "string":T+=`"${F}"`;break;case "object":T+=JSON.stringify(F);break;default:T+=F;}return `${T}]`}function ce(){return t.process.stdColumns?Math.min(80,t.process.stdColumns):80}let be=null;i.version=F=>{be=F;},i.showVersion=F=>{let j=e.getInternalMethods().getLoggerInstance();F||(F="error"),(typeof F=="function"?F:j[F])(be);},i.reset=function(j){return o=null,c=false,l=[],d=false,v=[],p=[],m=[],h=Bn(h,T=>!j[T]),i};let ie=[];return i.freeze=function(){ie.push({failMessage:o,failureOutput:c,usages:l,usageDisabled:d,epilogs:v,examples:p,commands:m,descriptions:h});},i.unfreeze=function(j=false){let T=ie.pop();T&&(j?(h={...T.descriptions,...h},m=[...T.commands,...m],l=[...T.usages,...l],p=[...T.examples,...p],v=[...T.epilogs,...v]):{failMessage:o,failureOutput:c,usages:l,usageDisabled:d,epilogs:v,examples:p,commands:m,descriptions:h}=T);},i}function _h(e){return typeof e=="object"}function MT(e,t){return _h(e)?{text:e.text,indentation:e.indentation+t}:{text:e,indentation:t}}function tD(e){return _h(e)?e.indentation:0}function wu(e){return _h(e)?e.text:e}var rD=`###-begin-{{app_name}}-completions-###
81
+ #
82
+ # yargs command completion script
83
+ #
84
+ # Installation: {{app_path}} {{completion_command}} >> ~/.bashrc
85
+ # or {{app_path}} {{completion_command}} >> ~/.bash_profile on OSX.
86
+ #
87
+ _{{app_name}}_yargs_completions()
88
+ {
89
+ local cur_word args type_list
109
90
 
110
- export default createRipplo({
111
- facts,
112
- state,
113
- viewports: ["desktop", "mobile"],
114
- workflows,
115
- });
116
- `;function Ol(e){return`import { defineState, source } from "@ripplo/testing";
117
- import { z } from "${e}";
91
+ cur_word="\${COMP_WORDS[COMP_CWORD]}"
92
+ args=("\${COMP_WORDS[@]}")
118
93
 
119
- export const state = defineState(
120
- z.object({
121
- app: source.http(z.object({})),
122
- }),
123
- );
124
- `}var Nl=`export const facts = [] as const;
125
- `,Fl=`export const workflows = [] as const;
126
- `,Wl=`{
127
- "compilerOptions": {
128
- "strict": true,
129
- "noUncheckedIndexedAccess": true,
130
- "esModuleInterop": true,
131
- "target": "ES2022",
132
- "module": "ESNext",
133
- "moduleResolution": "Bundler",
134
- "skipLibCheck": true,
135
- "isolatedModules": true,
136
- "lib": ["ES2023"]
137
- },
138
- "include": ["*.ts", "workflows/**/*.ts"],
139
- "exclude": ["node_modules"]
140
- }
141
- `,Dl=`// Guards spec files against shadowing DSL imports \u2014 \`const url = ...\` next to the
142
- // imported \`url\` locator silently breaks specs. Requires typescript-eslint (and
143
- // ESLint's per-directory config lookup). Delete this file if your lint setup differs.
144
- import tseslint from "typescript-eslint";
94
+ # ask yargs to generate completions.
95
+ # see https://stackoverflow.com/a/40944195/7080036 for the spaces-handling awk
96
+ mapfile -t type_list < <({{app_path}} --get-yargs-completions "\${args[@]}")
97
+ mapfile -t COMPREPLY < <(compgen -W "$( printf '%q ' "\${type_list[@]}" )" -- "\${cur_word}" |
98
+ awk '/ / { print "\\""$0"\\"" } /^[^ ]+$/ { print $0 }')
145
99
 
146
- export default tseslint.config({
147
- files: ["**/*.ts"],
148
- languageOptions: { parser: tseslint.parser },
149
- rules: {
150
- "no-shadow": "off",
151
- "@typescript-eslint/no-shadow": ["error", { hoist: "all" }],
152
- },
153
- plugins: { "@typescript-eslint": tseslint.plugin },
154
- });
155
- `;function mo({zodImportPath:e}){return[{content:Ll,relPath:"index.ts"},{content:Ol(e),relPath:"state.ts"},{content:Nl,relPath:"facts.ts"},{content:Fl,relPath:"workflows/index.ts"},{content:Wl,relPath:"tsconfig.json"},{content:Dl,relPath:"eslint.config.js"}]}var hg=mo({zodImportPath:"zod/v4"});function fo(e){return _l(e)?{importPath:"zod4",installSpec:`zod4@npm:zod@${ao}`}:{importPath:"zod/v4",installSpec:`zod@${ao}`}}function _l(e){let r=k.join(e,"package.json");if(!f.existsSync(r))return!1;let n=JSON.parse(f.readFileSync(r,"utf8")),t=hl.parse(n);return[t.dependencies?.zod,t.devDependencies?.zod,t.optionalDependencies?.zod,t.peerDependencies?.zod].filter(i=>i!=null).some(i=>!Ul(i))}function Ul(e){let r=e.replace(/^workspace:/,"").replace(/^npm:zod@/,"");return ml(r)?.major===4}import Ie from"fs";import go from"path";import{z as yr}from"zod";var Vl={autoUpdate:!0,source:{repo:"ripplo/claude-plugin",source:"github"}},yo=yr.record(yr.string(),yr.unknown());function Ae(e){let r=go.join(e,".claude","settings.json"),n=ql(r);if(n==null)return"unparseable";let t=yo.safeParse(n.extraKnownMarketplaces??{});if(!t.success)return"unparseable";if(t.data.ripplo!=null)return"already-present";let o={...n,extraKnownMarketplaces:{...t.data,ripplo:Vl}};return Ie.mkdirSync(go.dirname(r),{recursive:!0}),Ie.writeFileSync(r,`${JSON.stringify(o,null,2)}
156
- `),"written"}function ql(e){if(!Ie.existsSync(e))return{};try{let r=yo.safeParse(JSON.parse(Ie.readFileSync(e,"utf8")));return r.success?r.data:void 0}catch{return}}function Te(e){switch(e){case"written":return" registered ripplo plugin marketplace in .claude/settings.json (autoUpdate: true \u2014 Claude Code keeps the plugin current)";case"already-present":return" ripplo plugin marketplace already registered in .claude/settings.json";case"unparseable":return" ! .claude/settings.json could not be parsed \u2014 add the ripplo marketplace to extraKnownMarketplaces manually"}}var Hl=Bl(`
157
- query InitProjects {
158
- projects {
159
- id
160
- name
161
- }
162
- }
163
- `),hr=["../.env.local","../.env"];async function wo(e=Kl()){let r=process.cwd(),n=C(),t=P(n);t==null&&(process.stdout.write("Not signed in. Run `npx ripplo auth login` first.\n"),process.exit(1)),zl(r)&&(process.stdout.write(`\`.ripplo/index.ts\` already exists at ${r}. To re-init, delete it first.
164
- `),process.exit(1));let o=await Gl({serverUrl:n,token:t});o.length===0&&(process.stdout.write("No projects found. Run `npx ripplo projects create <name>` first, then re-run `npx ripplo init`.\n"),process.exit(1));let i=await Ql(o,e.projectId),s=await Zl(r,e.envFile),a=await Yl(e.appUrl),l=Jl(a,e.engineUrl),c=ne.resolve(ne.join(r,".ripplo"),s);Ur({cwd:r,envFiles:[s],projectId:i}),rd({appUrl:a,engineUrl:l,filePath:c}),process.stdout.write(`${Te(Ae(r))}
165
- `);let m=(await uo({cwd:r,onStep:p=>{process.stdout.write(` ${p}
166
- `)}})).match(p=>p,p=>{process.stderr.write(`${S(p)}
167
- `),process.exit(1)});if(m.length>0){process.stdout.write(`Done with warnings:
168
- `),m.forEach(p=>{process.stdout.write(` - ${p.message}
169
- `),p.manualCommand!=null&&process.stdout.write(` run: ${p.manualCommand}
170
- `)});return}await I("cli_init_completed"),process.stdout.write("Ready. Start `npx ripplo daemon` as a background process (or run `/ripplo:start` in Claude Code), then write workflows in `.ripplo/workflows/`.\n")}function zl(e){return re.existsSync(ne.join(e,".ripplo","index.ts"))}async function Gl({serverUrl:e,token:r}){return((await d({config:L({serverUrl:e,token:r}),document:Hl,variables:void 0})).projects??[]).map(t=>({id:t.id,name:t.name}))}function Kl(){return{appUrl:void 0,engineUrl:void 0,envFile:void 0,projectId:void 0}}function Jl(e,r){if(r!=null){try{new URL(r)}catch{process.stdout.write(`--engine-url is not a valid URL: ${r}
171
- `),process.exit(1)}return r}return`${e.replace(/\/$/,"")}/ripplo`}async function Ql(e,r){if(r!=null){let n=e.find(t=>t.id===r);return n==null&&(process.stdout.write(`Unknown project id: ${r}
172
- `),process.exit(1)),process.stdout.write(`Using project: ${n.name} (${n.id})
173
- `),n.id}if(e.length===1){let n=e[0];if(n==null)throw new Error("unreachable");return process.stdout.write(`Using project: ${n.name} (${n.id})
174
- `),n.id}return ko({choices:e.map(n=>({name:n.name,value:n.id})),message:"Select a project"})}async function Zl(e,r){return r!=null?(r.trim().length===0&&(process.stdout.write(`--env must not be empty
175
- `),process.exit(1)),r):Xl(e)}async function Xl(e){let r=ne.join(e,".ripplo"),n=hr.find(o=>re.existsSync(ne.resolve(r,o))),t=await ko({choices:[...hr.map(o=>({name:n===o?`${o} (detected)`:o,value:o})),{name:"custom path",value:"__custom__"}],default:n??hr[0],message:"Which env file should ripplo write RIPPLO_APP_URL, RIPPLO_ENGINE_URL, RIPPLO_WEBHOOK_SECRET, and ENABLE_RIPPLO_TESTING to?"});return t!=="__custom__"?t:ho({message:"Path to env file (relative to .ripplo/, e.g. ../apps/server/.env)",validate:o=>o.trim().length>0?!0:"required"})}async function Yl(e){if(e!=null){try{new URL(e)}catch{process.stdout.write(`--app-url is not a valid URL: ${e}
176
- `),process.exit(1)}return e}return ed()}async function ed(){return ho({default:"http://localhost:3000",message:"Where does your dev server run? (RIPPLO_APP_URL)",validate:e=>{try{return new URL(e),!0}catch{return"must be a valid URL"}}})}function rd({appUrl:e,engineUrl:r,filePath:n}){re.mkdirSync(ne.dirname(n),{recursive:!0});let t=re.existsSync(n)?re.readFileSync(n,"utf8"):"",o=[];if(/^RIPPLO_APP_URL=/m.test(t)||o.push(`RIPPLO_APP_URL=${e}`),/^RIPPLO_ENGINE_URL=/m.test(t)||o.push(`RIPPLO_ENGINE_URL=${r}`),/^RIPPLO_WEBHOOK_SECRET=/m.test(t)||o.push(`RIPPLO_WEBHOOK_SECRET=${Yr()}`),/^ENABLE_RIPPLO_TESTING=/m.test(t)||o.push("ENABLE_RIPPLO_TESTING=true"),o.length===0)return;let i=t.length===0||t.endsWith(`
177
- `)?"":`
178
- `;re.writeFileSync(n,`${t}${i}${o.join(`
179
- `)}
180
- `)}import{graphql as br}from"gql.tada";function kr(){return"Not signed in. Run `npx ripplo auth login` first."}function bo(){return"No organization found for your account. Sign in to the dashboard once, then retry."}function vo(e){return["You belong to multiple organizations \u2014 pass `--org <id>`:",...e.map(n=>` ${n.id} ${n.name}`)].join(`
181
- `)}function wr(e){return`Could not create the project \u2014 ${e}`}var nd=br(`
182
- query ProjectsList {
183
- projects {
184
- id
185
- name
186
- }
187
- }
188
- `),td=br(`
189
- query OrganizationsList {
190
- organizations {
191
- id
100
+ # if no match was found, fall back to filename completion
101
+ if [ \${#COMPREPLY[@]} -eq 0 ]; then
102
+ COMPREPLY=()
103
+ fi
104
+
105
+ return 0
106
+ }
107
+ complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name}}
108
+ ###-end-{{app_name}}-completions-###
109
+ `,iD=`#compdef {{app_name}}
110
+ ###-begin-{{app_name}}-completions-###
111
+ #
112
+ # yargs command completion script
113
+ #
114
+ # Installation: {{app_path}} {{completion_command}} >> ~/.zshrc
115
+ # or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX.
116
+ #
117
+ _{{app_name}}_yargs_completions()
118
+ {
119
+ local reply
120
+ local si=$IFS
121
+ IFS=$'
122
+ ' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}"))
123
+ IFS=$si
124
+ if [[ \${#reply} -gt 0 ]]; then
125
+ _describe 'values' reply
126
+ else
127
+ _default
128
+ fi
129
+ }
130
+ if [[ "'\${zsh_eval_context[-1]}" == "loadautofunc" ]]; then
131
+ _{{app_name}}_yargs_completions "$@"
132
+ else
133
+ compdef _{{app_name}}_yargs_completions {{app_name}}
134
+ fi
135
+ ###-end-{{app_name}}-completions-###
136
+ `;var Eh=class{constructor(t,r,i,n){var o,a,u;this.yargs=t,this.usage=r,this.command=i,this.shim=n,this.completionKey="get-yargs-completions",this.aliases=null,this.customCompletionFunction=null,this.indexAfterLastReset=0,this.zshShell=(u=((o=this.shim.getEnv("SHELL"))===null||o===void 0?void 0:o.includes("zsh"))||((a=this.shim.getEnv("ZSH_NAME"))===null||a===void 0?void 0:a.includes("zsh")))!==null&&u!==void 0?u:false;}defaultCompletion(t,r,i,n){let o=this.command.getCommandHandlers();for(let u=0,c=t.length;u<c;++u)if(o[t[u]]&&o[t[u]].builder){let l=o[t[u]].builder;if(Eu(l)){this.indexAfterLastReset=u+1;let d=this.yargs.getInternalMethods().reset();return l(d,true),d.argv}}let a=[];this.commandCompletions(a,t,i),this.optionCompletions(a,t,r,i),this.choicesFromOptionsCompletions(a,t,r,i),this.choicesFromPositionalsCompletions(a,t,r,i),n(null,a);}commandCompletions(t,r,i){let n=this.yargs.getInternalMethods().getContext().commands;!i.match(/^-/)&&n[n.length-1]!==i&&!this.previousArgHasChoices(r)&&this.usage.getCommands().forEach(o=>{let a=Mn(o[0]).cmd;if(r.indexOf(a)===-1)if(!this.zshShell)t.push(a);else {let u=o[1]||"";t.push(a.replace(/:/g,"\\:")+":"+u);}});}optionCompletions(t,r,i,n){if((n.match(/^-/)||n===""&&t.length===0)&&!this.previousArgHasChoices(r)){let o=this.yargs.getOptions(),a=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[];Object.keys(o.key).forEach(u=>{let c=!!o.configuration["boolean-negation"]&&o.boolean.includes(u);!a.includes(u)&&!o.hiddenOptions.includes(u)&&!this.argsContainKey(r,u,c)&&this.completeOptionKey(u,t,n,c&&!!o.default[u]);});}}choicesFromOptionsCompletions(t,r,i,n){if(this.previousArgHasChoices(r)){let o=this.getPreviousArgChoices(r);o&&o.length>0&&t.push(...o.map(a=>a.replace(/:/g,"\\:")));}}choicesFromPositionalsCompletions(t,r,i,n){if(n===""&&t.length>0&&this.previousArgHasChoices(r))return;let o=this.yargs.getGroups()[this.usage.getPositionalGroupName()]||[],a=Math.max(this.indexAfterLastReset,this.yargs.getInternalMethods().getContext().commands.length+1),u=o[i._.length-a-1];if(!u)return;let c=this.yargs.getOptions().choices[u]||[];for(let l of c)l.startsWith(n)&&t.push(l.replace(/:/g,"\\:"));}getPreviousArgChoices(t){if(t.length<1)return;let r=t[t.length-1],i="";if(!r.startsWith("-")&&t.length>1&&(i=r,r=t[t.length-2]),!r.startsWith("-"))return;let n=r.replace(/^-+/,""),o=this.yargs.getOptions(),a=[n,...this.yargs.getAliases()[n]||[]],u;for(let c of a)if(Object.prototype.hasOwnProperty.call(o.key,c)&&Array.isArray(o.choices[c])){u=o.choices[c];break}if(u)return u.filter(c=>!i||c.startsWith(i))}previousArgHasChoices(t){let r=this.getPreviousArgChoices(t);return r!==void 0&&r.length>0}argsContainKey(t,r,i){let n=o=>t.indexOf((/^[^0-9]$/.test(o)?"-":"--")+o)!==-1;if(n(r)||i&&n(`no-${r}`))return true;if(this.aliases){for(let o of this.aliases[r])if(n(o))return true}return false}completeOptionKey(t,r,i,n){var o,a,u,c;let l=t;if(this.zshShell){let h=this.usage.getDescriptions(),v=(a=(o=this===null||this===void 0?void 0:this.aliases)===null||o===void 0?void 0:o[t])===null||a===void 0?void 0:a.find(U=>{let H=h[U];return typeof H=="string"&&H.length>0}),D=v?h[v]:void 0,b=(c=(u=h[t])!==null&&u!==void 0?u:D)!==null&&c!==void 0?c:"";l=`${t.replace(/:/g,"\\:")}:${b.replace("__yargsString__:","").replace(/(\r\n|\n|\r)/gm," ")}`;}let d=h=>/^--/.test(h),p=h=>/^[^0-9]$/.test(h),m=!d(i)&&p(t)?"-":"--";r.push(m+l),n&&r.push(m+"no-"+l);}customCompletion(t,r,i,n){if(ot(this.customCompletionFunction,null,this.shim),VT(this.customCompletionFunction)){let o=this.customCompletionFunction(i,r);return ve(o)?o.then(a=>{this.shim.process.nextTick(()=>{n(null,a);});}).catch(a=>{this.shim.process.nextTick(()=>{n(a,void 0);});}):n(null,o)}else return ZT(this.customCompletionFunction)?this.customCompletionFunction(i,r,(o=n)=>this.defaultCompletion(t,r,i,o),o=>{n(null,o);}):this.customCompletionFunction(i,r,o=>{n(null,o);})}getCompletion(t,r){let i=t.length?t[t.length-1]:"",n=this.yargs.parse(t,true),o=this.customCompletionFunction?a=>this.customCompletion(t,a,i,r):a=>this.defaultCompletion(t,a,i,r);return ve(n)?n.then(o):o(n)}generateCompletionScript(t,r){let i=this.zshShell?iD:rD,n=this.shim.path.basename(t);return t.match(/\.js$/)&&(t=`./${t}`),i=i.replace(/{{app_name}}/g,n),i=i.replace(/{{completion_command}}/g,r),i.replace(/{{app_path}}/g,t)}registerFunction(t){this.customCompletionFunction=t;}setParsed(t){this.aliases=t.aliases;}};function oD(e,t,r,i){return new Eh(e,t,r,i)}function VT(e){return e.length<3}function ZT(e){return e.length>3}function aD(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;let r=[],i;for(i=0;i<=t.length;i++)r[i]=[i];let n;for(n=0;n<=e.length;n++)r[0][n]=n;for(i=1;i<=t.length;i++)for(n=1;n<=e.length;n++)t.charAt(i-1)===e.charAt(n-1)?r[i][n]=r[i-1][n-1]:i>1&&n>1&&t.charAt(i-2)===e.charAt(n-1)&&t.charAt(i-1)===e.charAt(n-2)?r[i][n]=r[i-2][n-2]+1:r[i][n]=Math.min(r[i-1][n-1]+1,Math.min(r[i][n-1]+1,r[i-1][n]+1));return r[t.length][e.length]}var sD=["$0","--","_"];function uD(e,t,r){let i=r.y18n.__,n=r.y18n.__n,o={};o.nonOptionCount=function(p){let m=e.getDemandedCommands(),v=p._.length+(p["--"]?p["--"].length:0)-e.getInternalMethods().getContext().commands.length;m._&&(v<m._.min||v>m._.max)&&(v<m._.min?m._.minMsg!==void 0?t.fail(m._.minMsg?m._.minMsg.replace(/\$0/g,v.toString()).replace(/\$1/,m._.min.toString()):null):t.fail(n("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",v,v.toString(),m._.min.toString())):v>m._.max&&(m._.maxMsg!==void 0?t.fail(m._.maxMsg?m._.maxMsg.replace(/\$0/g,v.toString()).replace(/\$1/,m._.max.toString()):null):t.fail(n("Too many non-option arguments: got %s, maximum of %s","Too many non-option arguments: got %s, maximum of %s",v,v.toString(),m._.max.toString()))));},o.positionalCount=function(p,m){m<p&&t.fail(n("Not enough non-option arguments: got %s, need at least %s","Not enough non-option arguments: got %s, need at least %s",m,m+"",p+""));},o.requiredArguments=function(p,m){let h=null;for(let v of Object.keys(m))(!Object.prototype.hasOwnProperty.call(p,v)||typeof p[v]>"u")&&(h=h||{},h[v]=m[v]);if(h){let v=[];for(let b of Object.keys(h)){let U=h[b];U&&v.indexOf(U)<0&&v.push(U);}let D=v.length?`
137
+ ${v.join(`
138
+ `)}`:"";t.fail(n("Missing required argument: %s","Missing required arguments: %s",Object.keys(h).length,Object.keys(h).join(", ")+D));}},o.unknownArguments=function(p,m,h,v,D=true){var b;let U=e.getInternalMethods().getCommandInstance().getCommands(),H=[],B=e.getInternalMethods().getContext();if(Object.keys(p).forEach(A=>{!sD.includes(A)&&!Object.prototype.hasOwnProperty.call(h,A)&&!Object.prototype.hasOwnProperty.call(e.getInternalMethods().getParseContext(),A)&&!o.isValidAndSomeAliasIsNotNew(A,m)&&H.push(A);}),D&&(B.commands.length>0||U.length>0||v)&&p._.slice(B.commands.length).forEach(A=>{U.includes(""+A)||H.push(""+A);}),D){let O=((b=e.getDemandedCommands()._)===null||b===void 0?void 0:b.max)||0,z=B.commands.length+O;z<p._.length&&p._.slice(z).forEach(ne=>{ne=String(ne),!B.commands.includes(ne)&&!H.includes(ne)&&H.push(ne);});}H.length&&t.fail(n("Unknown argument: %s","Unknown arguments: %s",H.length,H.map(A=>A.trim()?A:`"${A}"`).join(", ")));},o.unknownCommands=function(p){let m=e.getInternalMethods().getCommandInstance().getCommands(),h=[],v=e.getInternalMethods().getContext();return (v.commands.length>0||m.length>0)&&p._.slice(v.commands.length).forEach(D=>{m.includes(""+D)||h.push(""+D);}),h.length>0?(t.fail(n("Unknown command: %s","Unknown commands: %s",h.length,h.join(", "))),true):false},o.isValidAndSomeAliasIsNotNew=function(p,m){if(!Object.prototype.hasOwnProperty.call(m,p))return false;let h=e.parsed.newAliases;return [p,...m[p]].some(v=>!Object.prototype.hasOwnProperty.call(h,v)||!h[p])},o.limitedChoices=function(p){let m=e.getOptions(),h={};if(!Object.keys(m.choices).length)return;Object.keys(p).forEach(b=>{sD.indexOf(b)===-1&&Object.prototype.hasOwnProperty.call(m.choices,b)&&[].concat(p[b]).forEach(U=>{m.choices[b].indexOf(U)===-1&&U!==void 0&&(h[b]=(h[b]||[]).concat(U));});});let v=Object.keys(h);if(!v.length)return;let D=i("Invalid values:");v.forEach(b=>{D+=`
139
+ ${i("Argument: %s, Given: %s, Choices: %s",b,t.stringifiedValues(h[b]),t.stringifiedValues(m.choices[b]))}`;}),t.fail(D);};let a={};o.implies=function(p,m){L("<string|object> [array|number|string]",[p,m],arguments.length),typeof p=="object"?Object.keys(p).forEach(h=>{o.implies(h,p[h]);}):(e.global(p),a[p]||(a[p]=[]),Array.isArray(m)?m.forEach(h=>o.implies(p,h)):(ot(m,void 0,r),a[p].push(m)));},o.getImplied=function(){return a};function u(d,p){let m=Number(p);return p=isNaN(m)?p:m,typeof p=="number"?p=d._.length>=p:p.match(/^--no-.+/)?(p=p.match(/^--no-(.+)/)[1],p=!Object.prototype.hasOwnProperty.call(d,p)):p=Object.prototype.hasOwnProperty.call(d,p),p}o.implications=function(p){let m=[];if(Object.keys(a).forEach(h=>{let v=h;(a[h]||[]).forEach(D=>{let b=v,U=D;b=u(p,b),D=u(p,D),b&&!D&&m.push(` ${v} -> ${U}`);});}),m.length){let h=`${i("Implications failed:")}
140
+ `;m.forEach(v=>{h+=v;}),t.fail(h);}};let c={};o.conflicts=function(p,m){L("<string|object> [array|string]",[p,m],arguments.length),typeof p=="object"?Object.keys(p).forEach(h=>{o.conflicts(h,p[h]);}):(e.global(p),c[p]||(c[p]=[]),Array.isArray(m)?m.forEach(h=>o.conflicts(p,h)):c[p].push(m));},o.getConflicting=()=>c,o.conflicting=function(p){Object.keys(p).forEach(m=>{c[m]&&c[m].forEach(h=>{h&&p[m]!==void 0&&p[h]!==void 0&&t.fail(i("Arguments %s and %s are mutually exclusive",m,h));});}),e.getInternalMethods().getParserConfiguration()["strip-dashed"]&&Object.keys(c).forEach(m=>{c[m].forEach(h=>{h&&p[r.Parser.camelCase(m)]!==void 0&&p[r.Parser.camelCase(h)]!==void 0&&t.fail(i("Arguments %s and %s are mutually exclusive",m,h));});});},o.recommendCommands=function(p,m){m=m.sort((b,U)=>U.length-b.length);let v=null,D=1/0;for(let b=0,U;(U=m[b])!==void 0;b++){let H=aD(p,U);H<=3&&H<D&&(D=H,v=U);}v&&t.fail(i("Did you mean %s?",v));},o.reset=function(p){return a=Bn(a,m=>!p[m]),c=Bn(c,m=>!p[m]),o};let l=[];return o.freeze=function(){l.push({implied:a,conflicting:c});},o.unfreeze=function(){let p=l.pop();ot(p,void 0,r),{implied:a,conflicting:c}=p;},o}var wh=[],zo;function No(e,t,r,i){zo=i;let n={};if(Object.prototype.hasOwnProperty.call(e,"extends")){if(typeof e.extends!="string")return n;let o=/\.json|\..*rc$/.test(e.extends),a=null;if(o)a=GT(t,e.extends);else try{a=import.meta.resolve(e.extends);}catch{return e}WT(a),wh.push(a),n=o?JSON.parse(zo.readFileSync(a,"utf8")):i.require(e.extends),delete e.extends,n=No(n,zo.path.dirname(a),r,zo);}return wh=[],r?cD(n,e):Object.assign({},n,e)}function WT(e){if(wh.indexOf(e)>-1)throw new Ce(`Circular extended configurations: '${e}'.`)}function GT(e,t){return zo.path.resolve(e,t)}function cD(e,t){let r={};function i(n){return n&&typeof n=="object"&&!Array.isArray(n)}Object.assign(r,e);for(let n of Object.keys(t))i(t[n])&&i(r[n])?r[n]=cD(e[n],t[n]):r[n]=t[n];return r}var M=function(e,t,r,i,n){if(typeof t=="function"?e!==t||true:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,r),r},f=function(e,t,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?i:r==="a"?i.call(e):i?i.value:t.get(e)},Re,Sr,Uo,pt,St,$u,Zn,xr,ku,Ot,Iu,Ct,sn,xt,Rt,Ou,Dr,We,G,Cu,Ru,Dt,_r,ki,Er,Wn,Au,K,wr,$r,kr,Q,Tu,un,ke;function OD(e){return (t=[],r=e.process.cwd(),i)=>{let n=new jh(t,r,i,e);return Object.defineProperty(n,"argv",{get:()=>n.parse(),enumerable:true}),n.help(),n.version(),n}}var lD=Symbol("copyDoubleDash"),dD=Symbol("copyDoubleDash"),$h=Symbol("deleteFromParserHintObject"),pD=Symbol("emitWarning"),fD=Symbol("freeze"),mD=Symbol("getDollarZero"),Ir=Symbol("getParserConfiguration"),hD=Symbol("getUsageConfiguration"),kh=Symbol("guessLocale"),gD=Symbol("guessVersion"),yD=Symbol("parsePositionalNumbers"),Ih=Symbol("pkgUp"),Gn=Symbol("populateParserHintArray"),Ii=Symbol("populateParserHintSingleValueDictionary"),Oh=Symbol("populateParserHintArrayDictionary"),Ch=Symbol("populateParserHintDictionary"),Rh=Symbol("sanitizeKey"),Ah=Symbol("setKey"),Th=Symbol("unfreeze"),vD=Symbol("validateAsync"),bD=Symbol("getCommandInstance"),SD=Symbol("getContext"),xD=Symbol("getHasOutput"),DD=Symbol("getLoggerInstance"),_D=Symbol("getParseContext"),ED=Symbol("getUsageInstance"),wD=Symbol("getValidationInstance"),Pu=Symbol("hasParseCallback"),$D=Symbol("isGlobalContext"),Or=Symbol("postProcess"),kD=Symbol("rebase"),Ph=Symbol("reset"),Lo=Symbol("runYargsParserAndExecuteCommands"),Fh=Symbol("runValidation"),ID=Symbol("setHasOutput"),Cr=Symbol("kTrackManuallySetKeys"),qT="en_US",jh=class{constructor(t=[],r,i,n){this.customScriptName=false,this.parsed=false,Re.set(this,void 0),Sr.set(this,void 0),Uo.set(this,{commands:[],fullCommands:[]}),pt.set(this,null),St.set(this,null),$u.set(this,"show-hidden"),Zn.set(this,null),xr.set(this,true),ku.set(this,{}),Ot.set(this,true),Iu.set(this,[]),Ct.set(this,void 0),sn.set(this,{}),xt.set(this,false),Rt.set(this,null),Ou.set(this,true),Dr.set(this,void 0),We.set(this,""),G.set(this,void 0),Cu.set(this,void 0),Ru.set(this,{}),Dt.set(this,null),_r.set(this,null),ki.set(this,{}),Er.set(this,{}),Wn.set(this,void 0),Au.set(this,false),K.set(this,void 0),wr.set(this,false),$r.set(this,false),kr.set(this,false),Q.set(this,void 0),Tu.set(this,{}),un.set(this,null),ke.set(this,void 0),M(this,K,n),M(this,Wn,t),M(this,Sr,r),M(this,Cu,i),M(this,Ct,new _u(this)),this.$0=this[mD](),this[Ph](),M(this,Re,f(this,Re,"f")),M(this,Q,f(this,Q,"f")),M(this,ke,f(this,ke,"f")),M(this,G,f(this,G,"f")),f(this,G,"f").showHiddenOpt=f(this,$u,"f"),M(this,Dr,this[dD]()),f(this,K,"f").y18n.setLocale(qT);}addHelpOpt(t,r){let i="help";return L("[string|boolean] [string]",[t,r],arguments.length),f(this,Rt,"f")&&(this[$h](f(this,Rt,"f")),M(this,Rt,null)),t===false&&r===void 0?this:(M(this,Rt,typeof t=="string"?t:i),this.boolean(f(this,Rt,"f")),this.describe(f(this,Rt,"f"),r||f(this,Q,"f").deferY18nLookup("Show help")),this)}help(t,r){return this.addHelpOpt(t,r)}addShowHiddenOpt(t,r){if(L("[string|boolean] [string]",[t,r],arguments.length),t===false&&r===void 0)return this;let i=typeof t=="string"?t:f(this,$u,"f");return this.boolean(i),this.describe(i,r||f(this,Q,"f").deferY18nLookup("Show hidden options")),f(this,G,"f").showHiddenOpt=i,this}showHidden(t,r){return this.addShowHiddenOpt(t,r)}alias(t,r){return L("<object|string|array> [string|array]",[t,r],arguments.length),this[Oh](this.alias.bind(this),"alias",t,r),this}array(t){return L("<array|string>",[t],arguments.length),this[Gn]("array",t),this[Cr](t),this}boolean(t){return L("<array|string>",[t],arguments.length),this[Gn]("boolean",t),this[Cr](t),this}check(t,r){return L("<function> [boolean]",[t,r],arguments.length),this.middleware((i,n)=>br(()=>t(i,n.getOptions()),o=>(o?(typeof o=="string"||o instanceof Error)&&f(this,Q,"f").fail(o.toString(),o):f(this,Q,"f").fail(f(this,K,"f").y18n.__("Argument check failed: %s",t.toString())),i),o=>(f(this,Q,"f").fail(o.message?o.message:o.toString(),o),i)),false,r),this}choices(t,r){return L("<object|string|array> [string|array]",[t,r],arguments.length),this[Oh](this.choices.bind(this),"choices",t,r),this}coerce(t,r){if(L("<object|string|array> [function]",[t,r],arguments.length),Array.isArray(t)){if(!r)throw new Ce("coerce callback must be provided");for(let n of t)this.coerce(n,r);return this}else if(typeof t=="object"){for(let n of Object.keys(t))this.coerce(n,t[n]);return this}if(!r)throw new Ce("coerce callback must be provided");let i=t;return f(this,G,"f").key[i]=true,f(this,Ct,"f").addCoerceMiddleware((n,o)=>{var a;let u=(a=o.getAliases()[i])!==null&&a!==void 0?a:[],c=[i,...u].filter(l=>Object.prototype.hasOwnProperty.call(n,l));return c.length===0?n:br(()=>r(n[c[0]]),l=>(c.forEach(d=>{n[d]=l;}),n),l=>{throw new Ce(l.message)})},i),this}conflicts(t,r){return L("<string|object> [string|array]",[t,r],arguments.length),f(this,ke,"f").conflicts(t,r),this}config(t="config",r,i){return L("[object|string] [string|function] [function]",[t,r,i],arguments.length),typeof t=="object"&&!Array.isArray(t)?(t=No(t,f(this,Sr,"f"),this[Ir]()["deep-merge-config"]||false,f(this,K,"f")),f(this,G,"f").configObjects=(f(this,G,"f").configObjects||[]).concat(t),this):(typeof r=="function"&&(i=r,r=void 0),this.describe(t,r||f(this,Q,"f").deferY18nLookup("Path to JSON config file")),(Array.isArray(t)?t:[t]).forEach(n=>{f(this,G,"f").config[n]=i||true;}),this)}completion(t,r,i){return L("[string] [string|boolean|function] [function]",[t,r,i],arguments.length),typeof r=="function"&&(i=r,r=void 0),M(this,St,t||f(this,St,"f")||"completion"),!r&&r!==false&&(r="generate completion script"),this.command(f(this,St,"f"),r),i&&f(this,pt,"f").registerFunction(i),this}command(t,r,i,n,o,a){return L("<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]",[t,r,i,n,o,a],arguments.length),f(this,Re,"f").addHandler(t,r,i,n,o,a),this}commands(t,r,i,n,o,a){return this.command(t,r,i,n,o,a)}commandDir(t,r){L("<string> [object]",[t,r],arguments.length);let i=f(this,Cu,"f")||f(this,K,"f").require;return f(this,Re,"f").addDirectory(t,i,f(this,K,"f").getCallerFile(),r),this}count(t){return L("<array|string>",[t],arguments.length),this[Gn]("count",t),this[Cr](t),this}default(t,r,i){return L("<object|string|array> [*] [string]",[t,r,i],arguments.length),i&&(xh(t,f(this,K,"f")),f(this,G,"f").defaultDescription[t]=i),typeof r=="function"&&(xh(t,f(this,K,"f")),f(this,G,"f").defaultDescription[t]||(f(this,G,"f").defaultDescription[t]=f(this,Q,"f").functionDescription(r)),r=r.call()),this[Ii](this.default.bind(this),"default",t,r),this}defaults(t,r,i){return this.default(t,r,i)}demandCommand(t=1,r,i,n){return L("[number] [number|string] [string|null|undefined] [string|null|undefined]",[t,r,i,n],arguments.length),typeof r!="number"&&(i=r,r=1/0),this.global("_",false),f(this,G,"f").demandedCommands._={min:t,max:r,minMsg:i,maxMsg:n},this}demand(t,r,i){return Array.isArray(r)?(r.forEach(n=>{ot(i,true,f(this,K,"f")),this.demandOption(n,i);}),r=1/0):typeof r!="number"&&(i=r,r=1/0),typeof t=="number"?(ot(i,true,f(this,K,"f")),this.demandCommand(t,r,i,i)):Array.isArray(t)?t.forEach(n=>{ot(i,true,f(this,K,"f")),this.demandOption(n,i);}):typeof i=="string"?this.demandOption(t,i):(i===true||typeof i>"u")&&this.demandOption(t),this}demandOption(t,r){return L("<object|string|array> [string]",[t,r],arguments.length),this[Ii](this.demandOption.bind(this),"demandedOptions",t,r),this}deprecateOption(t,r){return L("<string> [string|boolean]",[t,r],arguments.length),f(this,G,"f").deprecatedOptions[t]=r,this}describe(t,r){return L("<object|string|array> [string]",[t,r],arguments.length),this[Ah](t,true),f(this,Q,"f").describe(t,r),this}detectLocale(t){return L("<boolean>",[t],arguments.length),M(this,xr,t),this}env(t){return L("[string|boolean]",[t],arguments.length),t===false?delete f(this,G,"f").envPrefix:f(this,G,"f").envPrefix=t||"",this}epilogue(t){return L("<string>",[t],arguments.length),f(this,Q,"f").epilog(t),this}epilog(t){return this.epilogue(t)}example(t,r){return L("<string|array> [string]",[t,r],arguments.length),Array.isArray(t)?t.forEach(i=>this.example(...i)):f(this,Q,"f").example(t,r),this}exit(t,r){M(this,xt,true),M(this,Zn,r),f(this,Ot,"f")&&f(this,K,"f").process.exit(t);}exitProcess(t=true){return L("[boolean]",[t],arguments.length),M(this,Ot,t),this}fail(t){if(L("<function|boolean>",[t],arguments.length),typeof t=="boolean"&&t!==false)throw new Ce("Invalid first argument. Expected function or boolean 'false'");return f(this,Q,"f").failFn(t),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(t,r){return L("<array> [function]",[t,r],arguments.length),r?f(this,pt,"f").getCompletion(t,r):new Promise((i,n)=>{f(this,pt,"f").getCompletion(t,(o,a)=>{o?n(o):i(a);});})}getDemandedOptions(){return L([],0),f(this,G,"f").demandedOptions}getDemandedCommands(){return L([],0),f(this,G,"f").demandedCommands}getDeprecatedOptions(){return L([],0),f(this,G,"f").deprecatedOptions}getDetectLocale(){return f(this,xr,"f")}getExitProcess(){return f(this,Ot,"f")}getGroups(){return Object.assign({},f(this,sn,"f"),f(this,Er,"f"))}getHelp(){if(M(this,xt,true),!f(this,Q,"f").hasCachedHelpMessage()){if(!this.parsed){let r=this[Lo](f(this,Wn,"f"),void 0,void 0,0,true);if(ve(r))return r.then(()=>f(this,Q,"f").help())}let t=f(this,Re,"f").runDefaultBuilderOn(this);if(ve(t))return t.then(()=>f(this,Q,"f").help())}return Promise.resolve(f(this,Q,"f").help())}getOptions(){return f(this,G,"f")}getStrict(){return f(this,wr,"f")}getStrictCommands(){return f(this,$r,"f")}getStrictOptions(){return f(this,kr,"f")}global(t,r){return L("<string|array> [boolean]",[t,r],arguments.length),t=[].concat(t),r!==false?f(this,G,"f").local=f(this,G,"f").local.filter(i=>t.indexOf(i)===-1):t.forEach(i=>{f(this,G,"f").local.includes(i)||f(this,G,"f").local.push(i);}),this}group(t,r){L("<string|array> <string>",[t,r],arguments.length);let i=f(this,Er,"f")[r]||f(this,sn,"f")[r];f(this,Er,"f")[r]&&delete f(this,Er,"f")[r];let n={};return f(this,sn,"f")[r]=(i||[]).concat(t).filter(o=>n[o]?false:n[o]=true),this}hide(t){return L("<string>",[t],arguments.length),f(this,G,"f").hiddenOptions.push(t),this}implies(t,r){return L("<string|object> [number|string|array]",[t,r],arguments.length),f(this,ke,"f").implies(t,r),this}locale(t){return L("[string]",[t],arguments.length),t===void 0?(this[kh](),f(this,K,"f").y18n.getLocale()):(M(this,xr,false),f(this,K,"f").y18n.setLocale(t),this)}middleware(t,r,i){return f(this,Ct,"f").addMiddleware(t,!!r,i)}nargs(t,r){return L("<string|object|array> [number]",[t,r],arguments.length),this[Ii](this.nargs.bind(this),"narg",t,r),this}normalize(t){return L("<array|string>",[t],arguments.length),this[Gn]("normalize",t),this}number(t){return L("<array|string>",[t],arguments.length),this[Gn]("number",t),this[Cr](t),this}option(t,r){if(L("<string|object> [object]",[t,r],arguments.length),typeof t=="object")Object.keys(t).forEach(i=>{this.options(i,t[i]);});else {typeof r!="object"&&(r={}),this[Cr](t),f(this,un,"f")&&(t==="version"||r?.alias==="version")&&this[pD](['"version" is a reserved word.',"Please do one of the following:",'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)","- Use a different option key","https://yargs.js.org/docs/#api-reference-version"].join(`
141
+ `),void 0,"versionWarning"),f(this,G,"f").key[t]=true,r.alias&&this.alias(t,r.alias);let i=r.deprecate||r.deprecated;i&&this.deprecateOption(t,i);let n=r.demand||r.required||r.require;n&&this.demand(t,n),r.demandOption&&this.demandOption(t,typeof r.demandOption=="string"?r.demandOption:void 0),r.conflicts&&this.conflicts(t,r.conflicts),"default"in r&&this.default(t,r.default),r.implies!==void 0&&this.implies(t,r.implies),r.nargs!==void 0&&this.nargs(t,r.nargs),r.config&&this.config(t,r.configParser),r.normalize&&this.normalize(t),r.choices&&this.choices(t,r.choices),r.coerce&&this.coerce(t,r.coerce),r.group&&this.group(t,r.group),(r.boolean||r.type==="boolean")&&(this.boolean(t),r.alias&&this.boolean(r.alias)),(r.array||r.type==="array")&&(this.array(t),r.alias&&this.array(r.alias)),(r.number||r.type==="number")&&(this.number(t),r.alias&&this.number(r.alias)),(r.string||r.type==="string")&&(this.string(t),r.alias&&this.string(r.alias)),(r.count||r.type==="count")&&this.count(t),typeof r.global=="boolean"&&this.global(t,r.global),r.defaultDescription&&(f(this,G,"f").defaultDescription[t]=r.defaultDescription),r.skipValidation&&this.skipValidation(t);let o=r.describe||r.description||r.desc,a=f(this,Q,"f").getDescriptions();(!Object.prototype.hasOwnProperty.call(a,t)||typeof o=="string")&&this.describe(t,o),r.hidden&&this.hide(t),r.requiresArg&&this.requiresArg(t);}return this}options(t,r){return this.option(t,r)}parse(t,r,i){L("[string|array] [function|boolean|object] [function]",[t,r,i],arguments.length),this[fD](),typeof t>"u"&&(t=f(this,Wn,"f")),typeof r=="object"&&(M(this,_r,r),r=i),typeof r=="function"&&(M(this,Dt,r),r=false),r||M(this,Wn,t),f(this,Dt,"f")&&M(this,Ot,false);let n=this[Lo](t,!!r),o=this.parsed;return f(this,pt,"f").setParsed(this.parsed),ve(n)?n.then(a=>(f(this,Dt,"f")&&f(this,Dt,"f").call(this,f(this,Zn,"f"),a,f(this,We,"f")),a)).catch(a=>{throw f(this,Dt,"f")&&f(this,Dt,"f")(a,this.parsed.argv,f(this,We,"f")),a}).finally(()=>{this[Th](),this.parsed=o;}):(f(this,Dt,"f")&&f(this,Dt,"f").call(this,f(this,Zn,"f"),n,f(this,We,"f")),this[Th](),this.parsed=o,n)}parseAsync(t,r,i){let n=this.parse(t,r,i);return ve(n)?n:Promise.resolve(n)}parseSync(t,r,i){let n=this.parse(t,r,i);if(ve(n))throw new Ce(".parseSync() must not be used with asynchronous builders, handlers, or middleware");return n}parserConfiguration(t){return L("<object>",[t],arguments.length),M(this,Ru,t),this}pkgConf(t,r){L("<string> [string]",[t,r],arguments.length);let i=null,n=this[Ih](r||f(this,Sr,"f"));return n[t]&&typeof n[t]=="object"&&(i=No(n[t],r||f(this,Sr,"f"),this[Ir]()["deep-merge-config"]||false,f(this,K,"f")),f(this,G,"f").configObjects=(f(this,G,"f").configObjects||[]).concat(i)),this}positional(t,r){L("<string> <object>",[t,r],arguments.length);let i=["default","defaultDescription","implies","normalize","choices","conflicts","coerce","type","describe","desc","description","alias"];r=Bn(r,(a,u)=>a==="type"&&!["string","number","boolean"].includes(u)?false:i.includes(a));let n=f(this,Uo,"f").fullCommands[f(this,Uo,"f").fullCommands.length-1],o=n?f(this,Re,"f").cmdToParseOptions(n):{array:[],alias:{},default:{},demand:{}};return wi(o).forEach(a=>{let u=o[a];Array.isArray(u)?u.indexOf(t)!==-1&&(r[a]=true):u[t]&&!(a in r)&&(r[a]=u[t]);}),this.group(t,f(this,Q,"f").getPositionalGroupName()),this.option(t,r)}recommendCommands(t=true){return L("[boolean]",[t],arguments.length),M(this,Au,t),this}required(t,r,i){return this.demand(t,r,i)}require(t,r,i){return this.demand(t,r,i)}requiresArg(t){return L("<array|string|object> [number]",[t],arguments.length),typeof t=="string"&&f(this,G,"f").narg[t]?this:(this[Ii](this.requiresArg.bind(this),"narg",t,NaN),this)}showCompletionScript(t,r){return L("[string] [string]",[t,r],arguments.length),t=t||this.$0,f(this,Dr,"f").log(f(this,pt,"f").generateCompletionScript(t,r||f(this,St,"f")||"completion")),this}showHelp(t){if(L("[string|function]",[t],arguments.length),M(this,xt,true),!f(this,Q,"f").hasCachedHelpMessage()){if(!this.parsed){let i=this[Lo](f(this,Wn,"f"),void 0,void 0,0,true);if(ve(i))return i.then(()=>{f(this,Q,"f").showHelp(t);}),this}let r=f(this,Re,"f").runDefaultBuilderOn(this);if(ve(r))return r.then(()=>{f(this,Q,"f").showHelp(t);}),this}return f(this,Q,"f").showHelp(t),this}scriptName(t){return this.customScriptName=true,this.$0=t,this}showHelpOnFail(t,r){return L("[boolean|string] [string]",[t,r],arguments.length),f(this,Q,"f").showHelpOnFail(t,r),this}showVersion(t){return L("[string|function]",[t],arguments.length),f(this,Q,"f").showVersion(t),this}skipValidation(t){return L("<array|string>",[t],arguments.length),this[Gn]("skipValidation",t),this}strict(t){return L("[boolean]",[t],arguments.length),M(this,wr,t!==false),this}strictCommands(t){return L("[boolean]",[t],arguments.length),M(this,$r,t!==false),this}strictOptions(t){return L("[boolean]",[t],arguments.length),M(this,kr,t!==false),this}string(t){return L("<array|string>",[t],arguments.length),this[Gn]("string",t),this[Cr](t),this}terminalWidth(){return L([],0),f(this,K,"f").process.stdColumns}updateLocale(t){return this.updateStrings(t)}updateStrings(t){return L("<object>",[t],arguments.length),M(this,xr,false),f(this,K,"f").y18n.updateLocale(t),this}usage(t,r,i,n){if(L("<string|null|undefined> [string|boolean] [function|object] [function]",[t,r,i,n],arguments.length),r!==void 0){if(ot(t,null,f(this,K,"f")),(t||"").match(/^\$0( |$)/))return this.command(t,r,i,n);throw new Ce(".usage() description must start with $0 if being used as alias for .command()")}else return f(this,Q,"f").usage(t),this}usageConfiguration(t){return L("<object>",[t],arguments.length),M(this,Tu,t),this}version(t,r,i){let n="version";if(L("[boolean|string] [string] [string]",[t,r,i],arguments.length),f(this,un,"f")&&(this[$h](f(this,un,"f")),f(this,Q,"f").version(void 0),M(this,un,null)),arguments.length===0)i=this[gD](),t=n;else if(arguments.length===1){if(t===false)return this;i=t,t=n;}else arguments.length===2&&(i=r,r=void 0);return M(this,un,typeof t=="string"?t:n),r=r||f(this,Q,"f").deferY18nLookup("Show version number"),f(this,Q,"f").version(i||void 0),this.boolean(f(this,un,"f")),this.describe(f(this,un,"f"),r),this}wrap(t){return L("<number|null|undefined>",[t],arguments.length),f(this,Q,"f").wrap(t),this}[(Re=new WeakMap,Sr=new WeakMap,Uo=new WeakMap,pt=new WeakMap,St=new WeakMap,$u=new WeakMap,Zn=new WeakMap,xr=new WeakMap,ku=new WeakMap,Ot=new WeakMap,Iu=new WeakMap,Ct=new WeakMap,sn=new WeakMap,xt=new WeakMap,Rt=new WeakMap,Ou=new WeakMap,Dr=new WeakMap,We=new WeakMap,G=new WeakMap,Cu=new WeakMap,Ru=new WeakMap,Dt=new WeakMap,_r=new WeakMap,ki=new WeakMap,Er=new WeakMap,Wn=new WeakMap,Au=new WeakMap,K=new WeakMap,wr=new WeakMap,$r=new WeakMap,kr=new WeakMap,Q=new WeakMap,Tu=new WeakMap,un=new WeakMap,ke=new WeakMap,lD)](t){if(!t._||!t["--"])return t;t._.push.apply(t._,t["--"]);try{delete t["--"];}catch{}return t}[dD](){return {log:(...t)=>{this[Pu]()||console.log(...t),M(this,xt,true),f(this,We,"f").length&&M(this,We,f(this,We,"f")+`
142
+ `),M(this,We,f(this,We,"f")+t.join(" "));},error:(...t)=>{this[Pu]()||console.error(...t),M(this,xt,true),f(this,We,"f").length&&M(this,We,f(this,We,"f")+`
143
+ `),M(this,We,f(this,We,"f")+t.join(" "));}}}[$h](t){wi(f(this,G,"f")).forEach(r=>{if((n=>n==="configObjects")(r))return;let i=f(this,G,"f")[r];Array.isArray(i)?i.includes(t)&&i.splice(i.indexOf(t),1):typeof i=="object"&&delete i[t];}),delete f(this,Q,"f").getDescriptions()[t];}[pD](t,r,i){f(this,ku,"f")[i]||(f(this,K,"f").process.emitWarning(t,r),f(this,ku,"f")[i]=true);}[fD](){f(this,Iu,"f").push({options:f(this,G,"f"),configObjects:f(this,G,"f").configObjects.slice(0),exitProcess:f(this,Ot,"f"),groups:f(this,sn,"f"),strict:f(this,wr,"f"),strictCommands:f(this,$r,"f"),strictOptions:f(this,kr,"f"),completionCommand:f(this,St,"f"),output:f(this,We,"f"),exitError:f(this,Zn,"f"),hasOutput:f(this,xt,"f"),parsed:this.parsed,parseFn:f(this,Dt,"f"),parseContext:f(this,_r,"f")}),f(this,Q,"f").freeze(),f(this,ke,"f").freeze(),f(this,Re,"f").freeze(),f(this,Ct,"f").freeze();}[mD](){let t="",r;return /\b(node|iojs|electron)(\.exe)?$/.test(f(this,K,"f").process.argv()[0])?r=f(this,K,"f").process.argv().slice(1,2):r=f(this,K,"f").process.argv().slice(0,1),t=r.map(i=>{let n=this[kD](f(this,Sr,"f"),i);return i.match(/^(\/|([a-zA-Z]:)?\\)/)&&n.length<i.length?n:i}).join(" ").trim(),f(this,K,"f").getEnv("_")&&f(this,K,"f").getProcessArgvBin()===f(this,K,"f").getEnv("_")&&(t=f(this,K,"f").getEnv("_").replace(`${f(this,K,"f").path.dirname(f(this,K,"f").process.execPath())}/`,"")),t}[Ir](){return f(this,Ru,"f")}[hD](){return f(this,Tu,"f")}[kh](){if(!f(this,xr,"f"))return;let t=f(this,K,"f").getEnv("LC_ALL")||f(this,K,"f").getEnv("LC_MESSAGES")||f(this,K,"f").getEnv("LANG")||f(this,K,"f").getEnv("LANGUAGE")||"en_US";this.locale(t.replace(/[.:].*/,""));}[gD](){return this[Ih]().version||"unknown"}[yD](t){let r=t["--"]?t["--"]:t._;for(let i=0,n;(n=r[i])!==void 0;i++)f(this,K,"f").Parser.looksLikeNumber(n)&&Number.isSafeInteger(Math.floor(parseFloat(`${n}`)))&&(r[i]=Number(n));return t}[Ih](t){let r=t||"*";if(f(this,ki,"f")[r])return f(this,ki,"f")[r];let i={};try{let n=t||f(this,K,"f").mainFilename;f(this,K,"f").path.extname(n)&&(n=f(this,K,"f").path.dirname(n));let o=f(this,K,"f").findUp(n,(a,u)=>{if(u.includes("package.json"))return "package.json"});ot(o,void 0,f(this,K,"f")),i=JSON.parse(f(this,K,"f").readFileSync(o,"utf8"));}catch{}return f(this,ki,"f")[r]=i||{},f(this,ki,"f")[r]}[Gn](t,r){r=[].concat(r),r.forEach(i=>{i=this[Rh](i),f(this,G,"f")[t].push(i);});}[Ii](t,r,i,n){this[Ch](t,r,i,n,(o,a,u)=>{f(this,G,"f")[o][a]=u;});}[Oh](t,r,i,n){this[Ch](t,r,i,n,(o,a,u)=>{f(this,G,"f")[o][a]=(f(this,G,"f")[o][a]||[]).concat(u);});}[Ch](t,r,i,n,o){if(Array.isArray(i))i.forEach(a=>{t(a,n);});else if((a=>typeof a=="object")(i))for(let a of wi(i))t(a,i[a]);else o(r,this[Rh](i),n);}[Rh](t){return t==="__proto__"?"___proto___":t}[Ah](t,r){return this[Ii](this[Ah].bind(this),"key",t,r),this}[Th](){var t,r,i,n,o,a,u,c,l,d,p,m;let h=f(this,Iu,"f").pop();ot(h,void 0,f(this,K,"f"));let v;t=this,r=this,i=this,n=this,o=this,a=this,u=this,c=this,l=this,d=this,p=this,m=this,{options:{set value(D){M(t,G,D);}}.value,configObjects:v,exitProcess:{set value(D){M(r,Ot,D);}}.value,groups:{set value(D){M(i,sn,D);}}.value,output:{set value(D){M(n,We,D);}}.value,exitError:{set value(D){M(o,Zn,D);}}.value,hasOutput:{set value(D){M(a,xt,D);}}.value,parsed:this.parsed,strict:{set value(D){M(u,wr,D);}}.value,strictCommands:{set value(D){M(c,$r,D);}}.value,strictOptions:{set value(D){M(l,kr,D);}}.value,completionCommand:{set value(D){M(d,St,D);}}.value,parseFn:{set value(D){M(p,Dt,D);}}.value,parseContext:{set value(D){M(m,_r,D);}}.value}=h,f(this,G,"f").configObjects=v,f(this,Q,"f").unfreeze(),f(this,ke,"f").unfreeze(),f(this,Re,"f").unfreeze(),f(this,Ct,"f").unfreeze();}[vD](t,r){return br(r,i=>(t(i),i))}getInternalMethods(){return {getCommandInstance:this[bD].bind(this),getContext:this[SD].bind(this),getHasOutput:this[xD].bind(this),getLoggerInstance:this[DD].bind(this),getParseContext:this[_D].bind(this),getParserConfiguration:this[Ir].bind(this),getUsageConfiguration:this[hD].bind(this),getUsageInstance:this[ED].bind(this),getValidationInstance:this[wD].bind(this),hasParseCallback:this[Pu].bind(this),isGlobalContext:this[$D].bind(this),postProcess:this[Or].bind(this),reset:this[Ph].bind(this),runValidation:this[Fh].bind(this),runYargsParserAndExecuteCommands:this[Lo].bind(this),setHasOutput:this[ID].bind(this)}}[bD](){return f(this,Re,"f")}[SD](){return f(this,Uo,"f")}[xD](){return f(this,xt,"f")}[DD](){return f(this,Dr,"f")}[_D](){return f(this,_r,"f")||{}}[ED](){return f(this,Q,"f")}[wD](){return f(this,ke,"f")}[Pu](){return !!f(this,Dt,"f")}[$D](){return f(this,Ou,"f")}[Or](t,r,i,n){return i||ve(t)||(r||(t=this[lD](t)),(this[Ir]()["parse-positional-numbers"]||this[Ir]()["parse-positional-numbers"]===void 0)&&(t=this[yD](t)),n&&(t=vr(t,this,f(this,Ct,"f").getMiddleware(),false))),t}[Ph](t={}){M(this,G,f(this,G,"f")||{});let r={};r.local=f(this,G,"f").local||[],r.configObjects=f(this,G,"f").configObjects||[];let i={};r.local.forEach(a=>{i[a]=true,(t[a]||[]).forEach(u=>{i[u]=true;});}),Object.assign(f(this,Er,"f"),Object.keys(f(this,sn,"f")).reduce((a,u)=>{let c=f(this,sn,"f")[u].filter(l=>!(l in i));return c.length>0&&(a[u]=c),a},{})),M(this,sn,{});let n=["array","boolean","string","skipValidation","count","normalize","number","hiddenOptions"],o=["narg","key","alias","default","defaultDescription","config","choices","demandedOptions","demandedCommands","deprecatedOptions"];return n.forEach(a=>{r[a]=(f(this,G,"f")[a]||[]).filter(u=>!i[u]);}),o.forEach(a=>{r[a]=Bn(f(this,G,"f")[a],u=>!i[u]);}),r.envPrefix=f(this,G,"f").envPrefix,M(this,G,r),M(this,Q,f(this,Q,"f")?f(this,Q,"f").reset(i):nD(this,f(this,K,"f"))),M(this,ke,f(this,ke,"f")?f(this,ke,"f").reset(i):uD(this,f(this,Q,"f"),f(this,K,"f"))),M(this,Re,f(this,Re,"f")?f(this,Re,"f").reset():Qx(f(this,Q,"f"),f(this,ke,"f"),f(this,Ct,"f"),f(this,K,"f"))),f(this,pt,"f")||M(this,pt,oD(this,f(this,Q,"f"),f(this,Re,"f"),f(this,K,"f"))),f(this,Ct,"f").reset(),M(this,St,null),M(this,We,""),M(this,Zn,null),M(this,xt,false),this.parsed=false,this}[kD](t,r){return f(this,K,"f").path.relative(t,r)}[Lo](t,r,i,n=0,o=false){var a,u,c,l;let d=!!i||o;t=t||f(this,Wn,"f"),f(this,G,"f").__=f(this,K,"f").y18n.__,f(this,G,"f").configuration=this[Ir]();let p=!!f(this,G,"f").configuration["populate--"],m=Object.assign({},f(this,G,"f").configuration,{"populate--":true}),h=f(this,K,"f").Parser.detailed(t,Object.assign({},f(this,G,"f"),{configuration:{"parse-positional-numbers":false,...m}})),v=Object.assign(h.argv,f(this,_r,"f")),D,b=h.aliases,U=false,H=false;Object.keys(v).forEach(B=>{B===f(this,Rt,"f")&&v[B]?U=true:B===f(this,un,"f")&&v[B]&&(H=true);}),v.$0=this.$0,this.parsed=h,n===0&&f(this,Q,"f").clearCachedHelpMessage();try{if(this[kh](),r)return this[Or](v,p,!!i,!1);f(this,Rt,"f")&&[f(this,Rt,"f")].concat(b[f(this,Rt,"f")]||[]).filter(ne=>ne.length>1).includes(""+v._[v._.length-1])&&(v._.pop(),U=!0),M(this,Ou,!1,"f");let B=f(this,Re,"f").getCommands(),A=!((a=f(this,pt,"f"))===null||a===void 0)&&a.completionKey?[(u=f(this,pt,"f"))===null||u===void 0?void 0:u.completionKey,...(l=this.getAliases()[(c=f(this,pt,"f"))===null||c===void 0?void 0:c.completionKey])!==null&&l!==void 0?l:[]].some(z=>Object.prototype.hasOwnProperty.call(v,z)):!1,O=U||A||o;if(v._.length){if(B.length){let z;for(let ne=n||0,ce;v._[ne]!==void 0;ne++)if(ce=String(v._[ne]),B.includes(ce)&&ce!==f(this,St,"f")){let be=f(this,Re,"f").runCommand(ce,this,h,ne+1,o,U||H||o);return this[Or](be,p,!!i,!1)}else if(!z&&ce!==f(this,St,"f")){z=ce;break}!f(this,Re,"f").hasDefaultCommand()&&f(this,Au,"f")&&z&&!O&&f(this,ke,"f").recommendCommands(z,B);}f(this,St,"f")&&v._.includes(f(this,St,"f"))&&!A&&(f(this,Ot,"f")&&Vn(!0),this.showCompletionScript(),this.exit(0));}if(f(this,Re,"f").hasDefaultCommand()&&!O){let z=f(this,Re,"f").runCommand(null,this,h,0,o,U||H||o);return this[Or](z,p,!!i,!1)}if(A){f(this,Ot,"f")&&Vn(!0),t=[].concat(t);let z=t.slice(t.indexOf(`--${f(this,pt,"f").completionKey}`)+1);return f(this,pt,"f").getCompletion(z,(ne,ce)=>{if(ne)throw new Ce(ne.message);(ce||[]).forEach(be=>{f(this,Dr,"f").log(be);}),this.exit(0);}),this[Or](v,!p,!!i,!1)}if(f(this,xt,"f")||(U?(f(this,Ot,"f")&&Vn(!0),d=!0,this.showHelp(z=>{f(this,Dr,"f").log(z),this.exit(0);})):H&&(f(this,Ot,"f")&&Vn(!0),d=!0,f(this,Q,"f").showVersion("log"),this.exit(0))),!d&&f(this,G,"f").skipValidation.length>0&&(d=Object.keys(v).some(z=>f(this,G,"f").skipValidation.indexOf(z)>=0&&v[z]===!0)),!d){if(h.error)throw new Ce(h.error.message);if(!A){let z=this[Fh](b,{},h.error);i||(D=vr(v,this,f(this,Ct,"f").getMiddleware(),!0)),D=this[vD](z,D??v),ve(D)&&!i&&(D=D.then(()=>vr(v,this,f(this,Ct,"f").getMiddleware(),!1)));}}}catch(B){if(B instanceof Ce)f(this,Q,"f").fail(B.message,B);else throw B}return this[Or](D??v,p,!!i,true)}[Fh](t,r,i,n){let o={...this.getDemandedOptions()};return a=>{if(i)throw new Ce(i.message);f(this,ke,"f").nonOptionCount(a),f(this,ke,"f").requiredArguments(a,o);let u=false;f(this,$r,"f")&&(u=f(this,ke,"f").unknownCommands(a)),f(this,wr,"f")&&!u?f(this,ke,"f").unknownArguments(a,t,r,!!n):f(this,kr,"f")&&f(this,ke,"f").unknownArguments(a,t,{},false,false),f(this,ke,"f").limitedChoices(a),f(this,ke,"f").implications(a),f(this,ke,"f").conflicting(a);}}[ID](){M(this,xt,true);}[Cr](t){if(typeof t=="string")f(this,G,"f").key[t]=true;else for(let r of t)f(this,G,"f").key[r]=true;}};function eD(e){return !!e&&typeof e.getInternalMethods=="function"}var HT=OD(Sh),CD=HT;var KT=Os({version:ui()});function Fu(){let e=readFileSync(new URL("../package.json",import.meta.url),"utf8");return KT.parse(JSON.parse(e)).version}var YT=Ue(`
144
+ query AuthViewer {
145
+ currentUser {
192
146
  name
147
+ email
193
148
  }
194
149
  }
195
- `),od=br(`
196
- mutation CliCreateProject($name: String!, $organizationId: String!) {
197
- createProject(cloudBaseUrl: "", name: $name, organizationId: $organizationId) {
198
- __typename
199
- ... on Project {
200
- id
201
- name
202
- }
203
- ... on LimitExceededError {
204
- message
205
- }
206
- ... on InvalidRepoLinkError {
207
- message
208
- }
209
- }
210
- }
211
- `);async function So(){let e=C(),r=P(e);r==null&&(process.stderr.write(`${kr()}
212
- `),process.exit(1));let t=((await d({config:L({serverUrl:e,token:r}),document:nd,variables:void 0})).projects??[]).map(o=>({id:o.id,name:o.name}));process.stdout.write(`${JSON.stringify({projects:t},null,2)}
213
- `)}async function xo({name:e,orgId:r}){let n=C(),t=P(n);t==null&&(process.stderr.write(`${kr()}
214
- `),process.exit(1));let o=L({serverUrl:n,token:t}),i=r??await id(o),a=(await d({config:o,document:od,variables:{name:e,organizationId:i}}).catch(l=>{throw l instanceof Hr&&(process.stderr.write(`${wr(l.message)}
215
- `),process.exit(1)),l})).createProject;if(a?.__typename!=="Project"){let l=a?.message??"unknown error";process.stderr.write(`${wr(l)}
216
- `),process.exit(1)}process.stdout.write(`${JSON.stringify({project:{id:a.id,name:a.name}},null,2)}
217
- `)}async function id(e){let n=((await d({config:e,document:td,variables:void 0})).organizations??[]).map(o=>({id:o.id,name:o.name})),t=n.length===1?n[0]:void 0;if(t!=null)return t.id;process.stderr.write(`${n.length===0?bo():vo(n)}
218
- `),process.exit(1)}import{spawnSync as je}from"child_process";function Ro(){if(je("claude",["--version"],{stdio:"ignore"}).error!=null)return{kind:"claude-missing"};je("claude",["plugin","marketplace","add","ripplo/claude-plugin"],{stdio:"ignore"});let r=je("claude",["plugin","install","ripplo@ripplo"],{encoding:"utf8",stdio:["ignore","pipe","pipe"]}),n=/already installed/i.test(`${r.stdout}${r.stderr}`);return r.status!==0&&!n?{detail:r.stderr.trim(),kind:"plugin-install-failed"}:{exitCode:je("claude",["/ripplo:setup"],{stdio:"inherit"}).status??0,kind:"launched"}}function Co(){return"Installing the Ripplo plugin for Claude Code, then handing off to a guided setup session."}function Eo(e){return e.kind==="claude-missing"?"Claude Code not found on your PATH. Install it, then re-run `npx ripplo setup`.":`Could not install the Ripplo plugin for Claude Code.${e.detail.length>0?`
219
- ${e.detail}`:""}`}function $o(){process.stdout.write(`${Co()}
220
- `);let e=Ro();e.kind!=="launched"&&(process.stderr.write(`${Eo(e)}
221
- `),process.exit(1)),process.exit(e.exitCode)}import sd from"path";import{CancellationTokenSource as ad}from"vscode-jsonrpc/node";function Me(e){return`ripplo: workspace build is stale (${e.join(", ")}) \u2014 rebuilding`}function Le(){return"ripplo: workspace build failed \u2014 fix the build, then rerun"}function te(e){return e.kind==="stale"?`! workspace build is stale (${e.packages.join(", ")}) \u2014 run pnpm build, then npx ripplo daemon restart`:e.kind==="foreign-binary"?"! this is the ripplo workspace but you're running the published CLI \u2014 use node_modules/.bin/ripplo so local changes apply":null}async function Po({all:e,headed:r,ids:n}){let t=process.cwd(),o=process.argv[1];o==null&&D(xe({kind:"spawn-failed",message:"process.argv[1] missing"})),cd();let i=await et(t);i!=null&&D(tt(i));let a=(await Qn({cliEntry:o,cwd:t})).match(p=>p,p=>D(xe(p)));a.versionNote?.kind==="stale-busy"&&D(lr(a.versionNote)),a.versionNote!=null&&process.stderr.write(`${lr(a.versionNote)}
222
- `);let l=new ad;process.once("SIGINT",()=>{l.cancel(),a.socket.destroy(),process.exit(130)});let c=sd.join(t,".ripplo","debug"),m=(await Zn({connection:a,onEvent:ld(c),request:{all:e,headed:r,tests:[...n]},token:l.token})).match(p=>p,p=>D(xe(p)));await dd({connection:a,result:m})}function ld(e){let r=!1;return n=>{let t=nt({debugDir:e,event:n});if(t!=null){if(process.stdout.isTTY&&n.kind==="run-progress"){process.stdout.write(`\r\x1B[2K${t}`),r=!0;return}r&&(process.stdout.write("\r\x1B[2K"),r=!1),process.stdout.write(`${t}
223
- `)}}}async function dd({connection:e,result:r}){await new Promise(n=>{e.socket.end(n)}),r.kind==="daemon-error"&&D(ot(r.error)),await I("first_run_finished"),process.stdout.write(`${rt(r)}
224
- `),r.failed>0&&process.exit(1),process.exit(r.notRun>0?2:0)}function D(e){process.stderr.write(`${e}
225
- `),process.exit(1)}function cd(){let e=F();if(e.kind==="fresh")return;if(e.kind==="foreign-binary"){let n=te(e);D(n??"foreign binary in the ripplo workspace")}process.stderr.write(`${Me(e.packages)}
226
- `),Se(e.workspaceRoot)||D(Le())}import B from"path";import gd from"os";import{mkdtempSync as yd,rmSync as hd}from"fs";import{err as Fe,ok as xr}from"neverthrow";import{readdir as ud,rm as pd,stat as md}from"fs/promises";import{existsSync as fd}from"fs";import vr from"path";async function Sr(e,r){let t=(await ud(e,{withFileTypes:!0}).catch(()=>[])).filter(s=>s.isDirectory()).map(s=>s.name).filter(s=>s.startsWith("replay-")||s.startsWith("explore-")||fd(vr.join(e,s,Gr)));if(t.length<=r)return;let i=(await Promise.all(t.map(async s=>({mtime:(await md(vr.join(e,s)).catch(()=>null))?.mtimeMs??0,name:s})))).toSorted((s,a)=>a.mtime-s.mtime).slice(r);await Promise.all(i.map(s=>pd(vr.join(e,s.name),{force:!0,recursive:!0}).catch(()=>{})))}var Io=50,kd=15e3,wd=15e3;async function Ao(){fe(w());let e=process.cwd(),r=G.child({worker:process.pid}),n=Rt(),t=yd(B.join(gd.tmpdir(),"ripplo-browser-cache-")),o=ke({cacheDir:t,clientVersion:w(),debugDir:B.join(e,".ripplo","debug"),headed:!1,writeOtlpPortFile:!1}),i=new Set,s=l=>{i.add(l),l.finally(()=>i.delete(l))},a=l=>{setTimeout(()=>{process.exit(l)},kd).unref(),Rd(i).then(()=>o.close().catch(()=>{})).then(()=>{hd(t,{force:!0,recursive:!0}),process.exit(l)})};bd({exit:a,workerLogger:r}),n.onRequest(ht,async(l,c)=>{let g=ft.safeParse(l);if(!g.success)return Oe("bad-run-assign");let m=g.data;ie(e);let p=y(e).match(v=>v,v=>v.kind);if(typeof p=="string")return Oe(`config:${p}`);let $=await To(n);if($.isErr())return Oe(`lockfile-unavailable:${$.error}`);let T=$.value,E=Z(T).find(v=>v.ref===m.testRef);if(E==null)return Oe(`no-test:${m.testRef}`);let me=Et({config:p,intervalMs:wd,runId:m.runId});try{let{outcome:v,persisted:er,progress:Hs}=await $t({config:p,cwd:e,errorSettle:"settle",fixturesDir:B.join(e,se),headed:m.headed,lockfile:T,onProgress:vd({connection:n,runId:m.runId}),runId:m.runId,session:o,signal:dr(c),test:E.test}),Dr=B.join(e,".ripplo","debug");return s(Promise.allSettled([er]).then(()=>Sd({config:p,debugDir:Dr,progress:Hs,runId:m.runId})).then(()=>Sr(Dr,Io)).catch(()=>{})),{outcome:mt(v),serverNotified:!0}}catch(v){let er=B.join(e,".ripplo","debug");if(s(ee({config:p,debugDir:er,runId:m.runId}).catch(()=>{})),v instanceof Br)return{outcome:{detail:v.message,kind:"infra-error"},serverNotified:!1};throw v}finally{me()}}),n.onRequest(bt,(l,c)=>Cd({connection:n,cwd:e,raw:l,session:o,token:c,track:s})),n.onNotification(vt,l=>{let c=gt.safeParse(l);c.success&&o.injectSpan(c.data.runId,c.data.span)}),n.onNotification(xt,()=>{a(0)}),n.sendNotification(yt),await new Promise(()=>{})}function bd({exit:e,workerLogger:r}){process.on("disconnect",()=>{e(1)}),process.on("unhandledRejection",n=>{r.error({err:n},"worker unhandled rejection")}),process.on("uncaughtException",n=>{r.error({err:n},"worker uncaught exception"),e(1)})}function vd({connection:e,runId:r}){return n=>{e.sendNotification(St,{runId:r,signal:n})}}async function Sd({config:e,debugDir:r,progress:n,runId:t}){n?.report({activity:{kind:"uploadingReplay"},deadlineAt:null,retry:null}),await n?.flush(),n!=null&&Pt({debugDir:r,history:n.history(),runId:t}),await ee({config:e,debugDir:r,runId:t})}function Oe(e){return{outcome:{detail:e,kind:"error"},serverNotified:!1}}var xd=5e3;async function Rd(e){e.size!==0&&await Promise.race([Promise.allSettled(e),new Promise(r=>{setTimeout(r,xd)})])}async function Cd({connection:e,cwd:r,raw:n,session:t,token:o,track:i}){let s=wt.safeParse(n);if(!s.success)return{error:{reason:"format-unsupported",source:"assignment-rejected"},kind:"error"};let{assign:a,currentTargetGeneration:l,devSessionId:c}=s.data;ie(r);let g=y(r).match(v=>v,v=>v.kind);if(typeof g=="string")return{error:{detail:g,source:"config"},kind:"error"};let m=await To(e);if(m.isErr())return{error:{source:"lockfile-stale"},kind:"error"};let p=m.value,$=await be(r);if($==null)return{error:{source:"lockfile-stale"},kind:"error"};let T=B.join(g.cwd,".ripplo","debug"),E=await It({assign:a,config:g,currentModelHash:$,currentTargetGeneration:l,debugDir:T,devSessionId:c??void 0,fixturesDir:B.join(g.cwd,se),headed:!1,lockfile:p,report:!0,session:t,signal:dr(o)}),me=(E.kind==="finding"||E.kind==="coverage-gap")&&E.runId!=null?ee({config:g,debugDir:T,runId:E.runId}):Promise.resolve();return i(me.then(()=>Sr(T,Io)).catch(()=>{})),E}async function To(e){return(await Ed(e)).andThen(n=>n.unavailable!=null?Fe(n.unavailable):n.lockfileJson==null?Fe("empty-reply"):$d(n.lockfileJson))}async function Ed(e){try{return xr(await e.sendRequest(kt))}catch(r){return Fe(`transport:${r instanceof Error?r.message:"unknown"}`)}}var Ne;function $d(e){if(Ne!==void 0&&Ne.json===e)return xr(Ne.lockfile);try{let r=ln(N(j,e));return Ne={json:e,lockfile:r},xr(r)}catch(r){return Fe(`worker-decode-failed:${r instanceof Error?r.message.slice(0,200):"unknown"}`)}}async function jo(){await Ao()}import{existsSync as Fd}from"fs";import Wd from"path";import{ok as Dd}from"neverthrow";import{gunzipSync as Pd}from"zlib";import{mkdir as Id,writeFile as Ad}from"fs/promises";import Mo from"path";import{graphql as Td}from"gql.tada";import{err as le,ok as jd}from"neverthrow";var Md=31,Ld=139;async function We(e,r){let n=y(e).match(s=>s,s=>s.kind);if(typeof n=="string")return le({detail:n,kind:"config"});let t=await d({config:n,document:Od,variables:{id:r}}).catch(()=>null);if(t==null)return le({kind:"request-failed"});if(t.run==null)return le({kind:"not-found"});if(t.run.behaviorUrl==null)return le({kind:"not-uploaded"});let o=await fetch(t.run.behaviorUrl);if(!o.ok)return le({kind:"download-failed",status:o.status});let i=Mo.join(e,".ripplo","debug",r,"behavior.jsonl");return await Id(Mo.dirname(i),{recursive:!0}),await Ad(i,Nd(Buffer.from(await o.arrayBuffer()))),jd({path:i,runId:r})}var Od=Td(`
150
+ `);async function Mo({serverUrl:e,token:t}){try{let i=(await Ae({config:{ripploServerUrl:e,token:t},document:YT,variables:void 0})).currentUser;return i==null?{kind:"rejected"}:{kind:"ok",viewer:{email:i.email,name:i.name}}}catch(r){return pm(r)==="UNAUTHENTICATED"?{kind:"rejected"}:{kind:"unreachable",message:r instanceof Error?r.message:String(r)}}}var XT="https://ripplo.ai";function Sn(){let e=Rr(),t=To(e);return t==null?null:{serverUrl:e,token:t}}function Rr(){return QT.parse(process.env).RIPPLO_SERVER_URL}function xn({serverUrl:e,token:t}){return {ripploServerUrl:e,token:t}}var QT=s.object({RIPPLO_SERVER_URL:s.string().min(1).default(XT)});var tP="behavior.jsonl";function Nh(e){return zh.join(nP(),"ripplo","runs",e)}function ju(e){return zh.join(Nh(e),tP)}function nP(){let e=process.env.XDG_CACHE_HOME;return e!=null&&e.length>0?e:zh.join(homedir(),".cache")}var sP=31,uP=139;async function RD(e){let t=Sn();if(t==null)return de({kind:"not-signed-in"});let r=await Ae({config:xn(t),document:cP,variables:{id:e}});if(r.run==null)return de({kind:"not-found"});if(r.run.behaviorUrl==null)return de({kind:"not-uploaded"});let i=await fetch(r.run.behaviorUrl);if(!i.ok)return de({kind:"download-failed",status:i.status});let n=ju(e);return await mkdir(zh.dirname(n),{recursive:true}),await writeFile(n,lP(Buffer.from(await i.arrayBuffer()))),Fe({path:n,runId:e})}var cP=Ue(`
227
151
  query RunBehaviorUrl($id: String!) {
228
152
  run(id: $id) {
229
153
  id
230
154
  behaviorUrl
231
155
  }
232
156
  }
233
- `);function Nd(e){return e[0]===Md&&e[1]===Ld?Pd(e):e}async function _(e,r){let n=Wd.join(e,".ripplo","debug",r,"behavior.jsonl");return Fd(n)?Dd(void 0):(await We(e,r)).map(()=>{})}import{existsSync as Oo,readFileSync as No}from"fs";import Fo from"path";import{err as _d,ok as Ud}from"neverthrow";import{z as Rr}from"zod";function De(e){return e.shape==="legacy"?e.title:e.action==null?e.nodeType:dn(e.action).map(r=>r.text).join(" ")}var Cr=" \u203A ",Vd=4e3,qd=5;function Wo(e,r){let n=Fo.join(e,".ripplo","debug",r,"behavior.jsonl");if(!Oo(n))return _d({kind:"run-not-found",runId:r});let t=Bd(No(n,"utf8")),o=cc(e),i=o==null?[]:yn(o),s=[...t.failedChecks.map(a=>Jd({check:a,facts:i,lockfile:o,run:t})),...t.stepErrors.map(a=>ec({event:a,run:t})),...t.findings.map(a=>rc({event:a,run:t}))];return Ud({durationMs:Math.max(0,t.lastTs-t.firstTs),failures:s,lockfileLoaded:o!=null,progress:t.progress,runId:r,stepsRan:t.stepTitles.size,viewport:t.viewport})}function Bd(e){let r=K(e),n=r.filter(l=>l.kind==="check"&&l.outcome.kind==="failed"),t=r.filter(l=>l.kind==="stepError"),o=r.filter(l=>l.kind==="finding"),i=r.flatMap(l=>Gd(l)),s=r.flatMap(l=>l.kind==="progress"?[{atMs:q(l.timeNanos),signal:l.signal}]:[]),a=r.map(l=>q(l.timeNanos));return{causes:i,failedChecks:n,findings:o,firstTs:a.length===0?0:Math.min(...a),lastTs:a.length===0?0:Math.max(...a),progress:s,stepErrors:t,stepTitles:new Map(r.flatMap(l=>l.kind==="step"?[[l.stepIndex,De(l)]]:[])),viewport:zd(r)}}var Hd=Rr.object({height:Rr.number(),width:Rr.number()});function zd(e){return e.flatMap(r=>{if(r.kind!=="rrweb"||r.event.type!==4)return[];let n=Hd.safeParse(r.event.data);return n.success?[n.data]:[]})[0]}function Gd(e){let r=Kd(e);return r==null?[]:[{detail:r,timestamp:q(e.timeNanos)}]}function Kd(e){return e.kind==="network"?{kind:"network",method:e.method,status:e.status,traceId:e.traceId,url:e.url}:e.kind==="console"?e.level==="error"||e.level==="warning"?{kind:"console",level:e.level,text:e.text}:null:e.kind==="error"?{kind:"error",message:e.message}:e.kind==="span"?{durationMs:e.durationMs,kind:"span",name:e.name,statusCode:e.status.code,traceId:e.traceId}:null}function Jd({check:e,facts:r,lockfile:n,run:t}){let o=q(e.timeNanos),i=Qd(e.origin),s=t.stepTitles.get(e.stepIndex)??String(e.stepIndex);return{browserMismatch:void 0,causes:Er(t.causes,o),error:void 0,label:Zd(e),outcome:"failed",pending:void 0,ruleKind:i,rules:tc({check:Do(e),facts:r,lockfile:n,ruleKind:i,subjectKey:Yd(e)}),runWorkflow:s.split(Cr)[0]??s,snapshotAt:o,step:s,wait:void 0,waitMs:e.waitedMs}}function Qd(e){switch(e.kind){case"fact":return"fact";case"dataRule":return"data-rule";case"step":return"step"}}function Zd(e){let r=an(e);return r??`${e.family} ${Do(e)}: ${e.outcome.kind}`}function Do(e){switch(e.family){case"element":case"content":case"scalar":case"action":return sn(e);case"state":return e.subject;case"frame":return Xd(e);case"dataRule":return e.rule}}function Xd(e){if(e.outcome.kind==="passed")return e.family;let r=e.outcome.reason;return r.kind==="wrongScalar"||r.kind==="wrongElementState"||r.kind==="wrongElementContent"?r.subject:r.kind==="wrongCount"?r.entity:`${r.entity} [${r.key}]`}function Yd(e){if(e.family==="scalar")return e.subjectKey;if(e.family!=="frame"||e.outcome.kind!=="failed")return;let r=e.outcome.reason;if(r.kind==="wrongScalar"||r.kind==="wrongElementState"||r.kind==="wrongElementContent")return r.subjectKey}function ec({event:e,run:r}){let n=q(e.timeNanos),t=r.stepTitles.get(e.stepIndex)??String(e.stepIndex);return{browserMismatch:void 0,causes:Er(r.causes,n),error:e.error,label:`driver ${e.error.kind}`,outcome:"error",pending:void 0,ruleKind:"unknown",rules:[],runWorkflow:t.split(Cr)[0]??t,snapshotAt:n,step:t,wait:void 0,waitMs:void 0}}function rc({event:e,run:r}){let n=q(e.timeNanos);return{browserMismatch:void 0,causes:Er(r.causes,n),error:void 0,label:nc(e.payload),outcome:"failed",pending:void 0,ruleKind:"unknown",rules:[],runWorkflow:e.step.split(Cr)[0]??e.step,snapshotAt:n,step:e.step,wait:void 0,waitMs:void 0}}function nc(e){switch(e.kind){case"unrunnable":return e.unmet==null?`${e.kind} ${e.reason}`:`${e.kind} ${e.reason}: ${e.unmet}`;case"impossibleAction":return`${e.kind} ${e.action}`;case"liftVisibility":return`${e.kind} ${e.subject}`}}function tc({check:e,facts:r,lockfile:n,ruleKind:t,subjectKey:o}){return t!=="fact"||n==null?[]:r.filter(i=>oc({check:e,rule:i,subjectKey:o})).map(i=>({consequence:tr(i.consequence),origins:ic(i.origin,n),url:mn(i.when),when:fn(i.when)}))}function oc({check:e,rule:r,subjectKey:n}){return n!=null?hn(r)===n:tr(r.consequence)===e}function ic(e,r){let n=Z(r),t=sc(e).flatMap(o=>{let i=n.find(s=>s.ref===o);return i==null?[]:[{intent:i.workflow.intent,sourcePath:i.workflow.sourcePath}]});return ac(t)}function sc(e){return e==null?[]:e.kind==="declared"?[]:[e.test]}function ac(e){return[...new Map(e.map(r=>[r.intent,r])).values()]}function Er(e,r){let n=e.filter(t=>t.timestamp<=r&&t.timestamp>=r-Vd).toSorted((t,o)=>o.timestamp-t.timestamp);return lc(n).toSorted((t,o)=>Number(Lo(o.detail))-Number(Lo(t.detail))).slice(0,qd).map(t=>({deltaMs:r-t.timestamp,detail:t.detail}))}function lc(e){return e.reduce((r,n)=>{let t=dc(n.detail);return r.keys.has(t)?r:{keys:new Set([...r.keys,t]),out:[...r.out,n]}},{keys:new Set,out:[]}).out}function dc(e){return e.kind==="network"?`net ${e.method} ${String(e.status)} ${e.url.split("?")[0]??""}`:e.kind==="console"?`console ${e.text}`:e.kind==="error"?`err ${e.message}`:`span ${e.name} ${e.statusCode}`}function Lo(e){return e.kind==="network"?e.status>=400:e.kind==="span"?e.statusCode==="error":!0}function cc(e){let r=Fo.join(e,".ripplo","ripplo.lock");if(!Oo(r))return null;try{return N(j,No(r,"utf8"))}catch{return null}}import{existsSync as _o,readFileSync as Uo}from"fs";import Vo from"path";import{graphql as uc}from"gql.tada";async function qo(e,r,n){let t=mc(e);return{test:t==null?void 0:await fc(n,r,t),timeline:pc(bc(e,r))}}function pc(e){return e.filter(r=>r.kind==="step").toSorted((r,n)=>r.stepIndex-n.stepIndex).map(r=>hc(r,e))}function mc(e){let r=Vo.join(e,".ripplo","ripplo.lock");return _o(r)?N(j,Uo(r,"utf8")):null}async function fc(e,r,n){let t=await d({config:e,document:vc,variables:{id:r}}).catch(()=>null);if(t?.run==null)return;let o=gc(t.run);return o!=null?Z(n).find(i=>i.ref===o)?.test:yc(n,t.run.reproJson)}function gc(e){let r=e.workflow?.slug,n=e.test?.slug;return r==null||n==null?void 0:`${r}/${n}`}function yc(e,r){if(r==null)return;let n=he(r);return n.kind==="rejected"?void 0:bn(e,{sweep:!0}).find(t=>t.name===n.repro.envelopeRef)?.test}function hc(e,r){let n=r.filter(i=>i.kind==="check"&&i.stepIndex===e.stepIndex),t=r.filter(i=>i.kind==="stepError"&&i.stepIndex===e.stepIndex),o=r.filter(i=>i.kind==="finding"&&i.stepIndex===e.stepIndex);return{changes:[...e.stateRows.flatMap(i=>kc(i)),...e.stateSingletons.flatMap(i=>wc(i))],checksHeld:n.filter(i=>i.outcome.kind==="passed").length,failures:[...n.filter(i=>i.outcome.kind==="failed").map(i=>({event:i,kind:"check"})),...t.map(i=>({event:i,kind:"stepError"})),...o.map(i=>({kind:"finding",payload:i.payload}))],index:e.stepIndex,title:De(e),url:e.pageUrl,workflow:e.sourceTest}}function kc(e){return e.status==="present"?[]:[`${e.status} ${e.entity} ${e.key}`]}function wc(e){return e.changed?[`${e.name} = ${e.value??"\u2205"}`]:[]}function bc(e,r){let n=Vo.join(e,".ripplo","debug",r,"behavior.jsonl");return _o(n)?K(Uo(n,"utf8")):[]}var vc=uc(`
234
- query ExplainRunTest($id: String!) {
235
- run(id: $id) {
157
+ `);function lP(e){return e[0]===sP&&e[1]===uP?gunzipSync(e):e}async function zu(e){let t=ju(e);return existsSync(t)?Fe(t):(await RD(e)).map(i=>i.path)}function AD(e){return e.shape==="legacy"?e.title:e.action==null?e.nodeType:Um(e.action).map(t=>t.text).join(" ")}var fP=4e3,mP=5;function PD({behaviorFile:e,runId:t}){let r=hP(readFileSync(e,"utf8")),i=[...r.failedChecks.map(n=>vP(n,r)),...r.stepErrors.map(n=>EP(n,r)),...r.findings.map(n=>wP(n,r))].toSorted((n,o)=>n.snapshotOffsetMs-o.snapshotOffsetMs);return {durationMs:Math.max(0,r.lastTs-r.firstTs),failures:i,runId:t,steps:[...r.stepTitles].map(([n,o])=>({index:n,title:o}))}}function hP(e){let t=_o(e),r=t.map(i=>dr(i.timeNanos)).filter(i=>i>0);return {causes:t.flatMap(i=>gP(i)),failedChecks:t.filter(i=>i.kind==="check"&&i.outcome.kind==="failed"),findings:t.filter(i=>i.kind==="finding"),firstTs:r.length===0?0:Math.min(...r),lastTs:r.length===0?0:Math.max(...r),stepErrors:t.filter(i=>i.kind==="stepError"),stepTitles:new Map(t.flatMap(i=>i.kind==="step"?[[i.stepIndex,AD(i)]]:[]))}}function gP(e){let t=yP(e);return t==null?[]:[{detail:t,timestamp:dr(e.timeNanos)}]}function yP(e){return e.kind==="network"?{kind:"network",method:e.method,status:e.status,traceId:e.traceId,url:e.url}:e.kind==="console"?e.level==="error"||e.level==="warning"?{kind:"console",level:e.level,text:e.text}:null:e.kind==="span"?{durationMs:e.durationMs,kind:"span",name:e.name,statusCode:e.status.code,traceId:e.traceId}:null}function vP(e,t){let r=dr(e.timeNanos);return {causes:Uh(t.causes,r),error:void 0,label:xP(e),outcome:"failed",snapshotOffsetMs:Lh(t,r),step:FD(t,e.stepIndex),stepIndex:e.stepIndex,waitMs:e.waitedMs}}function Uh(e,t){let r=e.filter(i=>i.timestamp<=t&&i.timestamp>=t-fP).toSorted((i,n)=>n.timestamp-i.timestamp);return bP(r).toSorted((i,n)=>Number(TD(n.detail))-Number(TD(i.detail))).slice(0,mP).map(i=>({deltaMs:t-i.timestamp,detail:i.detail}))}function bP(e){let t=e.toReversed().map(r=>[SP(r.detail),r]);return [...new Map(t).values()].toReversed()}function SP(e){switch(e.kind){case "network":return `net ${e.method} ${String(e.status)} ${e.url.split("?")[0]??""}`;case "console":return `console ${e.text}`;case "span":return `span ${e.name} ${e.statusCode}`}}function TD(e){switch(e.kind){case "network":return e.status>=400;case "span":return e.statusCode==="error";case "console":return true}}function xP(e){let t=Fm(e);return t??`${e.family} ${DP(e)}: ${e.outcome.kind}`}function DP(e){switch(e.family){case "element":case "content":case "scalar":case "action":return pr(e);case "state":return e.subject;case "frame":return _P(e);case "dataRule":return e.rule}}function _P(e){if(e.outcome.kind==="passed")return e.family;let t=e.outcome.reason;return t.kind==="wrongScalar"||t.kind==="wrongElementState"||t.kind==="wrongElementContent"?t.subject:t.kind==="wrongCount"?t.entity:`${t.entity} [${t.key}]`}function Lh(e,t){return Math.max(0,t-e.firstTs)}function FD(e,t){return e.stepTitles.get(t)??String(t)}function EP(e,t){let r=dr(e.timeNanos);return {causes:Uh(t.causes,r),error:e.error,label:`driver ${e.error.kind}`,outcome:"error",snapshotOffsetMs:Lh(t,r),step:FD(t,e.stepIndex),stepIndex:e.stepIndex,waitMs:void 0}}function wP(e,t){let r=dr(e.timeNanos);return {causes:Uh(t.causes,r),error:void 0,label:$P(e.payload),outcome:"failed",snapshotOffsetMs:Lh(t,r),step:e.step,stepIndex:e.stepIndex,waitMs:void 0}}function $P(e){switch(e.kind){case "unrunnable":return e.unmet==null?`${e.kind} ${e.reason}`:`${e.kind} ${e.reason}: ${e.unmet}`;case "impossibleAction":return `${e.kind} ${e.action}`;case "liftVisibility":return `${e.kind} ${e.subject}`}}function Nu(e){switch(e.kind){case "not-signed-in":return Ar();case "not-found":return "No run with that id.";case "not-uploaded":return "This run has no uploaded artifacts yet. It may still be running.";case "download-failed":return `Download failed (HTTP ${String(e.status)}). The link may have expired, try again.`}}function Ar(){return "Not signed in. Run `npx ripplo login` first."}async function jD({runId:e}){let t=await zu(e);t.isErr()&&(process.stderr.write(`${Nu(t.error)}
158
+ `),process.exit(1));let r=PD({behaviorFile:t.value,runId:e});process.stdout.write(`${JSON.stringify(r,null,2)}
159
+ `);}function zD(e){return `No code review with id ${e}, or you do not have access to it.`}function ND(e){return `Code review ${e} has no published attempt yet. Wait for the review to finish.`}var kP=Ue(`
160
+ query CliCodeReviewIssues($id: String!) {
161
+ codeReview(id: $id) {
236
162
  id
237
- reproJson
238
- test {
239
- id
240
- slug
241
- }
242
- workflow {
243
- id
163
+ title
164
+ verdict
165
+ prUrl
166
+ declaredGaps {
244
167
  slug
168
+ workflow
169
+ blockedBy
245
170
  }
246
- }
247
- }
248
- `);var Bo=" \u203A ",Sc=["fact ","data rule ","step "];function Go(e){if(e.failures.length===0)return xc(e);let r=e.viewport==null?"":` (viewport ${String(e.viewport.width)}\xD7${String(e.viewport.height)})`,n=`${e.runId} \u2014 ${M(e.failures.length,"failing check")}${r}`,t=e.lockfileLoaded?[]:[u.dim("(no lockfile \u2014 workflow source unavailable)")],o=e.progress.at(-1),i=o==null?[]:[u.dim(`last progress \u2014 ${sr(o.signal)}`)],s=Rc(e.failures).map(a=>Cc(a,e.runId));return[n,...t,...i,"",...s,x("tasks")].join(`
249
- `)}function Ko(e){return`${u.bad("fail")} \u2014 no artifacts for ${e.runId}. Run \`npx ripplo pull ${e.runId}\` first.`}function xc(e){if(e.stepsRan>0)return`${u.good("ok")} \u2014 ${e.runId}: no failing checks.`;let r=e.progress.at(-1),n=r==null?"":` It stopped at: ${sr(r.signal)}.`;return`${e.runId}: no steps ran, so there are no checks to explain.${n} A run that ends this early failed before its first step \u2014 setup, sign-in, or reaching your app. The reason is on the run itself, not in this artifact.`}function Rc(e){return[...new Set(e.map(n=>n.step))].map(n=>({failures:e.filter(t=>t.step===n),step:n}))}function Cc(e,r){let n=e.failures[0];if(n==null)return"";let t=Ec(e,r);if(t!=null)return t;let o=[...new Set(e.failures.map(s=>s.error==null?Qo(s.label):Q(s.error)))].join(", "),i=u.dim(`(${n.runWorkflow})`);return[`${u.bad("\u2717")} ${Pc(e.step)} ${i}`,` ${u.dim("failed")} ${o}`,...Ic(e),...Mc(n),...Lc(n.causes),` ${u.dim("frame")} npx ripplo snapshot ${r} --at ${String(n.snapshotAt)}`,""].join(`
250
- `)}function Ec(e,r){let n=e.failures[0],t=e.failures.flatMap(c=>c.browserMismatch==null?[]:[c.browserMismatch])[0],o=Jo(e.failures.flatMap(c=>c.rules));if(n==null||t==null||o.length===0)return null;let i=Qo(e.failures.find(c=>c.rules.length>0)?.label??n.label),s=[...new Set(o.map(c=>c.url))].join(", "),a=u.dim(`(${n.runWorkflow})`);return[`${u.bad("\u2717")} ${i} ${u.warn("(wrong page)")} ${a}`,` ${u.dim("rule declared for url")} ${s}`,` ${u.dim("browser was actually at")} ${t.actual}`,` ${u.warn("\u21B3 declare the navigation: add url.path`...` to the step that caused it")}`,` ${u.dim("frame")} npx ripplo snapshot ${r} --at ${String(n.snapshotAt)}`,""].join(`
251
- `)}function Jo(e){let r=e.map(n=>[$c(n),n]);return[...new Map(r).values()]}function $c(e){return`${e.url}|${e.when}|${e.origins.map(r=>r.intent).join(",")}`}function Qo(e){let r=Sc.find(n=>e.startsWith(n));return r==null?e:e.slice(r.length)}function Pc(e){let r=e.split(Bo);return r.length<2?e:r.slice(1).join(Bo)}function Ic(e){let r=Jo(e.failures.flatMap(n=>n.rules));return r.length===0?[]:[...r.flatMap(n=>Ac(n)),...jc(e,r)]}function Ac(e){let r=e.origins.length===0?u.dim("origin not in lockfile"):e.origins.map(n=>Tc(n)).join(", ");return[` ${u.dim("workflow declaration")}`,` ${u.dim("from")} ${r}`,` ${u.dim("at")} ${e.url} ${u.dim("\u2014 holds only when")} ${e.when}`]}function Tc(e){if(e.sourcePath==null)return e.intent;let r=u.dim(`(${e.sourcePath})`);return`${e.intent} ${r}`}function jc(e,r){let n=new Set(r.flatMap(o=>o.origins.map(i=>i.intent)));return e.failures.some(o=>n.has(o.runWorkflow))||n.size===0?[]:[` ${u.warn("\u21B3 declared by another workflow \u2014 this declaration may be missing distinguishing state")}`]}function Mc(e){if(e.waitMs==null||e.wait==null)return[];let r=`${String(Math.round(e.waitMs/1e3))}s`,n=e.pending===!0?" \u2014 value never changed (write may be slow or dropped)":"";return[` ${u.dim("waited")} up to ${r} (wait: ${e.wait})${n}`]}function Lc(e){if(e.length===0)return[];let r=Oc(e),n=e.flatMap(t=>Nc(t,r));return n.length===0?[]:[` ${u.dim("nearby")} ${n.join(" \xB7 ")}`]}function Oc(e){let r=e.flatMap(n=>n.detail.kind==="span"&&n.detail.traceId!=null?[[n.detail.traceId,n.detail]]:[]);return new Map(r)}function Nc(e,r){let n=e.detail;if(n.kind==="span"&&n.traceId!=null&&r.has(n.traceId))return[];if(n.kind==="network"&&n.traceId!=null){let t=r.get(n.traceId),o=t==null?"":` \u21B9 ${$r(t)}`;return[zo(n,`${$r(n)}${o}`)]}return[zo(n,$r(n))]}function $r(e){return e.kind==="network"?`${e.method} ${String(e.status)} ${Fc(e.url)}`:e.kind==="console"?`console.${e.level} ${Ho(e.text)}`:e.kind==="error"?`error ${Ho(e.message)}`:`span ${e.name} ${e.statusCode} ${String(Math.round(e.durationMs))}ms`}function Fc(e){let r=e.split("?")[0]??e;return r.length>60?`\u2026${r.slice(-57)}`:r}function Ho(e){let r=e.replaceAll(/\s+/g," ").trim();return r.length>100?`${r.slice(0,97)}\u2026`:r}function zo(e,r){return Wc(e)?u.bad(r):r}function Wc(e){return e.kind==="network"?e.status>=400:e.kind==="console"?e.level==="error":e.kind==="error"||e.statusCode==="error"}function Zo(e){return[Dc(e.test),"",Uc(e.factOrigins),Vc(e.timeline,e.factOrigins)].filter(r=>r.length>0).join(`
252
- `)}function Dc(e){return e==null?u.dim("starting state (couldn't resolve the run's test \u2014 offline, or it left the model)"):["starting state",...[` - ${String(e.startingState.operations.length)} setup operations`,` - ${String(e.startingState.constraints.length)} state constraints`,` - actor: ${_c(e)}`]].join(`
253
- `)}function _c(e){return e.actor.kind==="user"?`signed in as ${e.actor.alias}`:"signed out"}function Uc(e){return e.length===0?"":["facts checked here were declared in",...e.map(n=>` - ${n}`),""].join(`
254
- `)}function Vc(e,r){return e.length===0?u.dim("timeline (no steps captured)"):["what happened, step by step",...e.map(t=>qc(t,r))].join(`
255
- `)}function qc(e,r){let n=` ${String(e.index+1)}. ${e.title}${Bc(e.workflow)}${Hc(e.url)}`,t=e.changes.length===0?[]:[` \u0394 ${e.changes.join(", ")}`],o=e.failures.map(s=>` ${u.bad("\u2717")} ${zc(s,r)}`),i=e.checksHeld===0?[]:[u.dim(` ${String(e.checksHeld)} checks held`)];return[n,...t,...o,...i].join(`
256
- `)}function Bc(e){if(e==null)return"";let r=`(${e})`;return` ${u.dim(r)}`}function Hc(e){if(e==null)return"";let r=`@ ${e}`;return` ${u.dim(r)}`}function zc(e,r){switch(e.kind){case"check":{let n=e.event.origin.kind==="fact"?Gc(r):"";return`${wn(e.event)}${n}`}case"stepError":return`run error \u2014 ${Q(e.event.error)}`;case"finding":return Kc(e.payload)}}function Gc(e){if(e.length===0)return"";let r=`(fact from ${e.join(", ")})`;return` ${u.dim(r)}`}function Kc(e){switch(e.kind){case"unrunnable":{let r=e.unmet==null?"":`: needs ${e.unmet}`;return`couldn't run \u2014 ${e.reason}${r}`}case"impossibleAction":return`impossible action: ${e.action} on ${e.subject}`;case"liftVisibility":{let r=String(e.visibleIndex+1),n=String(e.declaredIndex+1);return`${e.subject} visible by step ${r} but declared at step ${n}`}}}function Xo(e){return`Saved behavior.jsonl to ${e.path}`}function U(e){switch(e.kind){case"config":return`Can't read project config (${e.detail}). Run this from your project root.`;case"request-failed":return"Couldn't reach the server. Check you're signed in with `npx ripplo auth`.";case"not-found":return"No run with that id.";case"not-uploaded":return"This run has no uploaded artifacts yet \u2014 it may still be running, or predates artifact upload.";case"download-failed":return`Download failed (HTTP ${String(e.status)}). The link may have expired \u2014 try again.`}}async function Yo({full:e,json:r,runId:n}){let t=process.cwd(),o=await _(t,n);o.isErr()&&(process.stderr.write(`${U(o.error)}
257
- `),process.exit(1));let i=Wo(t,n).match(s=>s,s=>(process.stderr.write(`${Ko(s)}
258
- `),process.exit(1)));process.stdout.write(`${r?JSON.stringify(i,null,2):Go(i)}
259
- `),e&&!r&&await Jc(t,n,Qc(i))}async function Jc(e,r,n){let t=y(e).unwrapOr(void 0);if(t==null)return;let o=await qo(e,r,t);process.stdout.write(`
260
- ${Zo({...o,factOrigins:n})}
261
- `)}function Qc(e){let r=e.failures.filter(n=>n.ruleKind==="fact").flatMap(n=>n.rules).flatMap(n=>n.origins).map(n=>n.sourcePath==null?n.intent:`${n.intent} (${n.sourcePath})`);return[...new Set(r)]}async function ei({runId:e}){(await We(process.cwd(),e)).match(n=>{process.stdout.write(`${Xo(n)}
262
- `)},n=>{process.stderr.write(`${U(n)}
263
- `),process.exit(1)})}import{randomUUID as Zc}from"crypto";import{existsSync as Xc,readFileSync as Yc}from"fs";import Pr from"path";import{graphql as ni}from"gql.tada";import{err as _e,ok as ri}from"neverthrow";async function ti(e,r,n){let t=eu(e);if(t.kind==="error")return _e(t.error);let o=t.config,i=await ge(e);if(i.result.isErr())return _e({kind:"compile-failed"});let s=await ru({config:o,runId:r});if(s.kind==="error")return _e(s.error);let{repro:a,reproJson:l}=s,c=await X(e,i.result.value),g=Mn(c);await jn({config:o,cwd:e,lockfile:c});let m=`replay-${Zc()}`,p=Pr.join(e,".ripplo","debug"),$=[],T=ke({cacheDir:void 0,clientVersion:w(),debugDir:p,headed:!1,writeOtlpPortFile:!1});try{let E=await $n({capture:!0,lockfile:c,options:{baseUrl:o.appUrl,engineUrl:o.engineUrl,fixturesDir:Pr.join(e,se),generate:nn,headed:!1,secret:o.webhookSecret},repro:a,runId:m,session:T,signal:n,onEvent:v=>{$.push(v)}});return(await tu({config:o,debugDir:p,events:$,lockfileHash:g,outcome:E,replayRunId:m,reproJson:l,stepSources:nu({lockfile:c,repro:a})})).map(()=>({outcome:E,recordingCaptured:ou(p,m),replayRunId:m}))}finally{await T.close()}}function eu(e){return y(e).match(r=>({config:r,kind:"found"}),r=>({error:{detail:r.kind,kind:"config"},kind:"error"}))}async function ru({config:e,runId:r}){let n=await d({config:e,document:iu,variables:{id:r}}).catch(()=>null);if(n==null)return{error:{kind:"request-failed"},kind:"error"};if(n.run==null)return{error:{kind:"not-found"},kind:"error"};let t=n.run.reproJson;if(t==null)return{error:{kind:"no-repro"},kind:"error"};let o=he(t);return o.kind==="rejected"?{error:{kind:"stale-repro",reason:"format-unsupported"},kind:"error"}:{kind:"found",repro:o.repro,reproJson:t}}function nu({lockfile:e,repro:r}){let n=gn(e);return r.steps.map(t=>n.find(o=>o.id===t.transitionId)?.test??null)}async function tu({config:e,debugDir:r,events:n,lockfileHash:t,outcome:o,replayRunId:i,reproJson:s,stepSources:a}){if(o.kind!=="resolved"&&o.kind!=="still-fails")return ri(void 0);try{return await d({config:e,document:su,variables:{lockfileHash:t,projectId:e.projectId,reproJson:s,runId:i}}),await Ct({config:e,debugDir:r,events:n,recordingOptional:!0,runId:i,stepSources:a}),await ee({config:e,debugDir:r,runId:i}),ri(void 0)}catch{return _e({kind:"report-failed"})}}function ou(e,r){let n=Pr.join(e,r,"behavior.jsonl");return Xc(n)?Yc(n,"utf8").split(`
264
- `).some(t=>t.includes('"kind":"rrweb"')):!1}var iu=ni(`
265
- query RunRepro($id: String!) {
266
- run(id: $id) {
267
- id
268
- reproJson
269
- }
270
- }
271
- `),su=ni(`
272
- mutation CreateReplayRun(
273
- $projectId: String!
274
- $runId: String!
275
- $reproJson: String
276
- $lockfileHash: String!
277
- ) {
278
- createExploreRun(
279
- projectId: $projectId
280
- runId: $runId
281
- reproJson: $reproJson
282
- lockfileHash: $lockfileHash
283
- ) {
284
- id
285
- }
286
- }
287
- `);function oi({outcome:e,recordingCaptured:r,replayRunId:n}){let t=au(e);if(e.kind!=="resolved"&&e.kind!=="still-fails")return t;let o=r?"":"\n! No page recording was captured \u2014 the page may never have loaded. Treat this verdict with suspicion and confirm with `npx ripplo run`.",i=e.kind==="resolved"?`
288
- ! A clean replay confirms the fix but doesn't explain the original failure. Classify the root cause \u2014 app bug or model gap \u2014 before you resolve. Don't file it as flake unless you know why it flaked.`:"";return`${t}${o}${i}
289
- Replay run ${n} \u2014 snapshot it, or cite it as resolve proof: \`npx ripplo tasks resolve <id> --run ${n}\`.`}function au(e){switch(e.kind){case"resolved":return"\u2713 Resolved \u2014 the finding's trail ran clean.";case"still-fails":return`\u2717 Still failing \u2014 ${M(e.contradictions.length,"check")} still mismatch.`;case"unplannable":return"! Model changed \u2014 this trail's base state or actions no longer exist. Use `npx ripplo compile` and `npx ripplo run`.";case"state-unavailable":return`! Couldn't run the trail (${e.reason}).`;case"aborted":return"Replay aborted."}}function ii(e){switch(e.kind){case"config":return`Can't read project config (${e.detail}). Run from your project root.`;case"compile-failed":return"Couldn't compile the local `.ripplo/` model. Run `npx ripplo compile` first.";case"request-failed":return"Couldn't reach the server. Check you're signed in with `npx ripplo auth`.";case"not-found":return"No run with that id.";case"no-repro":return"This run has no replayable trail \u2014 predates repro capture, or isn't an explore finding.";case"report-failed":return"The replay finished but couldn't be registered with the server, so its id won't work as resolve proof. Check you're signed in, then rerun `npx ripplo replay`.";case"stale-repro":return"This finding uses an older explorer trail format and cannot be replayed. Let the explorer reconcile stale findings."}}function si(e){return e.kind==="resolved"}async function ai({runId:e}){(await ti(process.cwd(),e,new AbortController().signal)).match(n=>{process.stdout.write(`${oi(n)}
290
- `),process.exit(si(n.outcome)?0:1)},n=>{process.stderr.write(`${ii(n)}
291
- `),process.exit(1)})}import ui from"path";import{existsSync as fu}from"fs";import{writeFile as li}from"fs/promises";import di from"path";import{err as ce,ok as gu}from"neverthrow";import{readFile as lu}from"fs/promises";import{z as de}from"zod";var du={height:800,width:1280};async function Ue(e){let r=await lu(e,"utf8");return K(r).flatMap(n=>n.kind==="rrweb"?[n.event]:[])}var cu=de.object({data:de.looseObject({height:de.number(),width:de.number()}),type:de.literal(4)});function oe(e){let r=e.flatMap(n=>{let t=cu.safeParse(n);return t.success?[t.data]:[]})[0];return r==null?du:{height:r.data.height,width:r.data.width}}var uu='<svg xmlns="http://www.w3.org/2000/svg" width="17" height="22" viewBox="0 0 17 22"><path d="M1 1 L1 17 L5.4 12.8 L8.5 20 L11 19 L8 11.8 L14 11.8 Z" fill="black" stroke="white" stroke-width="1.3"/></svg>',pu=`.replayer-mouse-tail { display: none; }
292
- .replayer-mouse {
293
- position: absolute;
294
- width: 17px;
295
- height: 22px;
296
- z-index: 9999;
297
- background-repeat: no-repeat;
298
- background-size: contain;
299
- background-image: url('data:image/svg+xml;utf8,${uu}');
300
- }`,mu=".replayer-mouse, .replayer-mouse-tail { display: none; }";function Ve(e){return`<!doctype html><html><head><style>
301
- html, body { margin: 0; padding: 0; }
302
- .replayer-wrapper { position: relative; }
303
- ${e?pu:mu}
304
- iframe { border: none; }
305
- </style></head><body></body></html>`}function qe(){return`(() => {
306
- const doc = document.querySelector(".replayer-wrapper iframe")?.contentDocument;
307
- if (doc == null || doc.querySelector("style[data-ripplo-replay-styles]") != null) {
308
- return;
309
- }
310
- const style = doc.createElement("style");
311
- style.setAttribute("data-ripplo-replay-styles", "");
312
- style.textContent = ${JSON.stringify(un.join(`
313
- `))};
314
- (doc.head ?? doc.documentElement).appendChild(style);
315
- })()`}function Be(){return`(async () => {
316
- const doc = document.querySelector(".replayer-wrapper iframe")?.contentDocument;
317
- if (doc?.fonts != null) {
318
- await doc.fonts.ready;
319
- }
320
- await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));
321
- })()`}function He(){return import("playwright").then(({chromium:e})=>e.launch({args:["--no-sandbox"],headless:!0})).catch(()=>null)}var ze=Rn(xn("@ripplo/rrweb-bundle/replay","rrweb-replay.js"));async function ci({jsonlPath:e,moment:r,outDir:n,runId:t}){if(!fu(e))return ce({kind:"run-not-found",runId:t});let o=await Ue(e),i=o[0],s=o.at(-1);if(i==null||s==null)return ce({kind:"no-rrweb-events",runId:t});let a=s.timestamp-i.timestamp,l=r.kind==="offset"?r.offsetMs:r.at-i.timestamp;if(l<0)return ce({durationMs:a,firstTimestamp:i.timestamp,kind:"moment-out-of-range",lastTimestamp:s.timestamp,moment:r});let c=Math.min(l,a),g=String(Math.round(c)),m=di.join(n,`snapshot-${g}ms.png`),p=di.join(n,`snapshot-${g}ms.html`);return(await yu({events:o,htmlPath:p,offsetMs:c,pngPath:m})).map(()=>({durationMs:a,htmlPath:p,offsetMs:c,pngPath:m,viewport:oe(o)}))}async function yu({events:e,htmlPath:r,offsetMs:n,pngPath:t}){let o=await He();if(o==null)return ce({detail:"chromium launch",kind:"browser-failed"});try{let{html:i,png:s}=await hu({browser:o,events:e,offsetMs:n});return await li(t,s),await li(r,i,"utf8"),gu(void 0)}catch(i){return ce({detail:i instanceof Error?i.message:String(i),kind:"browser-failed"})}finally{await o.close()}}async function hu({browser:e,events:r,offsetMs:n}){let t=oe(r),o=await e.newPage({viewport:t});await o.setContent(Ve(!1)),await o.addScriptTag({content:await ze()}),await o.evaluate(ku({events:r,offsetMs:n})),await o.evaluate(qe()),await o.evaluate(Be());let i=o.locator(".replayer-wrapper iframe").first(),a=await(await i.count()>0?i:o).screenshot({type:"png"});return{html:await o.evaluate(wu()),png:a}}function ku({events:e,offsetMs:r}){return`(() => {
322
- const replayer = new globalThis.__RipploReplayer(${JSON.stringify(e)}, {
323
- mouseTail: false,
324
- root: document.body,
325
- showWarning: false,
326
- });
327
- replayer.pause(${String(r+.5)});
328
- globalThis.__ripploSnapshotReplayer = replayer;
329
- })()`}function wu(){return`(() => {
330
- const replayer = globalThis.__ripploSnapshotReplayer;
331
- if (replayer == null) {
332
- return "";
333
- }
334
- const mirror = replayer.getMirror();
335
- const iframe = document.querySelector(".replayer-wrapper iframe");
336
- const doc = iframe == null ? null : iframe.contentDocument;
337
- if (doc == null) {
338
- return "";
339
- }
340
- Array.from(doc.querySelectorAll("*")).forEach((el) => {
341
- const id = mirror.getId(el);
342
- if (id != null && id > 0) {
343
- el.setAttribute("data-rrweb-id", String(id));
344
- }
345
- });
346
- return "<!doctype html>\\n" + doc.documentElement.outerHTML;
347
- })()`}function pi({cwd:e,moment:r,runId:n}){let t=ui.join(e,".ripplo","debug",n);return ci({jsonlPath:ui.join(t,"behavior.jsonl"),moment:r,outDir:t,runId:n})}function mi(e){return[`${u.good("ok")} \u2014 rendered the page at ${String(Math.round(e.offsetMs))}ms into the recording (duration ${String(Math.round(e.durationMs))}ms, viewport ${String(e.viewport.width)}\xD7${String(e.viewport.height)})`,e.pngPath,"Read the PNG above to see the page state. Layout and text are faithful \u2014 URL-referenced images may be blank if the dev server is down.",e.htmlPath,"The HTML is the same frame with every element tagged `data-rrweb-id`. Grep it for your element's class or text to get the id for `tasks comment --element`."].join(`
348
- `)}function fi(e){return`${u.bad("fail")} \u2014 ${bu(e)}`}function gi(){return`${u.bad("fail")} \u2014 pass exactly one of --at <epoch-ms from behavior.jsonl> or --offset <ms from the start of the recording>.`}function bu(e){switch(e.kind){case"run-not-found":return`no debug artifacts for run ${e.runId} (.ripplo/debug/${e.runId}/behavior.jsonl missing). ${x("run")}`;case"no-rrweb-events":return`run ${e.runId} has a behavior.jsonl but no rrweb events \u2014 nothing to replay.`;case"moment-out-of-range":return`${e.moment.kind==="offset"?"--offset":"--at"} is outside the recording, which spans ${String(e.firstTimestamp)}\u2013${String(e.lastTimestamp)} (duration ${String(e.durationMs)}ms). Pass --at <epoch-ms from behavior.jsonl> or --offset <0\u2013${String(e.durationMs)}>.`;case"browser-failed":return`replay browser failed (${e.detail}). Is chromium installed? Try \`npx playwright install chromium\`.`}}async function yi({at:e,offset:r,runId:n}){let t=vu({at:e,offset:r});t==null&&(process.stderr.write(`${gi()}
349
- `),process.exit(1));let o=await _(process.cwd(),n);o.isErr()&&(process.stderr.write(`${U(o.error)}
350
- `),process.exit(1)),(await pi({cwd:process.cwd(),moment:t,runId:n})).match(s=>{process.stdout.write(`${mi(s)}
351
- `)},s=>{process.stderr.write(`${fi(s)}
352
- `),process.exit(1)})}function vu({at:e,offset:r}){if(e!=null&&r==null)return{at:e,kind:"absolute"};if(r!=null&&e==null)return{kind:"offset",offsetMs:r}}import wi from"path";import{spawn as Su}from"child_process";import{existsSync as xu}from"fs";import{mkdtemp as Ru,rm as Cu,writeFile as Eu}from"fs/promises";import $u from"os";import Ge from"path";import{err as H,ok as hi}from"neverthrow";var Ke=12;async function ki({ffmpegPath:e,jsonlPath:r,outDir:n,runId:t}){if(!xu(r))return H({kind:"run-not-found",runId:t});let o=await Ue(r),i=o[0],s=o.at(-1);if(i==null||s==null)return H({kind:"no-rrweb-events",runId:t});let a=s.timestamp-i.timestamp,l=Pu(a),c=Ge.join(n,"replay.mp4"),g=await Ru(Ge.join($u.tmpdir(),"ripplo-video-"));try{let m=await Iu({events:o,framesDir:g,offsets:l});return m.isErr()?H(m.error):(await Lu({ffmpegPath:e,framesDir:g,mp4Path:c})).map(()=>({durationMs:a,frameCount:l.length,mp4Path:c,viewport:oe(o)}))}finally{await Cu(g,{force:!0,recursive:!0})}}function Pu(e){let r=1e3/Ke,n=Math.max(1,Math.floor(e/r)+1);return Array.from({length:n},(t,o)=>Math.min(o*r,e))}async function Iu({events:e,framesDir:r,offsets:n}){let t=await He();if(t==null)return H({detail:"chromium launch",kind:"browser-failed"});try{return await Au({browser:t,events:e,framesDir:r,offsets:n}),hi(void 0)}catch(o){return H({detail:o instanceof Error?o.message:String(o),kind:"browser-failed"})}finally{await t.close()}}async function Au({browser:e,events:r,framesDir:n,offsets:t}){let o=await e.newPage({viewport:oe(r)});await o.setContent(Ve(!0)),await o.addScriptTag({content:await ze()}),await o.evaluate(Tu(r)),await o.evaluate(Be());let i=o.locator(".replayer-wrapper").first(),s=await i.count()>0?i:o;await t.reduce(async(a,l,c)=>{await a,await o.evaluate(ju(l)),await o.evaluate(qe());let g=await s.screenshot({type:"png"});await Eu(Ge.join(n,Mu(c)),g)},Promise.resolve())}function Tu(e){return`(() => {
353
- const replayer = new globalThis.__RipploReplayer(${JSON.stringify(e)}, {
354
- mouseTail: false,
355
- root: document.body,
356
- showWarning: false,
357
- });
358
- replayer.pause(0.5);
359
- globalThis.__ripploVideoReplayer = replayer;
360
- })()`}function ju(e){return`globalThis.__ripploVideoReplayer.pause(${String(e+.5)})`}function Mu(e){return`frame-${String(e).padStart(5,"0")}.png`}async function Lu({ffmpegPath:e,framesDir:r,mp4Path:n}){try{let{code:t,stderr:o}=await Ou({ffmpegPath:e,framesDir:r,mp4Path:n});return t===0?hi(void 0):H({detail:o.trim().slice(-400),kind:"encode-failed"})}catch(t){return H({detail:t instanceof Error?t.message:String(t),kind:"encode-failed"})}}function Ou({ffmpegPath:e,framesDir:r,mp4Path:n}){return new Promise((t,o)=>{let i=["-y","-framerate",String(Ke),"-i",Ge.join(r,"frame-%05d.png"),"-c:v","libx264","-pix_fmt","yuv420p","-vf","pad=ceil(iw/2)*2:ceil(ih/2)*2",n],s=Su(e,i,{stdio:["ignore","ignore","pipe"]}),a=[];s.stderr.on("data",l=>a.push(l)),s.on("error",o),s.on("close",l=>{t({code:l,stderr:Buffer.concat(a).toString("utf8")})})})}import bi from"ffmpeg-static";import{err as Nu}from"neverthrow";async function vi({cwd:e,runId:r}){if(bi==null)return Nu({kind:"ffmpeg-missing"});let n=wi.join(e,".ripplo","debug",r);return ki({ffmpegPath:bi,jsonlPath:wi.join(n,"behavior.jsonl"),outDir:n,runId:r})}function Si(e){return[`${u.good("ok")} \u2014 rendered ${String(e.frameCount)} frames at ${String(Ke)} fps (duration ${String(Math.round(e.durationMs))}ms, viewport ${String(e.viewport.width)}\xD7${String(e.viewport.height)})`,e.mp4Path,"The MP4 covers the whole recording. Layout and text are faithful \u2014 URL-referenced images may be blank if the dev server is down."].join(`
361
- `)}function xi(e){return`${u.bad("fail")} \u2014 ${Fu(e)}`}function Fu(e){switch(e.kind){case"run-not-found":return`no debug artifacts for run ${e.runId} (.ripplo/debug/${e.runId}/behavior.jsonl missing). ${x("run")}`;case"no-rrweb-events":return`run ${e.runId} has a behavior.jsonl but no rrweb events \u2014 nothing to replay.`;case"browser-failed":return`replay browser failed (${e.detail}). Is chromium installed? Try \`npx playwright install chromium\`.`;case"encode-failed":return`ffmpeg failed to encode the video (${e.detail}).`;case"ffmpeg-missing":return"the bundled ffmpeg has no binary for this platform. Install ffmpeg and set FFMPEG_BIN to its path."}}async function Ri({runId:e}){let r=await _(process.cwd(),e);r.isErr()&&(process.stderr.write(`${U(r.error)}
362
- `),process.exit(1)),(await vi({cwd:process.cwd(),runId:e})).match(t=>{process.stdout.write(`${Si(t)}
363
- `)},t=>{process.stderr.write(`${xi(t)}
364
- `),process.exit(1)})}function Ci(e,r){switch(e.kind){case"config-failed":return S(e.failure);case"compile-failed":return Y(e.error);case"no-test":return`test "${e.ref}" not found \u2014 run npx ripplo compile to see available tests`;case"unplannable":return"the recorded walk no longer matches the model \u2014 run npx ripplo compile, then re-run";case"run-failed":return`teleport failed before reaching the step: ${Q(e.error)}`;case"done":return Wu(e.result,r)}}function Ei(e){return e.kind==="done"&&e.result.kind==="handed-over"}function $i(e,r){return`landed at step ${String(e)} of ${r} \u2014 close the window to tear down`}function Wu(e,r){return e.kind==="failed"?`couldn't reach the step \u2014 the run failed first.
365
-
366
- ${e.contradictions.map(t=>kn({contradiction:t,evidencePath:void 0})).join(`
367
-
368
- `)}`:`torn down \u2014 teleport session for ${r} ended`}async function Pi({ref:e,step:r}){let n=new AbortController;process.once("SIGINT",()=>{n.abort()});let t=()=>{process.stdout.write(`${$i(r,e)}
369
- `)},o=await At({cwd:process.cwd(),onReady:t,signal:n.signal,step:r,target:{kind:"test",ref:e}});process.stdout.write(`${Ci(o,e)}
370
- `),process.exit(Ei(o)?0:1)}import Ii from"path";import{randomUUID as Du}from"crypto";async function Ai({cwd:e,onReady:r,signal:n}){let t=y(e).match(s=>s,s=>s.kind);if(typeof t=="string")return{detail:t,kind:"config-failed"};let o=`capture-${Du()}`;return(await Cn({clientVersion:w(),debugDir:Ii.join(t.cwd,".ripplo","debug"),onReady:r,profileDir:Ii.join(t.cwd,".ripplo",".local","capture-profile"),runId:o,startUrl:t.appUrl},n)).match(s=>({behaviorPath:s.behaviorPath,kind:"done",runId:o}),s=>({error:s,kind:"run-failed"}))}function Ti(){return"Capturing. Sign in if needed, click through your flow, then press Ctrl-C here to finish. Your login is remembered for next time."}function ji(e){return e.kind==="config-failed"?`Could not read project config: ${e.detail}`:e.kind==="run-failed"?"Capture failed to start. Could not launch the browser.":_u(e.behaviorPath,e.runId)}function Mi(e){return e.kind==="done"}function _u(e,r){return[`Capture saved to ${e}`,"","Paste this to Claude Code to model the journey:",""," Load /ripplo:create. Turn this session into one critical Ripplo user journey under .ripplo/workflows/.","",` 1. Run \`npx ripplo clickpath ${r}\`. Name the user's intent, natural entry point, and actions that belong to that intent. Omit capture detours that are not part of the journey.`,` 2. Read ${e} for state-source requests and spans. Add only relevant paths to .ripplo/state.ts. Write the widest starting-state constraints valid for the whole journey.`," 3. Keep state-rendered values connected through handles and arbitrary(field). Use exact(value) only when the literal drives behavior."," 4. Declare every visible outcome and complete state effect, including cascades. Make every effect provably change state."," 5. Run `npx ripplo compile`, complete the /ripplo:create generality audit, then run the workflow."].join(`
371
- `)}async function Li(){let e=new AbortController;process.once("SIGINT",()=>{e.abort()});let r=await Ai({cwd:process.cwd(),onReady:Uu,signal:e.signal});process.stdout.write(`${ji(r)}
372
- `),process.exit(Mi(r)?0:1)}function Uu(){process.stdout.write(`${Ti()}
373
- `)}import{existsSync as Vu,readFileSync as qu}from"fs";import Bu from"path";function Oi(e,r){let n=Bu.join(e,".ripplo","debug",r,"behavior.jsonl");return Vu(n)?{actions:En(qu(n,{encoding:"utf8"})),kind:"ok"}:{kind:"not-found",runId:r}}function Ni(e){return e.kind==="not-found"?`No capture found for run ${e.runId}. Run npx ripplo capture first.`:e.actions.length===0?"No user actions found in this capture.":e.actions.map((r,n)=>Hu(r,n)).join(`
374
- `)}function Fi(e){return e.kind==="ok"}function Hu(e,r){let n=e.element,t=n?.role??n?.tag??"?",o=n?.ariaLabel??n?.text;return[`${String(r+1)}.`,e.kind.padEnd(6),t.padEnd(10),o==null?"":`name=${JSON.stringify(o)}`,n?.testId==null?"":`testId=${n.testId}`,e.value==null?"":`value=${JSON.stringify(e.value)}`].filter(s=>s.length>0).join(" ")}function Wi({runId:e}){let r=Oi(process.cwd(),e);process.stdout.write(`${Ni(r)}
375
- `),process.exit(Fi(r)?0:1)}async function Di(){let e=b();try{let n=(await ae(e.cwd,e)).match(t=>t,t=>{process.stderr.write(`${S(t)}
376
- `),process.exit(1)});await I("lockfile_synced"),process.stdout.write(`Synced ${String(n.lockfile.workflows.length)} workflows to dev session ${n.devSessionId}
377
- `)}catch(r){let n=r instanceof Error?r.message:String(r);process.stderr.write(`ripplo sync failed: ${n}
378
- `),process.stderr.write(`${x("setup","verify auth + server reachability")}
379
- `),process.exit(1)}}import{spawnSync as Ju}from"child_process";import Qu from"fs";import Zu from"path";import Xu from"semver";import ue from"fs";import zu from"os";import z from"path";function _i(e){let r=e.split(z.sep);return r.includes("_npx")?"npx":e.includes(z.join("packages","cli"))?"workspace":Gu(r)?"local":"global"}function Ui(){let e=z.join(zu.homedir(),".npm","_npx");return ue.existsSync(e)?ue.readdirSync(e).map(r=>z.join(e,r)).filter(r=>ue.existsSync(z.join(r,"node_modules","ripplo"))).map(r=>(ue.rmSync(r,{force:!0,recursive:!0}),r)):[]}function Gu(e){let r=e.lastIndexOf("node_modules");if(r<1)return!1;let n=e.slice(0,r).join(z.sep);return ue.existsSync(z.join(n,"package.json"))}import{spawnSync as Vi}from"child_process";var Ku=["user","project","local"];function Ir(){return Vi("claude",["--version"],{stdio:"ignore"}).error!=null?"claude-missing":Ku.find(n=>Vi("claude",["plugin","update","ripplo","--scope",n],{stdio:"ignore"}).status===0)==null?"not-installed":"updated"}function qi(e){return`ripplo v${e} is already the latest version.`}function Bi(e){return`ripplo v${e}: could not reach the npm registry to check for updates.`}function Ar({evicted:e,latest:r,mode:n}){return n==="npx"?`ripplo: ${e===0?"npx cache had no stale copy":`cleared ${M(e,"stale npx cache entry","stale npx cache entries")}`} \u2014 the next \`npx ripplo\` command runs v${r}.`:`ripplo: updated global install to v${r}.`}function Hi(){return"ripplo: this is a workspace build (packages/cli/dist) \u2014 update via git pull + `pnpm --filter ripplo build`."}function zi(e){return`ripplo: installed as a project dependency \u2014 update it with your package manager: \`${e}\``}function Gi(e){return`ripplo: \`npm install -g ripplo@latest\` failed: ${e}`}function Tr(e){switch(e){case"updated":return"ripplo: Claude plugin updated \u2014 restart Claude Code (or /reload-plugins) to apply.";case"not-installed":return"ripplo: Claude plugin not installed in this project \u2014 skipped.";case"claude-missing":return"ripplo: claude binary not found \u2014 skipped plugin update."}}function Ki(e){return e?"ripplo: idle daemon stopped \u2014 the next `npx ripplo run` restarts it on the new version.":"ripplo: daemon is busy \u2014 it picks up the new version once idle (the next `npx ripplo run` handles it)."}var Yu=1e4;async function Ji(){let e=w(),r=process.argv[1];ep(process.cwd());let n=await Ee(Yu);process.stdout.write(`${Re({current:e,latest:n})}
380
- `),n==null&&(process.stderr.write(`${Bi(e)}
381
- `),process.exit(1)),Xu.gt(n,e)||(process.stdout.write(`${qi(e)}
382
- `),process.stdout.write(`${Tr(Ir())}
383
- `),process.exit(0));let t=r==null?"global":_i(r);rp({latest:n,mode:t}),process.stdout.write(`${Tr(Ir())}
384
- `),await tp(process.cwd()),process.exit(0)}function ep(e){if(!Qu.existsSync(Zu.join(e,".ripplo")))return;let r=Ae(e);r==="written"&&process.stdout.write(`${Te(r).trim()}
385
- `)}function rp({latest:e,mode:r}){if(r==="workspace"&&(process.stdout.write(`${Hi()}
386
- `),process.exit(0)),r==="local"){let n=process.cwd(),t=fr({cwd:n,pm:gr(n),version:e});process.stdout.write(`${zi(t)}
387
- `),process.exit(0)}if(r==="npx"){let n=Ui();process.stdout.write(`${Ar({evicted:n.length,latest:e,mode:r})}
388
- `);return}np(e)}function np(e){let r=`ripplo@${e}`,n=Ju("npm",["install","-g",r],{stdio:"inherit"});if(n.status!==0){let t=`exit ${String(n.status)}`;process.stderr.write(`${Gi(t)}
389
- `),process.exit(1)}process.stdout.write(`${Ar({evicted:0,latest:e,mode:"global"})}
390
- `)}async function tp(e){if((await Yn(e)).kind==="not-running")return;let n=await Xn(e);process.stdout.write(`${Ki(n)}
391
- `)}async function Qi({action:e,exploreDebug:r}){if(e==="status"){let{statusCommand:t}=await import("./status-CNSPYNYP.js");await t({format:"summary"});return}if(e==="stop"||e==="restart"){let t=await op();(e==="stop"||!t)&&process.exit(t?0:1)}ip();let{runDaemon:n}=await import("./daemon-D4UCHMHS.js");await n({exploreDebug:r})}async function op(){let{stopDevDaemon:e}=await import("./daemon-lock-RPKO5SNE.js"),{renderDaemonStopResult:r}=await import("./daemon-LZTY7W4M.js"),n=await e(process.cwd());return process.stdout.write(`${r(n)}
392
- `),n.kind!=="timeout"}function ip(){let e=te(F());e!=null&&process.stderr.write(`${e}
393
- `)}function Zi(e){return`executor: ${e}`}function Xi(e){return e==="cloud"?"executor set to cloud \u2014 the daemon is bringing the tunnel up, the next run dispatches to the cloud fleet":"executor set to local \u2014 the next run executes on this machine"}function Yi(e){switch(e.kind){case"no-session":return"No active dev session for this directory. Start `npx ripplo daemon` first.";case"starting":return"Dev session is still syncing \u2014 the daemon just started. Retry in a moment.";case"session-ended":return"The dev session ended before the switch landed. Check `npx ripplo daemon status` and try again.";case"empty-response":return"The server returned no result for the switch. Try again."}}async function es({mode:e}){let r=y(process.cwd()).match(t=>t,t=>{process.stderr.write(`${S(t)}
394
- `),process.exit(1)});(e==null?await jt(r):await Mt(r,e)).match(t=>{process.stdout.write(`${e==null?Zi(t):Xi(t)}
395
- `)},t=>{process.stderr.write(`${Yi(t)}
396
- `),process.exit(1)})}import{spawnSync as yp}from"child_process";import{graphql as rs}from"gql.tada";import{err as jr,ok as Mr}from"neverthrow";var sp=rs(`
397
- query ExploreState($devSessionId: String!) {
398
- exploration(devSessionId: $devSessionId) {
399
- active
400
- autoCreateTasks
401
- cloudWorkers
402
- localWorkers
403
- maxTrailLength
404
- unhealthySince
405
- }
406
- }
407
- `),ap=rs(`
408
- mutation SetExploration(
409
- $devSessionId: String!
410
- $active: Boolean!
411
- $autoCreateTasks: Boolean!
412
- $cloudWorkers: Int!
413
- $localWorkers: Int!
414
- $maxTrailLength: Int!
415
- ) {
416
- setExploration(
417
- devSessionId: $devSessionId
418
- active: $active
419
- autoCreateTasks: $autoCreateTasks
420
- cloudWorkers: $cloudWorkers
421
- localWorkers: $localWorkers
422
- maxTrailLength: $maxTrailLength
423
- ) {
424
- active
425
- autoCreateTasks
426
- cloudWorkers
427
- localWorkers
428
- maxTrailLength
429
- unhealthySince
430
- }
431
- }
432
- `);async function ns(e){let r=await os(e);if(r.isErr())return jr(r.error);let n=await is(e,r.value.id);return Mr(ss(r.value.executor,n))}async function ts(e,r){let n=await os(e);if(n.isErr())return jr(n.error);let t=await is(e,n.value.id),o=lp(n.value.executor,t,r),i=await d({config:e,document:ap,variables:{devSessionId:n.value.id,...o}});return Mr(ss(n.value.executor,i.setExploration))}async function os(e){let r=await lt(e);return r.kind==="active"?Mr({executor:r.executor,id:r.id}):jr({kind:r.kind==="starting"?"starting":"no-session"})}async function is(e,r){return(await d({config:e,document:sp,variables:{devSessionId:r}})).exploration??null}function ss(e,r){let n=e==="local";return{active:r?.active??!1,executor:e,maxTrailLength:r?.maxTrailLength??cr,unhealthy:r?.unhealthySince!=null,workers:(n?r?.localWorkers:r?.cloudWorkers)??0}}function lp(e,r,n){let t=e==="local",o=(t?r?.localWorkers:r?.cloudWorkers)??0,i=(t?r?.cloudWorkers:r?.localWorkers)??0,s=dp(n,o);return{active:n.active,autoCreateTasks:r?.autoCreateTasks??!1,cloudWorkers:t?i:s,localWorkers:t?s:i,maxTrailLength:n.trail??r?.maxTrailLength??cr}}function dp(e,r){return e.active?e.workers!=null?e.workers:r>0?r:Lt:r}function as(e){if(!e.active)return e.unhealthy?"explorer: off \u2014 paused after repeated infra errors, turn it back on with npx ripplo explore on":"explorer: off";let r=`explorer: on | ${String(e.workers)} workers | trail ${String(e.maxTrailLength)} | ${e.executor}`;return e.unhealthy?`${r}
433
- explorer is hitting infra errors \u2014 it pauses if this persists`:r}function ls(e){return e.active?`explorer on \u2014 walking ${String(e.workers)} background paths, trail ${String(e.maxTrailLength)}, on the ${e.executor} executor. Findings land as tasks \u2014 triage with /ripplo:tasks`:"explorer off \u2014 background exploration stopped"}function ds(e){return e.kind==="starting"?"Dev session is still syncing \u2014 the daemon just started. Retry in a moment.":"No active dev session for this directory. Start `npx ripplo daemon` first."}var cp=32;async function cs({cwd:e,maxTrailLength:r}){let n=await ge(e);if(n.result.isErr())return{kind:"error",reason:"compile-failed"};let t=await be(e);if(t==null)return{kind:"error",reason:"no-lockfile"};let o=await X(e,n.result.value),i=vn(o);return i.kind==="model-empty"?{kind:"error",reason:"model-empty"}:{analysis:await Sn({attempts:cp,modelHash:t,prepared:i.value,strategy:r==null?or("even"):{...or("even"),maxAttemptLength:r}}),kind:"ok"}}function ps(e){return["Explorer model analysis",`${String(e.plannedPaths)} of ${String(e.attempts)} agendas produced complete paths.`,`${String(e.transitionsReached)} of ${String(e.transitionCount)} transitions were reached across ${String(e.composablePairs)} adjacent transition pairs.`,`${String(e.envelopesReached)} starting-state families and ${String(e.crossWorkflowPaths)} cross-workflow paths were used.`,up(e),pp(e),mp(e),fp(e),`Reached patterns: ${e.patternsReached.length===0?"none":e.patternsReached.join(", ")}.`,`${String(e.isolatedTransitions.length)} of ${String(e.targetsAnalyzed)} targeted transitions were unreachable. ${String(e.weaklyConnectedTransitions.length)} appeared in only one planned path.`,...us({heading:"Targets without a proved path:",transitions:e.isolatedTransitions}),...us({heading:"Targets reached in one planned path:",transitions:e.weaklyConnectedTransitions}),...gp(e.recommendations)].join(`
434
- `)}function ms(e){switch(e){case"compile-failed":return"Explorer analysis could not load the workflow model. Run npx ripplo compile and fix the reported errors.";case"model-empty":return"Explorer analysis found no runnable workflows. Add a workflow with a modeled navigation step.";case"no-lockfile":return"Explorer analysis could not find .ripplo/ripplo.lock. Run npx ripplo compile."}}function up(e){let r=e.planningDepth;return`Path length target: ${String(r.targetSteps)} steps. Planned ${pe(r.averagePlannedSteps)} on average and ${String(r.maxPlannedSteps)} at most after searching ${pe(r.averageSearchedSteps)} on average and ${String(r.maxSearchedSteps)} at most. Search stopped at the target ${String(r.searchStops.targetReached)} times, exhausted legal continuations ${String(r.searchStops.frontierExhausted)} times, and exhausted its budget ${String(r.searchStops.budgetExhausted)} times.`}function pe(e){return String(Math.round(e))}function pp(e){let r=e.planningPerformance;return`Planner average: ${V(r.total.averageMs)} total, ${V(r.envelopes.averageMs)} starting states, ${V(r.search.averageMs)} search, and ${V(r.selection.averageMs)} selection. Total p95: ${V(r.total.p95Ms)}.`}function V(e){return`${String(Math.round(e))} ms`}function mp(e){let r=e.planningPerformance;return`Search average: ${V(r.expansion.averageMs)} proving runnable steps, ${V(r.candidates.averageMs)} scoring candidates, and ${V(r.beam.averageMs)} retaining the beam.`}function fp(e){let r=e.planningWork;return`Search average: ${pe(r.averageExpandedNodes)} expanded nodes after considering ${pe(r.averageRulesConsidered)} transitions and ${pe(r.averageParameterAttempts)} parameter attempts.`}function us({heading:e,transitions:r}){return r.length===0?[]:[e,...r.map(n=>`- ${n.test}: ${n.action}`)]}function gp(e){return e.length===0?["No workflow coverage improvements are required by this analysis."]:["Recommendations:",...e.map(r=>`- ${r}`)]}async function fs({json:e,state:r,trail:n,workers:t}){if(r==="analyze"){hp();let s=await cs({cwd:process.cwd(),maxTrailLength:n});s.kind==="error"&&(process.stderr.write(`${ms(s.reason)}
435
- `),process.exit(1)),process.stdout.write(`${e?JSON.stringify(s.analysis,null,2):ps(s.analysis)}
436
- `);return}let o=y(process.cwd()).match(s=>s,s=>{process.stderr.write(`${S(s)}
437
- `),process.exit(1)});(r==null?await ns(o):await ts(o,{active:r==="on",trail:n,workers:t})).match(s=>{process.stdout.write(`${r==null?as(s):ls(s)}
438
- `)},s=>{process.stderr.write(`${ds(s)}
439
- `),process.exit(1)})}function hp(){let e=F();e.kind!=="fresh"&&(e.kind==="foreign-binary"&&Je(te(e)??"This command is not using the workspace CLI."),process.stderr.write(`${Me(e.packages)}
440
- `),Se(e.workspaceRoot)||Je(Le()),kp())}function Je(e){process.stderr.write(`${e}
441
- `),process.exit(1)}function kp(){let e=process.argv[1];e==null&&Je("Ripplo rebuilt the workspace but could not find the CLI entry point.");let r=yp(process.execPath,[e,...process.argv.slice(2)],{cwd:process.cwd(),stdio:"inherit"});r.error!=null&&Je(`Ripplo rebuilt the workspace but could not restart analysis: ${r.error.message}`),process.exit(r.status??1)}import{graphql as Qe}from"gql.tada";function gs(){return"No scope items added \u2014 matched tests already in scope (`npx ripplo scope status`)."}function ys(e){return[`No test found for: ${e.join(", ")}`,"Pass a test id (kebab-case slug) or the exact intent string. List tests with `npx ripplo status`.",x("create")].join(`
442
- `)}import{graphql as wp}from"gql.tada";var hs=wp(`
443
- query ScopeStatus($projectId: String!, $cwd: String!) {
444
- project(id: $projectId) {
445
- id
446
- devSession(cwd: $cwd) {
171
+ publishedAttempt {
447
172
  id
448
- scopeItems {
173
+ status
174
+ summaryText
175
+ issues {
449
176
  id
450
- label
451
- source
452
- workflow {
453
- id
454
- slug
455
- name
456
- spec
177
+ kind
178
+ title
179
+ body
180
+ workflowSlugs
181
+ evidence {
182
+ runId
183
+ testRef
184
+ frameMs
185
+ rrwebId
457
186
  }
458
187
  }
459
188
  }
460
189
  }
461
190
  }
462
- `);var bp=Qe(`
463
- query ScopeWorkflowBySlug($projectId: String!, $cwd: String!, $slug: String!) {
464
- project(id: $projectId) {
191
+ `);async function UD({codeReviewId:e}){let t=Sn();t==null&&(process.stderr.write(`${Ar()}
192
+ `),process.exit(1));let i=(await Ae({config:xn(t),document:kP,variables:{id:e}})).codeReview;i==null&&(process.stderr.write(`${zD(e)}
193
+ `),process.exit(1));let n=i.publishedAttempt;n==null&&(process.stderr.write(`${ND(e)}
194
+ `),process.exit(1));let o={attemptId:n.id,codeReviewId:i.id,gaps:i.declaredGaps,issues:n.issues,prUrl:i.prUrl,summary:n.summaryText,title:i.title,verdict:i.verdict};process.stdout.write(`${JSON.stringify(o,null,2)}
195
+ `);}var IP=Ue(`
196
+ query SetupProjects {
197
+ projects {
465
198
  id
466
- devSession(cwd: $cwd) {
467
- id
468
- workflows(where: { slug: $slug }) {
469
- id
470
- slug
471
- }
199
+ name
200
+ repoUrl
201
+ cloudBaseUrl
202
+ authConnections {
203
+ name
472
204
  }
473
- }
474
- }
475
- `),vp=Qe(`
476
- mutation ScopeAddDirtyTests($projectId: String!, $cwd: String!, $workflowSlugs: [String!]!) {
477
- addDirtyTestsToScope(projectId: $projectId, cwd: $cwd, workflowSlugs: $workflowSlugs) {
478
- __typename
479
- ... on MutationAddDirtyTestsToScopeSuccess {
480
- data {
481
- id
482
- workflow {
483
- id
484
- slug
485
- }
205
+ defaultAuthConnection {
206
+ id
207
+ kind
208
+ name
209
+ webhookSecret
210
+ oidc {
211
+ clientId
212
+ discoveryUrl
213
+ issuer
214
+ redirectUris
215
+ scimBaseUrl
216
+ signInEntry
486
217
  }
487
218
  }
488
- ... on NoActiveDevSessionError {
489
- message
490
- }
491
- ... on UnknownWorkflowSlugsError {
492
- message
493
- slugs
494
- }
495
219
  }
496
220
  }
497
- `),Sp=Qe(`
498
- mutation ScopeLink($id: ID!, $workflowId: String!) {
499
- linkScopeItem(id: $id, workflowId: $workflowId) {
221
+ `),OP=Ue(`
222
+ query SetupOrganizations {
223
+ organizations {
500
224
  id
225
+ name
226
+ limitStatus {
227
+ canCreateProject
228
+ memberCount
229
+ planName
230
+ projectCount
231
+ }
501
232
  }
502
233
  }
503
- `),xp=Qe(`
504
- mutation ScopeRemoveMany($ids: [ID!]!) {
505
- removeScopeItems(ids: $ids)
234
+ `),CP=Ue(`
235
+ query SetupInstallUrl {
236
+ gitHubAppInstallUrl
506
237
  }
507
- `);async function ks(e){let r=b();await R(r);let t=(await d({config:r,document:hs,variables:{cwd:r.cwd,projectId:r.projectId}})).project?.devSession?.scopeItems??[];if(e.format==="json"){process.stdout.write(`${JSON.stringify(t,null,2)}
508
- `);return}if(t.length===0){process.stdout.write("No scope items. Add some with `npx ripplo scope add <test-ids..>` or from the dashboard.\n");return}t.forEach(o=>{let i=o.workflow;if(i==null){process.stdout.write(` [intent] (${o.id}) ${o.label??""}
509
- `);return}let s=i.spec==null?"stub":"implemented";process.stdout.write(` [${s}] (${o.id}) ${i.slug} \u2014 ${i.name}
510
- `)})}async function ws({testIds:e}){let r=b();await R(r),(await ae(r.cwd,r)).match(()=>{},a=>{process.stderr.write(`${S(a)}
511
- `),process.exit(1)});let o=(await d({config:r,document:vp,variables:{cwd:r.cwd,projectId:r.projectId,workflowSlugs:e.map(a=>cn(a))}})).addDirtyTestsToScope;o?.__typename==="NoActiveDevSessionError"&&(process.stderr.write(`${o.message}
512
- `),process.exit(1)),o?.__typename==="UnknownWorkflowSlugsError"&&(process.stderr.write(`${ys(o.slugs)}
513
- `),process.exit(1));let i=o?.__typename==="MutationAddDirtyTestsToScopeSuccess"?o.data:[];if(i.length===0){process.stdout.write(`${gs()}
514
- `);return}let s=i.map(a=>a.workflow?.slug??"?").join(", ");process.stdout.write(`Added ${M(i.length,"scope item")}: ${s}
515
- `)}async function bs({id:e,testId:r}){let n=b();await R(n),(await ae(n.cwd,n)).match(()=>{},i=>{process.stderr.write(`${S(i)}
516
- `),process.exit(1)});let o=await Rp({cfg:n,slug:r});await d({config:n,document:Sp,variables:{id:e,workflowId:o}}),process.stdout.write(`Linked scope item ${e} to ${r}
517
- `)}async function vs({ids:e}){let r=b();await R(r);let t=(await d({config:r,document:xp,variables:{ids:[...e]}})).removeScopeItems??0;process.stdout.write(`Removed ${M(t,"scope item")}
518
- `)}async function Rp({cfg:e,slug:r}){let t=(await d({config:e,document:bp,variables:{cwd:e.cwd,projectId:e.projectId,slug:r}})).project?.devSession?.workflows?.[0];return t==null&&(process.stderr.write(`No workflow found with id "${r}". Create a stub first via the testing DSL.
519
- `),process.stderr.write(`${x("create")}
520
- `),process.exit(1)),t.id}import{graphql as O}from"gql.tada";import{print as js}from"graphql";import{createClient as Ms}from"graphql-sse";import Lr from"fs";import Cp from"path";import{err as Ze,ok as Ep}from"neverthrow";function xs({cwd:e,rrwebId:r,runId:n}){let t=Cs(e,n);if(!Lr.existsSync(t))return Ze({kind:"no-behavior"});let o=Is(Ps(t,r));if(o==null)return Ze({kind:"not-found"});let i=Nr(o.node.type);return i===3?Ze({kind:"text-node",parentId:Nr(o.parent?.id)}):i!==2?Ze({kind:"non-element",nodeType:i??-1}):Ep({tagName:A(o.node.tagName)})}function Rs({cwd:e,rrwebId:r,runId:n}){let t=Ps(Cs(e,n),r);if(t==null)return null;let o=Is(t);return o==null||Nr(o.node.type)!==2?null:$p(t)}function Cs(e,r){return Cp.join(e,".ripplo","debug",r,"behavior.jsonl")}function $p(e){let r=e.at(-1)??{},n=Fr(r.attributes)??{},t=A(r.tagName);return{ariaName:A(n["aria-label"]),role:A(n.role),selector:Ip(e),tagName:t==null?null:t.toLowerCase(),testId:A(n["data-testid"]),text:Lp(Mp(r))}}var Pp=6;function Ip(e){let r=Es(e,e.length-1,Pp);return r.length===0?null:r.join(" > ")}function Es(e,r,n){let t=e[r];if(t==null||n<=0)return[];let o=Ap(t);if(o!=null)return[o];let i=Tp(t,e[r-1]);return r===0||n===1?[i]:[...Es(e,r-1,n-1),i]}function Ap(e){let r=Fr(e.attributes)??{},n=A(r["data-testid"]);if(n!=null)return`[data-testid="${n}"]`;let t=A(r.id);return t!=null&&t.length>0?`#${t}`:null}function Tp(e,r){let n=(A(e.tagName)??"*").toLowerCase(),t=$s(r).filter(i=>(A(i.tagName)??"*").toLowerCase()===n);if(t.length<=1)return n;let o=t.findIndex(i=>i.id===e.id);return o===-1?n:`${n}:nth-of-type(${String(o+1)})`}function $s(e){let r=e?.childNodes;return Array.isArray(r)?r.filter(n=>Xe(n)):[]}function Ps(e,r){return Lr.existsSync(e)?Lr.readFileSync(e,"utf8").split(`
521
- `).reduce((t,o)=>t!=null||o.length===0?t:jp(o,r),null):null}function jp(e,r){let n=on(e);if(n?.kind!=="rrweb")return null;let t=Fr(n.event.data),o=Or(t?.node,r);if(o!=null)return o;let i=t?.adds;return Array.isArray(i)?i.reduce((s,a)=>s??(Xe(a)?Or(a.node,r):null),null):null}function Or(e,r){if(!Xe(e))return null;if(e.id===r)return[e];let n=e.childNodes;if(!Array.isArray(n))return null;let t=n.reduce((o,i)=>o??Or(i,r),null);return t==null?null:[e,...t]}function Is(e){let r=e?.at(-1);return r==null?null:{node:r,parent:e?.at(-2)}}var Ss=80;function Mp(e){let r=$s(e).filter(n=>n.type===3).map(n=>A(n.textContent)).filter(n=>n!=null);return r.length===0?null:r.join(" ")}function A(e){return typeof e=="string"?e:null}function Lp(e){let r=e==null?"":e.replaceAll(/\s+/g," ").trim();return r.length===0?null:r.length>Ss?`${r.slice(0,Ss)}\u2026`:r}function Fr(e){return Xe(e)?e:void 0}function Xe(e){return typeof e=="object"&&e!=null}function Nr(e){return typeof e=="number"?e:null}function Wr(e,r){let n=r.flatMap(o=>Op(e,o)),t=new Map(r.map(o=>[o.id,o.fingerprint]));return{changes:n,seen:t}}function Op(e,r){let n=e.get(r.id);return n==null?r.kind==="finding"||r.lastMessageAuthor==="agent"?[]:[{task:r,type:r.latestMessageKind==="reopen"?"reopened":"new"}]:n!==r.fingerprint&&r.lastMessageAuthor==="user"?[{task:r,type:"reply"}]:[]}var Np=O(`
522
- query WorkList($projectId: String!, $cwd: String!) {
523
- project(id: $projectId) {
524
- id
525
- devSession(cwd: $cwd) {
526
- id
527
- tasks(status: open) {
528
- id
529
- kind
530
- status
531
- title
532
- messages {
533
- body
534
- }
535
- }
536
- }
238
+ `),RP=Ue(`
239
+ query SetupInstallations {
240
+ gitHubInstallations {
241
+ installationId
242
+ accountLogin
537
243
  }
538
244
  }
539
- `),Fp=O(`
540
- query WatchSeed($projectId: String!, $cwd: String!) {
541
- project(id: $projectId) {
542
- id
543
- devSession(cwd: $cwd) {
544
- id
545
- tasks(status: open) {
546
- id
547
- kind
548
- title
549
- updatedAt
550
- lastMessageAuthor
551
- messages {
552
- body
553
- kind
554
- }
555
- }
556
- }
245
+ `),AP=Ue(`
246
+ query SetupRepositories {
247
+ githubRepositories {
248
+ installationId
249
+ name
250
+ url
557
251
  }
558
252
  }
559
- `),Ls=O(`
560
- subscription WatchTasks($devSessionId: String!) {
561
- tasksChanged(devSessionId: $devSessionId) {
562
- devSession {
253
+ `),TP=Ue(`
254
+ mutation SetupCreateProject(
255
+ $installationId: Int!
256
+ $name: String!
257
+ $organizationId: String!
258
+ $repoUrl: String!
259
+ ) {
260
+ createProject(
261
+ cloudBaseUrl: ""
262
+ installationId: $installationId
263
+ name: $name
264
+ organizationId: $organizationId
265
+ provider: "github"
266
+ repoUrl: $repoUrl
267
+ ) {
268
+ __typename
269
+ ... on Project {
563
270
  id
564
- tasks(status: open) {
271
+ name
272
+ repoUrl
273
+ cloudBaseUrl
274
+ authConnections {
275
+ name
276
+ }
277
+ defaultAuthConnection {
565
278
  id
566
279
  kind
567
- title
568
- updatedAt
569
- lastMessageAuthor
570
- messages {
571
- body
572
- kind
280
+ name
281
+ webhookSecret
282
+ oidc {
283
+ clientId
284
+ discoveryUrl
285
+ issuer
286
+ redirectUris
287
+ scimBaseUrl
288
+ signInEntry
573
289
  }
574
290
  }
575
291
  }
292
+ ... on LimitExceededError {
293
+ message
294
+ }
295
+ ... on InvalidRepoLinkError {
296
+ message
297
+ }
576
298
  }
577
299
  }
578
- `),Wp=O(`
579
- query WorkShow($id: String!) {
580
- task(id: $id) {
300
+ `),PP=Ue(`
301
+ mutation SetupSaveAppUrl($id: String!, $appUrl: String!) {
302
+ updateProject(id: $id, cloudBaseUrl: $appUrl) {
581
303
  id
582
- kind
583
- status
584
- title
585
- messages {
586
- author
587
- authorName
588
- body
589
- runId
590
- frameMs
591
- rrwebId
592
- }
593
304
  }
594
305
  }
595
- `),Dp=O(`
596
- mutation WorkComment(
597
- $taskId: String!
598
- $body: String!
599
- $runId: String
600
- $frameMs: Int
601
- $rrwebId: Int
602
- $authorName: String
603
- ) {
604
- agentCommentOnTask(
605
- taskId: $taskId
606
- body: $body
607
- runId: $runId
608
- frameMs: $frameMs
609
- rrwebId: $rrwebId
610
- authorName: $authorName
611
- ) {
612
- __typename
613
- ... on Task {
306
+ `),FP=Ue(`
307
+ mutation SetupCreateConnection($input: OidcAuthConnectionInput!) {
308
+ createOidcAuthConnection(input: $input) {
309
+ clientSecret
310
+ connection {
614
311
  id
615
- }
616
- ... on NoActiveDevSessionError {
617
- message
312
+ name
313
+ oidc {
314
+ clientId
315
+ discoveryUrl
316
+ issuer
317
+ redirectUris
318
+ signInEntry
319
+ }
618
320
  }
619
321
  }
620
322
  }
621
- `),_p=O(`
622
- mutation WorkResolve($taskId: String!, $runId: String!, $note: String, $authorName: String) {
623
- agentResolveTask(taskId: $taskId, runId: $runId, note: $note, authorName: $authorName) {
624
- __typename
625
- ... on Task {
626
- id
627
- }
628
- ... on NoActiveDevSessionError {
629
- message
323
+ `),jP=Ue(`
324
+ mutation SetupUpdateConnection($input: OidcAuthConnectionUpdate!) {
325
+ updateOidcAuthConnection(input: $input) {
326
+ id
327
+ name
328
+ oidc {
329
+ clientId
330
+ discoveryUrl
331
+ issuer
332
+ redirectUris
333
+ scimBaseUrl
334
+ signInEntry
630
335
  }
631
336
  }
632
337
  }
633
- `),Up=O(`
634
- mutation WorkStart($taskId: String!) {
635
- agentStartTask(taskId: $taskId) {
636
- __typename
637
- ... on Task {
638
- id
639
- agentStartedAt
640
- }
641
- ... on NoActiveDevSessionError {
642
- message
643
- }
338
+ `),zP=Ue(`
339
+ mutation SetupRotateSecret($id: String!) {
340
+ rotateAuthConnectionSecret(id: $id) {
341
+ secret
644
342
  }
645
343
  }
646
- `),Vp=O(`
647
- mutation WorkClarify($taskId: String!, $body: String!, $authorName: String) {
648
- agentSetNeedsClarification(taskId: $taskId, body: $body, authorName: $authorName) {
649
- __typename
650
- ... on Task {
651
- id
652
- }
653
- ... on NoActiveDevSessionError {
654
- message
655
- }
344
+ `),NP=Ue(`
345
+ mutation SetupStartSignInTest($id: String!) {
346
+ startAuthConnectionSignInTest(id: $id) {
347
+ runId
348
+ url
656
349
  }
657
350
  }
658
- `),qp=O(`
659
- mutation WorkDismiss($taskId: String!, $note: String, $authorName: String) {
660
- agentDismissTask(taskId: $taskId, note: $note, authorName: $authorName) {
661
- __typename
662
- ... on Task {
663
- id
664
- }
665
- ... on NoActiveDevSessionError {
666
- message
667
- }
668
- ... on FindingNotDismissableError {
669
- message
670
- }
351
+ `),UP=Ue(`
352
+ mutation SetupCheckSignInTest($runId: String!) {
353
+ checkAuthConnectionSignInTest(runId: $runId) {
354
+ detail
355
+ kind
671
356
  }
672
357
  }
673
- `),Bp=18e4;async function Os(e){let r=b();await R(r);let n=await As(r),t=n.items.some(o=>o.kind==="finding");if(e.wait&&!t&&n.devSessionId!=null){await Hp({cfg:r,devSessionId:n.devSessionId});let o=await As(r);Ts(o.items,e.format);return}Ts(n.items,e.format)}async function As(e){let n=(await d({config:e,document:Np,variables:{cwd:e.cwd,projectId:e.projectId}})).project?.devSession;return{devSessionId:n?.id??null,items:n?.tasks??[]}}function Ts(e,r){if(r==="json"){process.stdout.write(`${JSON.stringify(e,null,2)}
674
- `);return}let n=e.map(t=>({id:t.id,kind:t.kind,lastMessage:(t.messages??[]).at(-1)?.body??null,status:t.status,title:t.title}));process.stdout.write(`${Fn(n)}
675
- `)}function Hp({cfg:e,devSessionId:r}){let n=Ms({headers:{Authorization:`Bearer ${e.token}`},retryAttempts:1/0,url:`${e.ripploServerUrl}/graphql`});return new Promise(t=>{let o={settled:!1,timer:null,dispose:()=>{}},i=()=>{o.settled||(o.settled=!0,o.timer!=null&&clearTimeout(o.timer),o.dispose(),t())};o.timer=setTimeout(i,Bp),o.dispose=n.subscribe({query:js(Ls),variables:{devSessionId:r}},{complete:i,error:()=>{i()},next:s=>{(s.data?.tasksChanged?.devSession?.tasks??[]).some(l=>l.kind==="finding")&&i()}})})}async function Ns(){let e=b();await R(e);let n=(await d({config:e,document:Fp,variables:{cwd:e.cwd,projectId:e.projectId}})).project?.devSession;if(n==null)throw new Error("dev session vanished between preflight and seed");let t=Wr(new Map,Ws(n.tasks??[])),o=Ms({headers:{Authorization:`Bearer ${e.token}`},retryAttempts:1/0,url:`${e.ripploServerUrl}/graphql`});zp({devSessionId:n.id,seen:t.seen,sseClient:o}),await new Promise(()=>{})}function zp({devSessionId:e,seen:r,sseClient:n}){let t=r;n.subscribe({query:js(Ls),variables:{devSessionId:e}},{complete:()=>{},error:o=>{process.stderr.write(`task watch error: ${String(o)}
676
- `)},next:o=>{let i=o.data?.tasksChanged?.devSession?.tasks??[],s=Wr(t,Ws(i));s.changes.forEach(a=>{process.stdout.write(`${Dn(a)}
677
- `)}),t=s.seen}})}async function Fs(e){let r=b();await R(r);let t=(await d({config:r,document:Wp,variables:{id:e.id}})).task;if(t==null&&(process.stderr.write(`${_n(e.id)}
678
- `),process.exit(1)),e.format==="json"){process.stdout.write(`${JSON.stringify(t,null,2)}
679
- `);return}let o=[...new Set((t.messages??[]).flatMap(s=>s.runId==null?[]:[s.runId]))];await Promise.all(o.map(s=>_(r.cwd,s).then(a=>a.isErr())));let i={id:t.id,kind:t.kind,lastMessage:(t.messages??[]).at(-1)?.body??null,messages:(t.messages??[]).map(s=>({author:s.author,authorName:s.authorName,body:s.body,element:s.runId==null||s.rrwebId==null?null:Rs({cwd:r.cwd,rrwebId:s.rrwebId,runId:s.runId}),frameMs:s.frameMs,rrwebId:s.rrwebId,runId:s.runId})),status:t.status,title:t.title};process.stdout.write(`${Wn(i)}
680
- `)}function Ws(e){return e.map(r=>({fingerprint:`${r.id}:${String(r.updatedAt)}`,id:r.id,kind:r.kind,lastMessageAuthor:r.lastMessageAuthor,latestMessage:(r.messages??[]).at(-1)?.body??null,latestMessageKind:(r.messages??[]).at(-1)?.kind??null,title:r.title}))}async function Ds(e){let r=b();if(await R(r),e.elementId!=null&&e.runId!=null){let t=xs({cwd:r.cwd,rrwebId:e.elementId,runId:e.runId}).match(()=>null,o=>o);t!=null&&t.kind!=="no-behavior"&&(process.stderr.write(`${Gp(t,e.elementId,e.runId)}
681
- `),process.exit(1))}let n=await d({config:r,document:Dp,variables:{authorName:e.authorName??null,body:e.body,frameMs:e.offsetMs??null,rrwebId:e.elementId??null,runId:e.runId??null,taskId:e.id}});Ye(n.agentCommentOnTask),process.stdout.write(`${Un(e.id)}
682
- `)}async function _s(e){let r=b();await R(r);let n=await d({config:r,document:_p,variables:{authorName:e.authorName??null,note:e.note??null,runId:e.runId,taskId:e.id}});Ye(n.agentResolveTask),process.stdout.write(`${zn(e.id)}
683
- `)}async function Us(e){let r=b();await R(r);let n=await d({config:r,document:Up,variables:{taskId:e.id}});Ye(n.agentStartTask),process.stdout.write(`${Gn(e.id)}
684
- `)}async function Vs(e){e.body.trim().length===0&&(process.stderr.write(`${Vn()}
685
- `),process.exit(1));let r=b();await R(r);let n=await d({config:r,document:Vp,variables:{authorName:e.authorName??null,body:e.body,taskId:e.id}});Ye(n.agentSetNeedsClarification),process.stdout.write(`${Kn(e.id)}
686
- `)}async function qs(e){let r=b();await R(r);let t=(await d({config:r,document:qp,variables:{authorName:e.authorName??null,note:e.note??null,taskId:e.id}})).agentDismissTask;(t?.__typename==="FindingNotDismissableError"||t?.__typename==="NoActiveDevSessionError")&&(process.stderr.write(`${t.message}
687
- `),process.exit(1)),process.stdout.write(`${Jn(e.id)}
688
- `)}function Ye(e){e?.__typename==="NoActiveDevSessionError"&&(process.stderr.write(`${e.message}
689
- `),process.exit(1))}function Gp(e,r,n){return e.kind==="text-node"?qn(r,e.parentId):e.kind==="not-found"?Bn(r,n):Hn(r)}function Bs(e){return e.command("list","List open tasks for this dev session",r=>r.option("format",{choices:["json","text"],default:"text",describe:"Output format"}).option("wait",{default:!1,describe:"Block until the first explorer finding lands (or a timeout)",type:"boolean"}),r=>Os({format:r.format,wait:r.wait})).command("watch","Stream new tasks and user replies as they arrive (arm via Monitor from /ripplo:start)",r=>r,()=>Ns()).command("show <id>","Show a task with its full message thread",r=>r.positional("id",{demandOption:!0,describe:"Task id",type:"string"}).option("format",{choices:["json","text"],default:"text",describe:"Output format"}),r=>Fs({format:r.format,id:r.id})).command("comment <id> <body>","Comment on a task, optionally anchored to a run frame and element. For visual fixes, anchor to the proof run's frame and element, both read from .ripplo/debug/<runId>/behavior.jsonl: --element takes the rrweb id of an ELEMENT node (a text node has no box and cannot be highlighted \u2014 use its parentId), and --offset takes the frame offset in ms (from recording start, same as `snapshot --offset`) where that element is present. Call once per comment.",r=>r.positional("id",{demandOption:!0,describe:"Task id",type:"string"}).positional("body",{demandOption:!0,describe:"Comment body",type:"string"}).option("run",{describe:"Run id to anchor the comment to",type:"string"}).option("offset",{describe:"Frame offset in ms from recording start",type:"number"}).option("element",{describe:"rrweb id of an element node to highlight (not a text node)",type:"number"}).option("as",{describe:"Agent display name shown on the comment",type:"string"}),r=>Ds({authorName:r.as,body:r.body,elementId:r.element,id:r.id,offsetMs:r.offset,runId:r.run})).command("start <id>","Mark a task as picked up \u2014 flags it in progress until resolved, dismissed, or clarified",r=>r.positional("id",{demandOption:!0,describe:"Task id",type:"string"}),r=>Us({id:r.id})).command("resolve <id>","Resolve a task with a proof run",r=>r.positional("id",{demandOption:!0,describe:"Task id",type:"string"}).option("run",{demandOption:!0,describe:"Proof run id",type:"string"}).option("note",{describe:"Optional resolution note",type:"string"}).option("as",{describe:"Agent display name shown on the message",type:"string"}),r=>_s({authorName:r.as,id:r.id,note:r.note,runId:r.run})).command("clarify <id> <body>","Mark a task as needing clarification from the user",r=>r.positional("id",{demandOption:!0,describe:"Task id",type:"string"}).positional("body",{demandOption:!0,describe:"What you need clarified",type:"string"}).option("as",{describe:"Agent display name shown on the message",type:"string"}),r=>Vs({authorName:r.as,body:r.body,id:r.id})).command("dismiss <id>","Dismiss a task as not actionable",r=>r.positional("id",{demandOption:!0,describe:"Task id",type:"string"}).option("note",{describe:"Optional reason",type:"string"}).option("as",{describe:"Agent display name shown on the message",type:"string"}),r=>qs({authorName:r.as,id:r.id,note:r.note})).demandCommand(1)}_r();ie(process.cwd());Zr();async function Zp(){fe(w()),Kp({pkg:{name:"ripplo",version:w()}}).notify({message:Ot()}),await Jp(Qp(process.argv)).scriptName("ripplo").version(w()).command(em()).command(rm()).command(tm()).command(pm()).command("auth <subcommand>","Manage authentication",km).command("projects <subcommand>","List or create Ripplo projects",hm).command("hooks <subcommand>","Pause or resume Ripplo hooks",ym).command(sm()).command("init","Scaffold .ripplo/ in this project",e=>e.option("project",{type:"string"}).option("env",{type:"string"}).option("app-url",{type:"string"}).option("engine-url",{type:"string"}),e=>wo({appUrl:e["app-url"],engineUrl:e["engine-url"],envFile:e.env,projectId:e.project})).command("run [ids..]","Run tests locally via the daemon (start it first with `npx ripplo daemon`)",fm,e=>Po({all:e.all,headed:e.headed,ids:e.ids})).command(lm()).command(dm()).command(mm()).command(cm()).command(um()).command(am()).command(om()).command(im()).command("sync","Push the compiled .ripplo/ resources to the server (no run)",()=>{},()=>Di()).command("compile","Compile the DSL, run static model analysis, and write .ripplo/ripplo.lock",e=>e.option("check",{default:!1,describe:"Exit non-zero if the lockfile is missing or stale (does not write)",type:"boolean"}),e=>qt({check:e.check})).command("update","Update ripplo to the latest published version (and hand the daemon off to it)",()=>{},()=>Ji()).command("doctor","Check project health",()=>{},()=>no()).command("status","Report stub tests and daemon status",e=>e.option("format",{choices:["json","summary"],default:"json",describe:"Output format"}),e=>Tt({format:e.format})).command("scope <subcommand>","Manage testing scope",gm).command("tasks <subcommand>","Manage tasks for this dev session",Bs).command("run-worker",!1,()=>{},()=>jo()).command("hook <name>","Internal: run a Claude Code plugin hook",e=>e.positional("name",{choices:Object.keys(it),demandOption:!0,type:"string"}),e=>at(e.name)).strict().help().parse()}Zp().catch(e=>{process.stderr.write(`${st(e)}
690
- `),process.exit(1)});var Xp=["start","stop","restart","status"],Yp="start";function em(){return{command:"daemon [action]",describe:"Run the long-lived local executor (IPC socket + run subscription)",builder:e=>e.positional("action",{choices:Xp,default:Yp,describe:"Lifecycle action for this project's daemon"}).option("explore-debug",{default:!1,describe:"Print local explorer planner decisions",type:"boolean"}),handler:e=>Qi({action:e.action,exploreDebug:e["explore-debug"]})}}function rm(){return{command:"executor [mode]",describe:"Show or switch the run executor for the active dev session",builder:e=>e.positional("mode",{choices:["local","cloud"],describe:"Executor to switch to (omit to show the current one)"}),handler:e=>es({mode:e.mode})}}var nm=["analyze","on","off"];function tm(){return{command:"explore [state]",describe:"Show or toggle the background explorer for the active dev session",builder:e=>e.positional("state",{choices:nm,describe:"Turn the explorer on or off, or analyze workflow coverage (omit to show current state)"}).option("json",{default:!1,describe:"Print machine-readable analysis",type:"boolean"}).option("trail",{describe:"Target steps per explored path",type:"number"}).option("workers",{describe:"Concurrent explorer workers",type:"number"}),handler:e=>fs({json:e.json,state:e.state,trail:e.trail,workers:e.workers})}}function om(){return{command:"explain <runId>",describe:"Explain a run's failing checks \u2014 what failed, where it came from, and what happened around it",builder:e=>e.positional("runId",{demandOption:!0,type:"string"}).option("json",{default:!1,describe:"Machine-readable output",type:"boolean"}).option("full",{default:!1,describe:"Also show the synthesized starting state and step-by-step run timeline",type:"boolean"}),handler:e=>Yo({full:e.full,json:e.json,runId:e.runId})}}function im(){return{command:"replay <runId>",describe:"Re-run an explore finding's trail to confirm it's resolved",builder:e=>e.positional("runId",{demandOption:!0,type:"string"}),handler:e=>ai({runId:e.runId})}}function sm(){return{command:"setup",describe:"Install the Ripplo plugin for Claude Code and start a guided setup session",builder:e=>e,handler:()=>{$o()}}}function am(){return{command:"pull <runId>",describe:"Download a run's behavior.jsonl from the server",builder:e=>e.positional("runId",{demandOption:!0,type:"string"}),handler:e=>ei({runId:e.runId})}}function lm(){return{command:"snapshot <runId>",describe:"Render a PNG of the page at a point in a run's rrweb recording",builder:e=>e.positional("runId",{demandOption:!0,type:"string"}).option("at",{describe:"Moment to render: epoch-ms timestamp exactly as found in behavior.jsonl",type:"number"}).option("offset",{describe:"Moment to render: ms from the start of the recording (alternative to --at)",type:"number"}).conflicts("at","offset"),handler:e=>yi({at:e.at,offset:e.offset,runId:e.runId})}}function dm(){return{command:"video <runId>",describe:"Render an MP4 of a run's rrweb recording",builder:e=>e.positional("runId",{demandOption:!0,type:"string"}),handler:e=>Ri({runId:e.runId})}}function cm(){return{command:"capture",describe:"Open your signed-in browser, record a flow, and hand the log to Claude",builder:e=>e,handler:()=>Li()}}function um(){return{command:"clickpath <runId>",describe:"Print the resolved, ordered user actions from a capture",builder:e=>e.positional("runId",{demandOption:!0,describe:"Capture run id (the capture-... folder under .ripplo/debug)",type:"string"}),handler:e=>{Wi({runId:e.runId})}}}function pm(){return{command:"concurrency [value]",describe:"Show or set max local concurrent runs (daemon applies live)",builder:e=>e.positional("value",{type:"number"}),handler:e=>Ht({value:e.value})}}function mm(){return{command:"teleport <ref>",describe:"Open a live browser with starting state and earlier test steps applied",builder:e=>e.positional("ref",{demandOption:!0,describe:"Test ref: <workflow-slug>/<test-slug>",type:"string"}).option("step",{demandOption:!0,describe:"Step to land on \u2014 runs the test up to and including this step, then hands over",type:"number"}),handler:e=>Pi({ref:e.ref,step:e.step})}}function fm(e){let r=[];return e.positional("ids",{array:!0,default:r,describe:"Test ids to run",type:"string"}).option("all",{default:!1,describe:"Run every test in the suite (expensive)",type:"boolean"}).option("headed",{default:!1,describe:"Run with a visible browser window",type:"boolean"})}function gm(e){return e.command("status","Print the current scope",r=>r.option("format",{choices:["json","text"],default:"text",describe:"Output format"}),r=>ks({format:r.format})).command("add <test-ids..>","Bind one or more existing tests (stubs or implemented) to scope as agent intent",r=>{let n=[];return r.positional("test-ids",{array:!0,default:n,demandOption:!0,describe:"Slugs of existing workflows",type:"string"})},r=>ws({testIds:r["test-ids"]})).command("link <id> <test-id>","Link an existing scope item to a test",r=>r.positional("id",{demandOption:!0,describe:"Scope item id",type:"string"}).positional("test-id",{demandOption:!0,describe:"Slug of the workflow to link",type:"string"}),r=>bs({id:r.id,testId:r["test-id"]})).command("remove <ids..>","Remove one or more scope items by id",r=>{let n=[];return r.positional("ids",{array:!0,default:n,demandOption:!0,describe:"Scope item ids",type:"string"})},r=>vs({ids:r.ids})).demandCommand(1)}function ym(e){return e.command("pause","Disable all Ripplo pre-edit gates and stop enforcement until resumed",()=>{},()=>to()).command("resume","Re-enable Ripplo hooks paused via `ripplo hooks pause`",()=>{},()=>oo()).demandCommand(1)}function hm(e){return e.command("list","List projects you have access to (JSON)",()=>{},()=>So()).command("create <name>","Create a project (JSON)",r=>r.positional("name",{demandOption:!0,type:"string"}).option("org",{describe:"Organization id",type:"string"}),r=>xo({name:r.name,orgId:r.org})).demandCommand(1)}function km(e){return e.command("login","Authenticate via device flow",()=>{},()=>_t()).command("status","Show authentication status",()=>{},()=>Ut()).command("logout","Remove the saved token",()=>{},()=>{Vt()}).demandCommand(1)}export{Zp as main};
358
+ `);async function Oi(e){return (await Ae({config:e,document:IP,variables:void 0})).projects??[]}async function LD(e){return (await Ae({config:e,document:OP,variables:void 0})).organizations??[]}async function MD(e){return (await Ae({config:e,document:CP,variables:void 0})).gitHubAppInstallUrl??null}async function Mh({accountLogin:e,connection:t}){let i=(await Ae({config:t,document:RP,variables:void 0})).gitHubInstallations??[],n=e.toLowerCase();return i.find(o=>o.accountLogin.toLowerCase()===n)??null}async function BD(e){return (await Ae({config:e,document:AP,variables:void 0})).githubRepositories??[]}async function VD({connection:e,...t}){let i=(await Ae({config:e,document:TP,variables:t})).createProject;return i?.__typename==="Project"?Fe(i):de({kind:"rejected",message:i?.message??""})}async function ZD({appUrl:e,connection:t,id:r}){await Ae({config:t,document:PP,variables:{appUrl:e,id:r}});}var LP="oidc";async function WD({connection:e,project:t,values:r}){let i=Mm({base:LP,taken:t.authConnections.map(o=>o.name)});return (await Ae({config:e,document:FP,variables:{input:{makeDefault:true,name:i,projectId:t.id,redirectUris:[...r.redirectUris],signInEntry:r.signInEntry}}})).createOidcAuthConnection}async function GD({connection:e,id:t,name:r,scimBaseUrl:i,values:n}){return (await Ae({config:e,document:jP,variables:{input:{id:t,makeDefault:true,name:r,redirectUris:[...n.redirectUris],scimBaseUrl:i,signInEntry:n.signInEntry}}})).updateOidcAuthConnection}async function qD({connection:e,connectionId:t}){return (await Ae({config:e,document:zP,variables:{id:t}})).rotateAuthConnectionSecret.secret}async function HD({connection:e,connectionId:t}){return (await Ae({config:e,document:NP,variables:{id:t}})).startAuthConnectionSignInTest}async function JD({connection:e,runId:t}){return (await Ae({config:e,document:UP,variables:{runId:t}})).checkAuthConnectionSignInTest}function Bh(e){return `${Vh(e)}/settings?section=environment`}function Vh({connection:e,projectId:t}){return `${e.ripploServerUrl}/projects/${t}`}function KD({connection:e,projectId:t}){let r=encodeURIComponent(`/projects/${t}`);return `${e.ripploServerUrl}/login?redirect=${r}`}var YD=2e3,Bo=2e4;async function Zh({connection:e,remainingMs:t,runId:r}){if(t<=0)return {kind:"timedOut"};await setTimeout$1(YD);let i=await JD({connection:e,runId:r});return BP(i)??Zh({connection:e,remainingMs:t-YD,runId:r})}function BP(e){switch(e.kind){case "pending":return;case "signedIn":return {kind:"signedIn"};case "failed":return {detail:e.detail??"",kind:"failed"}}}var Gh=c(Mu(),1);var e_=c(Mu(),1),t_=String.fromCodePoint(27),GP=`${t_}[38;5;245m`,qP=`${t_}[0m`;function je(e){return e_.default.isColorSupported?`${GP}${e}${qP}`:e}var i_="https://ripplo.ai/docs#sign-in";function Ci(e){return Gh.default.underline(e)}var n_={auth:{title:"Authentication",why:"Ripplo generates test users as an OpenID Connect identity provider, like sign in with Google. That takes two registrations: your app with Ripplo, then Ripplo with your app."},check:{title:"Test authentication",why:"Ripplo signs a test user in through your app the way a review run would."},claude:{title:"Set up Claude Code for Ripplo",why:"The Ripplo plugin lets Claude Code read a review's findings and fix them in your code."},github:{title:"GitHub access",why:"Ripplo reads your code base to write workflows, reads pull requests to review them, and posts results as comments. The Ripplo GitHub App grants that access."},open:{title:"Open Ripplo",why:"Your project page shows workflows as Ripplo writes them, and every review after that."},project:{title:"Project",why:"A project is this repository inside Ripplo, where its workflows and reviews live."},signIn:{title:"Sign in",why:"Setup saves the project under your Ripplo account."},url:{title:"Test app",why:"Ripplo opens a deployed copy of your app in a browser and signs in as a test user."}},o_=["signIn","project","github","url","auth","check","claude","open"];function At(e){return {title:`${String(o_.indexOf(e)+1)}. ${n_[e].title}`,why:n_[e].why}}var r_={app:{title:"Register Ripplo with your app",why:"Add Ripplo as a sign-in provider to your app and give it three values. Ripplo cannot sign in until this is done."},ripplo:{title:"Register your app with Ripplo",why:"Ripplo needs your app's sign-in page and where it sends the browser back after sign-in."}};function Bu(e){return {title:`${String(o_.indexOf("auth")+1)}${e==="ripplo"?"a":"b"}. ${r_[e].title}`,why:r_[e].why}}function Vu(){return "Ripplo setup"}function Zu(e){switch(e.kind){case "no-remote":return "No git remote named origin here. Run setup inside the repository to review.";case "not-github":return `The origin remote is ${e.remote}. Ripplo reviews GitHub repositories only.`}}function a_(e){return `Signed in as ${e}`}function qh(e){return `Ripplo GitHub App installed on ${e}`}function s_(e){return `Ripplo GitHub App is not installed on ${e} yet.`}function u_(e){return `Install the Ripplo GitHub App on ${e}`}function c_(e){return `Add ${e} to the Ripplo GitHub App`}function l_(){return "Install it now?"}function d_(){return "Open GitHub, pick this repository, then come back"}function p_(){return "Stop"}function Ye(){return "Stopped. Run setup again to resume."}function f_(e){return [je("If GitHub did not open, use this link:"),Ci(e)]}function m_(){return "Waiting for GitHub"}function h_({minutes:e,owner:t}){return `Still no access to ${t} after ${String(e)} minutes. Finish the install on GitHub first.`}function g_(e){return [`Ripplo cannot see ${e}.`,"The app has no repositories selected, or is installed on another account."]}function y_(e){return `Add ${e} to the Ripplo app on GitHub?`}function v_(){return "Open GitHub, select it under Repository access, then come back"}function b_(e){return `Waiting for ${e} to appear`}function S_({minutes:e,repo:t}){return `Ripplo still cannot see ${t} after ${String(e)} minutes. Add it on the right account.`}function Hh(e){return `${e} selected`}function x_(){return "Your account is in no Ripplo organization. Create one in the dashboard first."}function D_(){return "Which organization owns this app?"}function Jh(e){return `Organization ${e}`}function Kh(e){let t=mu(e.projectCount,"project"),r=mu(e.memberCount,"member"),i=je(`${t} \xB7 ${r} \xB7 ${e.planName} plan`);return `${e.name} ${i}`}function __(e){return `${Kh(e)} ${je("project limit reached")}`}function E_(e){return `Using the existing project ${e}`}function w_(e){return `A project stays in its organization. To use another, delete ${e} in its settings and run setup again.`}function $_({organization:e,repo:t}){return `${t} will be a project in ${e}, created once GitHub access is confirmed`}function k_(e,t){return `Created ${e} in ${t}`}function I_(e){return `Could not create the project. ${e}`}function O_(){return "Where will Ripplo test your app?"}function Wu(e){switch(e){case "staging":return "One pre-production server with a stable address";case "previews":return "Pull request preview environments, one address per pull request";case "both":return "Both"}}function C_(e){return `${Wu(e)} ${je("from --environments")}`}function R_({appUrl:e,environments:t,previewUrl:r}){return [Wu(t),`Testing against ${e}`,...r==null?[]:[`Previews at ${r}`]]}function A_(){return "Every review creates a test user in this app, so use a staging server, not production."}function T_(){return "Where does your pre-production server run?"}function P_(){return "https://staging.example.com"}function F_(){return ["Each pull request preview has its own address. Ripplo learns it from the comment that starts","the review: @ripplo review <preview-url>. To register every preview at once, use one * in the","hostname for the part that changes."]}function j_(){return "What do your preview addresses look like?"}function z_(){return "https://myapp-pr-*.example.com"}function N_(){return "Ripplo also needs one preview that is up right now, to test sign-in against."}function U_(){return "Which preview is up right now?"}function L_(){return "https://myapp-pr-123.example.com"}function M_({flag:e,value:t}){let r=je(`from --${e}`);return `${t} ${r}`}function B_({flag:e,reason:t}){return `--${e}: ${t}`}function V_(e){return `No terminal to ask in. Run setup in a terminal, or pass --${e}.`}function Z_(){return "Continue"}function W_(){return "Change it"}function G_(e){return `Sign-in connection ${e}`}function q_({redirectUris:e,scimBaseUrl:t,signInEntry:r}){return [`Sign-in page ${r}`,...e.map(i=>`Callback ${i}`),t==null?"SCIM off":`SCIM ${t}`]}function H_(e){return `Updated ${e}, client id and secret unchanged`}function J_(e){return `Created ${e}, set as the default connection`}function K_(){return "Ripplo signs in through your app's sign-in page. A path works for the pre-production server and every preview."}function Y_(){return "Which page starts sign-in with Ripplo?"}function X_(){return "/api/auth/oidc/start"}function Q_(){return "The callback your auth library uses for Ripplo sign-in."}function eE(){return "Where does your pre-production server receive the callback?"}function tE(e){return `${e}/api/auth/oauth2/callback/ripplo`}function nE(){return "The same callback on your previews, with the * where the address changes."}function rE(){return "Where do your previews receive the callback?"}function iE(e){return `${e}/api/auth/oauth2/callback/ripplo`}function Yh({connection:e,secret:t,settingsUrl:r}){return [`Client id ${e.clientId}`,...HP({secret:t,settingsUrl:r}),`Discovery URL ${e.discoveryUrl}`]}function HP({secret:e,settingsUrl:t}){return [`Client secret ${e??je("copy it from the settings page")}`,...e==null?[Ci(t)]:[]]}function oE(e){return [`Client id ${e.clientId}`,`Client secret ${je("\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022")}`,`Discovery URL ${e.discoveryUrl}`]}function aE(){return "Your existing secret will immediately stop working. Ripplo cannot sign in to your app until you update the secret there."}function sE(e){return `Client secret ${e}`}function uE(){return "Have you already registered Ripplo with your app?"}function cE(){return "Yes, continue"}function lE(){return "Give me a new secret"}function dE(){return "Rotate the secret"}function pE(){return "Keep the current secret"}function fE(){return ["Add Ripplo as a sign-in provider to your app","Set the three variables on your dev server and deploy"]}function mE(){return `Guides ${Ci(i_)}`}function hE(){return "Register Ripplo with your app now?"}function gE(){return "Now"}function yE(){return "Come back later (setup remembers your choices)"}function Xh(){return "Not finished. Run setup again to continue from here:"}function vE(){return "Give your app these three values, then deploy"}function Qh(){return ["Auth libraries read them from variables on your dev server, some also need a few lines of code. Keycloak takes them in its settings. An app that was already running needs a restart to read them.",`Guides for better-auth, next-auth and Keycloak: ${Ci(i_)}`]}function eg(){return "Is your app running with these three values? Deploy it, or restart it locally, then continue."}function bE(){return "Done"}function Vo(){return "Stop for now"}function SE(){return "Not finished. When the deploy is live, test authentication:"}function Ri(e){return `${e} --check`}function xE(){return "Updating the Ripplo plugin for Claude Code"}function DE(){return "Could not install the Ripplo plugin for Claude Code. Run claude plugin install ripplo@ripplo."}function _E(){return "Yes"}function EE(){return "No"}function wE(){return "Open Ripplo in your browser?"}function $E(){return "Claude Code is not installed. Install it, then run: claude plugin install ripplo@ripplo"}function kE(){return "Ripplo plugin installed in Claude Code"}function IE(){return "A tab will open and sign in to your app as a test user, the way a review run does. Nothing to type."}function OE(){return "Start test"}function CE(){return "Watch the tab that opened"}function RE(e){return [je("If no tab opened, use this link. It works once:"),Ci(e)]}function AE(){return "Waiting for your app to exchange the code"}function TE(e){return `Ripplo signed in through ${e}`}function PE(e){return {detail:e.length>0?[je(e)]:[],headline:"Ripplo could not sign in"}}function FE(e){return `No code exchange within ${String(e)} seconds. Is the deploy live, the sign-in page up, and the app restarted if needed?`}function jE(){return ""}function zE(){return "Test again"}function Gu(){return "Fix what the test named, deploy, then test again:"}function NE(){return "This project has no sign-in connection yet. Run setup first."}function UE(e){return `No Ripplo project is connected to ${e}. Run setup first.`}function LE(e){return `Ripplo's server rejected the request: ${e}`}function ME(){return "Done. Ripplo can sign in to your test app and review pull requests."}function BE({appUrl:e,projectUrl:t}){let r=Gh.default.bold(`@ripplo review ${e}`);return [`Project ${Ci(t)}`,`Review comment ${r} on any pull request`]}var VE=(()=>{let e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return t=>{let r=0;for(e.lastIndex=0;e.test(t);)r+=1;return t.length-r}})(),ZE=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,WE=e=>e===8987||e===9001||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e>=131072&&e<=196605||e>=196608&&e<=262141;var JP=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,KP=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,GE=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,YP=/\t{1,1000}/y,qE=new RegExp("[\\u{1F1E6}-\\u{1F1FF}]{2}|\\u{1F3F4}[\\u{E0061}-\\u{E007A}]{2}[\\u{E0030}-\\u{E0039}\\u{E0061}-\\u{E007A}]{1,3}\\u{E007F}|(?:\\p{Emoji}\\uFE0F\\u20E3?|\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation})(?:\\u200D(?:\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?|\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F\\u20E3?))*","yu"),XP=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,QP=new RegExp("\\p{M}+","gu"),eF={limit:1/0,ellipsis:""},HE=(e,t={},r={})=>{let i=t.limit??1/0,n=t.ellipsis??"",o=t?.ellipsisWidth??(n?HE(n,eF,r).width:0),a=0,u=r.controlWidth??0,c=r.tabWidth??8,l=r.emojiWidth??2,d=2,p=r.regularWidth??1,m=r.wideWidth??d,h=[[XP,p],[JP,a],[KP,u],[YP,c],[qE,l],[GE,m]],v=0,D=0,b=e.length,U=0,H=false,B=b,A=Math.max(0,i-o),O=0,z=0,ne=0,ce=0;e:for(;;){if(z>O||D>=b&&D>v){let be=e.slice(O,z)||e.slice(v,D);U=0;for(let ie of be.replaceAll(QP,"")){let F=ie.codePointAt(0)||0;if(ZE(F)?ce=d:WE(F)?ce=m:ce=p,ne+ce>A&&(B=Math.min(B,Math.max(O,v)+U)),ne+ce>i){H=true;break e}U+=ie.length,ne+=ce;}O=z=0;}if(D>=b)break e;for(let be=0,ie=h.length;be<ie;be++){let[F,j]=h[be];if(F.lastIndex=D,F.test(e)){if(U=F===GE?VE(e.slice(D,F.lastIndex)):F===qE?1:F.lastIndex-D,ce=U*j,ne+ce>A&&(B=Math.min(B,D+Math.floor((A-ne)/j))),ne+ce>i){H=true;break e}ne+=ce,O=v,z=D,D=v=F.lastIndex;continue e}}D+=1;}return {width:H?A:ne,index:H?B:b,truncated:H,ellipsed:H&&i>=o}},JE=HE;var tF={limit:1/0,ellipsis:"",ellipsisWidth:0},nF=(e,t={})=>JE(e,tF,t).width,Dn=nF;var qu="\x1B",ew="\x9B",rF=39,ng="\x07",tw="[",iF="]",nw="m",rg=`${iF}8;;`,KE=new RegExp(`(?:\\${tw}(?<code>\\d+)m|\\${rg}(?<uri>.*)${ng})`,"y"),YE=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},XE=e=>`${qu}${tw}${e}${nw}`,QE=e=>`${qu}${rg}${e}${ng}`,tg=(e,t,r)=>{let i=t[Symbol.iterator](),n=false,o=false,a=e.at(-1),u=a===void 0?0:Dn(a),c=i.next(),l=i.next(),d=0;for(;!c.done;){let p=c.value,m=Dn(p);u+m<=r?e[e.length-1]+=p:(e.push(p),u=0),(p===qu||p===ew)&&(n=true,o=t.startsWith(rg,d+1)),n?o?p===ng&&(n=false,o=false):p===nw&&(n=false):(u+=m,u===r&&!l.done&&(e.push(""),u=0)),c=l,l=i.next(),d+=p.length;}a=e.at(-1),!u&&a!==void 0&&a.length&&e.length>1&&(e[e.length-2]+=e.pop());},oF=e=>{let t=e.split(" "),r=t.length;for(;r&&!Dn(t[r-1]);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},aF=(e,t,r={})=>{if(r.trim!==false&&e.trim()==="")return "";let i="",n,o,a=e.split(" "),u=[""],c=0;for(let p=0;p<a.length;p++){let m=a[p];if(r.trim!==false){let v=u.at(-1)??"",D=v.trimStart();v.length!==D.length&&(u[u.length-1]=D,c=Dn(D));}p!==0&&(c>=t&&(r.wordWrap===false||r.trim===false)&&(u.push(""),c=0),(c||r.trim===false)&&(u[u.length-1]+=" ",c++));let h=Dn(m);if(r.hard&&h>t){let v=t-c,D=1+Math.floor((h-v-1)/t);Math.floor((h-1)/t)<D&&u.push(""),tg(u,m,t),c=Dn(u.at(-1)??"");continue}if(c+h>t&&c&&h){if(r.wordWrap===false&&c<t){tg(u,m,t),c=Dn(u.at(-1)??"");continue}u.push(""),c=0;}if(c+h>t&&r.wordWrap===false){tg(u,m,t),c=Dn(u.at(-1)??"");continue}u[u.length-1]+=m,c+=h;}r.trim!==false&&(u=u.map(p=>oF(p)));let l=u.join(`
359
+ `),d=false;for(let p=0;p<l.length;p++){let m=l[p];if(i+=m,d)d=false;else if(d=m>="\uD800"&&m<="\uDBFF",d)continue;if(m===qu||m===ew){KE.lastIndex=p+1;let v=KE.exec(l)?.groups;if(v?.code!==void 0){let D=Number.parseFloat(v.code);n=D===rF?void 0:D;}else v?.uri!==void 0&&(o=v.uri.length===0?void 0:v.uri);}if(l[p+1]===`
360
+ `){o&&(i+=QE(""));let h=n?YE(n):void 0;n&&h&&(i+=XE(h));}else m===`
361
+ `&&(n&&YE(n)&&(i+=XE(n)),o&&(i+=QE(o)));}return i},sF=/\r?\n/;function ig(e,t,r){return String(e).normalize().split(sF).map(i=>aF(i,t,r)).join(`
362
+ `)}var Tt=c(iw(),1);function Ju(e,t,r){if(!r.some(a=>!a.disabled))return e;let i=e+t,n=Math.max(r.length-1,0),o=i<0?n:i>n?0:i;return r[o]?.disabled?Ju(o,t<0?-1:1,r):o}var mF=["up","down","left","right","space","enter","cancel"],Ai={actions:new Set(mF),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]])};function gF(e){if(e!==void 0)return e;let t=process.env.ACCESSIBLE;return t!==void 0&&t!==""&&t!=="0"&&t!=="false"}function ow(e,t){if(typeof e=="string")return Ai.aliases.get(e)===t;for(let r of e)if(r!==void 0&&ow(r,t))return true;return false}function yF(e,t){if(e===t)return;let r=e.split(`
363
+ `),i=t.split(`
364
+ `),n=Math.max(r.length,i.length),o=[];for(let a=0;a<n;a++)r[a]!==i[a]&&o.push(a);return {lines:o,numLinesBefore:r.length,numLinesAfter:i.length,numLines:n}}globalThis.process.platform.startsWith("win");var ag=Symbol("clack:cancel");function sg(e){return e===ag}function Hu(e,t){let r=e;r.isTTY&&r.setRawMode(t);}var vF=e=>"rows"in e&&typeof e.rows=="number"?e.rows:20;function bF(e,t){if("~standard"in e){let r=e["~standard"].validate(t);return r instanceof Promise?r.then(i=>i.issues?.at(0)?.message):r.issues?.at(0)?.message}return e(t)}var Ku=class{input;output;_abortSignal;rl;opts;_render;_track=false;_prevFrame="";_subscribers=new Map;_cursor=0;state="initial";error="";value;userInput="";get accessible(){return gF(this.opts.accessible)}constructor(t,r=true){let{input:i=stdin,output:n=stdout,render:o,signal:a,...u}=t;this.opts=u,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=o.bind(this),this._track=r,this._abortSignal=a,this.input=i,this.output=n;}unsubscribe(){this._subscribers.clear();}setSubscriber(t,r){let i=this._subscribers.get(t)??[];i.push(r),this._subscribers.set(t,i);}on(t,r){this.setSubscriber(t,{cb:r});}once(t,r){this.setSubscriber(t,{cb:r,once:true});}emit(t,...r){let i=this._subscribers.get(t)??[],n=[];for(let o of i)o.cb(...r),o.once&&n.push(()=>i.splice(i.indexOf(o),1));for(let o of n)o();}prompt(){return new Promise(t=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),t(ag);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close();},{once:true});}this.rl=fF.createInterface({input:this.input,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:true}),this.rl.prompt(),this.opts.initialUserInput!==void 0&&this._setUserInput(this.opts.initialUserInput,true),this.input.on("keypress",this.onKeypress),Hu(this.input,true),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(Tt.cursor.show),this.output.off("resize",this.render),Hu(this.input,false),t(this.value);}),this.once("cancel",()=>{this.output.write(Tt.cursor.show),this.output.off("resize",this.render),Hu(this.input,false),t(ag);});})}_isActionKey(t,r){return t===" "}_shouldSubmit(t,r){return true}_setValue(t){this.value=t,this.emit("value",this.value);}_setUserInput(t,r){this.userInput=t??"",this.emit("userInput",this.userInput),r&&this._track&&this.rl&&(this.rl.write(this.userInput),this._cursor=this.rl.cursor);}_clearUserInput(){this.rl?.write(null,{ctrl:true,name:"u"}),this._setUserInput("");}async onKeypress(t,r){if(this.state!=="validating"){if(this._track&&r.name!=="return"&&(r.name&&this._isActionKey(t,r)&&this.rl?.write(null,{ctrl:true,name:"h"}),this._cursor=this.rl?.cursor??0,this._setUserInput(this.rl?.line)),this.state==="error"&&(this.state="active"),r?.name&&(!this._track&&Ai.aliases.has(r.name)&&this.emit("cursor",Ai.aliases.get(r.name)),Ai.actions.has(r.name)&&this.emit("cursor",r.name)),t&&(t.toLowerCase()==="y"||t.toLowerCase()==="n")&&this.emit("confirm",t.toLowerCase()==="y"),this.emit("key",t,r),r?.name==="return"&&this._shouldSubmit(t,r)){if(this.opts.validate){let i=bF(this.opts.validate,this.value),n;i instanceof Promise?(this.state="validating",this.render(),n=await i):n=i,n&&(this.error=n instanceof Error?n.message:n,this.state="error",this.rl?.write(this.userInput));}this.state!=="error"&&(this.state="submit");}ow([t,r?.name,r?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close();}}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
365
+ `),Hu(this.input,false),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe();}restoreCursor(){let t=ig(this._prevFrame,process.stdout.columns,{hard:true,trim:false}).split(`
366
+ `).length-1;this.output.write(Tt.cursor.move(-999,t*-1));}render(){let t=ig(this._render(this)??"",process.stdout.columns,{hard:true,trim:false});if(t!==this._prevFrame){if(this.state==="initial")this.output.write(Tt.cursor.hide);else {let r=yF(this._prevFrame,t),i=vF(this.output);if(this.restoreCursor(),r){let n=Math.max(0,r.numLinesAfter-i),o=Math.max(0,r.numLinesBefore-i),a=r.lines.find(u=>u>=n);if(a===void 0){this._prevFrame=t;return}if(r.lines.length===1){this.output.write(Tt.cursor.move(0,a-o)),this.output.write(Tt.erase.lines(1));let u=t.split(`
367
+ `);this.output.write(u[a]),this._prevFrame=t,this.output.write(Tt.cursor.move(0,u.length-a-1));return}else if(r.lines.length>1){if(n<o)a=n;else {let c=a-o;c>0&&this.output.write(Tt.cursor.move(0,c));}this.output.write(Tt.erase.down());let u=t.split(`
368
+ `).slice(a);this.output.write(u.join(`
369
+ `)),this._prevFrame=t;return}}this.output.write(Tt.erase.down());}this.output.write(t),this.state==="initial"&&(this.state="active"),this._prevFrame=t;}}};var aw=class extends Ku{options;cursor=0;get _selectedValue(){return this.options[this.cursor]}changeValue(){let t=this._selectedValue;this.value=t===void 0?void 0:t.value;}constructor(t){super(t,false),this.options=t.options;let r=this.options.findIndex(({value:n})=>n===t.initialValue),i=r===-1?0:r;this.cursor=this.options[i]?.disabled?Ju(i,1,this.options):i,this.changeValue(),this.on("cursor",n=>{switch(n){case "left":case "up":this.cursor=Ju(this.cursor,-1,this.options);break;case "down":case "right":this.cursor=Ju(this.cursor,1,this.options);break}this.changeValue();});}};var Yu=class extends Ku{get userInputWithCursor(){if(this.state==="submit")return this.userInput;let t=this.userInput;if(this.cursor>=t.length)return `${this.userInput}\u2588`;let r=t.slice(0,this.cursor),i=t.slice(this.cursor,this.cursor+1),n=t.slice(this.cursor+1);return `${r}${styleText("inverse",i)}${n}`}get cursor(){return this._cursor}constructor(t){super({...t,initialUserInput:t.initialUserInput??t.initialValue}),this.on("userInput",r=>{this._setValue(r);}),this.on("finalize",()=>{this.value||(this.value=t.defaultValue),this.value===void 0&&(this.value="");});}};var Pt=c(Mu(),1);var Ft=process.stdin.isTTY,cg=Symbol("cancel"),ug=" ",SF=80,uw=String.fromCodePoint(27),sw=`\r${uw}[2K`,cw=new RegExp(`${uw}\\[[\\d;]*m`,"gu"),xF=new Set(["\u2713","\u2717","\u2192","\u25CF","\u25CB","\u2026"]);function Qu(e){_t(`
370
+ ${Pt.default.bold(e)}`);}function at({title:e,why:t}){_t(`
371
+ ${Pt.default.bold(Pt.default.cyan(e))}`),_t(Le(je(t)));}function Ie(e){_t(Le(`${Pt.default.green("\u2713")} ${e}`));}function ec(e){_t(Le(`${Pt.default.red("\u2717")} ${e}`));}function qn(e){_t(Le(`${Pt.default.yellow("\u2192")} ${e}`));}function ze(e){_t(Le(e));}function Hn(e){_t(Le((typeof e=="string"?[e]:e).map(r=>je(r))));}function lw(){_t("");}function Tr(e,t=[]){_t(`
372
+ ${e}`),t.forEach(r=>{_t(`${ug}${r}`);}),_t("");}function Xe(e){_t(`
373
+ ${je(e)}
374
+ `),process.exit(0);}function Me(e,t=[]){ec(e),Tr(je("Stopped."),t),process.exit(1);}function tc(e){return process.stdout.write(Le(`${je("\u2026")} ${e}`)),{done:t=>{process.stdout.write(sw),Ie(t);},failed:t=>{process.stdout.write(sw),ec(t);}}}function nc(e){return pw({...e,layout:"column"})}function Et(e){return pw({...e,layout:"row"})}async function dw({message:e,placeholder:t,suggested:r,validate:i}){let o=await new Yu({initialValue:r,placeholder:t,render(){let a=t==null?"":je(`ex: ${t}`),u=Pt.default.inverse(" "),c=this.userInput.length===0?`${u} ${a}`:this.userInputWithCursor;switch(this.state){case "submit":return Le(`${Pt.default.green("\u2713")} ${this.value??""}`);case "cancel":return Le(je(e));case "error":{let l=Le(`${Pt.default.red("\u2717")} ${this.error}`);return [Le(e),Le(c),l].join(`
375
+ `)}case "initial":case "active":case "validating":return [Le(e),Le(c)].join(`
376
+ `)}},validate:a=>i(a??"")}).prompt();return sg(o)||typeof o!="string"?cg:o.trim()}function Ge(e){return e===cg}async function rc(e){try{await e();}catch(t){throw t instanceof ar&&Me(LE(t.message)),t}}function Jn(){return "npx ripplo setup"}async function pw({choices:e,layout:t,message:r}){let i=[...e],n=r==null?[]:[Le(r)],a=await new aw({options:i,render(){let u=i.find(c=>c.value===this.value);switch(this.state){case "submit":return Le(`${Pt.default.green("\u2713")} ${u?.label??""}`);case "cancel":return Le(je(r??"Stopped"));case "initial":case "active":case "error":case "validating":{let c=i.map((d,p)=>`${p===this.cursor?Pt.default.green("\u25CF"):je("\u25CB")} ${d.label}`),l=t==="row"?[Le(c.join(" "))]:c.map(d=>Le(d));return [...n,...l].join(`
377
+ `)}}}}).prompt();return sg(a)||typeof a!="string"?cg:a}function Le(e){let t=typeof e=="string"?[e]:e,r=process.stdout.columns,i=(r>0?r:SF)-ug.length;return t.flatMap(n=>n.length===0?[""]:DF(n,i).map(o=>ug+o)).join(`
378
+ `)}function DF(e,t){let[r="",...i]=e.split(" "),n=_F(r)?" ":"";return i.reduce((o,a)=>{let c=`${o.at(-1)??""} ${a}`;return EF(c)<=t?[...o.slice(0,-1),c]:[...o,`${n}${a}`]},[r])}function _F(e){let t=e.replaceAll(cw,"");return xF.has(t)}function EF(e){return e.replaceAll(cw,"").length}function _t(e){process.stdout.write(`${e}
379
+ `);}var kF=promisify(execFile),IF=s.object({stderr:s.string().optional(),stdout:s.string().optional()});async function ic({args:e,command:t,cwd:r}){try{let{stderr:i,stdout:n}=await kF(t,[...e],{cwd:r});return {ok:!0,stderr:i,stdout:n}}catch(i){return OF(i)}}function OF(e){let t=IF.safeParse(e),r=t.success?t.data.stderr??"":"",i=t.success?t.data.stdout??"":"",n=e instanceof Error?e.message:String(e);return {ok:false,stderr:r.length>0?r:n,stdout:i}}var CF=s.string().transform((e,t)=>{try{return JSON.parse(e)}catch{return t.addIssue({code:"custom",message:"not json"}),s.NEVER}});async function fw(){return (await Ti(["--version"])).ok}function Ti(e){return ic({args:e,command:"claude",cwd:void 0})}var RF=["user","project","local"],AF=s.array(s.object({id:s.string(),version:s.string()}));async function mw(){if(await TF()===Fu())return "ready";await Ti(["plugin","marketplace","add","ripplo/claude-plugin"]),await Ti(["plugin","marketplace","update","ripplo"]);let e=await Ti(["plugin","install","ripplo@ripplo"]),t=/already installed/i.test(`${e.stdout}${e.stderr}`);return !e.ok&&!t?"install-failed":(t&&await Promise.all(RF.map(r=>Ti(["plugin","update","ripplo","--scope",r]))),"ready")}async function TF(){let e=await Ti(["plugin","list","--json"]);if(!e.ok)return;let t=CF.pipe(AF).safeParse(e.stdout);return t.success?t.data.find(r=>r.id==="ripplo@ripplo")?.version:void 0}async function hw(){if(at(At("claude")),!await fw()){ze($E());return}if(ze(xE()),await mw()==="install-failed"){ec(DE());return}Ie(kE());}var PF=/^(?:https:\/\/github\.com\/|git@github\.com:)([^/]+)\/([^/]+?)(?:\.git)?\/?$/;async function oc(e){let t=await ic({args:["remote","get-url","origin"],command:"git",cwd:e}),r=t.stdout.trim();if(!t.ok||r.length===0)return de({kind:"no-remote"});let i=gw(r);return i==null?de({kind:"not-github",remote:r}):Fe(i)}function Zo(e,t){let r=e==null?void 0:gw(e);return r!=null&&r.owner.toLowerCase()===t.owner.toLowerCase()&&r.repo.toLowerCase()===t.repo.toLowerCase()}function gw(e){let t=PF.exec(e),r=t?.[1],i=t?.[2];if(!(r==null||i==null))return {owner:r,repo:i,url:`https://github.com/${r}/${i}`}}async function yw(e){let t=Sn();t==null&&Me(Ar());let r=xn(t),[i,n]=await Promise.all([oc(e),Oi(r)]),o=i.match(c=>c,c=>Me(Zu(c))),a=`${o.owner}/${o.repo}`,u=n.find(c=>Zo(c.repoUrl,o));return u==null&&Me(UE(a)),{connection:r,project:u}}function vw(){return rc(()=>FF(process.cwd()))}async function FF(e){let{connection:t,project:r}=await yw(e);Qu(Vu()),await Wo({connection:t,project:r});}async function jF(e){if(at(At("open")),!Ft)return;let t=await Et({choices:[{label:_E(),value:"yes"},{label:EE(),value:"no"}],message:wE()});Ge(t)&&Xe(Ye()),t==="yes"&&hr(e);}async function zF(){if(!Ft)return;Hn(IE());let e=await Et({choices:[{label:OE(),value:"start"},{label:Vo(),value:"stop"}],message:void 0});(Ge(e)||e==="stop")&&Me(Gu(),[Ri(Jn())]);}async function bw(e){if(await NF(e))return;Ft||Me(Gu(),[Ri(Jn())]);let r=await Et({choices:[{label:zE(),value:"again"},{label:Vo(),value:"stop"}],message:jE()});return (Ge(r)||r==="stop")&&Me(Gu(),[Ri(Jn())]),bw(e)}async function NF({connection:e,connectionId:t,name:r}){let i=await HD({connection:e,connectionId:t});qn(CE()),hr(i.url),ze(RE(i.url));let n=tc(AE()),o=await Zh({connection:e,remainingMs:Bo,runId:i.runId});if(o.kind==="signedIn")return n.done(TE(r)),true;if(o.kind==="timedOut")return n.failed(FE(Bo/1e3)),false;let a=PE(o.detail);return n.failed(a.headline),ze(a.detail),false}async function Wo({connection:e,project:t}){let r=t.defaultAuthConnection;if(r?.oidc==null&&Me(NE()),at(At("check")),await zF(),await bw({connection:e,connectionId:r.id,name:r.name}),await hw(),await jF(KD({connection:e,projectId:t.id})),t.cloudBaseUrl==null||t.cloudBaseUrl.length===0)throw new Error("checked-project-without-app-url");Tr(ME(),BE({appUrl:t.cloudBaseUrl,projectUrl:Vh({connection:e,projectId:t.id})}));}var Go=["staging","previews","both"];async function Pr({flag:e,given:t,hint:r,message:i,placeholder:n,schema:o,suggested:a}){if(t!=null)return lg({flag:e,given:t,schema:o});Fr(e),Hn(r);let u=await dw({message:i,placeholder:n,suggested:a,validate:c=>UF(o.safeParse(c))});return Ge(u)&&Xe(Ye()),u}function lg({flag:e,given:t,schema:r}){let i=r.safeParse(t);return i.success||Me(B_({flag:e,reason:Sw(i.error)})),Ie(M_({flag:e,value:i.data})),i.data}function Fr(e){Ft||Me(V_(e));}function UF(e){return e.success?void 0:Sw(e.error)}async function jr(){if(!Ft)return "continue";let e=await Et({choices:[{label:Z_(),value:"continue"},{label:W_(),value:"change"}],message:void 0});return Ge(e)&&Xe(Ye()),e==="change"?"change":"continue"}function Sw(e){let[t]=e.issues;if(t==null)throw new Error("zod-failure-without-issue");return t.message}async function xw({answers:e,connection:t,existing:r,repo:i}){if(r!=null)return Ie(E_(r.name)),await jr()==="change"&&(ze(w_(r.name)),Xe(Ye())),{kind:"existing",project:r};let n=await LF({answers:e,connection:t});return Ie($_({organization:n.name,repo:i})),{kind:"new",organization:n,repo:i}}async function Dw({connection:e,installation:t,plan:r,repository:i}){return r.kind==="existing"?r.project:(await VD({connection:e,installationId:t.installationId,name:i.name,organizationId:r.organization.id,repoUrl:i.url})).match(o=>(Ie(k_(o.name,r.organization.name)),o),o=>Me(I_(o.message)))}async function LF({answers:e,connection:t}){let r=await LD(t),[i]=r;if(i==null&&Me(x_()),r.length===1)return Ie(Jh(i.name)),i;let n=r.find(u=>u.name===e.organization);if(n!=null)return Ie(Jh(n.name)),n;Fr("organization");let o=await nc({choices:r.map(u=>({label:u.limitStatus.canCreateProject?Kh({name:u.name,...u.limitStatus}):__({name:u.name,...u.limitStatus}),value:u.id})),message:D_()}),a=r.find(u=>u.id===o);return (Ge(o)||a==null)&&Xe(Ye()),a}function _w(e){let t=Ew(e.cloudBaseUrl);if(t==null)return;let r=e.defaultAuthConnection?.oidc?.redirectUris??[],i=r.find(a=>vi(a)?.kind==="host-pattern"),n=r.filter(a=>vi(a)?.kind==="exact"),o=i;return o==null?{appUrl:t,environments:"staging",previewUrl:void 0}:{appUrl:t,environments:n.length===0?"previews":"both",previewUrl:MF(o)}}function MF(e){let t=e.indexOf("/",e.indexOf("//")+2);return t===-1?e:e.slice(0,t)}async function dg({answers:e,connection:t,project:r}){let i=await BF(e),n=i==="staging"?void 0:await VF(e),o=await ZF({answers:e,environments:i,project:r});return await ZD({appUrl:o,connection:t,id:r.id}),{appUrl:o,environments:i,previewUrl:n}}async function BF(e){if(e.environments!=null)return Ie(C_(e.environments)),e.environments;Fr("environments");let t=await nc({choices:Go.map(i=>({label:Wu(i),value:i})),message:O_()}),r=Go.find(i=>i===t);return (Ge(t)||r==null)&&Xe(Ye()),r}async function VF(e){return Pr({flag:"preview-url",given:e.previewUrl,hint:F_(),message:j_(),placeholder:z_(),schema:bm,suggested:void 0})}async function ZF({answers:e,environments:t,project:r}){let i=t==="previews",n=await Pr({flag:"app-url",given:e.appUrl,hint:i?N_():A_(),message:i?U_():T_(),placeholder:i?L_():P_(),schema:Zs,suggested:Ew(r.cloudBaseUrl)});return new URL(n).origin}function Ew(e){return e==null||e.length===0?void 0:e}async function ww({connection:e,created:t,project:r}){let i=Bh({connection:e,projectId:r.id});if(!Ft){kw({created:t,settingsUrl:i});return}let n=await Et({choices:[{label:gE(),value:"now"},{label:yE(),value:"later"}],message:hE()});if(Ge(n)&&Xe(Ye()),n==="later"){Tr(Xh(),[Jn()]);return}qn(vE()),ze(Yh({connection:t,secret:t.secret,settingsUrl:i})),Hn(Qh()),await Iw(eg());let o=await WF({connection:e,id:r.id});await Wo({connection:e,project:o});}async function $w({connection:e,created:t,project:r}){if(!Ft){kw({created:t,settingsUrl:Bh({connection:e,projectId:r.id})});return}ze(oE(t));let i=await Et({choices:[{label:cE(),value:"continue"},{label:lE(),value:"rotate"}],message:uE()});if(Ge(i)&&Xe(Ye()),i==="rotate"){Hn(aE());let n=await Et({choices:[{label:dE(),value:"rotate"},{label:pE(),value:"keep"}],message:void 0});if(Ge(n)||n==="keep"){await Wo({connection:e,project:r});return}let o=await qD({connection:e,connectionId:t.id});ze(sE(o)),Hn(Qh()),await Iw(eg());}await Wo({connection:e,project:r});}function kw({created:e,settingsUrl:t}){fE().forEach(r=>{qn(r);}),ze(mE()),lw(),ze(Yh({connection:e,secret:null,settingsUrl:t})),Tr(SE(),[Ri(Jn())]);}async function Iw(e){let t=await Et({choices:[{label:bE(),value:"done"},{label:Vo(),value:"stop"}],message:e});(Ge(t)||t==="stop")&&(Tr(Xh(),[Jn()]),process.exit(0));}async function WF({connection:e,id:t}){let i=(await Oi(e)).find(n=>n.id===t);if(i==null)throw new Error("project-vanished-during-setup");return i}async function Ow(e){let{answers:t,connection:r,project:i}=e,n=i.defaultAuthConnection;at(At("url"));let o=await GF({answers:t,connection:r,project:i});if(at(At("auth")),at(Bu("ripplo")),n?.oidc==null){let u=await qF({answers:t,connection:r,project:i,targets:o});at(Bu("app")),await ww({connection:r,created:u,project:i});return}let a=await YF({answers:t,connection:r,existing:n,targets:o});at(Bu("app")),await $w({connection:r,created:a,project:i});}async function GF({answers:e,connection:t,project:r}){let i=_w(r);return i==null?dg({answers:e,connection:t,project:r}):(R_(i).forEach(o=>{Ie(o);}),await jr()==="change"?dg({answers:e,connection:t,project:r}):i)}async function qF({answers:e,connection:t,project:r,targets:i}){let n=await Cw({answers:e,existingUris:[],targets:i}),o=await WD({connection:t,project:r,values:n});return Ie(J_(o.connection.name)),Rw({connection:o.connection,secret:o.clientSecret})}async function Cw({answers:e,existingUris:t,targets:r}){let i=await Pr({flag:"sign-in-page",given:e.signInPage,hint:K_(),message:Y_(),placeholder:X_(),schema:Ws,suggested:void 0});return {redirectUris:await HF({answers:e,existingUris:t,targets:r}),signInEntry:i}}async function HF({answers:e,existingUris:t,targets:r}){if(e.redirectUris.length>0)return e.redirectUris.map(o=>lg({flag:"redirect-uri",given:o,schema:cr}));Fr("redirect-uri");let i=r.environments==="previews"?[]:[await JF({appUrl:r.appUrl,suggested:t[0]})],n=r.previewUrl==null?[]:[await KF(r.previewUrl)];return [...i,...n]}function JF({appUrl:e,suggested:t}){return Pr({flag:"redirect-uri",given:void 0,hint:Q_(),message:eE(),placeholder:tE(e),schema:cr,suggested:t})}function KF(e){return Pr({flag:"redirect-uri",given:void 0,hint:nE(),message:rE(),placeholder:iE(e),schema:cr,suggested:void 0})}function Rw({connection:e,secret:t}){let r=e.oidc;if(r==null)throw new Error("connection-without-oidc");return {...r,id:e.id,name:e.name,secret:t}}async function YF({answers:e,connection:t,existing:r,targets:i}){let n=r.oidc;if(n==null)throw new Error("existing-connection-without-oidc");let o=r.webhookSecret??null;if(Ie(G_(r.name)),ze(q_(n)),await jr()==="continue")return {...n,id:r.id,name:r.name,secret:o};let u=await Cw({answers:e,existingUris:n.redirectUris,targets:i}),c=await GD({connection:t,id:r.id,name:r.name,scimBaseUrl:n.scimBaseUrl,values:u});return Ie(H_(c.name)),Rw({connection:c,secret:o})}var Aw=3e3,Tw=200,Pw=Aw*Tw/6e4;function Fw(e){return rc(()=>QF({answers:e,cwd:process.cwd()}))}async function QF({answers:e,cwd:t}){let r=await e1(t),i=`${r.owner}/${r.repo}`;Qu(Vu()),at(At("signIn"));let n=await t1();at(At("project"));let a=(await Oi(n)).find(h=>Zo(h.repoUrl,r)),u=await xw({answers:e,connection:n,existing:a,repo:i});at(At("github"));let c=await Mh({accountLogin:r.owner,connection:n});c!=null&&Ie(qh(r.owner));let l=c??await i1({connection:n,owner:r.owner}),d=await Nw({connection:n,remote:r});d!=null&&Ie(Hh(i));let p=d??await o1({connection:n,remote:r}),m=await Dw({connection:n,installation:l,plan:u,repository:p});await Ow({answers:e,connection:n,project:m});}async function e1(e){return (await oc(e)).match(r=>r,r=>Me(Zu(r)))}async function t1(){let e=Sn(),t=e==null?void 0:await Mo(e);if(e!=null&&t?.kind==="ok"){if(Ie(a_(t.viewer.email)),await jr()==="continue")return xn(e);Fo(Rr());}await Po({lookupViewer:Mo,serverUrl:Rr()});let r=Sn();return r==null&&Me(Ar()),xn(r)}async function jw({choice:e,connection:t,done:r,probe:i,question:n,timedOut:o,waiting:a}){let u=await MD(t);if(u==null)throw new Error("server-without-github-install-url");await n1({choice:e,question:n});let c=r1(u);hr(c),ze(f_(c));let l=tc(a),d=await zw({probe:i,remaining:Tw});return d==null&&(l.failed(o),Xe(Ye())),l.done(r),d}async function n1({choice:e,question:t}){if(!Ft)return;let r=await Et({choices:[{label:e,value:"open"},{label:p_(),value:"stop"}],message:t});(Ge(r)||r==="stop")&&Xe(Ye());}function r1(e){let t=new URL(e);return t.searchParams.set("state","cli"),t.toString()}async function zw({probe:e,remaining:t}){return t===0?void 0:(await setTimeout$1(Aw),await e()??zw({probe:e,remaining:t-1}))}function i1({connection:e,owner:t}){return ze(s_(t)),qn(u_(t)),jw({choice:d_(),connection:e,done:qh(t),question:l_(),timedOut:h_({minutes:Pw,owner:t}),waiting:m_(),probe:()=>Mh({accountLogin:t,connection:e})})}async function Nw({connection:e,remote:t}){return (await BD(e)).find(i=>Zo(i.url,t))}function o1({connection:e,remote:t}){let r=`${t.owner}/${t.repo}`;return ze(g_(r)),qn(c_(r)),jw({choice:v_(),connection:e,done:Hh(r),question:y_(r),timedOut:S_({minutes:Pw,repo:r}),waiting:b_(r),probe:()=>Nw({connection:e,remote:t})})}var c1=createRequire$1(import.meta.url);function Uw(e,t){try{return c1.resolve(e)}catch{return fileURLToPath(new URL(`assets/${t}`,import.meta.url))}}function Lw(e){let t;return ()=>(t??=readFile(e,"utf8"),t)}var d1={height:800,width:1280};async function Mw(e){let t=await readFile(e,"utf8");return _o(t).flatMap(r=>r.kind==="rrweb"?[r.event]:[])}var p1=s.object({data:s.looseObject({height:s.number(),width:s.number()}),type:s.literal(4)});function ac(e){let t=e.flatMap(r=>{let i=p1.safeParse(r);return i.success?[i.data]:[]})[0];return t==null?d1:{height:t.data.height,width:t.data.width}}function Bw(){return import('playwright').then(({chromium:e})=>e.launch({args:["--no-sandbox"],headless:true})).catch(()=>null)}var Vw=Lw(Uw("@ripplo/rrweb-bundle/replay","rrweb-replay.js"));function Zw({events:e,styleRules:t,useVirtualDom:r}){globalThis.__ripploSnapshotReplayer=new globalThis.__RipploReplayer(e,{insertStyleRules:t,mouseTail:false,root:document.body,showWarning:false,useVirtualDom:r});}function Ww(e){globalThis.__ripploSnapshotReplayer?.pause(e+.5);}function Gw({frameSelector:e}){let t=document.querySelector(e)?.contentDocument;return t==null?false:(t.documentElement.getBoundingClientRect(),[...t.querySelectorAll('link[rel~="stylesheet"]')].every(i=>i.disabled||i.sheet!=null)&&t.fonts.status==="loaded")}async function qw(){await new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>{e();}));});}function Hw({documentPrefix:e,frameSelector:t}){let r=globalThis.__ripploSnapshotReplayer,i=document.querySelector(t)?.contentDocument;if(r==null||i==null)return "";let n=r.getMirror();return [...i.querySelectorAll("*")].forEach(o=>{let a=n.getId(o);a!=null&&a>0&&(o.dataset.rrwebId=String(a));}),`${e}${i.documentElement.outerHTML}`}function Jw({frameSelector:e}){let t=document.querySelector(e)?.contentDocument;if(t==null)return [];let r=n=>[...n.childNodes].filter(o=>o.nodeType===3).map(o=>o.textContent??"").join(" ").replaceAll(/\s+/gu," ").trim(),i=n=>{if(n==null)return null;let o=n.dataset.rrwebId;if(o==null)return null;let a=Number.parseInt(o,10);return Number.isSafeInteger(a)&&a>0?a:null};return [...t.querySelectorAll("*")].map(n=>({attributes:Object.fromEntries([...n.attributes].map(o=>[o.name,o.value])),directText:r(n),parentRrwebId:i(n.parentElement),rrwebId:i(n),tagName:n.tagName.toLowerCase()}))}function Kw({frameSelector:e,rrwebId:t}){let r=document.querySelector(e)?.contentDocument,i=r?.defaultView;if(r==null||i==null)throw new Error("snapshot-document-missing");let n=[...r.querySelectorAll(`[data-rrweb-id="${String(t)}"]`)][0];return n==null?Promise.resolve(null):new Promise((o,a)=>{let u=new i.IntersectionObserver(c=>{u.disconnect();let l=c[0];if(l==null){a(new Error("snapshot-intersection-missing"));return}let d=l.intersectionRect;o(l.intersectionRatio>0?{height:d.height,width:d.width,x:d.x,y:d.y}:null);});u.observe(n);})}var cn=".replayer-wrapper iframe",Yw=`<!doctype html>
380
+ `;function Xw(e){return e.screenshot({animations:"disabled",timeout:1e4,type:"png"})}var m1="outline: 2px solid #ff4040 !important; outline-offset: 2px !important;";async function Qw({page:e,pngPath:t,rrwebId:r}){let i=e.locator(cn).first(),n=e.frameLocator(cn).locator(`[data-rrweb-id="${String(r)}"]`),o=await i.boundingBox(),a=await n.count()===1;if(o==null||!a||!await n.isVisible())return {kind:"unavailable",rrwebId:r};let u=h1.nullable().parse(await e.evaluate(Kw,{frameSelector:cn,rrwebId:r}));if(u==null)return {kind:"unavailable",rrwebId:r};let c={...u,x:u.x+o.x,y:u.y+o.y};if(c.width<=0||c.height<=0)return {kind:"unavailable",rrwebId:r};let l=`[data-rrweb-id="${String(r)}"] { ${m1} }`,d=`${t}.element-${String(r)}.png`,p=`${t}.element-${String(r)}.context.png`;await writeFile(d,await i.screenshot({animations:"disabled",style:l,timeout:1e4}));let m=g1({inner:{height:c.height+200,width:c.width+240,x:c.x-120,y:c.y-100},outer:o});return await e.screenshot({animations:"disabled",clip:m,path:p,style:l,timeout:1e4}),{cropPath:p,fullPath:d,kind:"visible",rrwebId:r}}var h1=s.object({height:s.number().nonnegative(),width:s.number().nonnegative(),x:s.number(),y:s.number()});function g1({inner:e,outer:t}){let r=Math.max(t.x,e.x),i=Math.max(t.y,e.y);return {height:Math.min(t.y+t.height,e.y+e.height)-i,width:Math.min(t.x+t.width,e.x+e.width)-r,x:r,y:i}}async function e$(e){await e.addInitScript(y1);}function y1(){Reflect.set(globalThis,"__name",e=>e);}var S1=".replayer-mouse, .replayer-mouse-tail { display: none; }";function t$(e){return `<!doctype html><html><head><style>
381
+ html, body { margin: 0; padding: 0; }
382
+ .replayer-wrapper { position: relative; }
383
+ ${S1}
384
+ iframe { border: none; }
385
+ </style></head><body></body></html>`}async function n$({browser:e,events:t}){let r=await e.newContext({viewport:ac(t)});await e$(r);let i=await r.newPage();return await i.setContent(t$()),await i.addScriptTag({content:await Vw()}),await i.evaluate(Zw,{events:t,styleRules:[...Lm],useVirtualDom:false}),i}async function r$({offsetMs:e,page:t}){await t.evaluate(Ww,e),await t.waitForFunction(Gw,{frameSelector:cn},{timeout:1e4}),await t.evaluate(qw);}function o$({offsetMs:e,outDir:t}){let r=`snapshot-${String(Math.round(e))}ms-${randomUUID()}`;return {htmlPath:zh.join(t,`${r}.html`),pngPath:zh.join(t,`${r}.png`)}}var k1=s.object({attributes:s.record(s.string(),s.string()),directText:s.string(),parentRrwebId:s.number().int().positive().nullable(),rrwebId:s.number().int().positive().nullable(),tagName:s.string().min(1)}),I1=s.array(k1);function s$(e){return O1({...e,focusRrwebId:void 0})}async function O1({behaviorFile:e,focusRrwebId:t,moment:r,outDir:i,runId:n}){if(!existsSync(e))return de({kind:"run-not-found",runId:n});let o=await Mw(e),a=o[0],u=o.at(-1);if(a==null||u==null)return de({kind:"no-rrweb-events",runId:n});let c=u.timestamp-a.timestamp,l=r.kind==="offset"?r.offsetMs:r.at-a.timestamp;if(l<0||l>c)return de({durationMs:c,firstTimestamp:a.timestamp,kind:"moment-out-of-range",lastTimestamp:u.timestamp,moment:r});let d=l,{htmlPath:p,pngPath:m}=o$({offsetMs:d,outDir:i});return (await C1({events:o,focusRrwebId:t,htmlPath:p,offsetMs:d,pngPath:m})).map(({elementIndex:v,preview:D})=>({durationMs:c,elementIndex:v,htmlPath:p,offsetMs:d,pngPath:m,preview:D,viewport:ac(o)}))}async function C1({events:e,focusRrwebId:t,htmlPath:r,offsetMs:i,pngPath:n}){let o=await Bw();if(o==null)return de({detail:"chromium-launch",kind:"browser-failed"});try{let{elementIndex:a,html:u,png:c,preview:l}=await A1({browser:o,events:e,focusRrwebId:t,offsetMs:i,pngPath:n});return c.length===0?de({detail:R1,kind:"browser-failed"}):(await a$({data:c,destination:n}),await a$({data:u,destination:r}),Fe({elementIndex:a,preview:l}))}catch(a){return de({detail:a instanceof Error?a.message:String(a),kind:"browser-failed"})}finally{await o.close();}}var R1="screenshot-empty";async function a$({data:e,destination:t}){let r=`${t}.${randomUUID()}.tmp`;await writeFile(r,e),await rename(r,t).finally(()=>rm$1(r,{force:true}));}async function A1({browser:e,events:t,focusRrwebId:r,offsetMs:i,pngPath:n}){let o=await n$({browser:e,events:t});await r$({offsetMs:i,page:o});let a=o.locator(cn).first(),u=await a.count()>0?a:o,c=await Xw(u),l=s.string().parse(await o.evaluate(Hw,{documentPrefix:Yw,frameSelector:cn})),d=I1.parse(await o.evaluate(Jw,{frameSelector:cn})),p=r==null?void 0:await Qw({page:o,pngPath:n,rrwebId:r});return {elementIndex:d,html:l,png:c,preview:p}}function u$(){return "Pass exactly one of --at <epoch ms from behavior.jsonl> or --offset <ms from the start of the recording>."}function c$(e){switch(e.kind){case "run-not-found":return `No behavior.jsonl for run ${e.runId}.`;case "no-rrweb-events":return `Run ${e.runId} has no rrweb events, nothing to replay.`;case "moment-out-of-range":return `${e.moment.kind==="offset"?"--offset":"--at"} is outside the recording, which spans ${String(e.firstTimestamp)} to ${String(e.lastTimestamp)} (duration ${String(e.durationMs)}ms).`;case "browser-failed":return `Replay browser failed (${e.detail}). Try \`npx playwright install chromium\`.`}}async function l$({at:e,offset:t,runId:r}){let i=T1({at:e,offset:t});i==null&&(process.stderr.write(`${u$()}
386
+ `),process.exit(1));let n=await zu(r);n.isErr()&&(process.stderr.write(`${Nu(n.error)}
387
+ `),process.exit(1)),(await s$({behaviorFile:n.value,moment:i,outDir:Nh(r),runId:r})).match(a=>{let u={durationMs:a.durationMs,htmlPath:a.htmlPath,offsetMs:a.offsetMs,pngPath:a.pngPath,viewport:a.viewport};process.stdout.write(`${JSON.stringify(u,null,2)}
388
+ `);},a=>{process.stderr.write(`${c$(a)}
389
+ `),process.exit(1);});}function T1({at:e,offset:t}){if(e!=null&&t==null)return {at:e,kind:"absolute"};if(t!=null&&e==null)return {kind:"offset",offsetMs:t}}function d$(e){return e instanceof Error?e.message:String(e)}ih();async function P1(){await CD(yh(process.argv)).scriptName("ripplo").version(Fu()).command("login","Sign in through your browser",()=>{},()=>Po({lookupViewer:Mo,serverUrl:Rr()})).command("logout","Remove the saved token",()=>{},()=>{Fo(Rr());}).command("setup","Connect this repository to Ripplo",e=>e.option("check",{default:false,describe:`Test authentication: sign in through the connection in your browser. Waits up to ${String(Bo/1e3)} seconds.`,type:"boolean"}).option("environments",{choices:Go,describe:"Answer for the environments prompt",type:"string"}).option("app-url",{describe:"Answer for the app URL prompt: the pre-production server, or a preview that is up now",type:"string"}).option("preview-url",{describe:"Answer for the preview address prompt, with one * in the hostname",type:"string"}).option("sign-in-page",{describe:"Answer for the sign-in page prompt, a path like /api/auth/oidc/start",type:"string"}).option("redirect-uri",{array:true,default:[],describe:"Answer for the redirect URI prompts, your auth library's callback for Ripplo. Repeat for previews.",type:"string"}).option("organization",{describe:"Answer for the organization prompt, by name, when you belong to several",type:"string"}),e=>e.check?vw():Fw({appUrl:e["app-url"],environments:e.environments,organization:e.organization,previewUrl:e["preview-url"],redirectUris:e["redirect-uri"],signInPage:e["sign-in-page"]})).command("review <codeReviewId>","Print the published issues and uncovered workflows of a code review (JSON)",e=>e.positional("codeReviewId",{demandOption:true,type:"string"}),e=>UD({codeReviewId:e.codeReviewId})).command("explain <runId>","Print what failed in a run, step by step, with nearby evidence (JSON)",e=>e.positional("runId",{demandOption:true,type:"string"}),e=>jD({runId:e.runId})).command("snapshot <runId>","Render the page at a moment of a run to PNG and rrweb-tagged HTML",e=>e.positional("runId",{demandOption:true,type:"string"}).option("at",{describe:"Epoch ms from behavior.jsonl",type:"number"}).option("offset",{describe:"Ms from the start of the recording",type:"number"}),e=>l$({at:e.at,offset:e.offset,runId:e.runId})).strict().help().parse();}P1().catch(e=>{process.stderr.write(`${d$(e)}
390
+ `),process.exit(1);});/*! Bundled license information:
391
+
392
+ yargs-parser/build/lib/string-utils.js:
393
+ yargs-parser/build/lib/tokenize-arg-string.js:
394
+ yargs-parser/build/lib/yargs-parser-types.js:
395
+ yargs-parser/build/lib/yargs-parser.js:
396
+ (**
397
+ * @license
398
+ * Copyright (c) 2016, Contributors
399
+ * SPDX-License-Identifier: ISC
400
+ *)
401
+
402
+ yargs-parser/build/lib/index.js:
403
+ (**
404
+ * @fileoverview Main entrypoint for libraries using yargs-parser in Node.js
405
+ *
406
+ * @license
407
+ * Copyright (c) 2016, Contributors
408
+ * SPDX-License-Identifier: ISC
409
+ *)
410
+ */export{P1 as main};