fjall 7.3.0 → 9.0.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.
@@ -1,106 +1,106 @@
1
1
  import { createRequire as __fjcreateRequire } from "module";
2
2
  const require = __fjcreateRequire(import.meta.url);
3
3
 
4
- var Bk=Object.create;var fd=Object.defineProperty;var Vk=Object.getOwnPropertyDescriptor;var Gk=Object.getOwnPropertyNames;var Zk=Object.getPrototypeOf,Wk=Object.prototype.hasOwnProperty;var ds=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var I=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Pt=(e,t)=>{for(var n in t)fd(e,n,{get:t[n],enumerable:!0})},Hk=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Gk(t))!Wk.call(e,r)&&r!==n&&fd(e,r,{get:()=>t[r],enumerable:!(i=Vk(t,r))||i.enumerable});return e};var qk=(e,t,n)=>(n=e!=null?Bk(Zk(e)):{},Hk(t||!e||!e.__esModule?fd(n,"default",{value:e,enumerable:!0}):n,e));var se=I((see,cP)=>{"use strict";var{FORCE_COLOR:y6,NODE_DISABLE_COLORS:S6,TERM:_6}=process.env,q={enabled:!S6&&_6!=="dumb"&&y6!=="0",reset:te(0,0),bold:te(1,22),dim:te(2,22),italic:te(3,23),underline:te(4,24),inverse:te(7,27),hidden:te(8,28),strikethrough:te(9,29),black:te(30,39),red:te(31,39),green:te(32,39),yellow:te(33,39),blue:te(34,39),magenta:te(35,39),cyan:te(36,39),white:te(37,39),gray:te(90,39),grey:te(90,39),bgBlack:te(40,49),bgRed:te(41,49),bgGreen:te(42,49),bgYellow:te(43,49),bgBlue:te(44,49),bgMagenta:te(45,49),bgCyan:te(46,49),bgWhite:te(47,49)};function sP(e,t){let n=0,i,r="",o="";for(;n<e.length;n++)i=e[n],r+=i.open,o+=i.close,t.includes(i.close)&&(t=t.replace(i.rgx,i.close+i.open));return r+t+o}function E6(e,t){let n={has:e,keys:t};return n.reset=q.reset.bind(n),n.bold=q.bold.bind(n),n.dim=q.dim.bind(n),n.italic=q.italic.bind(n),n.underline=q.underline.bind(n),n.inverse=q.inverse.bind(n),n.hidden=q.hidden.bind(n),n.strikethrough=q.strikethrough.bind(n),n.black=q.black.bind(n),n.red=q.red.bind(n),n.green=q.green.bind(n),n.yellow=q.yellow.bind(n),n.blue=q.blue.bind(n),n.magenta=q.magenta.bind(n),n.cyan=q.cyan.bind(n),n.white=q.white.bind(n),n.gray=q.gray.bind(n),n.grey=q.grey.bind(n),n.bgBlack=q.bgBlack.bind(n),n.bgRed=q.bgRed.bind(n),n.bgGreen=q.bgGreen.bind(n),n.bgYellow=q.bgYellow.bind(n),n.bgBlue=q.bgBlue.bind(n),n.bgMagenta=q.bgMagenta.bind(n),n.bgCyan=q.bgCyan.bind(n),n.bgWhite=q.bgWhite.bind(n),n}function te(e,t){let n={open:`\x1B[${e}m`,close:`\x1B[${t}m`,rgx:new RegExp(`\\x1b\\[${t}m`,"g")};return function(i){return this!==void 0&&this.has!==void 0?(this.has.includes(e)||(this.has.push(e),this.keys.push(n)),i===void 0?this:q.enabled?sP(this.keys,i+""):i+""):i===void 0?E6([e],[n]):q.enabled?sP([n],i+""):i+""}}cP.exports=q});var lP=I((cee,uP)=>{"use strict";uP.exports=(e,t)=>{if(!(e.meta&&e.name!=="escape")){if(e.ctrl){if(e.name==="a")return"first";if(e.name==="c"||e.name==="d")return"abort";if(e.name==="e")return"last";if(e.name==="g")return"reset"}if(t){if(e.name==="j")return"down";if(e.name==="k")return"up"}return e.name==="return"||e.name==="enter"?"submit":e.name==="backspace"?"delete":e.name==="delete"?"deleteForward":e.name==="abort"?"abort":e.name==="escape"?"exit":e.name==="tab"?"next":e.name==="pagedown"?"nextPage":e.name==="pageup"?"prevPage":e.name==="home"?"home":e.name==="end"?"end":e.name==="up"?"up":e.name==="down"?"down":e.name==="right"?"right":e.name==="left"?"left":!1}}});var Jl=I((uee,dP)=>{"use strict";dP.exports=e=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),n=new RegExp(t,"g");return typeof e=="string"?e.replace(n,""):e}});var ce=I((lee,mP)=>{"use strict";var ky={to(e,t){return t?`\x1B[${t+1};${e+1}H`:`\x1B[${e+1}G`},move(e,t){let n="";return e<0?n+=`\x1B[${-e}D`:e>0&&(n+=`\x1B[${e}C`),t<0?n+=`\x1B[${-t}A`:t>0&&(n+=`\x1B[${t}B`),n},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"},x6={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},A6={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 n=0;n<e;n++)t+=this.line+(n<e-1?ky.up():"");return e&&(t+=ky.left),t}};mP.exports={cursor:ky,scroll:x6,erase:A6,beep:"\x07"}});var vP=I((dee,hP)=>{"use strict";function I6(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=$6(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
5
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,c;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return o=l.done,l},e:function(l){a=!0,c=l},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(a)throw c}}}}function $6(e,t){if(e){if(typeof e=="string")return pP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pP(e,t)}}function pP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var T6=Jl(),gP=ce(),fP=gP.erase,C6=gP.cursor,R6=e=>[...T6(e)].length;hP.exports=function(e,t){if(!t)return fP.line+C6.to(0);let n=0,i=e.split(/\r?\n/);var r=I6(i),o;try{for(r.s();!(o=r.n()).done;){let a=o.value;n+=1+Math.floor(Math.max(R6(a)-1,0)/t)}}catch(a){r.e(a)}finally{r.f()}return fP.lines(n)}});var Oy=I((mee,bP)=>{"use strict";var es={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},P6={arrowUp:es.arrowUp,arrowDown:es.arrowDown,arrowLeft:es.arrowLeft,arrowRight:es.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},N6=process.platform==="win32"?P6:es;bP.exports=N6});var SP=I((pee,yP)=>{"use strict";var ro=se(),Pn=Oy(),Dy=Object.freeze({password:{scale:1,render:e=>"*".repeat(e.length)},emoji:{scale:2,render:e=>"\u{1F603}".repeat(e.length)},invisible:{scale:0,render:e=>""},default:{scale:1,render:e=>`${e}`}}),w6=e=>Dy[e]||Dy.default,ts=Object.freeze({aborted:ro.red(Pn.cross),done:ro.green(Pn.tick),exited:ro.yellow(Pn.cross),default:ro.cyan("?")}),k6=(e,t,n)=>t?ts.aborted:n?ts.exited:e?ts.done:ts.default,O6=e=>ro.gray(e?Pn.ellipsis:Pn.pointerSmall),D6=(e,t)=>ro.gray(e?t?Pn.pointerSmall:"+":Pn.line);yP.exports={styles:Dy,render:w6,symbols:ts,symbol:k6,delimiter:O6,item:D6}});var EP=I((fee,_P)=>{"use strict";var M6=Jl();_P.exports=function(e,t){let n=String(M6(e)||"").split(/\r?\n/);return t?n.map(i=>Math.ceil(i.length/t)).reduce((i,r)=>i+r):n.length}});var AP=I((gee,xP)=>{"use strict";xP.exports=(e,t={})=>{let n=Number.isSafeInteger(parseInt(t.margin))?new Array(parseInt(t.margin)).fill(" ").join(""):t.margin||"",i=t.width;return(e||"").split(/\r?\n/g).map(r=>r.split(/\s+/g).reduce((o,a)=>(a.length+n.length>=i||o[o.length-1].length+a.length+1<i?o[o.length-1]+=` ${a}`:o.push(`${n}${a}`),o),[n]).join(`
4
+ var dO=Object.create;var _d=Object.defineProperty;var mO=Object.getOwnPropertyDescriptor;var pO=Object.getOwnPropertyNames;var fO=Object.getPrototypeOf,gO=Object.prototype.hasOwnProperty;var vs=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var I=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Nt=(e,t)=>{for(var n in t)_d(e,n,{get:t[n],enumerable:!0})},hO=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of pO(t))!gO.call(e,r)&&r!==n&&_d(e,r,{get:()=>t[r],enumerable:!(i=mO(t,r))||i.enumerable});return e};var vO=(e,t,n)=>(n=e!=null?dO(fO(e)):{},hO(t||!e||!e.__esModule?_d(n,"default",{value:e,enumerable:!0}):n,e));var se=I((Lee,PN)=>{"use strict";var{FORCE_COLOR:G6,NODE_DISABLE_COLORS:Z6,TERM:W6}=process.env,q={enabled:!Z6&&W6!=="dumb"&&G6!=="0",reset:te(0,0),bold:te(1,22),dim:te(2,22),italic:te(3,23),underline:te(4,24),inverse:te(7,27),hidden:te(8,28),strikethrough:te(9,29),black:te(30,39),red:te(31,39),green:te(32,39),yellow:te(33,39),blue:te(34,39),magenta:te(35,39),cyan:te(36,39),white:te(37,39),gray:te(90,39),grey:te(90,39),bgBlack:te(40,49),bgRed:te(41,49),bgGreen:te(42,49),bgYellow:te(43,49),bgBlue:te(44,49),bgMagenta:te(45,49),bgCyan:te(46,49),bgWhite:te(47,49)};function NN(e,t){let n=0,i,r="",o="";for(;n<e.length;n++)i=e[n],r+=i.open,o+=i.close,t.includes(i.close)&&(t=t.replace(i.rgx,i.close+i.open));return r+t+o}function H6(e,t){let n={has:e,keys:t};return n.reset=q.reset.bind(n),n.bold=q.bold.bind(n),n.dim=q.dim.bind(n),n.italic=q.italic.bind(n),n.underline=q.underline.bind(n),n.inverse=q.inverse.bind(n),n.hidden=q.hidden.bind(n),n.strikethrough=q.strikethrough.bind(n),n.black=q.black.bind(n),n.red=q.red.bind(n),n.green=q.green.bind(n),n.yellow=q.yellow.bind(n),n.blue=q.blue.bind(n),n.magenta=q.magenta.bind(n),n.cyan=q.cyan.bind(n),n.white=q.white.bind(n),n.gray=q.gray.bind(n),n.grey=q.grey.bind(n),n.bgBlack=q.bgBlack.bind(n),n.bgRed=q.bgRed.bind(n),n.bgGreen=q.bgGreen.bind(n),n.bgYellow=q.bgYellow.bind(n),n.bgBlue=q.bgBlue.bind(n),n.bgMagenta=q.bgMagenta.bind(n),n.bgCyan=q.bgCyan.bind(n),n.bgWhite=q.bgWhite.bind(n),n}function te(e,t){let n={open:`\x1B[${e}m`,close:`\x1B[${t}m`,rgx:new RegExp(`\\x1b\\[${t}m`,"g")};return function(i){return this!==void 0&&this.has!==void 0?(this.has.includes(e)||(this.has.push(e),this.keys.push(n)),i===void 0?this:q.enabled?NN(this.keys,i+""):i+""):i===void 0?H6([e],[n]):q.enabled?NN([n],i+""):i+""}}PN.exports=q});var kN=I((Uee,wN)=>{"use strict";wN.exports=(e,t)=>{if(!(e.meta&&e.name!=="escape")){if(e.ctrl){if(e.name==="a")return"first";if(e.name==="c"||e.name==="d")return"abort";if(e.name==="e")return"last";if(e.name==="g")return"reset"}if(t){if(e.name==="j")return"down";if(e.name==="k")return"up"}return e.name==="return"||e.name==="enter"?"submit":e.name==="backspace"?"delete":e.name==="delete"?"deleteForward":e.name==="abort"?"abort":e.name==="escape"?"exit":e.name==="tab"?"next":e.name==="pagedown"?"nextPage":e.name==="pageup"?"prevPage":e.name==="home"?"home":e.name==="end"?"end":e.name==="up"?"up":e.name==="down"?"down":e.name==="right"?"right":e.name==="left"?"left":!1}}});var od=I((Fee,ON)=>{"use strict";ON.exports=e=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),n=new RegExp(t,"g");return typeof e=="string"?e.replace(n,""):e}});var ce=I((Bee,DN)=>{"use strict";var Vy={to(e,t){return t?`\x1B[${t+1};${e+1}H`:`\x1B[${e+1}G`},move(e,t){let n="";return e<0?n+=`\x1B[${-e}D`:e>0&&(n+=`\x1B[${e}C`),t<0?n+=`\x1B[${-t}A`:t>0&&(n+=`\x1B[${t}B`),n},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"},q6={up:(e=1)=>"\x1B[S".repeat(e),down:(e=1)=>"\x1B[T".repeat(e)},K6={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 n=0;n<e;n++)t+=this.line+(n<e-1?Vy.up():"");return e&&(t+=Vy.left),t}};DN.exports={cursor:Vy,scroll:q6,erase:K6,beep:"\x07"}});var UN=I((Vee,LN)=>{"use strict";function Y6(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=X6(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
5
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,c;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return o=l.done,l},e:function(l){a=!0,c=l},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(a)throw c}}}}function X6(e,t){if(e){if(typeof e=="string")return MN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return MN(e,t)}}function MN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var J6=od(),zN=ce(),jN=zN.erase,Q6=zN.cursor,eF=e=>[...J6(e)].length;LN.exports=function(e,t){if(!t)return jN.line+Q6.to(0);let n=0,i=e.split(/\r?\n/);var r=Y6(i),o;try{for(r.s();!(o=r.n()).done;){let a=o.value;n+=1+Math.floor(Math.max(eF(a)-1,0)/t)}}catch(a){r.e(a)}finally{r.f()}return jN.lines(n)}});var Gy=I((Gee,FN)=>{"use strict";var as={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},tF={arrowUp:as.arrowUp,arrowDown:as.arrowDown,arrowLeft:as.arrowLeft,arrowRight:as.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},rF=process.platform==="win32"?tF:as;FN.exports=rF});var VN=I((Zee,BN)=>{"use strict";var lo=se(),Dn=Gy(),Zy=Object.freeze({password:{scale:1,render:e=>"*".repeat(e.length)},emoji:{scale:2,render:e=>"\u{1F603}".repeat(e.length)},invisible:{scale:0,render:e=>""},default:{scale:1,render:e=>`${e}`}}),nF=e=>Zy[e]||Zy.default,ss=Object.freeze({aborted:lo.red(Dn.cross),done:lo.green(Dn.tick),exited:lo.yellow(Dn.cross),default:lo.cyan("?")}),iF=(e,t,n)=>t?ss.aborted:n?ss.exited:e?ss.done:ss.default,oF=e=>lo.gray(e?Dn.ellipsis:Dn.pointerSmall),aF=(e,t)=>lo.gray(e?t?Dn.pointerSmall:"+":Dn.line);BN.exports={styles:Zy,render:nF,symbols:ss,symbol:iF,delimiter:oF,item:aF}});var ZN=I((Wee,GN)=>{"use strict";var sF=od();GN.exports=function(e,t){let n=String(sF(e)||"").split(/\r?\n/);return t?n.map(i=>Math.ceil(i.length/t)).reduce((i,r)=>i+r):n.length}});var HN=I((Hee,WN)=>{"use strict";WN.exports=(e,t={})=>{let n=Number.isSafeInteger(parseInt(t.margin))?new Array(parseInt(t.margin)).fill(" ").join(""):t.margin||"",i=t.width;return(e||"").split(/\r?\n/g).map(r=>r.split(/\s+/g).reduce((o,a)=>(a.length+n.length>=i||o[o.length-1].length+a.length+1<i?o[o.length-1]+=` ${a}`:o.push(`${n}${a}`),o),[n]).join(`
6
6
  `)).join(`
7
- `)}});var $P=I((hee,IP)=>{"use strict";IP.exports=(e,t,n)=>{n=n||t;let i=Math.min(t-n,e-Math.floor(n/2));i<0&&(i=0);let r=Math.min(i+n,t);return{startIndex:i,endIndex:r}}});var Ct=I((vee,TP)=>{"use strict";TP.exports={action:lP(),clear:vP(),style:SP(),strip:Jl(),figures:Oy(),lines:EP(),wrap:AP(),entriesToDisplay:$P()}});var pr=I((bee,PP)=>{"use strict";var CP=ds("readline"),j6=Ct(),z6=j6.action,L6=ds("events"),RP=ce(),U6=RP.beep,F6=RP.cursor,B6=se(),My=class extends L6{constructor(t={}){super(),this.firstRender=!0,this.in=t.stdin||process.stdin,this.out=t.stdout||process.stdout,this.onRender=(t.onRender||(()=>{})).bind(this);let n=CP.createInterface({input:this.in,escapeCodeTimeout:50});CP.emitKeypressEvents(this.in,n),this.in.isTTY&&this.in.setRawMode(!0);let i=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,r=(o,a)=>{let c=z6(a,i);c===!1?this._&&this._(o,a):typeof this[c]=="function"?this[c](a):this.bell()};this.close=()=>{this.out.write(F6.show),this.in.removeListener("keypress",r),this.in.isTTY&&this.in.setRawMode(!1),n.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",r)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(U6)}render(){this.onRender(B6),this.firstRender&&(this.firstRender=!1)}};PP.exports=My});var DP=I((yee,OP)=>{"use strict";function NP(e,t,n,i,r,o,a){try{var c=e[o](a),u=c.value}catch(l){n(l);return}c.done?t(u):Promise.resolve(u).then(i,r)}function wP(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){NP(o,i,r,a,c,"next",u)}function c(u){NP(o,i,r,a,c,"throw",u)}a(void 0)})}}var Ql=se(),V6=pr(),kP=ce(),G6=kP.erase,rs=kP.cursor,ed=Ct(),jy=ed.style,zy=ed.clear,Z6=ed.lines,W6=ed.figures,Ly=class extends V6{constructor(t={}){super(t),this.transform=jy.render(t.style),this.scale=this.transform.scale,this.msg=t.message,this.initial=t.initial||"",this.validator=t.validate||(()=>!0),this.value="",this.errorMsg=t.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=zy("",this.out.columns),this.render()}set value(t){!t&&this.initial?(this.placeholder=!0,this.rendered=Ql.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(t)),this._value=t,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
8
- `),this.close()}validate(){var t=this;return wP(function*(){let n=yield t.validator(t.value);typeof n=="string"&&(t.errorMsg=n,n=!1),t.error=!n})()}submit(){var t=this;return wP(function*(){if(t.value=t.value||t.initial,t.cursorOffset=0,t.cursor=t.rendered.length,yield t.validate(),t.error){t.red=!0,t.fire(),t.render();return}t.done=!0,t.aborted=!1,t.fire(),t.render(),t.out.write(`
9
- `),t.close()})()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(t){this.placeholder||(this.cursor=this.cursor+t,this.cursorOffset+=t)}_(t,n){let i=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor);this.value=`${i}${t}${r}`,this.red=!1,this.cursor=this.placeholder?0:i.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let t=this.value.slice(0,this.cursor-1),n=this.value.slice(this.cursor);this.value=`${t}${n}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor),n=this.value.slice(this.cursor+1);this.value=`${t}${n}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(rs.down(Z6(this.outputError,this.out.columns)-1)+zy(this.outputError,this.out.columns)),this.out.write(zy(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[jy.symbol(this.done,this.aborted),Ql.bold(this.msg),jy.delimiter(this.done),this.red?Ql.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
7
+ `)}});var KN=I((qee,qN)=>{"use strict";qN.exports=(e,t,n)=>{n=n||t;let i=Math.min(t-n,e-Math.floor(n/2));i<0&&(i=0);let r=Math.min(i+n,t);return{startIndex:i,endIndex:r}}});var Rt=I((Kee,YN)=>{"use strict";YN.exports={action:kN(),clear:UN(),style:VN(),strip:od(),figures:Gy(),lines:ZN(),wrap:HN(),entriesToDisplay:KN()}});var fr=I((Yee,QN)=>{"use strict";var XN=vs("readline"),cF=Rt(),uF=cF.action,lF=vs("events"),JN=ce(),dF=JN.beep,mF=JN.cursor,pF=se(),Wy=class extends lF{constructor(t={}){super(),this.firstRender=!0,this.in=t.stdin||process.stdin,this.out=t.stdout||process.stdout,this.onRender=(t.onRender||(()=>{})).bind(this);let n=XN.createInterface({input:this.in,escapeCodeTimeout:50});XN.emitKeypressEvents(this.in,n),this.in.isTTY&&this.in.setRawMode(!0);let i=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,r=(o,a)=>{let c=uF(a,i);c===!1?this._&&this._(o,a):typeof this[c]=="function"?this[c](a):this.bell()};this.close=()=>{this.out.write(mF.show),this.in.removeListener("keypress",r),this.in.isTTY&&this.in.setRawMode(!1),n.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",r)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(dF)}render(){this.onRender(pF),this.firstRender&&(this.firstRender=!1)}};QN.exports=Wy});var iP=I((Xee,nP)=>{"use strict";function eP(e,t,n,i,r,o,a){try{var c=e[o](a),u=c.value}catch(l){n(l);return}c.done?t(u):Promise.resolve(u).then(i,r)}function tP(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){eP(o,i,r,a,c,"next",u)}function c(u){eP(o,i,r,a,c,"throw",u)}a(void 0)})}}var ad=se(),fF=fr(),rP=ce(),gF=rP.erase,cs=rP.cursor,sd=Rt(),Hy=sd.style,qy=sd.clear,hF=sd.lines,vF=sd.figures,Ky=class extends fF{constructor(t={}){super(t),this.transform=Hy.render(t.style),this.scale=this.transform.scale,this.msg=t.message,this.initial=t.initial||"",this.validator=t.validate||(()=>!0),this.value="",this.errorMsg=t.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=qy("",this.out.columns),this.render()}set value(t){!t&&this.initial?(this.placeholder=!0,this.rendered=ad.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(t)),this._value=t,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
8
+ `),this.close()}validate(){var t=this;return tP(function*(){let n=yield t.validator(t.value);typeof n=="string"&&(t.errorMsg=n,n=!1),t.error=!n})()}submit(){var t=this;return tP(function*(){if(t.value=t.value||t.initial,t.cursorOffset=0,t.cursor=t.rendered.length,yield t.validate(),t.error){t.red=!0,t.fire(),t.render();return}t.done=!0,t.aborted=!1,t.fire(),t.render(),t.out.write(`
9
+ `),t.close()})()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(t){this.placeholder||(this.cursor=this.cursor+t,this.cursorOffset+=t)}_(t,n){let i=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor);this.value=`${i}${t}${r}`,this.red=!1,this.cursor=this.placeholder?0:i.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let t=this.value.slice(0,this.cursor-1),n=this.value.slice(this.cursor);this.value=`${t}${n}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor),n=this.value.slice(this.cursor+1);this.value=`${t}${n}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(cs.down(hF(this.outputError,this.out.columns)-1)+qy(this.outputError,this.out.columns)),this.out.write(qy(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Hy.symbol(this.done,this.aborted),ad.bold(this.msg),Hy.delimiter(this.done),this.red?ad.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
10
10
  `).reduce((t,n,i)=>t+`
11
- ${i?" ":W6.pointerSmall} ${Ql.red().italic(n)}`,"")),this.out.write(G6.line+rs.to(0)+this.outputText+rs.save+this.outputError+rs.restore+rs.move(this.cursorOffset,0)))}};OP.exports=Ly});var LP=I((See,zP)=>{"use strict";var fr=se(),H6=pr(),ns=Ct(),MP=ns.style,jP=ns.clear,td=ns.figures,q6=ns.wrap,K6=ns.entriesToDisplay,Y6=ce(),X6=Y6.cursor,Uy=class extends H6{constructor(t={}){super(t),this.msg=t.message,this.hint=t.hint||"- Use arrow-keys. Return to submit.",this.warn=t.warn||"- This option is disabled",this.cursor=t.initial||0,this.choices=t.choices.map((n,i)=>(typeof n=="string"&&(n={title:n,value:i}),{title:n&&(n.title||n.value||n),value:n&&(n.value===void 0?i:n.value),description:n&&n.description,selected:n&&n.selected,disabled:n&&n.disabled})),this.optionsPerPage=t.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=jP("",this.out.columns),this.render()}moveCursor(t){this.cursor=t,this.value=this.choices[t].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
11
+ ${i?" ":vF.pointerSmall} ${ad.red().italic(n)}`,"")),this.out.write(gF.line+cs.to(0)+this.outputText+cs.save+this.outputError+cs.restore+cs.move(this.cursorOffset,0)))}};nP.exports=Ky});var cP=I((Jee,sP)=>{"use strict";var gr=se(),bF=fr(),us=Rt(),oP=us.style,aP=us.clear,cd=us.figures,yF=us.wrap,SF=us.entriesToDisplay,_F=ce(),EF=_F.cursor,Yy=class extends bF{constructor(t={}){super(t),this.msg=t.message,this.hint=t.hint||"- Use arrow-keys. Return to submit.",this.warn=t.warn||"- This option is disabled",this.cursor=t.initial||0,this.choices=t.choices.map((n,i)=>(typeof n=="string"&&(n={title:n,value:i}),{title:n&&(n.title||n.value||n),value:n&&(n.value===void 0?i:n.value),description:n&&n.description,selected:n&&n.selected,disabled:n&&n.disabled})),this.optionsPerPage=t.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=aP("",this.out.columns),this.render()}moveCursor(t){this.cursor=t,this.value=this.choices[t].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
12
12
  `),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
13
- `),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(t,n){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(X6.hide):this.out.write(jP(this.outputText,this.out.columns)),super.render();let t=K6(this.cursor,this.choices.length,this.optionsPerPage),n=t.startIndex,i=t.endIndex;if(this.outputText=[MP.symbol(this.done,this.aborted),fr.bold(this.msg),MP.delimiter(!1),this.done?this.selection.title:this.selection.disabled?fr.yellow(this.warn):fr.gray(this.hint)].join(" "),!this.done){this.outputText+=`
14
- `;for(let r=n;r<i;r++){let o,a,c="",u=this.choices[r];r===n&&n>0?a=td.arrowUp:r===i-1&&i<this.choices.length?a=td.arrowDown:a=" ",u.disabled?(o=this.cursor===r?fr.gray().underline(u.title):fr.strikethrough().gray(u.title),a=(this.cursor===r?fr.bold().gray(td.pointer)+" ":" ")+a):(o=this.cursor===r?fr.cyan().underline(u.title):u.title,a=(this.cursor===r?fr.cyan(td.pointer)+" ":" ")+a,u.description&&this.cursor===r&&(c=` - ${u.description}`,(a.length+o.length+c.length>=this.out.columns||u.description.split(/\r?\n/).length>1)&&(c=`
15
- `+q6(u.description,{margin:3,width:this.out.columns})))),this.outputText+=`${a} ${o}${fr.gray(c)}
16
- `}}this.out.write(this.outputText)}};zP.exports=Uy});var ZP=I((_ee,GP)=>{"use strict";var rd=se(),J6=pr(),BP=Ct(),UP=BP.style,Q6=BP.clear,VP=ce(),FP=VP.cursor,eF=VP.erase,Fy=class extends J6{constructor(t={}){super(t),this.msg=t.message,this.value=!!t.initial,this.active=t.active||"on",this.inactive=t.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
13
+ `),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(t,n){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(EF.hide):this.out.write(aP(this.outputText,this.out.columns)),super.render();let t=SF(this.cursor,this.choices.length,this.optionsPerPage),n=t.startIndex,i=t.endIndex;if(this.outputText=[oP.symbol(this.done,this.aborted),gr.bold(this.msg),oP.delimiter(!1),this.done?this.selection.title:this.selection.disabled?gr.yellow(this.warn):gr.gray(this.hint)].join(" "),!this.done){this.outputText+=`
14
+ `;for(let r=n;r<i;r++){let o,a,c="",u=this.choices[r];r===n&&n>0?a=cd.arrowUp:r===i-1&&i<this.choices.length?a=cd.arrowDown:a=" ",u.disabled?(o=this.cursor===r?gr.gray().underline(u.title):gr.strikethrough().gray(u.title),a=(this.cursor===r?gr.bold().gray(cd.pointer)+" ":" ")+a):(o=this.cursor===r?gr.cyan().underline(u.title):u.title,a=(this.cursor===r?gr.cyan(cd.pointer)+" ":" ")+a,u.description&&this.cursor===r&&(c=` - ${u.description}`,(a.length+o.length+c.length>=this.out.columns||u.description.split(/\r?\n/).length>1)&&(c=`
15
+ `+yF(u.description,{margin:3,width:this.out.columns})))),this.outputText+=`${a} ${o}${gr.gray(c)}
16
+ `}}this.out.write(this.outputText)}};sP.exports=Yy});var fP=I((Qee,pP)=>{"use strict";var ud=se(),xF=fr(),dP=Rt(),uP=dP.style,AF=dP.clear,mP=ce(),lP=mP.cursor,IF=mP.erase,Xy=class extends xF{constructor(t={}){super(t),this.msg=t.message,this.value=!!t.initial,this.active=t.active||"on",this.inactive=t.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
17
17
  `),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
18
- `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(t,n){if(t===" ")this.value=!this.value;else if(t==="1")this.value=!0;else if(t==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(FP.hide):this.out.write(Q6(this.outputText,this.out.columns)),super.render(),this.outputText=[UP.symbol(this.done,this.aborted),rd.bold(this.msg),UP.delimiter(this.done),this.value?this.inactive:rd.cyan().underline(this.inactive),rd.gray("/"),this.value?rd.cyan().underline(this.active):this.active].join(" "),this.out.write(eF.line+FP.to(0)+this.outputText))}};GP.exports=Fy});var Ht=I((Eee,WP)=>{"use strict";var By=class e{constructor({token:t,date:n,parts:i,locales:r}){this.token=t,this.date=n||new Date,this.parts=i||[this],this.locales=r||{}}up(){}down(){}next(){let t=this.parts.indexOf(this);return this.parts.find((n,i)=>i>t&&n instanceof e)}setTo(t){}prev(){let t=[].concat(this.parts).reverse(),n=t.indexOf(this);return t.find((i,r)=>r>n&&i instanceof e)}toString(){return String(this.date)}};WP.exports=By});var qP=I((xee,HP)=>{"use strict";var tF=Ht(),Vy=class extends tF{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}};HP.exports=Vy});var YP=I((Aee,KP)=>{"use strict";var rF=Ht(),nF=e=>(e=e%10,e===1?"st":e===2?"nd":e===3?"rd":"th"),Gy=class extends rF{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate(),n=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+nF(t):this.token==="d"?n+1:this.token==="ddd"?this.locales.weekdaysShort[n]:this.token==="dddd"?this.locales.weekdays[n]:t}};KP.exports=Gy});var JP=I((Iee,XP)=>{"use strict";var iF=Ht(),Zy=class extends iF{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();return/h/.test(this.token)&&(t=t%12||12),this.token.length>1?String(t).padStart(2,"0"):t}};XP.exports=Zy});var eN=I(($ee,QP)=>{"use strict";var oF=Ht(),Wy=class extends oF{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};QP.exports=Wy});var rN=I((Tee,tN)=>{"use strict";var aF=Ht(),Hy=class extends aF{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}};tN.exports=Hy});var iN=I((Cee,nN)=>{"use strict";var sF=Ht(),qy=class extends sF{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1,this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth(),n=this.token.length;return n===2?String(t+1).padStart(2,"0"):n===3?this.locales.monthsShort[t]:n===4?this.locales.months[t]:String(t+1)}};nN.exports=qy});var aN=I((Ree,oN)=>{"use strict";var cF=Ht(),Ky=class extends cF{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}};oN.exports=Ky});var cN=I((Pee,sN)=>{"use strict";var uF=Ht(),Yy=class extends uF{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}};sN.exports=Yy});var lN=I((Nee,uN)=>{"use strict";uN.exports={DatePart:Ht(),Meridiem:qP(),Day:YP(),Hours:JP(),Milliseconds:eN(),Minutes:rN(),Month:iN(),Seconds:aN(),Year:cN()}});var SN=I((wee,yN)=>{"use strict";function dN(e,t,n,i,r,o,a){try{var c=e[o](a),u=c.value}catch(l){n(l);return}c.done?t(u):Promise.resolve(u).then(i,r)}function mN(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){dN(o,i,r,a,c,"next",u)}function c(u){dN(o,i,r,a,c,"throw",u)}a(void 0)})}}var Xy=se(),lF=pr(),Qy=Ct(),pN=Qy.style,fN=Qy.clear,dF=Qy.figures,bN=ce(),mF=bN.erase,gN=bN.cursor,gr=lN(),hN=gr.DatePart,pF=gr.Meridiem,fF=gr.Day,gF=gr.Hours,hF=gr.Milliseconds,vF=gr.Minutes,bF=gr.Month,yF=gr.Seconds,SF=gr.Year,_F=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,vN={1:({token:e})=>e.replace(/\\(.)/g,"$1"),2:e=>new fF(e),3:e=>new bF(e),4:e=>new SF(e),5:e=>new pF(e),6:e=>new gF(e),7:e=>new vF(e),8:e=>new yF(e),9:e=>new hF(e)},EF={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},Jy=class extends lF{constructor(t={}){super(t),this.msg=t.message,this.cursor=0,this.typed="",this.locales=Object.assign(EF,t.locales),this._date=t.initial||new Date,this.errorMsg=t.error||"Please Enter A Valid Value",this.validator=t.validate||(()=>!0),this.mask=t.mask||"YYYY-MM-DD HH:mm:ss",this.clear=fN("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(t){t&&this._date.setTime(t.getTime())}set mask(t){let n;for(this.parts=[];n=_F.exec(t);){let r=n.shift(),o=n.findIndex(a=>a!=null);this.parts.push(o in vN?vN[o]({token:n[o]||r,date:this.date,parts:this.parts,locales:this.locales}):n[o]||r)}let i=this.parts.reduce((r,o)=>(typeof o=="string"&&typeof r[r.length-1]=="string"?r[r.length-1]+=o:r.push(o),r),[]);this.parts.splice(0),this.parts.push(...i),this.reset()}moveCursor(t){this.typed="",this.cursor=t,this.fire()}reset(){this.moveCursor(this.parts.findIndex(t=>t instanceof hN)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
19
- `),this.close()}validate(){var t=this;return mN(function*(){let n=yield t.validator(t.value);typeof n=="string"&&(t.errorMsg=n,n=!1),t.error=!n})()}submit(){var t=this;return mN(function*(){if(yield t.validate(),t.error){t.color="red",t.fire(),t.render();return}t.done=!0,t.aborted=!1,t.fire(),t.render(),t.out.write(`
20
- `),t.close()})()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let t=this.parts[this.cursor].prev();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t)),this.render()}right(){let t=this.parts[this.cursor].next();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t)),this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex(n=>n instanceof hN)),this.render()}_(t){/\d/.test(t)&&(this.typed+=t,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(gN.hide):this.out.write(fN(this.outputText,this.out.columns)),super.render(),this.outputText=[pN.symbol(this.done,this.aborted),Xy.bold(this.msg),pN.delimiter(!1),this.parts.reduce((t,n,i)=>t.concat(i===this.cursor&&!this.done?Xy.cyan().underline(n.toString()):n),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
18
+ `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(t,n){if(t===" ")this.value=!this.value;else if(t==="1")this.value=!0;else if(t==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(lP.hide):this.out.write(AF(this.outputText,this.out.columns)),super.render(),this.outputText=[uP.symbol(this.done,this.aborted),ud.bold(this.msg),uP.delimiter(this.done),this.value?this.inactive:ud.cyan().underline(this.inactive),ud.gray("/"),this.value?ud.cyan().underline(this.active):this.active].join(" "),this.out.write(IF.line+lP.to(0)+this.outputText))}};pP.exports=Xy});var qt=I((ete,gP)=>{"use strict";var Jy=class e{constructor({token:t,date:n,parts:i,locales:r}){this.token=t,this.date=n||new Date,this.parts=i||[this],this.locales=r||{}}up(){}down(){}next(){let t=this.parts.indexOf(this);return this.parts.find((n,i)=>i>t&&n instanceof e)}setTo(t){}prev(){let t=[].concat(this.parts).reverse(),n=t.indexOf(this);return t.find((i,r)=>r>n&&i instanceof e)}toString(){return String(this.date)}};gP.exports=Jy});var vP=I((tte,hP)=>{"use strict";var $F=qt(),Qy=class extends $F{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}};hP.exports=Qy});var yP=I((rte,bP)=>{"use strict";var TF=qt(),RF=e=>(e=e%10,e===1?"st":e===2?"nd":e===3?"rd":"th"),eS=class extends TF{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate(),n=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+RF(t):this.token==="d"?n+1:this.token==="ddd"?this.locales.weekdaysShort[n]:this.token==="dddd"?this.locales.weekdays[n]:t}};bP.exports=eS});var _P=I((nte,SP)=>{"use strict";var CF=qt(),tS=class extends CF{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();return/h/.test(this.token)&&(t=t%12||12),this.token.length>1?String(t).padStart(2,"0"):t}};SP.exports=tS});var xP=I((ite,EP)=>{"use strict";var NF=qt(),rS=class extends NF{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};EP.exports=rS});var IP=I((ote,AP)=>{"use strict";var PF=qt(),nS=class extends PF{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}};AP.exports=nS});var TP=I((ate,$P)=>{"use strict";var wF=qt(),iS=class extends wF{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1,this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth(),n=this.token.length;return n===2?String(t+1).padStart(2,"0"):n===3?this.locales.monthsShort[t]:n===4?this.locales.months[t]:String(t+1)}};$P.exports=iS});var CP=I((ste,RP)=>{"use strict";var kF=qt(),oS=class extends kF{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}};RP.exports=oS});var PP=I((cte,NP)=>{"use strict";var OF=qt(),aS=class extends OF{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}};NP.exports=aS});var kP=I((ute,wP)=>{"use strict";wP.exports={DatePart:qt(),Meridiem:vP(),Day:yP(),Hours:_P(),Milliseconds:xP(),Minutes:IP(),Month:TP(),Seconds:CP(),Year:PP()}});var VP=I((lte,BP)=>{"use strict";function OP(e,t,n,i,r,o,a){try{var c=e[o](a),u=c.value}catch(l){n(l);return}c.done?t(u):Promise.resolve(u).then(i,r)}function DP(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){OP(o,i,r,a,c,"next",u)}function c(u){OP(o,i,r,a,c,"throw",u)}a(void 0)})}}var sS=se(),DF=fr(),uS=Rt(),MP=uS.style,jP=uS.clear,MF=uS.figures,FP=ce(),jF=FP.erase,zP=FP.cursor,hr=kP(),LP=hr.DatePart,zF=hr.Meridiem,LF=hr.Day,UF=hr.Hours,FF=hr.Milliseconds,BF=hr.Minutes,VF=hr.Month,GF=hr.Seconds,ZF=hr.Year,WF=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,UP={1:({token:e})=>e.replace(/\\(.)/g,"$1"),2:e=>new LF(e),3:e=>new VF(e),4:e=>new ZF(e),5:e=>new zF(e),6:e=>new UF(e),7:e=>new BF(e),8:e=>new GF(e),9:e=>new FF(e)},HF={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},cS=class extends DF{constructor(t={}){super(t),this.msg=t.message,this.cursor=0,this.typed="",this.locales=Object.assign(HF,t.locales),this._date=t.initial||new Date,this.errorMsg=t.error||"Please Enter A Valid Value",this.validator=t.validate||(()=>!0),this.mask=t.mask||"YYYY-MM-DD HH:mm:ss",this.clear=jP("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(t){t&&this._date.setTime(t.getTime())}set mask(t){let n;for(this.parts=[];n=WF.exec(t);){let r=n.shift(),o=n.findIndex(a=>a!=null);this.parts.push(o in UP?UP[o]({token:n[o]||r,date:this.date,parts:this.parts,locales:this.locales}):n[o]||r)}let i=this.parts.reduce((r,o)=>(typeof o=="string"&&typeof r[r.length-1]=="string"?r[r.length-1]+=o:r.push(o),r),[]);this.parts.splice(0),this.parts.push(...i),this.reset()}moveCursor(t){this.typed="",this.cursor=t,this.fire()}reset(){this.moveCursor(this.parts.findIndex(t=>t instanceof LP)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
19
+ `),this.close()}validate(){var t=this;return DP(function*(){let n=yield t.validator(t.value);typeof n=="string"&&(t.errorMsg=n,n=!1),t.error=!n})()}submit(){var t=this;return DP(function*(){if(yield t.validate(),t.error){t.color="red",t.fire(),t.render();return}t.done=!0,t.aborted=!1,t.fire(),t.render(),t.out.write(`
20
+ `),t.close()})()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let t=this.parts[this.cursor].prev();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t)),this.render()}right(){let t=this.parts[this.cursor].next();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t)),this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex(n=>n instanceof LP)),this.render()}_(t){/\d/.test(t)&&(this.typed+=t,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(zP.hide):this.out.write(jP(this.outputText,this.out.columns)),super.render(),this.outputText=[MP.symbol(this.done,this.aborted),sS.bold(this.msg),MP.delimiter(!1),this.parts.reduce((t,n,i)=>t.concat(i===this.cursor&&!this.done?sS.cyan().underline(n.toString()):n),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
21
21
  `).reduce((t,n,i)=>t+`
22
- ${i?" ":dF.pointerSmall} ${Xy.red().italic(n)}`,"")),this.out.write(mF.line+gN.to(0)+this.outputText))}};yN.exports=Jy});var TN=I((kee,$N)=>{"use strict";function _N(e,t,n,i,r,o,a){try{var c=e[o](a),u=c.value}catch(l){n(l);return}c.done?t(u):Promise.resolve(u).then(i,r)}function EN(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){_N(o,i,r,a,c,"next",u)}function c(u){_N(o,i,r,a,c,"throw",u)}a(void 0)})}}var nd=se(),xF=pr(),IN=ce(),id=IN.cursor,AF=IN.erase,od=Ct(),eS=od.style,IF=od.figures,xN=od.clear,$F=od.lines,TF=/[0-9]/,tS=e=>e!==void 0,AN=(e,t)=>{let n=Math.pow(10,t);return Math.round(e*n)/n},rS=class extends xF{constructor(t={}){super(t),this.transform=eS.render(t.style),this.msg=t.message,this.initial=tS(t.initial)?t.initial:"",this.float=!!t.float,this.round=t.round||2,this.inc=t.increment||1,this.min=tS(t.min)?t.min:-1/0,this.max=tS(t.max)?t.max:1/0,this.errorMsg=t.error||"Please Enter A Valid Value",this.validator=t.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(t){!t&&t!==0?(this.placeholder=!0,this.rendered=nd.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${AN(t,this.round)}`),this._value=AN(t,this.round)),this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return t==="-"||t==="."&&this.float||TF.test(t)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let t=this.value;this.value=t!==""?t:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
23
- `),this.close()}validate(){var t=this;return EN(function*(){let n=yield t.validator(t.value);typeof n=="string"&&(t.errorMsg=n,n=!1),t.error=!n})()}submit(){var t=this;return EN(function*(){if(yield t.validate(),t.error){t.color="red",t.fire(),t.render();return}let n=t.value;t.value=n!==""?n:t.initial,t.done=!0,t.aborted=!1,t.error=!1,t.fire(),t.render(),t.out.write(`
24
- `),t.close()})()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let t=this.value.toString();if(t.length===0)return this.bell();this.value=this.parse(t=t.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(t,n){if(!this.valid(t))return this.bell();let i=Date.now();if(i-this.lastHit>1e3&&(this.typed=""),this.typed+=t,this.lastHit=i,this.color="cyan",t===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(id.down($F(this.outputError,this.out.columns)-1)+xN(this.outputError,this.out.columns)),this.out.write(xN(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[eS.symbol(this.done,this.aborted),nd.bold(this.msg),eS.delimiter(this.done),!this.done||!this.done&&!this.placeholder?nd[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
22
+ ${i?" ":MF.pointerSmall} ${sS.red().italic(n)}`,"")),this.out.write(jF.line+zP.to(0)+this.outputText))}};BP.exports=cS});var YP=I((dte,KP)=>{"use strict";function GP(e,t,n,i,r,o,a){try{var c=e[o](a),u=c.value}catch(l){n(l);return}c.done?t(u):Promise.resolve(u).then(i,r)}function ZP(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){GP(o,i,r,a,c,"next",u)}function c(u){GP(o,i,r,a,c,"throw",u)}a(void 0)})}}var ld=se(),qF=fr(),qP=ce(),dd=qP.cursor,KF=qP.erase,md=Rt(),lS=md.style,YF=md.figures,WP=md.clear,XF=md.lines,JF=/[0-9]/,dS=e=>e!==void 0,HP=(e,t)=>{let n=Math.pow(10,t);return Math.round(e*n)/n},mS=class extends qF{constructor(t={}){super(t),this.transform=lS.render(t.style),this.msg=t.message,this.initial=dS(t.initial)?t.initial:"",this.float=!!t.float,this.round=t.round||2,this.inc=t.increment||1,this.min=dS(t.min)?t.min:-1/0,this.max=dS(t.max)?t.max:1/0,this.errorMsg=t.error||"Please Enter A Valid Value",this.validator=t.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(t){!t&&t!==0?(this.placeholder=!0,this.rendered=ld.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${HP(t,this.round)}`),this._value=HP(t,this.round)),this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return t==="-"||t==="."&&this.float||JF.test(t)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let t=this.value;this.value=t!==""?t:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
23
+ `),this.close()}validate(){var t=this;return ZP(function*(){let n=yield t.validator(t.value);typeof n=="string"&&(t.errorMsg=n,n=!1),t.error=!n})()}submit(){var t=this;return ZP(function*(){if(yield t.validate(),t.error){t.color="red",t.fire(),t.render();return}let n=t.value;t.value=n!==""?n:t.initial,t.done=!0,t.aborted=!1,t.error=!1,t.fire(),t.render(),t.out.write(`
24
+ `),t.close()})()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let t=this.value.toString();if(t.length===0)return this.bell();this.value=this.parse(t=t.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(t,n){if(!this.valid(t))return this.bell();let i=Date.now();if(i-this.lastHit>1e3&&(this.typed=""),this.typed+=t,this.lastHit=i,this.color="cyan",t===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(dd.down(XF(this.outputError,this.out.columns)-1)+WP(this.outputError,this.out.columns)),this.out.write(WP(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[lS.symbol(this.done,this.aborted),ld.bold(this.msg),lS.delimiter(this.done),!this.done||!this.done&&!this.placeholder?ld[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
25
25
  `).reduce((t,n,i)=>t+`
26
- ${i?" ":IF.pointerSmall} ${nd.red().italic(n)}`,"")),this.out.write(AF.line+id.to(0)+this.outputText+id.save+this.outputError+id.restore))}};$N.exports=rS});var iS=I((Oee,PN)=>{"use strict";var qt=se(),CF=ce(),RF=CF.cursor,PF=pr(),is=Ct(),CN=is.clear,Vr=is.figures,RN=is.style,NF=is.wrap,wF=is.entriesToDisplay,nS=class extends PF{constructor(t={}){super(t),this.msg=t.message,this.cursor=t.cursor||0,this.scrollIndex=t.cursor||0,this.hint=t.hint||"",this.warn=t.warn||"- This option is disabled -",this.minSelected=t.min,this.showMinError=!1,this.maxChoices=t.max,this.instructions=t.instructions,this.optionsPerPage=t.optionsPerPage||10,this.value=t.choices.map((n,i)=>(typeof n=="string"&&(n={title:n,value:i}),{title:n&&(n.title||n.value||n),description:n&&n.description,value:n&&(n.value===void 0?i:n.value),selected:n&&n.selected,disabled:n&&n.disabled})),this.clear=CN("",this.out.columns),t.overrideRender||this.render()}reset(){this.value.map(t=>!t.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(t=>t.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
26
+ ${i?" ":YF.pointerSmall} ${ld.red().italic(n)}`,"")),this.out.write(KF.line+dd.to(0)+this.outputText+dd.save+this.outputError+dd.restore))}};KP.exports=mS});var fS=I((mte,QP)=>{"use strict";var Kt=se(),QF=ce(),eB=QF.cursor,tB=fr(),ls=Rt(),XP=ls.clear,Wr=ls.figures,JP=ls.style,rB=ls.wrap,nB=ls.entriesToDisplay,pS=class extends tB{constructor(t={}){super(t),this.msg=t.message,this.cursor=t.cursor||0,this.scrollIndex=t.cursor||0,this.hint=t.hint||"",this.warn=t.warn||"- This option is disabled -",this.minSelected=t.min,this.showMinError=!1,this.maxChoices=t.max,this.instructions=t.instructions,this.optionsPerPage=t.optionsPerPage||10,this.value=t.choices.map((n,i)=>(typeof n=="string"&&(n={title:n,value:i}),{title:n&&(n.title||n.value||n),description:n&&n.description,value:n&&(n.value===void 0?i:n.value),selected:n&&n.selected,disabled:n&&n.disabled})),this.clear=XP("",this.out.columns),t.overrideRender||this.render()}reset(){this.value.map(t=>!t.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(t=>t.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
27
27
  `),this.close()}submit(){let t=this.value.filter(n=>n.selected);this.minSelected&&t.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
28
28
  `),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(t=>t.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){let t=this.value[this.cursor];if(t.selected)t.selected=!1,this.render();else{if(t.disabled||this.value.filter(n=>n.selected).length>=this.maxChoices)return this.bell();t.selected=!0,this.render()}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let t=!this.value[this.cursor].selected;this.value.filter(n=>!n.disabled).forEach(n=>n.selected=t),this.render()}_(t,n){if(t===" ")this.handleSpaceToggle();else if(t==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
29
29
  Instructions:
30
- ${Vr.arrowUp}/${Vr.arrowDown}: Highlight option
31
- ${Vr.arrowLeft}/${Vr.arrowRight}/[space]: Toggle selection
30
+ ${Wr.arrowUp}/${Wr.arrowDown}: Highlight option
31
+ ${Wr.arrowLeft}/${Wr.arrowRight}/[space]: Toggle selection
32
32
  `+(this.maxChoices===void 0?` a: Toggle all
33
- `:"")+" enter/return: Complete answer":""}renderOption(t,n,i,r){let o=(n.selected?qt.green(Vr.radioOn):Vr.radioOff)+" "+r+" ",a,c;return n.disabled?a=t===i?qt.gray().underline(n.title):qt.strikethrough().gray(n.title):(a=t===i?qt.cyan().underline(n.title):n.title,t===i&&n.description&&(c=` - ${n.description}`,(o.length+a.length+c.length>=this.out.columns||n.description.split(/\r?\n/).length>1)&&(c=`
34
- `+NF(n.description,{margin:o.length,width:this.out.columns})))),o+a+qt.gray(c||"")}paginateOptions(t){if(t.length===0)return qt.red("No matches for this query.");let n=wF(this.cursor,t.length,this.optionsPerPage),i=n.startIndex,r=n.endIndex,o,a=[];for(let c=i;c<r;c++)c===i&&i>0?o=Vr.arrowUp:c===r-1&&r<t.length?o=Vr.arrowDown:o=" ",a.push(this.renderOption(this.cursor,t[c],c,o));return`
33
+ `:"")+" enter/return: Complete answer":""}renderOption(t,n,i,r){let o=(n.selected?Kt.green(Wr.radioOn):Wr.radioOff)+" "+r+" ",a,c;return n.disabled?a=t===i?Kt.gray().underline(n.title):Kt.strikethrough().gray(n.title):(a=t===i?Kt.cyan().underline(n.title):n.title,t===i&&n.description&&(c=` - ${n.description}`,(o.length+a.length+c.length>=this.out.columns||n.description.split(/\r?\n/).length>1)&&(c=`
34
+ `+rB(n.description,{margin:o.length,width:this.out.columns})))),o+a+Kt.gray(c||"")}paginateOptions(t){if(t.length===0)return Kt.red("No matches for this query.");let n=nB(this.cursor,t.length,this.optionsPerPage),i=n.startIndex,r=n.endIndex,o,a=[];for(let c=i;c<r;c++)c===i&&i>0?o=Wr.arrowUp:c===r-1&&r<t.length?o=Wr.arrowDown:o=" ",a.push(this.renderOption(this.cursor,t[c],c,o));return`
35
35
  `+a.join(`
36
- `)}renderOptions(t){return this.done?"":this.paginateOptions(t)}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let t=[qt.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&t.push(qt.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(RF.hide),super.render();let t=[RN.symbol(this.done,this.aborted),qt.bold(this.msg),RN.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=qt.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.value),this.out.write(this.clear+t),this.clear=CN(t,this.out.columns)}};PN.exports=nS});var jN=I((Dee,MN)=>{"use strict";function NN(e,t,n,i,r,o,a){try{var c=e[o](a),u=c.value}catch(l){n(l);return}c.done?t(u):Promise.resolve(u).then(i,r)}function kF(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){NN(o,i,r,a,c,"next",u)}function c(u){NN(o,i,r,a,c,"throw",u)}a(void 0)})}}var os=se(),OF=pr(),DN=ce(),DF=DN.erase,wN=DN.cursor,as=Ct(),oS=as.style,kN=as.clear,aS=as.figures,MF=as.wrap,jF=as.entriesToDisplay,ON=(e,t)=>e[t]&&(e[t].value||e[t].title||e[t]),zF=(e,t)=>e[t]&&(e[t].title||e[t].value||e[t]),LF=(e,t)=>{let n=e.findIndex(i=>i.value===t||i.title===t);return n>-1?n:void 0},sS=class extends OF{constructor(t={}){super(t),this.msg=t.message,this.suggest=t.suggest,this.choices=t.choices,this.initial=typeof t.initial=="number"?t.initial:LF(t.choices,t.initial),this.select=this.initial||t.cursor||0,this.i18n={noMatches:t.noMatches||"no matches found"},this.fallback=t.fallback||this.initial,this.clearFirst=t.clearFirst||!1,this.suggestions=[],this.input="",this.limit=t.limit||10,this.cursor=0,this.transform=oS.render(t.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=kN("",this.out.columns),this.complete(this.render),this.render()}set fallback(t){this._fb=Number.isSafeInteger(parseInt(t))?parseInt(t):t}get fallback(){let t;return typeof this._fb=="number"?t=this.choices[this._fb]:typeof this._fb=="string"&&(t={title:this._fb}),t||this._fb||{title:this.i18n.noMatches}}moveSelect(t){this.select=t,this.suggestions.length>0?this.value=ON(this.suggestions,t):this.value=this.fallback.value,this.fire()}complete(t){var n=this;return kF(function*(){let i=n.completing=n.suggest(n.input,n.choices),r=yield i;if(n.completing!==i)return;n.suggestions=r.map((a,c,u)=>({title:zF(u,c),value:ON(u,c),description:a.description})),n.completing=!1;let o=Math.max(r.length-1,0);n.moveSelect(Math.min(o,n.select)),t&&t()})()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
36
+ `)}renderOptions(t){return this.done?"":this.paginateOptions(t)}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let t=[Kt.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&t.push(Kt.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(eB.hide),super.render();let t=[JP.symbol(this.done,this.aborted),Kt.bold(this.msg),JP.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=Kt.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.value),this.out.write(this.clear+t),this.clear=XP(t,this.out.columns)}};QP.exports=pS});var aw=I((pte,ow)=>{"use strict";function ew(e,t,n,i,r,o,a){try{var c=e[o](a),u=c.value}catch(l){n(l);return}c.done?t(u):Promise.resolve(u).then(i,r)}function iB(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){ew(o,i,r,a,c,"next",u)}function c(u){ew(o,i,r,a,c,"throw",u)}a(void 0)})}}var ds=se(),oB=fr(),iw=ce(),aB=iw.erase,tw=iw.cursor,ms=Rt(),gS=ms.style,rw=ms.clear,hS=ms.figures,sB=ms.wrap,cB=ms.entriesToDisplay,nw=(e,t)=>e[t]&&(e[t].value||e[t].title||e[t]),uB=(e,t)=>e[t]&&(e[t].title||e[t].value||e[t]),lB=(e,t)=>{let n=e.findIndex(i=>i.value===t||i.title===t);return n>-1?n:void 0},vS=class extends oB{constructor(t={}){super(t),this.msg=t.message,this.suggest=t.suggest,this.choices=t.choices,this.initial=typeof t.initial=="number"?t.initial:lB(t.choices,t.initial),this.select=this.initial||t.cursor||0,this.i18n={noMatches:t.noMatches||"no matches found"},this.fallback=t.fallback||this.initial,this.clearFirst=t.clearFirst||!1,this.suggestions=[],this.input="",this.limit=t.limit||10,this.cursor=0,this.transform=gS.render(t.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=rw("",this.out.columns),this.complete(this.render),this.render()}set fallback(t){this._fb=Number.isSafeInteger(parseInt(t))?parseInt(t):t}get fallback(){let t;return typeof this._fb=="number"?t=this.choices[this._fb]:typeof this._fb=="string"&&(t={title:this._fb}),t||this._fb||{title:this.i18n.noMatches}}moveSelect(t){this.select=t,this.suggestions.length>0?this.value=nw(this.suggestions,t):this.value=this.fallback.value,this.fire()}complete(t){var n=this;return iB(function*(){let i=n.completing=n.suggest(n.input,n.choices),r=yield i;if(n.completing!==i)return;n.suggestions=r.map((a,c,u)=>({title:uB(u,c),value:nw(u,c),description:a.description})),n.completing=!1;let o=Math.max(r.length-1,0);n.moveSelect(Math.min(o,n.select)),t&&t()})()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
37
37
  `),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
38
38
  `),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
39
- `),this.close()}_(t,n){let i=this.input.slice(0,this.cursor),r=this.input.slice(this.cursor);this.input=`${i}${t}${r}`,this.cursor=i.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.input.slice(0,this.cursor-1),n=this.input.slice(this.cursor);this.input=`${t}${n}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor),n=this.input.slice(this.cursor+1);this.input=`${t}${n}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(t,n,i,r){let o,a=i?aS.arrowUp:r?aS.arrowDown:" ",c=n?os.cyan().underline(t.title):t.title;return a=(n?os.cyan(aS.pointer)+" ":" ")+a,t.description&&(o=` - ${t.description}`,(a.length+c.length+o.length>=this.out.columns||t.description.split(/\r?\n/).length>1)&&(o=`
40
- `+MF(t.description,{margin:3,width:this.out.columns}))),a+" "+c+os.gray(o||"")}render(){if(this.closed)return;this.firstRender?this.out.write(wN.hide):this.out.write(kN(this.outputText,this.out.columns)),super.render();let t=jF(this.select,this.choices.length,this.limit),n=t.startIndex,i=t.endIndex;if(this.outputText=[oS.symbol(this.done,this.aborted,this.exited),os.bold(this.msg),oS.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let r=this.suggestions.slice(n,i).map((o,a)=>this.renderOption(o,this.select===a+n,a===0&&n>0,a+n===i-1&&i<this.choices.length)).join(`
39
+ `),this.close()}_(t,n){let i=this.input.slice(0,this.cursor),r=this.input.slice(this.cursor);this.input=`${i}${t}${r}`,this.cursor=i.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.input.slice(0,this.cursor-1),n=this.input.slice(this.cursor);this.input=`${t}${n}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor),n=this.input.slice(this.cursor+1);this.input=`${t}${n}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(t,n,i,r){let o,a=i?hS.arrowUp:r?hS.arrowDown:" ",c=n?ds.cyan().underline(t.title):t.title;return a=(n?ds.cyan(hS.pointer)+" ":" ")+a,t.description&&(o=` - ${t.description}`,(a.length+c.length+o.length>=this.out.columns||t.description.split(/\r?\n/).length>1)&&(o=`
40
+ `+sB(t.description,{margin:3,width:this.out.columns}))),a+" "+c+ds.gray(o||"")}render(){if(this.closed)return;this.firstRender?this.out.write(tw.hide):this.out.write(rw(this.outputText,this.out.columns)),super.render();let t=cB(this.select,this.choices.length,this.limit),n=t.startIndex,i=t.endIndex;if(this.outputText=[gS.symbol(this.done,this.aborted,this.exited),ds.bold(this.msg),gS.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let r=this.suggestions.slice(n,i).map((o,a)=>this.renderOption(o,this.select===a+n,a===0&&n>0,a+n===i-1&&i<this.choices.length)).join(`
41
41
  `);this.outputText+=`
42
- `+(r||os.gray(this.fallback.title))}this.out.write(DF.line+wN.to(0)+this.outputText)}};MN.exports=sS});var FN=I((Mee,UN)=>{"use strict";var hr=se(),UF=ce(),FF=UF.cursor,BF=iS(),uS=Ct(),zN=uS.clear,LN=uS.style,no=uS.figures,cS=class extends BF{constructor(t={}){t.overrideRender=!0,super(t),this.inputValue="",this.clear=zN("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(t=>t.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){let t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(i=>this.inputValue?!!(typeof i.title=="string"&&i.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof i.value=="string"&&i.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);let n=this.filteredOptions.findIndex(i=>i===t);this.cursor=n<0?0:n,this.render()}handleSpaceToggle(){let t=this.filteredOptions[this.cursor];if(t.selected)t.selected=!1,this.render();else{if(t.disabled||this.value.filter(n=>n.selected).length>=this.maxChoices)return this.bell();t.selected=!0,this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t,this.updateFilteredOptions()}_(t,n){t===" "?this.handleSpaceToggle():this.handleInputChange(t)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
42
+ `+(r||ds.gray(this.fallback.title))}this.out.write(aB.line+tw.to(0)+this.outputText)}};ow.exports=vS});var lw=I((fte,uw)=>{"use strict";var vr=se(),dB=ce(),mB=dB.cursor,pB=fS(),yS=Rt(),sw=yS.clear,cw=yS.style,mo=yS.figures,bS=class extends pB{constructor(t={}){t.overrideRender=!0,super(t),this.inputValue="",this.clear=sw("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(t=>t.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){let t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(i=>this.inputValue?!!(typeof i.title=="string"&&i.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof i.value=="string"&&i.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);let n=this.filteredOptions.findIndex(i=>i===t);this.cursor=n<0?0:n,this.render()}handleSpaceToggle(){let t=this.filteredOptions[this.cursor];if(t.selected)t.selected=!1,this.render();else{if(t.disabled||this.value.filter(n=>n.selected).length>=this.maxChoices)return this.bell();t.selected=!0,this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t,this.updateFilteredOptions()}_(t,n){t===" "?this.handleSpaceToggle():this.handleInputChange(t)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
43
43
  Instructions:
44
- ${no.arrowUp}/${no.arrowDown}: Highlight option
45
- ${no.arrowLeft}/${no.arrowRight}/[space]: Toggle selection
44
+ ${mo.arrowUp}/${mo.arrowDown}: Highlight option
45
+ ${mo.arrowLeft}/${mo.arrowRight}/[space]: Toggle selection
46
46
  [a,b,c]/delete: Filter choices
47
47
  enter/return: Complete answer
48
48
  `:""}renderCurrentInput(){return`
49
- Filtered results for: ${this.inputValue?this.inputValue:hr.gray("Enter something to filter")}
50
- `}renderOption(t,n,i){let r;return n.disabled?r=t===i?hr.gray().underline(n.title):hr.strikethrough().gray(n.title):r=t===i?hr.cyan().underline(n.title):n.title,(n.selected?hr.green(no.radioOn):no.radioOff)+" "+r}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let t=[hr.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&t.push(hr.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(FF.hide),super.render();let t=[LN.symbol(this.done,this.aborted),hr.bold(this.msg),LN.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=hr.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+t),this.clear=zN(t,this.out.columns)}};UN.exports=cS});var qN=I((jee,HN)=>{"use strict";var BN=se(),VF=pr(),ZN=Ct(),VN=ZN.style,GF=ZN.clear,WN=ce(),ZF=WN.erase,GN=WN.cursor,lS=class extends VF{constructor(t={}){super(t),this.msg=t.message,this.value=t.initial,this.initialValue=!!t.initial,this.yesMsg=t.yes||"yes",this.yesOption=t.yesOption||"(Y/n)",this.noMsg=t.no||"no",this.noOption=t.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
49
+ Filtered results for: ${this.inputValue?this.inputValue:vr.gray("Enter something to filter")}
50
+ `}renderOption(t,n,i){let r;return n.disabled?r=t===i?vr.gray().underline(n.title):vr.strikethrough().gray(n.title):r=t===i?vr.cyan().underline(n.title):n.title,(n.selected?vr.green(mo.radioOn):mo.radioOff)+" "+r}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let t=[vr.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&t.push(vr.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(mB.hide),super.render();let t=[cw.symbol(this.done,this.aborted),vr.bold(this.msg),cw.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=vr.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+t),this.clear=sw(t,this.out.columns)}};uw.exports=bS});var vw=I((gte,hw)=>{"use strict";var dw=se(),fB=fr(),fw=Rt(),mw=fw.style,gB=fw.clear,gw=ce(),hB=gw.erase,pw=gw.cursor,SS=class extends fB{constructor(t={}){super(t),this.msg=t.message,this.value=t.initial,this.initialValue=!!t.initial,this.yesMsg=t.yes||"yes",this.yesOption=t.yesOption||"(Y/n)",this.noMsg=t.no||"no",this.noOption=t.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
51
51
  `),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
52
- `),this.close()}_(t,n){return t.toLowerCase()==="y"?(this.value=!0,this.submit()):t.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(GN.hide):this.out.write(GF(this.outputText,this.out.columns)),super.render(),this.outputText=[VN.symbol(this.done,this.aborted),BN.bold(this.msg),VN.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:BN.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(ZF.line+GN.to(0)+this.outputText))}};HN.exports=lS});var YN=I((zee,KN)=>{"use strict";KN.exports={TextPrompt:DP(),SelectPrompt:LP(),TogglePrompt:ZP(),DatePrompt:SN(),NumberPrompt:TN(),MultiselectPrompt:iS(),AutocompletePrompt:jN(),AutocompleteMultiselectPrompt:FN(),ConfirmPrompt:qN()}});var JN=I(XN=>{"use strict";var Je=XN,WF=YN(),ad=e=>e;function Kt(e,t,n={}){return new Promise((i,r)=>{let o=new WF[e](t),a=n.onAbort||ad,c=n.onSubmit||ad,u=n.onExit||ad;o.on("state",t.onState||ad),o.on("submit",l=>i(c(l))),o.on("exit",l=>i(u(l))),o.on("abort",l=>r(a(l)))})}Je.text=e=>Kt("TextPrompt",e);Je.password=e=>(e.style="password",Je.text(e));Je.invisible=e=>(e.style="invisible",Je.text(e));Je.number=e=>Kt("NumberPrompt",e);Je.date=e=>Kt("DatePrompt",e);Je.confirm=e=>Kt("ConfirmPrompt",e);Je.list=e=>{let t=e.separator||",";return Kt("TextPrompt",e,{onSubmit:n=>n.split(t).map(i=>i.trim())})};Je.toggle=e=>Kt("TogglePrompt",e);Je.select=e=>Kt("SelectPrompt",e);Je.multiselect=e=>{e.choices=[].concat(e.choices||[]);let t=n=>n.filter(i=>i.selected).map(i=>i.value);return Kt("MultiselectPrompt",e,{onAbort:t,onSubmit:t})};Je.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);let t=n=>n.filter(i=>i.selected).map(i=>i.value);return Kt("AutocompleteMultiselectPrompt",e,{onAbort:t,onSubmit:t})};var HF=(e,t)=>Promise.resolve(t.filter(n=>n.title.slice(0,e.length).toLowerCase()===e.toLowerCase()));Je.autocomplete=e=>(e.suggest=e.suggest||HF,e.choices=[].concat(e.choices||[]),Kt("AutocompletePrompt",e))});var aw=I((Uee,ow)=>{"use strict";function QN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,i)}return n}function ew(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QN(Object(n),!0).forEach(function(i){qF(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QN(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function qF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KF(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=YF(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
53
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,c;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return o=l.done,l},e:function(l){a=!0,c=l},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(a)throw c}}}}function YF(e,t){if(e){if(typeof e=="string")return tw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tw(e,t)}}function tw(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function rw(e,t,n,i,r,o,a){try{var c=e[o](a),u=c.value}catch(l){n(l);return}c.done?t(u):Promise.resolve(u).then(i,r)}function nw(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){rw(o,i,r,a,c,"next",u)}function c(u){rw(o,i,r,a,c,"throw",u)}a(void 0)})}}var dS=JN(),XF=["suggest","format","onState","validate","onRender","type"],iw=()=>{};function Gr(){return mS.apply(this,arguments)}function mS(){return mS=nw(function*(e=[],{onSubmit:t=iw,onCancel:n=iw}={}){let i={},r=Gr._override||{};e=[].concat(e);let o,a,c,u,l,m,p=(function(){var z=nw(function*(xe,Sr,ke=!1){if(!(!ke&&xe.validate&&xe.validate(Sr)!==!0))return xe.format?yield xe.format(Sr,i):Sr});return function(Sr,ke){return z.apply(this,arguments)}})();var g=KF(e),v;try{for(g.s();!(v=g.n()).done;){a=v.value;var A=a;if(u=A.name,l=A.type,typeof l=="function"&&(l=yield l(o,ew({},i),a),a.type=l),!!l){for(let z in a){if(XF.includes(z))continue;let xe=a[z];a[z]=typeof xe=="function"?yield xe(o,ew({},i),m):xe}if(m=a,typeof a.message!="string")throw new Error("prompt message is required");var X=a;if(u=X.name,l=X.type,dS[l]===void 0)throw new Error(`prompt type (${l}) is not defined`);if(r[a.name]!==void 0&&(o=yield p(a,r[a.name]),o!==void 0)){i[u]=o;continue}try{o=Gr._injected?JF(Gr._injected,a.initial):yield dS[l](a),i[u]=o=yield p(a,o,!0),c=yield t(a,o,i)}catch{c=!(yield n(a,i))}if(c)return i}}}catch(z){g.e(z)}finally{g.f()}return i}),mS.apply(this,arguments)}function JF(e,t){let n=e.shift();if(n instanceof Error)throw n;return n===void 0?t:n}function QF(e){Gr._injected=(Gr._injected||[]).concat(e)}function eB(e){Gr._override=Object.assign({},e)}ow.exports=Object.assign(Gr,{prompt:Gr,prompts:dS,inject:QF,override:eB})});var cw=I((Fee,sw)=>{"use strict";sw.exports=(e,t)=>{if(!(e.meta&&e.name!=="escape")){if(e.ctrl){if(e.name==="a")return"first";if(e.name==="c"||e.name==="d")return"abort";if(e.name==="e")return"last";if(e.name==="g")return"reset"}if(t){if(e.name==="j")return"down";if(e.name==="k")return"up"}return e.name==="return"||e.name==="enter"?"submit":e.name==="backspace"?"delete":e.name==="delete"?"deleteForward":e.name==="abort"?"abort":e.name==="escape"?"exit":e.name==="tab"?"next":e.name==="pagedown"?"nextPage":e.name==="pageup"?"prevPage":e.name==="home"?"home":e.name==="end"?"end":e.name==="up"?"up":e.name==="down"?"down":e.name==="right"?"right":e.name==="left"?"left":!1}}});var sd=I((Bee,uw)=>{"use strict";uw.exports=e=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),n=new RegExp(t,"g");return typeof e=="string"?e.replace(n,""):e}});var mw=I((Vee,dw)=>{"use strict";var tB=sd(),{erase:lw,cursor:rB}=ce(),nB=e=>[...tB(e)].length;dw.exports=function(e,t){if(!t)return lw.line+rB.to(0);let n=0,i=e.split(/\r?\n/);for(let r of i)n+=1+Math.floor(Math.max(nB(r)-1,0)/t);return lw.lines(n)}});var pS=I((Gee,pw)=>{"use strict";var ss={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},iB={arrowUp:ss.arrowUp,arrowDown:ss.arrowDown,arrowLeft:ss.arrowLeft,arrowRight:ss.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},oB=process.platform==="win32"?iB:ss;pw.exports=oB});var gw=I((Zee,fw)=>{"use strict";var io=se(),Nn=pS(),fS=Object.freeze({password:{scale:1,render:e=>"*".repeat(e.length)},emoji:{scale:2,render:e=>"\u{1F603}".repeat(e.length)},invisible:{scale:0,render:e=>""},default:{scale:1,render:e=>`${e}`}}),aB=e=>fS[e]||fS.default,cs=Object.freeze({aborted:io.red(Nn.cross),done:io.green(Nn.tick),exited:io.yellow(Nn.cross),default:io.cyan("?")}),sB=(e,t,n)=>t?cs.aborted:n?cs.exited:e?cs.done:cs.default,cB=e=>io.gray(e?Nn.ellipsis:Nn.pointerSmall),uB=(e,t)=>io.gray(e?t?Nn.pointerSmall:"+":Nn.line);fw.exports={styles:fS,render:aB,symbols:cs,symbol:sB,delimiter:cB,item:uB}});var vw=I((Wee,hw)=>{"use strict";var lB=sd();hw.exports=function(e,t){let n=String(lB(e)||"").split(/\r?\n/);return t?n.map(i=>Math.ceil(i.length/t)).reduce((i,r)=>i+r):n.length}});var yw=I((Hee,bw)=>{"use strict";bw.exports=(e,t={})=>{let n=Number.isSafeInteger(parseInt(t.margin))?new Array(parseInt(t.margin)).fill(" ").join(""):t.margin||"",i=t.width;return(e||"").split(/\r?\n/g).map(r=>r.split(/\s+/g).reduce((o,a)=>(a.length+n.length>=i||o[o.length-1].length+a.length+1<i?o[o.length-1]+=` ${a}`:o.push(`${n}${a}`),o),[n]).join(`
52
+ `),this.close()}_(t,n){return t.toLowerCase()==="y"?(this.value=!0,this.submit()):t.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(pw.hide):this.out.write(gB(this.outputText,this.out.columns)),super.render(),this.outputText=[mw.symbol(this.done,this.aborted),dw.bold(this.msg),mw.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:dw.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(hB.line+pw.to(0)+this.outputText))}};hw.exports=SS});var yw=I((hte,bw)=>{"use strict";bw.exports={TextPrompt:iP(),SelectPrompt:cP(),TogglePrompt:fP(),DatePrompt:VP(),NumberPrompt:YP(),MultiselectPrompt:fS(),AutocompletePrompt:aw(),AutocompleteMultiselectPrompt:lw(),ConfirmPrompt:vw()}});var _w=I(Sw=>{"use strict";var Qe=Sw,vB=yw(),pd=e=>e;function Yt(e,t,n={}){return new Promise((i,r)=>{let o=new vB[e](t),a=n.onAbort||pd,c=n.onSubmit||pd,u=n.onExit||pd;o.on("state",t.onState||pd),o.on("submit",l=>i(c(l))),o.on("exit",l=>i(u(l))),o.on("abort",l=>r(a(l)))})}Qe.text=e=>Yt("TextPrompt",e);Qe.password=e=>(e.style="password",Qe.text(e));Qe.invisible=e=>(e.style="invisible",Qe.text(e));Qe.number=e=>Yt("NumberPrompt",e);Qe.date=e=>Yt("DatePrompt",e);Qe.confirm=e=>Yt("ConfirmPrompt",e);Qe.list=e=>{let t=e.separator||",";return Yt("TextPrompt",e,{onSubmit:n=>n.split(t).map(i=>i.trim())})};Qe.toggle=e=>Yt("TogglePrompt",e);Qe.select=e=>Yt("SelectPrompt",e);Qe.multiselect=e=>{e.choices=[].concat(e.choices||[]);let t=n=>n.filter(i=>i.selected).map(i=>i.value);return Yt("MultiselectPrompt",e,{onAbort:t,onSubmit:t})};Qe.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);let t=n=>n.filter(i=>i.selected).map(i=>i.value);return Yt("AutocompleteMultiselectPrompt",e,{onAbort:t,onSubmit:t})};var bB=(e,t)=>Promise.resolve(t.filter(n=>n.title.slice(0,e.length).toLowerCase()===e.toLowerCase()));Qe.autocomplete=e=>(e.suggest=e.suggest||bB,e.choices=[].concat(e.choices||[]),Yt("AutocompletePrompt",e))});var Cw=I((bte,Rw)=>{"use strict";function Ew(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,i)}return n}function xw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ew(Object(n),!0).forEach(function(i){yB(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ew(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function yB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SB(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=_B(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
53
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,c;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return o=l.done,l},e:function(l){a=!0,c=l},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(a)throw c}}}}function _B(e,t){if(e){if(typeof e=="string")return Aw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Aw(e,t)}}function Aw(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Iw(e,t,n,i,r,o,a){try{var c=e[o](a),u=c.value}catch(l){n(l);return}c.done?t(u):Promise.resolve(u).then(i,r)}function $w(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var o=e.apply(t,n);function a(u){Iw(o,i,r,a,c,"next",u)}function c(u){Iw(o,i,r,a,c,"throw",u)}a(void 0)})}}var _S=_w(),EB=["suggest","format","onState","validate","onRender","type"],Tw=()=>{};function Hr(){return ES.apply(this,arguments)}function ES(){return ES=$w(function*(e=[],{onSubmit:t=Tw,onCancel:n=Tw}={}){let i={},r=Hr._override||{};e=[].concat(e);let o,a,c,u,l,m,p=(function(){var z=$w(function*(xe,_r,De=!1){if(!(!De&&xe.validate&&xe.validate(_r)!==!0))return xe.format?yield xe.format(_r,i):_r});return function(_r,De){return z.apply(this,arguments)}})();var g=SB(e),v;try{for(g.s();!(v=g.n()).done;){a=v.value;var A=a;if(u=A.name,l=A.type,typeof l=="function"&&(l=yield l(o,xw({},i),a),a.type=l),!!l){for(let z in a){if(EB.includes(z))continue;let xe=a[z];a[z]=typeof xe=="function"?yield xe(o,xw({},i),m):xe}if(m=a,typeof a.message!="string")throw new Error("prompt message is required");var X=a;if(u=X.name,l=X.type,_S[l]===void 0)throw new Error(`prompt type (${l}) is not defined`);if(r[a.name]!==void 0&&(o=yield p(a,r[a.name]),o!==void 0)){i[u]=o;continue}try{o=Hr._injected?xB(Hr._injected,a.initial):yield _S[l](a),i[u]=o=yield p(a,o,!0),c=yield t(a,o,i)}catch{c=!(yield n(a,i))}if(c)return i}}}catch(z){g.e(z)}finally{g.f()}return i}),ES.apply(this,arguments)}function xB(e,t){let n=e.shift();if(n instanceof Error)throw n;return n===void 0?t:n}function AB(e){Hr._injected=(Hr._injected||[]).concat(e)}function IB(e){Hr._override=Object.assign({},e)}Rw.exports=Object.assign(Hr,{prompt:Hr,prompts:_S,inject:AB,override:IB})});var Pw=I((yte,Nw)=>{"use strict";Nw.exports=(e,t)=>{if(!(e.meta&&e.name!=="escape")){if(e.ctrl){if(e.name==="a")return"first";if(e.name==="c"||e.name==="d")return"abort";if(e.name==="e")return"last";if(e.name==="g")return"reset"}if(t){if(e.name==="j")return"down";if(e.name==="k")return"up"}return e.name==="return"||e.name==="enter"?"submit":e.name==="backspace"?"delete":e.name==="delete"?"deleteForward":e.name==="abort"?"abort":e.name==="escape"?"exit":e.name==="tab"?"next":e.name==="pagedown"?"nextPage":e.name==="pageup"?"prevPage":e.name==="home"?"home":e.name==="end"?"end":e.name==="up"?"up":e.name==="down"?"down":e.name==="right"?"right":e.name==="left"?"left":!1}}});var fd=I((Ste,ww)=>{"use strict";ww.exports=e=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),n=new RegExp(t,"g");return typeof e=="string"?e.replace(n,""):e}});var Dw=I((_te,Ow)=>{"use strict";var $B=fd(),{erase:kw,cursor:TB}=ce(),RB=e=>[...$B(e)].length;Ow.exports=function(e,t){if(!t)return kw.line+TB.to(0);let n=0,i=e.split(/\r?\n/);for(let r of i)n+=1+Math.floor(Math.max(RB(r)-1,0)/t);return kw.lines(n)}});var xS=I((Ete,Mw)=>{"use strict";var ps={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},CB={arrowUp:ps.arrowUp,arrowDown:ps.arrowDown,arrowLeft:ps.arrowLeft,arrowRight:ps.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},NB=process.platform==="win32"?CB:ps;Mw.exports=NB});var zw=I((xte,jw)=>{"use strict";var po=se(),Mn=xS(),AS=Object.freeze({password:{scale:1,render:e=>"*".repeat(e.length)},emoji:{scale:2,render:e=>"\u{1F603}".repeat(e.length)},invisible:{scale:0,render:e=>""},default:{scale:1,render:e=>`${e}`}}),PB=e=>AS[e]||AS.default,fs=Object.freeze({aborted:po.red(Mn.cross),done:po.green(Mn.tick),exited:po.yellow(Mn.cross),default:po.cyan("?")}),wB=(e,t,n)=>t?fs.aborted:n?fs.exited:e?fs.done:fs.default,kB=e=>po.gray(e?Mn.ellipsis:Mn.pointerSmall),OB=(e,t)=>po.gray(e?t?Mn.pointerSmall:"+":Mn.line);jw.exports={styles:AS,render:PB,symbols:fs,symbol:wB,delimiter:kB,item:OB}});var Uw=I((Ate,Lw)=>{"use strict";var DB=fd();Lw.exports=function(e,t){let n=String(DB(e)||"").split(/\r?\n/);return t?n.map(i=>Math.ceil(i.length/t)).reduce((i,r)=>i+r):n.length}});var Bw=I((Ite,Fw)=>{"use strict";Fw.exports=(e,t={})=>{let n=Number.isSafeInteger(parseInt(t.margin))?new Array(parseInt(t.margin)).fill(" ").join(""):t.margin||"",i=t.width;return(e||"").split(/\r?\n/g).map(r=>r.split(/\s+/g).reduce((o,a)=>(a.length+n.length>=i||o[o.length-1].length+a.length+1<i?o[o.length-1]+=` ${a}`:o.push(`${n}${a}`),o),[n]).join(`
54
54
  `)).join(`
55
- `)}});var _w=I((qee,Sw)=>{"use strict";Sw.exports=(e,t,n)=>{n=n||t;let i=Math.min(t-n,e-Math.floor(n/2));i<0&&(i=0);let r=Math.min(i+n,t);return{startIndex:i,endIndex:r}}});var Rt=I((Kee,Ew)=>{"use strict";Ew.exports={action:cw(),clear:mw(),style:gw(),strip:sd(),figures:pS(),lines:vw(),wrap:yw(),entriesToDisplay:_w()}});var vr=I((Yee,Aw)=>{"use strict";var xw=ds("readline"),{action:dB}=Rt(),mB=ds("events"),{beep:pB,cursor:fB}=ce(),gB=se(),gS=class extends mB{constructor(t={}){super(),this.firstRender=!0,this.in=t.stdin||process.stdin,this.out=t.stdout||process.stdout,this.onRender=(t.onRender||(()=>{})).bind(this);let n=xw.createInterface({input:this.in,escapeCodeTimeout:50});xw.emitKeypressEvents(this.in,n),this.in.isTTY&&this.in.setRawMode(!0);let i=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,r=(o,a)=>{let c=dB(a,i);c===!1?this._&&this._(o,a):typeof this[c]=="function"?this[c](a):this.bell()};this.close=()=>{this.out.write(fB.show),this.in.removeListener("keypress",r),this.in.isTTY&&this.in.setRawMode(!1),n.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",r)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(pB)}render(){this.onRender(gB),this.firstRender&&(this.firstRender=!1)}};Aw.exports=gS});var $w=I((Xee,Iw)=>{var cd=se(),hB=vr(),{erase:vB,cursor:us}=ce(),{style:hS,clear:vS,lines:bB,figures:yB}=Rt(),bS=class extends hB{constructor(t={}){super(t),this.transform=hS.render(t.style),this.scale=this.transform.scale,this.msg=t.message,this.initial=t.initial||"",this.validator=t.validate||(()=>!0),this.value="",this.errorMsg=t.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=vS("",this.out.columns),this.render()}set value(t){!t&&this.initial?(this.placeholder=!0,this.rendered=cd.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(t)),this._value=t,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
55
+ `)}});var Gw=I(($te,Vw)=>{"use strict";Vw.exports=(e,t,n)=>{n=n||t;let i=Math.min(t-n,e-Math.floor(n/2));i<0&&(i=0);let r=Math.min(i+n,t);return{startIndex:i,endIndex:r}}});var Ct=I((Tte,Zw)=>{"use strict";Zw.exports={action:Pw(),clear:Dw(),style:zw(),strip:fd(),figures:xS(),lines:Uw(),wrap:Bw(),entriesToDisplay:Gw()}});var br=I((Rte,Hw)=>{"use strict";var Ww=vs("readline"),{action:MB}=Ct(),jB=vs("events"),{beep:zB,cursor:LB}=ce(),UB=se(),IS=class extends jB{constructor(t={}){super(),this.firstRender=!0,this.in=t.stdin||process.stdin,this.out=t.stdout||process.stdout,this.onRender=(t.onRender||(()=>{})).bind(this);let n=Ww.createInterface({input:this.in,escapeCodeTimeout:50});Ww.emitKeypressEvents(this.in,n),this.in.isTTY&&this.in.setRawMode(!0);let i=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,r=(o,a)=>{let c=MB(a,i);c===!1?this._&&this._(o,a):typeof this[c]=="function"?this[c](a):this.bell()};this.close=()=>{this.out.write(LB.show),this.in.removeListener("keypress",r),this.in.isTTY&&this.in.setRawMode(!1),n.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",r)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(zB)}render(){this.onRender(UB),this.firstRender&&(this.firstRender=!1)}};Hw.exports=IS});var Kw=I((Cte,qw)=>{var gd=se(),FB=br(),{erase:BB,cursor:gs}=ce(),{style:$S,clear:TS,lines:VB,figures:GB}=Ct(),RS=class extends FB{constructor(t={}){super(t),this.transform=$S.render(t.style),this.scale=this.transform.scale,this.msg=t.message,this.initial=t.initial||"",this.validator=t.validate||(()=>!0),this.value="",this.errorMsg=t.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=TS("",this.out.columns),this.render()}set value(t){!t&&this.initial?(this.placeholder=!0,this.rendered=gd.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(t)),this._value=t,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
56
56
  `),this.close()}async validate(){let t=await this.validator(this.value);typeof t=="string"&&(this.errorMsg=t,t=!1),this.error=!t}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error){this.red=!0,this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
57
- `),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(t){this.placeholder||(this.cursor=this.cursor+t,this.cursorOffset+=t)}_(t,n){let i=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor);this.value=`${i}${t}${r}`,this.red=!1,this.cursor=this.placeholder?0:i.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let t=this.value.slice(0,this.cursor-1),n=this.value.slice(this.cursor);this.value=`${t}${n}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor),n=this.value.slice(this.cursor+1);this.value=`${t}${n}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(us.down(bB(this.outputError,this.out.columns)-1)+vS(this.outputError,this.out.columns)),this.out.write(vS(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[hS.symbol(this.done,this.aborted),cd.bold(this.msg),hS.delimiter(this.done),this.red?cd.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
57
+ `),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(t){this.placeholder||(this.cursor=this.cursor+t,this.cursorOffset+=t)}_(t,n){let i=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor);this.value=`${i}${t}${r}`,this.red=!1,this.cursor=this.placeholder?0:i.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let t=this.value.slice(0,this.cursor-1),n=this.value.slice(this.cursor);this.value=`${t}${n}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let t=this.value.slice(0,this.cursor),n=this.value.slice(this.cursor+1);this.value=`${t}${n}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(gs.down(VB(this.outputError,this.out.columns)-1)+TS(this.outputError,this.out.columns)),this.out.write(TS(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[$S.symbol(this.done,this.aborted),gd.bold(this.msg),$S.delimiter(this.done),this.red?gd.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
58
58
  `).reduce((t,n,i)=>t+`
59
- ${i?" ":yB.pointerSmall} ${cd.red().italic(n)}`,"")),this.out.write(vB.line+us.to(0)+this.outputText+us.save+this.outputError+us.restore+us.move(this.cursorOffset,0)))}};Iw.exports=bS});var Pw=I((Jee,Rw)=>{"use strict";var br=se(),SB=vr(),{style:Tw,clear:Cw,figures:ud,wrap:_B,entriesToDisplay:EB}=Rt(),{cursor:xB}=ce(),yS=class extends SB{constructor(t={}){super(t),this.msg=t.message,this.hint=t.hint||"- Use arrow-keys. Return to submit.",this.warn=t.warn||"- This option is disabled",this.cursor=t.initial||0,this.choices=t.choices.map((n,i)=>(typeof n=="string"&&(n={title:n,value:i}),{title:n&&(n.title||n.value||n),value:n&&(n.value===void 0?i:n.value),description:n&&n.description,selected:n&&n.selected,disabled:n&&n.disabled})),this.optionsPerPage=t.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=Cw("",this.out.columns),this.render()}moveCursor(t){this.cursor=t,this.value=this.choices[t].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
59
+ ${i?" ":GB.pointerSmall} ${gd.red().italic(n)}`,"")),this.out.write(BB.line+gs.to(0)+this.outputText+gs.save+this.outputError+gs.restore+gs.move(this.cursorOffset,0)))}};qw.exports=RS});var Qw=I((Nte,Jw)=>{"use strict";var yr=se(),ZB=br(),{style:Yw,clear:Xw,figures:hd,wrap:WB,entriesToDisplay:HB}=Ct(),{cursor:qB}=ce(),CS=class extends ZB{constructor(t={}){super(t),this.msg=t.message,this.hint=t.hint||"- Use arrow-keys. Return to submit.",this.warn=t.warn||"- This option is disabled",this.cursor=t.initial||0,this.choices=t.choices.map((n,i)=>(typeof n=="string"&&(n={title:n,value:i}),{title:n&&(n.title||n.value||n),value:n&&(n.value===void 0?i:n.value),description:n&&n.description,selected:n&&n.selected,disabled:n&&n.disabled})),this.optionsPerPage=t.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=Xw("",this.out.columns),this.render()}moveCursor(t){this.cursor=t,this.value=this.choices[t].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
60
60
  `),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
61
- `),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(t,n){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(xB.hide):this.out.write(Cw(this.outputText,this.out.columns)),super.render();let{startIndex:t,endIndex:n}=EB(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[Tw.symbol(this.done,this.aborted),br.bold(this.msg),Tw.delimiter(!1),this.done?this.selection.title:this.selection.disabled?br.yellow(this.warn):br.gray(this.hint)].join(" "),!this.done){this.outputText+=`
62
- `;for(let i=t;i<n;i++){let r,o,a="",c=this.choices[i];i===t&&t>0?o=ud.arrowUp:i===n-1&&n<this.choices.length?o=ud.arrowDown:o=" ",c.disabled?(r=this.cursor===i?br.gray().underline(c.title):br.strikethrough().gray(c.title),o=(this.cursor===i?br.bold().gray(ud.pointer)+" ":" ")+o):(r=this.cursor===i?br.cyan().underline(c.title):c.title,o=(this.cursor===i?br.cyan(ud.pointer)+" ":" ")+o,c.description&&this.cursor===i&&(a=` - ${c.description}`,(o.length+r.length+a.length>=this.out.columns||c.description.split(/\r?\n/).length>1)&&(a=`
63
- `+_B(c.description,{margin:3,width:this.out.columns})))),this.outputText+=`${o} ${r}${br.gray(a)}
64
- `}}this.out.write(this.outputText)}};Rw.exports=yS});var Ow=I((Qee,kw)=>{var ld=se(),AB=vr(),{style:Nw,clear:IB}=Rt(),{cursor:ww,erase:$B}=ce(),SS=class extends AB{constructor(t={}){super(t),this.msg=t.message,this.value=!!t.initial,this.active=t.active||"on",this.inactive=t.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
61
+ `),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(t,n){if(t===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(qB.hide):this.out.write(Xw(this.outputText,this.out.columns)),super.render();let{startIndex:t,endIndex:n}=HB(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[Yw.symbol(this.done,this.aborted),yr.bold(this.msg),Yw.delimiter(!1),this.done?this.selection.title:this.selection.disabled?yr.yellow(this.warn):yr.gray(this.hint)].join(" "),!this.done){this.outputText+=`
62
+ `;for(let i=t;i<n;i++){let r,o,a="",c=this.choices[i];i===t&&t>0?o=hd.arrowUp:i===n-1&&n<this.choices.length?o=hd.arrowDown:o=" ",c.disabled?(r=this.cursor===i?yr.gray().underline(c.title):yr.strikethrough().gray(c.title),o=(this.cursor===i?yr.bold().gray(hd.pointer)+" ":" ")+o):(r=this.cursor===i?yr.cyan().underline(c.title):c.title,o=(this.cursor===i?yr.cyan(hd.pointer)+" ":" ")+o,c.description&&this.cursor===i&&(a=` - ${c.description}`,(o.length+r.length+a.length>=this.out.columns||c.description.split(/\r?\n/).length>1)&&(a=`
63
+ `+WB(c.description,{margin:3,width:this.out.columns})))),this.outputText+=`${o} ${r}${yr.gray(a)}
64
+ `}}this.out.write(this.outputText)}};Jw.exports=CS});var nk=I((Pte,rk)=>{var vd=se(),KB=br(),{style:ek,clear:YB}=Ct(),{cursor:tk,erase:XB}=ce(),NS=class extends KB{constructor(t={}){super(t),this.msg=t.message,this.value=!!t.initial,this.active=t.active||"on",this.inactive=t.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
65
65
  `),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
66
- `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(t,n){if(t===" ")this.value=!this.value;else if(t==="1")this.value=!0;else if(t==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(ww.hide):this.out.write(IB(this.outputText,this.out.columns)),super.render(),this.outputText=[Nw.symbol(this.done,this.aborted),ld.bold(this.msg),Nw.delimiter(this.done),this.value?this.inactive:ld.cyan().underline(this.inactive),ld.gray("/"),this.value?ld.cyan().underline(this.active):this.active].join(" "),this.out.write($B.line+ww.to(0)+this.outputText))}};kw.exports=SS});var Yt=I((ete,Dw)=>{"use strict";var _S=class e{constructor({token:t,date:n,parts:i,locales:r}){this.token=t,this.date=n||new Date,this.parts=i||[this],this.locales=r||{}}up(){}down(){}next(){let t=this.parts.indexOf(this);return this.parts.find((n,i)=>i>t&&n instanceof e)}setTo(t){}prev(){let t=[].concat(this.parts).reverse(),n=t.indexOf(this);return t.find((i,r)=>r>n&&i instanceof e)}toString(){return String(this.date)}};Dw.exports=_S});var jw=I((tte,Mw)=>{"use strict";var TB=Yt(),ES=class extends TB{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}};Mw.exports=ES});var Lw=I((rte,zw)=>{"use strict";var CB=Yt(),RB=e=>(e=e%10,e===1?"st":e===2?"nd":e===3?"rd":"th"),xS=class extends CB{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate(),n=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+RB(t):this.token==="d"?n+1:this.token==="ddd"?this.locales.weekdaysShort[n]:this.token==="dddd"?this.locales.weekdays[n]:t}};zw.exports=xS});var Fw=I((nte,Uw)=>{"use strict";var PB=Yt(),AS=class extends PB{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();return/h/.test(this.token)&&(t=t%12||12),this.token.length>1?String(t).padStart(2,"0"):t}};Uw.exports=AS});var Vw=I((ite,Bw)=>{"use strict";var NB=Yt(),IS=class extends NB{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};Bw.exports=IS});var Zw=I((ote,Gw)=>{"use strict";var wB=Yt(),$S=class extends wB{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}};Gw.exports=$S});var Hw=I((ate,Ww)=>{"use strict";var kB=Yt(),TS=class extends kB{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1,this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth(),n=this.token.length;return n===2?String(t+1).padStart(2,"0"):n===3?this.locales.monthsShort[t]:n===4?this.locales.months[t]:String(t+1)}};Ww.exports=TS});var Kw=I((ste,qw)=>{"use strict";var OB=Yt(),CS=class extends OB{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}};qw.exports=CS});var Xw=I((cte,Yw)=>{"use strict";var DB=Yt(),RS=class extends DB{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}};Yw.exports=RS});var Qw=I((ute,Jw)=>{"use strict";Jw.exports={DatePart:Yt(),Meridiem:jw(),Day:Lw(),Hours:Fw(),Milliseconds:Vw(),Minutes:Zw(),Month:Hw(),Seconds:Kw(),Year:Xw()}});var ak=I((lte,ok)=>{"use strict";var PS=se(),MB=vr(),{style:ek,clear:tk,figures:jB}=Rt(),{erase:zB,cursor:rk}=ce(),{DatePart:nk,Meridiem:LB,Day:UB,Hours:FB,Milliseconds:BB,Minutes:VB,Month:GB,Seconds:ZB,Year:WB}=Qw(),HB=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,ik={1:({token:e})=>e.replace(/\\(.)/g,"$1"),2:e=>new UB(e),3:e=>new GB(e),4:e=>new WB(e),5:e=>new LB(e),6:e=>new FB(e),7:e=>new VB(e),8:e=>new ZB(e),9:e=>new BB(e)},qB={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},NS=class extends MB{constructor(t={}){super(t),this.msg=t.message,this.cursor=0,this.typed="",this.locales=Object.assign(qB,t.locales),this._date=t.initial||new Date,this.errorMsg=t.error||"Please Enter A Valid Value",this.validator=t.validate||(()=>!0),this.mask=t.mask||"YYYY-MM-DD HH:mm:ss",this.clear=tk("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(t){t&&this._date.setTime(t.getTime())}set mask(t){let n;for(this.parts=[];n=HB.exec(t);){let r=n.shift(),o=n.findIndex(a=>a!=null);this.parts.push(o in ik?ik[o]({token:n[o]||r,date:this.date,parts:this.parts,locales:this.locales}):n[o]||r)}let i=this.parts.reduce((r,o)=>(typeof o=="string"&&typeof r[r.length-1]=="string"?r[r.length-1]+=o:r.push(o),r),[]);this.parts.splice(0),this.parts.push(...i),this.reset()}moveCursor(t){this.typed="",this.cursor=t,this.fire()}reset(){this.moveCursor(this.parts.findIndex(t=>t instanceof nk)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
66
+ `),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(t,n){if(t===" ")this.value=!this.value;else if(t==="1")this.value=!0;else if(t==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(tk.hide):this.out.write(YB(this.outputText,this.out.columns)),super.render(),this.outputText=[ek.symbol(this.done,this.aborted),vd.bold(this.msg),ek.delimiter(this.done),this.value?this.inactive:vd.cyan().underline(this.inactive),vd.gray("/"),this.value?vd.cyan().underline(this.active):this.active].join(" "),this.out.write(XB.line+tk.to(0)+this.outputText))}};rk.exports=NS});var Xt=I((wte,ik)=>{"use strict";var PS=class e{constructor({token:t,date:n,parts:i,locales:r}){this.token=t,this.date=n||new Date,this.parts=i||[this],this.locales=r||{}}up(){}down(){}next(){let t=this.parts.indexOf(this);return this.parts.find((n,i)=>i>t&&n instanceof e)}setTo(t){}prev(){let t=[].concat(this.parts).reverse(),n=t.indexOf(this);return t.find((i,r)=>r>n&&i instanceof e)}toString(){return String(this.date)}};ik.exports=PS});var ak=I((kte,ok)=>{"use strict";var JB=Xt(),wS=class extends JB{constructor(t={}){super(t)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let t=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?t.toUpperCase():t}};ok.exports=wS});var ck=I((Ote,sk)=>{"use strict";var QB=Xt(),eV=e=>(e=e%10,e===1?"st":e===2?"nd":e===3?"rd":"th"),kS=class extends QB{constructor(t={}){super(t)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(t){this.date.setDate(parseInt(t.substr(-2)))}toString(){let t=this.date.getDate(),n=this.date.getDay();return this.token==="DD"?String(t).padStart(2,"0"):this.token==="Do"?t+eV(t):this.token==="d"?n+1:this.token==="ddd"?this.locales.weekdaysShort[n]:this.token==="dddd"?this.locales.weekdays[n]:t}};sk.exports=kS});var lk=I((Dte,uk)=>{"use strict";var tV=Xt(),OS=class extends tV{constructor(t={}){super(t)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(t){this.date.setHours(parseInt(t.substr(-2)))}toString(){let t=this.date.getHours();return/h/.test(this.token)&&(t=t%12||12),this.token.length>1?String(t).padStart(2,"0"):t}};uk.exports=OS});var mk=I((Mte,dk)=>{"use strict";var rV=Xt(),DS=class extends rV{constructor(t={}){super(t)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(t){this.date.setMilliseconds(parseInt(t.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};dk.exports=DS});var fk=I((jte,pk)=>{"use strict";var nV=Xt(),MS=class extends nV{constructor(t={}){super(t)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(t){this.date.setMinutes(parseInt(t.substr(-2)))}toString(){let t=this.date.getMinutes();return this.token.length>1?String(t).padStart(2,"0"):t}};pk.exports=MS});var hk=I((zte,gk)=>{"use strict";var iV=Xt(),jS=class extends iV{constructor(t={}){super(t)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(t){t=parseInt(t.substr(-2))-1,this.date.setMonth(t<0?0:t)}toString(){let t=this.date.getMonth(),n=this.token.length;return n===2?String(t+1).padStart(2,"0"):n===3?this.locales.monthsShort[t]:n===4?this.locales.months[t]:String(t+1)}};gk.exports=jS});var bk=I((Lte,vk)=>{"use strict";var oV=Xt(),zS=class extends oV{constructor(t={}){super(t)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(t){this.date.setSeconds(parseInt(t.substr(-2)))}toString(){let t=this.date.getSeconds();return this.token.length>1?String(t).padStart(2,"0"):t}};vk.exports=zS});var Sk=I((Ute,yk)=>{"use strict";var aV=Xt(),LS=class extends aV{constructor(t={}){super(t)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(t){this.date.setFullYear(t.substr(-4))}toString(){let t=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?t.substr(-2):t}};yk.exports=LS});var Ek=I((Fte,_k)=>{"use strict";_k.exports={DatePart:Xt(),Meridiem:ak(),Day:ck(),Hours:lk(),Milliseconds:mk(),Minutes:fk(),Month:hk(),Seconds:bk(),Year:Sk()}});var Ck=I((Bte,Rk)=>{"use strict";var US=se(),sV=br(),{style:xk,clear:Ak,figures:cV}=Ct(),{erase:uV,cursor:Ik}=ce(),{DatePart:$k,Meridiem:lV,Day:dV,Hours:mV,Milliseconds:pV,Minutes:fV,Month:gV,Seconds:hV,Year:vV}=Ek(),bV=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,Tk={1:({token:e})=>e.replace(/\\(.)/g,"$1"),2:e=>new dV(e),3:e=>new gV(e),4:e=>new vV(e),5:e=>new lV(e),6:e=>new mV(e),7:e=>new fV(e),8:e=>new hV(e),9:e=>new pV(e)},yV={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")},FS=class extends sV{constructor(t={}){super(t),this.msg=t.message,this.cursor=0,this.typed="",this.locales=Object.assign(yV,t.locales),this._date=t.initial||new Date,this.errorMsg=t.error||"Please Enter A Valid Value",this.validator=t.validate||(()=>!0),this.mask=t.mask||"YYYY-MM-DD HH:mm:ss",this.clear=Ak("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(t){t&&this._date.setTime(t.getTime())}set mask(t){let n;for(this.parts=[];n=bV.exec(t);){let r=n.shift(),o=n.findIndex(a=>a!=null);this.parts.push(o in Tk?Tk[o]({token:n[o]||r,date:this.date,parts:this.parts,locales:this.locales}):n[o]||r)}let i=this.parts.reduce((r,o)=>(typeof o=="string"&&typeof r[r.length-1]=="string"?r[r.length-1]+=o:r.push(o),r),[]);this.parts.splice(0),this.parts.push(...i),this.reset()}moveCursor(t){this.typed="",this.cursor=t,this.fire()}reset(){this.moveCursor(this.parts.findIndex(t=>t instanceof $k)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
67
67
  `),this.close()}async validate(){let t=await this.validator(this.value);typeof t=="string"&&(this.errorMsg=t,t=!1),this.error=!t}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
68
- `),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let t=this.parts[this.cursor].prev();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t)),this.render()}right(){let t=this.parts[this.cursor].next();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t)),this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex(n=>n instanceof nk)),this.render()}_(t){/\d/.test(t)&&(this.typed+=t,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(rk.hide):this.out.write(tk(this.outputText,this.out.columns)),super.render(),this.outputText=[ek.symbol(this.done,this.aborted),PS.bold(this.msg),ek.delimiter(!1),this.parts.reduce((t,n,i)=>t.concat(i===this.cursor&&!this.done?PS.cyan().underline(n.toString()):n),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
68
+ `),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let t=this.parts[this.cursor].prev();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t)),this.render()}right(){let t=this.parts[this.cursor].next();if(t==null)return this.bell();this.moveCursor(this.parts.indexOf(t)),this.render()}next(){let t=this.parts[this.cursor].next();this.moveCursor(t?this.parts.indexOf(t):this.parts.findIndex(n=>n instanceof $k)),this.render()}_(t){/\d/.test(t)&&(this.typed+=t,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(Ik.hide):this.out.write(Ak(this.outputText,this.out.columns)),super.render(),this.outputText=[xk.symbol(this.done,this.aborted),US.bold(this.msg),xk.delimiter(!1),this.parts.reduce((t,n,i)=>t.concat(i===this.cursor&&!this.done?US.cyan().underline(n.toString()):n),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
69
69
  `).reduce((t,n,i)=>t+`
70
- ${i?" ":jB.pointerSmall} ${PS.red().italic(n)}`,"")),this.out.write(zB.line+rk.to(0)+this.outputText))}};ok.exports=NS});var lk=I((dte,uk)=>{var dd=se(),KB=vr(),{cursor:md,erase:YB}=ce(),{style:wS,figures:XB,clear:sk,lines:JB}=Rt(),QB=/[0-9]/,kS=e=>e!==void 0,ck=(e,t)=>{let n=Math.pow(10,t);return Math.round(e*n)/n},OS=class extends KB{constructor(t={}){super(t),this.transform=wS.render(t.style),this.msg=t.message,this.initial=kS(t.initial)?t.initial:"",this.float=!!t.float,this.round=t.round||2,this.inc=t.increment||1,this.min=kS(t.min)?t.min:-1/0,this.max=kS(t.max)?t.max:1/0,this.errorMsg=t.error||"Please Enter A Valid Value",this.validator=t.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(t){!t&&t!==0?(this.placeholder=!0,this.rendered=dd.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${ck(t,this.round)}`),this._value=ck(t,this.round)),this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return t==="-"||t==="."&&this.float||QB.test(t)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let t=this.value;this.value=t!==""?t:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
70
+ ${i?" ":cV.pointerSmall} ${US.red().italic(n)}`,"")),this.out.write(uV.line+Ik.to(0)+this.outputText))}};Rk.exports=FS});var kk=I((Vte,wk)=>{var bd=se(),SV=br(),{cursor:yd,erase:_V}=ce(),{style:BS,figures:EV,clear:Nk,lines:xV}=Ct(),AV=/[0-9]/,VS=e=>e!==void 0,Pk=(e,t)=>{let n=Math.pow(10,t);return Math.round(e*n)/n},GS=class extends SV{constructor(t={}){super(t),this.transform=BS.render(t.style),this.msg=t.message,this.initial=VS(t.initial)?t.initial:"",this.float=!!t.float,this.round=t.round||2,this.inc=t.increment||1,this.min=VS(t.min)?t.min:-1/0,this.max=VS(t.max)?t.max:1/0,this.errorMsg=t.error||"Please Enter A Valid Value",this.validator=t.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(t){!t&&t!==0?(this.placeholder=!0,this.rendered=bd.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${Pk(t,this.round)}`),this._value=Pk(t,this.round)),this.fire()}get value(){return this._value}parse(t){return this.float?parseFloat(t):parseInt(t)}valid(t){return t==="-"||t==="."&&this.float||AV.test(t)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let t=this.value;this.value=t!==""?t:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
71
71
  `),this.close()}async validate(){let t=await this.validator(this.value);typeof t=="string"&&(this.errorMsg=t,t=!1),this.error=!t}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let t=this.value;this.value=t!==""?t:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write(`
72
- `),this.close()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let t=this.value.toString();if(t.length===0)return this.bell();this.value=this.parse(t=t.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(t,n){if(!this.valid(t))return this.bell();let i=Date.now();if(i-this.lastHit>1e3&&(this.typed=""),this.typed+=t,this.lastHit=i,this.color="cyan",t===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(md.down(JB(this.outputError,this.out.columns)-1)+sk(this.outputError,this.out.columns)),this.out.write(sk(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[wS.symbol(this.done,this.aborted),dd.bold(this.msg),wS.delimiter(this.done),!this.done||!this.done&&!this.placeholder?dd[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
72
+ `),this.close()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let t=this.value.toString();if(t.length===0)return this.bell();this.value=this.parse(t=t.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(t,n){if(!this.valid(t))return this.bell();let i=Date.now();if(i-this.lastHit>1e3&&(this.typed=""),this.typed+=t,this.lastHit=i,this.color="cyan",t===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(yd.down(xV(this.outputError,this.out.columns)-1)+Nk(this.outputError,this.out.columns)),this.out.write(Nk(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[BS.symbol(this.done,this.aborted),bd.bold(this.msg),BS.delimiter(this.done),!this.done||!this.done&&!this.placeholder?bd[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
73
73
  `).reduce((t,n,i)=>t+`
74
- ${i?" ":XB.pointerSmall} ${dd.red().italic(n)}`,"")),this.out.write(YB.line+md.to(0)+this.outputText+md.save+this.outputError+md.restore))}};uk.exports=OS});var MS=I((mte,pk)=>{"use strict";var Xt=se(),{cursor:eV}=ce(),tV=vr(),{clear:dk,figures:Zr,style:mk,wrap:rV,entriesToDisplay:nV}=Rt(),DS=class extends tV{constructor(t={}){super(t),this.msg=t.message,this.cursor=t.cursor||0,this.scrollIndex=t.cursor||0,this.hint=t.hint||"",this.warn=t.warn||"- This option is disabled -",this.minSelected=t.min,this.showMinError=!1,this.maxChoices=t.max,this.instructions=t.instructions,this.optionsPerPage=t.optionsPerPage||10,this.value=t.choices.map((n,i)=>(typeof n=="string"&&(n={title:n,value:i}),{title:n&&(n.title||n.value||n),description:n&&n.description,value:n&&(n.value===void 0?i:n.value),selected:n&&n.selected,disabled:n&&n.disabled})),this.clear=dk("",this.out.columns),t.overrideRender||this.render()}reset(){this.value.map(t=>!t.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(t=>t.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
74
+ ${i?" ":EV.pointerSmall} ${bd.red().italic(n)}`,"")),this.out.write(_V.line+yd.to(0)+this.outputText+yd.save+this.outputError+yd.restore))}};wk.exports=GS});var WS=I((Gte,Mk)=>{"use strict";var Jt=se(),{cursor:IV}=ce(),$V=br(),{clear:Ok,figures:qr,style:Dk,wrap:TV,entriesToDisplay:RV}=Ct(),ZS=class extends $V{constructor(t={}){super(t),this.msg=t.message,this.cursor=t.cursor||0,this.scrollIndex=t.cursor||0,this.hint=t.hint||"",this.warn=t.warn||"- This option is disabled -",this.minSelected=t.min,this.showMinError=!1,this.maxChoices=t.max,this.instructions=t.instructions,this.optionsPerPage=t.optionsPerPage||10,this.value=t.choices.map((n,i)=>(typeof n=="string"&&(n={title:n,value:i}),{title:n&&(n.title||n.value||n),description:n&&n.description,value:n&&(n.value===void 0?i:n.value),selected:n&&n.selected,disabled:n&&n.disabled})),this.clear=Ok("",this.out.columns),t.overrideRender||this.render()}reset(){this.value.map(t=>!t.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(t=>t.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
75
75
  `),this.close()}submit(){let t=this.value.filter(n=>n.selected);this.minSelected&&t.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
76
76
  `),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(t=>t.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){let t=this.value[this.cursor];if(t.selected)t.selected=!1,this.render();else{if(t.disabled||this.value.filter(n=>n.selected).length>=this.maxChoices)return this.bell();t.selected=!0,this.render()}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();let t=!this.value[this.cursor].selected;this.value.filter(n=>!n.disabled).forEach(n=>n.selected=t),this.render()}_(t,n){if(t===" ")this.handleSpaceToggle();else if(t==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
77
77
  Instructions:
78
- ${Zr.arrowUp}/${Zr.arrowDown}: Highlight option
79
- ${Zr.arrowLeft}/${Zr.arrowRight}/[space]: Toggle selection
78
+ ${qr.arrowUp}/${qr.arrowDown}: Highlight option
79
+ ${qr.arrowLeft}/${qr.arrowRight}/[space]: Toggle selection
80
80
  `+(this.maxChoices===void 0?` a: Toggle all
81
- `:"")+" enter/return: Complete answer":""}renderOption(t,n,i,r){let o=(n.selected?Xt.green(Zr.radioOn):Zr.radioOff)+" "+r+" ",a,c;return n.disabled?a=t===i?Xt.gray().underline(n.title):Xt.strikethrough().gray(n.title):(a=t===i?Xt.cyan().underline(n.title):n.title,t===i&&n.description&&(c=` - ${n.description}`,(o.length+a.length+c.length>=this.out.columns||n.description.split(/\r?\n/).length>1)&&(c=`
82
- `+rV(n.description,{margin:o.length,width:this.out.columns})))),o+a+Xt.gray(c||"")}paginateOptions(t){if(t.length===0)return Xt.red("No matches for this query.");let{startIndex:n,endIndex:i}=nV(this.cursor,t.length,this.optionsPerPage),r,o=[];for(let a=n;a<i;a++)a===n&&n>0?r=Zr.arrowUp:a===i-1&&i<t.length?r=Zr.arrowDown:r=" ",o.push(this.renderOption(this.cursor,t[a],a,r));return`
81
+ `:"")+" enter/return: Complete answer":""}renderOption(t,n,i,r){let o=(n.selected?Jt.green(qr.radioOn):qr.radioOff)+" "+r+" ",a,c;return n.disabled?a=t===i?Jt.gray().underline(n.title):Jt.strikethrough().gray(n.title):(a=t===i?Jt.cyan().underline(n.title):n.title,t===i&&n.description&&(c=` - ${n.description}`,(o.length+a.length+c.length>=this.out.columns||n.description.split(/\r?\n/).length>1)&&(c=`
82
+ `+TV(n.description,{margin:o.length,width:this.out.columns})))),o+a+Jt.gray(c||"")}paginateOptions(t){if(t.length===0)return Jt.red("No matches for this query.");let{startIndex:n,endIndex:i}=RV(this.cursor,t.length,this.optionsPerPage),r,o=[];for(let a=n;a<i;a++)a===n&&n>0?r=qr.arrowUp:a===i-1&&i<t.length?r=qr.arrowDown:r=" ",o.push(this.renderOption(this.cursor,t[a],a,r));return`
83
83
  `+o.join(`
84
- `)}renderOptions(t){return this.done?"":this.paginateOptions(t)}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let t=[Xt.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&t.push(Xt.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(eV.hide),super.render();let t=[mk.symbol(this.done,this.aborted),Xt.bold(this.msg),mk.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=Xt.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.value),this.out.write(this.clear+t),this.clear=dk(t,this.out.columns)}};pk.exports=DS});var bk=I((pte,vk)=>{"use strict";var ls=se(),iV=vr(),{erase:oV,cursor:fk}=ce(),{style:jS,clear:gk,figures:zS,wrap:aV,entriesToDisplay:sV}=Rt(),hk=(e,t)=>e[t]&&(e[t].value||e[t].title||e[t]),cV=(e,t)=>e[t]&&(e[t].title||e[t].value||e[t]),uV=(e,t)=>{let n=e.findIndex(i=>i.value===t||i.title===t);return n>-1?n:void 0},LS=class extends iV{constructor(t={}){super(t),this.msg=t.message,this.suggest=t.suggest,this.choices=t.choices,this.initial=typeof t.initial=="number"?t.initial:uV(t.choices,t.initial),this.select=this.initial||t.cursor||0,this.i18n={noMatches:t.noMatches||"no matches found"},this.fallback=t.fallback||this.initial,this.clearFirst=t.clearFirst||!1,this.suggestions=[],this.input="",this.limit=t.limit||10,this.cursor=0,this.transform=jS.render(t.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=gk("",this.out.columns),this.complete(this.render),this.render()}set fallback(t){this._fb=Number.isSafeInteger(parseInt(t))?parseInt(t):t}get fallback(){let t;return typeof this._fb=="number"?t=this.choices[this._fb]:typeof this._fb=="string"&&(t={title:this._fb}),t||this._fb||{title:this.i18n.noMatches}}moveSelect(t){this.select=t,this.suggestions.length>0?this.value=hk(this.suggestions,t):this.value=this.fallback.value,this.fire()}async complete(t){let n=this.completing=this.suggest(this.input,this.choices),i=await n;if(this.completing!==n)return;this.suggestions=i.map((o,a,c)=>({title:cV(c,a),value:hk(c,a),description:o.description})),this.completing=!1;let r=Math.max(i.length-1,0);this.moveSelect(Math.min(r,this.select)),t&&t()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
84
+ `)}renderOptions(t){return this.done?"":this.paginateOptions(t)}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let t=[Jt.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&t.push(Jt.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(IV.hide),super.render();let t=[Dk.symbol(this.done,this.aborted),Jt.bold(this.msg),Dk.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=Jt.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.value),this.out.write(this.clear+t),this.clear=Ok(t,this.out.columns)}};Mk.exports=ZS});var Fk=I((Zte,Uk)=>{"use strict";var hs=se(),CV=br(),{erase:NV,cursor:jk}=ce(),{style:HS,clear:zk,figures:qS,wrap:PV,entriesToDisplay:wV}=Ct(),Lk=(e,t)=>e[t]&&(e[t].value||e[t].title||e[t]),kV=(e,t)=>e[t]&&(e[t].title||e[t].value||e[t]),OV=(e,t)=>{let n=e.findIndex(i=>i.value===t||i.title===t);return n>-1?n:void 0},KS=class extends CV{constructor(t={}){super(t),this.msg=t.message,this.suggest=t.suggest,this.choices=t.choices,this.initial=typeof t.initial=="number"?t.initial:OV(t.choices,t.initial),this.select=this.initial||t.cursor||0,this.i18n={noMatches:t.noMatches||"no matches found"},this.fallback=t.fallback||this.initial,this.clearFirst=t.clearFirst||!1,this.suggestions=[],this.input="",this.limit=t.limit||10,this.cursor=0,this.transform=HS.render(t.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=zk("",this.out.columns),this.complete(this.render),this.render()}set fallback(t){this._fb=Number.isSafeInteger(parseInt(t))?parseInt(t):t}get fallback(){let t;return typeof this._fb=="number"?t=this.choices[this._fb]:typeof this._fb=="string"&&(t={title:this._fb}),t||this._fb||{title:this.i18n.noMatches}}moveSelect(t){this.select=t,this.suggestions.length>0?this.value=Lk(this.suggestions,t):this.value=this.fallback.value,this.fire()}async complete(t){let n=this.completing=this.suggest(this.input,this.choices),i=await n;if(this.completing!==n)return;this.suggestions=i.map((o,a,c)=>({title:kV(c,a),value:Lk(c,a),description:o.description})),this.completing=!1;let r=Math.max(i.length-1,0);this.moveSelect(Math.min(r,this.select)),t&&t()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
85
85
  `),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
86
86
  `),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
87
- `),this.close()}_(t,n){let i=this.input.slice(0,this.cursor),r=this.input.slice(this.cursor);this.input=`${i}${t}${r}`,this.cursor=i.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.input.slice(0,this.cursor-1),n=this.input.slice(this.cursor);this.input=`${t}${n}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor),n=this.input.slice(this.cursor+1);this.input=`${t}${n}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(t,n,i,r){let o,a=i?zS.arrowUp:r?zS.arrowDown:" ",c=n?ls.cyan().underline(t.title):t.title;return a=(n?ls.cyan(zS.pointer)+" ":" ")+a,t.description&&(o=` - ${t.description}`,(a.length+c.length+o.length>=this.out.columns||t.description.split(/\r?\n/).length>1)&&(o=`
88
- `+aV(t.description,{margin:3,width:this.out.columns}))),a+" "+c+ls.gray(o||"")}render(){if(this.closed)return;this.firstRender?this.out.write(fk.hide):this.out.write(gk(this.outputText,this.out.columns)),super.render();let{startIndex:t,endIndex:n}=sV(this.select,this.choices.length,this.limit);if(this.outputText=[jS.symbol(this.done,this.aborted,this.exited),ls.bold(this.msg),jS.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let i=this.suggestions.slice(t,n).map((r,o)=>this.renderOption(r,this.select===o+t,o===0&&t>0,o+t===n-1&&n<this.choices.length)).join(`
87
+ `),this.close()}_(t,n){let i=this.input.slice(0,this.cursor),r=this.input.slice(this.cursor);this.input=`${i}${t}${r}`,this.cursor=i.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let t=this.input.slice(0,this.cursor-1),n=this.input.slice(this.cursor);this.input=`${t}${n}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let t=this.input.slice(0,this.cursor),n=this.input.slice(this.cursor+1);this.input=`${t}${n}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(t,n,i,r){let o,a=i?qS.arrowUp:r?qS.arrowDown:" ",c=n?hs.cyan().underline(t.title):t.title;return a=(n?hs.cyan(qS.pointer)+" ":" ")+a,t.description&&(o=` - ${t.description}`,(a.length+c.length+o.length>=this.out.columns||t.description.split(/\r?\n/).length>1)&&(o=`
88
+ `+PV(t.description,{margin:3,width:this.out.columns}))),a+" "+c+hs.gray(o||"")}render(){if(this.closed)return;this.firstRender?this.out.write(jk.hide):this.out.write(zk(this.outputText,this.out.columns)),super.render();let{startIndex:t,endIndex:n}=wV(this.select,this.choices.length,this.limit);if(this.outputText=[HS.symbol(this.done,this.aborted,this.exited),hs.bold(this.msg),HS.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let i=this.suggestions.slice(t,n).map((r,o)=>this.renderOption(r,this.select===o+t,o===0&&t>0,o+t===n-1&&n<this.choices.length)).join(`
89
89
  `);this.outputText+=`
90
- `+(i||ls.gray(this.fallback.title))}this.out.write(oV.line+fk.to(0)+this.outputText)}};vk.exports=LS});var Ek=I((fte,_k)=>{"use strict";var yr=se(),{cursor:lV}=ce(),dV=MS(),{clear:yk,style:Sk,figures:oo}=Rt(),US=class extends dV{constructor(t={}){t.overrideRender=!0,super(t),this.inputValue="",this.clear=yk("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(t=>t.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){let t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(i=>this.inputValue?!!(typeof i.title=="string"&&i.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof i.value=="string"&&i.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);let n=this.filteredOptions.findIndex(i=>i===t);this.cursor=n<0?0:n,this.render()}handleSpaceToggle(){let t=this.filteredOptions[this.cursor];if(t.selected)t.selected=!1,this.render();else{if(t.disabled||this.value.filter(n=>n.selected).length>=this.maxChoices)return this.bell();t.selected=!0,this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t,this.updateFilteredOptions()}_(t,n){t===" "?this.handleSpaceToggle():this.handleInputChange(t)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
90
+ `+(i||hs.gray(this.fallback.title))}this.out.write(NV.line+jk.to(0)+this.outputText)}};Uk.exports=KS});var Zk=I((Wte,Gk)=>{"use strict";var Sr=se(),{cursor:DV}=ce(),MV=WS(),{clear:Bk,style:Vk,figures:fo}=Ct(),YS=class extends MV{constructor(t={}){t.overrideRender=!0,super(t),this.inputValue="",this.clear=Bk("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(t=>t.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){let t=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(i=>this.inputValue?!!(typeof i.title=="string"&&i.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof i.value=="string"&&i.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);let n=this.filteredOptions.findIndex(i=>i===t);this.cursor=n<0?0:n,this.render()}handleSpaceToggle(){let t=this.filteredOptions[this.cursor];if(t.selected)t.selected=!1,this.render();else{if(t.disabled||this.value.filter(n=>n.selected).length>=this.maxChoices)return this.bell();t.selected=!0,this.render()}}handleInputChange(t){this.inputValue=this.inputValue+t,this.updateFilteredOptions()}_(t,n){t===" "?this.handleSpaceToggle():this.handleInputChange(t)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
91
91
  Instructions:
92
- ${oo.arrowUp}/${oo.arrowDown}: Highlight option
93
- ${oo.arrowLeft}/${oo.arrowRight}/[space]: Toggle selection
92
+ ${fo.arrowUp}/${fo.arrowDown}: Highlight option
93
+ ${fo.arrowLeft}/${fo.arrowRight}/[space]: Toggle selection
94
94
  [a,b,c]/delete: Filter choices
95
95
  enter/return: Complete answer
96
96
  `:""}renderCurrentInput(){return`
97
- Filtered results for: ${this.inputValue?this.inputValue:yr.gray("Enter something to filter")}
98
- `}renderOption(t,n,i){let r;return n.disabled?r=t===i?yr.gray().underline(n.title):yr.strikethrough().gray(n.title):r=t===i?yr.cyan().underline(n.title):n.title,(n.selected?yr.green(oo.radioOn):oo.radioOff)+" "+r}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let t=[yr.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&t.push(yr.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(lV.hide),super.render();let t=[Sk.symbol(this.done,this.aborted),yr.bold(this.msg),Sk.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=yr.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+t),this.clear=yk(t,this.out.columns)}};_k.exports=US});var Tk=I((gte,$k)=>{var xk=se(),mV=vr(),{style:Ak,clear:pV}=Rt(),{erase:fV,cursor:Ik}=ce(),FS=class extends mV{constructor(t={}){super(t),this.msg=t.message,this.value=t.initial,this.initialValue=!!t.initial,this.yesMsg=t.yes||"yes",this.yesOption=t.yesOption||"(Y/n)",this.noMsg=t.no||"no",this.noOption=t.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
97
+ Filtered results for: ${this.inputValue?this.inputValue:Sr.gray("Enter something to filter")}
98
+ `}renderOption(t,n,i){let r;return n.disabled?r=t===i?Sr.gray().underline(n.title):Sr.strikethrough().gray(n.title):r=t===i?Sr.cyan().underline(n.title):n.title,(n.selected?Sr.green(fo.radioOn):fo.radioOff)+" "+r}renderDoneOrInstructions(){if(this.done)return this.value.filter(n=>n.selected).map(n=>n.title).join(", ");let t=[Sr.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&t.push(Sr.yellow(this.warn)),t.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(DV.hide),super.render();let t=[Vk.symbol(this.done,this.aborted),Sr.bold(this.msg),Vk.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(t+=Sr.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),t+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+t),this.clear=Bk(t,this.out.columns)}};Gk.exports=YS});var Yk=I((Hte,Kk)=>{var Wk=se(),jV=br(),{style:Hk,clear:zV}=Ct(),{erase:LV,cursor:qk}=ce(),XS=class extends jV{constructor(t={}){super(t),this.msg=t.message,this.value=t.initial,this.initialValue=!!t.initial,this.yesMsg=t.yes||"yes",this.yesOption=t.yesOption||"(Y/n)",this.noMsg=t.no||"no",this.noOption=t.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
99
99
  `),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
100
- `),this.close()}_(t,n){return t.toLowerCase()==="y"?(this.value=!0,this.submit()):t.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(Ik.hide):this.out.write(pV(this.outputText,this.out.columns)),super.render(),this.outputText=[Ak.symbol(this.done,this.aborted),xk.bold(this.msg),Ak.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:xk.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(fV.line+Ik.to(0)+this.outputText))}};$k.exports=FS});var Rk=I((hte,Ck)=>{"use strict";Ck.exports={TextPrompt:$w(),SelectPrompt:Pw(),TogglePrompt:Ow(),DatePrompt:ak(),NumberPrompt:lk(),MultiselectPrompt:MS(),AutocompletePrompt:bk(),AutocompleteMultiselectPrompt:Ek(),ConfirmPrompt:Tk()}});var Nk=I(Pk=>{"use strict";var Qe=Pk,gV=Rk(),pd=e=>e;function Jt(e,t,n={}){return new Promise((i,r)=>{let o=new gV[e](t),a=n.onAbort||pd,c=n.onSubmit||pd,u=n.onExit||pd;o.on("state",t.onState||pd),o.on("submit",l=>i(c(l))),o.on("exit",l=>i(u(l))),o.on("abort",l=>r(a(l)))})}Qe.text=e=>Jt("TextPrompt",e);Qe.password=e=>(e.style="password",Qe.text(e));Qe.invisible=e=>(e.style="invisible",Qe.text(e));Qe.number=e=>Jt("NumberPrompt",e);Qe.date=e=>Jt("DatePrompt",e);Qe.confirm=e=>Jt("ConfirmPrompt",e);Qe.list=e=>{let t=e.separator||",";return Jt("TextPrompt",e,{onSubmit:n=>n.split(t).map(i=>i.trim())})};Qe.toggle=e=>Jt("TogglePrompt",e);Qe.select=e=>Jt("SelectPrompt",e);Qe.multiselect=e=>{e.choices=[].concat(e.choices||[]);let t=n=>n.filter(i=>i.selected).map(i=>i.value);return Jt("MultiselectPrompt",e,{onAbort:t,onSubmit:t})};Qe.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);let t=n=>n.filter(i=>i.selected).map(i=>i.value);return Jt("AutocompleteMultiselectPrompt",e,{onAbort:t,onSubmit:t})};var hV=(e,t)=>Promise.resolve(t.filter(n=>n.title.slice(0,e.length).toLowerCase()===e.toLowerCase()));Qe.autocomplete=e=>(e.suggest=e.suggest||hV,e.choices=[].concat(e.choices||[]),Jt("AutocompletePrompt",e))});var Ok=I((bte,kk)=>{"use strict";var BS=Nk(),vV=["suggest","format","onState","validate","onRender","type"],wk=()=>{};async function Wr(e=[],{onSubmit:t=wk,onCancel:n=wk}={}){let i={},r=Wr._override||{};e=[].concat(e);let o,a,c,u,l,m,p=async(g,v,A=!1)=>{if(!(!A&&g.validate&&g.validate(v)!==!0))return g.format?await g.format(v,i):v};for(a of e)if({name:u,type:l}=a,typeof l=="function"&&(l=await l(o,{...i},a),a.type=l),!!l){for(let g in a){if(vV.includes(g))continue;let v=a[g];a[g]=typeof v=="function"?await v(o,{...i},m):v}if(m=a,typeof a.message!="string")throw new Error("prompt message is required");if({name:u,type:l}=a,BS[l]===void 0)throw new Error(`prompt type (${l}) is not defined`);if(r[a.name]!==void 0&&(o=await p(a,r[a.name]),o!==void 0)){i[u]=o;continue}try{o=Wr._injected?bV(Wr._injected,a.initial):await BS[l](a),i[u]=o=await p(a,o,!0),c=await t(a,o,i)}catch{c=!await n(a,i)}if(c)return i}return i}function bV(e,t){let n=e.shift();if(n instanceof Error)throw n;return n===void 0?t:n}function yV(e){Wr._injected=(Wr._injected||[]).concat(e)}function SV(e){Wr._override=Object.assign({},e)}kk.exports=Object.assign(Wr,{prompt:Wr,prompts:BS,inject:yV,override:SV})});var Mk=I((yte,Dk)=>{function _V(e){e=(Array.isArray(e)?e:e.split(".")).map(Number);let t=0,n=process.versions.node.split(".").map(Number);for(;t<e.length;t++){if(n[t]>e[t])return!1;if(e[t]>n[t])return!0}return!1}Dk.exports=_V("8.6.0")?aw():Ok()});import{join as _t,dirname as qS,normalize as Yk}from"node:path";import{readFileSync as Xk,existsSync as Jk}from"node:fs";var Kk=Object.defineProperty,Oe=(e,t)=>Kk(e,"name",{value:t,configurable:!0}),Hr="fjall";function qr(e,t){let n=Yk(e);if(n.includes("..")||n.startsWith("/"))throw new Error(`Invalid ${t}: path traversal is not allowed`)}Oe(qr,"assertNoTraversal");function Qk(){return Hr}Oe(Qk,"getFjallPath");function eO(e){let t=qS(e);return qS(t)||"."}Oe(eO,"getProjectRoot");function KS(e){if(!Jk(e))throw new Error(`Infrastructure file not found: ${e}`);let t=Xk(e,"utf-8").match(/const\s+appName\s*=\s*["']([^"']+)["']/);if(!t||!t[1])throw new Error(`Could not find appName in infrastructure file: ${e}. Expected format: const appName = "yourAppName";`);return t[1]}Oe(KS,"getAppNameFromInfrastructure");function tO(e){let t=_t(e,hd);return KS(t)}Oe(tO,"getAppName");function Qt(e){return qr(e,"app name"),_t(Hr,e,hd)}Oe(Qt,"getInfrastructurePath");function rO(e){return qr(e,"app name"),_t(Hr,e)}Oe(rO,"getAppPath");function nO(e){return qr(e,"component name"),_t(Hr,e)}Oe(nO,"getOrganisationComponentPath");function iO(e){return qr(e,"deployment type"),_t(Hr,e,"logs")}Oe(iO,"getDeploymentLogsPath");function oO(e){return qr(e,"deployment type"),_t(Hr,e,"logs","cloudformation")}Oe(oO,"getCloudFormationLogsPath");function YS(){return _t(Hr,"domains")}Oe(YS,"getDomainsDir");function gd(e){return qr(e,"domain name"),_t(YS(),e)}Oe(gd,"getDomainComponentPath");function aO(e){return _t(gd(e),hd)}Oe(aO,"getDomainInfrastructurePath");function sO(e){return _t(gd(e),cO)}Oe(sO,"getDomainZoneFilePath");var hd="infrastructure.ts",cO="zone.bind",uO="cdk.out";function lO(e){return _t(e,uO)}Oe(lO,"getCdkOutPath");var dO=Object.defineProperty,kn=(e,t)=>dO(e,"name",{value:t,configurable:!0});function vd(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}kn(vd,"escapeRegExp");function Kr(e,t,n){let i=Qt(t),r=e.read(i)?.toString();return r?new RegExp(`["']${vd(n)}["']`).test(r):!1}kn(Kr,"resourceExists");function ao(e,t,n){let i=Qt(t);if(!e.read(i)?.toString())throw new Error(`Infrastructure file not found for ${t}`);if(Kr(e,t,n))throw new Error(`Resource name '${n}' already exists in ${t}. Please choose a different name or remove the existing resource first.`)}kn(ao,"assertResourceNameUnique");function bd(e,t,n){let i=Qt(t),r=e.read(i)?.toString();if(!r)return 0;let o={database:/DatabaseFactory\.build\(/g,compute:/ComputeFactory\.build\(/g,lambda:/type:\s*["']lambda["']/g,ecs:/type:\s*["']ecs["']/g,ec2:/type:\s*["']ec2["']/g}[n];if(!o)return 0;let a=r.match(o);return a?a.length:0}kn(bd,"countResourcesOfType");function mO(e,t){let n=Qt(t),i=e.read(n)?.toString();if(!i)return[];let r=[],o=i.matchAll(/ComputeFactory\.build\(["']([^"']+)["'],\s*\{([^}]*?)\}/gs);for(let a of o){let c=a[1],u=a[2],l="ecs";u.includes('type: "lambda"')?l="lambda":u.includes('type: "ec2"')&&(l="ec2");let m=u.includes("connections:"),p=[];if(m){let g=u.match(/connections:\s*\[([^\]]+)\]/);if(g){let v=g[1].match(/\w+/g)??[];p.push(...v)}}r.push({name:c,type:l,hasConnections:m,connectedResources:p})}return r}kn(mO,"detectComputeResources");function pO(e,t,n){let i=Qt(t),r=e.read(i)?.toString();return r?new RegExp(`databaseName:\\s*["']${vd(n)}["']`).test(r):!1}kn(pO,"databaseExists");import*as eo from"fs";import*as QR from"path";var fO=Object.defineProperty,_r=(e,t)=>fO(e,"name",{value:t,configurable:!0});function Ve(e){return e.replace(/[-_](.)/g,(t,n)=>n.toUpperCase()).replace(/^./,t=>t.toUpperCase())}_r(Ve,"toPascalCase");function Nt(e){return e.replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/([a-z\d])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}_r(Nt,"toKebab");function On(e){return Nt(e).replace(/-/g,"_")}_r(On,"toValidDatabaseName");function XS(e){return Nt(e).replace(/-/g,"_").toUpperCase()}_r(XS,"toScreamingSnake");function JS(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}_r(JS,"capitalise");function QS(e){return e.split(".").join("")}_r(QS,"getSafeZoneName");function Yr(e){return e.toLowerCase().replace(/[^a-z0-9]/g,"")}_r(Yr,"accountConstructKey");function e_(e){let t=e.replace(new RegExp("\\P{ASCII}","gu"),"");return Yr(t)===Yr(e)&&Yr(e)!==""}_r(e_,"hasAsciiStableConstructKey");var gO=Object.defineProperty,ms=(e,t)=>gO(e,"name",{value:t,configurable:!0});function ps(e){return`${Ve(e.split(".").join(""))}Domain`}ms(ps,"getDomainStackName");function t_(e){return`${e}UsEast1Certificates`}ms(t_,"getDomainUsEast1CertificatesStackName");function yd(e){let t=e.replace(/\./g,"-");return{hostedZoneId:`${t}-hosted-zone-id`,certificateArn:`${t}-certificate-arn`,usEast1CertificateArn:`${t}-us-east-1-certificate-arn`,delegationRoleArn:`${t}-delegation-role-arn`,nameservers:`${t}-nameservers`}}ms(yd,"getDomainExportNames");function r_(e){return typeof e.hostedZoneId=="string"}ms(r_,"isManagedDomainBinding");var hO=Object.defineProperty,vO=(e,t)=>hO(e,"name",{value:t,configurable:!0});function n_(e){return`${Ve(e)}ImageTag`}vO(n_,"imageTagParameterName");var s={};Pt(s,{$brand:()=>_d,$input:()=>Bp,$output:()=>Fp,NEVER:()=>Sd,TimePrecision:()=>Wp,ZodAny:()=>Mg,ZodArray:()=>Ug,ZodBase64:()=>Uc,ZodBase64URL:()=>Fc,ZodBigInt:()=>di,ZodBigIntFormat:()=>Gc,ZodBoolean:()=>li,ZodCIDRv4:()=>zc,ZodCIDRv6:()=>Lc,ZodCUID:()=>Nc,ZodCUID2:()=>wc,ZodCatch:()=>ch,ZodCodec:()=>Lo,ZodCustom:()=>Uo,ZodCustomStringFormat:()=>ci,ZodDate:()=>Oo,ZodDefault:()=>rh,ZodDiscriminatedUnion:()=>Bg,ZodE164:()=>Bc,ZodEmail:()=>Cc,ZodEmoji:()=>Rc,ZodEnum:()=>ai,ZodError:()=>qD,ZodExactOptional:()=>Qg,ZodFile:()=>Xg,ZodFirstPartyTypeKind:()=>_h,ZodFunction:()=>bh,ZodGUID:()=>Ro,ZodIPv4:()=>Mc,ZodIPv6:()=>jc,ZodISODate:()=>Ec,ZodISODateTime:()=>_c,ZodISODuration:()=>Ac,ZodISOTime:()=>xc,ZodIntersection:()=>Vg,ZodIssueCode:()=>YD,ZodJWT:()=>Vc,ZodKSUID:()=>Dc,ZodLazy:()=>gh,ZodLiteral:()=>Yg,ZodMAC:()=>Rg,ZodMap:()=>qg,ZodNaN:()=>lh,ZodNanoID:()=>Pc,ZodNever:()=>zg,ZodNonOptional:()=>Yc,ZodNull:()=>Og,ZodNullable:()=>th,ZodNumber:()=>ui,ZodNumberFormat:()=>an,ZodObject:()=>Mo,ZodOptional:()=>Kc,ZodPipe:()=>zo,ZodPrefault:()=>ih,ZodPreprocess:()=>dh,ZodPromise:()=>vh,ZodReadonly:()=>mh,ZodRealError:()=>We,ZodRecord:()=>oi,ZodSet:()=>Kg,ZodString:()=>si,ZodStringFormat:()=>Y,ZodSuccess:()=>sh,ZodSymbol:()=>wg,ZodTemplateLiteral:()=>fh,ZodTransform:()=>Jg,ZodTuple:()=>Zg,ZodType:()=>k,ZodULID:()=>kc,ZodURL:()=>ko,ZodUUID:()=>Dt,ZodUndefined:()=>kg,ZodUnion:()=>jo,ZodUnknown:()=>jg,ZodVoid:()=>Lg,ZodXID:()=>Oc,ZodXor:()=>Fg,_ZodString:()=>Tc,_default:()=>nh,_function:()=>Zx,any:()=>Ex,array:()=>Do,base64:()=>ox,base64url:()=>ax,bigint:()=>vx,boolean:()=>Ng,catch:()=>uh,check:()=>Wx,cidrv4:()=>nx,cidrv6:()=>ix,clone:()=>De,codec:()=>Fx,coerce:()=>Eh,config:()=>ue,core:()=>rr,cuid:()=>KE,cuid2:()=>YE,custom:()=>Hx,date:()=>Ax,decode:()=>Eg,decodeAsync:()=>Ag,describe:()=>qx,discriminatedUnion:()=>Px,e164:()=>sx,email:()=>LE,emoji:()=>HE,encode:()=>_g,encodeAsync:()=>xg,endsWith:()=>Kn,enum:()=>Hc,exactOptional:()=>eh,file:()=>jx,flattenError:()=>go,float32:()=>px,float64:()=>fx,formatError:()=>ho,fromJSONSchema:()=>tA,function:()=>Zx,getErrorMap:()=>JD,globalRegistry:()=>Ae,gt:()=>kt,gte:()=>je,guid:()=>UE,hash:()=>mx,hex:()=>dx,hostname:()=>lx,httpUrl:()=>WE,includes:()=>Hn,instanceof:()=>Yx,int:()=>Ic,int32:()=>gx,int64:()=>bx,intersection:()=>Gg,invertCodec:()=>Bx,ipv4:()=>ex,ipv6:()=>rx,iso:()=>ii,json:()=>Jx,jwt:()=>cx,keyof:()=>Ix,ksuid:()=>QE,lazy:()=>hh,length:()=>nn,literal:()=>Mx,locales:()=>Ao,looseObject:()=>Cx,looseRecord:()=>wx,lowercase:()=>Zn,lt:()=>wt,lte:()=>tt,mac:()=>tx,map:()=>kx,maxLength:()=>rn,maxSize:()=>Cr,meta:()=>Kx,mime:()=>Yn,minLength:()=>tr,minSize:()=>Ot,multipleOf:()=>Tr,nan:()=>Ux,nanoid:()=>qE,nativeEnum:()=>Dx,negative:()=>dc,never:()=>Zc,nonnegative:()=>pc,nonoptional:()=>ah,nonpositive:()=>mc,normalize:()=>Xn,null:()=>Dg,nullable:()=>No,nullish:()=>zx,number:()=>Pg,object:()=>$x,optional:()=>Po,overwrite:()=>xt,parse:()=>vg,parseAsync:()=>bg,partialRecord:()=>Nx,pipe:()=>$c,positive:()=>lc,prefault:()=>oh,preprocess:()=>Qx,prettifyError:()=>Od,promise:()=>Gx,property:()=>fc,readonly:()=>ph,record:()=>Hg,refine:()=>yh,regex:()=>Gn,regexes:()=>et,registry:()=>Vs,safeDecode:()=>$g,safeDecodeAsync:()=>Cg,safeEncode:()=>Ig,safeEncodeAsync:()=>Tg,safeParse:()=>yg,safeParseAsync:()=>Sg,set:()=>Ox,setErrorMap:()=>XD,size:()=>tn,slugify:()=>ti,startsWith:()=>qn,strictObject:()=>Tx,string:()=>Co,stringFormat:()=>ux,stringbool:()=>Xx,success:()=>Lx,superRefine:()=>Sh,symbol:()=>Sx,templateLiteral:()=>Vx,toJSONSchema:()=>bc,toLowerCase:()=>Qn,toUpperCase:()=>ei,transform:()=>qc,treeifyError:()=>kd,trim:()=>Jn,tuple:()=>Wg,uint32:()=>hx,uint64:()=>yx,ulid:()=>XE,undefined:()=>_x,union:()=>Wc,unknown:()=>on,uppercase:()=>Wn,url:()=>ZE,util:()=>_,uuid:()=>FE,uuidv4:()=>BE,uuidv6:()=>VE,uuidv7:()=>GE,void:()=>xx,xid:()=>JE,xor:()=>Rx});var rr={};Pt(rr,{$ZodAny:()=>up,$ZodArray:()=>fp,$ZodAsyncError:()=>Et,$ZodBase64:()=>Qm,$ZodBase64URL:()=>ep,$ZodBigInt:()=>Ds,$ZodBigIntFormat:()=>op,$ZodBoolean:()=>So,$ZodCIDRv4:()=>Ym,$ZodCIDRv6:()=>Xm,$ZodCUID:()=>zm,$ZodCUID2:()=>Lm,$ZodCatch:()=>wp,$ZodCheck:()=>J,$ZodCheckBigIntFormat:()=>fm,$ZodCheckEndsWith:()=>$m,$ZodCheckGreaterThan:()=>Rs,$ZodCheckIncludes:()=>Am,$ZodCheckLengthEquals:()=>Sm,$ZodCheckLessThan:()=>Cs,$ZodCheckLowerCase:()=>Em,$ZodCheckMaxLength:()=>bm,$ZodCheckMaxSize:()=>gm,$ZodCheckMimeType:()=>Cm,$ZodCheckMinLength:()=>ym,$ZodCheckMinSize:()=>hm,$ZodCheckMultipleOf:()=>mm,$ZodCheckNumberFormat:()=>pm,$ZodCheckOverwrite:()=>Rm,$ZodCheckProperty:()=>Tm,$ZodCheckRegex:()=>_m,$ZodCheckSizeEquals:()=>vm,$ZodCheckStartsWith:()=>Im,$ZodCheckStringFormat:()=>Bn,$ZodCheckUpperCase:()=>xm,$ZodCodec:()=>Eo,$ZodCustom:()=>Up,$ZodCustomStringFormat:()=>np,$ZodDate:()=>pp,$ZodDefault:()=>Cp,$ZodDiscriminatedUnion:()=>vp,$ZodE164:()=>tp,$ZodEmail:()=>Om,$ZodEmoji:()=>Mm,$ZodEncodeError:()=>Er,$ZodEnum:()=>Ep,$ZodError:()=>fo,$ZodExactOptional:()=>$p,$ZodFile:()=>Ap,$ZodFunction:()=>jp,$ZodGUID:()=>wm,$ZodIPv4:()=>Hm,$ZodIPv6:()=>qm,$ZodISODate:()=>Gm,$ZodISODateTime:()=>Vm,$ZodISODuration:()=>Wm,$ZodISOTime:()=>Zm,$ZodIntersection:()=>bp,$ZodJWT:()=>rp,$ZodKSUID:()=>Bm,$ZodLazy:()=>Lp,$ZodLiteral:()=>xp,$ZodMAC:()=>Km,$ZodMap:()=>Sp,$ZodNaN:()=>kp,$ZodNanoID:()=>jm,$ZodNever:()=>dp,$ZodNonOptional:()=>Pp,$ZodNull:()=>cp,$ZodNullable:()=>Tp,$ZodNumber:()=>Os,$ZodNumberFormat:()=>ip,$ZodObject:()=>O_,$ZodObjectJIT:()=>gp,$ZodOptional:()=>js,$ZodPipe:()=>zs,$ZodPrefault:()=>Rp,$ZodPreprocess:()=>Op,$ZodPromise:()=>zp,$ZodReadonly:()=>Dp,$ZodRealError:()=>Ze,$ZodRecord:()=>yp,$ZodRegistry:()=>Bs,$ZodSet:()=>_p,$ZodString:()=>en,$ZodStringFormat:()=>K,$ZodSuccess:()=>Np,$ZodSymbol:()=>ap,$ZodTemplateLiteral:()=>Mp,$ZodTransform:()=>Ip,$ZodTuple:()=>Ms,$ZodType:()=>w,$ZodULID:()=>Um,$ZodURL:()=>Dm,$ZodUUID:()=>km,$ZodUndefined:()=>sp,$ZodUnion:()=>_o,$ZodUnknown:()=>lp,$ZodVoid:()=>mp,$ZodXID:()=>Fm,$ZodXor:()=>hp,$brand:()=>_d,$constructor:()=>f,$input:()=>Bp,$output:()=>Fp,Doc:()=>yo,JSONSchema:()=>ME,JSONSchemaGenerator:()=>yc,NEVER:()=>Sd,TimePrecision:()=>Wp,_any:()=>ff,_array:()=>_f,_base64:()=>ac,_base64url:()=>sc,_bigint:()=>sf,_boolean:()=>of,_catch:()=>UD,_check:()=>DE,_cidrv4:()=>ic,_cidrv6:()=>oc,_coercedBigint:()=>cf,_coercedBoolean:()=>af,_coercedDate:()=>yf,_coercedNumber:()=>Jp,_coercedString:()=>Gp,_cuid:()=>Xs,_cuid2:()=>Js,_custom:()=>xf,_date:()=>bf,_decode:()=>ys,_decodeAsync:()=>_s,_default:()=>jD,_discriminatedUnion:()=>ID,_e164:()=>cc,_email:()=>Gs,_emoji:()=>Ks,_encode:()=>bs,_encodeAsync:()=>Ss,_endsWith:()=>Kn,_enum:()=>ND,_file:()=>Ef,_float32:()=>ef,_float64:()=>tf,_gt:()=>kt,_gte:()=>je,_guid:()=>Io,_includes:()=>Hn,_int:()=>Qp,_int32:()=>rf,_int64:()=>uf,_intersection:()=>$D,_ipv4:()=>rc,_ipv6:()=>nc,_isoDate:()=>qp,_isoDateTime:()=>Hp,_isoDuration:()=>Yp,_isoTime:()=>Kp,_jwt:()=>uc,_ksuid:()=>tc,_lazy:()=>GD,_length:()=>nn,_literal:()=>kD,_lowercase:()=>Zn,_lt:()=>wt,_lte:()=>tt,_mac:()=>Zp,_map:()=>RD,_max:()=>tt,_maxLength:()=>rn,_maxSize:()=>Cr,_mime:()=>Yn,_min:()=>je,_minLength:()=>tr,_minSize:()=>Ot,_multipleOf:()=>Tr,_nan:()=>Sf,_nanoid:()=>Ys,_nativeEnum:()=>wD,_negative:()=>dc,_never:()=>hf,_nonnegative:()=>pc,_nonoptional:()=>zD,_nonpositive:()=>mc,_normalize:()=>Xn,_null:()=>pf,_nullable:()=>MD,_number:()=>Xp,_optional:()=>DD,_overwrite:()=>xt,_parse:()=>zn,_parseAsync:()=>Ln,_pipe:()=>FD,_positive:()=>lc,_promise:()=>ZD,_property:()=>fc,_readonly:()=>BD,_record:()=>CD,_refine:()=>Af,_regex:()=>Gn,_safeDecode:()=>xs,_safeDecodeAsync:()=>Is,_safeEncode:()=>Es,_safeEncodeAsync:()=>As,_safeParse:()=>Un,_safeParseAsync:()=>Fn,_set:()=>PD,_size:()=>tn,_slugify:()=>ti,_startsWith:()=>qn,_string:()=>Vp,_stringFormat:()=>ri,_stringbool:()=>Cf,_success:()=>LD,_superRefine:()=>If,_symbol:()=>df,_templateLiteral:()=>VD,_toLowerCase:()=>Qn,_toUpperCase:()=>ei,_transform:()=>OD,_trim:()=>Jn,_tuple:()=>TD,_uint32:()=>nf,_uint64:()=>lf,_ulid:()=>Qs,_undefined:()=>mf,_union:()=>xD,_unknown:()=>gf,_uppercase:()=>Wn,_url:()=>$o,_uuid:()=>Zs,_uuidv4:()=>Ws,_uuidv6:()=>Hs,_uuidv7:()=>qs,_void:()=>vf,_xid:()=>ec,_xor:()=>AD,clone:()=>De,config:()=>ue,createStandardJSONSchemaMethod:()=>ni,createToJSONSchemaMethod:()=>Rf,decode:()=>ZO,decodeAsync:()=>HO,describe:()=>$f,encode:()=>GO,encodeAsync:()=>WO,extractDefs:()=>Pr,finalize:()=>Nr,flattenError:()=>go,formatError:()=>ho,globalConfig:()=>Xr,globalRegistry:()=>Ae,initializeContext:()=>Rr,isValidBase64:()=>Jm,isValidBase64URL:()=>P_,isValidJWT:()=>N_,locales:()=>Ao,meta:()=>Tf,parse:()=>hs,parseAsync:()=>vs,prettifyError:()=>Od,process:()=>G,regexes:()=>et,registry:()=>Vs,safeDecode:()=>KO,safeDecodeAsync:()=>XO,safeEncode:()=>qO,safeEncodeAsync:()=>YO,safeParse:()=>Dd,safeParseAsync:()=>Md,toDotPath:()=>u_,toJSONSchema:()=>bc,treeifyError:()=>kd,util:()=>_,version:()=>Pm});var i_,Sd=Object.freeze({status:"aborted"});function f(e,t,n){function i(c,u){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:u,constr:a,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,u);let l=a.prototype,m=Object.keys(l);for(let p=0;p<m.length;p++){let g=m[p];g in c||(c[g]=l[g].bind(c))}}let r=n?.Parent??Object;class o extends r{}Object.defineProperty(o,"name",{value:e});function a(c){var u;let l=n?.Parent?new o:this;i(l,c),(u=l._zod).deferred??(u.deferred=[]);for(let m of l._zod.deferred)m();return l}return Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:c=>n?.Parent&&c instanceof n.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var _d=Symbol("zod_brand"),Et=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Er=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(i_=globalThis).__zod_globalConfig??(i_.__zod_globalConfig={});var Xr=globalThis.__zod_globalConfig;function ue(e){return e&&Object.assign(Xr,e),Xr}var _={};Pt(_,{BIGINT_FORMAT_RANGES:()=>Nd,Class:()=>xd,NUMBER_FORMAT_RANGES:()=>Pd,aborted:()=>$r,allowsEval:()=>$d,assert:()=>EO,assertEqual:()=>bO,assertIs:()=>SO,assertNever:()=>_O,assertNotEqual:()=>yO,assignProp:()=>Ar,base64ToUint8Array:()=>a_,base64urlToUint8Array:()=>LO,cached:()=>Mn,captureStackTrace:()=>gs,cleanEnum:()=>zO,cleanRegex:()=>uo,clone:()=>De,cloneDef:()=>AO,createTransparentProxy:()=>PO,defineLazy:()=>M,esc:()=>fs,escapeRegex:()=>st,explicitlyAborted:()=>wd,extend:()=>kO,finalizeIssue:()=>Me,floatSafeRemainder:()=>Ad,getElementAtPath:()=>IO,getEnumValues:()=>co,getLengthableOrigin:()=>po,getParsedType:()=>RO,getSizableOrigin:()=>mo,hexToUint8Array:()=>FO,isObject:()=>Jr,isPlainObject:()=>Ir,issue:()=>jn,joinValues:()=>h,jsonStringifyReplacer:()=>Dn,merge:()=>DO,mergeDefs:()=>er,normalizeParams:()=>E,nullish:()=>xr,numKeys:()=>CO,objectClone:()=>xO,omit:()=>wO,optionalKeys:()=>Rd,parsedType:()=>S,partial:()=>MO,pick:()=>NO,prefixIssues:()=>Ge,primitiveTypes:()=>Cd,promiseAllObject:()=>$O,propertyKeyTypes:()=>lo,randomString:()=>TO,required:()=>jO,safeExtend:()=>OO,shallowClone:()=>Td,slugify:()=>Id,stringifyPrimitive:()=>y,uint8ArrayToBase64:()=>s_,uint8ArrayToBase64url:()=>UO,uint8ArrayToHex:()=>BO,unwrapMessage:()=>so});function bO(e){return e}function yO(e){return e}function SO(e){}function _O(e){throw new Error("Unexpected value in exhaustive check")}function EO(e){}function co(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,r])=>t.indexOf(+i)===-1).map(([i,r])=>r)}function h(e,t="|"){return e.map(n=>y(n)).join(t)}function Dn(e,t){return typeof t=="bigint"?t.toString():t}function Mn(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function xr(e){return e==null}function uo(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Ad(e,t){let n=e/t,i=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-i)<r?0:n-i}var o_=Symbol("evaluating");function M(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==o_)return i===void 0&&(i=o_,i=n()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function xO(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Ar(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function er(...e){let t={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function AO(e){return er(e._zod.def)}function IO(e,t){return t?t.reduce((n,i)=>n?.[i],e):e}function $O(e){let t=Object.keys(e),n=t.map(i=>e[i]);return Promise.all(n).then(i=>{let r={};for(let o=0;o<t.length;o++)r[t[o]]=i[o];return r})}function TO(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=t[Math.floor(Math.random()*t.length)];return n}function fs(e){return JSON.stringify(e)}function Id(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var gs="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Jr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var $d=Mn(()=>{if(Xr.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Ir(e){if(Jr(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(Jr(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Td(e){return Ir(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function CO(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var RO=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}`)}},lo=new Set(["string","number","symbol"]),Cd=new Set(["string","number","bigint","boolean","symbol","undefined"]);function st(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function De(e,t,n){let i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function E(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 PO(e){let t;return new Proxy({},{get(n,i,r){return t??(t=e()),Reflect.get(t,i,r)},set(n,i,r,o){return t??(t=e()),Reflect.set(t,i,r,o)},has(n,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(n,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(n,i,r){return t??(t=e()),Reflect.defineProperty(t,i,r)}})}function y(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Rd(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var Pd={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]},Nd={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function NO(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=er(e._zod.def,{get shape(){let a={};for(let c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(a[c]=n.shape[c])}return Ar(this,"shape",a),a},checks:[]});return De(e,o)}function wO(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=er(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete a[c]}return Ar(this,"shape",a),a},checks:[]});return De(e,o)}function kO(e,t){if(!Ir(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let o=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=er(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Ar(this,"shape",o),o}});return De(e,r)}function OO(e,t){if(!Ir(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=er(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Ar(this,"shape",i),i}});return De(e,n)}function DO(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=er(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return Ar(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return De(e,n)}function MO(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=er(t._zod.def,{get shape(){let c=t._zod.def.shape,u={...c};if(n)for(let l in n){if(!(l in c))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(u[l]=e?new e({type:"optional",innerType:c[l]}):c[l])}else for(let l in c)u[l]=e?new e({type:"optional",innerType:c[l]}):c[l];return Ar(this,"shape",u),u},checks:[]});return De(t,a)}function jO(e,t,n){let i=er(t._zod.def,{get shape(){let r=t._zod.def.shape,o={...r};if(n)for(let a in n){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(o[a]=new e({type:"nonoptional",innerType:r[a]}))}else for(let a in r)o[a]=new e({type:"nonoptional",innerType:r[a]});return Ar(this,"shape",o),o}});return De(t,i)}function $r(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function wd(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Ge(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function so(e){return typeof e=="string"?e:e?.message}function Me(e,t,n){let i=e.message?e.message:so(e.inst?._zod.def?.error?.(e))??so(t?.error?.(e))??so(n.customError?.(e))??so(n.localeError?.(e))??"Invalid input",{inst:r,continue:o,input:a,...c}=e;return c.path??(c.path=[]),c.message=i,t?.reportInput&&(c.input=a),c}function mo(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function po(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function S(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function jn(...e){let[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}function zO(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function a_(e){let t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}function s_(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function LO(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return a_(t+n)}function UO(e){return s_(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function FO(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)n[i/2]=Number.parseInt(t.slice(i,i+2),16);return n}function BO(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var xd=class{constructor(...t){}};var c_=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Dn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},fo=f("$ZodError",c_),Ze=f("$ZodError",c_,{Parent:Error});function go(e,t=n=>n.message){let n={},i=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):i.push(t(r));return{formErrors:i,fieldErrors:n}}function ho(e,t=n=>n.message){let n={_errors:[]},i=(r,o=[])=>{for(let a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(c=>i({issues:c},[...o,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...o,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...o,...a.path]);else{let c=[...o,...a.path];if(c.length===0)n._errors.push(t(a));else{let u=n,l=0;for(;l<c.length;){let m=c[l];l===c.length-1?(u[m]=u[m]||{_errors:[]},u[m]._errors.push(t(a))):u[m]=u[m]||{_errors:[]},u=u[m],l++}}}};return i(e),n}function kd(e,t=n=>n.message){let n={errors:[]},i=(r,o=[])=>{var a,c;for(let u of r.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>i({issues:l},[...o,...u.path]));else if(u.code==="invalid_key")i({issues:u.issues},[...o,...u.path]);else if(u.code==="invalid_element")i({issues:u.issues},[...o,...u.path]);else{let l=[...o,...u.path];if(l.length===0){n.errors.push(t(u));continue}let m=n,p=0;for(;p<l.length;){let g=l[p],v=p===l.length-1;typeof g=="string"?(m.properties??(m.properties={}),(a=m.properties)[g]??(a[g]={errors:[]}),m=m.properties[g]):(m.items??(m.items=[]),(c=m.items)[g]??(c[g]={errors:[]}),m=m.items[g]),v&&m.errors.push(t(u)),p++}}};return i(e),n}function u_(e){let t=[],n=e.map(i=>typeof i=="object"?i.key:i);for(let i of n)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function Od(e){let t=[],n=[...e.issues].sort((i,r)=>(i.path??[]).length-(r.path??[]).length);for(let i of n)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${u_(i.path)}`);return t.join(`
101
- `)}var zn=e=>(t,n,i,r)=>{let o=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise)throw new Et;if(a.issues.length){let c=new(r?.Err??e)(a.issues.map(u=>Me(u,o,ue())));throw gs(c,r?.callee),c}return a.value},hs=zn(Ze),Ln=e=>async(t,n,i,r)=>{let o=i?{...i,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let c=new(r?.Err??e)(a.issues.map(u=>Me(u,o,ue())));throw gs(c,r?.callee),c}return a.value},vs=Ln(Ze),Un=e=>(t,n,i)=>{let r=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new Et;return o.issues.length?{success:!1,error:new(e??fo)(o.issues.map(a=>Me(a,r,ue())))}:{success:!0,data:o.value}},Dd=Un(Ze),Fn=e=>async(t,n,i)=>{let r=i?{...i,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(a=>Me(a,r,ue())))}:{success:!0,data:o.value}},Md=Fn(Ze),bs=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return zn(e)(t,n,r)},GO=bs(Ze),ys=e=>(t,n,i)=>zn(e)(t,n,i),ZO=ys(Ze),Ss=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Ln(e)(t,n,r)},WO=Ss(Ze),_s=e=>async(t,n,i)=>Ln(e)(t,n,i),HO=_s(Ze),Es=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Un(e)(t,n,r)},qO=Es(Ze),xs=e=>(t,n,i)=>Un(e)(t,n,i),KO=xs(Ze),As=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Fn(e)(t,n,r)},YO=As(Ze),Is=e=>async(t,n,i)=>Fn(e)(t,n,i),XO=Is(Ze);var et={};Pt(et,{base64:()=>Jd,base64url:()=>$s,bigint:()=>om,boolean:()=>sm,browserEmail:()=>o1,cidrv4:()=>Yd,cidrv6:()=>Xd,cuid:()=>jd,cuid2:()=>zd,date:()=>tm,datetime:()=>nm,domain:()=>c1,duration:()=>Vd,e164:()=>em,email:()=>Zd,emoji:()=>Wd,extendedDuration:()=>JO,guid:()=>Gd,hex:()=>u1,hostname:()=>s1,html5Email:()=>r1,httpProtocol:()=>Qd,idnEmail:()=>i1,integer:()=>am,ipv4:()=>Hd,ipv6:()=>qd,ksuid:()=>Fd,lowercase:()=>lm,mac:()=>Kd,md5_base64:()=>d1,md5_base64url:()=>m1,md5_hex:()=>l1,nanoid:()=>Bd,null:()=>cm,number:()=>Ts,rfc5322Email:()=>n1,sha1_base64:()=>f1,sha1_base64url:()=>g1,sha1_hex:()=>p1,sha256_base64:()=>v1,sha256_base64url:()=>b1,sha256_hex:()=>h1,sha384_base64:()=>S1,sha384_base64url:()=>_1,sha384_hex:()=>y1,sha512_base64:()=>x1,sha512_base64url:()=>A1,sha512_hex:()=>E1,string:()=>im,time:()=>rm,ulid:()=>Ld,undefined:()=>um,unicodeEmail:()=>l_,uppercase:()=>dm,uuid:()=>Qr,uuid4:()=>QO,uuid6:()=>e1,uuid7:()=>t1,xid:()=>Ud});var jd=/^[cC][0-9a-z]{6,}$/,zd=/^[0-9a-z]+$/,Ld=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ud=/^[0-9a-vA-V]{20}$/,Fd=/^[A-Za-z0-9]{27}$/,Bd=/^[a-zA-Z0-9_-]{21}$/,Vd=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,JO=/^[-+]?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)?)??$/,Gd=/^([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})$/,Qr=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)$/,QO=Qr(4),e1=Qr(6),t1=Qr(7),Zd=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,r1=/^[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])?)*$/,n1=/^(([^<>()\[\]\\.,;:\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,}))$/,l_=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,i1=l_,o1=/^[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])?)*$/,a1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Wd(){return new RegExp(a1,"u")}var Hd=/^(?:(?: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])$/,qd=/^(([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}|:))$/,Kd=e=>{let t=st(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Yd=/^((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])$/,Xd=/^(([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])$/,Jd=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,$s=/^[A-Za-z0-9_-]*$/,s1=/^(?=.{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])?)*\.?$/,c1=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Qd=/^https?$/,em=/^\+[1-9]\d{6,14}$/,d_="(?:(?:\\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])))",tm=new RegExp(`^${d_}$`);function m_(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 rm(e){return new RegExp(`^${m_(e)}$`)}function nm(e){let t=m_({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${n.join("|")})`;return new RegExp(`^${d_}T(?:${i})$`)}var im=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},om=/^-?\d+n?$/,am=/^-?\d+$/,Ts=/^-?\d+(?:\.\d+)?$/,sm=/^(?:true|false)$/i,cm=/^null$/i;var um=/^undefined$/i;var lm=/^[^A-Z]*$/,dm=/^[^a-z]*$/,u1=/^[0-9a-fA-F]*$/;function vo(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function bo(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var l1=/^[0-9a-fA-F]{32}$/,d1=vo(22,"=="),m1=bo(22),p1=/^[0-9a-fA-F]{40}$/,f1=vo(27,"="),g1=bo(27),h1=/^[0-9a-fA-F]{64}$/,v1=vo(43,"="),b1=bo(43),y1=/^[0-9a-fA-F]{96}$/,S1=vo(64,""),_1=bo(64),E1=/^[0-9a-fA-F]{128}$/,x1=vo(86,"=="),A1=bo(86);var J=f("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),f_={number:"number",bigint:"bigint",object:"date"},Cs=f("$ZodCheckLessThan",(e,t)=>{J.init(e,t);let n=f_[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Rs=f("$ZodCheckGreaterThan",(e,t)=>{J.init(e,t);let n=f_[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),mm=f("$ZodCheckMultipleOf",(e,t)=>{J.init(e,t),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Ad(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),pm=f("$ZodCheckNumberFormat",(e,t)=>{J.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),i=n?"int":"number",[r,o]=Pd[t.format];e._zod.onattach.push(a=>{let c=a._zod.bag;c.format=t.format,c.minimum=r,c.maximum=o,n&&(c.pattern=am)}),e._zod.check=a=>{let c=a.value;if(n){if(!Number.isInteger(c)){a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}c<r&&a.issues.push({origin:"number",input:c,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),c>o&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),fm=f("$ZodCheckBigIntFormat",(e,t)=>{J.init(e,t);let[n,i]=Nd[t.format];e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,o.minimum=n,o.maximum=i}),e._zod.check=r=>{let o=r.value;o<n&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>i&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),gm=f("$ZodCheckMaxSize",(e,t)=>{var n;J.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!xr(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;r.size<=t.maximum||i.issues.push({origin:mo(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),hm=f("$ZodCheckMinSize",(e,t)=>{var n;J.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!xr(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;r.size>=t.minimum||i.issues.push({origin:mo(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),vm=f("$ZodCheckSizeEquals",(e,t)=>{var n;J.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!xr(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=i=>{let r=i.value,o=r.size;if(o===t.size)return;let a=o>t.size;i.issues.push({origin:mo(r),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),bm=f("$ZodCheckMaxLength",(e,t)=>{var n;J.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!xr(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;if(r.length<=t.maximum)return;let a=po(r);i.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ym=f("$ZodCheckMinLength",(e,t)=>{var n;J.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!xr(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;if(r.length>=t.minimum)return;let a=po(r);i.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Sm=f("$ZodCheckLengthEquals",(e,t)=>{var n;J.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!xr(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=i=>{let r=i.value,o=r.length;if(o===t.length)return;let a=po(r),c=o>t.length;i.issues.push({origin:a,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Bn=f("$ZodCheckStringFormat",(e,t)=>{var n,i;J.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),_m=f("$ZodCheckRegex",(e,t)=>{Bn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Em=f("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=lm),Bn.init(e,t)}),xm=f("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=dm),Bn.init(e,t)}),Am=f("$ZodCheckIncludes",(e,t)=>{J.init(e,t);let n=st(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),Im=f("$ZodCheckStartsWith",(e,t)=>{J.init(e,t);let n=new RegExp(`^${st(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),$m=f("$ZodCheckEndsWith",(e,t)=>{J.init(e,t);let n=new RegExp(`.*${st(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function p_(e,t,n){e.issues.length&&t.issues.push(...Ge(n,e.issues))}var Tm=f("$ZodCheckProperty",(e,t)=>{J.init(e,t),e._zod.check=n=>{let i=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(r=>p_(r,n,t.property));p_(i,n,t.property)}}),Cm=f("$ZodCheckMimeType",(e,t)=>{J.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),Rm=f("$ZodCheckOverwrite",(e,t)=>{J.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var yo=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(`
100
+ `),this.close()}_(t,n){return t.toLowerCase()==="y"?(this.value=!0,this.submit()):t.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(qk.hide):this.out.write(zV(this.outputText,this.out.columns)),super.render(),this.outputText=[Hk.symbol(this.done,this.aborted),Wk.bold(this.msg),Hk.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:Wk.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(LV.line+qk.to(0)+this.outputText))}};Kk.exports=XS});var Jk=I((qte,Xk)=>{"use strict";Xk.exports={TextPrompt:Kw(),SelectPrompt:Qw(),TogglePrompt:nk(),DatePrompt:Ck(),NumberPrompt:kk(),MultiselectPrompt:WS(),AutocompletePrompt:Fk(),AutocompleteMultiselectPrompt:Zk(),ConfirmPrompt:Yk()}});var eO=I(Qk=>{"use strict";var et=Qk,UV=Jk(),Sd=e=>e;function Qt(e,t,n={}){return new Promise((i,r)=>{let o=new UV[e](t),a=n.onAbort||Sd,c=n.onSubmit||Sd,u=n.onExit||Sd;o.on("state",t.onState||Sd),o.on("submit",l=>i(c(l))),o.on("exit",l=>i(u(l))),o.on("abort",l=>r(a(l)))})}et.text=e=>Qt("TextPrompt",e);et.password=e=>(e.style="password",et.text(e));et.invisible=e=>(e.style="invisible",et.text(e));et.number=e=>Qt("NumberPrompt",e);et.date=e=>Qt("DatePrompt",e);et.confirm=e=>Qt("ConfirmPrompt",e);et.list=e=>{let t=e.separator||",";return Qt("TextPrompt",e,{onSubmit:n=>n.split(t).map(i=>i.trim())})};et.toggle=e=>Qt("TogglePrompt",e);et.select=e=>Qt("SelectPrompt",e);et.multiselect=e=>{e.choices=[].concat(e.choices||[]);let t=n=>n.filter(i=>i.selected).map(i=>i.value);return Qt("MultiselectPrompt",e,{onAbort:t,onSubmit:t})};et.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);let t=n=>n.filter(i=>i.selected).map(i=>i.value);return Qt("AutocompleteMultiselectPrompt",e,{onAbort:t,onSubmit:t})};var FV=(e,t)=>Promise.resolve(t.filter(n=>n.title.slice(0,e.length).toLowerCase()===e.toLowerCase()));et.autocomplete=e=>(e.suggest=e.suggest||FV,e.choices=[].concat(e.choices||[]),Qt("AutocompletePrompt",e))});var nO=I((Yte,rO)=>{"use strict";var JS=eO(),BV=["suggest","format","onState","validate","onRender","type"],tO=()=>{};async function Kr(e=[],{onSubmit:t=tO,onCancel:n=tO}={}){let i={},r=Kr._override||{};e=[].concat(e);let o,a,c,u,l,m,p=async(g,v,A=!1)=>{if(!(!A&&g.validate&&g.validate(v)!==!0))return g.format?await g.format(v,i):v};for(a of e)if({name:u,type:l}=a,typeof l=="function"&&(l=await l(o,{...i},a),a.type=l),!!l){for(let g in a){if(BV.includes(g))continue;let v=a[g];a[g]=typeof v=="function"?await v(o,{...i},m):v}if(m=a,typeof a.message!="string")throw new Error("prompt message is required");if({name:u,type:l}=a,JS[l]===void 0)throw new Error(`prompt type (${l}) is not defined`);if(r[a.name]!==void 0&&(o=await p(a,r[a.name]),o!==void 0)){i[u]=o;continue}try{o=Kr._injected?VV(Kr._injected,a.initial):await JS[l](a),i[u]=o=await p(a,o,!0),c=await t(a,o,i)}catch{c=!await n(a,i)}if(c)return i}return i}function VV(e,t){let n=e.shift();if(n instanceof Error)throw n;return n===void 0?t:n}function GV(e){Kr._injected=(Kr._injected||[]).concat(e)}function ZV(e){Kr._override=Object.assign({},e)}rO.exports=Object.assign(Kr,{prompt:Kr,prompts:JS,inject:GV,override:ZV})});var oO=I((Xte,iO)=>{function WV(e){e=(Array.isArray(e)?e:e.split(".")).map(Number);let t=0,n=process.versions.node.split(".").map(Number);for(;t<e.length;t++){if(n[t]>e[t])return!1;if(e[t]>n[t])return!0}return!1}iO.exports=WV("8.6.0")?Cw():nO()});import{join as ct,dirname as i_,normalize as yO}from"node:path";import{readFileSync as SO,existsSync as _O}from"node:fs";var bO=Object.defineProperty,Re=(e,t)=>bO(e,"name",{value:t,configurable:!0}),Yr="fjall";function Xr(e,t){let n=yO(e);if(n.includes("..")||n.startsWith("/"))throw new Error(`Invalid ${t}: path traversal is not allowed`)}Re(Xr,"assertNoTraversal");function EO(){return Yr}Re(EO,"getFjallPath");function xO(e){let t=i_(e);return i_(t)||"."}Re(xO,"getProjectRoot");function o_(e){if(!_O(e))throw new Error(`Infrastructure file not found: ${e}`);let t=SO(e,"utf-8").match(/const\s+appName\s*=\s*["']([^"']+)["']/);if(!t||!t[1])throw new Error(`Could not find appName in infrastructure file: ${e}. Expected format: const appName = "yourAppName";`);return t[1]}Re(o_,"getAppNameFromInfrastructure");function AO(e){let t=ct(e,xd);return o_(t)}Re(AO,"getAppName");function er(e){return Xr(e,"app name"),ct(Yr,e,xd)}Re(er,"getInfrastructurePath");function a_(e){return Xr(e,"app name"),ct(Yr,e)}Re(a_,"getAppPath");function IO(e,t){return ct(t??process.cwd(),a_(e))}Re(IO,"resolveAppScaffoldPath");function $O(e){return Xr(e,"component name"),ct(Yr,e)}Re($O,"getOrganisationComponentPath");function TO(e){return Xr(e,"deployment type"),ct(Yr,e,"logs")}Re(TO,"getDeploymentLogsPath");function RO(e){return Xr(e,"deployment type"),ct(Yr,e,"logs","cloudformation")}Re(RO,"getCloudFormationLogsPath");function s_(){return ct(Yr,"domains")}Re(s_,"getDomainsDir");function Ed(e){return Xr(e,"domain name"),ct(s_(),e)}Re(Ed,"getDomainComponentPath");function CO(e){return ct(Ed(e),xd)}Re(CO,"getDomainInfrastructurePath");function NO(e){return ct(Ed(e),PO)}Re(NO,"getDomainZoneFilePath");var xd="infrastructure.ts",PO="zone.bind",wO="cdk.out";function kO(e){return ct(e,wO)}Re(kO,"getCdkOutPath");var OO=Object.defineProperty,zn=(e,t)=>OO(e,"name",{value:t,configurable:!0});function Ad(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}zn(Ad,"escapeRegExp");function Jr(e,t,n){let i=er(t),r=e.read(i)?.toString();return r?new RegExp(`["']${Ad(n)}["']`).test(r):!1}zn(Jr,"resourceExists");function go(e,t,n){let i=er(t);if(!e.read(i)?.toString())throw new Error(`Infrastructure file not found for ${t}`);if(Jr(e,t,n))throw new Error(`Resource name '${n}' already exists in ${t}. Please choose a different name or remove the existing resource first.`)}zn(go,"assertResourceNameUnique");function Id(e,t,n){let i=er(t),r=e.read(i)?.toString();if(!r)return 0;let o={database:/DatabaseFactory\.build\(/g,compute:/ComputeFactory\.build\(/g,lambda:/type:\s*["']lambda["']/g,ecs:/type:\s*["']ecs["']/g,ec2:/type:\s*["']ec2["']/g}[n];if(!o)return 0;let a=r.match(o);return a?a.length:0}zn(Id,"countResourcesOfType");function DO(e,t){let n=er(t),i=e.read(n)?.toString();if(!i)return[];let r=[],o=i.matchAll(/ComputeFactory\.build\(["']([^"']+)["'],\s*\{([^}]*?)\}/gs);for(let a of o){let c=a[1],u=a[2],l="ecs";u.includes('type: "lambda"')?l="lambda":u.includes('type: "ec2"')&&(l="ec2");let m=u.includes("connections:"),p=[];if(m){let g=u.match(/connections:\s*\[([^\]]+)\]/);if(g){let v=g[1].match(/\w+/g)??[];p.push(...v)}}r.push({name:c,type:l,hasConnections:m,connectedResources:p})}return r}zn(DO,"detectComputeResources");function MO(e,t,n){let i=er(t),r=e.read(i)?.toString();return r?new RegExp(`databaseName:\\s*["']${Ad(n)}["']`).test(r):!1}zn(MO,"databaseExists");import*as co from"fs";import*as EN from"path";var jO=Object.defineProperty,Er=(e,t)=>jO(e,"name",{value:t,configurable:!0});function Ce(e){return e.replace(/[-_](.)/g,(t,n)=>n.toUpperCase()).replace(/^./,t=>t.toUpperCase())}Er(Ce,"toPascalCase");function Pt(e){return e.replace(/([A-Z]+)([A-Z][a-z])/g,"$1-$2").replace(/([a-z\d])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}Er(Pt,"toKebab");function Ln(e){return Pt(e).replace(/-/g,"_")}Er(Ln,"toValidDatabaseName");function c_(e){return Pt(e).replace(/-/g,"_").toUpperCase()}Er(c_,"toScreamingSnake");function u_(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}Er(u_,"capitalise");function l_(e){return e.split(".").join("")}Er(l_,"getSafeZoneName");function Qr(e){return e.toLowerCase().replace(/[^a-z0-9]/g,"")}Er(Qr,"accountConstructKey");function d_(e){let t=e.replace(new RegExp("\\P{ASCII}","gu"),"");return Qr(t)===Qr(e)&&Qr(e)!==""}Er(d_,"hasAsciiStableConstructKey");var zO=Object.defineProperty,bs=(e,t)=>zO(e,"name",{value:t,configurable:!0});function ys(e){return`${Ce(e.split(".").join(""))}Domain`}bs(ys,"getDomainStackName");function m_(e){return`${e}UsEast1Certificates`}bs(m_,"getDomainUsEast1CertificatesStackName");function $d(e){let t=e.replace(/\./g,"-");return{hostedZoneId:`${t}-hosted-zone-id`,certificateArn:`${t}-certificate-arn`,usEast1CertificateArn:`${t}-us-east-1-certificate-arn`,delegationRoleArn:`${t}-delegation-role-arn`,nameservers:`${t}-nameservers`}}bs($d,"getDomainExportNames");function p_(e){return typeof e.hostedZoneId=="string"}bs(p_,"isManagedDomainBinding");var LO=Object.defineProperty,UO=(e,t)=>LO(e,"name",{value:t,configurable:!0});function f_(e){return`${Ce(e)}ImageTag`}UO(f_,"imageTagParameterName");var FO=Object.defineProperty,en=(e,t)=>FO(e,"name",{value:t,configurable:!0});function Un(e){return Ce(e.replace(/[^A-Za-z0-9-]/g,""))}en(Un,"safeExportToken");function Td(e,t){let n=Un(e);return t===void 0?n:`${n}-${Un(t)}-`}en(Td,"albExportScope");function g_(e,t){return`${Td(e,t)}AlbDnsName`}en(g_,"albDnsExportName");function h_(e,t){return`${Td(e,t)}AlbHostedZoneId`}en(h_,"albHostedZoneIdExportName");function v_(e){return`${Un(e)}CdnDistributionDomainName`}en(v_,"cdnDomainExportName");function b_(e){return`${Un(e)}WebsiteEndpoint`}en(b_,"bucketWebsiteEndpointExportName");function y_(e){return`${Un(e)}WebsiteHostedZoneId`}en(y_,"bucketWebsiteHostedZoneIdExportName");var s={};Nt(s,{$brand:()=>Cd,$input:()=>Yp,$output:()=>Kp,NEVER:()=>Rd,TimePrecision:()=>ef,ZodAny:()=>Gg,ZodArray:()=>qg,ZodBase64:()=>Wc,ZodBase64URL:()=>Hc,ZodBigInt:()=>vi,ZodBigIntFormat:()=>Yc,ZodBoolean:()=>hi,ZodCIDRv4:()=>Gc,ZodCIDRv6:()=>Zc,ZodCUID:()=>jc,ZodCUID2:()=>zc,ZodCatch:()=>hh,ZodCodec:()=>Ho,ZodCustom:()=>qo,ZodCustomStringFormat:()=>fi,ZodDate:()=>Bo,ZodDefault:()=>lh,ZodDiscriminatedUnion:()=>Yg,ZodE164:()=>qc,ZodEmail:()=>Oc,ZodEmoji:()=>Dc,ZodEnum:()=>mi,ZodError:()=>bM,ZodExactOptional:()=>sh,ZodFile:()=>oh,ZodFirstPartyTypeKind:()=>Ch,ZodFunction:()=>$h,ZodGUID:()=>jo,ZodIPv4:()=>Bc,ZodIPv6:()=>Vc,ZodISODate:()=>Rc,ZodISODateTime:()=>Tc,ZodISODuration:()=>Nc,ZodISOTime:()=>Cc,ZodIntersection:()=>Xg,ZodIssueCode:()=>SM,ZodJWT:()=>Kc,ZodKSUID:()=>Fc,ZodLazy:()=>xh,ZodLiteral:()=>ih,ZodMAC:()=>jg,ZodMap:()=>rh,ZodNaN:()=>bh,ZodNanoID:()=>Mc,ZodNever:()=>Wg,ZodNonOptional:()=>ru,ZodNull:()=>Bg,ZodNullable:()=>uh,ZodNumber:()=>gi,ZodNumberFormat:()=>ln,ZodObject:()=>Go,ZodOptional:()=>tu,ZodPipe:()=>Wo,ZodPrefault:()=>mh,ZodPreprocess:()=>yh,ZodPromise:()=>Ih,ZodReadonly:()=>Sh,ZodRealError:()=>We,ZodRecord:()=>di,ZodSet:()=>nh,ZodString:()=>pi,ZodStringFormat:()=>Y,ZodSuccess:()=>gh,ZodSymbol:()=>Ug,ZodTemplateLiteral:()=>Eh,ZodTransform:()=>ah,ZodTuple:()=>Qg,ZodType:()=>k,ZodULID:()=>Lc,ZodURL:()=>Fo,ZodUUID:()=>Dt,ZodUndefined:()=>Fg,ZodUnion:()=>Zo,ZodUnknown:()=>Zg,ZodVoid:()=>Hg,ZodXID:()=>Uc,ZodXor:()=>Kg,_ZodString:()=>kc,_default:()=>dh,_function:()=>sA,any:()=>zx,array:()=>Vo,base64:()=>_x,base64url:()=>Ex,bigint:()=>kx,boolean:()=>Lg,catch:()=>vh,check:()=>cA,cidrv4:()=>yx,cidrv6:()=>Sx,clone:()=>Me,codec:()=>nA,coerce:()=>Nh,config:()=>ue,core:()=>nr,cuid:()=>dx,cuid2:()=>mx,custom:()=>uA,date:()=>Ux,decode:()=>Ng,decodeAsync:()=>wg,describe:()=>lA,discriminatedUnion:()=>Wx,e164:()=>xx,email:()=>tx,emoji:()=>ux,encode:()=>Cg,encodeAsync:()=>Pg,endsWith:()=>ti,enum:()=>Qc,exactOptional:()=>ch,file:()=>Qx,flattenError:()=>xo,float32:()=>Cx,float64:()=>Nx,formatError:()=>Ao,fromJSONSchema:()=>vA,function:()=>sA,getErrorMap:()=>EM,globalRegistry:()=>Ae,gt:()=>kt,gte:()=>ze,guid:()=>rx,hash:()=>Rx,hex:()=>Tx,hostname:()=>$x,httpUrl:()=>cx,includes:()=>Qn,instanceof:()=>mA,int:()=>Pc,int32:()=>Px,int64:()=>Ox,intersection:()=>Jg,invertCodec:()=>iA,ipv4:()=>hx,ipv6:()=>bx,iso:()=>li,json:()=>fA,jwt:()=>Ax,keyof:()=>Fx,ksuid:()=>gx,lazy:()=>Ah,length:()=>cn,literal:()=>Jx,locales:()=>wo,looseObject:()=>Gx,looseRecord:()=>qx,lowercase:()=>Xn,lt:()=>wt,lte:()=>rt,mac:()=>vx,map:()=>Kx,maxLength:()=>sn,maxSize:()=>Cr,meta:()=>dA,mime:()=>ri,minLength:()=>rr,minSize:()=>Ot,multipleOf:()=>Rr,nan:()=>rA,nanoid:()=>lx,nativeEnum:()=>Xx,negative:()=>vc,never:()=>Xc,nonnegative:()=>yc,nonoptional:()=>fh,nonpositive:()=>bc,normalize:()=>ni,null:()=>Vg,nullable:()=>Lo,nullish:()=>eA,number:()=>zg,object:()=>Bx,optional:()=>zo,overwrite:()=>xt,parse:()=>Ig,parseAsync:()=>$g,partialRecord:()=>Hx,pipe:()=>wc,positive:()=>hc,prefault:()=>ph,preprocess:()=>gA,prettifyError:()=>Bd,promise:()=>aA,property:()=>Sc,readonly:()=>_h,record:()=>th,refine:()=>Th,regex:()=>Yn,regexes:()=>tt,registry:()=>Ks,safeDecode:()=>Og,safeDecodeAsync:()=>Mg,safeEncode:()=>kg,safeEncodeAsync:()=>Dg,safeParse:()=>Tg,safeParseAsync:()=>Rg,set:()=>Yx,setErrorMap:()=>_M,size:()=>an,slugify:()=>si,startsWith:()=>ei,strictObject:()=>Vx,string:()=>Mo,stringFormat:()=>Ix,stringbool:()=>pA,success:()=>tA,superRefine:()=>Rh,symbol:()=>Mx,templateLiteral:()=>oA,toJSONSchema:()=>Ac,toLowerCase:()=>oi,toUpperCase:()=>ai,transform:()=>eu,treeifyError:()=>Fd,trim:()=>ii,tuple:()=>eh,uint32:()=>wx,uint64:()=>Dx,ulid:()=>px,undefined:()=>jx,union:()=>Jc,unknown:()=>un,uppercase:()=>Jn,url:()=>sx,util:()=>_,uuid:()=>nx,uuidv4:()=>ix,uuidv6:()=>ox,uuidv7:()=>ax,void:()=>Lx,xid:()=>fx,xor:()=>Zx});var nr={};Nt(nr,{$ZodAny:()=>vp,$ZodArray:()=>Ep,$ZodAsyncError:()=>Et,$ZodBase64:()=>sp,$ZodBase64URL:()=>cp,$ZodBigInt:()=>Fs,$ZodBigIntFormat:()=>pp,$ZodBoolean:()=>Ro,$ZodCIDRv4:()=>ip,$ZodCIDRv6:()=>op,$ZodCUID:()=>Wm,$ZodCUID2:()=>Hm,$ZodCatch:()=>Up,$ZodCheck:()=>J,$ZodCheckBigIntFormat:()=>Em,$ZodCheckEndsWith:()=>Om,$ZodCheckGreaterThan:()=>Ds,$ZodCheckIncludes:()=>wm,$ZodCheckLengthEquals:()=>Rm,$ZodCheckLessThan:()=>Os,$ZodCheckLowerCase:()=>Nm,$ZodCheckMaxLength:()=>$m,$ZodCheckMaxSize:()=>xm,$ZodCheckMimeType:()=>Mm,$ZodCheckMinLength:()=>Tm,$ZodCheckMinSize:()=>Am,$ZodCheckMultipleOf:()=>Sm,$ZodCheckNumberFormat:()=>_m,$ZodCheckOverwrite:()=>jm,$ZodCheckProperty:()=>Dm,$ZodCheckRegex:()=>Cm,$ZodCheckSizeEquals:()=>Im,$ZodCheckStartsWith:()=>km,$ZodCheckStringFormat:()=>qn,$ZodCheckUpperCase:()=>Pm,$ZodCodec:()=>No,$ZodCustom:()=>qp,$ZodCustomStringFormat:()=>dp,$ZodDate:()=>_p,$ZodDefault:()=>Mp,$ZodDiscriminatedUnion:()=>Ip,$ZodE164:()=>up,$ZodEmail:()=>Bm,$ZodEmoji:()=>Gm,$ZodEncodeError:()=>xr,$ZodEnum:()=>Np,$ZodError:()=>Eo,$ZodExactOptional:()=>Op,$ZodFile:()=>wp,$ZodFunction:()=>Zp,$ZodGUID:()=>Um,$ZodIPv4:()=>tp,$ZodIPv6:()=>rp,$ZodISODate:()=>Jm,$ZodISODateTime:()=>Xm,$ZodISODuration:()=>ep,$ZodISOTime:()=>Qm,$ZodIntersection:()=>$p,$ZodJWT:()=>lp,$ZodKSUID:()=>Ym,$ZodLazy:()=>Hp,$ZodLiteral:()=>Pp,$ZodMAC:()=>np,$ZodMap:()=>Rp,$ZodNaN:()=>Fp,$ZodNanoID:()=>Zm,$ZodNever:()=>yp,$ZodNonOptional:()=>zp,$ZodNull:()=>hp,$ZodNullable:()=>Dp,$ZodNumber:()=>Us,$ZodNumberFormat:()=>mp,$ZodObject:()=>Y_,$ZodObjectJIT:()=>xp,$ZodOptional:()=>Vs,$ZodPipe:()=>Gs,$ZodPrefault:()=>jp,$ZodPreprocess:()=>Bp,$ZodPromise:()=>Wp,$ZodReadonly:()=>Vp,$ZodRealError:()=>Ze,$ZodRecord:()=>Tp,$ZodRegistry:()=>qs,$ZodSet:()=>Cp,$ZodString:()=>on,$ZodStringFormat:()=>K,$ZodSuccess:()=>Lp,$ZodSymbol:()=>fp,$ZodTemplateLiteral:()=>Gp,$ZodTransform:()=>kp,$ZodTuple:()=>Bs,$ZodType:()=>w,$ZodULID:()=>qm,$ZodURL:()=>Vm,$ZodUUID:()=>Fm,$ZodUndefined:()=>gp,$ZodUnion:()=>Co,$ZodUnknown:()=>bp,$ZodVoid:()=>Sp,$ZodXID:()=>Km,$ZodXor:()=>Ap,$brand:()=>Cd,$constructor:()=>f,$input:()=>Yp,$output:()=>Kp,Doc:()=>To,JSONSchema:()=>JE,JSONSchemaGenerator:()=>Ic,NEVER:()=>Rd,TimePrecision:()=>ef,_any:()=>Ef,_array:()=>Cf,_base64:()=>mc,_base64url:()=>pc,_bigint:()=>gf,_boolean:()=>pf,_catch:()=>lM,_check:()=>XE,_cidrv4:()=>lc,_cidrv6:()=>dc,_coercedBigint:()=>hf,_coercedBoolean:()=>ff,_coercedDate:()=>Tf,_coercedNumber:()=>sf,_coercedString:()=>Jp,_cuid:()=>nc,_cuid2:()=>ic,_custom:()=>Pf,_date:()=>$f,_decode:()=>Is,_decodeAsync:()=>Ts,_default:()=>sM,_discriminatedUnion:()=>KD,_e164:()=>fc,_email:()=>Ys,_emoji:()=>tc,_encode:()=>As,_encodeAsync:()=>$s,_endsWith:()=>ti,_enum:()=>tM,_file:()=>Nf,_float32:()=>uf,_float64:()=>lf,_gt:()=>kt,_gte:()=>ze,_guid:()=>ko,_includes:()=>Qn,_int:()=>cf,_int32:()=>df,_int64:()=>vf,_intersection:()=>YD,_ipv4:()=>cc,_ipv6:()=>uc,_isoDate:()=>rf,_isoDateTime:()=>tf,_isoDuration:()=>of,_isoTime:()=>nf,_jwt:()=>gc,_ksuid:()=>sc,_lazy:()=>fM,_length:()=>cn,_literal:()=>nM,_lowercase:()=>Xn,_lt:()=>wt,_lte:()=>rt,_mac:()=>Qp,_map:()=>QD,_max:()=>rt,_maxLength:()=>sn,_maxSize:()=>Cr,_mime:()=>ri,_min:()=>ze,_minLength:()=>rr,_minSize:()=>Ot,_multipleOf:()=>Rr,_nan:()=>Rf,_nanoid:()=>rc,_nativeEnum:()=>rM,_negative:()=>vc,_never:()=>Af,_nonnegative:()=>yc,_nonoptional:()=>cM,_nonpositive:()=>bc,_normalize:()=>ni,_null:()=>_f,_nullable:()=>aM,_number:()=>af,_optional:()=>oM,_overwrite:()=>xt,_parse:()=>Gn,_parseAsync:()=>Zn,_pipe:()=>dM,_positive:()=>hc,_promise:()=>gM,_property:()=>Sc,_readonly:()=>mM,_record:()=>JD,_refine:()=>wf,_regex:()=>Yn,_safeDecode:()=>Cs,_safeDecodeAsync:()=>Ps,_safeEncode:()=>Rs,_safeEncodeAsync:()=>Ns,_safeParse:()=>Wn,_safeParseAsync:()=>Hn,_set:()=>eM,_size:()=>an,_slugify:()=>si,_startsWith:()=>ei,_string:()=>Xp,_stringFormat:()=>ci,_stringbool:()=>Mf,_success:()=>uM,_superRefine:()=>kf,_symbol:()=>yf,_templateLiteral:()=>pM,_toLowerCase:()=>oi,_toUpperCase:()=>ai,_transform:()=>iM,_trim:()=>ii,_tuple:()=>XD,_uint32:()=>mf,_uint64:()=>bf,_ulid:()=>oc,_undefined:()=>Sf,_union:()=>HD,_unknown:()=>xf,_uppercase:()=>Jn,_url:()=>Oo,_uuid:()=>Xs,_uuidv4:()=>Js,_uuidv6:()=>Qs,_uuidv7:()=>ec,_void:()=>If,_xid:()=>ac,_xor:()=>qD,clone:()=>Me,config:()=>ue,createStandardJSONSchemaMethod:()=>ui,createToJSONSchemaMethod:()=>jf,decode:()=>g1,decodeAsync:()=>v1,describe:()=>Of,encode:()=>f1,encodeAsync:()=>h1,extractDefs:()=>Pr,finalize:()=>wr,flattenError:()=>xo,formatError:()=>Ao,globalConfig:()=>tn,globalRegistry:()=>Ae,initializeContext:()=>Nr,isValidBase64:()=>ap,isValidBase64URL:()=>W_,isValidJWT:()=>H_,locales:()=>wo,meta:()=>Df,parse:()=>Es,parseAsync:()=>xs,prettifyError:()=>Bd,process:()=>G,regexes:()=>tt,registry:()=>Ks,safeDecode:()=>y1,safeDecodeAsync:()=>_1,safeEncode:()=>b1,safeEncodeAsync:()=>S1,safeParse:()=>Vd,safeParseAsync:()=>Gd,toDotPath:()=>I_,toJSONSchema:()=>Ac,treeifyError:()=>Fd,util:()=>_,version:()=>zm});var S_,Rd=Object.freeze({status:"aborted"});function f(e,t,n){function i(c,u){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:u,constr:a,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,u);let l=a.prototype,m=Object.keys(l);for(let p=0;p<m.length;p++){let g=m[p];g in c||(c[g]=l[g].bind(c))}}let r=n?.Parent??Object;class o extends r{}Object.defineProperty(o,"name",{value:e});function a(c){var u;let l=n?.Parent?new o:this;i(l,c),(u=l._zod).deferred??(u.deferred=[]);for(let m of l._zod.deferred)m();return l}return Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:c=>n?.Parent&&c instanceof n.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var Cd=Symbol("zod_brand"),Et=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},xr=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(S_=globalThis).__zod_globalConfig??(S_.__zod_globalConfig={});var tn=globalThis.__zod_globalConfig;function ue(e){return e&&Object.assign(tn,e),tn}var _={};Nt(_,{BIGINT_FORMAT_RANGES:()=>Ld,Class:()=>Pd,NUMBER_FORMAT_RANGES:()=>zd,aborted:()=>Tr,allowsEval:()=>Od,assert:()=>WO,assertEqual:()=>BO,assertIs:()=>GO,assertNever:()=>ZO,assertNotEqual:()=>VO,assignProp:()=>Ir,base64ToUint8Array:()=>E_,base64urlToUint8Array:()=>u1,cached:()=>Bn,captureStackTrace:()=>_s,cleanEnum:()=>c1,cleanRegex:()=>bo,clone:()=>Me,cloneDef:()=>qO,createTransparentProxy:()=>e1,defineLazy:()=>M,esc:()=>Ss,escapeRegex:()=>ut,explicitlyAborted:()=>Ud,extend:()=>n1,finalizeIssue:()=>je,floatSafeRemainder:()=>wd,getElementAtPath:()=>KO,getEnumValues:()=>vo,getLengthableOrigin:()=>_o,getParsedType:()=>QO,getSizableOrigin:()=>So,hexToUint8Array:()=>d1,isObject:()=>rn,isPlainObject:()=>$r,issue:()=>Vn,joinValues:()=>h,jsonStringifyReplacer:()=>Fn,merge:()=>o1,mergeDefs:()=>tr,normalizeParams:()=>E,nullish:()=>Ar,numKeys:()=>JO,objectClone:()=>HO,omit:()=>r1,optionalKeys:()=>jd,parsedType:()=>S,partial:()=>a1,pick:()=>t1,prefixIssues:()=>Ge,primitiveTypes:()=>Md,promiseAllObject:()=>YO,propertyKeyTypes:()=>yo,randomString:()=>XO,required:()=>s1,safeExtend:()=>i1,shallowClone:()=>Dd,slugify:()=>kd,stringifyPrimitive:()=>y,uint8ArrayToBase64:()=>x_,uint8ArrayToBase64url:()=>l1,uint8ArrayToHex:()=>m1,unwrapMessage:()=>ho});function BO(e){return e}function VO(e){return e}function GO(e){}function ZO(e){throw new Error("Unexpected value in exhaustive check")}function WO(e){}function vo(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,r])=>t.indexOf(+i)===-1).map(([i,r])=>r)}function h(e,t="|"){return e.map(n=>y(n)).join(t)}function Fn(e,t){return typeof t=="bigint"?t.toString():t}function Bn(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function Ar(e){return e==null}function bo(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function wd(e,t){let n=e/t,i=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-i)<r?0:n-i}var __=Symbol("evaluating");function M(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==__)return i===void 0&&(i=__,i=n()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function HO(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Ir(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function tr(...e){let t={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function qO(e){return tr(e._zod.def)}function KO(e,t){return t?t.reduce((n,i)=>n?.[i],e):e}function YO(e){let t=Object.keys(e),n=t.map(i=>e[i]);return Promise.all(n).then(i=>{let r={};for(let o=0;o<t.length;o++)r[t[o]]=i[o];return r})}function XO(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=t[Math.floor(Math.random()*t.length)];return n}function Ss(e){return JSON.stringify(e)}function kd(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var _s="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function rn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Od=Bn(()=>{if(tn.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function $r(e){if(rn(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(rn(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Dd(e){return $r(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function JO(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var QO=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}`)}},yo=new Set(["string","number","symbol"]),Md=new Set(["string","number","bigint","boolean","symbol","undefined"]);function ut(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Me(e,t,n){let i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function E(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 e1(e){let t;return new Proxy({},{get(n,i,r){return t??(t=e()),Reflect.get(t,i,r)},set(n,i,r,o){return t??(t=e()),Reflect.set(t,i,r,o)},has(n,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(n,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(n,i,r){return t??(t=e()),Reflect.defineProperty(t,i,r)}})}function y(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function jd(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var zd={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]},Ld={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function t1(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=tr(e._zod.def,{get shape(){let a={};for(let c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(a[c]=n.shape[c])}return Ir(this,"shape",a),a},checks:[]});return Me(e,o)}function r1(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=tr(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete a[c]}return Ir(this,"shape",a),a},checks:[]});return Me(e,o)}function n1(e,t){if(!$r(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let o=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=tr(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Ir(this,"shape",o),o}});return Me(e,r)}function i1(e,t){if(!$r(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=tr(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Ir(this,"shape",i),i}});return Me(e,n)}function o1(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=tr(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return Ir(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Me(e,n)}function a1(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=tr(t._zod.def,{get shape(){let c=t._zod.def.shape,u={...c};if(n)for(let l in n){if(!(l in c))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(u[l]=e?new e({type:"optional",innerType:c[l]}):c[l])}else for(let l in c)u[l]=e?new e({type:"optional",innerType:c[l]}):c[l];return Ir(this,"shape",u),u},checks:[]});return Me(t,a)}function s1(e,t,n){let i=tr(t._zod.def,{get shape(){let r=t._zod.def.shape,o={...r};if(n)for(let a in n){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(o[a]=new e({type:"nonoptional",innerType:r[a]}))}else for(let a in r)o[a]=new e({type:"nonoptional",innerType:r[a]});return Ir(this,"shape",o),o}});return Me(t,i)}function Tr(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Ud(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Ge(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function ho(e){return typeof e=="string"?e:e?.message}function je(e,t,n){let i=e.message?e.message:ho(e.inst?._zod.def?.error?.(e))??ho(t?.error?.(e))??ho(n.customError?.(e))??ho(n.localeError?.(e))??"Invalid input",{inst:r,continue:o,input:a,...c}=e;return c.path??(c.path=[]),c.message=i,t?.reportInput&&(c.input=a),c}function So(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function _o(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function S(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function Vn(...e){let[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}function c1(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function E_(e){let t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}function x_(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function u1(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return E_(t+n)}function l1(e){return x_(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function d1(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)n[i/2]=Number.parseInt(t.slice(i,i+2),16);return n}function m1(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Pd=class{constructor(...t){}};var A_=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Fn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Eo=f("$ZodError",A_),Ze=f("$ZodError",A_,{Parent:Error});function xo(e,t=n=>n.message){let n={},i=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):i.push(t(r));return{formErrors:i,fieldErrors:n}}function Ao(e,t=n=>n.message){let n={_errors:[]},i=(r,o=[])=>{for(let a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(c=>i({issues:c},[...o,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...o,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...o,...a.path]);else{let c=[...o,...a.path];if(c.length===0)n._errors.push(t(a));else{let u=n,l=0;for(;l<c.length;){let m=c[l];l===c.length-1?(u[m]=u[m]||{_errors:[]},u[m]._errors.push(t(a))):u[m]=u[m]||{_errors:[]},u=u[m],l++}}}};return i(e),n}function Fd(e,t=n=>n.message){let n={errors:[]},i=(r,o=[])=>{var a,c;for(let u of r.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(l=>i({issues:l},[...o,...u.path]));else if(u.code==="invalid_key")i({issues:u.issues},[...o,...u.path]);else if(u.code==="invalid_element")i({issues:u.issues},[...o,...u.path]);else{let l=[...o,...u.path];if(l.length===0){n.errors.push(t(u));continue}let m=n,p=0;for(;p<l.length;){let g=l[p],v=p===l.length-1;typeof g=="string"?(m.properties??(m.properties={}),(a=m.properties)[g]??(a[g]={errors:[]}),m=m.properties[g]):(m.items??(m.items=[]),(c=m.items)[g]??(c[g]={errors:[]}),m=m.items[g]),v&&m.errors.push(t(u)),p++}}};return i(e),n}function I_(e){let t=[],n=e.map(i=>typeof i=="object"?i.key:i);for(let i of n)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function Bd(e){let t=[],n=[...e.issues].sort((i,r)=>(i.path??[]).length-(r.path??[]).length);for(let i of n)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${I_(i.path)}`);return t.join(`
101
+ `)}var Gn=e=>(t,n,i,r)=>{let o=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise)throw new Et;if(a.issues.length){let c=new(r?.Err??e)(a.issues.map(u=>je(u,o,ue())));throw _s(c,r?.callee),c}return a.value},Es=Gn(Ze),Zn=e=>async(t,n,i,r)=>{let o=i?{...i,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let c=new(r?.Err??e)(a.issues.map(u=>je(u,o,ue())));throw _s(c,r?.callee),c}return a.value},xs=Zn(Ze),Wn=e=>(t,n,i)=>{let r=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new Et;return o.issues.length?{success:!1,error:new(e??Eo)(o.issues.map(a=>je(a,r,ue())))}:{success:!0,data:o.value}},Vd=Wn(Ze),Hn=e=>async(t,n,i)=>{let r=i?{...i,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(a=>je(a,r,ue())))}:{success:!0,data:o.value}},Gd=Hn(Ze),As=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Gn(e)(t,n,r)},f1=As(Ze),Is=e=>(t,n,i)=>Gn(e)(t,n,i),g1=Is(Ze),$s=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Zn(e)(t,n,r)},h1=$s(Ze),Ts=e=>async(t,n,i)=>Zn(e)(t,n,i),v1=Ts(Ze),Rs=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Wn(e)(t,n,r)},b1=Rs(Ze),Cs=e=>(t,n,i)=>Wn(e)(t,n,i),y1=Cs(Ze),Ns=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Hn(e)(t,n,r)},S1=Ns(Ze),Ps=e=>async(t,n,i)=>Hn(e)(t,n,i),_1=Ps(Ze);var tt={};Nt(tt,{base64:()=>am,base64url:()=>ws,bigint:()=>pm,boolean:()=>gm,browserEmail:()=>C1,cidrv4:()=>im,cidrv6:()=>om,cuid:()=>Zd,cuid2:()=>Wd,date:()=>um,datetime:()=>dm,domain:()=>w1,duration:()=>Xd,e164:()=>cm,email:()=>Qd,emoji:()=>em,extendedDuration:()=>E1,guid:()=>Jd,hex:()=>k1,hostname:()=>P1,html5Email:()=>$1,httpProtocol:()=>sm,idnEmail:()=>R1,integer:()=>fm,ipv4:()=>tm,ipv6:()=>rm,ksuid:()=>Kd,lowercase:()=>bm,mac:()=>nm,md5_base64:()=>D1,md5_base64url:()=>M1,md5_hex:()=>O1,nanoid:()=>Yd,null:()=>hm,number:()=>ks,rfc5322Email:()=>T1,sha1_base64:()=>z1,sha1_base64url:()=>L1,sha1_hex:()=>j1,sha256_base64:()=>F1,sha256_base64url:()=>B1,sha256_hex:()=>U1,sha384_base64:()=>G1,sha384_base64url:()=>Z1,sha384_hex:()=>V1,sha512_base64:()=>H1,sha512_base64url:()=>q1,sha512_hex:()=>W1,string:()=>mm,time:()=>lm,ulid:()=>Hd,undefined:()=>vm,unicodeEmail:()=>$_,uppercase:()=>ym,uuid:()=>nn,uuid4:()=>x1,uuid6:()=>A1,uuid7:()=>I1,xid:()=>qd});var Zd=/^[cC][0-9a-z]{6,}$/,Wd=/^[0-9a-z]+$/,Hd=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,qd=/^[0-9a-vA-V]{20}$/,Kd=/^[A-Za-z0-9]{27}$/,Yd=/^[a-zA-Z0-9_-]{21}$/,Xd=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,E1=/^[-+]?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)?)??$/,Jd=/^([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})$/,nn=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)$/,x1=nn(4),A1=nn(6),I1=nn(7),Qd=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,$1=/^[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])?)*$/,T1=/^(([^<>()\[\]\\.,;:\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,}))$/,$_=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,R1=$_,C1=/^[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])?)*$/,N1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function em(){return new RegExp(N1,"u")}var tm=/^(?:(?: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])$/,rm=/^(([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}|:))$/,nm=e=>{let t=ut(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},im=/^((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])$/,om=/^(([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])$/,am=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ws=/^[A-Za-z0-9_-]*$/,P1=/^(?=.{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])?)*\.?$/,w1=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,sm=/^https?$/,cm=/^\+[1-9]\d{6,14}$/,T_="(?:(?:\\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])))",um=new RegExp(`^${T_}$`);function R_(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 lm(e){return new RegExp(`^${R_(e)}$`)}function dm(e){let t=R_({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${n.join("|")})`;return new RegExp(`^${T_}T(?:${i})$`)}var mm=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},pm=/^-?\d+n?$/,fm=/^-?\d+$/,ks=/^-?\d+(?:\.\d+)?$/,gm=/^(?:true|false)$/i,hm=/^null$/i;var vm=/^undefined$/i;var bm=/^[^A-Z]*$/,ym=/^[^a-z]*$/,k1=/^[0-9a-fA-F]*$/;function Io(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function $o(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var O1=/^[0-9a-fA-F]{32}$/,D1=Io(22,"=="),M1=$o(22),j1=/^[0-9a-fA-F]{40}$/,z1=Io(27,"="),L1=$o(27),U1=/^[0-9a-fA-F]{64}$/,F1=Io(43,"="),B1=$o(43),V1=/^[0-9a-fA-F]{96}$/,G1=Io(64,""),Z1=$o(64),W1=/^[0-9a-fA-F]{128}$/,H1=Io(86,"=="),q1=$o(86);var J=f("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),N_={number:"number",bigint:"bigint",object:"date"},Os=f("$ZodCheckLessThan",(e,t)=>{J.init(e,t);let n=N_[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ds=f("$ZodCheckGreaterThan",(e,t)=>{J.init(e,t);let n=N_[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Sm=f("$ZodCheckMultipleOf",(e,t)=>{J.init(e,t),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):wd(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),_m=f("$ZodCheckNumberFormat",(e,t)=>{J.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),i=n?"int":"number",[r,o]=zd[t.format];e._zod.onattach.push(a=>{let c=a._zod.bag;c.format=t.format,c.minimum=r,c.maximum=o,n&&(c.pattern=fm)}),e._zod.check=a=>{let c=a.value;if(n){if(!Number.isInteger(c)){a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}c<r&&a.issues.push({origin:"number",input:c,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),c>o&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Em=f("$ZodCheckBigIntFormat",(e,t)=>{J.init(e,t);let[n,i]=Ld[t.format];e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,o.minimum=n,o.maximum=i}),e._zod.check=r=>{let o=r.value;o<n&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>i&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),xm=f("$ZodCheckMaxSize",(e,t)=>{var n;J.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!Ar(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;r.size<=t.maximum||i.issues.push({origin:So(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Am=f("$ZodCheckMinSize",(e,t)=>{var n;J.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!Ar(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;r.size>=t.minimum||i.issues.push({origin:So(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Im=f("$ZodCheckSizeEquals",(e,t)=>{var n;J.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!Ar(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=i=>{let r=i.value,o=r.size;if(o===t.size)return;let a=o>t.size;i.issues.push({origin:So(r),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),$m=f("$ZodCheckMaxLength",(e,t)=>{var n;J.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!Ar(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;if(r.length<=t.maximum)return;let a=_o(r);i.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Tm=f("$ZodCheckMinLength",(e,t)=>{var n;J.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!Ar(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;if(r.length>=t.minimum)return;let a=_o(r);i.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Rm=f("$ZodCheckLengthEquals",(e,t)=>{var n;J.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!Ar(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=i=>{let r=i.value,o=r.length;if(o===t.length)return;let a=_o(r),c=o>t.length;i.issues.push({origin:a,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),qn=f("$ZodCheckStringFormat",(e,t)=>{var n,i;J.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),Cm=f("$ZodCheckRegex",(e,t)=>{qn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Nm=f("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=bm),qn.init(e,t)}),Pm=f("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ym),qn.init(e,t)}),wm=f("$ZodCheckIncludes",(e,t)=>{J.init(e,t);let n=ut(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),km=f("$ZodCheckStartsWith",(e,t)=>{J.init(e,t);let n=new RegExp(`^${ut(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),Om=f("$ZodCheckEndsWith",(e,t)=>{J.init(e,t);let n=new RegExp(`.*${ut(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function C_(e,t,n){e.issues.length&&t.issues.push(...Ge(n,e.issues))}var Dm=f("$ZodCheckProperty",(e,t)=>{J.init(e,t),e._zod.check=n=>{let i=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(r=>C_(r,n,t.property));C_(i,n,t.property)}}),Mm=f("$ZodCheckMimeType",(e,t)=>{J.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),jm=f("$ZodCheckOverwrite",(e,t)=>{J.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var To=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(`
102
102
  `).filter(a=>a),r=Math.min(...i.map(a=>a.length-a.trimStart().length)),o=i.map(a=>a.slice(r)).map(a=>" ".repeat(this.indent*2)+a);for(let a of o)this.content.push(a)}compile(){let t=Function,n=this?.args,r=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...n,r.join(`
103
- `))}};var Pm={major:4,minor:4,patch:3};var w=f("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Pm;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let r of i)for(let o of r._zod.onattach)o(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(a,c,u)=>{let l=$r(a),m;for(let p of c){if(p._zod.def.when){if(wd(a)||!p._zod.def.when(a))continue}else if(l)continue;let g=a.issues.length,v=p._zod.check(a);if(v instanceof Promise&&u?.async===!1)throw new Et;if(m||v instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await v,a.issues.length!==g&&(l||(l=$r(a,g)))});else{if(a.issues.length===g)continue;l||(l=$r(a,g))}}return m?m.then(()=>a):a},o=(a,c,u)=>{if($r(a))return a.aborted=!0,a;let l=r(c,i,u);if(l instanceof Promise){if(u.async===!1)throw new Et;return l.then(m=>e._zod.parse(m,u))}return e._zod.parse(l,u)};e._zod.run=(a,c)=>{if(c.skipChecks)return e._zod.parse(a,c);if(c.direction==="backward"){let l=e._zod.parse({value:a.value,issues:[]},{...c,skipChecks:!0});return l instanceof Promise?l.then(m=>o(m,a,c)):o(l,a,c)}let u=e._zod.parse(a,c);if(u instanceof Promise){if(c.async===!1)throw new Et;return u.then(l=>r(l,i,c))}return r(u,i,c)}}M(e,"~standard",()=>({validate:r=>{try{let o=Dd(e,r);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Md(e,r).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),en=f("$ZodString",(e,t)=>{w.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??im(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),K=f("$ZodStringFormat",(e,t)=>{Bn.init(e,t),en.init(e,t)}),wm=f("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Gd),K.init(e,t)}),km=f("$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=Qr(i))}else t.pattern??(t.pattern=Qr());K.init(e,t)}),Om=f("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Zd),K.init(e,t)}),Dm=f("$ZodURL",(e,t)=>{K.init(e,t),e._zod.check=n=>{try{let i=n.value.trim();if(!t.normalize&&t.protocol?.source===Qd.source&&!/^https?:\/\//i.test(i)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}let r=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Mm=f("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Wd()),K.init(e,t)}),jm=f("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Bd),K.init(e,t)}),zm=f("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=jd),K.init(e,t)}),Lm=f("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=zd),K.init(e,t)}),Um=f("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ld),K.init(e,t)}),Fm=f("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Ud),K.init(e,t)}),Bm=f("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Fd),K.init(e,t)}),Vm=f("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=nm(t)),K.init(e,t)}),Gm=f("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=tm),K.init(e,t)}),Zm=f("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=rm(t)),K.init(e,t)}),Wm=f("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Vd),K.init(e,t)}),Hm=f("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Hd),K.init(e,t),e._zod.bag.format="ipv4"}),qm=f("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=qd),K.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Km=f("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Kd(t.delimiter)),K.init(e,t),e._zod.bag.format="mac"}),Ym=f("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Yd),K.init(e,t)}),Xm=f("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Xd),K.init(e,t),e._zod.check=n=>{let i=n.value.split("/");try{if(i.length!==2)throw new Error;let[r,o]=i;if(!o)throw new Error;let a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Jm(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Qm=f("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Jd),K.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Jm(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function P_(e){if(!$s.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Jm(n)}var ep=f("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=$s),K.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{P_(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),tp=f("$ZodE164",(e,t)=>{t.pattern??(t.pattern=em),K.init(e,t)});function N_(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let r=JSON.parse(atob(i));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}var rp=f("$ZodJWT",(e,t)=>{K.init(e,t),e._zod.check=n=>{N_(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),np=f("$ZodCustomStringFormat",(e,t)=>{K.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Os=f("$ZodNumber",(e,t)=>{w.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ts,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let o=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...o?{received:o}:{}}),n}}),ip=f("$ZodNumberFormat",(e,t)=>{pm.init(e,t),Os.init(e,t)}),So=f("$ZodBoolean",(e,t)=>{w.init(e,t),e._zod.pattern=sm,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),Ds=f("$ZodBigInt",(e,t)=>{w.init(e,t),e._zod.pattern=om,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),op=f("$ZodBigIntFormat",(e,t)=>{fm.init(e,t),Ds.init(e,t)}),ap=f("$ZodSymbol",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),sp=f("$ZodUndefined",(e,t)=>{w.init(e,t),e._zod.pattern=um,e._zod.values=new Set([void 0]),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),cp=f("$ZodNull",(e,t)=>{w.init(e,t),e._zod.pattern=cm,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),up=f("$ZodAny",(e,t)=>{w.init(e,t),e._zod.parse=n=>n}),lp=f("$ZodUnknown",(e,t)=>{w.init(e,t),e._zod.parse=n=>n}),dp=f("$ZodNever",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),mp=f("$ZodVoid",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),pp=f("$ZodDate",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:e}),n}});function h_(e,t,n){e.issues.length&&t.issues.push(...Ge(n,e.issues)),t.value[n]=e.value}var fp=f("$ZodArray",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let o=[];for(let a=0;a<r.length;a++){let c=r[a],u=t.element._zod.run({value:c,issues:[]},i);u instanceof Promise?o.push(u.then(l=>h_(l,n,a))):h_(u,n,a)}return o.length?Promise.all(o).then(()=>n):n}});function ks(e,t,n,i,r,o){let a=n in i;if(e.issues.length){if(r&&o&&!a)return;t.issues.push(...Ge(n,e.issues))}if(!a&&!r){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?a&&(t.value[n]=void 0):t.value[n]=e.value}function w_(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let n=Rd(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function k_(e,t,n,i,r,o){let a=[],c=r.keySet,u=r.catchall._zod,l=u.def.type,m=u.optin==="optional",p=u.optout==="optional";for(let g in t){if(g==="__proto__"||c.has(g))continue;if(l==="never"){a.push(g);continue}let v=u.run({value:t[g],issues:[]},i);v instanceof Promise?e.push(v.then(A=>ks(A,n,g,t,m,p))):ks(v,n,g,t,m,p)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}var O_=f("$ZodObject",(e,t)=>{if(w.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let c=t.shape;Object.defineProperty(t,"shape",{get:()=>{let u={...c};return Object.defineProperty(t,"shape",{value:u}),u}})}let i=Mn(()=>w_(t));M(e._zod,"propValues",()=>{let c=t.shape,u={};for(let l in c){let m=c[l]._zod;if(m.values){u[l]??(u[l]=new Set);for(let p of m.values)u[l].add(p)}}return u});let r=Jr,o=t.catchall,a;e._zod.parse=(c,u)=>{a??(a=i.value);let l=c.value;if(!r(l))return c.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),c;c.value={};let m=[],p=a.shape;for(let g of a.keys){let v=p[g],A=v._zod.optin==="optional",X=v._zod.optout==="optional",z=v._zod.run({value:l[g],issues:[]},u);z instanceof Promise?m.push(z.then(xe=>ks(xe,c,g,l,A,X))):ks(z,c,g,l,A,X)}return o?k_(m,l,c,u,i.value,e):m.length?Promise.all(m).then(()=>c):c}}),gp=f("$ZodObjectJIT",(e,t)=>{O_.init(e,t);let n=e._zod.parse,i=Mn(()=>w_(t)),r=g=>{let v=new yo(["shape","payload","ctx"]),A=i.value,X=ke=>{let ne=fs(ke);return`shape[${ne}]._zod.run({ value: input[${ne}], issues: [] }, ctx)`};v.write("const input = payload.value;");let z=Object.create(null),xe=0;for(let ke of A.keys)z[ke]=`key_${xe++}`;v.write("const newResult = {};");for(let ke of A.keys){let ne=z[ke],ge=fs(ke),wn=g[ke],HS=wn?._zod?.optin==="optional",Fk=wn?._zod?.optout==="optional";v.write(`const ${ne} = ${X(ke)};`),HS&&Fk?v.write(`
103
+ `))}};var zm={major:4,minor:4,patch:3};var w=f("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=zm;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let r of i)for(let o of r._zod.onattach)o(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(a,c,u)=>{let l=Tr(a),m;for(let p of c){if(p._zod.def.when){if(Ud(a)||!p._zod.def.when(a))continue}else if(l)continue;let g=a.issues.length,v=p._zod.check(a);if(v instanceof Promise&&u?.async===!1)throw new Et;if(m||v instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await v,a.issues.length!==g&&(l||(l=Tr(a,g)))});else{if(a.issues.length===g)continue;l||(l=Tr(a,g))}}return m?m.then(()=>a):a},o=(a,c,u)=>{if(Tr(a))return a.aborted=!0,a;let l=r(c,i,u);if(l instanceof Promise){if(u.async===!1)throw new Et;return l.then(m=>e._zod.parse(m,u))}return e._zod.parse(l,u)};e._zod.run=(a,c)=>{if(c.skipChecks)return e._zod.parse(a,c);if(c.direction==="backward"){let l=e._zod.parse({value:a.value,issues:[]},{...c,skipChecks:!0});return l instanceof Promise?l.then(m=>o(m,a,c)):o(l,a,c)}let u=e._zod.parse(a,c);if(u instanceof Promise){if(c.async===!1)throw new Et;return u.then(l=>r(l,i,c))}return r(u,i,c)}}M(e,"~standard",()=>({validate:r=>{try{let o=Vd(e,r);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Gd(e,r).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),on=f("$ZodString",(e,t)=>{w.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??mm(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),K=f("$ZodStringFormat",(e,t)=>{qn.init(e,t),on.init(e,t)}),Um=f("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Jd),K.init(e,t)}),Fm=f("$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=nn(i))}else t.pattern??(t.pattern=nn());K.init(e,t)}),Bm=f("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Qd),K.init(e,t)}),Vm=f("$ZodURL",(e,t)=>{K.init(e,t),e._zod.check=n=>{try{let i=n.value.trim();if(!t.normalize&&t.protocol?.source===sm.source&&!/^https?:\/\//i.test(i)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}let r=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Gm=f("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=em()),K.init(e,t)}),Zm=f("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Yd),K.init(e,t)}),Wm=f("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Zd),K.init(e,t)}),Hm=f("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Wd),K.init(e,t)}),qm=f("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Hd),K.init(e,t)}),Km=f("$ZodXID",(e,t)=>{t.pattern??(t.pattern=qd),K.init(e,t)}),Ym=f("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Kd),K.init(e,t)}),Xm=f("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=dm(t)),K.init(e,t)}),Jm=f("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=um),K.init(e,t)}),Qm=f("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=lm(t)),K.init(e,t)}),ep=f("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Xd),K.init(e,t)}),tp=f("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=tm),K.init(e,t),e._zod.bag.format="ipv4"}),rp=f("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=rm),K.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),np=f("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=nm(t.delimiter)),K.init(e,t),e._zod.bag.format="mac"}),ip=f("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=im),K.init(e,t)}),op=f("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=om),K.init(e,t),e._zod.check=n=>{let i=n.value.split("/");try{if(i.length!==2)throw new Error;let[r,o]=i;if(!o)throw new Error;let a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function ap(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var sp=f("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=am),K.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{ap(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function W_(e){if(!ws.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return ap(n)}var cp=f("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ws),K.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{W_(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),up=f("$ZodE164",(e,t)=>{t.pattern??(t.pattern=cm),K.init(e,t)});function H_(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let r=JSON.parse(atob(i));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}var lp=f("$ZodJWT",(e,t)=>{K.init(e,t),e._zod.check=n=>{H_(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),dp=f("$ZodCustomStringFormat",(e,t)=>{K.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Us=f("$ZodNumber",(e,t)=>{w.init(e,t),e._zod.pattern=e._zod.bag.pattern??ks,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let o=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...o?{received:o}:{}}),n}}),mp=f("$ZodNumberFormat",(e,t)=>{_m.init(e,t),Us.init(e,t)}),Ro=f("$ZodBoolean",(e,t)=>{w.init(e,t),e._zod.pattern=gm,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),Fs=f("$ZodBigInt",(e,t)=>{w.init(e,t),e._zod.pattern=pm,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),pp=f("$ZodBigIntFormat",(e,t)=>{Em.init(e,t),Fs.init(e,t)}),fp=f("$ZodSymbol",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),gp=f("$ZodUndefined",(e,t)=>{w.init(e,t),e._zod.pattern=vm,e._zod.values=new Set([void 0]),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),hp=f("$ZodNull",(e,t)=>{w.init(e,t),e._zod.pattern=hm,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),vp=f("$ZodAny",(e,t)=>{w.init(e,t),e._zod.parse=n=>n}),bp=f("$ZodUnknown",(e,t)=>{w.init(e,t),e._zod.parse=n=>n}),yp=f("$ZodNever",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Sp=f("$ZodVoid",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),_p=f("$ZodDate",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:e}),n}});function w_(e,t,n){e.issues.length&&t.issues.push(...Ge(n,e.issues)),t.value[n]=e.value}var Ep=f("$ZodArray",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let o=[];for(let a=0;a<r.length;a++){let c=r[a],u=t.element._zod.run({value:c,issues:[]},i);u instanceof Promise?o.push(u.then(l=>w_(l,n,a))):w_(u,n,a)}return o.length?Promise.all(o).then(()=>n):n}});function Ls(e,t,n,i,r,o){let a=n in i;if(e.issues.length){if(r&&o&&!a)return;t.issues.push(...Ge(n,e.issues))}if(!a&&!r){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?a&&(t.value[n]=void 0):t.value[n]=e.value}function q_(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let n=jd(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function K_(e,t,n,i,r,o){let a=[],c=r.keySet,u=r.catchall._zod,l=u.def.type,m=u.optin==="optional",p=u.optout==="optional";for(let g in t){if(g==="__proto__"||c.has(g))continue;if(l==="never"){a.push(g);continue}let v=u.run({value:t[g],issues:[]},i);v instanceof Promise?e.push(v.then(A=>Ls(A,n,g,t,m,p))):Ls(v,n,g,t,m,p)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}var Y_=f("$ZodObject",(e,t)=>{if(w.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let c=t.shape;Object.defineProperty(t,"shape",{get:()=>{let u={...c};return Object.defineProperty(t,"shape",{value:u}),u}})}let i=Bn(()=>q_(t));M(e._zod,"propValues",()=>{let c=t.shape,u={};for(let l in c){let m=c[l]._zod;if(m.values){u[l]??(u[l]=new Set);for(let p of m.values)u[l].add(p)}}return u});let r=rn,o=t.catchall,a;e._zod.parse=(c,u)=>{a??(a=i.value);let l=c.value;if(!r(l))return c.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),c;c.value={};let m=[],p=a.shape;for(let g of a.keys){let v=p[g],A=v._zod.optin==="optional",X=v._zod.optout==="optional",z=v._zod.run({value:l[g],issues:[]},u);z instanceof Promise?m.push(z.then(xe=>Ls(xe,c,g,l,A,X))):Ls(z,c,g,l,A,X)}return o?K_(m,l,c,u,i.value,e):m.length?Promise.all(m).then(()=>c):c}}),xp=f("$ZodObjectJIT",(e,t)=>{Y_.init(e,t);let n=e._zod.parse,i=Bn(()=>q_(t)),r=g=>{let v=new To(["shape","payload","ctx"]),A=i.value,X=De=>{let ne=Ss(De);return`shape[${ne}]._zod.run({ value: input[${ne}], issues: [] }, ctx)`};v.write("const input = payload.value;");let z=Object.create(null),xe=0;for(let De of A.keys)z[De]=`key_${xe++}`;v.write("const newResult = {};");for(let De of A.keys){let ne=z[De],ge=Ss(De),jn=g[De],n_=jn?._zod?.optin==="optional",lO=jn?._zod?.optout==="optional";v.write(`const ${ne} = ${X(De)};`),n_&&lO?v.write(`
104
104
  if (${ne}.issues.length) {
105
105
  if (${ge} in input) {
106
106
  payload.issues = payload.issues.concat(${ne}.issues.map(iss => ({
@@ -118,7 +118,7 @@ Filtered results for: ${this.inputValue?this.inputValue:yr.gray("Enter something
118
118
  newResult[${ge}] = ${ne}.value;
119
119
  }
120
120
 
121
- `):HS?v.write(`
121
+ `):n_?v.write(`
122
122
  if (${ne}.issues.length) {
123
123
  payload.issues = payload.issues.concat(${ne}.issues.map(iss => ({
124
124
  ...iss,
@@ -159,59 +159,59 @@ Filtered results for: ${this.inputValue?this.inputValue:yr.gray("Enter something
159
159
  }
160
160
  }
161
161
 
162
- `)}v.write("payload.value = newResult;"),v.write("return payload;");let Sr=v.compile();return(ke,ne)=>Sr(g,ke,ne)},o,a=Jr,c=!Xr.jitless,l=c&&$d.value,m=t.catchall,p;e._zod.parse=(g,v)=>{p??(p=i.value);let A=g.value;return a(A)?c&&l&&v?.async===!1&&v.jitless!==!0?(o||(o=r(t.shape)),g=o(g,v),m?k_([],A,g,v,p,e):g):n(g,v):(g.issues.push({expected:"object",code:"invalid_type",input:A,inst:e}),g)}});function v_(e,t,n,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let r=e.filter(o=>!$r(o));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>Me(a,i,ue())))}),t)}var _o=f("$ZodUnion",(e,t)=>{w.init(e,t),M(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),M(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),M(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),M(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(r=>r._zod.pattern);return new RegExp(`^(${i.map(r=>uo(r.source)).join("|")})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,a=[];for(let c of t.options){let u=c._zod.run({value:i.value,issues:[]},r);if(u instanceof Promise)a.push(u),o=!0;else{if(u.issues.length===0)return u;a.push(u)}}return o?Promise.all(a).then(c=>v_(c,i,e,r)):v_(a,i,e,r)}});function b_(e,t,n,i){let r=e.filter(o=>o.issues.length===0);return r.length===1?(t.value=r[0].value,t):(r.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>Me(a,i,ue())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}var hp=f("$ZodXor",(e,t)=>{_o.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,a=[];for(let c of t.options){let u=c._zod.run({value:i.value,issues:[]},r);u instanceof Promise?(a.push(u),o=!0):a.push(u)}return o?Promise.all(a).then(c=>b_(c,i,e,r)):b_(a,i,e,r)}}),vp=f("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,_o.init(e,t);let n=e._zod.parse;M(e._zod,"propValues",()=>{let r={};for(let o of t.options){let a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let[c,u]of Object.entries(a)){r[c]||(r[c]=new Set);for(let l of u)r[c].add(l)}}return r});let i=Mn(()=>{let r=t.options,o=new Map;for(let a of r){let c=a._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let u of c){if(o.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);o.set(u,a)}}return o});e._zod.parse=(r,o)=>{let a=r.value;if(!Jr(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;let c=i.value.get(a?.[t.discriminator]);return c?c._zod.run(r,o):t.unionFallback||o.direction==="backward"?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:a,path:[t.discriminator],inst:e}),r)}}),bp=f("$ZodIntersection",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value,o=t.left._zod.run({value:r,issues:[]},i),a=t.right._zod.run({value:r,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([u,l])=>y_(n,u,l)):y_(n,o,a)}});function Nm(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ir(e)&&Ir(t)){let n=Object.keys(t),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),r={...e,...t};for(let o of i){let a=Nm(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r[o]=a.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let r=e[i],o=t[i],a=Nm(r,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function y_(e,t,n){let i=new Map,r;for(let c of t.issues)if(c.code==="unrecognized_keys"){r??(r=c);for(let u of c.keys)i.has(u)||i.set(u,{}),i.get(u).l=!0}else e.issues.push(c);for(let c of n.issues)if(c.code==="unrecognized_keys")for(let u of c.keys)i.has(u)||i.set(u,{}),i.get(u).r=!0;else e.issues.push(c);let o=[...i].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(o.length&&r&&e.issues.push({...r,keys:o}),$r(e))return e;let a=Nm(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var Ms=f("$ZodTuple",(e,t)=>{w.init(e,t);let n=t.items;e._zod.parse=(i,r)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let a=[],c=S_(n,"optin"),u=S_(n,"optout");if(!t.rest){if(o.length<c)return i.issues.push({code:"too_small",minimum:c,inclusive:!0,input:o,inst:e,origin:"array"}),i;o.length>n.length&&i.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:o,inst:e,origin:"array"})}let l=new Array(n.length);for(let m=0;m<n.length;m++){let p=n[m]._zod.run({value:o[m],issues:[]},r);p instanceof Promise?a.push(p.then(g=>{l[m]=g})):l[m]=p}if(t.rest){let m=n.length-1,p=o.slice(n.length);for(let g of p){m++;let v=t.rest._zod.run({value:g,issues:[]},r);v instanceof Promise?a.push(v.then(A=>__(A,i,m))):__(v,i,m)}}return a.length?Promise.all(a).then(()=>E_(l,i,n,o,u)):E_(l,i,n,o,u)}});function S_(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function __(e,t,n){e.issues.length&&t.issues.push(...Ge(n,e.issues)),t.value[n]=e.value}function E_(e,t,n,i,r){for(let o=0;o<n.length;o++){let a=e[o],c=o<i.length;if(a.issues.length){if(!c&&o>=r){t.value.length=o;break}t.issues.push(...Ge(o,a.issues))}t.value[o]=a.value}for(let o=t.value.length-1;o>=i.length&&(n[o]._zod.optout==="optional"&&t.value[o]===void 0);o--)t.value.length=o;return t}var yp=f("$ZodRecord",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!Ir(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let o=[],a=t.keyType._zod.values;if(a){n.value={};let c=new Set;for(let l of a)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){c.add(typeof l=="number"?l.toString():l);let m=t.keyType._zod.run({value:l,issues:[]},i);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(m.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:m.issues.map(v=>Me(v,i,ue())),input:l,path:[l],inst:e});continue}let p=m.value,g=t.valueType._zod.run({value:r[l],issues:[]},i);g instanceof Promise?o.push(g.then(v=>{v.issues.length&&n.issues.push(...Ge(l,v.issues)),n.value[p]=v.value})):(g.issues.length&&n.issues.push(...Ge(l,g.issues)),n.value[p]=g.value)}let u;for(let l in r)c.has(l)||(u=u??[],u.push(l));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:u})}else{n.value={};for(let c of Reflect.ownKeys(r)){if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(r,c))continue;let u=t.keyType._zod.run({value:c,issues:[]},i);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&Ts.test(c)&&u.issues.length){let p=t.keyType._zod.run({value:Number(c),issues:[]},i);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(u=p)}if(u.issues.length){t.mode==="loose"?n.value[c]=r[c]:n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(p=>Me(p,i,ue())),input:c,path:[c],inst:e});continue}let m=t.valueType._zod.run({value:r[c],issues:[]},i);m instanceof Promise?o.push(m.then(p=>{p.issues.length&&n.issues.push(...Ge(c,p.issues)),n.value[u.value]=p.value})):(m.issues.length&&n.issues.push(...Ge(c,m.issues)),n.value[u.value]=m.value)}}return o.length?Promise.all(o).then(()=>n):n}}),Sp=f("$ZodMap",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let o=[];n.value=new Map;for(let[a,c]of r){let u=t.keyType._zod.run({value:a,issues:[]},i),l=t.valueType._zod.run({value:c,issues:[]},i);u instanceof Promise||l instanceof Promise?o.push(Promise.all([u,l]).then(([m,p])=>{x_(m,p,n,a,r,e,i)})):x_(u,l,n,a,r,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function x_(e,t,n,i,r,o,a){e.issues.length&&(lo.has(typeof i)?n.issues.push(...Ge(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(c=>Me(c,a,ue()))})),t.issues.length&&(lo.has(typeof i)?n.issues.push(...Ge(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(c=>Me(c,a,ue()))})),n.value.set(e.value,t.value)}var _p=f("$ZodSet",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let o=[];n.value=new Set;for(let a of r){let c=t.valueType._zod.run({value:a,issues:[]},i);c instanceof Promise?o.push(c.then(u=>A_(u,n))):A_(c,n)}return o.length?Promise.all(o).then(()=>n):n}});function A_(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var Ep=f("$ZodEnum",(e,t)=>{w.init(e,t);let n=co(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(r=>lo.has(typeof r)).map(r=>typeof r=="string"?st(r):r.toString()).join("|")})$`),e._zod.parse=(r,o)=>{let a=r.value;return i.has(a)||r.issues.push({code:"invalid_value",values:n,input:a,inst:e}),r}}),xp=f("$ZodLiteral",(e,t)=>{if(w.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?st(i):i?st(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,r)=>{let o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),Ap=f("$ZodFile",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),Ip=f("$ZodTransform",(e,t)=>{w.init(e,t),e._zod.optin="optional",e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new Er(e.constructor.name);let r=t.transform(n.value,n);if(i.async)return(r instanceof Promise?r:Promise.resolve(r)).then(a=>(n.value=a,n.fallback=!0,n));if(r instanceof Promise)throw new Et;return n.value=r,n.fallback=!0,n}});function I_(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var js=f("$ZodOptional",(e,t)=>{w.init(e,t),e._zod.optin="optional",e._zod.optout="optional",M(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),M(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${uo(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){let r=n.value,o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(a=>I_(a,r)):I_(o,r)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),$p=f("$ZodExactOptional",(e,t)=>{js.init(e,t),M(e._zod,"values",()=>t.innerType._zod.values),M(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),Tp=f("$ZodNullable",(e,t)=>{w.init(e,t),M(e._zod,"optin",()=>t.innerType._zod.optin),M(e._zod,"optout",()=>t.innerType._zod.optout),M(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${uo(n.source)}|null)$`):void 0}),M(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),Cp=f("$ZodDefault",(e,t)=>{w.init(e,t),e._zod.optin="optional",M(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>$_(o,t)):$_(r,t)}});function $_(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Rp=f("$ZodPrefault",(e,t)=>{w.init(e,t),e._zod.optin="optional",M(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),Pp=f("$ZodNonOptional",(e,t)=>{w.init(e,t),M(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>T_(o,e)):T_(r,e)}});function T_(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 Np=f("$ZodSuccess",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new Er("ZodSuccess");let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),wp=f("$ZodCatch",(e,t)=>{w.init(e,t),e._zod.optin="optional",M(e._zod,"optout",()=>t.innerType._zod.optout),M(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(a=>Me(a,i,ue()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(o=>Me(o,i,ue()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),kp=f("$ZodNaN",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),zs=f("$ZodPipe",(e,t)=>{w.init(e,t),M(e._zod,"values",()=>t.in._zod.values),M(e._zod,"optin",()=>t.in._zod.optin),M(e._zod,"optout",()=>t.out._zod.optout),M(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(a=>Ps(a,t.in,i)):Ps(o,t.in,i)}let r=t.in._zod.run(n,i);return r instanceof Promise?r.then(o=>Ps(o,t.out,i)):Ps(r,t.out,i)}});function Ps(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var Eo=f("$ZodCodec",(e,t)=>{w.init(e,t),M(e._zod,"values",()=>t.in._zod.values),M(e._zod,"optin",()=>t.in._zod.optin),M(e._zod,"optout",()=>t.out._zod.optout),M(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let o=t.in._zod.run(n,i);return o instanceof Promise?o.then(a=>Ns(a,t,i)):Ns(o,t,i)}else{let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(a=>Ns(a,t,i)):Ns(o,t,i)}}});function Ns(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(o=>ws(e,o,t.out,n)):ws(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(o=>ws(e,o,t.in,n)):ws(e,r,t.in,n)}}function ws(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}var Op=f("$ZodPreprocess",(e,t)=>{zs.init(e,t)}),Dp=f("$ZodReadonly",(e,t)=>{w.init(e,t),M(e._zod,"propValues",()=>t.innerType._zod.propValues),M(e._zod,"values",()=>t.innerType._zod.values),M(e._zod,"optin",()=>t.innerType?._zod?.optin),M(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(C_):C_(r)}});function C_(e){return e.value=Object.freeze(e.value),e}var Mp=f("$ZodTemplateLiteral",(e,t)=>{w.init(e,t);let n=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let r=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let o=r.startsWith("^")?1:0,a=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(o,a))}else if(i===null||Cd.has(typeof i))n.push(st(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(i,r)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),jp=f("$ZodFunction",(e,t)=>(w.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...i){let r=e._def.input?hs(e._def.input,i):i,o=Reflect.apply(n,this,r);return e._def.output?hs(e._def.output,o):o}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let r=e._def.input?await vs(e._def.input,i):i,o=await Reflect.apply(n,this,r);return e._def.output?await vs(e._def.output,o):o}},e._zod.parse=(n,i)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let i=e.constructor;return Array.isArray(n[0])?new i({type:"function",input:new Ms({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new i({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:n})},e)),zp=f("$ZodPromise",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},i))}),Lp=f("$ZodLazy",(e,t)=>{w.init(e,t),M(e._zod,"innerType",()=>{let n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),M(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),M(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),M(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),M(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)}),Up=f("$ZodCustom",(e,t)=>{J.init(e,t),w.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{let i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then(o=>R_(o,n,i,e));R_(r,n,i,e)}});function R_(e,t,n,i){if(!e){let r={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(r.params=i._zod.def.params),t.issues.push(jn(r))}}var Ao={};Pt(Ao,{ar:()=>D_,az:()=>M_,be:()=>z_,bg:()=>L_,ca:()=>U_,cs:()=>F_,da:()=>B_,de:()=>V_,el:()=>G_,en:()=>Ls,eo:()=>Z_,es:()=>W_,fa:()=>H_,fi:()=>q_,fr:()=>K_,frCA:()=>Y_,he:()=>X_,hr:()=>J_,hu:()=>Q_,hy:()=>tE,id:()=>rE,is:()=>nE,it:()=>iE,ja:()=>oE,ka:()=>aE,kh:()=>sE,km:()=>Us,ko:()=>cE,lt:()=>lE,mk:()=>dE,ms:()=>mE,nl:()=>pE,no:()=>fE,ota:()=>gE,pl:()=>vE,ps:()=>hE,pt:()=>bE,ro:()=>yE,ru:()=>_E,sl:()=>EE,sv:()=>xE,ta:()=>AE,th:()=>IE,tr:()=>$E,ua:()=>TE,uk:()=>Fs,ur:()=>CE,uz:()=>RE,vi:()=>PE,yo:()=>kE,zhCN:()=>NE,zhTW:()=>wE});var $1=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${c}`:`\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 ${c}`}case"invalid_value":return r.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${y(r.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${r.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${n[o.format]??r.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${h(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function D_(){return{localeError:$1()}}var T1=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${c}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${c}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${y(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[o.format]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${h(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function M_(){return{localeError:T1()}}function j_(e,t,n,i){let r=Math.abs(e),o=r%10,a=r%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?n:i}var C1=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${c}`:`\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 ${c}`}case"invalid_value":return r.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${y(r.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let c=Number(r.maximum),u=j_(c,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${r.maximum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let c=Number(r.minimum),u=j_(c,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${r.minimum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${h(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function z_(){return{localeError:C1()}}var R1=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${c}`:`\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 ${c}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${y(r.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${h(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function L_(){return{localeError:R1()}}var P1=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${c}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${c}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${y(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${h(r.values," o ")}`;case"too_big":{let o=r.inclusive?"com a m\xE0xim":"menys de",a=t(r.origin);return a?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${o} ${r.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(r.origin);return a?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${o} ${r.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}};function U_(){return{localeError:P1()}}var N1=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(r){return e[r]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${c}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${c}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${y(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${h(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}};function F_(){return{localeError:N1()}}var w1=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${c}`:`Ugyldigt input: forventede ${o}, fik ${c}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${y(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),c=i[r.origin]??r.origin;return a?`For stor: forventede ${c??"value"} ${a.verb} ${o} ${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${c??"value"} havde ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),c=i[r.origin]??r.origin;return a?`For lille: forventede ${c} ${a.verb} ${o} ${r.minimum.toString()} ${a.unit}`:`For lille: forventede ${c} havde ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${h(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${r.origin}`;default:return"Ugyldigt input"}}};function B_(){return{localeError:w1()}}var k1=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(r){return e[r]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${c}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${c}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${y(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ist`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ist`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${h(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}};function V_(){return{localeError:k1()}}var O1=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(r){return e[r]??null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return typeof r.expected=="string"&&/^[A-Z]/.test(r.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${r.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`}case"invalid_value":return r.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${y(r.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${r.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${r.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${o.prefix}"`:o.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${o.suffix}"`:o.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${o.includes}"`:o.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${o.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[o.format]??r.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${r.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${r.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${r.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${h(r.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${r.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${r.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function G_(){return{localeError:O1()}}var D1=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return`Invalid input: expected ${o}, received ${c}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${y(r.values[0])}`:`Invalid option: expected one of ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Too big: expected ${r.origin??"value"} to have ${o}${r.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Too small: expected ${r.origin} to have ${o}${r.minimum.toString()} ${a.unit}`:`Too small: expected ${r.origin} to be ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`Invalid discriminator value. Expected ${r.options.map(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}};function Ls(){return{localeError:D1()}}var M1=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${c}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${c}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${y(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${o}${r.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${n[o.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}};function Z_(){return{localeError:M1()}}var j1=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${c}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${c}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${y(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),c=i[r.origin]??r.origin;return a?`Demasiado grande: se esperaba que ${c??"valor"} tuviera ${o}${r.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${c??"valor"} fuera ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),c=i[r.origin]??r.origin;return a?`Demasiado peque\xF1o: se esperaba que ${c} tuviera ${o}${r.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${c} fuera ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}};function W_(){return{localeError:j1()}}var z1=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${c} \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 ${c} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${y(r.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${h(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[o.format]??r.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${h(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function H_(){return{localeError:z1()}}var L1=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(r){return e[r]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${c}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${c}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${y(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${o}${r.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${o}${r.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${n[o.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${h(r.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function q_(){return{localeError:L1()}}var U1=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${c} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${c} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${y(r.values[0])} attendu`:`Option invalide : une valeur parmi ${h(r.values,"|")} attendue`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Trop grand : ${i[r.origin]??"valeur"} doit ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Trop petit : ${i[r.origin]??"valeur"} doit ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Trop petit : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${h(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function K_(){return{localeError:U1()}}var F1=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${c}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${c}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${y(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u2264":"<",a=t(r.origin);return a?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${o}${r.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u2265":">",a=t(r.origin);return a?`Trop petit : attendu que ${r.origin} ait ${o}${r.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${r.origin} soit ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${h(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function Y_(){return{localeError:F1()}}var B1=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=l=>l?e[l]:void 0,i=l=>{let m=n(l);return m?m.label:l??e.unknown.label},r=l=>`\u05D4${i(l)}`,o=l=>(n(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,c={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"}},u={nan:"NaN"};return l=>{switch(l.code){case"invalid_type":{let m=l.expected,p=u[m??""]??i(m),g=S(l.input),v=u[g]??e[g]?.label??g;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 ${v}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}, \u05D4\u05EA\u05E7\u05D1\u05DC ${v}`}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 ${y(l.values[0])}`;let m=l.values.map(v=>y(v));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 ${m[0]} \u05D0\u05D5 ${m[1]}`;let p=m[m.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 ${m.slice(0,-1).join(", ")} \u05D0\u05D5 ${p}`}case"too_big":{let m=a(l.origin),p=r(l.origin??"value");if(l.origin==="string")return`${m?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${m?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let A=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 ${A}`}if(l.origin==="array"||l.origin==="set"){let A=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",X=l.inclusive?`${l.maximum} ${m?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${m?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} ${A} \u05DC\u05D4\u05DB\u05D9\u05DC ${X}`.trim()}let g=l.inclusive?"<=":"<",v=o(l.origin??"value");return m?.unit?`${m.longLabel} \u05DE\u05D3\u05D9: ${p} ${v} ${g}${l.maximum.toString()} ${m.unit}`:`${m?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${p} ${v} ${g}${l.maximum.toString()}`}case"too_small":{let m=a(l.origin),p=r(l.origin??"value");if(l.origin==="string")return`${m?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${m?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let A=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 ${A}`}if(l.origin==="array"||l.origin==="set"){let A=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let z=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${A} \u05DC\u05D4\u05DB\u05D9\u05DC ${z}`}let X=l.inclusive?`${l.minimum} ${m?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${m?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${A} \u05DC\u05D4\u05DB\u05D9\u05DC ${X}`.trim()}let g=l.inclusive?">=":">",v=o(l.origin??"value");return m?.unit?`${m.shortLabel} \u05DE\u05D3\u05D9: ${p} ${v} ${g}${l.minimum.toString()} ${m.unit}`:`${m?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${p} ${v} ${g}${l.minimum.toString()}`}case"invalid_format":{let m=l;if(m.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${m.prefix}"`;if(m.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${m.suffix}"`;if(m.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${m.includes}"`;if(m.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 ${m.pattern}`;let p=c[m.format],g=p?.label??m.format,A=(p?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${g} \u05DC\u05D0 ${A}`}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"}: ${h(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${r(l.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function X_(){return{localeError:B1()}}var V1=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(r){return e[r]??null}let n={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},i={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${r.expected}, a primljeno je ${c}`:`Neispravan unos: o\u010Dekuje se ${o}, a primljeno je ${c}`}case"invalid_value":return r.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${y(r.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),c=i[r.origin]??r.origin;return a?`Preveliko: o\u010Dekivano da ${c??"vrijednost"} ima ${o}${r.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${c??"vrijednost"} bude ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),c=i[r.origin]??r.origin;return a?`Premalo: o\u010Dekivano da ${c} ima ${o}${r.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${c} bude ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${o.prefix}"`:o.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${o.suffix}"`:o.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${o.includes}"`:o.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`:`Neispravna ${n[o.format]??r.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${r.divisor}`;case"unrecognized_keys":return`Neprepoznat${r.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${h(r.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[r.origin]??r.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[r.origin]??r.origin}`;default:return"Neispravan unos"}}};function J_(){return{localeError:V1()}}var G1=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}let n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${c}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${c}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${y(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${r.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${o}${r.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[o.format]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function Q_(){return{localeError:G1()}}function eE(e,t,n){return Math.abs(e)===1?t:n}function Vn(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}var Z1=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(r){return e[r]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${c}`:`\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 ${c}`}case"invalid_value":return r.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${y(r.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let c=Number(r.maximum),u=eE(c,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 ${Vn(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.maximum.toString()} ${u}`}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 ${Vn(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let c=Number(r.minimum),u=eE(c,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 ${Vn(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.minimum.toString()} ${u}`}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 ${Vn(r.origin)} \u056C\u056B\u0576\u056B ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[o.format]??r.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${r.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${h(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Vn(r.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Vn(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function tE(){return{localeError:Z1()}}var W1=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${c}`:`Input tidak valid: diharapkan ${o}, diterima ${c}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${y(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${o}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: diharapkan ${r.origin} memiliki ${o}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${n[o.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}};function rE(){return{localeError:W1()}}var H1=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(r){return e[r]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${y(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${o}${r.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${o}${r.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${n[o.format]??r.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${h(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${r.origin}`;default:return"Rangt gildi"}}};function nE(){return{localeError:H1()}}var q1=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${c}`:`Input non valido: atteso ${o}, ricevuto ${c}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${y(r.values[0])}`:`Opzione non valida: atteso uno tra ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Troppo grande: ${r.origin??"valore"} deve avere ${o}${r.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Troppo piccolo: ${r.origin} deve avere ${o}${r.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${r.origin} deve essere ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Input non valido: ${n[o.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${h(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}};function iE(){return{localeError:q1()}}var K1=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(r){return e[r]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${y(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${h(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(r.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${a.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(r.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${a.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${r.keys.length>1?"\u7FA4":""}: ${h(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function oE(){return{localeError:K1()}}var Y1=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(r){return e[r]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${c}`:`\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 ${c}`}case"invalid_value":return r.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${y(r.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${h(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${r.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${h(r.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${r.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function aE(){return{localeError:Y1()}}var X1=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(r){return e[r]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${c}`:`\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 ${c}`}case"invalid_value":return r.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${y(r.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${h(r.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function Us(){return{localeError:X1()}}function sE(){return Us()}var J1=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${y(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${h(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=t(r.origin),u=c?.unit??"\uC694\uC18C";return c?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${u} ${o}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${o}${a}`}case"too_small":{let o=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=t(r.origin),u=c?.unit??"\uC694\uC18C";return c?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${u} ${o}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${o}${a}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[o.format]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${h(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function cE(){return{localeError:J1()}}var xo=e=>e.charAt(0).toUpperCase()+e.slice(1);function uE(e){let t=Math.abs(e),n=t%10,i=t%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}var Q1=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(r,o,a,c){let u=e[r]??null;return u===null?u:{unit:u.unit[o],verb:u.verb[c][a?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${c}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${c}, o tik\u0117tasi - ${o}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${y(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${h(r.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[r.origin]??r.origin,a=t(r.origin,uE(Number(r.maximum)),r.inclusive??!1,"smaller");if(a?.verb)return`${xo(o??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.maximum.toString()} ${a.unit??"element\u0173"}`;let c=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${xo(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${r.maximum.toString()} ${a?.unit}`}case"too_small":{let o=i[r.origin]??r.origin,a=t(r.origin,uE(Number(r.minimum)),r.inclusive??!1,"bigger");if(a?.verb)return`${xo(o??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.minimum.toString()} ${a.unit??"element\u0173"}`;let c=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${xo(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${r.minimum.toString()} ${a?.unit}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${n[o.format]??r.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${h(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[r.origin]??r.origin;return`${xo(o??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function lE(){return{localeError:Q1()}}var eD=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(r){return e[r]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${c}`:`\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 ${c}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${y(r.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${h(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function dE(){return{localeError:eD()}}var tD=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${c}`:`Input tidak sah: dijangka ${o}, diterima ${c}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${y(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: dijangka ${r.origin??"nilai"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: dijangka ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${n[o.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${h(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}};function mE(){return{localeError:tD()}}var rD=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(r){return e[r]??null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${c}`:`Ongeldige invoer: verwacht ${o}, ontving ${c}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${y(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),c=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return a?`Te ${c}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${c}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} is`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),c=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return a?`Te ${c}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${c}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} is`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}};function pE(){return{localeError:rD()}}var nD=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${c}`:`Ugyldig input: forventet ${o}, fikk ${c}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${y(r.values[0])}`:`Ugyldig valg: forventet en av ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${h(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}};function fE(){return{localeError:nD()}}var iD=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${c}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${c}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${y(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=r;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[o.format]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function gE(){return{localeError:iD()}}var oD=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${c} \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 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${y(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${h(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[o.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${h(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function hE(){return{localeError:oD()}}var aD=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(r){return e[r]??null}let n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${c}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${c}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${y(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[o.format]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function vE(){return{localeError:aD()}}var sD=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){return e[r]??null}let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${c}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${c}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${y(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${o}${r.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Muito pequeno: esperado que ${r.origin} tivesse ${o}${r.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${n[o.format]??r.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${r.origin}`;default:return"Campo inv\xE1lido"}}};function bE(){return{localeError:sD()}}var cD=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(r){return e[r]??null}let n={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},i={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${c}`}case"invalid_value":return r.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${y(r.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} s\u0103 fie ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Prea mic: a\u0219teptat ca ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${r.origin} s\u0103 fie ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${o.prefix}"`:o.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${o.suffix}"`:o.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${o.includes}"`:o.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${o.pattern}`:`Format invalid: ${n[o.format]??r.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${r.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${h(r.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${r.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${r.origin}`;default:return"Intrare invalid\u0103"}}};function yE(){return{localeError:cD()}}function SE(e,t,n,i){let r=Math.abs(e),o=r%10,a=r%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?n:i}var uD=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${c}`:`\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 ${c}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${y(r.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let c=Number(r.maximum),u=SE(c,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.maximum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let c=Number(r.minimum),u=SE(c,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.minimum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${h(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function _E(){return{localeError:uD()}}var lD=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}let n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${c}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${c}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${y(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${o}${r.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${o}${r.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${n[o.format]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${h(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}};function EE(){return{localeError:lD()}}var dD=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(r){return e[r]??null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${c}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${c}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${y(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${n[o.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${h(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function xE(){return{localeError:dD()}}var mD=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(r){return e[r]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${c}`:`\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 ${c}`}case"invalid_value":return r.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${y(r.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${h(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${h(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function AE(){return{localeError:mD()}}var pD=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(r){return e[r]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${c}`:`\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 ${c}`}case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${y(r.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${r.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${h(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function IE(){return{localeError:pD()}}var fD=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(r){return e[r]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${c}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${c}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${y(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[o.format]??r.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${h(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function $E(){return{localeError:fD()}}var gD=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${c}`:`\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 ${c}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${y(r.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${h(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${r.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function Fs(){return{localeError:gD()}}function TE(){return Fs()}var hD=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(r){return e[r]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${c} \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 ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${y(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${h(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${o}${r.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${o}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${r.keys.length>1?"\u0632":""}: ${h(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function CE(){return{localeError:hD()}}var vD=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(r){return e[r]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${c}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${c}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${y(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[o.format]??r.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${h(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${r.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function RE(){return{localeError:vD()}}var bD=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(r){return e[r]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${y(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${n[o.format]??r.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${h(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function PE(){return{localeError:bD()}}var yD=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(r){return e[r]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${y(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${n[o.format]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${h(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function NE(){return{localeError:yD()}}var SD=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(r){return e[r]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${c}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${c}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${y(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${h(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function wE(){return{localeError:SD()}}var _D=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(r){return e[r]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${c}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${c}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${y(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${a.verb} ${o}${r.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.maximum}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${a.verb} ${o}${r.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.minimum}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${n[o.format]??r.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${h(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function kE(){return{localeError:_D()}}var OE,Fp=Symbol("ZodOutput"),Bp=Symbol("ZodInput"),Bs=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let i={...this.get(n)??{}};delete i.id;let r={...i,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Vs(){return new Bs}(OE=globalThis).__zod_globalRegistry??(OE.__zod_globalRegistry=Vs());var Ae=globalThis.__zod_globalRegistry;function Vp(e,t){return new e({type:"string",...E(t)})}function Gp(e,t){return new e({type:"string",coerce:!0,...E(t)})}function Gs(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...E(t)})}function Io(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...E(t)})}function Zs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...E(t)})}function Ws(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...E(t)})}function Hs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...E(t)})}function qs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...E(t)})}function $o(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...E(t)})}function Ks(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...E(t)})}function Ys(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...E(t)})}function Xs(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...E(t)})}function Js(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...E(t)})}function Qs(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...E(t)})}function ec(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...E(t)})}function tc(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...E(t)})}function rc(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...E(t)})}function nc(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...E(t)})}function Zp(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...E(t)})}function ic(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...E(t)})}function oc(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...E(t)})}function ac(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...E(t)})}function sc(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...E(t)})}function cc(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...E(t)})}function uc(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...E(t)})}var Wp={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Hp(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...E(t)})}function qp(e,t){return new e({type:"string",format:"date",check:"string_format",...E(t)})}function Kp(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...E(t)})}function Yp(e,t){return new e({type:"string",format:"duration",check:"string_format",...E(t)})}function Xp(e,t){return new e({type:"number",checks:[],...E(t)})}function Jp(e,t){return new e({type:"number",coerce:!0,checks:[],...E(t)})}function Qp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...E(t)})}function ef(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...E(t)})}function tf(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...E(t)})}function rf(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...E(t)})}function nf(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...E(t)})}function of(e,t){return new e({type:"boolean",...E(t)})}function af(e,t){return new e({type:"boolean",coerce:!0,...E(t)})}function sf(e,t){return new e({type:"bigint",...E(t)})}function cf(e,t){return new e({type:"bigint",coerce:!0,...E(t)})}function uf(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...E(t)})}function lf(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...E(t)})}function df(e,t){return new e({type:"symbol",...E(t)})}function mf(e,t){return new e({type:"undefined",...E(t)})}function pf(e,t){return new e({type:"null",...E(t)})}function ff(e){return new e({type:"any"})}function gf(e){return new e({type:"unknown"})}function hf(e,t){return new e({type:"never",...E(t)})}function vf(e,t){return new e({type:"void",...E(t)})}function bf(e,t){return new e({type:"date",...E(t)})}function yf(e,t){return new e({type:"date",coerce:!0,...E(t)})}function Sf(e,t){return new e({type:"nan",...E(t)})}function wt(e,t){return new Cs({check:"less_than",...E(t),value:e,inclusive:!1})}function tt(e,t){return new Cs({check:"less_than",...E(t),value:e,inclusive:!0})}function kt(e,t){return new Rs({check:"greater_than",...E(t),value:e,inclusive:!1})}function je(e,t){return new Rs({check:"greater_than",...E(t),value:e,inclusive:!0})}function lc(e){return kt(0,e)}function dc(e){return wt(0,e)}function mc(e){return tt(0,e)}function pc(e){return je(0,e)}function Tr(e,t){return new mm({check:"multiple_of",...E(t),value:e})}function Cr(e,t){return new gm({check:"max_size",...E(t),maximum:e})}function Ot(e,t){return new hm({check:"min_size",...E(t),minimum:e})}function tn(e,t){return new vm({check:"size_equals",...E(t),size:e})}function rn(e,t){return new bm({check:"max_length",...E(t),maximum:e})}function tr(e,t){return new ym({check:"min_length",...E(t),minimum:e})}function nn(e,t){return new Sm({check:"length_equals",...E(t),length:e})}function Gn(e,t){return new _m({check:"string_format",format:"regex",...E(t),pattern:e})}function Zn(e){return new Em({check:"string_format",format:"lowercase",...E(e)})}function Wn(e){return new xm({check:"string_format",format:"uppercase",...E(e)})}function Hn(e,t){return new Am({check:"string_format",format:"includes",...E(t),includes:e})}function qn(e,t){return new Im({check:"string_format",format:"starts_with",...E(t),prefix:e})}function Kn(e,t){return new $m({check:"string_format",format:"ends_with",...E(t),suffix:e})}function fc(e,t,n){return new Tm({check:"property",property:e,schema:t,...E(n)})}function Yn(e,t){return new Cm({check:"mime_type",mime:e,...E(t)})}function xt(e){return new Rm({check:"overwrite",tx:e})}function Xn(e){return xt(t=>t.normalize(e))}function Jn(){return xt(e=>e.trim())}function Qn(){return xt(e=>e.toLowerCase())}function ei(){return xt(e=>e.toUpperCase())}function ti(){return xt(e=>Id(e))}function _f(e,t,n){return new e({type:"array",element:t,...E(n)})}function xD(e,t,n){return new e({type:"union",options:t,...E(n)})}function AD(e,t,n){return new e({type:"union",options:t,inclusive:!1,...E(n)})}function ID(e,t,n,i){return new e({type:"union",options:n,discriminator:t,...E(i)})}function $D(e,t,n){return new e({type:"intersection",left:t,right:n})}function TD(e,t,n,i){let r=n instanceof w,o=r?i:n,a=r?n:null;return new e({type:"tuple",items:t,rest:a,...E(o)})}function CD(e,t,n,i){return new e({type:"record",keyType:t,valueType:n,...E(i)})}function RD(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...E(i)})}function PD(e,t,n){return new e({type:"set",valueType:t,...E(n)})}function ND(e,t,n){let i=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:i,...E(n)})}function wD(e,t,n){return new e({type:"enum",entries:t,...E(n)})}function kD(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...E(n)})}function Ef(e,t){return new e({type:"file",...E(t)})}function OD(e,t){return new e({type:"transform",transform:t})}function DD(e,t){return new e({type:"optional",innerType:t})}function MD(e,t){return new e({type:"nullable",innerType:t})}function jD(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():Td(n)}})}function zD(e,t,n){return new e({type:"nonoptional",innerType:t,...E(n)})}function LD(e,t){return new e({type:"success",innerType:t})}function UD(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function FD(e,t,n){return new e({type:"pipe",in:t,out:n})}function BD(e,t){return new e({type:"readonly",innerType:t})}function VD(e,t,n){return new e({type:"template_literal",parts:t,...E(n)})}function GD(e,t){return new e({type:"lazy",getter:t})}function ZD(e,t){return new e({type:"promise",innerType:t})}function xf(e,t,n){let i=E(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function Af(e,t,n){return new e({type:"custom",check:"custom",fn:t,...E(n)})}function If(e,t){let n=DE(i=>(i.addIssue=r=>{if(typeof r=="string")i.issues.push(jn(r,i.value,n._zod.def));else{let o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=i.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),i.issues.push(jn(o))}},e(i.value,i)),t);return n}function DE(e,t){let n=new J({check:"custom",...E(t)});return n._zod.check=e,n}function $f(e){let t=new J({check:"describe"});return t._zod.onattach=[n=>{let i=Ae.get(n)??{};Ae.add(n,{...i,description:e})}],t._zod.check=()=>{},t}function Tf(e){let t=new J({check:"meta"});return t._zod.onattach=[n=>{let i=Ae.get(n)??{};Ae.add(n,{...i,...e})}],t._zod.check=()=>{},t}function Cf(e,t){let n=E(t),i=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(v=>typeof v=="string"?v.toLowerCase():v),r=r.map(v=>typeof v=="string"?v.toLowerCase():v));let o=new Set(i),a=new Set(r),c=e.Codec??Eo,u=e.Boolean??So,l=e.String??en,m=new l({type:"string",error:n.error}),p=new u({type:"boolean",error:n.error}),g=new c({type:"pipe",in:m,out:p,transform:((v,A)=>{let X=v;return n.case!=="sensitive"&&(X=X.toLowerCase()),o.has(X)?!0:a.has(X)?!1:(A.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:A.value,inst:g,continue:!1}),{})}),reverseTransform:((v,A)=>v===!0?i[0]||"true":r[0]||"false"),error:n.error});return g}function ri(e,t,n,i={}){let r=E(i),o={...E(i),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:c=>n.test(c),...r};return n instanceof RegExp&&(o.pattern=n),new e(o)}function Rr(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??Ae,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 G(e,t,n={path:[],schemaPath:[]}){var i;let r=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);let c=e._zod.toJSONSchema?.();if(c)a.schema=c;else{let m={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,m);else{let g=a.schema,v=t.processors[r.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);v(e,t,g,m)}let p=e._zod.parent;p&&(a.ref||(a.ref=p),G(p,t,m),t.seen.get(p).isParent=!0)}let u=t.metadataRegistry.get(e);return u&&Object.assign(a.schema,u),t.io==="input"&&ze(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function Pr(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let a of e.seen.entries()){let c=e.metadataRegistry.get(a[0])?.id;if(c){let u=i.get(c);if(u&&u!==a[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(c,a[0])}}let r=a=>{let c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(a[0])?.id,g=e.external.uri??(A=>A);if(p)return{ref:g(p)};let v=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=v,{defId:v,ref:`${g("__shared")}#/${c}/${v}`}}if(a[1]===n)return{ref:"#"};let l=`#/${c}/`,m=a[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:l+m}},o=a=>{if(a[1].schema.$ref)return;let c=a[1],{ref:u,defId:l}=r(a);c.def={...c.schema},l&&(c.defId=l);let m=c.schema;for(let p in m)delete m[p];m.$ref=u};if(e.cycles==="throw")for(let a of e.seen.entries()){let c=a[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
162
+ `)}v.write("payload.value = newResult;"),v.write("return payload;");let _r=v.compile();return(De,ne)=>_r(g,De,ne)},o,a=rn,c=!tn.jitless,l=c&&Od.value,m=t.catchall,p;e._zod.parse=(g,v)=>{p??(p=i.value);let A=g.value;return a(A)?c&&l&&v?.async===!1&&v.jitless!==!0?(o||(o=r(t.shape)),g=o(g,v),m?K_([],A,g,v,p,e):g):n(g,v):(g.issues.push({expected:"object",code:"invalid_type",input:A,inst:e}),g)}});function k_(e,t,n,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let r=e.filter(o=>!Tr(o));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>je(a,i,ue())))}),t)}var Co=f("$ZodUnion",(e,t)=>{w.init(e,t),M(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),M(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),M(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),M(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(r=>r._zod.pattern);return new RegExp(`^(${i.map(r=>bo(r.source)).join("|")})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,a=[];for(let c of t.options){let u=c._zod.run({value:i.value,issues:[]},r);if(u instanceof Promise)a.push(u),o=!0;else{if(u.issues.length===0)return u;a.push(u)}}return o?Promise.all(a).then(c=>k_(c,i,e,r)):k_(a,i,e,r)}});function O_(e,t,n,i){let r=e.filter(o=>o.issues.length===0);return r.length===1?(t.value=r[0].value,t):(r.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>je(a,i,ue())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}var Ap=f("$ZodXor",(e,t)=>{Co.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,a=[];for(let c of t.options){let u=c._zod.run({value:i.value,issues:[]},r);u instanceof Promise?(a.push(u),o=!0):a.push(u)}return o?Promise.all(a).then(c=>O_(c,i,e,r)):O_(a,i,e,r)}}),Ip=f("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Co.init(e,t);let n=e._zod.parse;M(e._zod,"propValues",()=>{let r={};for(let o of t.options){let a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let[c,u]of Object.entries(a)){r[c]||(r[c]=new Set);for(let l of u)r[c].add(l)}}return r});let i=Bn(()=>{let r=t.options,o=new Map;for(let a of r){let c=a._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let u of c){if(o.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);o.set(u,a)}}return o});e._zod.parse=(r,o)=>{let a=r.value;if(!rn(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;let c=i.value.get(a?.[t.discriminator]);return c?c._zod.run(r,o):t.unionFallback||o.direction==="backward"?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:a,path:[t.discriminator],inst:e}),r)}}),$p=f("$ZodIntersection",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value,o=t.left._zod.run({value:r,issues:[]},i),a=t.right._zod.run({value:r,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([u,l])=>D_(n,u,l)):D_(n,o,a)}});function Lm(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if($r(e)&&$r(t)){let n=Object.keys(t),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),r={...e,...t};for(let o of i){let a=Lm(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r[o]=a.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let r=e[i],o=t[i],a=Lm(r,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function D_(e,t,n){let i=new Map,r;for(let c of t.issues)if(c.code==="unrecognized_keys"){r??(r=c);for(let u of c.keys)i.has(u)||i.set(u,{}),i.get(u).l=!0}else e.issues.push(c);for(let c of n.issues)if(c.code==="unrecognized_keys")for(let u of c.keys)i.has(u)||i.set(u,{}),i.get(u).r=!0;else e.issues.push(c);let o=[...i].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(o.length&&r&&e.issues.push({...r,keys:o}),Tr(e))return e;let a=Lm(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var Bs=f("$ZodTuple",(e,t)=>{w.init(e,t);let n=t.items;e._zod.parse=(i,r)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let a=[],c=M_(n,"optin"),u=M_(n,"optout");if(!t.rest){if(o.length<c)return i.issues.push({code:"too_small",minimum:c,inclusive:!0,input:o,inst:e,origin:"array"}),i;o.length>n.length&&i.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:o,inst:e,origin:"array"})}let l=new Array(n.length);for(let m=0;m<n.length;m++){let p=n[m]._zod.run({value:o[m],issues:[]},r);p instanceof Promise?a.push(p.then(g=>{l[m]=g})):l[m]=p}if(t.rest){let m=n.length-1,p=o.slice(n.length);for(let g of p){m++;let v=t.rest._zod.run({value:g,issues:[]},r);v instanceof Promise?a.push(v.then(A=>j_(A,i,m))):j_(v,i,m)}}return a.length?Promise.all(a).then(()=>z_(l,i,n,o,u)):z_(l,i,n,o,u)}});function M_(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function j_(e,t,n){e.issues.length&&t.issues.push(...Ge(n,e.issues)),t.value[n]=e.value}function z_(e,t,n,i,r){for(let o=0;o<n.length;o++){let a=e[o],c=o<i.length;if(a.issues.length){if(!c&&o>=r){t.value.length=o;break}t.issues.push(...Ge(o,a.issues))}t.value[o]=a.value}for(let o=t.value.length-1;o>=i.length&&(n[o]._zod.optout==="optional"&&t.value[o]===void 0);o--)t.value.length=o;return t}var Tp=f("$ZodRecord",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!$r(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let o=[],a=t.keyType._zod.values;if(a){n.value={};let c=new Set;for(let l of a)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){c.add(typeof l=="number"?l.toString():l);let m=t.keyType._zod.run({value:l,issues:[]},i);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(m.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:m.issues.map(v=>je(v,i,ue())),input:l,path:[l],inst:e});continue}let p=m.value,g=t.valueType._zod.run({value:r[l],issues:[]},i);g instanceof Promise?o.push(g.then(v=>{v.issues.length&&n.issues.push(...Ge(l,v.issues)),n.value[p]=v.value})):(g.issues.length&&n.issues.push(...Ge(l,g.issues)),n.value[p]=g.value)}let u;for(let l in r)c.has(l)||(u=u??[],u.push(l));u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:u})}else{n.value={};for(let c of Reflect.ownKeys(r)){if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(r,c))continue;let u=t.keyType._zod.run({value:c,issues:[]},i);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&ks.test(c)&&u.issues.length){let p=t.keyType._zod.run({value:Number(c),issues:[]},i);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(u=p)}if(u.issues.length){t.mode==="loose"?n.value[c]=r[c]:n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(p=>je(p,i,ue())),input:c,path:[c],inst:e});continue}let m=t.valueType._zod.run({value:r[c],issues:[]},i);m instanceof Promise?o.push(m.then(p=>{p.issues.length&&n.issues.push(...Ge(c,p.issues)),n.value[u.value]=p.value})):(m.issues.length&&n.issues.push(...Ge(c,m.issues)),n.value[u.value]=m.value)}}return o.length?Promise.all(o).then(()=>n):n}}),Rp=f("$ZodMap",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let o=[];n.value=new Map;for(let[a,c]of r){let u=t.keyType._zod.run({value:a,issues:[]},i),l=t.valueType._zod.run({value:c,issues:[]},i);u instanceof Promise||l instanceof Promise?o.push(Promise.all([u,l]).then(([m,p])=>{L_(m,p,n,a,r,e,i)})):L_(u,l,n,a,r,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function L_(e,t,n,i,r,o,a){e.issues.length&&(yo.has(typeof i)?n.issues.push(...Ge(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(c=>je(c,a,ue()))})),t.issues.length&&(yo.has(typeof i)?n.issues.push(...Ge(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(c=>je(c,a,ue()))})),n.value.set(e.value,t.value)}var Cp=f("$ZodSet",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let o=[];n.value=new Set;for(let a of r){let c=t.valueType._zod.run({value:a,issues:[]},i);c instanceof Promise?o.push(c.then(u=>U_(u,n))):U_(c,n)}return o.length?Promise.all(o).then(()=>n):n}});function U_(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var Np=f("$ZodEnum",(e,t)=>{w.init(e,t);let n=vo(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(r=>yo.has(typeof r)).map(r=>typeof r=="string"?ut(r):r.toString()).join("|")})$`),e._zod.parse=(r,o)=>{let a=r.value;return i.has(a)||r.issues.push({code:"invalid_value",values:n,input:a,inst:e}),r}}),Pp=f("$ZodLiteral",(e,t)=>{if(w.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(i=>typeof i=="string"?ut(i):i?ut(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,r)=>{let o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),wp=f("$ZodFile",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),kp=f("$ZodTransform",(e,t)=>{w.init(e,t),e._zod.optin="optional",e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new xr(e.constructor.name);let r=t.transform(n.value,n);if(i.async)return(r instanceof Promise?r:Promise.resolve(r)).then(a=>(n.value=a,n.fallback=!0,n));if(r instanceof Promise)throw new Et;return n.value=r,n.fallback=!0,n}});function F_(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Vs=f("$ZodOptional",(e,t)=>{w.init(e,t),e._zod.optin="optional",e._zod.optout="optional",M(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),M(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${bo(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){let r=n.value,o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(a=>F_(a,r)):F_(o,r)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),Op=f("$ZodExactOptional",(e,t)=>{Vs.init(e,t),M(e._zod,"values",()=>t.innerType._zod.values),M(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),Dp=f("$ZodNullable",(e,t)=>{w.init(e,t),M(e._zod,"optin",()=>t.innerType._zod.optin),M(e._zod,"optout",()=>t.innerType._zod.optout),M(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${bo(n.source)}|null)$`):void 0}),M(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),Mp=f("$ZodDefault",(e,t)=>{w.init(e,t),e._zod.optin="optional",M(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>B_(o,t)):B_(r,t)}});function B_(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var jp=f("$ZodPrefault",(e,t)=>{w.init(e,t),e._zod.optin="optional",M(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),zp=f("$ZodNonOptional",(e,t)=>{w.init(e,t),M(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>V_(o,e)):V_(r,e)}});function V_(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 Lp=f("$ZodSuccess",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new xr("ZodSuccess");let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),Up=f("$ZodCatch",(e,t)=>{w.init(e,t),e._zod.optin="optional",M(e._zod,"optout",()=>t.innerType._zod.optout),M(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(a=>je(a,i,ue()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(o=>je(o,i,ue()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),Fp=f("$ZodNaN",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),Gs=f("$ZodPipe",(e,t)=>{w.init(e,t),M(e._zod,"values",()=>t.in._zod.values),M(e._zod,"optin",()=>t.in._zod.optin),M(e._zod,"optout",()=>t.out._zod.optout),M(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(a=>Ms(a,t.in,i)):Ms(o,t.in,i)}let r=t.in._zod.run(n,i);return r instanceof Promise?r.then(o=>Ms(o,t.out,i)):Ms(r,t.out,i)}});function Ms(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var No=f("$ZodCodec",(e,t)=>{w.init(e,t),M(e._zod,"values",()=>t.in._zod.values),M(e._zod,"optin",()=>t.in._zod.optin),M(e._zod,"optout",()=>t.out._zod.optout),M(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let o=t.in._zod.run(n,i);return o instanceof Promise?o.then(a=>js(a,t,i)):js(o,t,i)}else{let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(a=>js(a,t,i)):js(o,t,i)}}});function js(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(o=>zs(e,o,t.out,n)):zs(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(o=>zs(e,o,t.in,n)):zs(e,r,t.in,n)}}function zs(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}var Bp=f("$ZodPreprocess",(e,t)=>{Gs.init(e,t)}),Vp=f("$ZodReadonly",(e,t)=>{w.init(e,t),M(e._zod,"propValues",()=>t.innerType._zod.propValues),M(e._zod,"values",()=>t.innerType._zod.values),M(e._zod,"optin",()=>t.innerType?._zod?.optin),M(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(G_):G_(r)}});function G_(e){return e.value=Object.freeze(e.value),e}var Gp=f("$ZodTemplateLiteral",(e,t)=>{w.init(e,t);let n=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let r=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let o=r.startsWith("^")?1:0,a=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(o,a))}else if(i===null||Md.has(typeof i))n.push(ut(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(i,r)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),Zp=f("$ZodFunction",(e,t)=>(w.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...i){let r=e._def.input?Es(e._def.input,i):i,o=Reflect.apply(n,this,r);return e._def.output?Es(e._def.output,o):o}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let r=e._def.input?await xs(e._def.input,i):i,o=await Reflect.apply(n,this,r);return e._def.output?await xs(e._def.output,o):o}},e._zod.parse=(n,i)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let i=e.constructor;return Array.isArray(n[0])?new i({type:"function",input:new Bs({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new i({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:n})},e)),Wp=f("$ZodPromise",(e,t)=>{w.init(e,t),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},i))}),Hp=f("$ZodLazy",(e,t)=>{w.init(e,t),M(e._zod,"innerType",()=>{let n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),M(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),M(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),M(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),M(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)}),qp=f("$ZodCustom",(e,t)=>{J.init(e,t),w.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{let i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then(o=>Z_(o,n,i,e));Z_(r,n,i,e)}});function Z_(e,t,n,i){if(!e){let r={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(r.params=i._zod.def.params),t.issues.push(Vn(r))}}var wo={};Nt(wo,{ar:()=>X_,az:()=>J_,be:()=>eE,bg:()=>tE,ca:()=>rE,cs:()=>nE,da:()=>iE,de:()=>oE,el:()=>aE,en:()=>Zs,eo:()=>sE,es:()=>cE,fa:()=>uE,fi:()=>lE,fr:()=>dE,frCA:()=>mE,he:()=>pE,hr:()=>fE,hu:()=>gE,hy:()=>vE,id:()=>bE,is:()=>yE,it:()=>SE,ja:()=>_E,ka:()=>EE,kh:()=>xE,km:()=>Ws,ko:()=>AE,lt:()=>$E,mk:()=>TE,ms:()=>RE,nl:()=>CE,no:()=>NE,ota:()=>PE,pl:()=>kE,ps:()=>wE,pt:()=>OE,ro:()=>DE,ru:()=>jE,sl:()=>zE,sv:()=>LE,ta:()=>UE,th:()=>FE,tr:()=>BE,ua:()=>VE,uk:()=>Hs,ur:()=>GE,uz:()=>ZE,vi:()=>WE,yo:()=>KE,zhCN:()=>HE,zhTW:()=>qE});var Y1=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${c}`:`\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 ${c}`}case"invalid_value":return r.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${y(r.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${r.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${n[o.format]??r.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${h(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function X_(){return{localeError:Y1()}}var X1=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${c}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${c}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${y(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[o.format]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${h(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function J_(){return{localeError:X1()}}function Q_(e,t,n,i){let r=Math.abs(e),o=r%10,a=r%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?n:i}var J1=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${c}`:`\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 ${c}`}case"invalid_value":return r.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${y(r.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let c=Number(r.maximum),u=Q_(c,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${r.maximum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let c=Number(r.minimum),u=Q_(c,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${r.minimum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${h(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function eE(){return{localeError:J1()}}var Q1=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${c}`:`\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 ${c}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${y(r.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${r.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${h(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function tE(){return{localeError:Q1()}}var eD=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${c}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${c}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${y(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${h(r.values," o ")}`;case"too_big":{let o=r.inclusive?"com a m\xE0xim":"menys de",a=t(r.origin);return a?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${o} ${r.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(r.origin);return a?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${o} ${r.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}};function rE(){return{localeError:eD()}}var tD=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(r){return e[r]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${c}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${c}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${y(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${h(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}};function nE(){return{localeError:tD()}}var rD=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${c}`:`Ugyldigt input: forventede ${o}, fik ${c}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${y(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),c=i[r.origin]??r.origin;return a?`For stor: forventede ${c??"value"} ${a.verb} ${o} ${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${c??"value"} havde ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),c=i[r.origin]??r.origin;return a?`For lille: forventede ${c} ${a.verb} ${o} ${r.minimum.toString()} ${a.unit}`:`For lille: forventede ${c} havde ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${h(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${r.origin}`;default:return"Ugyldigt input"}}};function iE(){return{localeError:rD()}}var nD=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(r){return e[r]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${c}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${c}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${y(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ist`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ist`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${h(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}};function oE(){return{localeError:nD()}}var iD=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(r){return e[r]??null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return typeof r.expected=="string"&&/^[A-Z]/.test(r.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${r.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`}case"invalid_value":return r.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${y(r.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${r.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${r.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${o.prefix}"`:o.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${o.suffix}"`:o.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${o.includes}"`:o.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${o.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[o.format]??r.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${r.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${r.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${r.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${h(r.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${r.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${r.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function aE(){return{localeError:iD()}}var oD=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return`Invalid input: expected ${o}, received ${c}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${y(r.values[0])}`:`Invalid option: expected one of ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Too big: expected ${r.origin??"value"} to have ${o}${r.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Too small: expected ${r.origin} to have ${o}${r.minimum.toString()} ${a.unit}`:`Too small: expected ${r.origin} to be ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`Invalid discriminator value. Expected ${r.options.map(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}};function Zs(){return{localeError:oD()}}var aD=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${c}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${c}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${y(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${o}${r.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${n[o.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}};function sE(){return{localeError:aD()}}var sD=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${c}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${c}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${y(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),c=i[r.origin]??r.origin;return a?`Demasiado grande: se esperaba que ${c??"valor"} tuviera ${o}${r.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${c??"valor"} fuera ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),c=i[r.origin]??r.origin;return a?`Demasiado peque\xF1o: se esperaba que ${c} tuviera ${o}${r.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${c} fuera ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${n[o.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}};function cE(){return{localeError:sD()}}var cD=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${c} \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 ${c} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${y(r.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${h(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[o.format]??r.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${h(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function uE(){return{localeError:cD()}}var uD=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(r){return e[r]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${c}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${c}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${y(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${o}${r.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${o}${r.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${n[o.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${h(r.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function lE(){return{localeError:uD()}}var lD=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${c} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${c} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${y(r.values[0])} attendu`:`Option invalide : une valeur parmi ${h(r.values,"|")} attendue`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Trop grand : ${i[r.origin]??"valeur"} doit ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Trop petit : ${i[r.origin]??"valeur"} doit ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Trop petit : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${h(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function dE(){return{localeError:lD()}}var dD=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${c}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${c}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${y(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u2264":"<",a=t(r.origin);return a?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${o}${r.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u2265":">",a=t(r.origin);return a?`Trop petit : attendu que ${r.origin} ait ${o}${r.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${r.origin} soit ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${h(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function mE(){return{localeError:dD()}}var mD=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=l=>l?e[l]:void 0,i=l=>{let m=n(l);return m?m.label:l??e.unknown.label},r=l=>`\u05D4${i(l)}`,o=l=>(n(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,c={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"}},u={nan:"NaN"};return l=>{switch(l.code){case"invalid_type":{let m=l.expected,p=u[m??""]??i(m),g=S(l.input),v=u[g]??e[g]?.label??g;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 ${v}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}, \u05D4\u05EA\u05E7\u05D1\u05DC ${v}`}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 ${y(l.values[0])}`;let m=l.values.map(v=>y(v));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 ${m[0]} \u05D0\u05D5 ${m[1]}`;let p=m[m.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 ${m.slice(0,-1).join(", ")} \u05D0\u05D5 ${p}`}case"too_big":{let m=a(l.origin),p=r(l.origin??"value");if(l.origin==="string")return`${m?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${m?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let A=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 ${A}`}if(l.origin==="array"||l.origin==="set"){let A=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",X=l.inclusive?`${l.maximum} ${m?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${m?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} ${A} \u05DC\u05D4\u05DB\u05D9\u05DC ${X}`.trim()}let g=l.inclusive?"<=":"<",v=o(l.origin??"value");return m?.unit?`${m.longLabel} \u05DE\u05D3\u05D9: ${p} ${v} ${g}${l.maximum.toString()} ${m.unit}`:`${m?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${p} ${v} ${g}${l.maximum.toString()}`}case"too_small":{let m=a(l.origin),p=r(l.origin??"value");if(l.origin==="string")return`${m?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${m?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let A=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 ${A}`}if(l.origin==="array"||l.origin==="set"){let A=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let z=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${A} \u05DC\u05D4\u05DB\u05D9\u05DC ${z}`}let X=l.inclusive?`${l.minimum} ${m?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${m?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${A} \u05DC\u05D4\u05DB\u05D9\u05DC ${X}`.trim()}let g=l.inclusive?">=":">",v=o(l.origin??"value");return m?.unit?`${m.shortLabel} \u05DE\u05D3\u05D9: ${p} ${v} ${g}${l.minimum.toString()} ${m.unit}`:`${m?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${p} ${v} ${g}${l.minimum.toString()}`}case"invalid_format":{let m=l;if(m.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${m.prefix}"`;if(m.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${m.suffix}"`;if(m.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${m.includes}"`;if(m.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 ${m.pattern}`;let p=c[m.format],g=p?.label??m.format,A=(p?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${g} \u05DC\u05D0 ${A}`}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"}: ${h(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${r(l.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function pE(){return{localeError:mD()}}var pD=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(r){return e[r]??null}let n={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},i={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${r.expected}, a primljeno je ${c}`:`Neispravan unos: o\u010Dekuje se ${o}, a primljeno je ${c}`}case"invalid_value":return r.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${y(r.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),c=i[r.origin]??r.origin;return a?`Preveliko: o\u010Dekivano da ${c??"vrijednost"} ima ${o}${r.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${c??"vrijednost"} bude ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),c=i[r.origin]??r.origin;return a?`Premalo: o\u010Dekivano da ${c} ima ${o}${r.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${c} bude ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${o.prefix}"`:o.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${o.suffix}"`:o.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${o.includes}"`:o.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`:`Neispravna ${n[o.format]??r.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${r.divisor}`;case"unrecognized_keys":return`Neprepoznat${r.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${h(r.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[r.origin]??r.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[r.origin]??r.origin}`;default:return"Neispravan unos"}}};function fE(){return{localeError:pD()}}var fD=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}let n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${c}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${c}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${y(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${r.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${o}${r.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[o.format]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function gE(){return{localeError:fD()}}function hE(e,t,n){return Math.abs(e)===1?t:n}function Kn(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}var gD=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(r){return e[r]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${c}`:`\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 ${c}`}case"invalid_value":return r.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${y(r.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let c=Number(r.maximum),u=hE(c,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 ${Kn(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.maximum.toString()} ${u}`}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 ${Kn(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let c=Number(r.minimum),u=hE(c,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 ${Kn(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.minimum.toString()} ${u}`}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 ${Kn(r.origin)} \u056C\u056B\u0576\u056B ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[o.format]??r.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${r.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${h(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Kn(r.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Kn(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function vE(){return{localeError:gD()}}var hD=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${c}`:`Input tidak valid: diharapkan ${o}, diterima ${c}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${y(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${o}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: diharapkan ${r.origin} memiliki ${o}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${n[o.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}};function bE(){return{localeError:hD()}}var vD=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(r){return e[r]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${y(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${o}${r.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${o}${r.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${n[o.format]??r.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${h(r.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${r.origin}`;default:return"Rangt gildi"}}};function yE(){return{localeError:vD()}}var bD=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${c}`:`Input non valido: atteso ${o}, ricevuto ${c}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${y(r.values[0])}`:`Opzione non valida: atteso uno tra ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Troppo grande: ${r.origin??"valore"} deve avere ${o}${r.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Troppo piccolo: ${r.origin} deve avere ${o}${r.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${r.origin} deve essere ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Input non valido: ${n[o.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${h(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}};function SE(){return{localeError:bD()}}var yD=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(r){return e[r]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${y(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${h(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(r.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${a.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(r.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${a.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${r.keys.length>1?"\u7FA4":""}: ${h(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function _E(){return{localeError:yD()}}var SD=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(r){return e[r]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${c}`:`\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 ${c}`}case"invalid_value":return r.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${y(r.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${h(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${r.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${h(r.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${r.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function EE(){return{localeError:SD()}}var _D=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(r){return e[r]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${c}`:`\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 ${c}`}case"invalid_value":return r.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${y(r.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${h(r.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function Ws(){return{localeError:_D()}}function xE(){return Ws()}var ED=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${y(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${h(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=t(r.origin),u=c?.unit??"\uC694\uC18C";return c?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${u} ${o}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${o}${a}`}case"too_small":{let o=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=t(r.origin),u=c?.unit??"\uC694\uC18C";return c?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${u} ${o}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${o}${a}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[o.format]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${h(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function AE(){return{localeError:ED()}}var Po=e=>e.charAt(0).toUpperCase()+e.slice(1);function IE(e){let t=Math.abs(e),n=t%10,i=t%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}var xD=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(r,o,a,c){let u=e[r]??null;return u===null?u:{unit:u.unit[o],verb:u.verb[c][a?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${c}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${c}, o tik\u0117tasi - ${o}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${y(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${h(r.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[r.origin]??r.origin,a=t(r.origin,IE(Number(r.maximum)),r.inclusive??!1,"smaller");if(a?.verb)return`${Po(o??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.maximum.toString()} ${a.unit??"element\u0173"}`;let c=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Po(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${r.maximum.toString()} ${a?.unit}`}case"too_small":{let o=i[r.origin]??r.origin,a=t(r.origin,IE(Number(r.minimum)),r.inclusive??!1,"bigger");if(a?.verb)return`${Po(o??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.minimum.toString()} ${a.unit??"element\u0173"}`;let c=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Po(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${r.minimum.toString()} ${a?.unit}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${n[o.format]??r.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${h(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[r.origin]??r.origin;return`${Po(o??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function $E(){return{localeError:xD()}}var AD=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(r){return e[r]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${c}`:`\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 ${c}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${y(r.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${r.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${h(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function TE(){return{localeError:AD()}}var ID=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${c}`:`Input tidak sah: dijangka ${o}, diterima ${c}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${y(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: dijangka ${r.origin??"nilai"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: dijangka ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${n[o.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${h(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}};function RE(){return{localeError:ID()}}var $D=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(r){return e[r]??null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${c}`:`Ongeldige invoer: verwacht ${o}, ontving ${c}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${y(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),c=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return a?`Te ${c}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${c}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} is`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),c=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return a?`Te ${c}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${c}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} is`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${n[o.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}};function CE(){return{localeError:$D()}}var TD=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${c}`:`Ugyldig input: forventet ${o}, fikk ${c}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${y(r.values[0])}`:`Ugyldig valg: forventet en av ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${h(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}};function NE(){return{localeError:TD()}}var RD=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${c}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${c}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${y(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=r;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[o.format]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function PE(){return{localeError:RD()}}var CD=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${c} \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 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${y(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${h(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[o.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${h(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function wE(){return{localeError:CD()}}var ND=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(r){return e[r]??null}let n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${c}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${c}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${y(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[o.format]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function kE(){return{localeError:ND()}}var PD=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){return e[r]??null}let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${c}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${c}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${y(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${o}${r.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Muito pequeno: esperado que ${r.origin} tivesse ${o}${r.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${n[o.format]??r.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${h(r.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${r.origin}`;default:return"Campo inv\xE1lido"}}};function OE(){return{localeError:PD()}}var wD=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(r){return e[r]??null}let n={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},i={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${c}`}case"invalid_value":return r.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${y(r.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} s\u0103 fie ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Prea mic: a\u0219teptat ca ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${r.origin} s\u0103 fie ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${o.prefix}"`:o.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${o.suffix}"`:o.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${o.includes}"`:o.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${o.pattern}`:`Format invalid: ${n[o.format]??r.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${r.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${h(r.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${r.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${r.origin}`;default:return"Intrare invalid\u0103"}}};function DE(){return{localeError:wD()}}function ME(e,t,n,i){let r=Math.abs(e),o=r%10,a=r%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?n:i}var kD=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${c}`:`\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 ${c}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${y(r.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let c=Number(r.maximum),u=ME(c,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.maximum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let c=Number(r.minimum),u=ME(c,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${r.minimum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${h(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function jE(){return{localeError:kD()}}var OD=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}let n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${c}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${c}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${y(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${o}${r.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${o}${r.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${n[o.format]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${h(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}};function zE(){return{localeError:OD()}}var DD=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(r){return e[r]??null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${c}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${c}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${y(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${n[o.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${h(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function LE(){return{localeError:DD()}}var MD=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(r){return e[r]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${c}`:`\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 ${c}`}case"invalid_value":return r.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${y(r.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${h(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${o}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${h(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function UE(){return{localeError:MD()}}var jD=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(r){return e[r]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${c}`:`\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 ${c}`}case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${y(r.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[o.format]??r.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${r.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${h(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function FE(){return{localeError:jD()}}var zD=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(r){return e[r]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${c}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${c}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${y(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[o.format]??r.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${h(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function BE(){return{localeError:zD()}}var LD=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${c}`:`\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 ${c}`}case"invalid_value":return r.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${y(r.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${h(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${r.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function Hs(){return{localeError:LD()}}function VE(){return Hs()}var UD=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(r){return e[r]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${c} \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 ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${y(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${h(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${o}${r.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${o}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${r.keys.length>1?"\u0632":""}: ${h(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function GE(){return{localeError:UD()}}var FD=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(r){return e[r]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${c}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${c}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${y(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[o.format]??r.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${h(r.keys,", ")}`;case"invalid_key":return`${r.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${r.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function ZE(){return{localeError:FD()}}var BD=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(r){return e[r]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${y(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${n[o.format]??r.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${h(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function WE(){return{localeError:BD()}}var VD=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(r){return e[r]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${y(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${n[o.format]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${h(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function HE(){return{localeError:VD()}}var GD=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(r){return e[r]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${c}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${c}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${y(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${n[o.format]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${h(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function qE(){return{localeError:GD()}}var ZD=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(r){return e[r]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=S(r.input),c=i[a]??a;return/^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${c}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${c}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${y(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${h(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${a.verb} ${o}${r.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.maximum}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${a.verb} ${o}${r.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.minimum}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${n[o.format]??r.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${h(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function KE(){return{localeError:ZD()}}var YE,Kp=Symbol("ZodOutput"),Yp=Symbol("ZodInput"),qs=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let i={...this.get(n)??{}};delete i.id;let r={...i,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Ks(){return new qs}(YE=globalThis).__zod_globalRegistry??(YE.__zod_globalRegistry=Ks());var Ae=globalThis.__zod_globalRegistry;function Xp(e,t){return new e({type:"string",...E(t)})}function Jp(e,t){return new e({type:"string",coerce:!0,...E(t)})}function Ys(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...E(t)})}function ko(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...E(t)})}function Xs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...E(t)})}function Js(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...E(t)})}function Qs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...E(t)})}function ec(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...E(t)})}function Oo(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...E(t)})}function tc(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...E(t)})}function rc(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...E(t)})}function nc(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...E(t)})}function ic(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...E(t)})}function oc(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...E(t)})}function ac(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...E(t)})}function sc(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...E(t)})}function cc(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...E(t)})}function uc(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...E(t)})}function Qp(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...E(t)})}function lc(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...E(t)})}function dc(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...E(t)})}function mc(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...E(t)})}function pc(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...E(t)})}function fc(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...E(t)})}function gc(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...E(t)})}var ef={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function tf(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...E(t)})}function rf(e,t){return new e({type:"string",format:"date",check:"string_format",...E(t)})}function nf(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...E(t)})}function of(e,t){return new e({type:"string",format:"duration",check:"string_format",...E(t)})}function af(e,t){return new e({type:"number",checks:[],...E(t)})}function sf(e,t){return new e({type:"number",coerce:!0,checks:[],...E(t)})}function cf(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...E(t)})}function uf(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...E(t)})}function lf(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...E(t)})}function df(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...E(t)})}function mf(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...E(t)})}function pf(e,t){return new e({type:"boolean",...E(t)})}function ff(e,t){return new e({type:"boolean",coerce:!0,...E(t)})}function gf(e,t){return new e({type:"bigint",...E(t)})}function hf(e,t){return new e({type:"bigint",coerce:!0,...E(t)})}function vf(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...E(t)})}function bf(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...E(t)})}function yf(e,t){return new e({type:"symbol",...E(t)})}function Sf(e,t){return new e({type:"undefined",...E(t)})}function _f(e,t){return new e({type:"null",...E(t)})}function Ef(e){return new e({type:"any"})}function xf(e){return new e({type:"unknown"})}function Af(e,t){return new e({type:"never",...E(t)})}function If(e,t){return new e({type:"void",...E(t)})}function $f(e,t){return new e({type:"date",...E(t)})}function Tf(e,t){return new e({type:"date",coerce:!0,...E(t)})}function Rf(e,t){return new e({type:"nan",...E(t)})}function wt(e,t){return new Os({check:"less_than",...E(t),value:e,inclusive:!1})}function rt(e,t){return new Os({check:"less_than",...E(t),value:e,inclusive:!0})}function kt(e,t){return new Ds({check:"greater_than",...E(t),value:e,inclusive:!1})}function ze(e,t){return new Ds({check:"greater_than",...E(t),value:e,inclusive:!0})}function hc(e){return kt(0,e)}function vc(e){return wt(0,e)}function bc(e){return rt(0,e)}function yc(e){return ze(0,e)}function Rr(e,t){return new Sm({check:"multiple_of",...E(t),value:e})}function Cr(e,t){return new xm({check:"max_size",...E(t),maximum:e})}function Ot(e,t){return new Am({check:"min_size",...E(t),minimum:e})}function an(e,t){return new Im({check:"size_equals",...E(t),size:e})}function sn(e,t){return new $m({check:"max_length",...E(t),maximum:e})}function rr(e,t){return new Tm({check:"min_length",...E(t),minimum:e})}function cn(e,t){return new Rm({check:"length_equals",...E(t),length:e})}function Yn(e,t){return new Cm({check:"string_format",format:"regex",...E(t),pattern:e})}function Xn(e){return new Nm({check:"string_format",format:"lowercase",...E(e)})}function Jn(e){return new Pm({check:"string_format",format:"uppercase",...E(e)})}function Qn(e,t){return new wm({check:"string_format",format:"includes",...E(t),includes:e})}function ei(e,t){return new km({check:"string_format",format:"starts_with",...E(t),prefix:e})}function ti(e,t){return new Om({check:"string_format",format:"ends_with",...E(t),suffix:e})}function Sc(e,t,n){return new Dm({check:"property",property:e,schema:t,...E(n)})}function ri(e,t){return new Mm({check:"mime_type",mime:e,...E(t)})}function xt(e){return new jm({check:"overwrite",tx:e})}function ni(e){return xt(t=>t.normalize(e))}function ii(){return xt(e=>e.trim())}function oi(){return xt(e=>e.toLowerCase())}function ai(){return xt(e=>e.toUpperCase())}function si(){return xt(e=>kd(e))}function Cf(e,t,n){return new e({type:"array",element:t,...E(n)})}function HD(e,t,n){return new e({type:"union",options:t,...E(n)})}function qD(e,t,n){return new e({type:"union",options:t,inclusive:!1,...E(n)})}function KD(e,t,n,i){return new e({type:"union",options:n,discriminator:t,...E(i)})}function YD(e,t,n){return new e({type:"intersection",left:t,right:n})}function XD(e,t,n,i){let r=n instanceof w,o=r?i:n,a=r?n:null;return new e({type:"tuple",items:t,rest:a,...E(o)})}function JD(e,t,n,i){return new e({type:"record",keyType:t,valueType:n,...E(i)})}function QD(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...E(i)})}function eM(e,t,n){return new e({type:"set",valueType:t,...E(n)})}function tM(e,t,n){let i=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:i,...E(n)})}function rM(e,t,n){return new e({type:"enum",entries:t,...E(n)})}function nM(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...E(n)})}function Nf(e,t){return new e({type:"file",...E(t)})}function iM(e,t){return new e({type:"transform",transform:t})}function oM(e,t){return new e({type:"optional",innerType:t})}function aM(e,t){return new e({type:"nullable",innerType:t})}function sM(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():Dd(n)}})}function cM(e,t,n){return new e({type:"nonoptional",innerType:t,...E(n)})}function uM(e,t){return new e({type:"success",innerType:t})}function lM(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function dM(e,t,n){return new e({type:"pipe",in:t,out:n})}function mM(e,t){return new e({type:"readonly",innerType:t})}function pM(e,t,n){return new e({type:"template_literal",parts:t,...E(n)})}function fM(e,t){return new e({type:"lazy",getter:t})}function gM(e,t){return new e({type:"promise",innerType:t})}function Pf(e,t,n){let i=E(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function wf(e,t,n){return new e({type:"custom",check:"custom",fn:t,...E(n)})}function kf(e,t){let n=XE(i=>(i.addIssue=r=>{if(typeof r=="string")i.issues.push(Vn(r,i.value,n._zod.def));else{let o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=i.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),i.issues.push(Vn(o))}},e(i.value,i)),t);return n}function XE(e,t){let n=new J({check:"custom",...E(t)});return n._zod.check=e,n}function Of(e){let t=new J({check:"describe"});return t._zod.onattach=[n=>{let i=Ae.get(n)??{};Ae.add(n,{...i,description:e})}],t._zod.check=()=>{},t}function Df(e){let t=new J({check:"meta"});return t._zod.onattach=[n=>{let i=Ae.get(n)??{};Ae.add(n,{...i,...e})}],t._zod.check=()=>{},t}function Mf(e,t){let n=E(t),i=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(v=>typeof v=="string"?v.toLowerCase():v),r=r.map(v=>typeof v=="string"?v.toLowerCase():v));let o=new Set(i),a=new Set(r),c=e.Codec??No,u=e.Boolean??Ro,l=e.String??on,m=new l({type:"string",error:n.error}),p=new u({type:"boolean",error:n.error}),g=new c({type:"pipe",in:m,out:p,transform:((v,A)=>{let X=v;return n.case!=="sensitive"&&(X=X.toLowerCase()),o.has(X)?!0:a.has(X)?!1:(A.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:A.value,inst:g,continue:!1}),{})}),reverseTransform:((v,A)=>v===!0?i[0]||"true":r[0]||"false"),error:n.error});return g}function ci(e,t,n,i={}){let r=E(i),o={...E(i),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:c=>n.test(c),...r};return n instanceof RegExp&&(o.pattern=n),new e(o)}function Nr(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??Ae,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 G(e,t,n={path:[],schemaPath:[]}){var i;let r=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);let c=e._zod.toJSONSchema?.();if(c)a.schema=c;else{let m={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,m);else{let g=a.schema,v=t.processors[r.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);v(e,t,g,m)}let p=e._zod.parent;p&&(a.ref||(a.ref=p),G(p,t,m),t.seen.get(p).isParent=!0)}let u=t.metadataRegistry.get(e);return u&&Object.assign(a.schema,u),t.io==="input"&&Le(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function Pr(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let a of e.seen.entries()){let c=e.metadataRegistry.get(a[0])?.id;if(c){let u=i.get(c);if(u&&u!==a[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(c,a[0])}}let r=a=>{let c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(a[0])?.id,g=e.external.uri??(A=>A);if(p)return{ref:g(p)};let v=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=v,{defId:v,ref:`${g("__shared")}#/${c}/${v}`}}if(a[1]===n)return{ref:"#"};let l=`#/${c}/`,m=a[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:l+m}},o=a=>{if(a[1].schema.$ref)return;let c=a[1],{ref:u,defId:l}=r(a);c.def={...c.schema},l&&(c.defId=l);let m=c.schema;for(let p in m)delete m[p];m.$ref=u};if(e.cycles==="throw")for(let a of e.seen.entries()){let c=a[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
163
163
 
164
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let c=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(c.cycle){o(a);continue}if(c.count>1&&e.reused==="ref"){o(a);continue}}}function Nr(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=c=>{let u=e.seen.get(c);if(u.ref===null)return;let l=u.def??u.schema,m={...l},p=u.ref;if(u.ref=null,p){i(p);let v=e.seen.get(p),A=v.schema;if(A.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(A)):Object.assign(l,A),Object.assign(l,m),c._zod.parent===p)for(let z in l)z==="$ref"||z==="allOf"||z in m||delete l[z];if(A.$ref&&v.def)for(let z in l)z==="$ref"||z==="allOf"||z in v.def&&JSON.stringify(l[z])===JSON.stringify(v.def[z])&&delete l[z]}let g=c._zod.parent;if(g&&g!==p){i(g);let v=e.seen.get(g);if(v?.schema.$ref&&(l.$ref=v.schema.$ref,v.def))for(let A in l)A==="$ref"||A==="allOf"||A in v.def&&JSON.stringify(l[A])===JSON.stringify(v.def[A])&&delete l[A]}e.override({zodSchema:c,jsonSchema:l,path:u.path??[]})};for(let c of[...e.seen.entries()].reverse())i(c[0]);let r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(c)}Object.assign(r,n.def??n.schema);let o=e.metadataRegistry.get(t)?.id;o!==void 0&&r.id===o&&delete r.id;let a=e.external?.defs??{};for(let c of e.seen.entries()){let u=c[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,a[u.defId]=u.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?r.$defs=a:r.definitions=a);try{let c=JSON.parse(JSON.stringify(r));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:ni(t,"input",e.processors),output:ni(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function ze(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return ze(i.element,n);if(i.type==="set")return ze(i.valueType,n);if(i.type==="lazy")return ze(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return ze(i.innerType,n);if(i.type==="intersection")return ze(i.left,n)||ze(i.right,n);if(i.type==="record"||i.type==="map")return ze(i.keyType,n)||ze(i.valueType,n);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:ze(i.in,n)||ze(i.out,n);if(i.type==="object"){for(let r in i.shape)if(ze(i.shape[r],n))return!0;return!1}if(i.type==="union"){for(let r of i.options)if(ze(r,n))return!0;return!1}if(i.type==="tuple"){for(let r of i.items)if(ze(r,n))return!0;return!!(i.rest&&ze(i.rest,n))}return!1}var Rf=(e,t={})=>n=>{let i=Rr({...n,processors:t});return G(e,i),Pr(i,e),Nr(i,e)},ni=(e,t,n={})=>i=>{let{libraryOptions:r,target:o}=i??{},a=Rr({...r??{},target:o,io:t,processors:n});return G(e,a),Pr(a,e),Nr(a,e)};var WD={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Pf=(e,t,n,i)=>{let r=n;r.type="string";let{minimum:o,maximum:a,format:c,patterns:u,contentEncoding:l}=e._zod.bag;if(typeof o=="number"&&(r.minLength=o),typeof a=="number"&&(r.maxLength=a),c&&(r.format=WD[c]??c,r.format===""&&delete r.format,c==="time"&&delete r.format),l&&(r.contentEncoding=l),u&&u.size>0){let m=[...u];m.length===1?r.pattern=m[0].source:m.length>1&&(r.allOf=[...m.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Nf=(e,t,n,i)=>{let r=n,{minimum:o,maximum:a,format:c,multipleOf:u,exclusiveMaximum:l,exclusiveMinimum:m}=e._zod.bag;typeof c=="string"&&c.includes("int")?r.type="integer":r.type="number";let p=typeof m=="number"&&m>=(o??Number.NEGATIVE_INFINITY),g=typeof l=="number"&&l<=(a??Number.POSITIVE_INFINITY),v=t.target==="draft-04"||t.target==="openapi-3.0";p?v?(r.minimum=m,r.exclusiveMinimum=!0):r.exclusiveMinimum=m:typeof o=="number"&&(r.minimum=o),g?v?(r.maximum=l,r.exclusiveMaximum=!0):r.exclusiveMaximum=l:typeof a=="number"&&(r.maximum=a),typeof u=="number"&&(r.multipleOf=u)},wf=(e,t,n,i)=>{n.type="boolean"},kf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Of=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Df=(e,t,n,i)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Mf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},jf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},zf=(e,t,n,i)=>{n.not={}},Lf=(e,t,n,i)=>{},Uf=(e,t,n,i)=>{},Ff=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Bf=(e,t,n,i)=>{let r=e._zod.def,o=co(r.entries);o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),n.enum=o},Vf=(e,t,n,i)=>{let r=e._zod.def,o=[];for(let a of r.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){let a=o[0];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),o.every(a=>typeof a=="boolean")&&(n.type="boolean"),o.every(a=>a===null)&&(n.type="null"),n.enum=o},Gf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Zf=(e,t,n,i)=>{let r=n,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},Wf=(e,t,n,i)=>{let r=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:c,mime:u}=e._zod.bag;a!==void 0&&(o.minLength=a),c!==void 0&&(o.maxLength=c),u?u.length===1?(o.contentMediaType=u[0],Object.assign(r,o)):(Object.assign(r,o),r.anyOf=u.map(l=>({contentMediaType:l}))):Object.assign(r,o)},Hf=(e,t,n,i)=>{n.type="boolean"},qf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Kf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Yf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Xf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Jf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Qf=(e,t,n,i)=>{let r=n,o=e._zod.def,{minimum:a,maximum:c}=e._zod.bag;typeof a=="number"&&(r.minItems=a),typeof c=="number"&&(r.maxItems=c),r.type="array",r.items=G(o.element,t,{...i,path:[...i.path,"items"]})},eg=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object",r.properties={};let a=o.shape;for(let l in a)r.properties[l]=G(a[l],t,{...i,path:[...i.path,"properties",l]});let c=new Set(Object.keys(a)),u=new Set([...c].filter(l=>{let m=o.shape[l]._zod;return t.io==="input"?m.optin===void 0:m.optout===void 0}));u.size>0&&(r.required=Array.from(u)),o.catchall?._zod.def.type==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=G(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},hc=(e,t,n,i)=>{let r=e._zod.def,o=r.inclusive===!1,a=r.options.map((c,u)=>G(c,t,{...i,path:[...i.path,o?"oneOf":"anyOf",u]}));o?n.oneOf=a:n.anyOf=a},tg=(e,t,n,i)=>{let r=e._zod.def,o=G(r.left,t,{...i,path:[...i.path,"allOf",0]}),a=G(r.right,t,{...i,path:[...i.path,"allOf",1]}),c=l=>"allOf"in l&&Object.keys(l).length===1,u=[...c(o)?o.allOf:[o],...c(a)?a.allOf:[a]];n.allOf=u},rg=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",c=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",u=o.items.map((g,v)=>G(g,t,{...i,path:[...i.path,a,v]})),l=o.rest?G(o.rest,t,{...i,path:[...i.path,c,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=u,l&&(r.items=l)):t.target==="openapi-3.0"?(r.items={anyOf:u},l&&r.items.anyOf.push(l),r.minItems=u.length,l||(r.maxItems=u.length)):(r.items=u,l&&(r.additionalItems=l));let{minimum:m,maximum:p}=e._zod.bag;typeof m=="number"&&(r.minItems=m),typeof p=="number"&&(r.maxItems=p)},ng=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object";let a=o.keyType,u=a._zod.bag?.patterns;if(o.mode==="loose"&&u&&u.size>0){let m=G(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(let p of u)r.patternProperties[p.source]=m}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=G(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),r.additionalProperties=G(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let l=a._zod.values;if(l){let m=[...l].filter(p=>typeof p=="string"||typeof p=="number");m.length>0&&(r.required=m)}},ig=(e,t,n,i)=>{let r=e._zod.def,o=G(r.innerType,t,i),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=r.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},og=(e,t,n,i)=>{let r=e._zod.def;G(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},ag=(e,t,n,i)=>{let r=e._zod.def;G(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},sg=(e,t,n,i)=>{let r=e._zod.def;G(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},cg=(e,t,n,i)=>{let r=e._zod.def;G(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType;let a;try{a=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},ug=(e,t,n,i)=>{let r=e._zod.def,o=r.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?o?r.out:r.in:r.out;G(a,t,i);let c=t.seen.get(e);c.ref=a},lg=(e,t,n,i)=>{let r=e._zod.def;G(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.readOnly=!0},dg=(e,t,n,i)=>{let r=e._zod.def;G(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},vc=(e,t,n,i)=>{let r=e._zod.def;G(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},mg=(e,t,n,i)=>{let r=e._zod.innerType;G(r,t,i);let o=t.seen.get(e);o.ref=r},gc={string:Pf,number:Nf,boolean:wf,bigint:kf,symbol:Of,null:Df,undefined:Mf,void:jf,never:zf,any:Lf,unknown:Uf,date:Ff,enum:Bf,literal:Vf,nan:Gf,template_literal:Zf,file:Wf,success:Hf,custom:qf,function:Kf,transform:Yf,map:Xf,set:Jf,array:Qf,object:eg,union:hc,intersection:tg,tuple:rg,record:ng,nullable:ig,nonoptional:og,default:ag,prefault:sg,catch:cg,pipe:ug,readonly:lg,promise:dg,optional:vc,lazy:mg};function bc(e,t){if("_idmap"in e){let i=e,r=Rr({...t,processors:gc}),o={};for(let u of i._idmap.entries()){let[l,m]=u;G(m,r)}let a={},c={registry:i,uri:t?.uri,defs:o};r.external=c;for(let u of i._idmap.entries()){let[l,m]=u;Pr(r,m),a[l]=Nr(r,m)}if(Object.keys(o).length>0){let u=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[u]:o}}return{schemas:a}}let n=Rr({...t,processors:gc});return G(e,n),Pr(n,e),Nr(n,e)}var yc=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=Rr({processors:gc,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return G(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),Pr(this.ctx,t);let i=Nr(this.ctx,t),{"~standard":r,...o}=i;return o}};var ME={};var To={};Pt(To,{ZodAny:()=>Mg,ZodArray:()=>Ug,ZodBase64:()=>Uc,ZodBase64URL:()=>Fc,ZodBigInt:()=>di,ZodBigIntFormat:()=>Gc,ZodBoolean:()=>li,ZodCIDRv4:()=>zc,ZodCIDRv6:()=>Lc,ZodCUID:()=>Nc,ZodCUID2:()=>wc,ZodCatch:()=>ch,ZodCodec:()=>Lo,ZodCustom:()=>Uo,ZodCustomStringFormat:()=>ci,ZodDate:()=>Oo,ZodDefault:()=>rh,ZodDiscriminatedUnion:()=>Bg,ZodE164:()=>Bc,ZodEmail:()=>Cc,ZodEmoji:()=>Rc,ZodEnum:()=>ai,ZodExactOptional:()=>Qg,ZodFile:()=>Xg,ZodFunction:()=>bh,ZodGUID:()=>Ro,ZodIPv4:()=>Mc,ZodIPv6:()=>jc,ZodIntersection:()=>Vg,ZodJWT:()=>Vc,ZodKSUID:()=>Dc,ZodLazy:()=>gh,ZodLiteral:()=>Yg,ZodMAC:()=>Rg,ZodMap:()=>qg,ZodNaN:()=>lh,ZodNanoID:()=>Pc,ZodNever:()=>zg,ZodNonOptional:()=>Yc,ZodNull:()=>Og,ZodNullable:()=>th,ZodNumber:()=>ui,ZodNumberFormat:()=>an,ZodObject:()=>Mo,ZodOptional:()=>Kc,ZodPipe:()=>zo,ZodPrefault:()=>ih,ZodPreprocess:()=>dh,ZodPromise:()=>vh,ZodReadonly:()=>mh,ZodRecord:()=>oi,ZodSet:()=>Kg,ZodString:()=>si,ZodStringFormat:()=>Y,ZodSuccess:()=>sh,ZodSymbol:()=>wg,ZodTemplateLiteral:()=>fh,ZodTransform:()=>Jg,ZodTuple:()=>Zg,ZodType:()=>k,ZodULID:()=>kc,ZodURL:()=>ko,ZodUUID:()=>Dt,ZodUndefined:()=>kg,ZodUnion:()=>jo,ZodUnknown:()=>jg,ZodVoid:()=>Lg,ZodXID:()=>Oc,ZodXor:()=>Fg,_ZodString:()=>Tc,_default:()=>nh,_function:()=>Zx,any:()=>Ex,array:()=>Do,base64:()=>ox,base64url:()=>ax,bigint:()=>vx,boolean:()=>Ng,catch:()=>uh,check:()=>Wx,cidrv4:()=>nx,cidrv6:()=>ix,codec:()=>Fx,cuid:()=>KE,cuid2:()=>YE,custom:()=>Hx,date:()=>Ax,describe:()=>qx,discriminatedUnion:()=>Px,e164:()=>sx,email:()=>LE,emoji:()=>HE,enum:()=>Hc,exactOptional:()=>eh,file:()=>jx,float32:()=>px,float64:()=>fx,function:()=>Zx,guid:()=>UE,hash:()=>mx,hex:()=>dx,hostname:()=>lx,httpUrl:()=>WE,instanceof:()=>Yx,int:()=>Ic,int32:()=>gx,int64:()=>bx,intersection:()=>Gg,invertCodec:()=>Bx,ipv4:()=>ex,ipv6:()=>rx,json:()=>Jx,jwt:()=>cx,keyof:()=>Ix,ksuid:()=>QE,lazy:()=>hh,literal:()=>Mx,looseObject:()=>Cx,looseRecord:()=>wx,mac:()=>tx,map:()=>kx,meta:()=>Kx,nan:()=>Ux,nanoid:()=>qE,nativeEnum:()=>Dx,never:()=>Zc,nonoptional:()=>ah,null:()=>Dg,nullable:()=>No,nullish:()=>zx,number:()=>Pg,object:()=>$x,optional:()=>Po,partialRecord:()=>Nx,pipe:()=>$c,prefault:()=>oh,preprocess:()=>Qx,promise:()=>Gx,readonly:()=>ph,record:()=>Hg,refine:()=>yh,set:()=>Ox,strictObject:()=>Tx,string:()=>Co,stringFormat:()=>ux,stringbool:()=>Xx,success:()=>Lx,superRefine:()=>Sh,symbol:()=>Sx,templateLiteral:()=>Vx,transform:()=>qc,tuple:()=>Wg,uint32:()=>hx,uint64:()=>yx,ulid:()=>XE,undefined:()=>_x,union:()=>Wc,unknown:()=>on,url:()=>ZE,uuid:()=>FE,uuidv4:()=>BE,uuidv6:()=>VE,uuidv7:()=>GE,void:()=>xx,xid:()=>JE,xor:()=>Rx});var Sc={};Pt(Sc,{endsWith:()=>Kn,gt:()=>kt,gte:()=>je,includes:()=>Hn,length:()=>nn,lowercase:()=>Zn,lt:()=>wt,lte:()=>tt,maxLength:()=>rn,maxSize:()=>Cr,mime:()=>Yn,minLength:()=>tr,minSize:()=>Ot,multipleOf:()=>Tr,negative:()=>dc,nonnegative:()=>pc,nonpositive:()=>mc,normalize:()=>Xn,overwrite:()=>xt,positive:()=>lc,property:()=>fc,regex:()=>Gn,size:()=>tn,slugify:()=>ti,startsWith:()=>qn,toLowerCase:()=>Qn,toUpperCase:()=>ei,trim:()=>Jn,uppercase:()=>Wn});var ii={};Pt(ii,{ZodISODate:()=>Ec,ZodISODateTime:()=>_c,ZodISODuration:()=>Ac,ZodISOTime:()=>xc,date:()=>fg,datetime:()=>pg,duration:()=>hg,time:()=>gg});var _c=f("ZodISODateTime",(e,t)=>{Vm.init(e,t),Y.init(e,t)});function pg(e){return Hp(_c,e)}var Ec=f("ZodISODate",(e,t)=>{Gm.init(e,t),Y.init(e,t)});function fg(e){return qp(Ec,e)}var xc=f("ZodISOTime",(e,t)=>{Zm.init(e,t),Y.init(e,t)});function gg(e){return Kp(xc,e)}var Ac=f("ZodISODuration",(e,t)=>{Wm.init(e,t),Y.init(e,t)});function hg(e){return Yp(Ac,e)}var jE=(e,t)=>{fo.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>ho(e,n)},flatten:{value:n=>go(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Dn,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Dn,2)}},isEmpty:{get(){return e.issues.length===0}}})},qD=f("ZodError",jE),We=f("ZodError",jE,{Parent:Error});var vg=zn(We),bg=Ln(We),yg=Un(We),Sg=Fn(We),_g=bs(We),Eg=ys(We),xg=Ss(We),Ag=_s(We),Ig=Es(We),$g=xs(We),Tg=As(We),Cg=Is(We);var zE=new WeakMap;function wo(e,t,n){let i=Object.getPrototypeOf(e),r=zE.get(i);if(r||(r=new Set,zE.set(i,r)),!r.has(t)){r.add(t);for(let o in n){let a=n[o];Object.defineProperty(i,o,{configurable:!0,enumerable:!1,get(){let c=a.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:c}),c},set(c){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:c})}})}}}var k=f("ZodType",(e,t)=>(w.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:ni(e,"input"),output:ni(e,"output")}}),e.toJSONSchema=Rf(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,i)=>vg(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>yg(e,n,i),e.parseAsync=async(n,i)=>bg(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>Sg(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>_g(e,n,i),e.decode=(n,i)=>Eg(e,n,i),e.encodeAsync=async(n,i)=>xg(e,n,i),e.decodeAsync=async(n,i)=>Ag(e,n,i),e.safeEncode=(n,i)=>Ig(e,n,i),e.safeDecode=(n,i)=>$g(e,n,i),e.safeEncodeAsync=async(n,i)=>Tg(e,n,i),e.safeDecodeAsync=async(n,i)=>Cg(e,n,i),wo(e,"ZodType",{check(...n){let i=this.def;return this.clone(_.mergeDefs(i,{checks:[...i.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,i){return De(this,n,i)},brand(){return this},register(n,i){return n.add(this,i),this},refine(n,i){return this.check(yh(n,i))},superRefine(n,i){return this.check(Sh(n,i))},overwrite(n){return this.check(xt(n))},optional(){return Po(this)},exactOptional(){return eh(this)},nullable(){return No(this)},nullish(){return Po(No(this))},nonoptional(n){return ah(this,n)},array(){return Do(this)},or(n){return Wc([this,n])},and(n){return Gg(this,n)},transform(n){return $c(this,qc(n))},default(n){return nh(this,n)},prefault(n){return oh(this,n)},catch(n){return uh(this,n)},pipe(n){return $c(this,n)},readonly(){return ph(this)},describe(n){let i=this.clone();return Ae.add(i,{description:n}),i},meta(...n){if(n.length===0)return Ae.get(this);let i=this.clone();return Ae.add(i,n[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Ae.get(e)?.description},configurable:!0}),e)),Tc=f("_ZodString",(e,t)=>{en.init(e,t),k.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Pf(e,i,r,o);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,wo(e,"_ZodString",{regex(...i){return this.check(Gn(...i))},includes(...i){return this.check(Hn(...i))},startsWith(...i){return this.check(qn(...i))},endsWith(...i){return this.check(Kn(...i))},min(...i){return this.check(tr(...i))},max(...i){return this.check(rn(...i))},length(...i){return this.check(nn(...i))},nonempty(...i){return this.check(tr(1,...i))},lowercase(i){return this.check(Zn(i))},uppercase(i){return this.check(Wn(i))},trim(){return this.check(Jn())},normalize(...i){return this.check(Xn(...i))},toLowerCase(){return this.check(Qn())},toUpperCase(){return this.check(ei())},slugify(){return this.check(ti())}})}),si=f("ZodString",(e,t)=>{en.init(e,t),Tc.init(e,t),e.email=n=>e.check(Gs(Cc,n)),e.url=n=>e.check($o(ko,n)),e.jwt=n=>e.check(uc(Vc,n)),e.emoji=n=>e.check(Ks(Rc,n)),e.guid=n=>e.check(Io(Ro,n)),e.uuid=n=>e.check(Zs(Dt,n)),e.uuidv4=n=>e.check(Ws(Dt,n)),e.uuidv6=n=>e.check(Hs(Dt,n)),e.uuidv7=n=>e.check(qs(Dt,n)),e.nanoid=n=>e.check(Ys(Pc,n)),e.guid=n=>e.check(Io(Ro,n)),e.cuid=n=>e.check(Xs(Nc,n)),e.cuid2=n=>e.check(Js(wc,n)),e.ulid=n=>e.check(Qs(kc,n)),e.base64=n=>e.check(ac(Uc,n)),e.base64url=n=>e.check(sc(Fc,n)),e.xid=n=>e.check(ec(Oc,n)),e.ksuid=n=>e.check(tc(Dc,n)),e.ipv4=n=>e.check(rc(Mc,n)),e.ipv6=n=>e.check(nc(jc,n)),e.cidrv4=n=>e.check(ic(zc,n)),e.cidrv6=n=>e.check(oc(Lc,n)),e.e164=n=>e.check(cc(Bc,n)),e.datetime=n=>e.check(pg(n)),e.date=n=>e.check(fg(n)),e.time=n=>e.check(gg(n)),e.duration=n=>e.check(hg(n))});function Co(e){return Vp(si,e)}var Y=f("ZodStringFormat",(e,t)=>{K.init(e,t),Tc.init(e,t)}),Cc=f("ZodEmail",(e,t)=>{Om.init(e,t),Y.init(e,t)});function LE(e){return Gs(Cc,e)}var Ro=f("ZodGUID",(e,t)=>{wm.init(e,t),Y.init(e,t)});function UE(e){return Io(Ro,e)}var Dt=f("ZodUUID",(e,t)=>{km.init(e,t),Y.init(e,t)});function FE(e){return Zs(Dt,e)}function BE(e){return Ws(Dt,e)}function VE(e){return Hs(Dt,e)}function GE(e){return qs(Dt,e)}var ko=f("ZodURL",(e,t)=>{Dm.init(e,t),Y.init(e,t)});function ZE(e){return $o(ko,e)}function WE(e){return $o(ko,{protocol:et.httpProtocol,hostname:et.domain,..._.normalizeParams(e)})}var Rc=f("ZodEmoji",(e,t)=>{Mm.init(e,t),Y.init(e,t)});function HE(e){return Ks(Rc,e)}var Pc=f("ZodNanoID",(e,t)=>{jm.init(e,t),Y.init(e,t)});function qE(e){return Ys(Pc,e)}var Nc=f("ZodCUID",(e,t)=>{zm.init(e,t),Y.init(e,t)});function KE(e){return Xs(Nc,e)}var wc=f("ZodCUID2",(e,t)=>{Lm.init(e,t),Y.init(e,t)});function YE(e){return Js(wc,e)}var kc=f("ZodULID",(e,t)=>{Um.init(e,t),Y.init(e,t)});function XE(e){return Qs(kc,e)}var Oc=f("ZodXID",(e,t)=>{Fm.init(e,t),Y.init(e,t)});function JE(e){return ec(Oc,e)}var Dc=f("ZodKSUID",(e,t)=>{Bm.init(e,t),Y.init(e,t)});function QE(e){return tc(Dc,e)}var Mc=f("ZodIPv4",(e,t)=>{Hm.init(e,t),Y.init(e,t)});function ex(e){return rc(Mc,e)}var Rg=f("ZodMAC",(e,t)=>{Km.init(e,t),Y.init(e,t)});function tx(e){return Zp(Rg,e)}var jc=f("ZodIPv6",(e,t)=>{qm.init(e,t),Y.init(e,t)});function rx(e){return nc(jc,e)}var zc=f("ZodCIDRv4",(e,t)=>{Ym.init(e,t),Y.init(e,t)});function nx(e){return ic(zc,e)}var Lc=f("ZodCIDRv6",(e,t)=>{Xm.init(e,t),Y.init(e,t)});function ix(e){return oc(Lc,e)}var Uc=f("ZodBase64",(e,t)=>{Qm.init(e,t),Y.init(e,t)});function ox(e){return ac(Uc,e)}var Fc=f("ZodBase64URL",(e,t)=>{ep.init(e,t),Y.init(e,t)});function ax(e){return sc(Fc,e)}var Bc=f("ZodE164",(e,t)=>{tp.init(e,t),Y.init(e,t)});function sx(e){return cc(Bc,e)}var Vc=f("ZodJWT",(e,t)=>{rp.init(e,t),Y.init(e,t)});function cx(e){return uc(Vc,e)}var ci=f("ZodCustomStringFormat",(e,t)=>{np.init(e,t),Y.init(e,t)});function ux(e,t,n={}){return ri(ci,e,t,n)}function lx(e){return ri(ci,"hostname",et.hostname,e)}function dx(e){return ri(ci,"hex",et.hex,e)}function mx(e,t){let n=t?.enc??"hex",i=`${e}_${n}`,r=et[i];if(!r)throw new Error(`Unrecognized hash format: ${i}`);return ri(ci,i,r,t)}var ui=f("ZodNumber",(e,t)=>{Os.init(e,t),k.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Nf(e,i,r,o),wo(e,"ZodNumber",{gt(i,r){return this.check(kt(i,r))},gte(i,r){return this.check(je(i,r))},min(i,r){return this.check(je(i,r))},lt(i,r){return this.check(wt(i,r))},lte(i,r){return this.check(tt(i,r))},max(i,r){return this.check(tt(i,r))},int(i){return this.check(Ic(i))},safe(i){return this.check(Ic(i))},positive(i){return this.check(kt(0,i))},nonnegative(i){return this.check(je(0,i))},negative(i){return this.check(wt(0,i))},nonpositive(i){return this.check(tt(0,i))},multipleOf(i,r){return this.check(Tr(i,r))},step(i,r){return this.check(Tr(i,r))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Pg(e){return Xp(ui,e)}var an=f("ZodNumberFormat",(e,t)=>{ip.init(e,t),ui.init(e,t)});function Ic(e){return Qp(an,e)}function px(e){return ef(an,e)}function fx(e){return tf(an,e)}function gx(e){return rf(an,e)}function hx(e){return nf(an,e)}var li=f("ZodBoolean",(e,t)=>{So.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>wf(e,n,i,r)});function Ng(e){return of(li,e)}var di=f("ZodBigInt",(e,t)=>{Ds.init(e,t),k.init(e,t),e._zod.processJSONSchema=(i,r,o)=>kf(e,i,r,o),e.gte=(i,r)=>e.check(je(i,r)),e.min=(i,r)=>e.check(je(i,r)),e.gt=(i,r)=>e.check(kt(i,r)),e.gte=(i,r)=>e.check(je(i,r)),e.min=(i,r)=>e.check(je(i,r)),e.lt=(i,r)=>e.check(wt(i,r)),e.lte=(i,r)=>e.check(tt(i,r)),e.max=(i,r)=>e.check(tt(i,r)),e.positive=i=>e.check(kt(BigInt(0),i)),e.negative=i=>e.check(wt(BigInt(0),i)),e.nonpositive=i=>e.check(tt(BigInt(0),i)),e.nonnegative=i=>e.check(je(BigInt(0),i)),e.multipleOf=(i,r)=>e.check(Tr(i,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function vx(e){return sf(di,e)}var Gc=f("ZodBigIntFormat",(e,t)=>{op.init(e,t),di.init(e,t)});function bx(e){return uf(Gc,e)}function yx(e){return lf(Gc,e)}var wg=f("ZodSymbol",(e,t)=>{ap.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Of(e,n,i,r)});function Sx(e){return df(wg,e)}var kg=f("ZodUndefined",(e,t)=>{sp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Mf(e,n,i,r)});function _x(e){return mf(kg,e)}var Og=f("ZodNull",(e,t)=>{cp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Df(e,n,i,r)});function Dg(e){return pf(Og,e)}var Mg=f("ZodAny",(e,t)=>{up.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Lf(e,n,i,r)});function Ex(){return ff(Mg)}var jg=f("ZodUnknown",(e,t)=>{lp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Uf(e,n,i,r)});function on(){return gf(jg)}var zg=f("ZodNever",(e,t)=>{dp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>zf(e,n,i,r)});function Zc(e){return hf(zg,e)}var Lg=f("ZodVoid",(e,t)=>{mp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>jf(e,n,i,r)});function xx(e){return vf(Lg,e)}var Oo=f("ZodDate",(e,t)=>{pp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Ff(e,i,r,o),e.min=(i,r)=>e.check(je(i,r)),e.max=(i,r)=>e.check(tt(i,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Ax(e){return bf(Oo,e)}var Ug=f("ZodArray",(e,t)=>{fp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Qf(e,n,i,r),e.element=t.element,wo(e,"ZodArray",{min(n,i){return this.check(tr(n,i))},nonempty(n){return this.check(tr(1,n))},max(n,i){return this.check(rn(n,i))},length(n,i){return this.check(nn(n,i))},unwrap(){return this.element}})});function Do(e,t){return _f(Ug,e,t)}function Ix(e){let t=e._zod.def.shape;return Hc(Object.keys(t))}var Mo=f("ZodObject",(e,t)=>{gp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>eg(e,n,i,r),_.defineLazy(e,"shape",()=>t.shape),wo(e,"ZodObject",{keyof(){return Hc(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:on()})},loose(){return this.clone({...this._zod.def,catchall:on()})},strict(){return this.clone({...this._zod.def,catchall:Zc()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return _.extend(this,n)},safeExtend(n){return _.safeExtend(this,n)},merge(n){return _.merge(this,n)},pick(n){return _.pick(this,n)},omit(n){return _.omit(this,n)},partial(...n){return _.partial(Kc,this,n[0])},required(...n){return _.required(Yc,this,n[0])}})});function $x(e,t){let n={type:"object",shape:e??{},..._.normalizeParams(t)};return new Mo(n)}function Tx(e,t){return new Mo({type:"object",shape:e,catchall:Zc(),..._.normalizeParams(t)})}function Cx(e,t){return new Mo({type:"object",shape:e,catchall:on(),..._.normalizeParams(t)})}var jo=f("ZodUnion",(e,t)=>{_o.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>hc(e,n,i,r),e.options=t.options});function Wc(e,t){return new jo({type:"union",options:e,..._.normalizeParams(t)})}var Fg=f("ZodXor",(e,t)=>{jo.init(e,t),hp.init(e,t),e._zod.processJSONSchema=(n,i,r)=>hc(e,n,i,r),e.options=t.options});function Rx(e,t){return new Fg({type:"union",options:e,inclusive:!1,..._.normalizeParams(t)})}var Bg=f("ZodDiscriminatedUnion",(e,t)=>{jo.init(e,t),vp.init(e,t)});function Px(e,t,n){return new Bg({type:"union",options:t,discriminator:e,..._.normalizeParams(n)})}var Vg=f("ZodIntersection",(e,t)=>{bp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>tg(e,n,i,r)});function Gg(e,t){return new Vg({type:"intersection",left:e,right:t})}var Zg=f("ZodTuple",(e,t)=>{Ms.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>rg(e,n,i,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});function Wg(e,t,n){let i=t instanceof w,r=i?n:t,o=i?t:null;return new Zg({type:"tuple",items:e,rest:o,..._.normalizeParams(r)})}var oi=f("ZodRecord",(e,t)=>{yp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ng(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType});function Hg(e,t,n){return!t||!t._zod?new oi({type:"record",keyType:Co(),valueType:e,..._.normalizeParams(t)}):new oi({type:"record",keyType:e,valueType:t,..._.normalizeParams(n)})}function Nx(e,t,n){let i=De(e);return i._zod.values=void 0,new oi({type:"record",keyType:i,valueType:t,..._.normalizeParams(n)})}function wx(e,t,n){return new oi({type:"record",keyType:e,valueType:t,mode:"loose",..._.normalizeParams(n)})}var qg=f("ZodMap",(e,t)=>{Sp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Xf(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Ot(...n)),e.nonempty=n=>e.check(Ot(1,n)),e.max=(...n)=>e.check(Cr(...n)),e.size=(...n)=>e.check(tn(...n))});function kx(e,t,n){return new qg({type:"map",keyType:e,valueType:t,..._.normalizeParams(n)})}var Kg=f("ZodSet",(e,t)=>{_p.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Jf(e,n,i,r),e.min=(...n)=>e.check(Ot(...n)),e.nonempty=n=>e.check(Ot(1,n)),e.max=(...n)=>e.check(Cr(...n)),e.size=(...n)=>e.check(tn(...n))});function Ox(e,t){return new Kg({type:"set",valueType:e,..._.normalizeParams(t)})}var ai=f("ZodEnum",(e,t)=>{Ep.init(e,t),k.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Bf(e,i,r,o),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(i,r)=>{let o={};for(let a of i)if(n.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new ai({...t,checks:[],..._.normalizeParams(r),entries:o})},e.exclude=(i,r)=>{let o={...t.entries};for(let a of i)if(n.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new ai({...t,checks:[],..._.normalizeParams(r),entries:o})}});function Hc(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new ai({type:"enum",entries:n,..._.normalizeParams(t)})}function Dx(e,t){return new ai({type:"enum",entries:e,..._.normalizeParams(t)})}var Yg=f("ZodLiteral",(e,t)=>{xp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Vf(e,n,i,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Mx(e,t){return new Yg({type:"literal",values:Array.isArray(e)?e:[e],..._.normalizeParams(t)})}var Xg=f("ZodFile",(e,t)=>{Ap.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Wf(e,n,i,r),e.min=(n,i)=>e.check(Ot(n,i)),e.max=(n,i)=>e.check(Cr(n,i)),e.mime=(n,i)=>e.check(Yn(Array.isArray(n)?n:[n],i))});function jx(e){return Ef(Xg,e)}var Jg=f("ZodTransform",(e,t)=>{Ip.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Yf(e,n,i,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new Er(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(_.issue(o,n.value,t));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(_.issue(a))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(o=>(n.value=o,n.fallback=!0,n)):(n.value=r,n.fallback=!0,n)}});function qc(e){return new Jg({type:"transform",transform:e})}var Kc=f("ZodOptional",(e,t)=>{js.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>vc(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Po(e){return new Kc({type:"optional",innerType:e})}var Qg=f("ZodExactOptional",(e,t)=>{$p.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>vc(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function eh(e){return new Qg({type:"optional",innerType:e})}var th=f("ZodNullable",(e,t)=>{Tp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ig(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function No(e){return new th({type:"nullable",innerType:e})}function zx(e){return Po(No(e))}var rh=f("ZodDefault",(e,t)=>{Cp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ag(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function nh(e,t){return new rh({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():_.shallowClone(t)}})}var ih=f("ZodPrefault",(e,t)=>{Rp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>sg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function oh(e,t){return new ih({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():_.shallowClone(t)}})}var Yc=f("ZodNonOptional",(e,t)=>{Pp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>og(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function ah(e,t){return new Yc({type:"nonoptional",innerType:e,..._.normalizeParams(t)})}var sh=f("ZodSuccess",(e,t)=>{Np.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Hf(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Lx(e){return new sh({type:"success",innerType:e})}var ch=f("ZodCatch",(e,t)=>{wp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>cg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function uh(e,t){return new ch({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var lh=f("ZodNaN",(e,t)=>{kp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Gf(e,n,i,r)});function Ux(e){return Sf(lh,e)}var zo=f("ZodPipe",(e,t)=>{zs.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ug(e,n,i,r),e.in=t.in,e.out=t.out});function $c(e,t){return new zo({type:"pipe",in:e,out:t})}var Lo=f("ZodCodec",(e,t)=>{zo.init(e,t),Eo.init(e,t)});function Fx(e,t,n){return new Lo({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function Bx(e){let t=e._zod.def;return new Lo({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var dh=f("ZodPreprocess",(e,t)=>{zo.init(e,t),Op.init(e,t)}),mh=f("ZodReadonly",(e,t)=>{Dp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>lg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function ph(e){return new mh({type:"readonly",innerType:e})}var fh=f("ZodTemplateLiteral",(e,t)=>{Mp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Zf(e,n,i,r)});function Vx(e,t){return new fh({type:"template_literal",parts:e,..._.normalizeParams(t)})}var gh=f("ZodLazy",(e,t)=>{Lp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>mg(e,n,i,r),e.unwrap=()=>e._zod.def.getter()});function hh(e){return new gh({type:"lazy",getter:e})}var vh=f("ZodPromise",(e,t)=>{zp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>dg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Gx(e){return new vh({type:"promise",innerType:e})}var bh=f("ZodFunction",(e,t)=>{jp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Kf(e,n,i,r)});function Zx(e){return new bh({type:"function",input:Array.isArray(e?.input)?Wg(e?.input):e?.input??Do(on()),output:e?.output??on()})}var Uo=f("ZodCustom",(e,t)=>{Up.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>qf(e,n,i,r)});function Wx(e){let t=new J({check:"custom"});return t._zod.check=e,t}function Hx(e,t){return xf(Uo,e??(()=>!0),t)}function yh(e,t={}){return Af(Uo,e,t)}function Sh(e,t){return If(e,t)}var qx=$f,Kx=Tf;function Yx(e,t={}){let n=new Uo({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,..._.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:n,path:[...n._zod.def.path??[]]})},n}var Xx=(...e)=>Cf({Codec:Lo,Boolean:li,String:si},...e);function Jx(e){let t=hh(()=>Wc([Co(e),Pg(),Ng(),Dg(),Do(t),Hg(Co(),t)]));return t}function Qx(e,t){return new dh({type:"pipe",in:qc(e),out:t})}var YD={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 XD(e){ue({customError:e})}function JD(){return ue().customError}var _h;_h||(_h={});var x={...To,...Sc,iso:ii},QD=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 eM(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function tM(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===i){let r=n[1];if(!r||!t.defs[r])throw new Error(`Reference not found: ${e}`);return t.defs[r]}throw new Error(`Reference not found: ${e}`)}function eA(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return x.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return x.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let o=tM(r,t),a=Ce(o,t);return t.refs.set(r,a),t.processing.delete(r),a}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return x.null();if(r.length===0)return x.never();if(r.length===1)return x.literal(r[0]);if(r.every(a=>typeof a=="string"))return x.enum(r);let o=r.map(a=>x.literal(a));return o.length<2?o[0]:x.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return x.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(o=>{let a={...e,type:o};return eA(a,t)});return r.length===0?x.never():r.length===1?r[0]:x.union(r)}if(!n)return x.any();let i;switch(n){case"string":{let r=x.string();if(e.format){let o=e.format;o==="email"?r=r.check(x.email()):o==="uri"||o==="uri-reference"?r=r.check(x.url()):o==="uuid"||o==="guid"?r=r.check(x.uuid()):o==="date-time"?r=r.check(x.iso.datetime()):o==="date"?r=r.check(x.iso.date()):o==="time"?r=r.check(x.iso.time()):o==="duration"?r=r.check(x.iso.duration()):o==="ipv4"?r=r.check(x.ipv4()):o==="ipv6"?r=r.check(x.ipv6()):o==="mac"?r=r.check(x.mac()):o==="cidr"?r=r.check(x.cidrv4()):o==="cidr-v6"?r=r.check(x.cidrv6()):o==="base64"?r=r.check(x.base64()):o==="base64url"?r=r.check(x.base64url()):o==="e164"?r=r.check(x.e164()):o==="jwt"?r=r.check(x.jwt()):o==="emoji"?r=r.check(x.emoji()):o==="nanoid"?r=r.check(x.nanoid()):o==="cuid"?r=r.check(x.cuid()):o==="cuid2"?r=r.check(x.cuid2()):o==="ulid"?r=r.check(x.ulid()):o==="xid"?r=r.check(x.xid()):o==="ksuid"&&(r=r.check(x.ksuid()))}typeof e.minLength=="number"&&(r=r.min(e.minLength)),typeof e.maxLength=="number"&&(r=r.max(e.maxLength)),e.pattern&&(r=r.regex(new RegExp(e.pattern))),i=r;break}case"number":case"integer":{let r=n==="integer"?x.number().int():x.number();typeof e.minimum=="number"&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&(r=r.max(e.maximum)),typeof e.exclusiveMinimum=="number"?r=r.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),i=r;break}case"boolean":{i=x.boolean();break}case"null":{i=x.null();break}case"object":{let r={},o=e.properties||{},a=new Set(e.required||[]);for(let[u,l]of Object.entries(o)){let m=Ce(l,t);r[u]=a.has(u)?m:m.optional()}if(e.propertyNames){let u=Ce(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?Ce(e.additionalProperties,t):x.any();if(Object.keys(r).length===0){i=x.record(u,l);break}let m=x.object(r).passthrough(),p=x.looseRecord(u,l);i=x.intersection(m,p);break}if(e.patternProperties){let u=e.patternProperties,l=Object.keys(u),m=[];for(let g of l){let v=Ce(u[g],t),A=x.string().regex(new RegExp(g));m.push(x.looseRecord(A,v))}let p=[];if(Object.keys(r).length>0&&p.push(x.object(r).passthrough()),p.push(...m),p.length===0)i=x.object({}).passthrough();else if(p.length===1)i=p[0];else{let g=x.intersection(p[0],p[1]);for(let v=2;v<p.length;v++)g=x.intersection(g,p[v]);i=g}break}let c=x.object(r);e.additionalProperties===!1?i=c.strict():typeof e.additionalProperties=="object"?i=c.catchall(Ce(e.additionalProperties,t)):i=c.passthrough();break}case"array":{let r=e.prefixItems,o=e.items;if(r&&Array.isArray(r)){let a=r.map(u=>Ce(u,t)),c=o&&typeof o=="object"&&!Array.isArray(o)?Ce(o,t):void 0;c?i=x.tuple(a).rest(c):i=x.tuple(a),typeof e.minItems=="number"&&(i=i.check(x.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(x.maxLength(e.maxItems)))}else if(Array.isArray(o)){let a=o.map(u=>Ce(u,t)),c=e.additionalItems&&typeof e.additionalItems=="object"?Ce(e.additionalItems,t):void 0;c?i=x.tuple(a).rest(c):i=x.tuple(a),typeof e.minItems=="number"&&(i=i.check(x.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(x.maxLength(e.maxItems)))}else if(o!==void 0){let a=Ce(o,t),c=x.array(a);typeof e.minItems=="number"&&(c=c.min(e.minItems)),typeof e.maxItems=="number"&&(c=c.max(e.maxItems)),i=c}else i=x.array(x.any());break}default:throw new Error(`Unsupported type: ${n}`)}return i}function Ce(e,t){if(typeof e=="boolean")return e?x.any():x.never();let n=eA(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let c=e.anyOf.map(l=>Ce(l,t)),u=x.union(c);n=i?x.intersection(n,u):u}if(e.oneOf&&Array.isArray(e.oneOf)){let c=e.oneOf.map(l=>Ce(l,t)),u=x.xor(c);n=i?x.intersection(n,u):u}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=i?n:x.any();else{let c=i?n:Ce(e.allOf[0],t),u=i?0:1;for(let l=u;l<e.allOf.length;l++)c=x.intersection(c,Ce(e.allOf[l],t));n=c}e.nullable===!0&&t.version==="openapi-3.0"&&(n=x.nullable(n)),e.readOnly===!0&&(n=x.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let r={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let c of o)c in e&&(r[c]=e[c]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let c of a)c in e&&(r[c]=e[c]);for(let c of Object.keys(e))QD.has(c)||(r[c]=e[c]);return Object.keys(r).length>0&&t.registry.add(n,r),e.description&&(n=n.describe(e.description)),n}function tA(e,t){if(typeof e=="boolean")return e?x.any():x.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=eM(n,t?.defaultTarget),r=n.$defs||n.definitions||{},o={version:i,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Ae};return Ce(n,o)}var Eh={};Pt(Eh,{bigint:()=>oM,boolean:()=>iM,date:()=>aM,number:()=>nM,string:()=>rM});function rM(e){return Gp(si,e)}function nM(e){return Jp(ui,e)}function iM(e){return af(li,e)}function oM(e){return cf(di,e)}function aM(e){return yf(Oo,e)}ue(Ls());var sM=Object.defineProperty,cM=(e,t)=>sM(e,"name",{value:t,configurable:!0});var rA=/^[A-Za-z][A-Za-z0-9]*$/,nA=128;var xh=s.object({legacyAnchor:s.string().min(1).max(nA).regex(rA,"legacyAnchor must be alphanumeric and start with a letter"),legacyOwnerId:s.string().min(1).max(512).optional(),legacySgDescription:s.string().min(1).max(255).optional()}).strict(),uM=s.record(s.string().min(1),s.record(s.string().min(1),xh)),lM=s.record(s.string().min(1),s.record(s.string().min(1),s.record(s.string().min(1),xh)));function iA(e,t){if(e===void 0)return;let n={};for(let[i,r]of Object.entries(e)){let o=r[t];o===void 0||Object.keys(o).length===0||(n[i]=o)}return Object.keys(n).length===0?void 0:n}cM(iA,"projectCapacityIdentityToTarget");var dM=Object.defineProperty,mM=(e,t)=>dM(e,"name",{value:t,configurable:!0});function oA(e){let t=new Map;for(let n of e){let i=Yr(n);if(i==="")return{kind:"empty-construct-key",name:n};let r=t.get(i);if(r!==void 0)return{kind:"duplicate-construct-key",name:n,existingName:r,constructKey:i};t.set(i,n)}return null}mM(oA,"findAccountNameCollision");var pM=Object.defineProperty,Fo=(e,t)=>pM(e,"name",{value:t,configurable:!0}),mi="us-east-2";var ct=Object.freeze([{code:"us-east-2",name:"US East",city:"Ohio",country:"USA",optIn:!1},{code:"us-west-2",name:"US West",city:"Oregon",country:"USA",optIn:!1},{code:"us-east-1",name:"US East",city:"N. Virginia",country:"USA",optIn:!1},{code:"eu-west-1",name:"EU West",city:"Ireland",country:"Ireland",optIn:!1},{code:"eu-central-1",name:"EU Central",city:"Frankfurt",country:"Germany",optIn:!1},{code:"ap-southeast-1",name:"Asia Pacific",city:"Singapore",country:"Singapore",optIn:!1},{code:"ap-northeast-1",name:"Asia Pacific",city:"Tokyo",country:"Japan",optIn:!1},{code:"ap-southeast-2",name:"Asia Pacific",city:"Sydney",country:"Australia",optIn:!1},{code:"us-west-1",name:"US West",city:"N. California",country:"USA",optIn:!1},{code:"ca-central-1",name:"Canada",city:"Central",country:"Canada",optIn:!1},{code:"af-south-1",name:"Africa",city:"Cape Town",country:"South Africa",optIn:!0},{code:"ap-east-1",name:"Asia Pacific",city:"Hong Kong",country:"Hong Kong",optIn:!0},{code:"ap-northeast-2",name:"Asia Pacific",city:"Seoul",country:"South Korea",optIn:!1},{code:"ap-northeast-3",name:"Asia Pacific",city:"Osaka",country:"Japan",optIn:!1},{code:"ap-south-1",name:"Asia Pacific",city:"Mumbai",country:"India",optIn:!1},{code:"ap-south-2",name:"Asia Pacific",city:"Hyderabad",country:"India",optIn:!0},{code:"ap-southeast-3",name:"Asia Pacific",city:"Jakarta",country:"Indonesia",optIn:!0},{code:"ap-southeast-4",name:"Asia Pacific",city:"Melbourne",country:"Australia",optIn:!0},{code:"eu-central-2",name:"EU Central",city:"Zurich",country:"Switzerland",optIn:!0},{code:"eu-north-1",name:"EU North",city:"Stockholm",country:"Sweden",optIn:!1},{code:"eu-south-1",name:"EU South",city:"Milan",country:"Italy",optIn:!0},{code:"eu-south-2",name:"EU South",city:"Spain",country:"Spain",optIn:!0},{code:"eu-west-2",name:"EU West",city:"London",country:"UK",optIn:!1},{code:"eu-west-3",name:"EU West",city:"Paris",country:"France",optIn:!1},{code:"me-central-1",name:"Middle East",city:"UAE",country:"UAE",optIn:!0},{code:"me-south-1",name:"Middle East",city:"Bahrain",country:"Bahrain",optIn:!0},{code:"sa-east-1",name:"South America",city:"S\xE3o Paulo",country:"Brazil",optIn:!1},{code:"ap-southeast-5",name:"Asia Pacific",city:"Kuala Lumpur",country:"Malaysia",optIn:!0},{code:"ap-southeast-6",name:"Asia Pacific",city:"Auckland",country:"New Zealand",optIn:!0},{code:"ap-southeast-7",name:"Asia Pacific",city:"Bangkok",country:"Thailand",optIn:!0},{code:"ap-east-2",name:"Asia Pacific",city:"Taipei",country:"Taiwan",optIn:!0},{code:"ca-west-1",name:"Canada West",city:"Calgary",country:"Canada",optIn:!0},{code:"il-central-1",name:"Israel",city:"Tel Aviv",country:"Israel",optIn:!0},{code:"mx-central-1",name:"Mexico",city:"Central",country:"Mexico",optIn:!0}]),nr=Object.freeze(ct.map(e=>e.code)),Xc=new Set(ct.filter(e=>e.optIn).map(e=>e.code));function Jc(e){return`${e} is an opt-in region: it must be enabled in the AWS account (Account settings \u2192 Regions) before deployment will succeed.`}Fo(Jc,"optInRegionWarning");function pi(e){return ct.find(t=>t.code===e)}Fo(pi,"getRegionInfo");function fi(e){let t=e.split("-");return t.length===3&&t[0]&&t[1]&&t[2]?`${t[0]}${t[1][0]}${t[2]}`:e}Fo(fi,"abbreviateRegion");var fM=Object.freeze({"Europe/London":"eu-west-2","Europe/Jersey":"eu-west-2","Europe/Guernsey":"eu-west-2","Europe/Isle_of_Man":"eu-west-2","Europe/Dublin":"eu-west-1","Europe/Paris":"eu-west-3","Europe/Berlin":"eu-central-1","Europe/Amsterdam":"eu-central-1","Europe/Brussels":"eu-central-1","Europe/Luxembourg":"eu-central-1","Europe/Vienna":"eu-central-1","Europe/Prague":"eu-central-1","Europe/Warsaw":"eu-central-1","Europe/Budapest":"eu-central-1","Europe/Zurich":"eu-central-2","Europe/Stockholm":"eu-north-1","Europe/Oslo":"eu-north-1","Europe/Copenhagen":"eu-north-1","Europe/Helsinki":"eu-north-1","Europe/Tallinn":"eu-north-1","Europe/Riga":"eu-north-1","Europe/Vilnius":"eu-north-1","Europe/Rome":"eu-south-1","Europe/Malta":"eu-south-1","Europe/Athens":"eu-south-1","Europe/Madrid":"eu-south-2","Europe/Lisbon":"eu-south-2","America/New_York":"us-east-1","America/Detroit":"us-east-1","America/Toronto":"ca-central-1","America/Montreal":"ca-central-1","America/Halifax":"ca-central-1","America/Winnipeg":"ca-central-1","America/Chicago":"us-east-2","America/Indiana/Indianapolis":"us-east-2","America/Mexico_City":"us-east-2","America/Denver":"us-west-2","America/Phoenix":"us-west-2","America/Edmonton":"us-west-2","America/Vancouver":"us-west-2","America/Los_Angeles":"us-west-1","America/Tijuana":"us-west-1","America/Sao_Paulo":"sa-east-1","America/Argentina/Buenos_Aires":"sa-east-1","America/Santiago":"sa-east-1","America/Montevideo":"sa-east-1","America/Lima":"sa-east-1","America/Bogota":"us-east-1","Asia/Tokyo":"ap-northeast-1","Asia/Seoul":"ap-northeast-2","Asia/Hong_Kong":"ap-east-1","Asia/Shanghai":"ap-east-1","Asia/Taipei":"ap-east-1","Asia/Macau":"ap-east-1","Asia/Singapore":"ap-southeast-1","Asia/Kuala_Lumpur":"ap-southeast-1","Asia/Bangkok":"ap-southeast-1","Asia/Ho_Chi_Minh":"ap-southeast-1","Asia/Manila":"ap-southeast-1","Asia/Jakarta":"ap-southeast-3","Asia/Kolkata":"ap-south-1","Asia/Calcutta":"ap-south-1","Asia/Karachi":"ap-south-1","Asia/Dhaka":"ap-south-1","Asia/Colombo":"ap-south-1","Asia/Dubai":"me-central-1","Asia/Muscat":"me-central-1","Asia/Qatar":"me-south-1","Asia/Bahrain":"me-south-1","Asia/Riyadh":"me-south-1","Asia/Kuwait":"me-south-1","Asia/Jerusalem":"me-south-1","Australia/Sydney":"ap-southeast-2","Australia/Brisbane":"ap-southeast-2","Australia/Canberra":"ap-southeast-2","Australia/Melbourne":"ap-southeast-4","Australia/Hobart":"ap-southeast-4","Australia/Adelaide":"ap-southeast-4","Pacific/Auckland":"ap-southeast-2","Pacific/Honolulu":"us-west-1","Africa/Johannesburg":"af-south-1","Africa/Casablanca":"eu-south-2","Africa/Cairo":"me-south-1","Indian/Maldives":"ap-south-1"}),gM=Object.freeze({Europe:"eu-central-1",America:"us-east-1",Asia:"ap-southeast-1",Australia:"ap-southeast-2",Pacific:"ap-southeast-2",Africa:"af-south-1",Atlantic:"eu-west-1",Indian:"ap-south-1"}),hM=Object.freeze({"af-south-1":"eu-west-1","ap-east-1":"ap-southeast-1","ap-southeast-3":"ap-southeast-1","ap-southeast-4":"ap-southeast-2","eu-central-2":"eu-central-1","eu-south-1":"eu-central-1","eu-south-2":"eu-west-3","me-central-1":"ap-south-1","me-south-1":"ap-south-1"});function Ah(e){return Xc.has(e)?hM[e]??mi:e}Fo(Ah,"toDeployableRegion");function Qc(e){if(!e)return;let t=fM[e];if(t!==void 0)return Ah(t);let n=e.split("/")[0];if(n===void 0)return;let i=gM[n];return i===void 0?void 0:Ah(i)}Fo(Qc,"suggestRegionForTimezone");var vM=Object.defineProperty,Bo=(e,t)=>vM(e,"name",{value:t,configurable:!0});function eu(e){return Nt(e).replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}Bo(eu,"slugifyAccountName");function aA(e,t){let n=eu(e),i=eu(t);return n===""?i:i===""?n:`${n}-${i}`}Bo(aA,"defaultConnectedAccountName");function sA(e,t){let n=eu(t);return n===""?e:`${e}-${n}`}Bo(sA,"suffixedAccountName");var cA=new Set(ct.map(e=>fi(e.code)));function uA(e){let t=e.toLowerCase().split(/[-\s_]+/).filter(i=>i.length>0),n=t[t.length-1];if(n!==void 0&&cA.has(n))return n}Bo(uA,"findTrailingRegionShortCode");function lA(e){return`Account name must not end with a region code ("-${e}") \u2014 the region is added automatically when deploying. Remove the "-${e}" suffix.`}Bo(lA,"regionSuffixRejectionMessage");var bM=Object.defineProperty,gi=(e,t)=>bM(e,"name",{value:t,configurable:!0});function At(e){return e instanceof Error?e:new Error(String(e))}gi(At,"normaliseError");function Mt(e){return e instanceof Error?e.message:typeof e=="string"?e:e&&typeof e=="object"&&"message"in e?String(e.message):"An unknown error occurred"}gi(Mt,"getErrorMessage");function tu(e,t){return!e||typeof e!="object"?!1:"code"in e&&e.code===t}gi(tu,"hasErrorCode");function Vo(e){if(!(!e||typeof e!="object")&&"code"in e&&typeof e.code=="string")return e.code}gi(Vo,"getErrorCode");function ru(e){return e instanceof Error?e.stack:void 0}gi(ru,"getErrorStack");function nu(e){let t=Mt(e),n=Vo(e);return n&&n!=="UNKNOWN_ERROR"?`[${n}] ${t}`:t}gi(nu,"formatErrorString");var yM=Object.defineProperty,SM=(e,t)=>yM(e,"name",{value:t,configurable:!0});function dA(e){let t,n=!1;return()=>(n||(t=e(),n=!0),t)}SM(dA,"singleton");var _M=Object.defineProperty,$h=(e,t)=>_M(e,"name",{value:t,configurable:!0}),pA=new Set(["NODE_OPTIONS","NODE_PATH","NODE_EXTRA_CA_CERTS","NODE_DEBUG","NODE_PRESERVE_SYMLINKS","LD_PRELOAD","LD_LIBRARY_PATH","LD_AUDIT","LD_BIND_NOW","DYLD_INSERT_LIBRARIES","DYLD_LIBRARY_PATH","DYLD_FRAMEWORK_PATH","PYTHONPATH","PYTHONSTARTUP","PERL5LIB","PERL5OPT","RUBYLIB","RUBYOPT","HOME","XDG_CONFIG_HOME","AWS_SHARED_CREDENTIALS_FILE","AWS_CONFIG_FILE","SHELL","BASH_ENV","ENV","ZDOTDIR"]);function fA(e){return Object.fromEntries(Object.entries(e).filter(([t])=>!pA.has(t.toUpperCase())))}$h(fA,"filterDangerousEnvVars");var EM=/(fjall_(?:ak|dk)_)[A-Z2-7]{16}\.[A-Z2-7]{40}/g,rt="***",Ih="[REDACTED]",mA=`-----BEGIN ${Ih} PRIVATE KEY-----...-----END ${Ih} PRIVATE KEY-----`;function hi(e){return e.replace(/-----BEGIN [A-Z ]*PRIVATE KEY-----(?:[^"\\]|\\[\\nrt"])*?-----END [A-Z ]*PRIVATE KEY-----/g,()=>mA).replace(/-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z ]*PRIVATE KEY-----/g,()=>mA).replace(/(\w+:\/\/[^:]+:)[^@]+(@)/gi,(t,n,i)=>`${n}${rt}${i}`).replace(/(?<![a-zA-Z])(password|passwd|secret|api[_-]?key|token|auth|credential)([=:])["']?[^\s"']+/gi,(t,n,i)=>`${n}${i}${rt}`).replace(/\b(ghu_|ghs_|ghp_|gho_|github_pat_)[A-Za-z0-9_]+/g,(t,n)=>`${n}${rt}`).replace(/\b(sk|rk)_(live|test)_[A-Za-z0-9]{8,}/g,(t,n,i)=>`${n}_${i}_${rt}`).replace(/\bwhsec_[A-Za-z0-9]{8,}/g,()=>`whsec_${rt}`).replace(/(?<=Authorization:\s*Bearer\s+)[A-Za-z0-9._~+/=-]+/gi,rt).replace(/\b(AKIA|ASIA)[A-Z0-9]{12,}\b/g,(t,n)=>`${n}${rt}`).replace(/(?<=aws_secret_access_key\s*=\s*["']?|SecretAccessKey[=:]\s*|"(aws)?secretAccessKey":\s*"|"aws_secret_access_key":\s*")[A-Za-z0-9/+=]{40,}/gi,rt).replace(/(?<="(aws)?sessionToken":\s*"|"aws_session_token":\s*")[^"]+/gi,rt).replace(/(?<=aws_session_token\s*[=:]\s*["']?|SessionToken[=:]\s*["']?)[^\s"']+/gi,rt).replace(/(?<="(internal[Aa]piKey|fjallCallbackToken)":\s*")[^"]+/g,rt).replace(EM,(t,n)=>`${n}${rt}`)}$h(hi,"maskSensitiveOutput");function gA(e){let t=[],n="",i=!1,r=!1,o=!1,a=!1;for(let c of e){if(o){n+=c,o=!1;continue}if(c==="\\"&&!i){o=!0;continue}if(c==="'"&&!r){i=!i,a=!0;continue}if(c==='"'&&!i){r=!r,a=!0;continue}if(c===" "&&!i&&!r){(n||a)&&(t.push(n),n="",a=!1);continue}n+=c}if(i||r)throw new Error(`Unbalanced ${i?"single":"double"} quote in command: ${e.slice(0,80)}`);if(o)throw new Error(`Trailing backslash in command: ${e.slice(0,80)}`);return(n||a)&&t.push(n),t}$h(gA,"parseShellArgs");var xM=Object.defineProperty,AM=(e,t)=>xM(e,"name",{value:t,configurable:!0}),IM=AM(e=>new Promise(t=>setTimeout(t,e)),"sleep");var $M=Object.defineProperty,hA=(e,t)=>$M(e,"name",{value:t,configurable:!0});async function vA(e,t,n){let i=new Array(e.length);if(e.length===0)return i;let r=Math.max(1,Math.min(t,e.length)),o=0,a=hA(async()=>{for(;o<e.length;){let c=o++;try{let u=await n(e[c],c);i[c]={status:"fulfilled",value:u}}catch(u){i[c]={status:"rejected",reason:u}}}},"worker");return await Promise.all(Array.from({length:r},()=>a())),i}hA(vA,"mapSettledWithConcurrency");var TM=Object.defineProperty,sn=(e,t)=>TM(e,"name",{value:t,configurable:!0}),Th=["production","staging","development","platform","compliance"],bA={production:"Production",staging:"Staging",development:"Development",platform:"Platform",compliance:"Compliance"},CM=new Set(Th);function iu(e){return CM.has(e)}sn(iu,"isAccountStage");var Zo={ROOT:"root",PLATFORM:"platform"},RM=[...Th,Zo.ROOT];function yA(e){return iu(e)?bA[e]:e.charAt(0).toUpperCase()+e.slice(1)}sn(yA,"getEnvironmentLabel");var Ch=["organisation","platform","account"],PM=s.enum(Ch),Go={ORGANISATION:"organisation",PLATFORM:"platform",ACCOUNT:"account"},NM={[Go.ORGANISATION]:!0,[Go.PLATFORM]:!0,[Go.ACCOUNT]:!0},wM=new Set(Object.keys(NM));function SA(e){return wM.has(e)}sn(SA,"isAccountTier");var _A=Ch.filter(e=>e!==Go.ACCOUNT),kM=new Set(_A);function ou(e){return kM.has(e)}sn(ou,"isGovernanceTier");function Rh(e){return e===Zo.ROOT?"organisation":e===Zo.PLATFORM?"platform":"account"}sn(Rh,"environmentToTier");function EA(e){return e==null||e===""||e===Zo.ROOT?null:iu(e)?e:null}sn(EA,"stageFromWireEnvironment");function Wo(e){return e.tier??Rh(e.environment)}sn(Wo,"accountTier");var OM=Object.defineProperty,Ho=(e,t)=>OM(e,"name",{value:t,configurable:!0});var xA=Object.freeze({"AWS::IAM::Role":"security","AWS::IAM::Policy":"security","AWS::IAM::OIDCProvider":"security","AWS::EC2::SecurityGroup":"security","AWS::KMS::Key":"security","AWS::KMS::Alias":"security","AWS::EC2::VPC":"network","AWS::EC2::Subnet":"network","AWS::EC2::InternetGateway":"network","AWS::EC2::NatGateway":"network","AWS::EC2::RouteTable":"network","AWS::EC2::Route":"network","AWS::EC2::VPCGatewayAttachment":"network","AWS::EC2::SubnetRouteTableAssociation":"network","AWS::EC2::EIP":"network","AWS::ECS::Cluster":"compute","AWS::ECS::Service":"compute","AWS::ECS::TaskDefinition":"compute","AWS::Lambda::Function":"compute","AWS::ElasticLoadBalancingV2::LoadBalancer":"compute","AWS::ElasticLoadBalancingV2::TargetGroup":"compute","AWS::ElasticLoadBalancingV2::Listener":"compute","AWS::ElasticLoadBalancingV2::ListenerRule":"compute","AWS::RDS::DBInstance":"database","AWS::RDS::DBCluster":"database","AWS::SecretsManager::Secret":"database","AWS::S3::Bucket":"storage","AWS::S3::BucketPolicy":"storage","AWS::CloudTrail::Trail":"monitoring","AWS::CloudWatch::Alarm":"monitoring","AWS::Logs::LogGroup":"monitoring","AWS::Events::EventBus":"events","AWS::Events::Rule":"events","AWS::ECR::Repository":"registry","AWS::CodeBuild::Project":"registry","AWS::Route53::RecordSet":"dns","AWS::CertificateManager::Certificate":"dns","AWS::CloudFront::Distribution":"dns","AWS::Backup::BackupVault":"backup","AWS::Backup::BackupPlan":"backup","AWS::Backup::BackupSelection":"backup","AWS::SSO::PermissionSet":"identity","AWS::SSO::Assignment":"identity","AWS::Organizations::Account":"identity","AWS::CDK::Metadata":"compute","AWS::CloudFormation::CustomResource":"compute","AWS::CloudFormation::WaitCondition":"compute","AWS::CloudFormation::WaitConditionHandle":"compute"}),Ph=new Set;function AA(e){if(!e)return"compute";if(e.startsWith("Custom::"))return xA[e]??"compute";let t=xA[e];return t||Ph.add(e),t??"compute"}Ho(AA,"categoriseResource");function DM(){return new Set(Ph)}Ho(DM,"getUnmappedResourceTypes");function MM(){Ph.clear()}Ho(MM,"clearUnmappedResourceTypes");var jM=Object.freeze({"AWS::EC2::NatGateway":120,"AWS::RDS::DBInstance":300,"AWS::RDS::DBCluster":300,"AWS::CloudFront::Distribution":300,"AWS::ECS::Service":180,"AWS::ElasticLoadBalancingV2::LoadBalancer":60,"AWS::EC2::SecurityGroup":10,"AWS::IAM::Role":15,"AWS::IAM::Policy":15,"AWS::IAM::OIDCProvider":10,"AWS::S3::Bucket":10,"AWS::S3::BucketPolicy":5,"AWS::Lambda::Function":30,"AWS::EC2::VPC":15,"AWS::EC2::Subnet":15,"AWS::EC2::InternetGateway":10,"AWS::EC2::RouteTable":5,"AWS::EC2::Route":5,"AWS::EC2::VPCGatewayAttachment":10,"AWS::EC2::SubnetRouteTableAssociation":5,"AWS::EC2::EIP":10,"AWS::ECS::Cluster":15,"AWS::ECS::TaskDefinition":10,"AWS::ElasticLoadBalancingV2::TargetGroup":10,"AWS::ElasticLoadBalancingV2::Listener":10,"AWS::ElasticLoadBalancingV2::ListenerRule":5,"AWS::SecretsManager::Secret":10,"AWS::Logs::LogGroup":5,"AWS::CloudWatch::Alarm":10,"AWS::CloudTrail::Trail":15,"AWS::Events::EventBus":5,"AWS::Events::Rule":5,"AWS::ECR::Repository":10,"AWS::Route53::RecordSet":30,"AWS::CertificateManager::Certificate":60,"AWS::KMS::Key":15,"AWS::KMS::Alias":5,"AWS::Backup::BackupVault":10,"AWS::Backup::BackupPlan":10,"AWS::Backup::BackupSelection":10,"AWS::SSO::PermissionSet":15,"AWS::SSO::Assignment":10,"AWS::Organizations::Account":60}),zM=30;function IA(e){return jM[e]??zM}Ho(IA,"getExpectedDuration");var LM=Object.freeze({"AWS::Lambda::Function":"Lambda Function","AWS::IAM::Role":"IAM Role","AWS::IAM::Policy":"IAM Policy","AWS::S3::Bucket":"S3 Bucket","AWS::DynamoDB::Table":"DynamoDB Table","AWS::EC2::Instance":"EC2 Instance","AWS::EC2::SecurityGroup":"Security Group","AWS::EC2::VPC":"VPC","AWS::EC2::Subnet":"Subnet","AWS::EC2::InternetGateway":"Internet Gateway","AWS::EC2::RouteTable":"Route Table","AWS::EC2::Route":"Route","AWS::ECS::Cluster":"ECS Cluster","AWS::ECS::Service":"ECS Service","AWS::ECS::TaskDefinition":"Task Definition","AWS::ElasticLoadBalancingV2::LoadBalancer":"Load Balancer","AWS::ElasticLoadBalancingV2::TargetGroup":"Target Group","AWS::ElasticLoadBalancingV2::Listener":"Listener","AWS::CloudFormation::Stack":"CloudFormation Stack","AWS::CDK::Metadata":"CDK Metadata","Custom::CDKBucketDeployment":"Bucket Deployment","AWS::SSM::Parameter":"SSM Parameter","AWS::CloudWatch::Alarm":"CloudWatch Alarm","AWS::Logs::LogGroup":"Log Group","AWS::ApiGateway::RestApi":"API Gateway","AWS::ApiGateway::Deployment":"API Deployment","AWS::ApiGateway::Stage":"API Stage","AWS::ApiGateway::Method":"API Method","AWS::ApiGateway::Resource":"API Resource","AWS::CloudFront::Distribution":"CloudFront Distribution","AWS::Route53::RecordSet":"Route53 Record","AWS::RDS::DBInstance":"RDS Instance","AWS::RDS::DBCluster":"RDS Cluster","AWS::SQS::Queue":"SQS Queue","AWS::SNS::Topic":"SNS Topic","AWS::Events::Rule":"EventBridge Rule","AWS::StepFunctions::StateMachine":"Step Function","AWS::EC2::NatGateway":"NAT Gateway","AWS::EC2::EIP":"Elastic IP","AWS::EC2::VPCGatewayAttachment":"Gateway Attachment","AWS::EC2::SubnetRouteTableAssociation":"Route Association","AWS::CloudTrail::Trail":"CloudTrail","AWS::IAM::OIDCProvider":"OIDC Provider","AWS::Events::EventBus":"Event Bus","AWS::Backup::BackupVault":"Backup Vault","AWS::Backup::BackupPlan":"Backup Plan","AWS::Backup::BackupSelection":"Backup Selection","AWS::SecretsManager::Secret":"Secret","AWS::KMS::Key":"KMS Key","AWS::KMS::Alias":"KMS Alias","AWS::ECR::Repository":"ECR Repository","AWS::CertificateManager::Certificate":"Certificate","AWS::ElasticLoadBalancingV2::ListenerRule":"Listener Rule","AWS::EC2::IPAM":"IPAM","AWS::EC2::IPAMPool":"IPAM Pool","AWS::EC2::IPAMPoolCidr":"IPAM Pool CIDR","Custom::ram":"RAM","Custom::ipamDelegateAdmin":"IPAM Delegate Admin","Custom::CostAllocationTags":"Cost Allocation Tags","Custom::ActivateOrganisationsAccess":"Activate Organisations Access","Custom::Organizations_TagResource":"Organisations Tag Resource","AWS::CloudFormation::CustomResource":"Custom Resource","AWS::CloudFormation::WaitCondition":"Wait Condition","AWS::CloudFormation::WaitConditionHandle":"Wait Condition Handle","AWS::SSO::PermissionSet":"SSO Permission Set","AWS::SSO::Assignment":"SSO Assignment","AWS::Organizations::Account":"Organisations Account","AWS::S3::BucketPolicy":"S3 Bucket Policy","AWS::CodeBuild::Project":"CodeBuild Project"});function $A(e){return LM[e]||e.split("::").pop()||e}Ho($A,"getFriendlyResourceType");var UM=Object.defineProperty,FM=(e,t)=>UM(e,"name",{value:t,configurable:!0}),BM={"github.com":"github","gitlab.com":"gitlab","bitbucket.org":"bitbucket"},VM=/^https?:\/\/([^/]+)\/(.+?)\/([^/.]+?)(?:\.git)?$/,GM=/^git@([^:]+):(.+?)\/([^/.]+?)(?:\.git)?$/,ZM=/^ssh:\/\/[^@]+@([^:/]+)(?::\d+)?\/(.+?)\/([^/.]+?)(?:\.git)?$/;function TA(e){if(!e)return null;let t=e.replace(/^(https?:\/\/)[^@]+@/,"$1"),n=t.match(VM)??t.match(GM)??e.match(ZM);if(!n)return null;let[,i,r,o]=n;return!i||!r||!o?null:{provider:BM[i]??"other",owner:r,repo:o,host:i}}FM(TA,"parseGitRemoteUrl");var Nh=["read","write","deploy","secrets:read","secrets:write","destroy","admin","applications:read","applications:deploy","deploy:oidc:mint","deploy:governance"],CA={read:"user",write:"user",deploy:"user","secrets:read":"user","secrets:write":"user",destroy:"user",admin:"admin","applications:read":"user","applications:deploy":"user","deploy:oidc:mint":"machine","deploy:governance":"machine"},WM=Nh.filter(e=>CA[e]==="machine");var HM=Nh.filter(e=>CA[e]==="user");var qM=Object.defineProperty,vi=(e,t)=>qM(e,"name",{value:t,configurable:!0}),su=/^[a-zA-Z_][a-zA-Z0-9._-]*$/,wh="Secret name must start with a letter or underscore and contain only letters, numbers, underscores, hyphens, or periods",qo=/^[a-zA-Z][a-zA-Z0-9._-]*$/,cu="Must start with a letter and contain only letters, numbers, periods, hyphens, or underscores";var au=s.string().regex(qo,cu),RA=s.object({app:au.describe("Application name"),cluster:au.optional().describe("Cluster name"),service:au.optional().describe("Service name"),lambda:au.optional().describe("Lambda function name")}).strict().refine(e=>!(e.service&&!e.cluster),{message:"Cluster is required when service is specified"}).refine(e=>!(e.lambda&&(e.cluster||e.service)),{message:"Lambda is mutually exclusive with cluster and service"}).refine(e=>e.cluster!=="lambda",{message:'The cluster name "lambda" is reserved for lambda-scoped parameter paths'});function kh(e){let t=[e.app];return e.lambda?t.push("lambda",e.lambda):(e.cluster&&t.push(e.cluster),e.service&&e.cluster&&t.push(e.service)),t}vi(kh,"buildNamespaceParts");function Oh(e,t){let n=kh(e);return t&&n.push(t),"/"+n.join("/")}vi(Oh,"buildParameterPath");function Dh(e){let t=e.split("/").filter(Boolean);if(t.length<2)return null;let n=t[t.length-1]??"",i={app:t[0]??""};return t.length>=4&&t[1]==="lambda"?i.lambda=t[2]:t.length>=3&&(i.cluster=t[1],t.length>=4&&(i.service=t[2])),{namespace:i,name:n}}vi(Dh,"parseParameterPath");function PA(e){let t=Dh(e);return t?RA.safeParse(t.namespace).success&&Oh(t.namespace,t.name)===e:!1}vi(PA,"isManageablePath");function NA(e){let t={};for(let n of e.split(`
165
- `)){let i=n.trim();if(!i||i.startsWith("#"))continue;let r=i.replace(/^export\s+/,""),o=r.indexOf("=");if(o===-1)continue;let a=r.slice(0,o).trim();if(!su.test(a))continue;let c=r.slice(o+1);c.length>=2&&c.startsWith('"')&&c.endsWith('"')?t[a]=c.slice(1,-1).replace(/\\([\\"$`nr])/g,(u,l)=>l==="n"?`
166
- `:l==="r"?"\r":l):c.length>=2&&c.startsWith("'")&&c.endsWith("'")?t[a]=c.slice(1,-1):t[a]=c}return t}vi(NA,"parseDotEnv");function wA(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\$/g,"\\$").replace(/`/g,"\\`").replace(/\n/g,"\\n").replace(/\r/g,"\\r")}vi(wA,"escapeDotEnvValue");var kA=s.object({awsAccountId:s.string(),accountName:s.string().nullable(),status:s.string(),role:s.string(),roleArn:s.string(),environment:s.string().optional(),connectedAt:s.string()}),KM=s.object({accounts:s.array(kA)});var YM=Object.defineProperty,cn=(e,t)=>YM(e,"name",{value:t,configurable:!0});function Mh(e){let t=[e.primaryRegion,...e.secondaryRegions??[],e.disasterRecoveryRegion].filter(n=>n!==void 0);return[...new Set(t)]}cn(Mh,"deriveRegionsFromOrgConfig");function jh(e){return e.environment??Wo(e)}cn(jh,"environmentOrTier");function zh(e,t){return`${e.toLowerCase()}-${fi(t)}`}cn(zh,"generateTargetName");function Lh(e,t){let n=[];for(let i of e){if(Wo(i)==="organisation")continue;let r=jh(i);for(let o of t)n.push({name:zh(i.name,o),accountName:i.name,accountId:i.id,environment:r,region:o})}return n.sort((i,r)=>{let o=i.environment.localeCompare(r.environment);if(o!==0)return o;let a=i.accountName.localeCompare(r.accountName);return a!==0?a:i.region.localeCompare(r.region)})}cn(Lh,"deriveTargets");function OA(e){return Lh(e.providerAccounts,Mh(e))}cn(OA,"deriveAllTargets");function XM(e,t){if(t.length===0)return e;let n=new Set([e.primaryRegion,e.disasterRecoveryRegion].filter(Boolean)),i=t.filter(r=>!n.has(r));return{...e,secondaryRegions:i.length>0?i:void 0}}cn(XM,"mergeSecondaryRegions");function DA(e,t){return e.find(n=>n.name===t)}cn(DA,"findTarget");var JM=Object.defineProperty,QM=(e,t)=>JM(e,"name",{value:t,configurable:!0});function MA(e,t){if(t!==void 0){if(t.trim()==="")throw new Error("buildAppConfigPath: container must be a non-empty string");return`${t}/fjall/${e}`}return`fjall/${e}`}QM(MA,"buildAppConfigPath");var ej=Object.defineProperty,bi=(e,t)=>ej(e,"name",{value:t,configurable:!0}),Uh="infrastructure.ts",Fh="fjall";function jA(e,t){let n=t?.excludedPathPrefixes,i=t?.excludedPathSegments,r=[];for(let o of e){if(!Bh(o.path)||n&&LA(o.path,n)||i&&UA(o.path,i))continue;let a=Vh(o.path);a!==null&&r.push({configPath:zA(o.path),boundaryPath:a})}return r}bi(jA,"findInfrastructurePaths");function Bh(e){return e===Uh||e.endsWith(`/${Uh}`)}bi(Bh,"isInfrastructureFile");function Vh(e){let t=e.split("/");for(let n=0;n<t.length-1;n++)if(t[n]===Fh)return t.slice(0,n+1).join("/");return null}bi(Vh,"findBoundaryPath");function zA(e){return e.slice(0,-`/${Uh}`.length)}bi(zA,"toConfigDir");function LA(e,t){for(let n of t)if(e.startsWith(n))return!0;return!1}bi(LA,"hasExcludedPrefix");function UA(e,t){let n=e.split("/");for(let i=0;i<n.length-1;i++)if(t.has(n[i]))return!0;return!1}bi(UA,"hasExcludedSegment");var tj=Object.defineProperty,Gh=(e,t)=>tj(e,"name",{value:t,configurable:!0});function FA(e){if(e.length===0)return null;let t=[];for(let i of e){let r=BA(i.boundaryPath);if(r===null)return null;t.push(r)}let n=VA(t);return n.length===0?null:n.join("/")}Gh(FA,"inferContainerFromCandidates");function BA(e){let t=e.split("/").filter(i=>i.length>0);if(t.length===0||t[t.length-1]!==Fh)return null;let n=t.slice(0,t.length-1);return n.length===0?null:n}Gh(BA,"extractContainer");function VA(e){if(e.length===0)return[];let[t,...n]=e,i=[];for(let r=0;r<t.length;r+=1){let o=t[r];for(let a of n)if(a[r]!==o)return i;i.push(o)}return i}Gh(VA,"longestCommonPrefix");var rj=Object.defineProperty,GA=(e,t)=>rj(e,"name",{value:t,configurable:!0}),ZA=["fjall","organisation","platform","account","domain"];function WA(e){return ZA.includes(e.toLowerCase())}GA(WA,"isReservedAppName");var HA="-cache";function qA(e){return Nt(e).endsWith(HA)}GA(qA,"hasReservedAppNameSuffix");var nj=Object.defineProperty,Zh=(e,t)=>nj(e,"name",{value:t,configurable:!0});function YA(e){return{success:!0,data:e}}Zh(YA,"success");function Ko(e){return{success:!1,error:e}}Zh(Ko,"failure");var KA="sha256:",uu=12,ij=new RegExp(`-sha-[0-9a-f]{${uu}}$`);function XA(e,t,n){if(!e.startsWith(KA))return Ko(new Error(`expected sha256:... digest, got ${e.slice(0,32)}`));let i=e.slice(KA.length);if(i.length<uu)return Ko(new Error(`digest hex payload too short (need >=${uu} chars, got ${i.length})`));let r=t.trim();if(r==="")return Ko(new Error("serviceName must be a non-empty string"));let o;if(n!==void 0){let u=n.trim();if(u==="")return Ko(new Error("target, when supplied, must be a non-empty string; omit the argument instead"));o=u.toLowerCase()}let a=i.slice(0,uu).toLowerCase(),c=o!==void 0?`${r.toLowerCase()}-${o}`:r.toLowerCase();return YA(`${c}-sha-${a}`)}Zh(XA,"deriveContentHashTag");var oj=Object.defineProperty,aj=(e,t)=>oj(e,"name",{value:t,configurable:!0}),JA=["full","code-only","rollback","restart"],sj=s.enum(JA),QA=/^[a-zA-Z0-9._-]+$/,eI=s.string().min(1).max(128).regex(QA),tI=s.object({serviceName:s.string().min(1),imageTag:eI,imageDigest:s.string().min(1).optional(),imageUri:s.string().min(1),ecrRepositoryArn:s.string().min(1).optional(),taskDefinitionArn:s.string().min(1).optional(),previousTaskDefinitionArn:s.string().min(1).optional(),functionArn:s.string().min(1).optional(),publishedVersion:s.string().min(1).optional()}).strict(),cj=s.array(tI);function rI(e,t){return`${e}${t}`}aj(rI,"artefactOutputKey");var uj=Object.defineProperty,nI=(e,t)=>uj(e,"name",{value:t,configurable:!0}),jt=["payload","nextjs","staticsite"],Wh=new Set(jt);function Hh(e){return typeof e=="string"&&Wh.has(e)}nI(Hh,"isPatternType");var yi={payload:{label:"Payload CMS",constructIdSuffix:"Payload",artefact:"opennext-lambda",stackPlacement:"compute",deployable:!0},nextjs:{label:"Next.js",constructIdSuffix:"Nextjs",artefact:"opennext-lambda",stackPlacement:"compute",deployable:!1},staticsite:{label:"Static site",constructIdSuffix:"StaticSite",artefact:"static-assets",stackPlacement:"cdn",deployable:!0}},iI=jt.filter(e=>yi[e].deployable),qh=jt.filter(e=>yi[e].artefact==="opennext-lambda"),lj=new Set(qh);function Kh(e){return e!=null&&lj.has(e)}nI(Kh,"isOpenNextPatternType");var Yo=["multipage","spa"];var dj=Object.defineProperty,Yh=(e,t)=>dj(e,"name",{value:t,configurable:!0}),oI="noreply";function aI(e){return`${oI}@${e}`}Yh(aI,"defaultFormsFromAddress");function sI(e){return`https://${e}`}Yh(sI,"defaultFormsCorsOrigin");function lu(e,t){let n=e.split("@");if(n.length!==2)return!1;let[i,r]=n;return i===void 0||i===""||r===void 0?!1:r.toLowerCase()===t.toLowerCase()}Yh(lu,"isAddressAtDomain");var cI=2;var mj=s.object({devDomain:s.string().min(1),hostedZoneId:s.string().min(1).optional(),parentDomain:s.string().min(1).optional(),parentDelegationRoleArn:s.string().min(1).optional()}).strict().superRefine((e,t)=>{if(e.hostedZoneId!==void 0){e.parentDomain!==void 0&&t.addIssue({code:"custom",path:["parentDomain"],message:"hostedZoneId (adopt mode) is mutually exclusive with parentDomain \u2014 the adopted zone was already delegated; omit parentDomain"}),e.parentDelegationRoleArn!==void 0&&t.addIssue({code:"custom",path:["parentDelegationRoleArn"],message:"hostedZoneId (adopt mode) is mutually exclusive with parentDelegationRoleArn \u2014 the adopted zone was already delegated; omit parentDelegationRoleArn"});return}e.parentDelegationRoleArn!==void 0&&e.parentDomain===void 0&&t.addIssue({code:"custom",path:["parentDomain"],message:"parentDelegationRoleArn requires parentDomain \u2014 set parentDomain to the parent zone the DelegationRole belongs to"}),e.parentDomain!==void 0&&!e.devDomain.endsWith(`.${e.parentDomain}`)&&t.addIssue({code:"custom",path:["parentDomain"],message:"parentDomain must be a proper DNS suffix of devDomain \u2014 devDomain must end with `.<parentDomain>`"})}),uI={appId:s.string().min(1),appKebab:s.string().min(1),engineVersion:s.string().min(1).optional(),adoptSlotEcr:s.boolean().optional(),adoptCacheEcr:s.boolean().optional(),phase:s.enum(["zone","full"]).optional(),domain:mj.optional()},pj=s.object(uI).strict(),fj=s.object({...uI,version:s.literal(cI),appName:s.string().min(1)}).strict().refine(e=>e.appName===`fjall-dev-${e.appKebab}`,{message:"appName must equal `fjall-dev-${appKebab}` (single-source identity)",path:["appName"]});import{existsSync as y$,mkdirSync as gL,statSync as hL,appendFileSync as vL}from"fs";import{join as S$}from"path";import{join as Nv}from"path";var hj=Object.defineProperty,lI=(e,t)=>hj(e,"name",{value:t,configurable:!0});function dI(e){return e.mode==="cli"}lI(dI,"isCLIMode");function mI(e){return e.mode==="ink"}lI(mI,"isInkMode");function pI(e,t,n){let i=e.indexOf(t);if(i===-1)return e;let r=t.length,o=0,a="";do a+=e.slice(o,i)+t+n,o=i+r,i=e.indexOf(t,o);while(i!==-1);return a+=e.slice(o),a}function fI(e,t,n,i){let r=0,o="";do{let a=e[i-1]==="\r";o+=e.slice(r,a?i-1:i)+t+(a?`\r
164
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let c=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(c.cycle){o(a);continue}if(c.count>1&&e.reused==="ref"){o(a);continue}}}function wr(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=c=>{let u=e.seen.get(c);if(u.ref===null)return;let l=u.def??u.schema,m={...l},p=u.ref;if(u.ref=null,p){i(p);let v=e.seen.get(p),A=v.schema;if(A.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(A)):Object.assign(l,A),Object.assign(l,m),c._zod.parent===p)for(let z in l)z==="$ref"||z==="allOf"||z in m||delete l[z];if(A.$ref&&v.def)for(let z in l)z==="$ref"||z==="allOf"||z in v.def&&JSON.stringify(l[z])===JSON.stringify(v.def[z])&&delete l[z]}let g=c._zod.parent;if(g&&g!==p){i(g);let v=e.seen.get(g);if(v?.schema.$ref&&(l.$ref=v.schema.$ref,v.def))for(let A in l)A==="$ref"||A==="allOf"||A in v.def&&JSON.stringify(l[A])===JSON.stringify(v.def[A])&&delete l[A]}e.override({zodSchema:c,jsonSchema:l,path:u.path??[]})};for(let c of[...e.seen.entries()].reverse())i(c[0]);let r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(c)}Object.assign(r,n.def??n.schema);let o=e.metadataRegistry.get(t)?.id;o!==void 0&&r.id===o&&delete r.id;let a=e.external?.defs??{};for(let c of e.seen.entries()){let u=c[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,a[u.defId]=u.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?r.$defs=a:r.definitions=a);try{let c=JSON.parse(JSON.stringify(r));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:ui(t,"input",e.processors),output:ui(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function Le(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return Le(i.element,n);if(i.type==="set")return Le(i.valueType,n);if(i.type==="lazy")return Le(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return Le(i.innerType,n);if(i.type==="intersection")return Le(i.left,n)||Le(i.right,n);if(i.type==="record"||i.type==="map")return Le(i.keyType,n)||Le(i.valueType,n);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:Le(i.in,n)||Le(i.out,n);if(i.type==="object"){for(let r in i.shape)if(Le(i.shape[r],n))return!0;return!1}if(i.type==="union"){for(let r of i.options)if(Le(r,n))return!0;return!1}if(i.type==="tuple"){for(let r of i.items)if(Le(r,n))return!0;return!!(i.rest&&Le(i.rest,n))}return!1}var jf=(e,t={})=>n=>{let i=Nr({...n,processors:t});return G(e,i),Pr(i,e),wr(i,e)},ui=(e,t,n={})=>i=>{let{libraryOptions:r,target:o}=i??{},a=Nr({...r??{},target:o,io:t,processors:n});return G(e,a),Pr(a,e),wr(a,e)};var hM={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},zf=(e,t,n,i)=>{let r=n;r.type="string";let{minimum:o,maximum:a,format:c,patterns:u,contentEncoding:l}=e._zod.bag;if(typeof o=="number"&&(r.minLength=o),typeof a=="number"&&(r.maxLength=a),c&&(r.format=hM[c]??c,r.format===""&&delete r.format,c==="time"&&delete r.format),l&&(r.contentEncoding=l),u&&u.size>0){let m=[...u];m.length===1?r.pattern=m[0].source:m.length>1&&(r.allOf=[...m.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},Lf=(e,t,n,i)=>{let r=n,{minimum:o,maximum:a,format:c,multipleOf:u,exclusiveMaximum:l,exclusiveMinimum:m}=e._zod.bag;typeof c=="string"&&c.includes("int")?r.type="integer":r.type="number";let p=typeof m=="number"&&m>=(o??Number.NEGATIVE_INFINITY),g=typeof l=="number"&&l<=(a??Number.POSITIVE_INFINITY),v=t.target==="draft-04"||t.target==="openapi-3.0";p?v?(r.minimum=m,r.exclusiveMinimum=!0):r.exclusiveMinimum=m:typeof o=="number"&&(r.minimum=o),g?v?(r.maximum=l,r.exclusiveMaximum=!0):r.exclusiveMaximum=l:typeof a=="number"&&(r.maximum=a),typeof u=="number"&&(r.multipleOf=u)},Uf=(e,t,n,i)=>{n.type="boolean"},Ff=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Bf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Vf=(e,t,n,i)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Gf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Zf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Wf=(e,t,n,i)=>{n.not={}},Hf=(e,t,n,i)=>{},qf=(e,t,n,i)=>{},Kf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Yf=(e,t,n,i)=>{let r=e._zod.def,o=vo(r.entries);o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),n.enum=o},Xf=(e,t,n,i)=>{let r=e._zod.def,o=[];for(let a of r.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){let a=o[0];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),o.every(a=>typeof a=="boolean")&&(n.type="boolean"),o.every(a=>a===null)&&(n.type="null"),n.enum=o},Jf=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Qf=(e,t,n,i)=>{let r=n,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},eg=(e,t,n,i)=>{let r=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:c,mime:u}=e._zod.bag;a!==void 0&&(o.minLength=a),c!==void 0&&(o.maxLength=c),u?u.length===1?(o.contentMediaType=u[0],Object.assign(r,o)):(Object.assign(r,o),r.anyOf=u.map(l=>({contentMediaType:l}))):Object.assign(r,o)},tg=(e,t,n,i)=>{n.type="boolean"},rg=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},ng=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},ig=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},og=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},ag=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},sg=(e,t,n,i)=>{let r=n,o=e._zod.def,{minimum:a,maximum:c}=e._zod.bag;typeof a=="number"&&(r.minItems=a),typeof c=="number"&&(r.maxItems=c),r.type="array",r.items=G(o.element,t,{...i,path:[...i.path,"items"]})},cg=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object",r.properties={};let a=o.shape;for(let l in a)r.properties[l]=G(a[l],t,{...i,path:[...i.path,"properties",l]});let c=new Set(Object.keys(a)),u=new Set([...c].filter(l=>{let m=o.shape[l]._zod;return t.io==="input"?m.optin===void 0:m.optout===void 0}));u.size>0&&(r.required=Array.from(u)),o.catchall?._zod.def.type==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=G(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},Ec=(e,t,n,i)=>{let r=e._zod.def,o=r.inclusive===!1,a=r.options.map((c,u)=>G(c,t,{...i,path:[...i.path,o?"oneOf":"anyOf",u]}));o?n.oneOf=a:n.anyOf=a},ug=(e,t,n,i)=>{let r=e._zod.def,o=G(r.left,t,{...i,path:[...i.path,"allOf",0]}),a=G(r.right,t,{...i,path:[...i.path,"allOf",1]}),c=l=>"allOf"in l&&Object.keys(l).length===1,u=[...c(o)?o.allOf:[o],...c(a)?a.allOf:[a]];n.allOf=u},lg=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",c=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",u=o.items.map((g,v)=>G(g,t,{...i,path:[...i.path,a,v]})),l=o.rest?G(o.rest,t,{...i,path:[...i.path,c,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=u,l&&(r.items=l)):t.target==="openapi-3.0"?(r.items={anyOf:u},l&&r.items.anyOf.push(l),r.minItems=u.length,l||(r.maxItems=u.length)):(r.items=u,l&&(r.additionalItems=l));let{minimum:m,maximum:p}=e._zod.bag;typeof m=="number"&&(r.minItems=m),typeof p=="number"&&(r.maxItems=p)},dg=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object";let a=o.keyType,u=a._zod.bag?.patterns;if(o.mode==="loose"&&u&&u.size>0){let m=G(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(let p of u)r.patternProperties[p.source]=m}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=G(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),r.additionalProperties=G(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let l=a._zod.values;if(l){let m=[...l].filter(p=>typeof p=="string"||typeof p=="number");m.length>0&&(r.required=m)}},mg=(e,t,n,i)=>{let r=e._zod.def,o=G(r.innerType,t,i),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=r.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},pg=(e,t,n,i)=>{let r=e._zod.def;G(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},fg=(e,t,n,i)=>{let r=e._zod.def;G(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},gg=(e,t,n,i)=>{let r=e._zod.def;G(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},hg=(e,t,n,i)=>{let r=e._zod.def;G(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType;let a;try{a=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},vg=(e,t,n,i)=>{let r=e._zod.def,o=r.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?o?r.out:r.in:r.out;G(a,t,i);let c=t.seen.get(e);c.ref=a},bg=(e,t,n,i)=>{let r=e._zod.def;G(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.readOnly=!0},yg=(e,t,n,i)=>{let r=e._zod.def;G(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},xc=(e,t,n,i)=>{let r=e._zod.def;G(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},Sg=(e,t,n,i)=>{let r=e._zod.innerType;G(r,t,i);let o=t.seen.get(e);o.ref=r},_c={string:zf,number:Lf,boolean:Uf,bigint:Ff,symbol:Bf,null:Vf,undefined:Gf,void:Zf,never:Wf,any:Hf,unknown:qf,date:Kf,enum:Yf,literal:Xf,nan:Jf,template_literal:Qf,file:eg,success:tg,custom:rg,function:ng,transform:ig,map:og,set:ag,array:sg,object:cg,union:Ec,intersection:ug,tuple:lg,record:dg,nullable:mg,nonoptional:pg,default:fg,prefault:gg,catch:hg,pipe:vg,readonly:bg,promise:yg,optional:xc,lazy:Sg};function Ac(e,t){if("_idmap"in e){let i=e,r=Nr({...t,processors:_c}),o={};for(let u of i._idmap.entries()){let[l,m]=u;G(m,r)}let a={},c={registry:i,uri:t?.uri,defs:o};r.external=c;for(let u of i._idmap.entries()){let[l,m]=u;Pr(r,m),a[l]=wr(r,m)}if(Object.keys(o).length>0){let u=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[u]:o}}return{schemas:a}}let n=Nr({...t,processors:_c});return G(e,n),Pr(n,e),wr(n,e)}var Ic=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=Nr({processors:_c,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return G(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),Pr(this.ctx,t);let i=wr(this.ctx,t),{"~standard":r,...o}=i;return o}};var JE={};var Do={};Nt(Do,{ZodAny:()=>Gg,ZodArray:()=>qg,ZodBase64:()=>Wc,ZodBase64URL:()=>Hc,ZodBigInt:()=>vi,ZodBigIntFormat:()=>Yc,ZodBoolean:()=>hi,ZodCIDRv4:()=>Gc,ZodCIDRv6:()=>Zc,ZodCUID:()=>jc,ZodCUID2:()=>zc,ZodCatch:()=>hh,ZodCodec:()=>Ho,ZodCustom:()=>qo,ZodCustomStringFormat:()=>fi,ZodDate:()=>Bo,ZodDefault:()=>lh,ZodDiscriminatedUnion:()=>Yg,ZodE164:()=>qc,ZodEmail:()=>Oc,ZodEmoji:()=>Dc,ZodEnum:()=>mi,ZodExactOptional:()=>sh,ZodFile:()=>oh,ZodFunction:()=>$h,ZodGUID:()=>jo,ZodIPv4:()=>Bc,ZodIPv6:()=>Vc,ZodIntersection:()=>Xg,ZodJWT:()=>Kc,ZodKSUID:()=>Fc,ZodLazy:()=>xh,ZodLiteral:()=>ih,ZodMAC:()=>jg,ZodMap:()=>rh,ZodNaN:()=>bh,ZodNanoID:()=>Mc,ZodNever:()=>Wg,ZodNonOptional:()=>ru,ZodNull:()=>Bg,ZodNullable:()=>uh,ZodNumber:()=>gi,ZodNumberFormat:()=>ln,ZodObject:()=>Go,ZodOptional:()=>tu,ZodPipe:()=>Wo,ZodPrefault:()=>mh,ZodPreprocess:()=>yh,ZodPromise:()=>Ih,ZodReadonly:()=>Sh,ZodRecord:()=>di,ZodSet:()=>nh,ZodString:()=>pi,ZodStringFormat:()=>Y,ZodSuccess:()=>gh,ZodSymbol:()=>Ug,ZodTemplateLiteral:()=>Eh,ZodTransform:()=>ah,ZodTuple:()=>Qg,ZodType:()=>k,ZodULID:()=>Lc,ZodURL:()=>Fo,ZodUUID:()=>Dt,ZodUndefined:()=>Fg,ZodUnion:()=>Zo,ZodUnknown:()=>Zg,ZodVoid:()=>Hg,ZodXID:()=>Uc,ZodXor:()=>Kg,_ZodString:()=>kc,_default:()=>dh,_function:()=>sA,any:()=>zx,array:()=>Vo,base64:()=>_x,base64url:()=>Ex,bigint:()=>kx,boolean:()=>Lg,catch:()=>vh,check:()=>cA,cidrv4:()=>yx,cidrv6:()=>Sx,codec:()=>nA,cuid:()=>dx,cuid2:()=>mx,custom:()=>uA,date:()=>Ux,describe:()=>lA,discriminatedUnion:()=>Wx,e164:()=>xx,email:()=>tx,emoji:()=>ux,enum:()=>Qc,exactOptional:()=>ch,file:()=>Qx,float32:()=>Cx,float64:()=>Nx,function:()=>sA,guid:()=>rx,hash:()=>Rx,hex:()=>Tx,hostname:()=>$x,httpUrl:()=>cx,instanceof:()=>mA,int:()=>Pc,int32:()=>Px,int64:()=>Ox,intersection:()=>Jg,invertCodec:()=>iA,ipv4:()=>hx,ipv6:()=>bx,json:()=>fA,jwt:()=>Ax,keyof:()=>Fx,ksuid:()=>gx,lazy:()=>Ah,literal:()=>Jx,looseObject:()=>Gx,looseRecord:()=>qx,mac:()=>vx,map:()=>Kx,meta:()=>dA,nan:()=>rA,nanoid:()=>lx,nativeEnum:()=>Xx,never:()=>Xc,nonoptional:()=>fh,null:()=>Vg,nullable:()=>Lo,nullish:()=>eA,number:()=>zg,object:()=>Bx,optional:()=>zo,partialRecord:()=>Hx,pipe:()=>wc,prefault:()=>ph,preprocess:()=>gA,promise:()=>aA,readonly:()=>_h,record:()=>th,refine:()=>Th,set:()=>Yx,strictObject:()=>Vx,string:()=>Mo,stringFormat:()=>Ix,stringbool:()=>pA,success:()=>tA,superRefine:()=>Rh,symbol:()=>Mx,templateLiteral:()=>oA,transform:()=>eu,tuple:()=>eh,uint32:()=>wx,uint64:()=>Dx,ulid:()=>px,undefined:()=>jx,union:()=>Jc,unknown:()=>un,url:()=>sx,uuid:()=>nx,uuidv4:()=>ix,uuidv6:()=>ox,uuidv7:()=>ax,void:()=>Lx,xid:()=>fx,xor:()=>Zx});var $c={};Nt($c,{endsWith:()=>ti,gt:()=>kt,gte:()=>ze,includes:()=>Qn,length:()=>cn,lowercase:()=>Xn,lt:()=>wt,lte:()=>rt,maxLength:()=>sn,maxSize:()=>Cr,mime:()=>ri,minLength:()=>rr,minSize:()=>Ot,multipleOf:()=>Rr,negative:()=>vc,nonnegative:()=>yc,nonpositive:()=>bc,normalize:()=>ni,overwrite:()=>xt,positive:()=>hc,property:()=>Sc,regex:()=>Yn,size:()=>an,slugify:()=>si,startsWith:()=>ei,toLowerCase:()=>oi,toUpperCase:()=>ai,trim:()=>ii,uppercase:()=>Jn});var li={};Nt(li,{ZodISODate:()=>Rc,ZodISODateTime:()=>Tc,ZodISODuration:()=>Nc,ZodISOTime:()=>Cc,date:()=>Eg,datetime:()=>_g,duration:()=>Ag,time:()=>xg});var Tc=f("ZodISODateTime",(e,t)=>{Xm.init(e,t),Y.init(e,t)});function _g(e){return tf(Tc,e)}var Rc=f("ZodISODate",(e,t)=>{Jm.init(e,t),Y.init(e,t)});function Eg(e){return rf(Rc,e)}var Cc=f("ZodISOTime",(e,t)=>{Qm.init(e,t),Y.init(e,t)});function xg(e){return nf(Cc,e)}var Nc=f("ZodISODuration",(e,t)=>{ep.init(e,t),Y.init(e,t)});function Ag(e){return of(Nc,e)}var QE=(e,t)=>{Eo.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Ao(e,n)},flatten:{value:n=>xo(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Fn,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Fn,2)}},isEmpty:{get(){return e.issues.length===0}}})},bM=f("ZodError",QE),We=f("ZodError",QE,{Parent:Error});var Ig=Gn(We),$g=Zn(We),Tg=Wn(We),Rg=Hn(We),Cg=As(We),Ng=Is(We),Pg=$s(We),wg=Ts(We),kg=Rs(We),Og=Cs(We),Dg=Ns(We),Mg=Ps(We);var ex=new WeakMap;function Uo(e,t,n){let i=Object.getPrototypeOf(e),r=ex.get(i);if(r||(r=new Set,ex.set(i,r)),!r.has(t)){r.add(t);for(let o in n){let a=n[o];Object.defineProperty(i,o,{configurable:!0,enumerable:!1,get(){let c=a.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:c}),c},set(c){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:c})}})}}}var k=f("ZodType",(e,t)=>(w.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:ui(e,"input"),output:ui(e,"output")}}),e.toJSONSchema=jf(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,i)=>Ig(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>Tg(e,n,i),e.parseAsync=async(n,i)=>$g(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>Rg(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>Cg(e,n,i),e.decode=(n,i)=>Ng(e,n,i),e.encodeAsync=async(n,i)=>Pg(e,n,i),e.decodeAsync=async(n,i)=>wg(e,n,i),e.safeEncode=(n,i)=>kg(e,n,i),e.safeDecode=(n,i)=>Og(e,n,i),e.safeEncodeAsync=async(n,i)=>Dg(e,n,i),e.safeDecodeAsync=async(n,i)=>Mg(e,n,i),Uo(e,"ZodType",{check(...n){let i=this.def;return this.clone(_.mergeDefs(i,{checks:[...i.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,i){return Me(this,n,i)},brand(){return this},register(n,i){return n.add(this,i),this},refine(n,i){return this.check(Th(n,i))},superRefine(n,i){return this.check(Rh(n,i))},overwrite(n){return this.check(xt(n))},optional(){return zo(this)},exactOptional(){return ch(this)},nullable(){return Lo(this)},nullish(){return zo(Lo(this))},nonoptional(n){return fh(this,n)},array(){return Vo(this)},or(n){return Jc([this,n])},and(n){return Jg(this,n)},transform(n){return wc(this,eu(n))},default(n){return dh(this,n)},prefault(n){return ph(this,n)},catch(n){return vh(this,n)},pipe(n){return wc(this,n)},readonly(){return _h(this)},describe(n){let i=this.clone();return Ae.add(i,{description:n}),i},meta(...n){if(n.length===0)return Ae.get(this);let i=this.clone();return Ae.add(i,n[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Ae.get(e)?.description},configurable:!0}),e)),kc=f("_ZodString",(e,t)=>{on.init(e,t),k.init(e,t),e._zod.processJSONSchema=(i,r,o)=>zf(e,i,r,o);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Uo(e,"_ZodString",{regex(...i){return this.check(Yn(...i))},includes(...i){return this.check(Qn(...i))},startsWith(...i){return this.check(ei(...i))},endsWith(...i){return this.check(ti(...i))},min(...i){return this.check(rr(...i))},max(...i){return this.check(sn(...i))},length(...i){return this.check(cn(...i))},nonempty(...i){return this.check(rr(1,...i))},lowercase(i){return this.check(Xn(i))},uppercase(i){return this.check(Jn(i))},trim(){return this.check(ii())},normalize(...i){return this.check(ni(...i))},toLowerCase(){return this.check(oi())},toUpperCase(){return this.check(ai())},slugify(){return this.check(si())}})}),pi=f("ZodString",(e,t)=>{on.init(e,t),kc.init(e,t),e.email=n=>e.check(Ys(Oc,n)),e.url=n=>e.check(Oo(Fo,n)),e.jwt=n=>e.check(gc(Kc,n)),e.emoji=n=>e.check(tc(Dc,n)),e.guid=n=>e.check(ko(jo,n)),e.uuid=n=>e.check(Xs(Dt,n)),e.uuidv4=n=>e.check(Js(Dt,n)),e.uuidv6=n=>e.check(Qs(Dt,n)),e.uuidv7=n=>e.check(ec(Dt,n)),e.nanoid=n=>e.check(rc(Mc,n)),e.guid=n=>e.check(ko(jo,n)),e.cuid=n=>e.check(nc(jc,n)),e.cuid2=n=>e.check(ic(zc,n)),e.ulid=n=>e.check(oc(Lc,n)),e.base64=n=>e.check(mc(Wc,n)),e.base64url=n=>e.check(pc(Hc,n)),e.xid=n=>e.check(ac(Uc,n)),e.ksuid=n=>e.check(sc(Fc,n)),e.ipv4=n=>e.check(cc(Bc,n)),e.ipv6=n=>e.check(uc(Vc,n)),e.cidrv4=n=>e.check(lc(Gc,n)),e.cidrv6=n=>e.check(dc(Zc,n)),e.e164=n=>e.check(fc(qc,n)),e.datetime=n=>e.check(_g(n)),e.date=n=>e.check(Eg(n)),e.time=n=>e.check(xg(n)),e.duration=n=>e.check(Ag(n))});function Mo(e){return Xp(pi,e)}var Y=f("ZodStringFormat",(e,t)=>{K.init(e,t),kc.init(e,t)}),Oc=f("ZodEmail",(e,t)=>{Bm.init(e,t),Y.init(e,t)});function tx(e){return Ys(Oc,e)}var jo=f("ZodGUID",(e,t)=>{Um.init(e,t),Y.init(e,t)});function rx(e){return ko(jo,e)}var Dt=f("ZodUUID",(e,t)=>{Fm.init(e,t),Y.init(e,t)});function nx(e){return Xs(Dt,e)}function ix(e){return Js(Dt,e)}function ox(e){return Qs(Dt,e)}function ax(e){return ec(Dt,e)}var Fo=f("ZodURL",(e,t)=>{Vm.init(e,t),Y.init(e,t)});function sx(e){return Oo(Fo,e)}function cx(e){return Oo(Fo,{protocol:tt.httpProtocol,hostname:tt.domain,..._.normalizeParams(e)})}var Dc=f("ZodEmoji",(e,t)=>{Gm.init(e,t),Y.init(e,t)});function ux(e){return tc(Dc,e)}var Mc=f("ZodNanoID",(e,t)=>{Zm.init(e,t),Y.init(e,t)});function lx(e){return rc(Mc,e)}var jc=f("ZodCUID",(e,t)=>{Wm.init(e,t),Y.init(e,t)});function dx(e){return nc(jc,e)}var zc=f("ZodCUID2",(e,t)=>{Hm.init(e,t),Y.init(e,t)});function mx(e){return ic(zc,e)}var Lc=f("ZodULID",(e,t)=>{qm.init(e,t),Y.init(e,t)});function px(e){return oc(Lc,e)}var Uc=f("ZodXID",(e,t)=>{Km.init(e,t),Y.init(e,t)});function fx(e){return ac(Uc,e)}var Fc=f("ZodKSUID",(e,t)=>{Ym.init(e,t),Y.init(e,t)});function gx(e){return sc(Fc,e)}var Bc=f("ZodIPv4",(e,t)=>{tp.init(e,t),Y.init(e,t)});function hx(e){return cc(Bc,e)}var jg=f("ZodMAC",(e,t)=>{np.init(e,t),Y.init(e,t)});function vx(e){return Qp(jg,e)}var Vc=f("ZodIPv6",(e,t)=>{rp.init(e,t),Y.init(e,t)});function bx(e){return uc(Vc,e)}var Gc=f("ZodCIDRv4",(e,t)=>{ip.init(e,t),Y.init(e,t)});function yx(e){return lc(Gc,e)}var Zc=f("ZodCIDRv6",(e,t)=>{op.init(e,t),Y.init(e,t)});function Sx(e){return dc(Zc,e)}var Wc=f("ZodBase64",(e,t)=>{sp.init(e,t),Y.init(e,t)});function _x(e){return mc(Wc,e)}var Hc=f("ZodBase64URL",(e,t)=>{cp.init(e,t),Y.init(e,t)});function Ex(e){return pc(Hc,e)}var qc=f("ZodE164",(e,t)=>{up.init(e,t),Y.init(e,t)});function xx(e){return fc(qc,e)}var Kc=f("ZodJWT",(e,t)=>{lp.init(e,t),Y.init(e,t)});function Ax(e){return gc(Kc,e)}var fi=f("ZodCustomStringFormat",(e,t)=>{dp.init(e,t),Y.init(e,t)});function Ix(e,t,n={}){return ci(fi,e,t,n)}function $x(e){return ci(fi,"hostname",tt.hostname,e)}function Tx(e){return ci(fi,"hex",tt.hex,e)}function Rx(e,t){let n=t?.enc??"hex",i=`${e}_${n}`,r=tt[i];if(!r)throw new Error(`Unrecognized hash format: ${i}`);return ci(fi,i,r,t)}var gi=f("ZodNumber",(e,t)=>{Us.init(e,t),k.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Lf(e,i,r,o),Uo(e,"ZodNumber",{gt(i,r){return this.check(kt(i,r))},gte(i,r){return this.check(ze(i,r))},min(i,r){return this.check(ze(i,r))},lt(i,r){return this.check(wt(i,r))},lte(i,r){return this.check(rt(i,r))},max(i,r){return this.check(rt(i,r))},int(i){return this.check(Pc(i))},safe(i){return this.check(Pc(i))},positive(i){return this.check(kt(0,i))},nonnegative(i){return this.check(ze(0,i))},negative(i){return this.check(wt(0,i))},nonpositive(i){return this.check(rt(0,i))},multipleOf(i,r){return this.check(Rr(i,r))},step(i,r){return this.check(Rr(i,r))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function zg(e){return af(gi,e)}var ln=f("ZodNumberFormat",(e,t)=>{mp.init(e,t),gi.init(e,t)});function Pc(e){return cf(ln,e)}function Cx(e){return uf(ln,e)}function Nx(e){return lf(ln,e)}function Px(e){return df(ln,e)}function wx(e){return mf(ln,e)}var hi=f("ZodBoolean",(e,t)=>{Ro.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Uf(e,n,i,r)});function Lg(e){return pf(hi,e)}var vi=f("ZodBigInt",(e,t)=>{Fs.init(e,t),k.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Ff(e,i,r,o),e.gte=(i,r)=>e.check(ze(i,r)),e.min=(i,r)=>e.check(ze(i,r)),e.gt=(i,r)=>e.check(kt(i,r)),e.gte=(i,r)=>e.check(ze(i,r)),e.min=(i,r)=>e.check(ze(i,r)),e.lt=(i,r)=>e.check(wt(i,r)),e.lte=(i,r)=>e.check(rt(i,r)),e.max=(i,r)=>e.check(rt(i,r)),e.positive=i=>e.check(kt(BigInt(0),i)),e.negative=i=>e.check(wt(BigInt(0),i)),e.nonpositive=i=>e.check(rt(BigInt(0),i)),e.nonnegative=i=>e.check(ze(BigInt(0),i)),e.multipleOf=(i,r)=>e.check(Rr(i,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function kx(e){return gf(vi,e)}var Yc=f("ZodBigIntFormat",(e,t)=>{pp.init(e,t),vi.init(e,t)});function Ox(e){return vf(Yc,e)}function Dx(e){return bf(Yc,e)}var Ug=f("ZodSymbol",(e,t)=>{fp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Bf(e,n,i,r)});function Mx(e){return yf(Ug,e)}var Fg=f("ZodUndefined",(e,t)=>{gp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Gf(e,n,i,r)});function jx(e){return Sf(Fg,e)}var Bg=f("ZodNull",(e,t)=>{hp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Vf(e,n,i,r)});function Vg(e){return _f(Bg,e)}var Gg=f("ZodAny",(e,t)=>{vp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Hf(e,n,i,r)});function zx(){return Ef(Gg)}var Zg=f("ZodUnknown",(e,t)=>{bp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>qf(e,n,i,r)});function un(){return xf(Zg)}var Wg=f("ZodNever",(e,t)=>{yp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Wf(e,n,i,r)});function Xc(e){return Af(Wg,e)}var Hg=f("ZodVoid",(e,t)=>{Sp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Zf(e,n,i,r)});function Lx(e){return If(Hg,e)}var Bo=f("ZodDate",(e,t)=>{_p.init(e,t),k.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Kf(e,i,r,o),e.min=(i,r)=>e.check(ze(i,r)),e.max=(i,r)=>e.check(rt(i,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Ux(e){return $f(Bo,e)}var qg=f("ZodArray",(e,t)=>{Ep.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>sg(e,n,i,r),e.element=t.element,Uo(e,"ZodArray",{min(n,i){return this.check(rr(n,i))},nonempty(n){return this.check(rr(1,n))},max(n,i){return this.check(sn(n,i))},length(n,i){return this.check(cn(n,i))},unwrap(){return this.element}})});function Vo(e,t){return Cf(qg,e,t)}function Fx(e){let t=e._zod.def.shape;return Qc(Object.keys(t))}var Go=f("ZodObject",(e,t)=>{xp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>cg(e,n,i,r),_.defineLazy(e,"shape",()=>t.shape),Uo(e,"ZodObject",{keyof(){return Qc(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:un()})},loose(){return this.clone({...this._zod.def,catchall:un()})},strict(){return this.clone({...this._zod.def,catchall:Xc()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return _.extend(this,n)},safeExtend(n){return _.safeExtend(this,n)},merge(n){return _.merge(this,n)},pick(n){return _.pick(this,n)},omit(n){return _.omit(this,n)},partial(...n){return _.partial(tu,this,n[0])},required(...n){return _.required(ru,this,n[0])}})});function Bx(e,t){let n={type:"object",shape:e??{},..._.normalizeParams(t)};return new Go(n)}function Vx(e,t){return new Go({type:"object",shape:e,catchall:Xc(),..._.normalizeParams(t)})}function Gx(e,t){return new Go({type:"object",shape:e,catchall:un(),..._.normalizeParams(t)})}var Zo=f("ZodUnion",(e,t)=>{Co.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ec(e,n,i,r),e.options=t.options});function Jc(e,t){return new Zo({type:"union",options:e,..._.normalizeParams(t)})}var Kg=f("ZodXor",(e,t)=>{Zo.init(e,t),Ap.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ec(e,n,i,r),e.options=t.options});function Zx(e,t){return new Kg({type:"union",options:e,inclusive:!1,..._.normalizeParams(t)})}var Yg=f("ZodDiscriminatedUnion",(e,t)=>{Zo.init(e,t),Ip.init(e,t)});function Wx(e,t,n){return new Yg({type:"union",options:t,discriminator:e,..._.normalizeParams(n)})}var Xg=f("ZodIntersection",(e,t)=>{$p.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ug(e,n,i,r)});function Jg(e,t){return new Xg({type:"intersection",left:e,right:t})}var Qg=f("ZodTuple",(e,t)=>{Bs.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>lg(e,n,i,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});function eh(e,t,n){let i=t instanceof w,r=i?n:t,o=i?t:null;return new Qg({type:"tuple",items:e,rest:o,..._.normalizeParams(r)})}var di=f("ZodRecord",(e,t)=>{Tp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>dg(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType});function th(e,t,n){return!t||!t._zod?new di({type:"record",keyType:Mo(),valueType:e,..._.normalizeParams(t)}):new di({type:"record",keyType:e,valueType:t,..._.normalizeParams(n)})}function Hx(e,t,n){let i=Me(e);return i._zod.values=void 0,new di({type:"record",keyType:i,valueType:t,..._.normalizeParams(n)})}function qx(e,t,n){return new di({type:"record",keyType:e,valueType:t,mode:"loose",..._.normalizeParams(n)})}var rh=f("ZodMap",(e,t)=>{Rp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>og(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Ot(...n)),e.nonempty=n=>e.check(Ot(1,n)),e.max=(...n)=>e.check(Cr(...n)),e.size=(...n)=>e.check(an(...n))});function Kx(e,t,n){return new rh({type:"map",keyType:e,valueType:t,..._.normalizeParams(n)})}var nh=f("ZodSet",(e,t)=>{Cp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ag(e,n,i,r),e.min=(...n)=>e.check(Ot(...n)),e.nonempty=n=>e.check(Ot(1,n)),e.max=(...n)=>e.check(Cr(...n)),e.size=(...n)=>e.check(an(...n))});function Yx(e,t){return new nh({type:"set",valueType:e,..._.normalizeParams(t)})}var mi=f("ZodEnum",(e,t)=>{Np.init(e,t),k.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Yf(e,i,r,o),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(i,r)=>{let o={};for(let a of i)if(n.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new mi({...t,checks:[],..._.normalizeParams(r),entries:o})},e.exclude=(i,r)=>{let o={...t.entries};for(let a of i)if(n.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new mi({...t,checks:[],..._.normalizeParams(r),entries:o})}});function Qc(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new mi({type:"enum",entries:n,..._.normalizeParams(t)})}function Xx(e,t){return new mi({type:"enum",entries:e,..._.normalizeParams(t)})}var ih=f("ZodLiteral",(e,t)=>{Pp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Xf(e,n,i,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Jx(e,t){return new ih({type:"literal",values:Array.isArray(e)?e:[e],..._.normalizeParams(t)})}var oh=f("ZodFile",(e,t)=>{wp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>eg(e,n,i,r),e.min=(n,i)=>e.check(Ot(n,i)),e.max=(n,i)=>e.check(Cr(n,i)),e.mime=(n,i)=>e.check(ri(Array.isArray(n)?n:[n],i))});function Qx(e){return Nf(oh,e)}var ah=f("ZodTransform",(e,t)=>{kp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ig(e,n,i,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new xr(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(_.issue(o,n.value,t));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(_.issue(a))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(o=>(n.value=o,n.fallback=!0,n)):(n.value=r,n.fallback=!0,n)}});function eu(e){return new ah({type:"transform",transform:e})}var tu=f("ZodOptional",(e,t)=>{Vs.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>xc(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function zo(e){return new tu({type:"optional",innerType:e})}var sh=f("ZodExactOptional",(e,t)=>{Op.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>xc(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function ch(e){return new sh({type:"optional",innerType:e})}var uh=f("ZodNullable",(e,t)=>{Dp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>mg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Lo(e){return new uh({type:"nullable",innerType:e})}function eA(e){return zo(Lo(e))}var lh=f("ZodDefault",(e,t)=>{Mp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>fg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function dh(e,t){return new lh({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():_.shallowClone(t)}})}var mh=f("ZodPrefault",(e,t)=>{jp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>gg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function ph(e,t){return new mh({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():_.shallowClone(t)}})}var ru=f("ZodNonOptional",(e,t)=>{zp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>pg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function fh(e,t){return new ru({type:"nonoptional",innerType:e,..._.normalizeParams(t)})}var gh=f("ZodSuccess",(e,t)=>{Lp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>tg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function tA(e){return new gh({type:"success",innerType:e})}var hh=f("ZodCatch",(e,t)=>{Up.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>hg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function vh(e,t){return new hh({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var bh=f("ZodNaN",(e,t)=>{Fp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Jf(e,n,i,r)});function rA(e){return Rf(bh,e)}var Wo=f("ZodPipe",(e,t)=>{Gs.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>vg(e,n,i,r),e.in=t.in,e.out=t.out});function wc(e,t){return new Wo({type:"pipe",in:e,out:t})}var Ho=f("ZodCodec",(e,t)=>{Wo.init(e,t),No.init(e,t)});function nA(e,t,n){return new Ho({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function iA(e){let t=e._zod.def;return new Ho({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var yh=f("ZodPreprocess",(e,t)=>{Wo.init(e,t),Bp.init(e,t)}),Sh=f("ZodReadonly",(e,t)=>{Vp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>bg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function _h(e){return new Sh({type:"readonly",innerType:e})}var Eh=f("ZodTemplateLiteral",(e,t)=>{Gp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Qf(e,n,i,r)});function oA(e,t){return new Eh({type:"template_literal",parts:e,..._.normalizeParams(t)})}var xh=f("ZodLazy",(e,t)=>{Hp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Sg(e,n,i,r),e.unwrap=()=>e._zod.def.getter()});function Ah(e){return new xh({type:"lazy",getter:e})}var Ih=f("ZodPromise",(e,t)=>{Wp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>yg(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function aA(e){return new Ih({type:"promise",innerType:e})}var $h=f("ZodFunction",(e,t)=>{Zp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ng(e,n,i,r)});function sA(e){return new $h({type:"function",input:Array.isArray(e?.input)?eh(e?.input):e?.input??Vo(un()),output:e?.output??un()})}var qo=f("ZodCustom",(e,t)=>{qp.init(e,t),k.init(e,t),e._zod.processJSONSchema=(n,i,r)=>rg(e,n,i,r)});function cA(e){let t=new J({check:"custom"});return t._zod.check=e,t}function uA(e,t){return Pf(qo,e??(()=>!0),t)}function Th(e,t={}){return wf(qo,e,t)}function Rh(e,t){return kf(e,t)}var lA=Of,dA=Df;function mA(e,t={}){let n=new qo({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,..._.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:n,path:[...n._zod.def.path??[]]})},n}var pA=(...e)=>Mf({Codec:Ho,Boolean:hi,String:pi},...e);function fA(e){let t=Ah(()=>Jc([Mo(e),zg(),Lg(),Vg(),Vo(t),th(Mo(),t)]));return t}function gA(e,t){return new yh({type:"pipe",in:eu(e),out:t})}var SM={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 _M(e){ue({customError:e})}function EM(){return ue().customError}var Ch;Ch||(Ch={});var x={...Do,...$c,iso:li},xM=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 AM(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function IM(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===i){let r=n[1];if(!r||!t.defs[r])throw new Error(`Reference not found: ${e}`);return t.defs[r]}throw new Error(`Reference not found: ${e}`)}function hA(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return x.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return x.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let o=IM(r,t),a=Ne(o,t);return t.refs.set(r,a),t.processing.delete(r),a}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return x.null();if(r.length===0)return x.never();if(r.length===1)return x.literal(r[0]);if(r.every(a=>typeof a=="string"))return x.enum(r);let o=r.map(a=>x.literal(a));return o.length<2?o[0]:x.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return x.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(o=>{let a={...e,type:o};return hA(a,t)});return r.length===0?x.never():r.length===1?r[0]:x.union(r)}if(!n)return x.any();let i;switch(n){case"string":{let r=x.string();if(e.format){let o=e.format;o==="email"?r=r.check(x.email()):o==="uri"||o==="uri-reference"?r=r.check(x.url()):o==="uuid"||o==="guid"?r=r.check(x.uuid()):o==="date-time"?r=r.check(x.iso.datetime()):o==="date"?r=r.check(x.iso.date()):o==="time"?r=r.check(x.iso.time()):o==="duration"?r=r.check(x.iso.duration()):o==="ipv4"?r=r.check(x.ipv4()):o==="ipv6"?r=r.check(x.ipv6()):o==="mac"?r=r.check(x.mac()):o==="cidr"?r=r.check(x.cidrv4()):o==="cidr-v6"?r=r.check(x.cidrv6()):o==="base64"?r=r.check(x.base64()):o==="base64url"?r=r.check(x.base64url()):o==="e164"?r=r.check(x.e164()):o==="jwt"?r=r.check(x.jwt()):o==="emoji"?r=r.check(x.emoji()):o==="nanoid"?r=r.check(x.nanoid()):o==="cuid"?r=r.check(x.cuid()):o==="cuid2"?r=r.check(x.cuid2()):o==="ulid"?r=r.check(x.ulid()):o==="xid"?r=r.check(x.xid()):o==="ksuid"&&(r=r.check(x.ksuid()))}typeof e.minLength=="number"&&(r=r.min(e.minLength)),typeof e.maxLength=="number"&&(r=r.max(e.maxLength)),e.pattern&&(r=r.regex(new RegExp(e.pattern))),i=r;break}case"number":case"integer":{let r=n==="integer"?x.number().int():x.number();typeof e.minimum=="number"&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&(r=r.max(e.maximum)),typeof e.exclusiveMinimum=="number"?r=r.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),i=r;break}case"boolean":{i=x.boolean();break}case"null":{i=x.null();break}case"object":{let r={},o=e.properties||{},a=new Set(e.required||[]);for(let[u,l]of Object.entries(o)){let m=Ne(l,t);r[u]=a.has(u)?m:m.optional()}if(e.propertyNames){let u=Ne(e.propertyNames,t),l=e.additionalProperties&&typeof e.additionalProperties=="object"?Ne(e.additionalProperties,t):x.any();if(Object.keys(r).length===0){i=x.record(u,l);break}let m=x.object(r).passthrough(),p=x.looseRecord(u,l);i=x.intersection(m,p);break}if(e.patternProperties){let u=e.patternProperties,l=Object.keys(u),m=[];for(let g of l){let v=Ne(u[g],t),A=x.string().regex(new RegExp(g));m.push(x.looseRecord(A,v))}let p=[];if(Object.keys(r).length>0&&p.push(x.object(r).passthrough()),p.push(...m),p.length===0)i=x.object({}).passthrough();else if(p.length===1)i=p[0];else{let g=x.intersection(p[0],p[1]);for(let v=2;v<p.length;v++)g=x.intersection(g,p[v]);i=g}break}let c=x.object(r);e.additionalProperties===!1?i=c.strict():typeof e.additionalProperties=="object"?i=c.catchall(Ne(e.additionalProperties,t)):i=c.passthrough();break}case"array":{let r=e.prefixItems,o=e.items;if(r&&Array.isArray(r)){let a=r.map(u=>Ne(u,t)),c=o&&typeof o=="object"&&!Array.isArray(o)?Ne(o,t):void 0;c?i=x.tuple(a).rest(c):i=x.tuple(a),typeof e.minItems=="number"&&(i=i.check(x.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(x.maxLength(e.maxItems)))}else if(Array.isArray(o)){let a=o.map(u=>Ne(u,t)),c=e.additionalItems&&typeof e.additionalItems=="object"?Ne(e.additionalItems,t):void 0;c?i=x.tuple(a).rest(c):i=x.tuple(a),typeof e.minItems=="number"&&(i=i.check(x.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(x.maxLength(e.maxItems)))}else if(o!==void 0){let a=Ne(o,t),c=x.array(a);typeof e.minItems=="number"&&(c=c.min(e.minItems)),typeof e.maxItems=="number"&&(c=c.max(e.maxItems)),i=c}else i=x.array(x.any());break}default:throw new Error(`Unsupported type: ${n}`)}return i}function Ne(e,t){if(typeof e=="boolean")return e?x.any():x.never();let n=hA(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let c=e.anyOf.map(l=>Ne(l,t)),u=x.union(c);n=i?x.intersection(n,u):u}if(e.oneOf&&Array.isArray(e.oneOf)){let c=e.oneOf.map(l=>Ne(l,t)),u=x.xor(c);n=i?x.intersection(n,u):u}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=i?n:x.any();else{let c=i?n:Ne(e.allOf[0],t),u=i?0:1;for(let l=u;l<e.allOf.length;l++)c=x.intersection(c,Ne(e.allOf[l],t));n=c}e.nullable===!0&&t.version==="openapi-3.0"&&(n=x.nullable(n)),e.readOnly===!0&&(n=x.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let r={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let c of o)c in e&&(r[c]=e[c]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let c of a)c in e&&(r[c]=e[c]);for(let c of Object.keys(e))xM.has(c)||(r[c]=e[c]);return Object.keys(r).length>0&&t.registry.add(n,r),e.description&&(n=n.describe(e.description)),n}function vA(e,t){if(typeof e=="boolean")return e?x.any():x.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=AM(n,t?.defaultTarget),r=n.$defs||n.definitions||{},o={version:i,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Ae};return Ne(n,o)}var Nh={};Nt(Nh,{bigint:()=>CM,boolean:()=>RM,date:()=>NM,number:()=>TM,string:()=>$M});function $M(e){return Jp(pi,e)}function TM(e){return sf(gi,e)}function RM(e){return ff(hi,e)}function CM(e){return hf(vi,e)}function NM(e){return Tf(Bo,e)}ue(Zs());var PM=Object.defineProperty,wM=(e,t)=>PM(e,"name",{value:t,configurable:!0});var bA=/^[A-Za-z][A-Za-z0-9]*$/,yA=128;var Ph=s.object({legacyAnchor:s.string().min(1).max(yA).regex(bA,"legacyAnchor must be alphanumeric and start with a letter"),legacyOwnerId:s.string().min(1).max(512).optional(),legacySgDescription:s.string().min(1).max(255).optional()}).strict(),kM=s.record(s.string().min(1),s.record(s.string().min(1),Ph)),OM=s.record(s.string().min(1),s.record(s.string().min(1),s.record(s.string().min(1),Ph)));function SA(e,t){if(e===void 0)return;let n={};for(let[i,r]of Object.entries(e)){let o=r[t];o===void 0||Object.keys(o).length===0||(n[i]=o)}return Object.keys(n).length===0?void 0:n}wM(SA,"projectCapacityIdentityToTarget");var DM=Object.defineProperty,MM=(e,t)=>DM(e,"name",{value:t,configurable:!0});function _A(e){let t=new Map;for(let n of e){let i=Qr(n);if(i==="")return{kind:"empty-construct-key",name:n};let r=t.get(i);if(r!==void 0)return{kind:"duplicate-construct-key",name:n,existingName:r,constructKey:i};t.set(i,n)}return null}MM(_A,"findAccountNameCollision");var jM=Object.defineProperty,Ko=(e,t)=>jM(e,"name",{value:t,configurable:!0}),bi="us-east-2";var lt=Object.freeze([{code:"us-east-2",name:"US East",city:"Ohio",country:"USA",optIn:!1},{code:"us-west-2",name:"US West",city:"Oregon",country:"USA",optIn:!1},{code:"us-east-1",name:"US East",city:"N. Virginia",country:"USA",optIn:!1},{code:"eu-west-1",name:"EU West",city:"Ireland",country:"Ireland",optIn:!1},{code:"eu-central-1",name:"EU Central",city:"Frankfurt",country:"Germany",optIn:!1},{code:"ap-southeast-1",name:"Asia Pacific",city:"Singapore",country:"Singapore",optIn:!1},{code:"ap-northeast-1",name:"Asia Pacific",city:"Tokyo",country:"Japan",optIn:!1},{code:"ap-southeast-2",name:"Asia Pacific",city:"Sydney",country:"Australia",optIn:!1},{code:"us-west-1",name:"US West",city:"N. California",country:"USA",optIn:!1},{code:"ca-central-1",name:"Canada",city:"Central",country:"Canada",optIn:!1},{code:"af-south-1",name:"Africa",city:"Cape Town",country:"South Africa",optIn:!0},{code:"ap-east-1",name:"Asia Pacific",city:"Hong Kong",country:"Hong Kong",optIn:!0},{code:"ap-northeast-2",name:"Asia Pacific",city:"Seoul",country:"South Korea",optIn:!1},{code:"ap-northeast-3",name:"Asia Pacific",city:"Osaka",country:"Japan",optIn:!1},{code:"ap-south-1",name:"Asia Pacific",city:"Mumbai",country:"India",optIn:!1},{code:"ap-south-2",name:"Asia Pacific",city:"Hyderabad",country:"India",optIn:!0},{code:"ap-southeast-3",name:"Asia Pacific",city:"Jakarta",country:"Indonesia",optIn:!0},{code:"ap-southeast-4",name:"Asia Pacific",city:"Melbourne",country:"Australia",optIn:!0},{code:"eu-central-2",name:"EU Central",city:"Zurich",country:"Switzerland",optIn:!0},{code:"eu-north-1",name:"EU North",city:"Stockholm",country:"Sweden",optIn:!1},{code:"eu-south-1",name:"EU South",city:"Milan",country:"Italy",optIn:!0},{code:"eu-south-2",name:"EU South",city:"Spain",country:"Spain",optIn:!0},{code:"eu-west-2",name:"EU West",city:"London",country:"UK",optIn:!1},{code:"eu-west-3",name:"EU West",city:"Paris",country:"France",optIn:!1},{code:"me-central-1",name:"Middle East",city:"UAE",country:"UAE",optIn:!0},{code:"me-south-1",name:"Middle East",city:"Bahrain",country:"Bahrain",optIn:!0},{code:"sa-east-1",name:"South America",city:"S\xE3o Paulo",country:"Brazil",optIn:!1},{code:"ap-southeast-5",name:"Asia Pacific",city:"Kuala Lumpur",country:"Malaysia",optIn:!0},{code:"ap-southeast-6",name:"Asia Pacific",city:"Auckland",country:"New Zealand",optIn:!0},{code:"ap-southeast-7",name:"Asia Pacific",city:"Bangkok",country:"Thailand",optIn:!0},{code:"ap-east-2",name:"Asia Pacific",city:"Taipei",country:"Taiwan",optIn:!0},{code:"ca-west-1",name:"Canada West",city:"Calgary",country:"Canada",optIn:!0},{code:"il-central-1",name:"Israel",city:"Tel Aviv",country:"Israel",optIn:!0},{code:"mx-central-1",name:"Mexico",city:"Central",country:"Mexico",optIn:!0}]),ir=Object.freeze(lt.map(e=>e.code)),nu=new Set(lt.filter(e=>e.optIn).map(e=>e.code));function iu(e){return`${e} is an opt-in region: it must be enabled in the AWS account (Account settings \u2192 Regions) before deployment will succeed.`}Ko(iu,"optInRegionWarning");function yi(e){return lt.find(t=>t.code===e)}Ko(yi,"getRegionInfo");function Si(e){let t=e.split("-");return t.length===3&&t[0]&&t[1]&&t[2]?`${t[0]}${t[1][0]}${t[2]}`:e}Ko(Si,"abbreviateRegion");var zM=Object.freeze({"Europe/London":"eu-west-2","Europe/Jersey":"eu-west-2","Europe/Guernsey":"eu-west-2","Europe/Isle_of_Man":"eu-west-2","Europe/Dublin":"eu-west-1","Europe/Paris":"eu-west-3","Europe/Berlin":"eu-central-1","Europe/Amsterdam":"eu-central-1","Europe/Brussels":"eu-central-1","Europe/Luxembourg":"eu-central-1","Europe/Vienna":"eu-central-1","Europe/Prague":"eu-central-1","Europe/Warsaw":"eu-central-1","Europe/Budapest":"eu-central-1","Europe/Zurich":"eu-central-2","Europe/Stockholm":"eu-north-1","Europe/Oslo":"eu-north-1","Europe/Copenhagen":"eu-north-1","Europe/Helsinki":"eu-north-1","Europe/Tallinn":"eu-north-1","Europe/Riga":"eu-north-1","Europe/Vilnius":"eu-north-1","Europe/Rome":"eu-south-1","Europe/Malta":"eu-south-1","Europe/Athens":"eu-south-1","Europe/Madrid":"eu-south-2","Europe/Lisbon":"eu-south-2","America/New_York":"us-east-1","America/Detroit":"us-east-1","America/Toronto":"ca-central-1","America/Montreal":"ca-central-1","America/Halifax":"ca-central-1","America/Winnipeg":"ca-central-1","America/Chicago":"us-east-2","America/Indiana/Indianapolis":"us-east-2","America/Mexico_City":"us-east-2","America/Denver":"us-west-2","America/Phoenix":"us-west-2","America/Edmonton":"us-west-2","America/Vancouver":"us-west-2","America/Los_Angeles":"us-west-1","America/Tijuana":"us-west-1","America/Sao_Paulo":"sa-east-1","America/Argentina/Buenos_Aires":"sa-east-1","America/Santiago":"sa-east-1","America/Montevideo":"sa-east-1","America/Lima":"sa-east-1","America/Bogota":"us-east-1","Asia/Tokyo":"ap-northeast-1","Asia/Seoul":"ap-northeast-2","Asia/Hong_Kong":"ap-east-1","Asia/Shanghai":"ap-east-1","Asia/Taipei":"ap-east-1","Asia/Macau":"ap-east-1","Asia/Singapore":"ap-southeast-1","Asia/Kuala_Lumpur":"ap-southeast-1","Asia/Bangkok":"ap-southeast-1","Asia/Ho_Chi_Minh":"ap-southeast-1","Asia/Manila":"ap-southeast-1","Asia/Jakarta":"ap-southeast-3","Asia/Kolkata":"ap-south-1","Asia/Calcutta":"ap-south-1","Asia/Karachi":"ap-south-1","Asia/Dhaka":"ap-south-1","Asia/Colombo":"ap-south-1","Asia/Dubai":"me-central-1","Asia/Muscat":"me-central-1","Asia/Qatar":"me-south-1","Asia/Bahrain":"me-south-1","Asia/Riyadh":"me-south-1","Asia/Kuwait":"me-south-1","Asia/Jerusalem":"me-south-1","Australia/Sydney":"ap-southeast-2","Australia/Brisbane":"ap-southeast-2","Australia/Canberra":"ap-southeast-2","Australia/Melbourne":"ap-southeast-4","Australia/Hobart":"ap-southeast-4","Australia/Adelaide":"ap-southeast-4","Pacific/Auckland":"ap-southeast-2","Pacific/Honolulu":"us-west-1","Africa/Johannesburg":"af-south-1","Africa/Casablanca":"eu-south-2","Africa/Cairo":"me-south-1","Indian/Maldives":"ap-south-1"}),LM=Object.freeze({Europe:"eu-central-1",America:"us-east-1",Asia:"ap-southeast-1",Australia:"ap-southeast-2",Pacific:"ap-southeast-2",Africa:"af-south-1",Atlantic:"eu-west-1",Indian:"ap-south-1"}),UM=Object.freeze({"af-south-1":"eu-west-1","ap-east-1":"ap-southeast-1","ap-southeast-3":"ap-southeast-1","ap-southeast-4":"ap-southeast-2","eu-central-2":"eu-central-1","eu-south-1":"eu-central-1","eu-south-2":"eu-west-3","me-central-1":"ap-south-1","me-south-1":"ap-south-1"});function wh(e){return nu.has(e)?UM[e]??bi:e}Ko(wh,"toDeployableRegion");function ou(e){if(!e)return;let t=zM[e];if(t!==void 0)return wh(t);let n=e.split("/")[0];if(n===void 0)return;let i=LM[n];return i===void 0?void 0:wh(i)}Ko(ou,"suggestRegionForTimezone");var FM=Object.defineProperty,Yo=(e,t)=>FM(e,"name",{value:t,configurable:!0});function au(e){return Pt(e).replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}Yo(au,"slugifyAccountName");function EA(e,t){let n=au(e),i=au(t);return n===""?i:i===""?n:`${n}-${i}`}Yo(EA,"defaultConnectedAccountName");function xA(e,t){let n=au(t);return n===""?e:`${e}-${n}`}Yo(xA,"suffixedAccountName");var AA=new Set(lt.map(e=>Si(e.code)));function IA(e){let t=e.toLowerCase().split(/[-\s_]+/).filter(i=>i.length>0),n=t[t.length-1];if(n!==void 0&&AA.has(n))return n}Yo(IA,"findTrailingRegionShortCode");function $A(e){return`Account name must not end with a region code ("-${e}") \u2014 the region is added automatically when deploying. Remove the "-${e}" suffix.`}Yo($A,"regionSuffixRejectionMessage");var BM=Object.defineProperty,_i=(e,t)=>BM(e,"name",{value:t,configurable:!0});function At(e){return e instanceof Error?e:new Error(String(e))}_i(At,"normaliseError");function Mt(e){return e instanceof Error?e.message:typeof e=="string"?e:e&&typeof e=="object"&&"message"in e?String(e.message):"An unknown error occurred"}_i(Mt,"getErrorMessage");function su(e,t){return!e||typeof e!="object"?!1:"code"in e&&e.code===t}_i(su,"hasErrorCode");function Xo(e){if(!(!e||typeof e!="object")&&"code"in e&&typeof e.code=="string")return e.code}_i(Xo,"getErrorCode");function cu(e){return e instanceof Error?e.stack:void 0}_i(cu,"getErrorStack");function uu(e){let t=Mt(e),n=Xo(e);return n&&n!=="UNKNOWN_ERROR"?`[${n}] ${t}`:t}_i(uu,"formatErrorString");var VM=Object.defineProperty,GM=(e,t)=>VM(e,"name",{value:t,configurable:!0});function TA(e){let t,n=!1;return()=>(n||(t=e(),n=!0),t)}GM(TA,"singleton");var ZM=Object.defineProperty,Oh=(e,t)=>ZM(e,"name",{value:t,configurable:!0}),CA=new Set(["NODE_OPTIONS","NODE_PATH","NODE_EXTRA_CA_CERTS","NODE_DEBUG","NODE_PRESERVE_SYMLINKS","LD_PRELOAD","LD_LIBRARY_PATH","LD_AUDIT","LD_BIND_NOW","DYLD_INSERT_LIBRARIES","DYLD_LIBRARY_PATH","DYLD_FRAMEWORK_PATH","PYTHONPATH","PYTHONSTARTUP","PERL5LIB","PERL5OPT","RUBYLIB","RUBYOPT","HOME","XDG_CONFIG_HOME","AWS_SHARED_CREDENTIALS_FILE","AWS_CONFIG_FILE","SHELL","BASH_ENV","ENV","ZDOTDIR"]);function NA(e){return Object.fromEntries(Object.entries(e).filter(([t])=>!CA.has(t.toUpperCase())))}Oh(NA,"filterDangerousEnvVars");var WM=/(fjall_(?:ak|dk)_)[A-Z2-7]{16}\.[A-Z2-7]{40}/g,nt="***",kh="[REDACTED]",RA=`-----BEGIN ${kh} PRIVATE KEY-----...-----END ${kh} PRIVATE KEY-----`;function Ei(e){return e.replace(/-----BEGIN [A-Z ]*PRIVATE KEY-----(?:[^"\\]|\\[\\nrt"])*?-----END [A-Z ]*PRIVATE KEY-----/g,()=>RA).replace(/-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z ]*PRIVATE KEY-----/g,()=>RA).replace(/(\w+:\/\/[^:]+:)[^@]+(@)/gi,(t,n,i)=>`${n}${nt}${i}`).replace(/(?<![a-zA-Z])(password|passwd|secret|api[_-]?key|token|auth|credential)([=:])["']?[^\s"']+/gi,(t,n,i)=>`${n}${i}${nt}`).replace(/\b(ghu_|ghs_|ghp_|gho_|github_pat_)[A-Za-z0-9_]+/g,(t,n)=>`${n}${nt}`).replace(/\b(sk|rk)_(live|test)_[A-Za-z0-9]{8,}/g,(t,n,i)=>`${n}_${i}_${nt}`).replace(/\bwhsec_[A-Za-z0-9]{8,}/g,()=>`whsec_${nt}`).replace(/(?<=Authorization:\s*Bearer\s+)[A-Za-z0-9._~+/=-]+/gi,nt).replace(/\b(AKIA|ASIA)[A-Z0-9]{12,}\b/g,(t,n)=>`${n}${nt}`).replace(/(?<=aws_secret_access_key\s*=\s*["']?|SecretAccessKey[=:]\s*|"(aws)?secretAccessKey":\s*"|"aws_secret_access_key":\s*")[A-Za-z0-9/+=]{40,}/gi,nt).replace(/(?<="(aws)?sessionToken":\s*"|"aws_session_token":\s*")[^"]+/gi,nt).replace(/(?<=aws_session_token\s*[=:]\s*["']?|SessionToken[=:]\s*["']?)[^\s"']+/gi,nt).replace(/(?<="(internal[Aa]piKey|fjallCallbackToken)":\s*")[^"]+/g,nt).replace(WM,(t,n)=>`${n}${nt}`)}Oh(Ei,"maskSensitiveOutput");function PA(e){let t=[],n="",i=!1,r=!1,o=!1,a=!1;for(let c of e){if(o){n+=c,o=!1;continue}if(c==="\\"&&!i){o=!0;continue}if(c==="'"&&!r){i=!i,a=!0;continue}if(c==='"'&&!i){r=!r,a=!0;continue}if(c===" "&&!i&&!r){(n||a)&&(t.push(n),n="",a=!1);continue}n+=c}if(i||r)throw new Error(`Unbalanced ${i?"single":"double"} quote in command: ${e.slice(0,80)}`);if(o)throw new Error(`Trailing backslash in command: ${e.slice(0,80)}`);return(n||a)&&t.push(n),t}Oh(PA,"parseShellArgs");var HM=Object.defineProperty,qM=(e,t)=>HM(e,"name",{value:t,configurable:!0}),KM=qM(e=>new Promise(t=>setTimeout(t,e)),"sleep");var YM=Object.defineProperty,wA=(e,t)=>YM(e,"name",{value:t,configurable:!0});async function kA(e,t,n){let i=new Array(e.length);if(e.length===0)return i;let r=Math.max(1,Math.min(t,e.length)),o=0,a=wA(async()=>{for(;o<e.length;){let c=o++;try{let u=await n(e[c],c);i[c]={status:"fulfilled",value:u}}catch(u){i[c]={status:"rejected",reason:u}}}},"worker");return await Promise.all(Array.from({length:r},()=>a())),i}wA(kA,"mapSettledWithConcurrency");var XM=Object.defineProperty,kr=(e,t)=>XM(e,"name",{value:t,configurable:!0}),Dh=["production","staging","development","platform","compliance"],OA={production:"Production",staging:"Staging",development:"Development",platform:"Platform",compliance:"Compliance"},JM=new Set(Dh);function lu(e){return JM.has(e)}kr(lu,"isAccountStage");var xi={ROOT:"root",PLATFORM:"platform"},QM=[...Dh,xi.ROOT];function DA(e){return lu(e)?OA[e]:e.charAt(0).toUpperCase()+e.slice(1)}kr(DA,"getEnvironmentLabel");var Mh=["organisation","platform","account"],ej=s.enum(Mh),Jo={ORGANISATION:"organisation",PLATFORM:"platform",ACCOUNT:"account"},tj={[Jo.ORGANISATION]:!0,[Jo.PLATFORM]:!0,[Jo.ACCOUNT]:!0},rj=new Set(Object.keys(tj));function MA(e){return rj.has(e)}kr(MA,"isAccountTier");var jA=Mh.filter(e=>e!==Jo.ACCOUNT),nj=new Set(jA);function du(e){return nj.has(e)}kr(du,"isGovernanceTier");function jh(e){return e===xi.ROOT?"organisation":e===xi.PLATFORM?"platform":"account"}kr(jh,"environmentToTier");function zA(e){return e==null||e===""||e===xi.ROOT?null:lu(e)?e:null}kr(zA,"stageFromWireEnvironment");function Ai(e){return e.tier??jh(e.environment)}kr(Ai,"accountTier");function LA(e){return Ai(e)==="organisation"?xi.ROOT:e.environment??void 0}kr(LA,"resolveSynthEnvironment");var ij=Object.defineProperty,Qo=(e,t)=>ij(e,"name",{value:t,configurable:!0});var UA=Object.freeze({"AWS::IAM::Role":"security","AWS::IAM::Policy":"security","AWS::IAM::OIDCProvider":"security","AWS::EC2::SecurityGroup":"security","AWS::KMS::Key":"security","AWS::KMS::Alias":"security","AWS::EC2::VPC":"network","AWS::EC2::Subnet":"network","AWS::EC2::InternetGateway":"network","AWS::EC2::NatGateway":"network","AWS::EC2::RouteTable":"network","AWS::EC2::Route":"network","AWS::EC2::VPCGatewayAttachment":"network","AWS::EC2::SubnetRouteTableAssociation":"network","AWS::EC2::EIP":"network","AWS::ECS::Cluster":"compute","AWS::ECS::Service":"compute","AWS::ECS::TaskDefinition":"compute","AWS::Lambda::Function":"compute","AWS::ElasticLoadBalancingV2::LoadBalancer":"compute","AWS::ElasticLoadBalancingV2::TargetGroup":"compute","AWS::ElasticLoadBalancingV2::Listener":"compute","AWS::ElasticLoadBalancingV2::ListenerRule":"compute","AWS::RDS::DBInstance":"database","AWS::RDS::DBCluster":"database","AWS::SecretsManager::Secret":"database","AWS::S3::Bucket":"storage","AWS::S3::BucketPolicy":"storage","AWS::CloudTrail::Trail":"monitoring","AWS::CloudWatch::Alarm":"monitoring","AWS::Logs::LogGroup":"monitoring","AWS::Events::EventBus":"events","AWS::Events::Rule":"events","AWS::ECR::Repository":"registry","AWS::CodeBuild::Project":"registry","AWS::Route53::RecordSet":"dns","AWS::CertificateManager::Certificate":"dns","AWS::CloudFront::Distribution":"dns","AWS::Backup::BackupVault":"backup","AWS::Backup::BackupPlan":"backup","AWS::Backup::BackupSelection":"backup","AWS::SSO::PermissionSet":"identity","AWS::SSO::Assignment":"identity","AWS::Organizations::Account":"identity","AWS::CDK::Metadata":"compute","AWS::CloudFormation::CustomResource":"compute","AWS::CloudFormation::WaitCondition":"compute","AWS::CloudFormation::WaitConditionHandle":"compute"}),zh=new Set;function FA(e){if(!e)return"compute";if(e.startsWith("Custom::"))return UA[e]??"compute";let t=UA[e];return t||zh.add(e),t??"compute"}Qo(FA,"categoriseResource");function oj(){return new Set(zh)}Qo(oj,"getUnmappedResourceTypes");function aj(){zh.clear()}Qo(aj,"clearUnmappedResourceTypes");var sj=Object.freeze({"AWS::EC2::NatGateway":120,"AWS::RDS::DBInstance":300,"AWS::RDS::DBCluster":300,"AWS::CloudFront::Distribution":300,"AWS::ECS::Service":180,"AWS::ElasticLoadBalancingV2::LoadBalancer":60,"AWS::EC2::SecurityGroup":10,"AWS::IAM::Role":15,"AWS::IAM::Policy":15,"AWS::IAM::OIDCProvider":10,"AWS::S3::Bucket":10,"AWS::S3::BucketPolicy":5,"AWS::Lambda::Function":30,"AWS::EC2::VPC":15,"AWS::EC2::Subnet":15,"AWS::EC2::InternetGateway":10,"AWS::EC2::RouteTable":5,"AWS::EC2::Route":5,"AWS::EC2::VPCGatewayAttachment":10,"AWS::EC2::SubnetRouteTableAssociation":5,"AWS::EC2::EIP":10,"AWS::ECS::Cluster":15,"AWS::ECS::TaskDefinition":10,"AWS::ElasticLoadBalancingV2::TargetGroup":10,"AWS::ElasticLoadBalancingV2::Listener":10,"AWS::ElasticLoadBalancingV2::ListenerRule":5,"AWS::SecretsManager::Secret":10,"AWS::Logs::LogGroup":5,"AWS::CloudWatch::Alarm":10,"AWS::CloudTrail::Trail":15,"AWS::Events::EventBus":5,"AWS::Events::Rule":5,"AWS::ECR::Repository":10,"AWS::Route53::RecordSet":30,"AWS::CertificateManager::Certificate":60,"AWS::KMS::Key":15,"AWS::KMS::Alias":5,"AWS::Backup::BackupVault":10,"AWS::Backup::BackupPlan":10,"AWS::Backup::BackupSelection":10,"AWS::SSO::PermissionSet":15,"AWS::SSO::Assignment":10,"AWS::Organizations::Account":60}),cj=30;function BA(e){return sj[e]??cj}Qo(BA,"getExpectedDuration");var uj=Object.freeze({"AWS::Lambda::Function":"Lambda Function","AWS::IAM::Role":"IAM Role","AWS::IAM::Policy":"IAM Policy","AWS::S3::Bucket":"S3 Bucket","AWS::DynamoDB::Table":"DynamoDB Table","AWS::EC2::Instance":"EC2 Instance","AWS::EC2::SecurityGroup":"Security Group","AWS::EC2::VPC":"VPC","AWS::EC2::Subnet":"Subnet","AWS::EC2::InternetGateway":"Internet Gateway","AWS::EC2::RouteTable":"Route Table","AWS::EC2::Route":"Route","AWS::ECS::Cluster":"ECS Cluster","AWS::ECS::Service":"ECS Service","AWS::ECS::TaskDefinition":"Task Definition","AWS::ElasticLoadBalancingV2::LoadBalancer":"Load Balancer","AWS::ElasticLoadBalancingV2::TargetGroup":"Target Group","AWS::ElasticLoadBalancingV2::Listener":"Listener","AWS::CloudFormation::Stack":"CloudFormation Stack","AWS::CDK::Metadata":"CDK Metadata","Custom::CDKBucketDeployment":"Bucket Deployment","AWS::SSM::Parameter":"SSM Parameter","AWS::CloudWatch::Alarm":"CloudWatch Alarm","AWS::Logs::LogGroup":"Log Group","AWS::ApiGateway::RestApi":"API Gateway","AWS::ApiGateway::Deployment":"API Deployment","AWS::ApiGateway::Stage":"API Stage","AWS::ApiGateway::Method":"API Method","AWS::ApiGateway::Resource":"API Resource","AWS::CloudFront::Distribution":"CloudFront Distribution","AWS::Route53::RecordSet":"Route53 Record","AWS::RDS::DBInstance":"RDS Instance","AWS::RDS::DBCluster":"RDS Cluster","AWS::SQS::Queue":"SQS Queue","AWS::SNS::Topic":"SNS Topic","AWS::Events::Rule":"EventBridge Rule","AWS::StepFunctions::StateMachine":"Step Function","AWS::EC2::NatGateway":"NAT Gateway","AWS::EC2::EIP":"Elastic IP","AWS::EC2::VPCGatewayAttachment":"Gateway Attachment","AWS::EC2::SubnetRouteTableAssociation":"Route Association","AWS::CloudTrail::Trail":"CloudTrail","AWS::IAM::OIDCProvider":"OIDC Provider","AWS::Events::EventBus":"Event Bus","AWS::Backup::BackupVault":"Backup Vault","AWS::Backup::BackupPlan":"Backup Plan","AWS::Backup::BackupSelection":"Backup Selection","AWS::SecretsManager::Secret":"Secret","AWS::KMS::Key":"KMS Key","AWS::KMS::Alias":"KMS Alias","AWS::ECR::Repository":"ECR Repository","AWS::CertificateManager::Certificate":"Certificate","AWS::ElasticLoadBalancingV2::ListenerRule":"Listener Rule","AWS::EC2::IPAM":"IPAM","AWS::EC2::IPAMPool":"IPAM Pool","AWS::EC2::IPAMPoolCidr":"IPAM Pool CIDR","Custom::ram":"RAM","Custom::ipamDelegateAdmin":"IPAM Delegate Admin","Custom::CostAllocationTags":"Cost Allocation Tags","Custom::ActivateOrganisationsAccess":"Activate Organisations Access","Custom::Organizations_TagResource":"Organisations Tag Resource","AWS::CloudFormation::CustomResource":"Custom Resource","AWS::CloudFormation::WaitCondition":"Wait Condition","AWS::CloudFormation::WaitConditionHandle":"Wait Condition Handle","AWS::SSO::PermissionSet":"SSO Permission Set","AWS::SSO::Assignment":"SSO Assignment","AWS::Organizations::Account":"Organisations Account","AWS::S3::BucketPolicy":"S3 Bucket Policy","AWS::CodeBuild::Project":"CodeBuild Project"});function VA(e){return uj[e]||e.split("::").pop()||e}Qo(VA,"getFriendlyResourceType");var lj=Object.defineProperty,dj=(e,t)=>lj(e,"name",{value:t,configurable:!0}),mj={"github.com":"github","gitlab.com":"gitlab","bitbucket.org":"bitbucket"},pj=/^https?:\/\/([^/]+)\/(.+?)\/([^/.]+?)(?:\.git)?$/,fj=/^git@([^:]+):(.+?)\/([^/.]+?)(?:\.git)?$/,gj=/^ssh:\/\/[^@]+@([^:/]+)(?::\d+)?\/(.+?)\/([^/.]+?)(?:\.git)?$/;function GA(e){if(!e)return null;let t=e.replace(/^(https?:\/\/)[^@]+@/,"$1"),n=t.match(pj)??t.match(fj)??e.match(gj);if(!n)return null;let[,i,r,o]=n;return!i||!r||!o?null:{provider:mj[i]??"other",owner:r,repo:o,host:i}}dj(GA,"parseGitRemoteUrl");var Lh=["read","write","deploy","secrets:read","secrets:write","destroy","admin","applications:read","applications:deploy","deploy:oidc:mint","deploy:governance"],ZA={read:"user",write:"user",deploy:"user","secrets:read":"user","secrets:write":"user",destroy:"user",admin:"admin","applications:read":"user","applications:deploy":"user","deploy:oidc:mint":"machine","deploy:governance":"machine"},hj=Lh.filter(e=>ZA[e]==="machine");var vj=Lh.filter(e=>ZA[e]==="user");var bj=Object.defineProperty,Ii=(e,t)=>bj(e,"name",{value:t,configurable:!0}),pu=/^[a-zA-Z_][a-zA-Z0-9._-]*$/,Uh="Secret name must start with a letter or underscore and contain only letters, numbers, underscores, hyphens, or periods",ea=/^[a-zA-Z][a-zA-Z0-9._-]*$/,fu="Must start with a letter and contain only letters, numbers, periods, hyphens, or underscores";var mu=s.string().regex(ea,fu),WA=s.object({app:mu.describe("Application name"),cluster:mu.optional().describe("Cluster name"),service:mu.optional().describe("Service name"),lambda:mu.optional().describe("Lambda function name")}).strict().refine(e=>!(e.service&&!e.cluster),{message:"Cluster is required when service is specified"}).refine(e=>!(e.lambda&&(e.cluster||e.service)),{message:"Lambda is mutually exclusive with cluster and service"}).refine(e=>e.cluster!=="lambda",{message:'The cluster name "lambda" is reserved for lambda-scoped parameter paths'});function Fh(e){let t=[e.app];return e.lambda?t.push("lambda",e.lambda):(e.cluster&&t.push(e.cluster),e.service&&e.cluster&&t.push(e.service)),t}Ii(Fh,"buildNamespaceParts");function Bh(e,t){let n=Fh(e);return t&&n.push(t),"/"+n.join("/")}Ii(Bh,"buildParameterPath");function Vh(e){let t=e.split("/").filter(Boolean);if(t.length<2)return null;let n=t[t.length-1]??"",i={app:t[0]??""};return t.length>=4&&t[1]==="lambda"?i.lambda=t[2]:t.length>=3&&(i.cluster=t[1],t.length>=4&&(i.service=t[2])),{namespace:i,name:n}}Ii(Vh,"parseParameterPath");function HA(e){let t=Vh(e);return t?WA.safeParse(t.namespace).success&&Bh(t.namespace,t.name)===e:!1}Ii(HA,"isManageablePath");function qA(e){let t={};for(let n of e.split(`
165
+ `)){let i=n.trim();if(!i||i.startsWith("#"))continue;let r=i.replace(/^export\s+/,""),o=r.indexOf("=");if(o===-1)continue;let a=r.slice(0,o).trim();if(!pu.test(a))continue;let c=r.slice(o+1);c.length>=2&&c.startsWith('"')&&c.endsWith('"')?t[a]=c.slice(1,-1).replace(/\\([\\"$`nr])/g,(u,l)=>l==="n"?`
166
+ `:l==="r"?"\r":l):c.length>=2&&c.startsWith("'")&&c.endsWith("'")?t[a]=c.slice(1,-1):t[a]=c}return t}Ii(qA,"parseDotEnv");function KA(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\$/g,"\\$").replace(/`/g,"\\`").replace(/\n/g,"\\n").replace(/\r/g,"\\r")}Ii(KA,"escapeDotEnvValue");var YA=s.object({awsAccountId:s.string(),accountName:s.string().nullable(),status:s.string(),role:s.string(),roleArn:s.string(),environment:s.string().optional(),connectedAt:s.string()}),yj=s.object({accounts:s.array(YA)});var Sj=Object.defineProperty,dn=(e,t)=>Sj(e,"name",{value:t,configurable:!0});function Gh(e){let t=[e.primaryRegion,...e.secondaryRegions??[],e.disasterRecoveryRegion].filter(n=>n!==void 0);return[...new Set(t)]}dn(Gh,"deriveRegionsFromOrgConfig");function Zh(e){return e.environment??Ai(e)}dn(Zh,"environmentOrTier");function Wh(e,t){return`${e.toLowerCase()}-${Si(t)}`}dn(Wh,"generateTargetName");function Hh(e,t){let n=[];for(let i of e){if(Ai(i)==="organisation")continue;let r=Zh(i);for(let o of t)n.push({name:Wh(i.name,o),accountName:i.name,accountId:i.id,environment:r,region:o})}return n.sort((i,r)=>{let o=i.environment.localeCompare(r.environment);if(o!==0)return o;let a=i.accountName.localeCompare(r.accountName);return a!==0?a:i.region.localeCompare(r.region)})}dn(Hh,"deriveTargets");function XA(e){return Hh(e.providerAccounts,Gh(e))}dn(XA,"deriveAllTargets");function _j(e,t){if(t.length===0)return e;let n=new Set([e.primaryRegion,e.disasterRecoveryRegion].filter(Boolean)),i=t.filter(r=>!n.has(r));return{...e,secondaryRegions:i.length>0?i:void 0}}dn(_j,"mergeSecondaryRegions");function JA(e,t){return e.find(n=>n.name===t)}dn(JA,"findTarget");var Ej=Object.defineProperty,xj=(e,t)=>Ej(e,"name",{value:t,configurable:!0});function QA(e,t){if(t!==void 0){if(t.trim()==="")throw new Error("buildAppConfigPath: container must be a non-empty string");return`${t}/fjall/${e}`}return`fjall/${e}`}xj(QA,"buildAppConfigPath");var Aj=Object.defineProperty,$i=(e,t)=>Aj(e,"name",{value:t,configurable:!0}),qh="infrastructure.ts",Kh="fjall";function eI(e,t){let n=t?.excludedPathPrefixes,i=t?.excludedPathSegments,r=[];for(let o of e){if(!Yh(o.path)||n&&rI(o.path,n)||i&&nI(o.path,i))continue;let a=Xh(o.path);a!==null&&r.push({configPath:tI(o.path),boundaryPath:a})}return r}$i(eI,"findInfrastructurePaths");function Yh(e){return e===qh||e.endsWith(`/${qh}`)}$i(Yh,"isInfrastructureFile");function Xh(e){let t=e.split("/");for(let n=0;n<t.length-1;n++)if(t[n]===Kh)return t.slice(0,n+1).join("/");return null}$i(Xh,"findBoundaryPath");function tI(e){return e.slice(0,-`/${qh}`.length)}$i(tI,"toConfigDir");function rI(e,t){for(let n of t)if(e.startsWith(n))return!0;return!1}$i(rI,"hasExcludedPrefix");function nI(e,t){let n=e.split("/");for(let i=0;i<n.length-1;i++)if(t.has(n[i]))return!0;return!1}$i(nI,"hasExcludedSegment");var Ij=Object.defineProperty,Jh=(e,t)=>Ij(e,"name",{value:t,configurable:!0});function iI(e){if(e.length===0)return null;let t=[];for(let i of e){let r=oI(i.boundaryPath);if(r===null)return null;t.push(r)}let n=aI(t);return n.length===0?null:n.join("/")}Jh(iI,"inferContainerFromCandidates");function oI(e){let t=e.split("/").filter(i=>i.length>0);if(t.length===0||t[t.length-1]!==Kh)return null;let n=t.slice(0,t.length-1);return n.length===0?null:n}Jh(oI,"extractContainer");function aI(e){if(e.length===0)return[];let[t,...n]=e,i=[];for(let r=0;r<t.length;r+=1){let o=t[r];for(let a of n)if(a[r]!==o)return i;i.push(o)}return i}Jh(aI,"longestCommonPrefix");var $j=Object.defineProperty,sI=(e,t)=>$j(e,"name",{value:t,configurable:!0}),cI=["fjall","organisation","platform","account","domain"];function uI(e){return cI.includes(e.toLowerCase())}sI(uI,"isReservedAppName");var lI="-cache";function dI(e){return Pt(e).endsWith(lI)}sI(dI,"hasReservedAppNameSuffix");var Tj=Object.defineProperty,Qh=(e,t)=>Tj(e,"name",{value:t,configurable:!0});function pI(e){return{success:!0,data:e}}Qh(pI,"success");function ta(e){return{success:!1,error:e}}Qh(ta,"failure");var mI="sha256:",gu=12,Rj=new RegExp(`-sha-[0-9a-f]{${gu}}$`);function fI(e,t,n){if(!e.startsWith(mI))return ta(new Error(`expected sha256:... digest, got ${e.slice(0,32)}`));let i=e.slice(mI.length);if(i.length<gu)return ta(new Error(`digest hex payload too short (need >=${gu} chars, got ${i.length})`));let r=t.trim();if(r==="")return ta(new Error("serviceName must be a non-empty string"));let o;if(n!==void 0){let u=n.trim();if(u==="")return ta(new Error("target, when supplied, must be a non-empty string; omit the argument instead"));o=u.toLowerCase()}let a=i.slice(0,gu).toLowerCase(),c=o!==void 0?`${r.toLowerCase()}-${o}`:r.toLowerCase();return pI(`${c}-sha-${a}`)}Qh(fI,"deriveContentHashTag");var Cj=Object.defineProperty,Nj=(e,t)=>Cj(e,"name",{value:t,configurable:!0}),gI=["full","code-only","rollback","restart"],Pj=s.enum(gI),hI=/^[a-zA-Z0-9._-]+$/,vI=s.string().min(1).max(128).regex(hI),bI=s.object({serviceName:s.string().min(1),imageTag:vI,imageDigest:s.string().min(1).optional(),imageUri:s.string().min(1),ecrRepositoryArn:s.string().min(1).optional(),taskDefinitionArn:s.string().min(1).optional(),previousTaskDefinitionArn:s.string().min(1).optional(),functionArn:s.string().min(1).optional(),publishedVersion:s.string().min(1).optional()}).strict(),wj=s.array(bI);function yI(e,t){return`${e}${t}`}Nj(yI,"artefactOutputKey");var kj=Object.defineProperty,SI=(e,t)=>kj(e,"name",{value:t,configurable:!0}),jt=["payload","nextjs","staticsite"],ev=new Set(jt);function tv(e){return typeof e=="string"&&ev.has(e)}SI(tv,"isPatternType");var Ti={payload:{label:"Payload CMS",constructIdSuffix:"Payload",artefact:"opennext-lambda",stackPlacement:"compute",deployable:!0},nextjs:{label:"Next.js",constructIdSuffix:"Nextjs",artefact:"opennext-lambda",stackPlacement:"compute",deployable:!1},staticsite:{label:"Static site",constructIdSuffix:"StaticSite",artefact:"static-assets",stackPlacement:"cdn",deployable:!0}},_I=jt.filter(e=>Ti[e].deployable),rv=jt.filter(e=>Ti[e].artefact==="opennext-lambda"),Oj=new Set(rv);function nv(e){return e!=null&&Oj.has(e)}SI(nv,"isOpenNextPatternType");var ra=["multipage","spa"];var Dj=Object.defineProperty,iv=(e,t)=>Dj(e,"name",{value:t,configurable:!0}),EI="noreply";function xI(e){return`${EI}@${e}`}iv(xI,"defaultFormsFromAddress");function AI(e){return`https://${e}`}iv(AI,"defaultFormsCorsOrigin");function hu(e,t){let n=e.split("@");if(n.length!==2)return!1;let[i,r]=n;return i===void 0||i===""||r===void 0?!1:r.toLowerCase()===t.toLowerCase()}iv(hu,"isAddressAtDomain");var II=2;var Mj=s.object({devDomain:s.string().min(1),hostedZoneId:s.string().min(1).optional(),parentDomain:s.string().min(1).optional(),parentDelegationRoleArn:s.string().min(1).optional()}).strict().superRefine((e,t)=>{if(e.hostedZoneId!==void 0){e.parentDomain!==void 0&&t.addIssue({code:"custom",path:["parentDomain"],message:"hostedZoneId (adopt mode) is mutually exclusive with parentDomain \u2014 the adopted zone was already delegated; omit parentDomain"}),e.parentDelegationRoleArn!==void 0&&t.addIssue({code:"custom",path:["parentDelegationRoleArn"],message:"hostedZoneId (adopt mode) is mutually exclusive with parentDelegationRoleArn \u2014 the adopted zone was already delegated; omit parentDelegationRoleArn"});return}e.parentDelegationRoleArn!==void 0&&e.parentDomain===void 0&&t.addIssue({code:"custom",path:["parentDomain"],message:"parentDelegationRoleArn requires parentDomain \u2014 set parentDomain to the parent zone the DelegationRole belongs to"}),e.parentDomain!==void 0&&!e.devDomain.endsWith(`.${e.parentDomain}`)&&t.addIssue({code:"custom",path:["parentDomain"],message:"parentDomain must be a proper DNS suffix of devDomain \u2014 devDomain must end with `.<parentDomain>`"})}),$I={appId:s.string().min(1),appKebab:s.string().min(1),engineVersion:s.string().min(1).optional(),adoptSlotEcr:s.boolean().optional(),adoptCacheEcr:s.boolean().optional(),phase:s.enum(["zone","full"]).optional(),domain:Mj.optional()},jj=s.object($I).strict(),zj=s.object({...$I,version:s.literal(II),appName:s.string().min(1)}).strict().refine(e=>e.appName===`fjall-dev-${e.appKebab}`,{message:"appName must equal `fjall-dev-${appKebab}` (single-source identity)",path:["appName"]});import{existsSync as M$,mkdirSync as LL,statSync as UL,appendFileSync as FL}from"fs";import{join as j$}from"path";import{join as Lv}from"path";var Uj=Object.defineProperty,TI=(e,t)=>Uj(e,"name",{value:t,configurable:!0});function RI(e){return e.mode==="cli"}TI(RI,"isCLIMode");function CI(e){return e.mode==="ink"}TI(CI,"isInkMode");function NI(e,t,n){let i=e.indexOf(t);if(i===-1)return e;let r=t.length,o=0,a="";do a+=e.slice(o,i)+t+n,o=i+r,i=e.indexOf(t,o);while(i!==-1);return a+=e.slice(o),a}function PI(e,t,n,i){let r=0,o="";do{let a=e[i-1]==="\r";o+=e.slice(r,a?i-1:i)+t+(a?`\r
167
167
  `:`
168
168
  `)+n,r=i+1,i=e.indexOf(`
169
- `,r)}while(i!==-1);return o+=e.slice(r),o}var gI=(e=0)=>t=>`\x1B[${t+e}m`,Xh=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Jh=(e=0)=>(t,n,i)=>`\x1B[${38+e};2;${t};${n};${i}m`,vj=e=>`\x1B[58;5;${e<90?e-30:e-90+8}m`,W={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],underlineDouble:["4:2",24],underlineCurly:["4:3",24],underlineDotted:["4:4",24],underlineDashed:["4:5",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]},underlineColor:{underlineBlack:["58;5;0",59],underlineRed:["58;5;1",59],underlineGreen:["58;5;2",59],underlineYellow:["58;5;3",59],underlineBlue:["58;5;4",59],underlineMagenta:["58;5;5",59],underlineCyan:["58;5;6",59],underlineWhite:["58;5;7",59],underlineBlackBright:["58;5;8",59],underlineGray:["58;5;8",59],underlineGrey:["58;5;8",59],underlineRedBright:["58;5;9",59],underlineGreenBright:["58;5;10",59],underlineYellowBright:["58;5;11",59],underlineBlueBright:["58;5;12",59],underlineMagentaBright:["58;5;13",59],underlineCyanBright:["58;5;14",59],underlineWhiteBright:["58;5;15",59]}},C5=Object.keys(W.modifier),bj=Object.keys(W.color),yj=Object.keys(W.bgColor),R5=Object.keys(W.underlineColor),P5=[...bj,...yj];function Sj(){let e=new Map;for(let[t,n]of Object.entries(W)){for(let[i,r]of Object.entries(n))W[i]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},n[i]=W[i],e.set(Number.parseInt(r[0],10),r[1]);Object.defineProperty(W,t,{value:n,enumerable:!1})}return Object.defineProperty(W,"codes",{value:e,enumerable:!1}),W.color.close="\x1B[39m",W.bgColor.close="\x1B[49m",W.underlineColor.close="\x1B[59m",W.color.ansi=gI(),W.color.ansi256=Xh(),W.color.ansi16m=Jh(),W.bgColor.ansi=gI(10),W.bgColor.ansi256=Xh(10),W.bgColor.ansi16m=Jh(10),W.underlineColor.ansi=vj,W.underlineColor.ansi256=Xh(20),W.underlineColor.ansi16m=Jh(20),Object.defineProperties(W,{rgbToAnsi256:{value(t,n,i){return t===n&&n===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(t){let n=/[\da-f]{6}|[\da-f]{3}/i.exec(t.toString(16));if(!n)return[0,0,0];let[i]=n;i.length===3&&(i=[...i].map(o=>o+o).join(""));let r=Number.parseInt(i,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:t=>W.rgbToAnsi256(...W.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let n,i,r;if(t>=232)n=((t-232)*10+8)/255,i=n,r=n;else{t-=16;let c=t%36;n=Math.floor(t/36)/5,i=Math.floor(c/6)/5,r=c%6/5}let o=Math.max(n,i,r)*2;if(o===0)return 30;let a=30+(Math.round(r)<<2|Math.round(i)<<1|Math.round(n));return o===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(t,n,i)=>W.ansi256ToAnsi(W.rgbToAnsi256(t,n,i)),enumerable:!1},hexToAnsi:{value:t=>W.ansi256ToAnsi(W.hexToAnsi256(t)),enumerable:!1}}),W}var _j=Sj(),zt=_j;import Qh from"node:process";import Ej from"node:os";import hI from"node:tty";function ut(e,t=globalThis.Deno?globalThis.Deno.args:Qh.argv){let n=e.startsWith("-")?"":e.length===1?"-":"--",i=t.indexOf(n+e),r=t.indexOf("--");return i!==-1&&(r===-1||i<r)}var{env:re}=Qh,du;ut("no-color")||ut("no-colors")||ut("color=false")||ut("color=never")?du=0:(ut("color")||ut("colors")||ut("color=true")||ut("color=always"))&&(du=1);function bI(){return/^\d+$/.test(re.FORCE_COLOR)}function xj(){if("FORCE_COLOR"in re){if(re.FORCE_COLOR==="false")return 0;if(re.FORCE_COLOR==="true"||re.FORCE_COLOR.length===0)return 1;if(bI())return Math.min(Number.parseInt(re.FORCE_COLOR,10),3)}}function Aj(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Ij(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let i=xj();i!==void 0&&(du=i);let r=n?du:i;if(r===0)return 0;if(n){if(ut("color=16m")||ut("color=full")||ut("color=truecolor"))return 3;if(ut("color=256"))return 2}if(r!==void 0&&bI())return r;if("TF_BUILD"in re&&"AGENT_NAME"in re)return 1;if(e&&!t&&r===void 0)return 0;let o=r||0;if(re.TERM==="dumb")return o;if(Qh.platform==="win32"){let a=Ej.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in re)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(a=>a in re)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(a=>a in re)||re.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in re)return/^(?:9\.0*[1-9]\d*\.|\d{2,}\.)/.test(re.TEAMCITY_VERSION)?1:0;if(re.COLORTERM==="truecolor"||re.TERM==="xterm-kitty"||re.TERM==="xterm-ghostty"||re.TERM==="wezterm")return 3;if("TERM_PROGRAM"in re){let a=Number.parseInt((re.TERM_PROGRAM_VERSION||"").split(".",1)[0],10);switch(re.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(?:color)?$/i.test(re.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(re.TERM)||"COLORTERM"in re?1:o}function vI(e,t={}){let n=Ij(e,{streamIsTTY:e&&e.isTTY,...t});return Aj(n)}var $j={stdout:vI({isTTY:hI.isatty(1)}),stderr:vI({isTTY:hI.isatty(2)})},yI=$j;var{stdout:SI,stderr:_I}=yI,Xo=Symbol("GENERATOR"),Jo=Symbol("STYLER"),pu=Symbol("IS_EMPTY"),mu=Symbol("LEVEL"),Qo=Object.create(null),EI=e=>{if(!Number.isSafeInteger(e)||e<0||e>3)throw new Error("The `level` should be an integer from 0 to 3")},Tj={enumerable:!0,get(){return this[mu]},set(e){EI(e),this[mu]=e}},Cj=(e,t={})=>{t.level!==void 0&&EI(t.level);let n=SI?SI.level:0;e[mu]=t.level===void 0?n:t.level};var Rj=e=>{let t=(...n)=>n.join(" ");return Cj(t,e),Object.setPrototypeOf(t,ea.prototype),t};function ea(e){return Rj(e)}Object.setPrototypeOf(ea.prototype,Function.prototype);for(let[e,t]of Object.entries(zt))Qo[e]={get(){let n=tv(this,xI(t.open,t.close,this[Jo]),this[pu]);return Object.defineProperty(this,e,{value:n}),n}};Qo.visible={get(){let e=tv(this,this[Jo],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Pj=(e,t)=>{let n=zt[t];if(e==="rgb"){let r=(a,c,u)=>n.ansi(zt.rgbToAnsi(a,c,u));return[r,r,(a,c,u)=>n.ansi256(zt.rgbToAnsi256(a,c,u)),n.ansi16m]}if(e==="hex"){let r=a=>n.ansi(zt.hexToAnsi(a));return[r,r,a=>n.ansi256(zt.hexToAnsi256(a)),a=>n.ansi16m(...zt.hexToRgb(a))]}let i=r=>n.ansi(zt.ansi256ToAnsi(r));return[i,i,n.ansi256,n.ansi256]},Nj=["rgb","hex","ansi256"];for(let e of Nj){let t=e[0].toUpperCase()+e.slice(1);for(let[n,i]of[[e,"color"],["bg"+t,"bgColor"],["underline"+t,"underlineColor"]]){let{close:r}=zt[i],o=Pj(e,i);Qo[n]={get(){let a=function(c,u,l){let m=o[this.level](c,u,l);return tv(this,xI(m,r,this[Jo]),this[pu])};return Object.defineProperty(this,n,{value:a}),a}}}}var wj=Object.defineProperties(()=>{},{...Qo,level:{enumerable:!0,get(){return this[Xo].level},set(e){this[Xo].level=e}}}),xI=(e,t,n)=>{let i,r;return n===void 0?(i=e,r=t):(i=n.openAll+e,r=t+n.closeAll),{open:e,close:t,openAll:i,closeAll:r,parent:n}},tv=(e,t,n)=>{let i=(...r)=>r.length===1?ev(i,""+r[0]):r.length===2?ev(i,r[0]+" "+r[1]):ev(i,r.join(" "));return Object.setPrototypeOf(i,wj),i[Xo]=e[Xo]??e,i[Jo]=t,i[pu]=n,i},ev=(e,t)=>{if(e[Xo][mu]<=0||!t)return e[pu]?"":t;let n=e[Jo];if(n===void 0)return t;let{openAll:i,closeAll:r}=n;if(t.includes("\x1B"))for(;n!==void 0;)t=pI(t,n.close,n.open),n=n.parent;let o=t.indexOf(`
170
- `);return o!==-1&&(t=fI(t,r,i,o)),i+t+r};Object.defineProperties(ea.prototype,{...Qo,level:Tj});var kj=ea(),L5=ea({level:_I?_I.level:0});var Le=kj;import aa from"node:process";import{stripVTControlCharacters as kz}from"node:util";var AI=(e=0)=>t=>`\x1B[${t+e}m`,II=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,$I=(e=0)=>(t,n,i)=>`\x1B[${38+e};2;${t};${n};${i}m`,ie={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]}},F5=Object.keys(ie.modifier),Oj=Object.keys(ie.color),Dj=Object.keys(ie.bgColor),B5=[...Oj,...Dj];function Mj(){let e=new Map;for(let[t,n]of Object.entries(ie)){for(let[i,r]of Object.entries(n))ie[i]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},n[i]=ie[i],e.set(r[0],r[1]);Object.defineProperty(ie,t,{value:n,enumerable:!1})}return Object.defineProperty(ie,"codes",{value:e,enumerable:!1}),ie.color.close="\x1B[39m",ie.bgColor.close="\x1B[49m",ie.color.ansi=AI(),ie.color.ansi256=II(),ie.color.ansi16m=$I(),ie.bgColor.ansi=AI(10),ie.bgColor.ansi256=II(10),ie.bgColor.ansi16m=$I(10),Object.defineProperties(ie,{rgbToAnsi256:{value(t,n,i){return t===n&&n===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(t){let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!n)return[0,0,0];let[i]=n;i.length===3&&(i=[...i].map(o=>o+o).join(""));let r=Number.parseInt(i,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:t=>ie.rgbToAnsi256(...ie.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let n,i,r;if(t>=232)n=((t-232)*10+8)/255,i=n,r=n;else{t-=16;let c=t%36;n=Math.floor(t/36)/5,i=Math.floor(c/6)/5,r=c%6/5}let o=Math.max(n,i,r)*2;if(o===0)return 30;let a=30+(Math.round(r)<<2|Math.round(i)<<1|Math.round(n));return o===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(t,n,i)=>ie.ansi256ToAnsi(ie.rgbToAnsi256(t,n,i)),enumerable:!1},hexToAnsi:{value:t=>ie.ansi256ToAnsi(ie.hexToAnsi256(t)),enumerable:!1}}),ie}var jj=Mj(),It=jj;import rv from"node:process";import zj from"node:os";import TI from"node:tty";function lt(e,t=globalThis.Deno?globalThis.Deno.args:rv.argv){let n=e.startsWith("-")?"":e.length===1?"-":"--",i=t.indexOf(n+e),r=t.indexOf("--");return i!==-1&&(r===-1||i<r)}var{env:oe}=rv,fu;lt("no-color")||lt("no-colors")||lt("color=false")||lt("color=never")?fu=0:(lt("color")||lt("colors")||lt("color=true")||lt("color=always"))&&(fu=1);function Lj(){if("FORCE_COLOR"in oe)return oe.FORCE_COLOR==="true"?1:oe.FORCE_COLOR==="false"?0:oe.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(oe.FORCE_COLOR,10),3)}function Uj(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Fj(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let i=Lj();i!==void 0&&(fu=i);let r=n?fu:i;if(r===0)return 0;if(n){if(lt("color=16m")||lt("color=full")||lt("color=truecolor"))return 3;if(lt("color=256"))return 2}if("TF_BUILD"in oe&&"AGENT_NAME"in oe)return 1;if(e&&!t&&r===void 0)return 0;let o=r||0;if(oe.TERM==="dumb")return o;if(rv.platform==="win32"){let a=zj.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in oe)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(a=>a in oe)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(a=>a in oe)||oe.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in oe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(oe.TEAMCITY_VERSION)?1:0;if(oe.COLORTERM==="truecolor"||oe.TERM==="xterm-kitty"||oe.TERM==="xterm-ghostty"||oe.TERM==="wezterm")return 3;if("TERM_PROGRAM"in oe){let a=Number.parseInt((oe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(oe.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(oe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(oe.TERM)||"COLORTERM"in oe?1:o}function CI(e,t={}){let n=Fj(e,{streamIsTTY:e&&e.isTTY,...t});return Uj(n)}var Bj={stdout:CI({isTTY:TI.isatty(1)}),stderr:CI({isTTY:TI.isatty(2)})},RI=Bj;function PI(e,t,n){let i=e.indexOf(t);if(i===-1)return e;let r=t.length,o=0,a="";do a+=e.slice(o,i)+t+n,o=i+r,i=e.indexOf(t,o);while(i!==-1);return a+=e.slice(o),a}function NI(e,t,n,i){let r=0,o="";do{let a=e[i-1]==="\r";o+=e.slice(r,a?i-1:i)+t+(a?`\r
169
+ `,r)}while(i!==-1);return o+=e.slice(r),o}var wI=(e=0)=>t=>`\x1B[${t+e}m`,ov=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,av=(e=0)=>(t,n,i)=>`\x1B[${38+e};2;${t};${n};${i}m`,Fj=e=>`\x1B[58;5;${e<90?e-30:e-90+8}m`,W={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],underlineDouble:["4:2",24],underlineCurly:["4:3",24],underlineDotted:["4:4",24],underlineDashed:["4:5",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]},underlineColor:{underlineBlack:["58;5;0",59],underlineRed:["58;5;1",59],underlineGreen:["58;5;2",59],underlineYellow:["58;5;3",59],underlineBlue:["58;5;4",59],underlineMagenta:["58;5;5",59],underlineCyan:["58;5;6",59],underlineWhite:["58;5;7",59],underlineBlackBright:["58;5;8",59],underlineGray:["58;5;8",59],underlineGrey:["58;5;8",59],underlineRedBright:["58;5;9",59],underlineGreenBright:["58;5;10",59],underlineYellowBright:["58;5;11",59],underlineBlueBright:["58;5;12",59],underlineMagentaBright:["58;5;13",59],underlineCyanBright:["58;5;14",59],underlineWhiteBright:["58;5;15",59]}},r8=Object.keys(W.modifier),Bj=Object.keys(W.color),Vj=Object.keys(W.bgColor),n8=Object.keys(W.underlineColor),i8=[...Bj,...Vj];function Gj(){let e=new Map;for(let[t,n]of Object.entries(W)){for(let[i,r]of Object.entries(n))W[i]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},n[i]=W[i],e.set(Number.parseInt(r[0],10),r[1]);Object.defineProperty(W,t,{value:n,enumerable:!1})}return Object.defineProperty(W,"codes",{value:e,enumerable:!1}),W.color.close="\x1B[39m",W.bgColor.close="\x1B[49m",W.underlineColor.close="\x1B[59m",W.color.ansi=wI(),W.color.ansi256=ov(),W.color.ansi16m=av(),W.bgColor.ansi=wI(10),W.bgColor.ansi256=ov(10),W.bgColor.ansi16m=av(10),W.underlineColor.ansi=Fj,W.underlineColor.ansi256=ov(20),W.underlineColor.ansi16m=av(20),Object.defineProperties(W,{rgbToAnsi256:{value(t,n,i){return t===n&&n===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(t){let n=/[\da-f]{6}|[\da-f]{3}/i.exec(t.toString(16));if(!n)return[0,0,0];let[i]=n;i.length===3&&(i=[...i].map(o=>o+o).join(""));let r=Number.parseInt(i,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:t=>W.rgbToAnsi256(...W.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let n,i,r;if(t>=232)n=((t-232)*10+8)/255,i=n,r=n;else{t-=16;let c=t%36;n=Math.floor(t/36)/5,i=Math.floor(c/6)/5,r=c%6/5}let o=Math.max(n,i,r)*2;if(o===0)return 30;let a=30+(Math.round(r)<<2|Math.round(i)<<1|Math.round(n));return o===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(t,n,i)=>W.ansi256ToAnsi(W.rgbToAnsi256(t,n,i)),enumerable:!1},hexToAnsi:{value:t=>W.ansi256ToAnsi(W.hexToAnsi256(t)),enumerable:!1}}),W}var Zj=Gj(),zt=Zj;import sv from"node:process";import Wj from"node:os";import kI from"node:tty";function dt(e,t=globalThis.Deno?globalThis.Deno.args:sv.argv){let n=e.startsWith("-")?"":e.length===1?"-":"--",i=t.indexOf(n+e),r=t.indexOf("--");return i!==-1&&(r===-1||i<r)}var{env:re}=sv,vu;dt("no-color")||dt("no-colors")||dt("color=false")||dt("color=never")?vu=0:(dt("color")||dt("colors")||dt("color=true")||dt("color=always"))&&(vu=1);function DI(){return/^\d+$/.test(re.FORCE_COLOR)}function Hj(){if("FORCE_COLOR"in re){if(re.FORCE_COLOR==="false")return 0;if(re.FORCE_COLOR==="true"||re.FORCE_COLOR.length===0)return 1;if(DI())return Math.min(Number.parseInt(re.FORCE_COLOR,10),3)}}function qj(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Kj(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let i=Hj();i!==void 0&&(vu=i);let r=n?vu:i;if(r===0)return 0;if(n){if(dt("color=16m")||dt("color=full")||dt("color=truecolor"))return 3;if(dt("color=256"))return 2}if(r!==void 0&&DI())return r;if("TF_BUILD"in re&&"AGENT_NAME"in re)return 1;if(e&&!t&&r===void 0)return 0;let o=r||0;if(re.TERM==="dumb")return o;if(sv.platform==="win32"){let a=Wj.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in re)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(a=>a in re)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(a=>a in re)||re.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in re)return/^(?:9\.0*[1-9]\d*\.|\d{2,}\.)/.test(re.TEAMCITY_VERSION)?1:0;if(re.COLORTERM==="truecolor"||re.TERM==="xterm-kitty"||re.TERM==="xterm-ghostty"||re.TERM==="wezterm")return 3;if("TERM_PROGRAM"in re){let a=Number.parseInt((re.TERM_PROGRAM_VERSION||"").split(".",1)[0],10);switch(re.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(?:color)?$/i.test(re.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(re.TERM)||"COLORTERM"in re?1:o}function OI(e,t={}){let n=Kj(e,{streamIsTTY:e&&e.isTTY,...t});return qj(n)}var Yj={stdout:OI({isTTY:kI.isatty(1)}),stderr:OI({isTTY:kI.isatty(2)})},MI=Yj;var{stdout:jI,stderr:zI}=MI,na=Symbol("GENERATOR"),ia=Symbol("STYLER"),yu=Symbol("IS_EMPTY"),bu=Symbol("LEVEL"),oa=Object.create(null),LI=e=>{if(!Number.isSafeInteger(e)||e<0||e>3)throw new Error("The `level` should be an integer from 0 to 3")},Xj={enumerable:!0,get(){return this[bu]},set(e){LI(e),this[bu]=e}},Jj=(e,t={})=>{t.level!==void 0&&LI(t.level);let n=jI?jI.level:0;e[bu]=t.level===void 0?n:t.level};var Qj=e=>{let t=(...n)=>n.join(" ");return Jj(t,e),Object.setPrototypeOf(t,aa.prototype),t};function aa(e){return Qj(e)}Object.setPrototypeOf(aa.prototype,Function.prototype);for(let[e,t]of Object.entries(zt))oa[e]={get(){let n=uv(this,UI(t.open,t.close,this[ia]),this[yu]);return Object.defineProperty(this,e,{value:n}),n}};oa.visible={get(){let e=uv(this,this[ia],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var ez=(e,t)=>{let n=zt[t];if(e==="rgb"){let r=(a,c,u)=>n.ansi(zt.rgbToAnsi(a,c,u));return[r,r,(a,c,u)=>n.ansi256(zt.rgbToAnsi256(a,c,u)),n.ansi16m]}if(e==="hex"){let r=a=>n.ansi(zt.hexToAnsi(a));return[r,r,a=>n.ansi256(zt.hexToAnsi256(a)),a=>n.ansi16m(...zt.hexToRgb(a))]}let i=r=>n.ansi(zt.ansi256ToAnsi(r));return[i,i,n.ansi256,n.ansi256]},tz=["rgb","hex","ansi256"];for(let e of tz){let t=e[0].toUpperCase()+e.slice(1);for(let[n,i]of[[e,"color"],["bg"+t,"bgColor"],["underline"+t,"underlineColor"]]){let{close:r}=zt[i],o=ez(e,i);oa[n]={get(){let a=function(c,u,l){let m=o[this.level](c,u,l);return uv(this,UI(m,r,this[ia]),this[yu])};return Object.defineProperty(this,n,{value:a}),a}}}}var rz=Object.defineProperties(()=>{},{...oa,level:{enumerable:!0,get(){return this[na].level},set(e){this[na].level=e}}}),UI=(e,t,n)=>{let i,r;return n===void 0?(i=e,r=t):(i=n.openAll+e,r=t+n.closeAll),{open:e,close:t,openAll:i,closeAll:r,parent:n}},uv=(e,t,n)=>{let i=(...r)=>r.length===1?cv(i,""+r[0]):r.length===2?cv(i,r[0]+" "+r[1]):cv(i,r.join(" "));return Object.setPrototypeOf(i,rz),i[na]=e[na]??e,i[ia]=t,i[yu]=n,i},cv=(e,t)=>{if(e[na][bu]<=0||!t)return e[yu]?"":t;let n=e[ia];if(n===void 0)return t;let{openAll:i,closeAll:r}=n;if(t.includes("\x1B"))for(;n!==void 0;)t=NI(t,n.close,n.open),n=n.parent;let o=t.indexOf(`
170
+ `);return o!==-1&&(t=PI(t,r,i,o)),i+t+r};Object.defineProperties(aa.prototype,{...oa,level:Xj});var nz=aa(),p8=aa({level:zI?zI.level:0});var Ue=nz;import ma from"node:process";import{stripVTControlCharacters as nL}from"node:util";var FI=(e=0)=>t=>`\x1B[${t+e}m`,BI=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,VI=(e=0)=>(t,n,i)=>`\x1B[${38+e};2;${t};${n};${i}m`,ie={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]}},g8=Object.keys(ie.modifier),iz=Object.keys(ie.color),oz=Object.keys(ie.bgColor),h8=[...iz,...oz];function az(){let e=new Map;for(let[t,n]of Object.entries(ie)){for(let[i,r]of Object.entries(n))ie[i]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},n[i]=ie[i],e.set(r[0],r[1]);Object.defineProperty(ie,t,{value:n,enumerable:!1})}return Object.defineProperty(ie,"codes",{value:e,enumerable:!1}),ie.color.close="\x1B[39m",ie.bgColor.close="\x1B[49m",ie.color.ansi=FI(),ie.color.ansi256=BI(),ie.color.ansi16m=VI(),ie.bgColor.ansi=FI(10),ie.bgColor.ansi256=BI(10),ie.bgColor.ansi16m=VI(10),Object.defineProperties(ie,{rgbToAnsi256:{value(t,n,i){return t===n&&n===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},enumerable:!1},hexToRgb:{value(t){let n=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!n)return[0,0,0];let[i]=n;i.length===3&&(i=[...i].map(o=>o+o).join(""));let r=Number.parseInt(i,16);return[r>>16&255,r>>8&255,r&255]},enumerable:!1},hexToAnsi256:{value:t=>ie.rgbToAnsi256(...ie.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let n,i,r;if(t>=232)n=((t-232)*10+8)/255,i=n,r=n;else{t-=16;let c=t%36;n=Math.floor(t/36)/5,i=Math.floor(c/6)/5,r=c%6/5}let o=Math.max(n,i,r)*2;if(o===0)return 30;let a=30+(Math.round(r)<<2|Math.round(i)<<1|Math.round(n));return o===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(t,n,i)=>ie.ansi256ToAnsi(ie.rgbToAnsi256(t,n,i)),enumerable:!1},hexToAnsi:{value:t=>ie.ansi256ToAnsi(ie.hexToAnsi256(t)),enumerable:!1}}),ie}var sz=az(),It=sz;import lv from"node:process";import cz from"node:os";import GI from"node:tty";function mt(e,t=globalThis.Deno?globalThis.Deno.args:lv.argv){let n=e.startsWith("-")?"":e.length===1?"-":"--",i=t.indexOf(n+e),r=t.indexOf("--");return i!==-1&&(r===-1||i<r)}var{env:oe}=lv,Su;mt("no-color")||mt("no-colors")||mt("color=false")||mt("color=never")?Su=0:(mt("color")||mt("colors")||mt("color=true")||mt("color=always"))&&(Su=1);function uz(){if("FORCE_COLOR"in oe)return oe.FORCE_COLOR==="true"?1:oe.FORCE_COLOR==="false"?0:oe.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(oe.FORCE_COLOR,10),3)}function lz(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function dz(e,{streamIsTTY:t,sniffFlags:n=!0}={}){let i=uz();i!==void 0&&(Su=i);let r=n?Su:i;if(r===0)return 0;if(n){if(mt("color=16m")||mt("color=full")||mt("color=truecolor"))return 3;if(mt("color=256"))return 2}if("TF_BUILD"in oe&&"AGENT_NAME"in oe)return 1;if(e&&!t&&r===void 0)return 0;let o=r||0;if(oe.TERM==="dumb")return o;if(lv.platform==="win32"){let a=cz.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in oe)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(a=>a in oe)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(a=>a in oe)||oe.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in oe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(oe.TEAMCITY_VERSION)?1:0;if(oe.COLORTERM==="truecolor"||oe.TERM==="xterm-kitty"||oe.TERM==="xterm-ghostty"||oe.TERM==="wezterm")return 3;if("TERM_PROGRAM"in oe){let a=Number.parseInt((oe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(oe.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(oe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(oe.TERM)||"COLORTERM"in oe?1:o}function ZI(e,t={}){let n=dz(e,{streamIsTTY:e&&e.isTTY,...t});return lz(n)}var mz={stdout:ZI({isTTY:GI.isatty(1)}),stderr:ZI({isTTY:GI.isatty(2)})},WI=mz;function HI(e,t,n){let i=e.indexOf(t);if(i===-1)return e;let r=t.length,o=0,a="";do a+=e.slice(o,i)+t+n,o=i+r,i=e.indexOf(t,o);while(i!==-1);return a+=e.slice(o),a}function qI(e,t,n,i){let r=0,o="";do{let a=e[i-1]==="\r";o+=e.slice(r,a?i-1:i)+t+(a?`\r
171
171
  `:`
172
172
  `)+n,r=i+1,i=e.indexOf(`
173
- `,r)}while(i!==-1);return o+=e.slice(r),o}var{stdout:wI,stderr:kI}=RI,nv=Symbol("GENERATOR"),Si=Symbol("STYLER"),ta=Symbol("IS_EMPTY"),OI=["ansi","ansi","ansi256","ansi16m"],_i=Object.create(null),Vj=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let n=wI?wI.level:0;e.level=t.level===void 0?n:t.level};var Gj=e=>{let t=(...n)=>n.join(" ");return Vj(t,e),Object.setPrototypeOf(t,ra.prototype),t};function ra(e){return Gj(e)}Object.setPrototypeOf(ra.prototype,Function.prototype);for(let[e,t]of Object.entries(It))_i[e]={get(){let n=gu(this,ov(t.open,t.close,this[Si]),this[ta]);return Object.defineProperty(this,e,{value:n}),n}};_i.visible={get(){let e=gu(this,this[Si],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var iv=(e,t,n,...i)=>e==="rgb"?t==="ansi16m"?It[n].ansi16m(...i):t==="ansi256"?It[n].ansi256(It.rgbToAnsi256(...i)):It[n].ansi(It.rgbToAnsi(...i)):e==="hex"?iv("rgb",t,n,...It.hexToRgb(...i)):It[n][e](...i),Zj=["rgb","hex","ansi256"];for(let e of Zj){_i[e]={get(){let{level:n}=this;return function(...i){let r=ov(iv(e,OI[n],"color",...i),It.color.close,this[Si]);return gu(this,r,this[ta])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);_i[t]={get(){let{level:n}=this;return function(...i){let r=ov(iv(e,OI[n],"bgColor",...i),It.bgColor.close,this[Si]);return gu(this,r,this[ta])}}}}var Wj=Object.defineProperties(()=>{},{..._i,level:{enumerable:!0,get(){return this[nv].level},set(e){this[nv].level=e}}}),ov=(e,t,n)=>{let i,r;return n===void 0?(i=e,r=t):(i=n.openAll+e,r=t+n.closeAll),{open:e,close:t,openAll:i,closeAll:r,parent:n}},gu=(e,t,n)=>{let i=(...r)=>Hj(i,r.length===1?""+r[0]:r.join(" "));return Object.setPrototypeOf(i,Wj),i[nv]=e,i[Si]=t,i[ta]=n,i},Hj=(e,t)=>{if(e.level<=0||!t)return e[ta]?"":t;let n=e[Si];if(n===void 0)return t;let{openAll:i,closeAll:r}=n;if(t.includes("\x1B"))for(;n!==void 0;)t=PI(t,n.close,n.open),n=n.parent;let o=t.indexOf(`
174
- `);return o!==-1&&(t=NI(t,r,i,o)),i+t+r};Object.defineProperties(ra.prototype,_i);var qj=ra(),J5=ra({level:kI?kI.level:0});var DI=qj;import FI from"node:process";import yu from"node:process";var Kj=(e,t,n,i)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;let r=Object.getOwnPropertyDescriptor(e,n),o=Object.getOwnPropertyDescriptor(t,n);!Yj(r,o)&&i||Object.defineProperty(e,n,o)},Yj=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},Xj=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},Jj=(e,t)=>`/* Wrapped ${e}*/
175
- ${t}`,Qj=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),ez=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),tz=(e,t,n)=>{let i=n===""?"":`with ${n.trim()}() `,r=Jj.bind(null,i,t.toString());Object.defineProperty(r,"name",ez);let{writable:o,enumerable:a,configurable:c}=Qj;Object.defineProperty(e,"toString",{value:r,writable:o,enumerable:a,configurable:c})};function av(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:i}=e;for(let r of Reflect.ownKeys(t))Kj(e,t,r,n);return Xj(e,t),tz(e,t,i),e}var hu=new WeakMap,MI=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let n,i=0,r=e.displayName||e.name||"<anonymous>",o=function(...a){if(hu.set(o,++i),i===1)n=e.apply(this,a),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return n};return av(o,e),hu.set(o,i),o};MI.callCount=e=>{if(!hu.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return hu.get(e)};var jI=MI;var un=[];un.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&un.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&un.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var vu=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",sv=Symbol.for("signal-exit emitter"),cv=globalThis,rz=Object.defineProperty.bind(Object),uv=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(cv[sv])return cv[sv];rz(cv,sv,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,n){this.listeners[t].push(n)}removeListener(t,n){let i=this.listeners[t],r=i.indexOf(n);r!==-1&&(r===0&&i.length===1?i.length=0:i.splice(r,1))}emit(t,n,i){if(this.emitted[t])return!1;this.emitted[t]=!0;let r=!1;for(let o of this.listeners[t])r=o(n,i)===!0||r;return t==="exit"&&(r=this.emit("afterExit",n,i)||r),r}},bu=class{},nz=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}}),lv=class extends bu{onExit(){return()=>{}}load(){}unload(){}},dv=class extends bu{#o=mv.platform==="win32"?"SIGINT":"SIGHUP";#n=new uv;#r;#e;#i;#t={};#a=!1;constructor(t){super(),this.#r=t,this.#t={};for(let n of un)this.#t[n]=()=>{let i=this.#r.listeners(n),{count:r}=this.#n,o=t;if(typeof o.__signal_exit_emitter__=="object"&&typeof o.__signal_exit_emitter__.count=="number"&&(r+=o.__signal_exit_emitter__.count),i.length===r){this.unload();let a=this.#n.emit("exit",null,n),c=n==="SIGHUP"?this.#o:n;a||t.kill(t.pid,c)}};this.#i=t.reallyExit,this.#e=t.emit}onExit(t,n){if(!vu(this.#r))return()=>{};this.#a===!1&&this.load();let i=n?.alwaysLast?"afterExit":"exit";return this.#n.on(i,t),()=>{this.#n.removeListener(i,t),this.#n.listeners.exit.length===0&&this.#n.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#a){this.#a=!0,this.#n.count+=1;for(let t of un)try{let n=this.#t[t];n&&this.#r.on(t,n)}catch{}this.#r.emit=(t,...n)=>this.#d(t,...n),this.#r.reallyExit=t=>this.#c(t)}}unload(){this.#a&&(this.#a=!1,un.forEach(t=>{let n=this.#t[t];if(!n)throw new Error("Listener not defined for signal: "+t);try{this.#r.removeListener(t,n)}catch{}}),this.#r.emit=this.#e,this.#r.reallyExit=this.#i,this.#n.count-=1)}#c(t){return vu(this.#r)?(this.#r.exitCode=t||0,this.#n.emit("exit",this.#r.exitCode,null),this.#i.call(this.#r,this.#r.exitCode)):0}#d(t,...n){let i=this.#e;if(t==="exit"&&vu(this.#r)){typeof n[0]=="number"&&(this.#r.exitCode=n[0]);let r=i.call(this.#r,t,...n);return this.#n.emit("exit",this.#r.exitCode,null),r}else return i.call(this.#r,t,...n)}},mv=globalThis.process,{onExit:zI,load:o8,unload:a8}=nz(vu(mv)?new dv(mv):new lv);var LI=yu.stderr.isTTY?yu.stderr:yu.stdout.isTTY?yu.stdout:void 0,iz=LI?jI(()=>{zI(()=>{LI.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},UI=iz;var Su=!1,Ei={};Ei.show=(e=FI.stderr)=>{e.isTTY&&(Su=!1,e.write("\x1B[?25h"))};Ei.hide=(e=FI.stderr)=>{e.isTTY&&(UI(),Su=!0,e.write("\x1B[?25l"))};Ei.toggle=(e,t)=>{e!==void 0&&(Su=e),Su?Ei.show(t):Ei.hide(t)};var pv=Ei;var fv={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots14:{interval:80,frames:["\u2809\u2809","\u2808\u2819","\u2800\u2839","\u2800\u28B8","\u2800\u28F0","\u2880\u28E0","\u28C0\u28C0","\u28C4\u2840","\u28C6\u2800","\u2847\u2800","\u280F\u2800","\u280B\u2801"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},dotsCircle:{interval:80,frames:["\u288E ","\u280E\u2801","\u280A\u2811","\u2808\u2831"," \u2871","\u2880\u2870","\u2884\u2860","\u2886\u2840"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},rollingLine:{interval:80,frames:["/ "," - "," \\ "," |"," |"," \\ "," - ","/ "]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u{1F497} "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]},fish:{interval:80,frames:["~~~~~~~~~~~~~~~~~~~~","> ~~~~~~~~~~~~~~~~~~","\xBA> ~~~~~~~~~~~~~~~~~","(\xBA> ~~~~~~~~~~~~~~~~","((\xBA> ~~~~~~~~~~~~~~~","<((\xBA> ~~~~~~~~~~~~~~","><((\xBA> ~~~~~~~~~~~~~"," ><((\xBA> ~~~~~~~~~~~~","~ ><((\xBA> ~~~~~~~~~~~","~~ <>((\xBA> ~~~~~~~~~~","~~~ ><((\xBA> ~~~~~~~~~","~~~~ <>((\xBA> ~~~~~~~~","~~~~~ ><((\xBA> ~~~~~~~","~~~~~~ <>((\xBA> ~~~~~~","~~~~~~~ ><((\xBA> ~~~~~","~~~~~~~~ <>((\xBA> ~~~~","~~~~~~~~~ ><((\xBA> ~~~","~~~~~~~~~~ <>((\xBA> ~~","~~~~~~~~~~~ ><((\xBA> ~","~~~~~~~~~~~~ <>((\xBA> ","~~~~~~~~~~~~~ ><((\xBA>","~~~~~~~~~~~~~~ <>((\xBA","~~~~~~~~~~~~~~~ ><((","~~~~~~~~~~~~~~~~ <>(","~~~~~~~~~~~~~~~~~ ><","~~~~~~~~~~~~~~~~~~ <","~~~~~~~~~~~~~~~~~~~~"]}};var na=fv,v8=Object.keys(fv);var ln={};Pt(ln,{error:()=>dz,info:()=>cz,success:()=>uz,warning:()=>lz});import az from"node:tty";var sz=az?.WriteStream?.prototype?.hasColors?.()??!1,T=(e,t)=>{if(!sz)return r=>r;let n=`\x1B[${e}m`,i=`\x1B[${t}m`;return r=>{let o=r+"",a=o.indexOf(i);if(a===-1)return n+o+i;let c=n,u=0,m=(t===22?i:"")+n;for(;a!==-1;)c+=o.slice(u,a)+m,u=a+i.length,a=o.indexOf(i,u);return c+=o.slice(u)+i,c}},S8=T(0,0),_8=T(1,22),E8=T(2,22),x8=T(3,23),A8=T(4,24),I8=T("4:2",24),$8=T("4:3",24),T8=T("4:4",24),C8=T("4:5",24),R8=T(53,55),P8=T(7,27),N8=T(8,28),w8=T(9,29),k8=T(30,39),BI=T(31,39),VI=T(32,39),GI=T(33,39),ZI=T(34,39),O8=T(35,39),D8=T(36,39),M8=T(37,39),j8=T(90,39),z8=T(40,49),L8=T(41,49),U8=T(42,49),F8=T(43,49),B8=T(44,49),V8=T(45,49),G8=T(46,49),Z8=T(47,49),W8=T(100,49),H8=T(91,39),q8=T(92,39),K8=T(93,39),Y8=T(94,39),X8=T(95,39),J8=T(96,39),Q8=T(97,39),eW=T(101,49),tW=T(102,49),rW=T(103,49),nW=T(104,49),iW=T(105,49),oW=T(106,49),aW=T(107,49),sW=T("58;5;0",59),cW=T("58;5;1",59),uW=T("58;5;2",59),lW=T("58;5;3",59),dW=T("58;5;4",59),mW=T("58;5;5",59),pW=T("58;5;6",59),fW=T("58;5;7",59),gW=T("58;5;8",59),hW=T("58;5;9",59),vW=T("58;5;10",59),bW=T("58;5;11",59),yW=T("58;5;12",59),SW=T("58;5;13",59),_W=T("58;5;14",59),EW=T("58;5;15",59);import WI from"node:process";function ia(){let{env:e}=WI,{TERM:t,TERM_PROGRAM:n}=e;return WI.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||n==="Terminus-Sublime"||n==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var _u=ia(),cz=ZI(_u?"\u2139":"i"),uz=VI(_u?"\u2714":"\u221A"),lz=GI(_u?"\u26A0":"\u203C"),dz=BI(_u?"\u2716":"\xD7");function gv({onlyFirst:e=!1}={}){let r="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(r,e?void 0:"g")}var mz=gv();function hv(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return!e.includes("\x1B")&&!e.includes("\x9B")?e:e.replace(mz,"")}var HI=[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],qI=12288,KI=65510,YI=[12288,12288,65281,65376,65504,65510];var XI=4352,JI=262141,vv=[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 Eu=(e,t)=>{let n=0,i=Math.floor(e.length/2)-1;for(;n<=i;){let r=Math.floor((n+i)/2),o=r*2;if(t<e[o])i=r-1;else if(t>e[o+1])n=r+1;else return!0}return!1};var QI=19968,[gz,hz]=vz(vv);function vz(e){let t=e[0],n=e[1];for(let i=0;i<e.length;i+=2){let r=e[i],o=e[i+1];if(QI>=r&&QI<=o)return[r,o];o-r>n-t&&(t=r,n=o)}return[t,n]}var e$=e=>e<161||e>1114109?!1:Eu(HI,e),t$=e=>e<qI||e>KI?!1:Eu(YI,e);var r$=e=>e>=gz&&e<=hz?!0:e<XI||e>JI?!1:Eu(vv,e);function bz(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function oa(e,{ambiguousAsWide:t=!1}={}){return bz(e),t$(e)||r$(e)||t&&e$(e)?2:1}var yz=new Intl.Segmenter,n$=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Nonspacing_Mark}|\\p{Enclosing_Mark}|\\p{Surrogate})+$","v"),Sz=new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Nonspacing_Mark}\\p{Enclosing_Mark}\\p{Surrogate}]+","v"),_z=new RegExp("\\p{Spacing_Mark}","v"),Ez=new RegExp("^\\p{RGI_Emoji}$","v"),xz=/^[\d#*]\u20E3$/,Az=new RegExp("\\p{Extended_Pictographic}","gu");function Iz(e){if(e.length>50)return!1;if(xz.test(e))return!0;if(e.includes("\u200D")){let t=e.match(Az);return t!==null&&t.length>=2}return!1}function $z(e){return e.replace(Sz,"")}function Tz(e){return n$.test(e)}function i$(e){return e>=4352&&e<=4447||e>=43360&&e<=43388}function o$(e){return e>=4448&&e<=4519||e>=55216&&e<=55238}function a$(e){return e>=4520&&e<=4607||e>=55243&&e<=55291}function Cz(e){return i$(e)||o$(e)||a$(e)}function Rz(e,t){let n=[];for(let r of e)n$.test(r)||n.push(r.codePointAt(0));if(n.length===0)return;let i=0;for(let r=0;r<n.length;r++){let o=n[r];if(!Cz(o)){if(i===0)return;for(let a=r;a<n.length;a++)i+=oa(n[a],t);return i}if(i$(o)&&o$(n[r+1])){i+=2,r+=a$(n[r+2])?2:1;continue}i+=oa(o,t)}return i}function Pz(e,t){let n=0,i=!0;for(let r of e){if(i){i=!1;continue}(_z.test(r)||r>="\uFF00"&&r<="\uFFEF")&&(n+=oa(r.codePointAt(0),t))}return n}function bv(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:i=!1}=t,r=e;if(!i&&(r.includes("\x1B")||r.includes("\x9B"))&&(r=hv(r)),r.length===0)return 0;if(/^[\u0020-\u007E]*$/.test(r))return r.length;let o=0,a={ambiguousAsWide:!n};for(let{segment:c}of yz.segment(r)){if(Tz(c))continue;if(Ez.test(c)||Iz(c)){o+=2;continue}let u=$z(c),l=Rz(u,a);if(l!==void 0){o+=l;continue}let m=u.codePointAt(0);o+=oa(m,a),o+=Pz(u,a)}return o}function yv({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}import xu from"node:process";var Nz=3,Sv=class{#o=0;#n;#r=!1;#e=!1;#i=t=>{if(!t?.length)return;(typeof t=="string"?t.codePointAt(0):t[0])===Nz&&xu.kill(xu.pid,"SIGINT")};start(){this.#o++,this.#o===1&&this.#t()}stop(){this.#o!==0&&--this.#o===0&&this.#a()}#t(){let{stdin:t}=xu;if(xu.platform==="win32"||!t?.isTTY||typeof t.setRawMode!="function"){this.#n=void 0;return}this.#n=t,this.#r=t.isPaused(),this.#e=!!t.isRaw,t.setRawMode(!0),t.prependListener("data",this.#i),this.#r&&t.resume()}#a(){if(!this.#n)return;let t=this.#n;t.off("data",this.#i),t.isTTY&&t.setRawMode?.(this.#e),this.#r&&t.pause(),this.#n=void 0,this.#r=!1,this.#e=!1}},wz=new Sv,_v=Object.freeze(wz);var Oz=200,Dz="\x1B[?2026h",Mz="\x1B[?2026l",Au=new Map,jz=new Set(["black","red","green","yellow","blue","magenta","cyan","white","gray"]),Ev=class{#o=0;#n=-1;#r=0;#e;#i;#t;#a;#c=new Map;#d=!1;#u;#s;#p=!1;#m;#l(t){this.#d=!0;try{return t()}finally{this.#d=!1}}#g(){this.isSpinning&&this.render()}#_(t,n){if(t==null)return"";if(typeof t=="string")return t;if(Buffer.isBuffer(t)||ArrayBuffer.isView(t)){let i=typeof n=="string"&&n&&n!=="buffer"?n:"utf8";return Buffer.from(t).toString(i)}return String(t)}#E(t){if(!t)return!1;let n=t.at(-1);return n===`
176
- `||n==="\r"}#x(){this.#s||(this.#s=setTimeout(()=>{this.#s=void 0,this.isSpinning&&this.#g()},Oz),typeof this.#s?.unref=="function"&&this.#s.unref())}#h(){this.#s&&(clearTimeout(this.#s),this.#s=void 0)}#v(t,n,i,r){let o=this.#y(i," "),c=typeof n=="string"?(t?" ":"")+n:"",u=this.#S(r," ");return o+t+c+u}constructor(t){if(typeof t=="string"&&(t={text:t}),this.#e={color:"cyan",stream:aa.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#e.color,this.#t=this.#e.stream,typeof this.#e.isEnabled!="boolean"&&(this.#e.isEnabled=yv({stream:this.#t})),typeof this.#e.isSilent!="boolean"&&(this.#e.isSilent=!1),this.#e.interval!==void 0&&!(Number.isInteger(this.#e.interval)&&this.#e.interval>0))throw new Error("The `interval` option must be a positive integer");let n=this.#e.interval;this.spinner=this.#e.spinner,this.#e.interval=n,this.text=this.#e.text,this.prefixText=this.#e.prefixText,this.suffixText=this.#e.suffixText,this.indent=this.#e.indent,aa.env.NODE_ENV==="test"&&(this._stream=this.#t,this._isEnabled=this.#e.isEnabled,Object.defineProperty(this,"_linesToClear",{get(){return this.#o},set(i){this.#o=i}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#n}}),Object.defineProperty(this,"_lineCount",{get(){let i=this.#t.columns??80,r=typeof this.#e.prefixText=="function"?"":this.#e.prefixText,o=typeof this.#e.suffixText=="function"?"":this.#e.suffixText,a=typeof r=="string"&&r!==""?r+" ":"",c=typeof o=="string"&&o!==""?" "+o:"",l=" ".repeat(this.#e.indent)+a+"-"+(typeof this.#e.text=="string"?" "+this.#e.text:"")+c;return this.#f(l,i)}}))}get indent(){return this.#e.indent}set indent(t=0){if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");this.#e.indent=t}get interval(){return this.#e.interval??this.#i.interval??100}get spinner(){return this.#i}set spinner(t){if(this.#n=-1,this.#e.interval=void 0,typeof t=="object"){if(!Array.isArray(t.frames)||t.frames.length===0||t.frames.some(n=>typeof n!="string"))throw new Error("The given spinner must have a non-empty `frames` array of strings");if(t.interval!==void 0&&!(Number.isInteger(t.interval)&&t.interval>0))throw new Error("`spinner.interval` must be a positive integer if provided");this.#i=t}else if(!ia())this.#i=na.line;else if(t===void 0)this.#i=na.dots;else if(t!=="default"&&na[t])this.#i=na[t];else throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#e.text}set text(t=""){this.#e.text=t}get prefixText(){return this.#e.prefixText}set prefixText(t=""){this.#e.prefixText=t}get suffixText(){return this.#e.suffixText}set suffixText(t=""){this.#e.suffixText=t}get isSpinning(){return this.#a!==void 0}#b(t,n,i=!1){let r=typeof t=="function"?t():t;return typeof r=="string"&&r!==""?i?n+r:r+n:""}#y(t=this.#e.prefixText,n=" "){return this.#b(t,n,!1)}#S(t=this.#e.suffixText,n=" "){return this.#b(t,n,!0)}#f(t,n){let i=0;for(let r of kz(t).split(`
177
- `))i+=Math.max(1,Math.ceil(bv(r)/n));return i}get color(){return this.#m}set color(t){if(t!==void 0&&t!==!1&&!jz.has(t))throw new Error("The `color` option must be a valid color or `false` to disable");this.#m=t}get isEnabled(){return this.#e.isEnabled&&!this.#e.isSilent}set isEnabled(t){if(typeof t!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#e.isEnabled=t}get isSilent(){return this.#e.isSilent}set isSilent(t){if(typeof t!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#e.isSilent=t}frame(){let t=Date.now();(this.#n===-1||t-this.#r>=this.interval)&&(this.#n=(this.#n+1)%this.#i.frames.length,this.#r=t);let{frames:n}=this.#i,i=n[this.#n];this.#m&&(i=DI[this.#m](i));let r=this.#y(this.#e.prefixText," "),o=typeof this.text=="string"?" "+this.text:"",a=this.#S(this.#e.suffixText," ");return r+i+o+a}clear(){return!this.isEnabled||!this.#t.isTTY?this:(this.#l(()=>{this.#t.cursorTo(0);for(let t=0;t<this.#o;t++)t>0&&this.#t.moveCursor(0,-1),this.#t.clearLine(1);this.#e.indent&&this.#t.cursorTo(this.#e.indent)}),this.#o=0,this)}#A(t){if(!t||this.#c.has(t)||!t.isTTY||typeof t.write!="function")return;Au.has(t)&&console.warn("[ora] Multiple concurrent spinners detected. This may cause visual corruption. Use one spinner at a time.");let n=t.write;this.#c.set(t,n),Au.set(t,this),t.write=(i,r,o)=>this.#T(t,n,i,r,o)}#I(){if(!this.isEnabled||this.#c.size>0)return;let t=new Set([this.#t,aa.stdout,aa.stderr]);for(let n of t)this.#A(n)}#$(){for(let[t,n]of this.#c)t.write=n,Au.get(t)===this&&Au.delete(t);this.#c.clear()}#T(t,n,i,r,o){if(typeof r=="function"&&(o=r,r=void 0),this.#d)return n.call(t,i,r,o);this.clear();let a=this.#_(i,r),c=this.#E(a),u=n.call(t,i,r,o);return c?this.#h():a.length>0&&this.#x(),this.isSpinning&&!this.#s&&this.render(),u}render(){if(!this.isEnabled||this.#u||this.#s)return this;let t=this.#t.isTTY,n=!1;try{t&&(this.#l(()=>this.#t.write(Dz)),n=!0),this.clear();let i=this.frame(),r=this.#t.columns??80,o=this.#f(i,r),a=this.#t.rows;if(a&&a>1&&o>a){let u=i.split(`
173
+ `,r)}while(i!==-1);return o+=e.slice(r),o}var{stdout:KI,stderr:YI}=WI,dv=Symbol("GENERATOR"),Ri=Symbol("STYLER"),sa=Symbol("IS_EMPTY"),XI=["ansi","ansi","ansi256","ansi16m"],Ci=Object.create(null),pz=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let n=KI?KI.level:0;e.level=t.level===void 0?n:t.level};var fz=e=>{let t=(...n)=>n.join(" ");return pz(t,e),Object.setPrototypeOf(t,ca.prototype),t};function ca(e){return fz(e)}Object.setPrototypeOf(ca.prototype,Function.prototype);for(let[e,t]of Object.entries(It))Ci[e]={get(){let n=_u(this,pv(t.open,t.close,this[Ri]),this[sa]);return Object.defineProperty(this,e,{value:n}),n}};Ci.visible={get(){let e=_u(this,this[Ri],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var mv=(e,t,n,...i)=>e==="rgb"?t==="ansi16m"?It[n].ansi16m(...i):t==="ansi256"?It[n].ansi256(It.rgbToAnsi256(...i)):It[n].ansi(It.rgbToAnsi(...i)):e==="hex"?mv("rgb",t,n,...It.hexToRgb(...i)):It[n][e](...i),gz=["rgb","hex","ansi256"];for(let e of gz){Ci[e]={get(){let{level:n}=this;return function(...i){let r=pv(mv(e,XI[n],"color",...i),It.color.close,this[Ri]);return _u(this,r,this[sa])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);Ci[t]={get(){let{level:n}=this;return function(...i){let r=pv(mv(e,XI[n],"bgColor",...i),It.bgColor.close,this[Ri]);return _u(this,r,this[sa])}}}}var hz=Object.defineProperties(()=>{},{...Ci,level:{enumerable:!0,get(){return this[dv].level},set(e){this[dv].level=e}}}),pv=(e,t,n)=>{let i,r;return n===void 0?(i=e,r=t):(i=n.openAll+e,r=t+n.closeAll),{open:e,close:t,openAll:i,closeAll:r,parent:n}},_u=(e,t,n)=>{let i=(...r)=>vz(i,r.length===1?""+r[0]:r.join(" "));return Object.setPrototypeOf(i,hz),i[dv]=e,i[Ri]=t,i[sa]=n,i},vz=(e,t)=>{if(e.level<=0||!t)return e[sa]?"":t;let n=e[Ri];if(n===void 0)return t;let{openAll:i,closeAll:r}=n;if(t.includes("\x1B"))for(;n!==void 0;)t=HI(t,n.close,n.open),n=n.parent;let o=t.indexOf(`
174
+ `);return o!==-1&&(t=qI(t,r,i,o)),i+t+r};Object.defineProperties(ca.prototype,Ci);var bz=ca(),$8=ca({level:YI?YI.level:0});var JI=bz;import i$ from"node:process";import Iu from"node:process";var yz=(e,t,n,i)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;let r=Object.getOwnPropertyDescriptor(e,n),o=Object.getOwnPropertyDescriptor(t,n);!Sz(r,o)&&i||Object.defineProperty(e,n,o)},Sz=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},_z=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},Ez=(e,t)=>`/* Wrapped ${e}*/
175
+ ${t}`,xz=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Az=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Iz=(e,t,n)=>{let i=n===""?"":`with ${n.trim()}() `,r=Ez.bind(null,i,t.toString());Object.defineProperty(r,"name",Az);let{writable:o,enumerable:a,configurable:c}=xz;Object.defineProperty(e,"toString",{value:r,writable:o,enumerable:a,configurable:c})};function fv(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:i}=e;for(let r of Reflect.ownKeys(t))yz(e,t,r,n);return _z(e,t),Iz(e,t,i),e}var Eu=new WeakMap,QI=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let n,i=0,r=e.displayName||e.name||"<anonymous>",o=function(...a){if(Eu.set(o,++i),i===1)n=e.apply(this,a),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return n};return fv(o,e),Eu.set(o,i),o};QI.callCount=e=>{if(!Eu.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Eu.get(e)};var e$=QI;var mn=[];mn.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&mn.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&mn.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var xu=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",gv=Symbol.for("signal-exit emitter"),hv=globalThis,$z=Object.defineProperty.bind(Object),vv=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(hv[gv])return hv[gv];$z(hv,gv,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,n){this.listeners[t].push(n)}removeListener(t,n){let i=this.listeners[t],r=i.indexOf(n);r!==-1&&(r===0&&i.length===1?i.length=0:i.splice(r,1))}emit(t,n,i){if(this.emitted[t])return!1;this.emitted[t]=!0;let r=!1;for(let o of this.listeners[t])r=o(n,i)===!0||r;return t==="exit"&&(r=this.emit("afterExit",n,i)||r),r}},Au=class{},Tz=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}}),bv=class extends Au{onExit(){return()=>{}}load(){}unload(){}},yv=class extends Au{#o=Sv.platform==="win32"?"SIGINT":"SIGHUP";#n=new vv;#r;#e;#i;#t={};#a=!1;constructor(t){super(),this.#r=t,this.#t={};for(let n of mn)this.#t[n]=()=>{let i=this.#r.listeners(n),{count:r}=this.#n,o=t;if(typeof o.__signal_exit_emitter__=="object"&&typeof o.__signal_exit_emitter__.count=="number"&&(r+=o.__signal_exit_emitter__.count),i.length===r){this.unload();let a=this.#n.emit("exit",null,n),c=n==="SIGHUP"?this.#o:n;a||t.kill(t.pid,c)}};this.#i=t.reallyExit,this.#e=t.emit}onExit(t,n){if(!xu(this.#r))return()=>{};this.#a===!1&&this.load();let i=n?.alwaysLast?"afterExit":"exit";return this.#n.on(i,t),()=>{this.#n.removeListener(i,t),this.#n.listeners.exit.length===0&&this.#n.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#a){this.#a=!0,this.#n.count+=1;for(let t of mn)try{let n=this.#t[t];n&&this.#r.on(t,n)}catch{}this.#r.emit=(t,...n)=>this.#d(t,...n),this.#r.reallyExit=t=>this.#c(t)}}unload(){this.#a&&(this.#a=!1,mn.forEach(t=>{let n=this.#t[t];if(!n)throw new Error("Listener not defined for signal: "+t);try{this.#r.removeListener(t,n)}catch{}}),this.#r.emit=this.#e,this.#r.reallyExit=this.#i,this.#n.count-=1)}#c(t){return xu(this.#r)?(this.#r.exitCode=t||0,this.#n.emit("exit",this.#r.exitCode,null),this.#i.call(this.#r,this.#r.exitCode)):0}#d(t,...n){let i=this.#e;if(t==="exit"&&xu(this.#r)){typeof n[0]=="number"&&(this.#r.exitCode=n[0]);let r=i.call(this.#r,t,...n);return this.#n.emit("exit",this.#r.exitCode,null),r}else return i.call(this.#r,t,...n)}},Sv=globalThis.process,{onExit:t$,load:k8,unload:O8}=Tz(xu(Sv)?new yv(Sv):new bv);var r$=Iu.stderr.isTTY?Iu.stderr:Iu.stdout.isTTY?Iu.stdout:void 0,Rz=r$?e$(()=>{t$(()=>{r$.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},n$=Rz;var $u=!1,Ni={};Ni.show=(e=i$.stderr)=>{e.isTTY&&($u=!1,e.write("\x1B[?25h"))};Ni.hide=(e=i$.stderr)=>{e.isTTY&&(n$(),$u=!0,e.write("\x1B[?25l"))};Ni.toggle=(e,t)=>{e!==void 0&&($u=e),$u?Ni.show(t):Ni.hide(t)};var _v=Ni;var Ev={dots:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},dots2:{interval:80,frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},dots3:{interval:80,frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},dots4:{interval:80,frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},dots5:{interval:80,frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},dots6:{interval:80,frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},dots7:{interval:80,frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},dots8:{interval:80,frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},dots9:{interval:80,frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},dots10:{interval:80,frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},dots11:{interval:100,frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},dots12:{interval:80,frames:["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},dots13:{interval:80,frames:["\u28FC","\u28F9","\u28BB","\u283F","\u285F","\u28CF","\u28E7","\u28F6"]},dots14:{interval:80,frames:["\u2809\u2809","\u2808\u2819","\u2800\u2839","\u2800\u28B8","\u2800\u28F0","\u2880\u28E0","\u28C0\u28C0","\u28C4\u2840","\u28C6\u2800","\u2847\u2800","\u280F\u2800","\u280B\u2801"]},dots8Bit:{interval:80,frames:["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},dotsCircle:{interval:80,frames:["\u288E ","\u280E\u2801","\u280A\u2811","\u2808\u2831"," \u2871","\u2880\u2870","\u2884\u2860","\u2886\u2840"]},sand:{interval:80,frames:["\u2801","\u2802","\u2804","\u2840","\u2848","\u2850","\u2860","\u28C0","\u28C1","\u28C2","\u28C4","\u28CC","\u28D4","\u28E4","\u28E5","\u28E6","\u28EE","\u28F6","\u28F7","\u28FF","\u287F","\u283F","\u289F","\u281F","\u285B","\u281B","\u282B","\u288B","\u280B","\u280D","\u2849","\u2809","\u2811","\u2821","\u2881"]},line:{interval:130,frames:["-","\\","|","/"]},line2:{interval:100,frames:["\u2802","-","\u2013","\u2014","\u2013","-"]},rollingLine:{interval:80,frames:["/ "," - "," \\ "," |"," |"," \\ "," - ","/ "]},pipe:{interval:100,frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},simpleDots:{interval:400,frames:[". ",".. ","..."," "]},simpleDotsScrolling:{interval:200,frames:[". ",".. ","..."," .."," ."," "]},star:{interval:70,frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},star2:{interval:80,frames:["+","x","*"]},flip:{interval:70,frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},hamburger:{interval:100,frames:["\u2631","\u2632","\u2634"]},growVertical:{interval:120,frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},growHorizontal:{interval:120,frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},balloon:{interval:140,frames:[" ",".","o","O","@","*"," "]},balloon2:{interval:120,frames:[".","o","O","\xB0","O","o","."]},noise:{interval:100,frames:["\u2593","\u2592","\u2591"]},bounce:{interval:120,frames:["\u2801","\u2802","\u2804","\u2802"]},boxBounce:{interval:120,frames:["\u2596","\u2598","\u259D","\u2597"]},boxBounce2:{interval:100,frames:["\u258C","\u2580","\u2590","\u2584"]},triangle:{interval:50,frames:["\u25E2","\u25E3","\u25E4","\u25E5"]},binary:{interval:80,frames:["010010","001100","100101","111010","111101","010111","101011","111000","110011","110101"]},arc:{interval:100,frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},circle:{interval:120,frames:["\u25E1","\u2299","\u25E0"]},squareCorners:{interval:180,frames:["\u25F0","\u25F3","\u25F2","\u25F1"]},circleQuarters:{interval:120,frames:["\u25F4","\u25F7","\u25F6","\u25F5"]},circleHalves:{interval:50,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]},squish:{interval:100,frames:["\u256B","\u256A"]},toggle:{interval:250,frames:["\u22B6","\u22B7"]},toggle2:{interval:80,frames:["\u25AB","\u25AA"]},toggle3:{interval:120,frames:["\u25A1","\u25A0"]},toggle4:{interval:100,frames:["\u25A0","\u25A1","\u25AA","\u25AB"]},toggle5:{interval:100,frames:["\u25AE","\u25AF"]},toggle6:{interval:300,frames:["\u101D","\u1040"]},toggle7:{interval:80,frames:["\u29BE","\u29BF"]},toggle8:{interval:100,frames:["\u25CD","\u25CC"]},toggle9:{interval:100,frames:["\u25C9","\u25CE"]},toggle10:{interval:100,frames:["\u3282","\u3280","\u3281"]},toggle11:{interval:50,frames:["\u29C7","\u29C6"]},toggle12:{interval:120,frames:["\u2617","\u2616"]},toggle13:{interval:80,frames:["=","*","-"]},arrow:{interval:100,frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},arrow2:{interval:80,frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},arrow3:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},bouncingBar:{interval:80,frames:["[ ]","[= ]","[== ]","[=== ]","[====]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},bouncingBall:{interval:80,frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},smiley:{interval:200,frames:["\u{1F604} ","\u{1F61D} "]},monkey:{interval:300,frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "]},hearts:{interval:100,frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u{1F497} "]},clock:{interval:100,frames:["\u{1F55B} ","\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "]},earth:{interval:180,frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "]},material:{interval:17,frames:["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},moon:{interval:80,frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "]},runner:{interval:140,frames:["\u{1F6B6} ","\u{1F3C3} "]},pong:{interval:80,frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},shark:{interval:120,frames:["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},dqpb:{interval:100,frames:["d","q","p","b"]},weather:{interval:100,frames:["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\u{1F324} ","\u26C5\uFE0F ","\u{1F325} ","\u2601\uFE0F ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u26C8 ","\u{1F328} ","\u{1F327} ","\u{1F328} ","\u2601\uFE0F ","\u{1F325} ","\u26C5\uFE0F ","\u{1F324} ","\u2600\uFE0F ","\u2600\uFE0F "]},christmas:{interval:400,frames:["\u{1F332}","\u{1F384}"]},grenade:{interval:80,frames:["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},point:{interval:125,frames:["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},layer:{interval:150,frames:["-","=","\u2261"]},betaWave:{interval:80,frames:["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]},fingerDance:{interval:160,frames:["\u{1F918} ","\u{1F91F} ","\u{1F596} ","\u270B ","\u{1F91A} ","\u{1F446} "]},fistBump:{interval:80,frames:["\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u{1F91C}\u3000\u3000\u3000\u3000\u{1F91B} ","\u3000\u{1F91C}\u3000\u3000\u{1F91B}\u3000 ","\u3000\u3000\u{1F91C}\u{1F91B}\u3000\u3000 ","\u3000\u{1F91C}\u2728\u{1F91B}\u3000\u3000 ","\u{1F91C}\u3000\u2728\u3000\u{1F91B}\u3000 "]},soccerHeader:{interval:80,frames:[" \u{1F9D1}\u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F\u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} ","\u{1F9D1} \u26BD\uFE0F \u{1F9D1} "]},mindblown:{interval:160,frames:["\u{1F610} ","\u{1F610} ","\u{1F62E} ","\u{1F62E} ","\u{1F626} ","\u{1F626} ","\u{1F627} ","\u{1F627} ","\u{1F92F} ","\u{1F4A5} ","\u2728 ","\u3000 ","\u3000 ","\u3000 "]},speaker:{interval:160,frames:["\u{1F508} ","\u{1F509} ","\u{1F50A} ","\u{1F509} "]},orangePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} "]},bluePulse:{interval:100,frames:["\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},orangeBluePulse:{interval:100,frames:["\u{1F538} ","\u{1F536} ","\u{1F7E0} ","\u{1F7E0} ","\u{1F536} ","\u{1F539} ","\u{1F537} ","\u{1F535} ","\u{1F535} ","\u{1F537} "]},timeTravel:{interval:100,frames:["\u{1F55B} ","\u{1F55A} ","\u{1F559} ","\u{1F558} ","\u{1F557} ","\u{1F556} ","\u{1F555} ","\u{1F554} ","\u{1F553} ","\u{1F552} ","\u{1F551} ","\u{1F550} "]},aesthetic:{interval:80,frames:["\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B1","\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0\u25B0","\u25B0\u25B1\u25B1\u25B1\u25B1\u25B1\u25B1"]},dwarfFortress:{interval:80,frames:[" \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A\u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 ","\u263A \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\u2588\xA3\xA3\xA3 "," \u263A \u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2588\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2593\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2592\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A\u2591\u2588\xA3\xA3\xA3 "," \u263A \u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2588\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2592\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A\u2591\xA3\xA3\xA3 "," \u263A \xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\xA3\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2593\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2592\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A\u2591\xA3\xA3 "," \u263A \xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\xA3\xA3 "," \u263A\u2593\xA3 "," \u263A\u2593\xA3 "," \u263A\u2592\xA3 "," \u263A\u2592\xA3 "," \u263A\u2591\xA3 "," \u263A\u2591\xA3 "," \u263A \xA3 "," \u263A\xA3 "," \u263A\xA3 "," \u263A\u2593 "," \u263A\u2593 "," \u263A\u2592 "," \u263A\u2592 "," \u263A\u2591 "," \u263A\u2591 "," \u263A "," \u263A &"," \u263A \u263C&"," \u263A \u263C &"," \u263A\u263C &"," \u263A\u263C & "," \u203C & "," \u263A & "," \u203C & "," \u263A & "," \u203C & "," \u263A & ","\u203C & "," & "," & "," & \u2591 "," & \u2592 "," & \u2593 "," & \xA3 "," & \u2591\xA3 "," & \u2592\xA3 "," & \u2593\xA3 "," & \xA3\xA3 "," & \u2591\xA3\xA3 "," & \u2592\xA3\xA3 ","& \u2593\xA3\xA3 ","& \xA3\xA3\xA3 "," \u2591\xA3\xA3\xA3 "," \u2592\xA3\xA3\xA3 "," \u2593\xA3\xA3\xA3 "," \u2588\xA3\xA3\xA3 "," \u2591\u2588\xA3\xA3\xA3 "," \u2592\u2588\xA3\xA3\xA3 "," \u2593\u2588\xA3\xA3\xA3 "," \u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2591\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2592\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2593\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "," \u2588\u2588\u2588\u2588\u2588\u2588\xA3\xA3\xA3 "]},fish:{interval:80,frames:["~~~~~~~~~~~~~~~~~~~~","> ~~~~~~~~~~~~~~~~~~","\xBA> ~~~~~~~~~~~~~~~~~","(\xBA> ~~~~~~~~~~~~~~~~","((\xBA> ~~~~~~~~~~~~~~~","<((\xBA> ~~~~~~~~~~~~~~","><((\xBA> ~~~~~~~~~~~~~"," ><((\xBA> ~~~~~~~~~~~~","~ ><((\xBA> ~~~~~~~~~~~","~~ <>((\xBA> ~~~~~~~~~~","~~~ ><((\xBA> ~~~~~~~~~","~~~~ <>((\xBA> ~~~~~~~~","~~~~~ ><((\xBA> ~~~~~~~","~~~~~~ <>((\xBA> ~~~~~~","~~~~~~~ ><((\xBA> ~~~~~","~~~~~~~~ <>((\xBA> ~~~~","~~~~~~~~~ ><((\xBA> ~~~","~~~~~~~~~~ <>((\xBA> ~~","~~~~~~~~~~~ ><((\xBA> ~","~~~~~~~~~~~~ <>((\xBA> ","~~~~~~~~~~~~~ ><((\xBA>","~~~~~~~~~~~~~~ <>((\xBA","~~~~~~~~~~~~~~~ ><((","~~~~~~~~~~~~~~~~ <>(","~~~~~~~~~~~~~~~~~ ><","~~~~~~~~~~~~~~~~~~ <","~~~~~~~~~~~~~~~~~~~~"]}};var ua=Ev,Z8=Object.keys(Ev);var pn={};Nt(pn,{error:()=>Dz,info:()=>wz,success:()=>kz,warning:()=>Oz});import Nz from"node:tty";var Pz=Nz?.WriteStream?.prototype?.hasColors?.()??!1,T=(e,t)=>{if(!Pz)return r=>r;let n=`\x1B[${e}m`,i=`\x1B[${t}m`;return r=>{let o=r+"",a=o.indexOf(i);if(a===-1)return n+o+i;let c=n,u=0,m=(t===22?i:"")+n;for(;a!==-1;)c+=o.slice(u,a)+m,u=a+i.length,a=o.indexOf(i,u);return c+=o.slice(u)+i,c}},q8=T(0,0),K8=T(1,22),Y8=T(2,22),X8=T(3,23),J8=T(4,24),Q8=T("4:2",24),eW=T("4:3",24),tW=T("4:4",24),rW=T("4:5",24),nW=T(53,55),iW=T(7,27),oW=T(8,28),aW=T(9,29),sW=T(30,39),o$=T(31,39),a$=T(32,39),s$=T(33,39),c$=T(34,39),cW=T(35,39),uW=T(36,39),lW=T(37,39),dW=T(90,39),mW=T(40,49),pW=T(41,49),fW=T(42,49),gW=T(43,49),hW=T(44,49),vW=T(45,49),bW=T(46,49),yW=T(47,49),SW=T(100,49),_W=T(91,39),EW=T(92,39),xW=T(93,39),AW=T(94,39),IW=T(95,39),$W=T(96,39),TW=T(97,39),RW=T(101,49),CW=T(102,49),NW=T(103,49),PW=T(104,49),wW=T(105,49),kW=T(106,49),OW=T(107,49),DW=T("58;5;0",59),MW=T("58;5;1",59),jW=T("58;5;2",59),zW=T("58;5;3",59),LW=T("58;5;4",59),UW=T("58;5;5",59),FW=T("58;5;6",59),BW=T("58;5;7",59),VW=T("58;5;8",59),GW=T("58;5;9",59),ZW=T("58;5;10",59),WW=T("58;5;11",59),HW=T("58;5;12",59),qW=T("58;5;13",59),KW=T("58;5;14",59),YW=T("58;5;15",59);import u$ from"node:process";function la(){let{env:e}=u$,{TERM:t,TERM_PROGRAM:n}=e;return u$.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||n==="Terminus-Sublime"||n==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Tu=la(),wz=c$(Tu?"\u2139":"i"),kz=a$(Tu?"\u2714":"\u221A"),Oz=s$(Tu?"\u26A0":"\u203C"),Dz=o$(Tu?"\u2716":"\xD7");function xv({onlyFirst:e=!1}={}){let r="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(r,e?void 0:"g")}var Mz=xv();function Av(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return!e.includes("\x1B")&&!e.includes("\x9B")?e:e.replace(Mz,"")}var l$=[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],d$=12288,m$=65510,p$=[12288,12288,65281,65376,65504,65510];var f$=4352,g$=262141,Iv=[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 Ru=(e,t)=>{let n=0,i=Math.floor(e.length/2)-1;for(;n<=i;){let r=Math.floor((n+i)/2),o=r*2;if(t<e[o])i=r-1;else if(t>e[o+1])n=r+1;else return!0}return!1};var h$=19968,[Lz,Uz]=Fz(Iv);function Fz(e){let t=e[0],n=e[1];for(let i=0;i<e.length;i+=2){let r=e[i],o=e[i+1];if(h$>=r&&h$<=o)return[r,o];o-r>n-t&&(t=r,n=o)}return[t,n]}var v$=e=>e<161||e>1114109?!1:Ru(l$,e),b$=e=>e<d$||e>m$?!1:Ru(p$,e);var y$=e=>e>=Lz&&e<=Uz?!0:e<f$||e>g$?!1:Ru(Iv,e);function Bz(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function da(e,{ambiguousAsWide:t=!1}={}){return Bz(e),b$(e)||y$(e)||t&&v$(e)?2:1}var Vz=new Intl.Segmenter,S$=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Format}|\\p{Nonspacing_Mark}|\\p{Enclosing_Mark}|\\p{Surrogate})+$","v"),Gz=new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Nonspacing_Mark}\\p{Enclosing_Mark}\\p{Surrogate}]+","v"),Zz=new RegExp("\\p{Spacing_Mark}","v"),Wz=new RegExp("^\\p{RGI_Emoji}$","v"),Hz=/^[\d#*]\u20E3$/,qz=new RegExp("\\p{Extended_Pictographic}","gu");function Kz(e){if(e.length>50)return!1;if(Hz.test(e))return!0;if(e.includes("\u200D")){let t=e.match(qz);return t!==null&&t.length>=2}return!1}function Yz(e){return e.replace(Gz,"")}function Xz(e){return S$.test(e)}function _$(e){return e>=4352&&e<=4447||e>=43360&&e<=43388}function E$(e){return e>=4448&&e<=4519||e>=55216&&e<=55238}function x$(e){return e>=4520&&e<=4607||e>=55243&&e<=55291}function Jz(e){return _$(e)||E$(e)||x$(e)}function Qz(e,t){let n=[];for(let r of e)S$.test(r)||n.push(r.codePointAt(0));if(n.length===0)return;let i=0;for(let r=0;r<n.length;r++){let o=n[r];if(!Jz(o)){if(i===0)return;for(let a=r;a<n.length;a++)i+=da(n[a],t);return i}if(_$(o)&&E$(n[r+1])){i+=2,r+=x$(n[r+2])?2:1;continue}i+=da(o,t)}return i}function eL(e,t){let n=0,i=!0;for(let r of e){if(i){i=!1;continue}(Zz.test(r)||r>="\uFF00"&&r<="\uFFEF")&&(n+=da(r.codePointAt(0),t))}return n}function $v(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:n=!0,countAnsiEscapeCodes:i=!1}=t,r=e;if(!i&&(r.includes("\x1B")||r.includes("\x9B"))&&(r=Av(r)),r.length===0)return 0;if(/^[\u0020-\u007E]*$/.test(r))return r.length;let o=0,a={ambiguousAsWide:!n};for(let{segment:c}of Vz.segment(r)){if(Xz(c))continue;if(Wz.test(c)||Kz(c)){o+=2;continue}let u=Yz(c),l=Qz(u,a);if(l!==void 0){o+=l;continue}let m=u.codePointAt(0);o+=da(m,a),o+=eL(u,a)}return o}function Tv({stream:e=process.stdout}={}){return!!(e&&e.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))}import Cu from"node:process";var tL=3,Rv=class{#o=0;#n;#r=!1;#e=!1;#i=t=>{if(!t?.length)return;(typeof t=="string"?t.codePointAt(0):t[0])===tL&&Cu.kill(Cu.pid,"SIGINT")};start(){this.#o++,this.#o===1&&this.#t()}stop(){this.#o!==0&&--this.#o===0&&this.#a()}#t(){let{stdin:t}=Cu;if(Cu.platform==="win32"||!t?.isTTY||typeof t.setRawMode!="function"){this.#n=void 0;return}this.#n=t,this.#r=t.isPaused(),this.#e=!!t.isRaw,t.setRawMode(!0),t.prependListener("data",this.#i),this.#r&&t.resume()}#a(){if(!this.#n)return;let t=this.#n;t.off("data",this.#i),t.isTTY&&t.setRawMode?.(this.#e),this.#r&&t.pause(),this.#n=void 0,this.#r=!1,this.#e=!1}},rL=new Rv,Cv=Object.freeze(rL);var iL=200,oL="\x1B[?2026h",aL="\x1B[?2026l",Nu=new Map,sL=new Set(["black","red","green","yellow","blue","magenta","cyan","white","gray"]),Nv=class{#o=0;#n=-1;#r=0;#e;#i;#t;#a;#c=new Map;#d=!1;#u;#s;#p=!1;#m;#l(t){this.#d=!0;try{return t()}finally{this.#d=!1}}#g(){this.isSpinning&&this.render()}#_(t,n){if(t==null)return"";if(typeof t=="string")return t;if(Buffer.isBuffer(t)||ArrayBuffer.isView(t)){let i=typeof n=="string"&&n&&n!=="buffer"?n:"utf8";return Buffer.from(t).toString(i)}return String(t)}#E(t){if(!t)return!1;let n=t.at(-1);return n===`
176
+ `||n==="\r"}#x(){this.#s||(this.#s=setTimeout(()=>{this.#s=void 0,this.isSpinning&&this.#g()},iL),typeof this.#s?.unref=="function"&&this.#s.unref())}#h(){this.#s&&(clearTimeout(this.#s),this.#s=void 0)}#v(t,n,i,r){let o=this.#y(i," "),c=typeof n=="string"?(t?" ":"")+n:"",u=this.#S(r," ");return o+t+c+u}constructor(t){if(typeof t=="string"&&(t={text:t}),this.#e={color:"cyan",stream:ma.stderr,discardStdin:!0,hideCursor:!0,...t},this.color=this.#e.color,this.#t=this.#e.stream,typeof this.#e.isEnabled!="boolean"&&(this.#e.isEnabled=Tv({stream:this.#t})),typeof this.#e.isSilent!="boolean"&&(this.#e.isSilent=!1),this.#e.interval!==void 0&&!(Number.isInteger(this.#e.interval)&&this.#e.interval>0))throw new Error("The `interval` option must be a positive integer");let n=this.#e.interval;this.spinner=this.#e.spinner,this.#e.interval=n,this.text=this.#e.text,this.prefixText=this.#e.prefixText,this.suffixText=this.#e.suffixText,this.indent=this.#e.indent,ma.env.NODE_ENV==="test"&&(this._stream=this.#t,this._isEnabled=this.#e.isEnabled,Object.defineProperty(this,"_linesToClear",{get(){return this.#o},set(i){this.#o=i}}),Object.defineProperty(this,"_frameIndex",{get(){return this.#n}}),Object.defineProperty(this,"_lineCount",{get(){let i=this.#t.columns??80,r=typeof this.#e.prefixText=="function"?"":this.#e.prefixText,o=typeof this.#e.suffixText=="function"?"":this.#e.suffixText,a=typeof r=="string"&&r!==""?r+" ":"",c=typeof o=="string"&&o!==""?" "+o:"",l=" ".repeat(this.#e.indent)+a+"-"+(typeof this.#e.text=="string"?" "+this.#e.text:"")+c;return this.#f(l,i)}}))}get indent(){return this.#e.indent}set indent(t=0){if(!(t>=0&&Number.isInteger(t)))throw new Error("The `indent` option must be an integer from 0 and up");this.#e.indent=t}get interval(){return this.#e.interval??this.#i.interval??100}get spinner(){return this.#i}set spinner(t){if(this.#n=-1,this.#e.interval=void 0,typeof t=="object"){if(!Array.isArray(t.frames)||t.frames.length===0||t.frames.some(n=>typeof n!="string"))throw new Error("The given spinner must have a non-empty `frames` array of strings");if(t.interval!==void 0&&!(Number.isInteger(t.interval)&&t.interval>0))throw new Error("`spinner.interval` must be a positive integer if provided");this.#i=t}else if(!la())this.#i=ua.line;else if(t===void 0)this.#i=ua.dots;else if(t!=="default"&&ua[t])this.#i=ua[t];else throw new Error(`There is no built-in spinner named '${t}'. See https://github.com/sindresorhus/cli-spinners/blob/main/spinners.json for a full list.`)}get text(){return this.#e.text}set text(t=""){this.#e.text=t}get prefixText(){return this.#e.prefixText}set prefixText(t=""){this.#e.prefixText=t}get suffixText(){return this.#e.suffixText}set suffixText(t=""){this.#e.suffixText=t}get isSpinning(){return this.#a!==void 0}#b(t,n,i=!1){let r=typeof t=="function"?t():t;return typeof r=="string"&&r!==""?i?n+r:r+n:""}#y(t=this.#e.prefixText,n=" "){return this.#b(t,n,!1)}#S(t=this.#e.suffixText,n=" "){return this.#b(t,n,!0)}#f(t,n){let i=0;for(let r of nL(t).split(`
177
+ `))i+=Math.max(1,Math.ceil($v(r)/n));return i}get color(){return this.#m}set color(t){if(t!==void 0&&t!==!1&&!sL.has(t))throw new Error("The `color` option must be a valid color or `false` to disable");this.#m=t}get isEnabled(){return this.#e.isEnabled&&!this.#e.isSilent}set isEnabled(t){if(typeof t!="boolean")throw new TypeError("The `isEnabled` option must be a boolean");this.#e.isEnabled=t}get isSilent(){return this.#e.isSilent}set isSilent(t){if(typeof t!="boolean")throw new TypeError("The `isSilent` option must be a boolean");this.#e.isSilent=t}frame(){let t=Date.now();(this.#n===-1||t-this.#r>=this.interval)&&(this.#n=(this.#n+1)%this.#i.frames.length,this.#r=t);let{frames:n}=this.#i,i=n[this.#n];this.#m&&(i=JI[this.#m](i));let r=this.#y(this.#e.prefixText," "),o=typeof this.text=="string"?" "+this.text:"",a=this.#S(this.#e.suffixText," ");return r+i+o+a}clear(){return!this.isEnabled||!this.#t.isTTY?this:(this.#l(()=>{this.#t.cursorTo(0);for(let t=0;t<this.#o;t++)t>0&&this.#t.moveCursor(0,-1),this.#t.clearLine(1);this.#e.indent&&this.#t.cursorTo(this.#e.indent)}),this.#o=0,this)}#A(t){if(!t||this.#c.has(t)||!t.isTTY||typeof t.write!="function")return;Nu.has(t)&&console.warn("[ora] Multiple concurrent spinners detected. This may cause visual corruption. Use one spinner at a time.");let n=t.write;this.#c.set(t,n),Nu.set(t,this),t.write=(i,r,o)=>this.#T(t,n,i,r,o)}#I(){if(!this.isEnabled||this.#c.size>0)return;let t=new Set([this.#t,ma.stdout,ma.stderr]);for(let n of t)this.#A(n)}#$(){for(let[t,n]of this.#c)t.write=n,Nu.get(t)===this&&Nu.delete(t);this.#c.clear()}#T(t,n,i,r,o){if(typeof r=="function"&&(o=r,r=void 0),this.#d)return n.call(t,i,r,o);this.clear();let a=this.#_(i,r),c=this.#E(a),u=n.call(t,i,r,o);return c?this.#h():a.length>0&&this.#x(),this.isSpinning&&!this.#s&&this.render(),u}render(){if(!this.isEnabled||this.#u||this.#s)return this;let t=this.#t.isTTY,n=!1;try{t&&(this.#l(()=>this.#t.write(oL)),n=!0),this.clear();let i=this.frame(),r=this.#t.columns??80,o=this.#f(i,r),a=this.#t.rows;if(a&&a>1&&o>a){let u=i.split(`
178
178
  `),l=a-1;i=[...u.slice(0,l),"... (content truncated to fit terminal)"].join(`
179
- `)}this.#l(()=>this.#t.write(i))===!1&&this.#t.isTTY&&(this.#u=()=>{this.#u=void 0,this.#g()},this.#t.once("drain",this.#u)),this.#o=this.#f(i,r)}finally{n&&this.#l(()=>this.#t.write(Mz))}return this}start(t){if(t!==void 0&&(this.text=t),this.isSilent)return this;if(!this.isEnabled){let n=this.text?"-":"",i=" ".repeat(this.#e.indent)+this.#v(n,this.text,this.#e.prefixText,this.#e.suffixText);return i.trim()!==""&&this.#l(()=>this.#t.write(i+`
180
- `)),this}return this.isSpinning?this:(this.#e.hideCursor&&pv.hide(this.#t),this.#e.discardStdin&&aa.stdin.isTTY&&(_v.start(),this.#p=!0),this.#I(),this.render(),this.#a=setInterval(this.render.bind(this),this.interval),this)}stop(){return clearInterval(this.#a),this.#a=void 0,this.#n=-1,this.#r=0,this.#h(),this.#$(),this.#u&&(this.#t.removeListener("drain",this.#u),this.#u=void 0),this.isEnabled&&(this.clear(),this.#e.hideCursor&&pv.show(this.#t)),this.#p&&(this.#p=!1,_v.stop()),this}succeed(t){return this.stopAndPersist({symbol:ln.success,text:t})}fail(t){return this.stopAndPersist({symbol:ln.error,text:t})}warn(t){return this.stopAndPersist({symbol:ln.warning,text:t})}info(t){return this.stopAndPersist({symbol:ln.info,text:t})}stopAndPersist(t={}){if(this.isSilent)return this;let n=t.symbol??" ",i=t.text??this.text,r=t.prefixText??this.#e.prefixText,o=t.suffixText??this.#e.suffixText,a=this.#v(n,i,r,o)+`
181
- `;return this.stop(),this.#l(()=>this.#t.write(a)),this}};function Iu(e){return new Ev(e)}var zz=Object.defineProperty,He=(e,t)=>zz(e,"name",{value:t,configurable:!0}),s$={interval:150,frames:["\u2726","\u2727","\u2736","\u2737","\u2738","\u2739","\u273A","\u273B"]},F=null,xv=class e{static{He(this,"LoggingControl")}static instance;_verbose=!0;constructor(){}static getInstance(){return e.instance||(e.instance=new e),e.instance}get verbose(){return this._verbose}set verbose(t){this._verbose=t}};function Lz(){return xv.getInstance()}He(Lz,"getLoggingControl");function $u(e,...t){be.shouldSuppressOutput||(F&&F.stop(),console.log(e,...t),F&&F.start())}He($u,"info");function Uz(e,...t){$u(e,...t)}He(Uz,"message");function Av(e,...t){be.shouldSuppressOutput||(F?(F.succeed(Le.hex("#A4C2A5")(`\u2705 ${e}`)),F=null):console.log(Le.hex("#A4C2A5")(`\u2705 ${e}`),...t))}He(Av,"success");function Iv(e,...t){be.shouldSuppressOutput||(F?(F.warn(`\u26A0\uFE0F ${e}`),F=null):console.log(Le.yellow(`\u26A0\uFE0F ${e}`),...t))}He(Iv,"warning");function Tu(e,...t){be.shouldSuppressOutput||(F?(F.fail(Le.red.bold(`\u274C Error: ${e}`)),F=null):console.error(Le.red.bold(`\u274C Error: ${e}`),...t))}He(Tu,"error");function Fz(e,t,n){if(Tu(t),be.shouldSuppressOutput||console.error(e),n?.tipMessage&&c$(n.tipMessage),n?.supportEmail&&!be.shouldSuppressOutput&&(console.log(Le.yellow(`
182
- Please contact ${Le.bold(n.supportEmail)} for assistance with this issue.`)),console.log(Le.yellow("Include the error details above in your support request."))),n?.learnMoreUrl&&!be.shouldSuppressOutput&&console.log(Le.blue(`
183
- \u{1F4D8} Learn more: ${n.learnMoreUrl}`)),n?.throwError!==!1)throw e;return e}He(Fz,"handleError");function c$(e,...t){be.shouldSuppressOutput||(F&&F.stop(),console.log(Le.blue(`\u{1F4A1} Tip: ${e}`),...t),F&&F.start())}He(c$,"tip");function Bz(e){be.shouldSuppressOutput||(F&&F.stop(),console.log(`
184
- ${Le.hex("#D9622E").bold(`--- ${e} ---`)}`),F&&F.start())}He(Bz,"step");function Cu(){return be.shouldSuppressOutput||be.isNonInteractive}He(Cu,"shouldSuppressSpinner");function $v(e){if(Cu())return null;if(F)return F.text=e,F;let t=Le.hex("#FF7BFF")(e);return F=Iu({text:t,spinner:s$,color:"magenta"}).start(),F}He($v,"startSpinner");function Tv(e){if(Cu())return null;if(F)F.text=Le.hex("#FF7BFF")(e);else{let t=Le.hex("#FF7BFF")(e);F=Iu({text:t,spinner:s$,color:"magenta"}).start()}return F}He(Tv,"updateSpinner");function Cv(){Cu()||F&&(F.stop(),F=null)}He(Cv,"stopSpinner");var Vz=Object.defineProperty,u$=(e,t)=>Vz(e,"name",{value:t,configurable:!0}),Rv=class{static{u$(this,"CLILogger")}info(t){$u(t)}error(t){Tu(t)}warning(t){Iv(t)}success(t){Av(t)}debug(t){Ru.debug("CLI",t)}startSpinner(t){return $v(t)}stopSpinner(){Cv()}updateSpinner(t){Tv(t)}},sa=class{static{u$(this,"CLIContext")}mode="cli";suppressOutput=!1;isNonInteractive;clearCacheOnAuthFailure=!1;logger;constructor(t={}){this.isNonInteractive=t.noPrompt??!1,this.logger=new Rv}};var Gz=Object.defineProperty,l$=(e,t)=>Gz(e,"name",{value:t,configurable:!0}),Pv=class{static{l$(this,"SilentLogger")}info(t){}error(t){}warning(t){}success(t){}debug(t){}startSpinner(t){return null}stopSpinner(){}updateSpinner(t){}},ca=class{static{l$(this,"InkContext")}mode="ink";suppressOutput=!0;isNonInteractive=!1;clearCacheOnAuthFailure=!0;logger;constructor(){this.logger=new Pv}};var Zz=Object.defineProperty,Wz=(e,t)=>Zz(e,"name",{value:t,configurable:!0}),be=class{static{Wz(this,"ContextManager")}static stack=[];static _isNonInteractive=!1;static get current(){return this.stack.length===0?new sa({noPrompt:!1}):this.stack[this.stack.length-1]}static get isNonInteractive(){return this._isNonInteractive}static enterNonInteractiveMode(){this._isNonInteractive=!0}static exitNonInteractiveMode(){this._isNonInteractive=!1}static getContext(){return this.stack.length>0?this.stack[this.stack.length-1]:void 0}static push(t){this.stack.push(t)}static pop(){this.stack.length>0&&this.stack.pop()}static enterUIMode(){this.push(new ca)}static exitUIMode(){this.pop()}static async withContext(t,n){this.push(t);try{return await n()}finally{this.pop()}}static get isUIMode(){return this.current.mode==="ink"}static get shouldSuppressOutput(){return this.current.suppressOutput}static reset(){this.stack=[]}};var Hz=Object.defineProperty,qz=(e,t)=>Hz(e,"name",{value:t,configurable:!0}),xi=class{static{qz(this,"CorrelatedLogger")}logger;correlationId;constructor(t,n){this.logger=t,this.correlationId=n}log(t,n,i,r){this.logger.logWithCorrelation(t,n,i,this.correlationId,r)}error(t,n,i){this.log("error",t,n,i)}warn(t,n,i){this.log("warn",t,n,i)}info(t,n,i){this.log("info",t,n,i)}debug(t,n,i){this.log("debug",t,n,i)}trace(t,n,i){this.log("trace",t,n,i)}};import{createWriteStream as tL,existsSync as h$,mkdirSync as v$}from"fs";import{existsSync as dn,renameSync as d$,unlinkSync as m$,statSync as Xz,mkdirSync as Jz}from"fs";import{dirname as p$,basename as f$,extname as g$,join as ua}from"path";var Kz=Object.defineProperty,Yz=(e,t)=>Kz(e,"name",{value:t,configurable:!0}),Ai=class{static{Yz(this,"FileRotator")}maxFiles;constructor(t){this.maxFiles=t.maxFiles}needsRotation(t,n){try{return dn(t)?Xz(t).size>n:!1}catch{return!1}}rotate(t){try{let n=p$(t);if(!dn(n)){Jz(n,{recursive:!0});return}if(!dn(t))return;let i=g$(t),r=f$(t,i),o=ua(n,`${r}.${this.maxFiles-1}${i}`);dn(o)&&m$(o);for(let c=this.maxFiles-2;c>=1;c--){let u=ua(n,`${r}.${c}${i}`),l=ua(n,`${r}.${c+1}${i}`);dn(u)&&d$(u,l)}let a=ua(n,`${r}.1${i}`);d$(t,a)}catch{}}rotateIfNeeded(t,n){return this.needsRotation(t,n)?(this.rotate(t),!0):!1}getRotatedFiles(t){let n=[],i=p$(t),r=g$(t),o=f$(t,r);dn(t)&&n.push(t);for(let a=1;a<this.maxFiles;a++){let c=ua(i,`${o}.${a}${r}`);if(dn(c))n.push(c);else break}return n}cleanAll(t){let n=this.getRotatedFiles(t);for(let i of n)try{m$(i)}catch{}}};var Qz=Object.defineProperty,eL=(e,t)=>Qz(e,"name",{value:t,configurable:!0}),Pu=class{static{eL(this,"LogFileWriter")}config;mainLogPath;debugLogPath;debugEnabled;mainLogStream=null;debugLogStream=null;buffer=[];debugBuffer=[];flushInterval=null;isClosing=!1;initialised=!1;exitHandlerRegistered=!1;fileRotator;constructor(t,n,i,r){this.config=t,this.mainLogPath=n,this.debugLogPath=i,this.debugEnabled=r,this.fileRotator=new Ai({maxFiles:t.maxFiles})}get isInitialised(){return this.initialised}openStream(t){let n=tL(t,{flags:"a"});return n.on("error",i=>{process.stderr.write(`[fjall] Log stream error: ${i.message}
185
- `)}),n}initialise(){if(!(this.initialised||this.isClosing))try{h$(this.config.logDir)||v$(this.config.logDir,{recursive:!0}),this.fileRotator.rotateIfNeeded(this.mainLogPath,this.config.maxFileSize),this.mainLogStream=this.openStream(this.mainLogPath),this.debugEnabled&&this.initialiseDebugStream(),this.flushInterval=setInterval(()=>this.flush(),this.config.flushIntervalMs),this.exitHandlerRegistered||(process.on("exit",()=>{this.flush()}),this.exitHandlerRegistered=!0),this.initialised=!0}catch(t){process.stderr.write(`[fjall] Logger init failed: ${t instanceof Error?t.message:String(t)}
186
- `)}}initialiseDebugStream(){if(!this.debugLogStream)try{h$(this.config.debugLogDir)||v$(this.config.debugLogDir,{recursive:!0}),this.fileRotator.rotateIfNeeded(this.debugLogPath,this.config.maxFileSize),this.debugLogStream=this.openStream(this.debugLogPath)}catch(t){process.stderr.write(`[fjall] Debug log init failed: ${t instanceof Error?t.message:String(t)}
179
+ `)}this.#l(()=>this.#t.write(i))===!1&&this.#t.isTTY&&(this.#u=()=>{this.#u=void 0,this.#g()},this.#t.once("drain",this.#u)),this.#o=this.#f(i,r)}finally{n&&this.#l(()=>this.#t.write(aL))}return this}start(t){if(t!==void 0&&(this.text=t),this.isSilent)return this;if(!this.isEnabled){let n=this.text?"-":"",i=" ".repeat(this.#e.indent)+this.#v(n,this.text,this.#e.prefixText,this.#e.suffixText);return i.trim()!==""&&this.#l(()=>this.#t.write(i+`
180
+ `)),this}return this.isSpinning?this:(this.#e.hideCursor&&_v.hide(this.#t),this.#e.discardStdin&&ma.stdin.isTTY&&(Cv.start(),this.#p=!0),this.#I(),this.render(),this.#a=setInterval(this.render.bind(this),this.interval),this)}stop(){return clearInterval(this.#a),this.#a=void 0,this.#n=-1,this.#r=0,this.#h(),this.#$(),this.#u&&(this.#t.removeListener("drain",this.#u),this.#u=void 0),this.isEnabled&&(this.clear(),this.#e.hideCursor&&_v.show(this.#t)),this.#p&&(this.#p=!1,Cv.stop()),this}succeed(t){return this.stopAndPersist({symbol:pn.success,text:t})}fail(t){return this.stopAndPersist({symbol:pn.error,text:t})}warn(t){return this.stopAndPersist({symbol:pn.warning,text:t})}info(t){return this.stopAndPersist({symbol:pn.info,text:t})}stopAndPersist(t={}){if(this.isSilent)return this;let n=t.symbol??" ",i=t.text??this.text,r=t.prefixText??this.#e.prefixText,o=t.suffixText??this.#e.suffixText,a=this.#v(n,i,r,o)+`
181
+ `;return this.stop(),this.#l(()=>this.#t.write(a)),this}};function Pu(e){return new Nv(e)}var cL=Object.defineProperty,He=(e,t)=>cL(e,"name",{value:t,configurable:!0}),A$={interval:150,frames:["\u2726","\u2727","\u2736","\u2737","\u2738","\u2739","\u273A","\u273B"]},F=null,Pv=class e{static{He(this,"LoggingControl")}static instance;_verbose=!0;constructor(){}static getInstance(){return e.instance||(e.instance=new e),e.instance}get verbose(){return this._verbose}set verbose(t){this._verbose=t}};function uL(){return Pv.getInstance()}He(uL,"getLoggingControl");function wu(e,...t){ye.shouldSuppressOutput||(F&&F.stop(),console.log(e,...t),F&&F.start())}He(wu,"info");function lL(e,...t){wu(e,...t)}He(lL,"message");function wv(e,...t){ye.shouldSuppressOutput||(F?(F.succeed(Ue.hex("#A4C2A5")(`\u2705 ${e}`)),F=null):console.log(Ue.hex("#A4C2A5")(`\u2705 ${e}`),...t))}He(wv,"success");function kv(e,...t){ye.shouldSuppressOutput||(F?(F.warn(`\u26A0\uFE0F ${e}`),F=null):console.log(Ue.yellow(`\u26A0\uFE0F ${e}`),...t))}He(kv,"warning");function ku(e,...t){ye.shouldSuppressOutput||(F?(F.fail(Ue.red.bold(`\u274C Error: ${e}`)),F=null):console.error(Ue.red.bold(`\u274C Error: ${e}`),...t))}He(ku,"error");function dL(e,t,n){if(ku(t),ye.shouldSuppressOutput||console.error(e),n?.tipMessage&&I$(n.tipMessage),n?.supportEmail&&!ye.shouldSuppressOutput&&(console.log(Ue.yellow(`
182
+ Please contact ${Ue.bold(n.supportEmail)} for assistance with this issue.`)),console.log(Ue.yellow("Include the error details above in your support request."))),n?.learnMoreUrl&&!ye.shouldSuppressOutput&&console.log(Ue.blue(`
183
+ \u{1F4D8} Learn more: ${n.learnMoreUrl}`)),n?.throwError!==!1)throw e;return e}He(dL,"handleError");function I$(e,...t){ye.shouldSuppressOutput||(F&&F.stop(),console.log(Ue.blue(`\u{1F4A1} Tip: ${e}`),...t),F&&F.start())}He(I$,"tip");function mL(e){ye.shouldSuppressOutput||(F&&F.stop(),console.log(`
184
+ ${Ue.hex("#D9622E").bold(`--- ${e} ---`)}`),F&&F.start())}He(mL,"step");function Ou(){return ye.shouldSuppressOutput||ye.isNonInteractive}He(Ou,"shouldSuppressSpinner");function Ov(e){if(Ou())return null;if(F)return F.text=e,F;let t=Ue.hex("#FF7BFF")(e);return F=Pu({text:t,spinner:A$,color:"magenta"}).start(),F}He(Ov,"startSpinner");function Dv(e){if(Ou())return null;if(F)F.text=Ue.hex("#FF7BFF")(e);else{let t=Ue.hex("#FF7BFF")(e);F=Pu({text:t,spinner:A$,color:"magenta"}).start()}return F}He(Dv,"updateSpinner");function Mv(){Ou()||F&&(F.stop(),F=null)}He(Mv,"stopSpinner");var pL=Object.defineProperty,$$=(e,t)=>pL(e,"name",{value:t,configurable:!0}),jv=class{static{$$(this,"CLILogger")}info(t){wu(t)}error(t){ku(t)}warning(t){kv(t)}success(t){wv(t)}debug(t){Du.debug("CLI",t)}startSpinner(t){return Ov(t)}stopSpinner(){Mv()}updateSpinner(t){Dv(t)}},pa=class{static{$$(this,"CLIContext")}mode="cli";suppressOutput=!1;isNonInteractive;clearCacheOnAuthFailure=!1;logger;constructor(t={}){this.isNonInteractive=t.noPrompt??!1,this.logger=new jv}};var fL=Object.defineProperty,T$=(e,t)=>fL(e,"name",{value:t,configurable:!0}),zv=class{static{T$(this,"SilentLogger")}info(t){}error(t){}warning(t){}success(t){}debug(t){}startSpinner(t){return null}stopSpinner(){}updateSpinner(t){}},fa=class{static{T$(this,"InkContext")}mode="ink";suppressOutput=!0;isNonInteractive=!1;clearCacheOnAuthFailure=!0;logger;constructor(){this.logger=new zv}};var gL=Object.defineProperty,hL=(e,t)=>gL(e,"name",{value:t,configurable:!0}),ye=class{static{hL(this,"ContextManager")}static stack=[];static _isNonInteractive=!1;static get current(){return this.stack.length===0?new pa({noPrompt:!1}):this.stack[this.stack.length-1]}static get isNonInteractive(){return this._isNonInteractive}static enterNonInteractiveMode(){this._isNonInteractive=!0}static exitNonInteractiveMode(){this._isNonInteractive=!1}static getContext(){return this.stack.length>0?this.stack[this.stack.length-1]:void 0}static push(t){this.stack.push(t)}static pop(){this.stack.length>0&&this.stack.pop()}static enterUIMode(){this.push(new fa)}static exitUIMode(){this.pop()}static async withContext(t,n){this.push(t);try{return await n()}finally{this.pop()}}static get isUIMode(){return this.current.mode==="ink"}static get shouldSuppressOutput(){return this.current.suppressOutput}static reset(){this.stack=[]}};var vL=Object.defineProperty,bL=(e,t)=>vL(e,"name",{value:t,configurable:!0}),Pi=class{static{bL(this,"CorrelatedLogger")}logger;correlationId;constructor(t,n){this.logger=t,this.correlationId=n}log(t,n,i,r){this.logger.logWithCorrelation(t,n,i,this.correlationId,r)}error(t,n,i){this.log("error",t,n,i)}warn(t,n,i){this.log("warn",t,n,i)}info(t,n,i){this.log("info",t,n,i)}debug(t,n,i){this.log("debug",t,n,i)}trace(t,n,i){this.log("trace",t,n,i)}};import{createWriteStream as IL,existsSync as k$,mkdirSync as O$}from"fs";import{existsSync as fn,renameSync as R$,unlinkSync as C$,statSync as _L,mkdirSync as EL}from"fs";import{dirname as N$,basename as P$,extname as w$,join as ga}from"path";var yL=Object.defineProperty,SL=(e,t)=>yL(e,"name",{value:t,configurable:!0}),wi=class{static{SL(this,"FileRotator")}maxFiles;constructor(t){this.maxFiles=t.maxFiles}needsRotation(t,n){try{return fn(t)?_L(t).size>n:!1}catch{return!1}}rotate(t){try{let n=N$(t);if(!fn(n)){EL(n,{recursive:!0});return}if(!fn(t))return;let i=w$(t),r=P$(t,i),o=ga(n,`${r}.${this.maxFiles-1}${i}`);fn(o)&&C$(o);for(let c=this.maxFiles-2;c>=1;c--){let u=ga(n,`${r}.${c}${i}`),l=ga(n,`${r}.${c+1}${i}`);fn(u)&&R$(u,l)}let a=ga(n,`${r}.1${i}`);R$(t,a)}catch{}}rotateIfNeeded(t,n){return this.needsRotation(t,n)?(this.rotate(t),!0):!1}getRotatedFiles(t){let n=[],i=N$(t),r=w$(t),o=P$(t,r);fn(t)&&n.push(t);for(let a=1;a<this.maxFiles;a++){let c=ga(i,`${o}.${a}${r}`);if(fn(c))n.push(c);else break}return n}cleanAll(t){let n=this.getRotatedFiles(t);for(let i of n)try{C$(i)}catch{}}};var xL=Object.defineProperty,AL=(e,t)=>xL(e,"name",{value:t,configurable:!0}),Mu=class{static{AL(this,"LogFileWriter")}config;mainLogPath;debugLogPath;debugEnabled;mainLogStream=null;debugLogStream=null;buffer=[];debugBuffer=[];flushInterval=null;isClosing=!1;initialised=!1;exitHandlerRegistered=!1;fileRotator;constructor(t,n,i,r){this.config=t,this.mainLogPath=n,this.debugLogPath=i,this.debugEnabled=r,this.fileRotator=new wi({maxFiles:t.maxFiles})}get isInitialised(){return this.initialised}openStream(t){let n=IL(t,{flags:"a"});return n.on("error",i=>{process.stderr.write(`[fjall] Log stream error: ${i.message}
185
+ `)}),n}initialise(){if(!(this.initialised||this.isClosing))try{k$(this.config.logDir)||O$(this.config.logDir,{recursive:!0}),this.fileRotator.rotateIfNeeded(this.mainLogPath,this.config.maxFileSize),this.mainLogStream=this.openStream(this.mainLogPath),this.debugEnabled&&this.initialiseDebugStream(),this.flushInterval=setInterval(()=>this.flush(),this.config.flushIntervalMs),this.exitHandlerRegistered||(process.on("exit",()=>{this.flush()}),this.exitHandlerRegistered=!0),this.initialised=!0}catch(t){process.stderr.write(`[fjall] Logger init failed: ${t instanceof Error?t.message:String(t)}
186
+ `)}}initialiseDebugStream(){if(!this.debugLogStream)try{k$(this.config.debugLogDir)||O$(this.config.debugLogDir,{recursive:!0}),this.fileRotator.rotateIfNeeded(this.debugLogPath,this.config.maxFileSize),this.debugLogStream=this.openStream(this.debugLogPath)}catch(t){process.stderr.write(`[fjall] Debug log init failed: ${t instanceof Error?t.message:String(t)}
187
187
  `)}}setDebugEnabled(t){this.debugEnabled=t}write(t,n){this.isClosing||(this.initialised||this.initialise(),this.buffer.push(t),this.debugEnabled&&n&&this.debugBuffer.push(t),this.buffer.length>=this.config.maxBufferSize&&this.flush())}flushBuffer(t,n,i){if(t.length===0||!n)return{buffer:t,stream:n};let r=n;this.fileRotator.needsRotation(i,this.config.maxFileSize)&&(r.end(),this.fileRotator.rotate(i),r=this.openStream(i));for(let o of t)r.write(JSON.stringify(o)+`
188
- `);return{buffer:[],stream:r}}flush(){let t=this.flushBuffer(this.buffer,this.mainLogStream,this.mainLogPath);this.buffer=t.buffer,this.mainLogStream=t.stream;let n=this.flushBuffer(this.debugBuffer,this.debugLogStream,this.debugLogPath);this.debugBuffer=n.buffer,this.debugLogStream=n.stream}close(){this.isClosing=!0,this.flush(),this.flushInterval&&(clearInterval(this.flushInterval),this.flushInterval=null),this.mainLogStream&&(this.mainLogStream.end(),this.mainLogStream=null),this.debugLogStream&&(this.debugLogStream.end(),this.debugLogStream=null),this.buffer=[],this.debugBuffer=[],this.initialised=!1,this.isClosing=!1}async closeAndFlush(){this.isClosing=!0,this.flush(),this.flushInterval&&(clearInterval(this.flushInterval),this.flushInterval=null);let t=[];this.mainLogStream&&(t.push(this.mainLogStream),this.mainLogStream=null),this.debugLogStream&&(t.push(this.debugLogStream),this.debugLogStream=null),this.buffer=[],this.debugBuffer=[],this.initialised=!1,await Promise.all(t.map(n=>new Promise(i=>{n.end(()=>i())}))),this.isClosing=!1}};import{createWriteStream as cL,existsSync as uL,mkdirSync as lL}from"fs";import{join as b$}from"path";var mn={trace:0,debug:1,info:2,warn:3,error:4},qe={MAX_FILE_SIZE:10*1024*1024,MAX_FILES:5,MAX_BUFFER_SIZE:100,FLUSH_INTERVAL_MS:500,LOG_FILENAME:"fjall.jsonl",DEBUG_LOG_FILENAME:"fjall-debug.jsonl"};import{join as iL}from"path";import{homedir as oL}from"os";var rL=Object.defineProperty,nL=(e,t)=>rL(e,"name",{value:t,configurable:!0});function wr(){let e=process.env.FJALL_LOG_DIR;return e!==void 0&&e!==""?e:iL(oL(),".fjall","logs")}nL(wr,"getDefaultLogDir");var aL=Object.defineProperty,sL=(e,t)=>aL(e,"name",{value:t,configurable:!0}),la=class{static{sL(this,"DeploymentLoggerImpl")}mainLogger;appName;operationType;logStream=null;logPath;deploymentId;buffer=[];flushInterval=null;isClosing=!1;maxBufferSize=qe.MAX_BUFFER_SIZE;constructor(t,n,i){this.mainLogger=t,this.appName=n,this.operationType=i,this.deploymentId=`${i}-${Date.now()}`;let r=wr(),o=b$(r,"deployments",n);uL(o)||lL(o,{recursive:!0});let a=new Date().toISOString().replace(/[:.]/g,"-"),c=`${i}-${a}.jsonl`;this.logPath=b$(o,c);try{this.logStream=cL(this.logPath,{flags:"a"}),this.flushInterval=setInterval(()=>this.flush(),qe.FLUSH_INTERVAL_MS),this.info("DeploymentLogger","Deployment logging initialised",{appName:n,operationType:i,deploymentId:this.deploymentId,logPath:this.logPath})}catch{}}log(t,n,i,r,o,a){if(this.isClosing)return;let c={timestamp:new Date().toISOString(),level:t,component:n,message:i,correlationId:this.deploymentId,...r&&Object.keys(r).length>0&&{data:r},...o&&{stackName:o},...a&&{phase:a}};this.buffer.push(c),this.mainLogger.logWithCorrelation(t,n,i,this.deploymentId,r,o,a),this.buffer.length>=this.maxBufferSize&&this.flush()}flush(){if(!(this.buffer.length===0||!this.logStream)){for(let t of this.buffer)this.logStream.write(JSON.stringify(t)+`
189
- `);this.buffer=[]}}info(t,n,i){this.log("info",t,n,i)}warn(t,n,i){this.log("warn",t,n,i)}error(t,n,i){this.log("error",t,n,i)}debug(t,n,i){this.log("debug",t,n,i)}stackEvent(t,n,i,r){this.log("info","StackDeployment",i,r,t,n)}dockerEvent(t,n){this.log("info","DockerOperation",t,{percentage:n})}ecsEvent(t,n,i){this.log("info","ECSDeployment",t,{percentage:n,taskCount:i})}close(){this.isClosing=!0,this.flush(),this.flushInterval&&(clearInterval(this.flushInterval),this.flushInterval=null),this.logStream&&(this.logStream.end(),this.logStream=null),this.buffer=[],this.isClosing=!1}getLogPath(){return this.logPath}getDeploymentId(){return this.deploymentId}};var dL=Object.defineProperty,mL=(e,t)=>dL(e,"name",{value:t,configurable:!0}),Nu=class e{static{mL(this,"Logger")}static instance=null;config;debugEnabled;traceEnabled;minLevel;fileWriter;mainLogPath;debugLogPath;constructor(){let t=wr(),n=Nv(t,"debug"),i=this.parseEnvInt("FJALL_LOG_MAX_SIZE",qe.MAX_FILE_SIZE),r=this.parseEnvInt("FJALL_LOG_MAX_FILES",qe.MAX_FILES);this.config={logDir:t,debugLogDir:n,maxFileSize:i,maxFiles:r,maxBufferSize:qe.MAX_BUFFER_SIZE,flushIntervalMs:qe.FLUSH_INTERVAL_MS},this.mainLogPath=Nv(t,qe.LOG_FILENAME),this.debugLogPath=Nv(n,qe.DEBUG_LOG_FILENAME),this.debugEnabled=process.env.FJALL_DEBUG==="true"||process.env.FJALL_TRACE==="true"||process.argv.includes("--verbose")||process.argv.includes("-v"),this.traceEnabled=process.env.FJALL_TRACE==="true";let o=process.env.FJALL_LOG_LEVEL?.toLowerCase();o&&o in mn?this.minLevel=o:this.traceEnabled?this.minLevel="trace":this.debugEnabled?this.minLevel="debug":this.minLevel="info",this.fileWriter=new Pu(this.config,this.mainLogPath,this.debugLogPath,this.debugEnabled)}parseEnvInt(t,n){let i=process.env[t];if(i){let r=parseInt(i,10);if(!isNaN(r)&&r>0)return r}return n}static getInstance(){return e.instance||(e.instance=new e),e.instance}shouldLog(t){return mn[t]>=mn[this.minLevel]}createEntry(t,n,i,r,o,a,c){return{timestamp:new Date().toISOString(),level:t,component:n,message:i,...o&&{correlationId:o},...r&&Object.keys(r).length>0&&{data:r},...a&&{stackName:a},...c&&{phase:c}}}log(t,n,i,r,o,a,c){if(!this.shouldLog(t))return;let u=this.createEntry(t,n,i,r,o,a,c),l=t==="debug"||t==="trace";this.fileWriter.write(u,l),this.writeConsole(u)}writeConsole(t){if(be.shouldSuppressOutput||be.isNonInteractive){this.debugEnabled&&this.writeDebugMirror(t);return}let n=this.getConsolePrefix(t.level),i=`[${t.component}]`,r=`${n} ${i} ${t.message}`;t.level==="error"?console.error(r):t.level==="warn"?console.warn(r):console.log(r)}writeDebugMirror(t){let n=this.getConsolePrefix(t.level),i=`[${t.component}]`,r="";if(t.data&&Object.keys(t.data).length>0)try{r=` ${JSON.stringify(t.data)}`}catch{r=" [unserialisable data]"}let o=`${n} ${i} ${t.message}${r}`;process.stderr.write(`${hi(o)}
190
- `)}getConsolePrefix(t){switch(t){case"error":return"[ERROR]";case"warn":return"[WARN]";case"info":return"[INFO]";case"debug":return"[DEBUG]";case"trace":return"[TRACE]"}}error(t,n,i){this.log("error",t,n,i)}warn(t,n,i){this.log("warn",t,n,i)}info(t,n,i){this.log("info",t,n,i)}debug(t,n,i){this.log("debug",t,n,i)}trace(t,n,i){this.log("trace",t,n,i)}isDebugEnabled(){return this.debugEnabled}isTraceEnabled(){return this.traceEnabled}enableDebug(){this.debugEnabled=!0,mn[this.minLevel]>mn.debug&&(this.minLevel="debug"),this.fileWriter.setDebugEnabled(!0),this.fileWriter.isInitialised&&this.fileWriter.initialiseDebugStream()}withCorrelation(t){return new xi(this,t)}forDeployment(t,n="deploy"){return new la(this,t,n)}close(){this.fileWriter.close()}async flushAndClose(){await this.fileWriter.closeAndFlush()}getLogPath(){return this.mainLogPath}getDebugLogPath(){return this.debugLogPath}getLogDir(){return this.config.logDir}logWithCorrelation(t,n,i,r,o,a,c){this.log(t,n,i,o,r,a,c)}static reset(){e.instance&&(e.instance.close(),e.instance=null)}};var pL=Object.defineProperty,fL=(e,t)=>pL(e,"name",{value:t,configurable:!0}),Ru=Nu.getInstance();function bL(e){let t=wr(),n=S$(t,"debug"),i=S$(n,qe.DEBUG_LOG_FILENAME);try{y$(n)||gL(n,{recursive:!0}),y$(i)&&hL(i).size>qe.MAX_FILE_SIZE&&new Ai({maxFiles:qe.MAX_FILES}).rotate(i);let r={timestamp:new Date().toISOString(),level:"debug",component:"Emergency",message:e};vL(i,JSON.stringify(r)+`
191
- `)}catch{}}fL(bL,"writeDebugSync");var yL=Object.defineProperty,Ii=(e,t)=>yL(e,"name",{value:t,configurable:!0});function wv(e){return e.success===!0}Ii(wv,"isSuccess");function kv(e){return e.success===!1}Ii(kv,"isFailure");function N(e){return{success:!0,data:e}}Ii(N,"success");function $(e){return{success:!1,error:e}}Ii($,"failure");async function Ov(e){try{let t=await e();return N(t)}catch(t){return $(At(t))}}Ii(Ov,"tryAsync");function Dv(e){try{let t=e();return N(t)}catch(t){return $(At(t))}}Ii(Dv,"trySync");var SL=Object.defineProperty,_L=(e,t)=>SL(e,"name",{value:t,configurable:!0}),_$=/^[a-zA-Z][a-zA-Z0-9-]*$/,EL=qo.source.replace(/^\^|\$$/g,""),L=Object.freeze({IDENTIFIER:_$,NEW_APP_NAME:/^[a-z][a-z0-9-]*$/,RESOURCE_NAME:/^[a-zA-Z][a-zA-Z0-9]*$/,ECS_SERVICE_NAME:_$,BUCKET_NAME:/^[a-z][a-z0-9-]*[a-z0-9]$|^[a-z][a-z0-9]*$/,DATABASE_NAME:/^[a-zA-Z][a-zA-Z0-9_]*$/,RESOURCE_TYPE:/^[a-z]+(:[a-z]+)?$/,SSM_PATH:new RegExp(`^(?:/${EL})+$`),SECRET_NAME:su,SSM_COMPONENT:qo,EMAIL:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,DOCKER_IMAGE:/^[a-z0-9][a-z0-9._-]*[a-z0-9](:[a-z0-9._-]+)?$/,DOMAIN:/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/i,HTTP_ORIGIN:/^https?:\/\/[a-z0-9.-]+(:\d+)?$/i,PASCAL_CASE:/^[A-Z][A-Za-z0-9]*$/,AWS_ACCOUNT_ID:/^\d{12}$/,VPC_ID:/^vpc-[a-z0-9]+$/,ROLE_ARN:/^arn:aws[a-zA-Z-]*:iam::\d{12}:role\/.+$/,CIDR:/^((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\/(3[0-2]|[12]?\d)$/,SCHEDULE_EXPRESSION:/^(rate\(1 (?:minute|hour|day)\)|rate\((?:[2-9]|[1-9]\d+) (?:minutes|hours|days)\)|cron\([^\s()]+ [^\s()]+ [^\s()]+ [^\s()]+ [^\s()]+ [^\s()]+\))$/,LAMBDA_RUNTIME_IDENTIFIER:/^[A-Za-z0-9._-]+$/,ENV_VAR_NAME:/^[A-Za-z_][A-Za-z0-9_]*$/});function Mv(e){let t=/^rate\((\d+) (minute|minutes|hour|hours|day|days)\)$/.exec(e);if(!t)return;let n=t[1],i=t[2];if(n===void 0||i===void 0)return;let r=parseInt(n,10);if(!Number.isFinite(r)||r<1)return;let o=i==="minute"||i==="hour"||i==="day";if(!(o&&r!==1)&&!(!o&&r===1))return i==="minute"||i==="minutes"?{everyMs:r*6e4}:i==="hour"||i==="hours"?{everyMs:r*60*6e4}:{everyMs:r*24*60*6e4}}_L(Mv,"parseRateExpression");var d=Object.freeze({IDENTIFIER:"Must start with a letter, contain only letters, numbers, and hyphens",NEW_APP_NAME:"Must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens",IDENTIFIER_MIN_LENGTH:"Must be at least 2 characters",IDENTIFIER_NO_TRAILING_HYPHEN:"Must not end with a hyphen",IDENTIFIER_NO_CONSECUTIVE_HYPHENS:"Must not contain consecutive hyphens",RESOURCE_NAME:"Must start with a letter and contain only letters and numbers (PascalCase recommended)",ECS_SERVICE_NAME:"Service name must start with a letter and contain only letters, numbers, and hyphens",BUCKET_NAME:"Bucket name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens",DATABASE_NAME:"Database name must start with a letter and contain only letters, numbers, and underscores",RESOURCE_TYPE:"Resource type must be in format 'category' or 'category:type'",SSM_PATH:"SSM path must start with / and contain valid namespace segments (e.g., /myapp/ApiCluster/service)",SECRET_NAME:wh,SSM_COMPONENT:cu,EMAIL:"Please enter a valid email address",DOMAIN:"Please enter a valid domain (e.g., cms.example.com)",DOCKER_IMAGE:"Invalid Docker image name format",REQUIRED:{APP_NAME:"Application name is required",RESOURCE_NAME:"Resource name is required",BUCKET_NAME:"Bucket name is required",SERVICE_NAME:"Service name is required",NETWORK_NAME:"Network name is required",DATABASE_NAME:"Database name is required",ORGANISATION_NAME:"Organisation name is required",EMAIL:"Email is required",NAME:"Name is required",USERNAME:"Username is required",CONTAINER_NAME:"Container name is required",GROUP:"Group is required",PATTERN_NAME:"Pattern name is required",SOURCE:"Source directory is required",BUILD_COMMAND:"Build command is required",OUTPUT_DIR:"Output directory is required",FORMS_TO:"Forms recipient address is required",ROUTING_PATH:"Routing path is required",RESOURCE_REFERENCE:"Resource reference is required",RESOURCE_TYPE:"Resource type is required",VARIANT:"Variant is required",SUBTYPE:"Subtype is required",DEPLOY_TARGET:"Deploy target is required",DESTROY_TARGET:"Destroy target is required"},MAX_LENGTH:{APP_NAME:"Application name must be 50 characters or less",RESOURCE_NAME:"Resource name must be 63 characters or less",BUCKET_NAME:"Bucket name must be 63 characters or less",SERVICE_NAME:"Service name must be 255 characters or less",NETWORK_NAME:"Network name must be 50 characters or less",DATABASE_NAME:"Database name must be 63 characters or less",ORGANISATION_NAME:"Organisation name must be 50 characters or less"},PORT:{INTEGER:"Port must be an integer",MIN:"Port must be at least 1",MAX:"Port cannot exceed 65535"},USERNAME:{MAX_LENGTH:"Username cannot exceed 63 characters"},LAMBDA:{MEMORY:{INTEGER:"Lambda memory must be an integer",MIN:"Memory must be at least 128 MB",MAX:"Memory cannot exceed 10240 MB",MULTIPLE:"Memory must be 128 MB or a multiple of 64 MB"},TIMEOUT:{INTEGER:"Timeout must be an integer",MIN:"Timeout must be at least 1 second",MAX:"Timeout cannot exceed 900 seconds"},RUNTIME:"Lambda runtime must contain only letters, digits, dots, underscores, or dashes (e.g. 'NODEJS_20_X' or 'nodejs20.x')"},ENV_VAR_NAME:"Environment variable names must start with a letter or underscore and contain only letters, digits, and underscores",PRIORITY:{INTEGER:"Priority must be an integer",MIN:"Priority must be at least 1",MAX:"Priority cannot exceed 50000"},CAPACITY:{MIN:{INTEGER:"Minimum capacity must be an integer",MIN_0:"Minimum capacity must be at least 0",MIN_1:"Minimum capacity must be at least 1",MAX:"Minimum capacity cannot exceed 100"},MAX:{INTEGER:"Maximum capacity must be an integer",MIN_0:"Maximum capacity must be at least 0",MIN_1:"Maximum capacity must be at least 1",MAX:"Maximum capacity cannot exceed 100"},DESIRED:{INTEGER:"Desired count must be an integer",MIN:"Desired count must be at least 0",MAX:"Desired count cannot exceed 100"},WARM_POOL_REQUIRED:"minCapacity 0 requires a warmPool \u2014 without it, new tasks wait 60-90s for a cold instance launch",WARM_POOL:{MIN_SIZE:{INTEGER:"Warm pool minSize must be an integer",MIN:"Warm pool minSize must be at least 0",MAX:"Warm pool minSize cannot exceed 100"},MIN_SIZE_EXCEEDS_MAX_CAPACITY:"warmPool.minSize cannot exceed maxCapacity \u2014 the warm pool cannot hold more instances than the ASG allows"}},MEMORY_LIMIT:{INTEGER:"Memory limit must be an integer",MIN_512:"Memory limit must be at least 512 MiB",MIN_128:"Memory limit must be at least 128 MiB",MAX:"Memory limit cannot exceed 30720 MiB"},DATABASE:{PORT:{INTEGER:"Database port must be an integer",MIN:"Database port must be at least 1024",MAX:"Database port cannot exceed 65535"},NAME:{REQUIRED:"Database name is required",MAX_LENGTH:"Database name must be 63 characters or less"}},BACKUP_RETENTION:{INTEGER:"Backup retention must be an integer",MIN:"Backup retention must be at least 1 day",MAX:"Backup retention cannot exceed 35 days"},SQS:{VISIBILITY_TIMEOUT:{INTEGER:"Visibility timeout must be an integer",MIN:"Visibility timeout must be at least 0 seconds",MAX:"Visibility timeout cannot exceed 43200 seconds (12 hours)"},RETENTION_PERIOD:{INTEGER:"Retention period must be an integer",MIN:"Retention period must be at least 60 seconds",MAX:"Retention period cannot exceed 1209600 seconds (14 days)"}},READER:{COUNT:{INTEGER:"Reader count must be an integer",MIN:"Reader count must be at least 0",MAX:"Reader count cannot exceed 15"}},IDENTIFIER_SUFFIX:{REQUIRED:"Identifier suffix is required when specified",MAX_LENGTH:"Identifier suffix cannot exceed 50 characters"},ROTATION:{INTEGER:"Rotation days must be an integer",MIN:"Rotation interval must be at least 1 day",MAX:"Rotation interval cannot exceed 365 days"},MAX_CONNECTIONS:{INTEGER:"Max connections must be an integer",MIN:"Max connections must be at least 1",MAX:"Max connections cannot exceed 100"},MONITORING_INTERVAL:{INTEGER:"Monitoring interval must be an integer",MIN:"Monitoring interval must be at least 0",MAX:"Monitoring interval cannot exceed 60 seconds",VALUES:"Monitoring interval must be 0, 1, 5, 10, 15, 30, or 60 seconds"},RETENTION_DAYS:{INTEGER:"Retention days must be an integer",MIN:"Retention days must be at least 1",MAX:"Retention days cannot exceed 365"},BATCH_SIZE:{INTEGER:"Batch size must be an integer",MIN:"Batch size must be at least 1",MAX:"Batch size cannot exceed 10000"},SERVICE:{UNIQUE_WITHIN_CLUSTER:"Service names must be unique within a cluster",MIN_REQUIRED:"At least one service is required",ROUTING_REQUIRED:"Multiple services with ports require routing config (path or host)"},PROXY_CONFIG:{MAX_IDLE_CONNECTIONS:{INTEGER:"Max idle connections must be an integer",MIN:"Max idle connections must be at least 0",MAX:"Max idle connections cannot exceed 100"},BORROW_TIMEOUT:{INTEGER:"Connection borrow timeout must be an integer",MIN:"Connection borrow timeout must be at least 1 second",MAX:"Connection borrow timeout cannot exceed 3600 seconds"}},MAX_AZS:{INTEGER:"Max AZs must be an integer",MIN:"Max AZs must be at least 1",MAX:"Max AZs cannot exceed 3"},BATCHING_WINDOW:{INTEGER:"Max batching window must be an integer",MIN:"Max batching window must be at least 0",MAX:"Max batching window cannot exceed 300 seconds"},HEALTH_CHECK:{INTERVAL:{INTEGER:"Health check interval must be an integer",MIN:"Health check interval must be at least 5 seconds",MAX:"Health check interval cannot exceed 300 seconds"},TIMEOUT:{INTEGER:"Health check timeout must be an integer",MIN:"Health check timeout must be at least 2 seconds",MAX:"Health check timeout cannot exceed 60 seconds"},RETRIES:{INTEGER:"Health check retries must be an integer",MIN:"Health check retries must be at least 1",MAX:"Health check retries cannot exceed 10"},START_PERIOD:{INTEGER:"Health check start period must be an integer",MIN:"Health check start period must be at least 0 seconds",MAX:"Health check start period cannot exceed 300 seconds"}},EPHEMERAL_STORAGE:{INTEGER:"Ephemeral storage size must be an integer",MIN:"Ephemeral storage size must be at least 512 MB",MAX:"Ephemeral storage size cannot exceed 10240 MB"},MAX_MESSAGE_SIZE:{INTEGER:"Max message size must be an integer",MIN:"Max message size must be at least 1024 bytes",MAX:"Max message size cannot exceed 262144 bytes (256 KB)"},CAPACITY_CONSTRAINT:{MIN_LTE_MAX:"minCapacity must be less than or equal to maxCapacity"},DIRECT_ACCESS:{NO_DOMAIN:"directAccess cannot be used with domain (no ALB for HTTPS)",NO_LOAD_BALANCER:"directAccess cannot be used with loadBalancer (mutually exclusive)"},GLOBAL_AURORA:{PRIMARY_REGION_REQUIRED:"primaryRegion is required for GlobalAurora databases"},NAT_GATEWAY:{INTEGER:"NAT gateway count must be an integer",MIN:"NAT gateway count must be at least 0",MAX:"NAT gateway count cannot exceed 3"},CIDR_MASK:{INTEGER:"CIDR mask must be an integer",MIN:"CIDR mask must be at least 16",MAX:"CIDR mask cannot exceed 28"},CPU:{INTEGER:"CPU must be an integer",MIN:"CPU must be at least 256 units",MAX:"CPU cannot exceed 4096 units"},KMS:{KEY_REQUIRED:"KMS key ARN is required when using KMS encryption"},READER_INSTANCES:{MAX:"Cannot have more than 15 reader instances",COUNT_OR_INSTANCES:"Cannot specify both 'count' and 'instances' - use one or the other"},GENERATOR_CAPACITY:{MIN:{MIN:"Minimum capacity must be at least 1",MAX:"Minimum capacity cannot exceed 1000"},MAX:{MIN:"Maximum capacity must be at least 1",MAX:"Maximum capacity cannot exceed 1000"}},INSTANCE_TYPE:"Unknown instance type. Common types include: t4g.micro, t4g.small, m5.large",ARCHITECTURE_MISMATCH:"Architecture mismatch between instance type and AMI",ALLOCATED_STORAGE:{INTEGER:"Allocated storage must be an integer",MIN:"Allocated storage must be at least 20 GB",MAX:"Allocated storage cannot exceed 65536 GB"},DLQ:{MAX_RECEIVE_COUNT:{INTEGER:"Max receive count must be an integer",MIN:"Max receive count must be at least 1",MAX:"Max receive count cannot exceed 1000"}},ALARM:{PERCENTAGE:{MIN:"Threshold must be at least 1%",MAX:"Threshold must be at most 100%"},FREE_STORAGE_GIB:{MIN:"Free storage threshold must be at least 1 GiB"}},REGION:"Invalid AWS region",PASCAL_CASE:"Resource name must start with an uppercase letter and contain only alphanumerics (PascalCase).",IMAGE_DOCKER_MUTEX:"image and docker are mutually exclusive",AWS_ACCOUNT_ID:"AWS account id must be exactly 12 digits (no hyphens)",VPC_ID:"VPC id must look like vpc-abc12345",ROLE_ARN:"Role ARN must have the form arn:aws:iam::<account-id>:role/<name>",CIDR:"CIDR must be in dotted-quad/prefix-length form (e.g. 10.0.0.0/16)",VPC_PEER:{MIN_REQUESTER_ACCOUNTS:"At least one requester account id is required",REGION_REQUIRED:"Peer region is required when specified",ROUTE_TABLE_ID_REQUIRED:"Route table id must not be empty"},SCHEDULE_EXPRESSION:"Schedule expression must be 'rate(N minute|minutes|hour|hours|day|days)' with N>=1, or 'cron(<6-field AWS expression>)'"});var xL=Object.defineProperty,dt=(e,t)=>xL(e,"name",{value:t,configurable:!0}),AL=["us-east-2","us-west-2","us-east-1","eu-west-1","eu-central-1","ap-southeast-1"],IL=Object.freeze(AL.flatMap(e=>{let t=pi(e);return t?[t]:[]})),jv=Object.freeze(["us-east-2","us-west-2","us-east-1","eu-west-1","ap-southeast-1"]);function wu(e){return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}dt(wu,"parseRegionList");function zv(e){return nr.includes(e)}dt(zv,"isValidRegion");function Lv(e){return/^[a-z]{2}-[a-z]+-[1-9]$/.test(e)}dt(Lv,"isValidRegionFormat");function Uv(e){if(!e)return jv.slice(0,3);let t=e.toLowerCase().split("-"),n=t[0],i=t.length>1?t[1]:"",r=[];return n&&i&&(r=nr.filter(o=>o.startsWith(`${n}-${i}`))),r.length===0&&n&&(r=nr.filter(o=>o.startsWith(`${n}-`))),r.length>0?r.slice(0,3):jv.slice(0,3)}dt(Uv,"getSuggestions");function Fv(e){if(zv(e))return!0;let t=Uv(e);return Lv(e)?`Unknown region. Try: ${t.join(", ")}`:`Invalid format. Try: ${t.join(", ")}`}dt(Fv,"validateRegion");function E$(e){if(!e||e.trim()==="")return!0;let t=wu(e);for(let n of t){let i=Fv(n);if(i!==!0)return i}return!0}dt(E$,"validateRegionList");function Bv(e,t){return e.filter(n=>n!==t)}dt(Bv,"filterDuplicateRegions");function Vv(e){return{label:e.city,value:e.code,description:e.optIn?`${e.code} \u2014 opt-in required`:e.code}}dt(Vv,"toRegionOption");function x$(){return ct.map(Vv)}dt(x$,"getRegionOptions");function A$(e){return ct.filter(t=>t.code!==e).map(Vv)}dt(A$,"getRegionOptionsExcluding");function I$(e){let t=ct.find(n=>n.code===e);return t?t.city:e}dt(I$,"getRegionName");function $$(e){return t=>{let n=wu(t);return Bv(n,e)}}dt($$,"createRegionFormatter");var ku="7.3.0";var Ou=["Aurora","Instance","GlobalAurora","ClickHouse"],$i=["FARGATE","FARGATE_SPOT","EC2"],$t=["standard","resilient","enterprise"],Du=["tinkerer","lightweight","standard","resilient","enterprise"],Gv="custom",da=[...Du,Gv];var $L=Object.defineProperty,TL=(e,t)=>$L(e,"name",{value:t,configurable:!0}),T$=Object.freeze({RESOURCE_SUFFIXES:Object.freeze({storage:"Storage",database:"Database",cluster:"Cluster",function:"Function",instance:"Instance",compute:"Compute"})}),ma=["ecs","lambda","ec2"],Ti=Object.freeze({ECS:"ecs",LAMBDA:"lambda",EC2:"ec2"}),Mu=["code","container"],pa=Object.freeze({CODE:"code",CONTAINER:"container"}),ju=["ARM_64","X86_64"],C$="ARM_64",fa=["NONE","AWS_IAM"],zu=["public","internal"],Lu=["CPU","MEMORY"],Uu=["ARM","STANDARD"],Zv=["Instance","Aurora"],Ci=["postgresql","mysql"],R$=["foundation","compliance","hardened"];var Fu=["t3.nano","t3.micro","t3.small","t3.medium","t3.large","t3.xlarge","t3.2xlarge","t3a.nano","t3a.micro","t3a.small","t3a.medium","t3a.large","t3a.xlarge","t3a.2xlarge","t4g.nano","t4g.micro","t4g.small","t4g.medium","t4g.large","t4g.xlarge","t4g.2xlarge","c5.large","c5.xlarge","c5.2xlarge","c5.4xlarge","c5.9xlarge","c5.12xlarge","c5.18xlarge","c5.24xlarge","c5a.large","c5a.xlarge","c5a.2xlarge","c5a.4xlarge","c5a.8xlarge","c5a.12xlarge","c5a.16xlarge","c5a.24xlarge","c6g.medium","c6g.large","c6g.xlarge","c6g.2xlarge","c6g.4xlarge","c6g.8xlarge","c6g.12xlarge","c6g.16xlarge","r5.large","r5.xlarge","r5.2xlarge","r5.4xlarge","r5.8xlarge","r5.12xlarge","r5.16xlarge","r5.24xlarge","r5a.large","r5a.xlarge","r5a.2xlarge","r5a.4xlarge","r5a.8xlarge","r5a.12xlarge","r5a.16xlarge","r5a.24xlarge","r6g.medium","r6g.large","r6g.xlarge","r6g.2xlarge","r6g.4xlarge","r6g.8xlarge","r6g.12xlarge","r6g.16xlarge","i3.large","i3.xlarge","i3.2xlarge","i3.4xlarge","i3.8xlarge","i3.16xlarge","p3.2xlarge","p3.8xlarge","p3.16xlarge","g4dn.xlarge","g4dn.2xlarge","g4dn.4xlarge","g4dn.8xlarge","g4dn.12xlarge","g4dn.16xlarge","m5.large","m5.xlarge","m5.2xlarge","m5.4xlarge","m5.8xlarge","m5.12xlarge","m5.16xlarge","m5.24xlarge","m5a.large","m5a.xlarge","m5a.2xlarge","m5a.4xlarge","m5a.8xlarge","m5a.12xlarge","m5a.16xlarge","m5a.24xlarge"],P$=[0,1,5,10,15,30,60];function mt(e,t){return e.includes(t)}TL(mt,"constIncludes");var N$=1,w$=65535,Rq=Object.freeze({postgresql:5432,mysql:3306}),k$=128,O$=10240,Bu=1,Vu=900,Wv=1,Hv=1e3,Ri=100,D$=100;var M$=3e3;var j$=["GET","POST","PUT","DELETE","HEAD","OPTIONS","PATCH"],z$=["standard","assets","upload","website"],Pi=["AES256","KMS"];var CL=Object.defineProperty,ga=(e,t)=>CL(e,"name",{value:t,configurable:!0}),Ke=ga(e=>s.union([s.literal(!1),e]),"optionalOrDisabled"),pn={check:ga(e=>e.minCapacity!==void 0&&e.maxCapacity!==void 0?e.minCapacity<=e.maxCapacity:!0,"check"),params:{message:d.CAPACITY_CONSTRAINT.MIN_LTE_MAX,path:["maxCapacity"]}},ha=ga(e=>s.number().int(d.MEMORY_LIMIT.INTEGER).min(e,e===128?d.MEMORY_LIMIT.MIN_128:d.MEMORY_LIMIT.MIN_512).max(30720,d.MEMORY_LIMIT.MAX),"memoryLimitMiBSchema"),V=s.string().min(1,d.REQUIRED.RESOURCE_NAME).max(63,d.MAX_LENGTH.RESOURCE_NAME).regex(L.RESOURCE_NAME,d.RESOURCE_NAME),U$=s.string().min(1,d.REQUIRED.BUCKET_NAME).max(63,d.MAX_LENGTH.BUCKET_NAME).regex(L.BUCKET_NAME,d.BUCKET_NAME),F$=s.string().min(1,d.REQUIRED.DATABASE_NAME).max(63,d.MAX_LENGTH.DATABASE_NAME).regex(L.DATABASE_NAME,d.DATABASE_NAME);function Gu(e,t=L.IDENTIFIER,n=d.IDENTIFIER){return s.string().min(2,d.IDENTIFIER_MIN_LENGTH).max(50,e).regex(t,n).refine(i=>!i.endsWith("-"),{message:d.IDENTIFIER_NO_TRAILING_HYPHEN}).refine(i=>!i.includes("--"),{message:d.IDENTIFIER_NO_CONSECUTIVE_HYPHENS})}ga(Gu,"identifierSchema");var ye=Gu(d.MAX_LENGTH.APP_NAME),Mq=Gu(d.MAX_LENGTH.APP_NAME,L.NEW_APP_NAME,d.NEW_APP_NAME),fn=s.number().int(d.PORT.INTEGER).min(N$,d.PORT.MIN).max(w$,d.PORT.MAX),Re=s.object({key:s.string(),sourceText:s.string()}).strict(),RL=s.object({__identifier:s.string()}).strict(),PL=s.object({__expression:s.string()}).strict(),NL=s.object({__call:s.string()}).strict(),wL=s.union([RL,PL,NL]),kL=s.union([s.string(),s.number(),s.boolean(),wL]),Ni=s.record(s.string().regex(L.ENV_VAR_NAME,d.ENV_VAR_NAME),kL),OL=s.object({id:s.string(),name:s.string().optional(),arn:s.string().optional(),field:s.string().optional()}).strict().refine(e=>e.name!==void 0!=(e.arn!==void 0),{message:"secretsImport requires exactly one of `name` or `arn`."}),B$=s.record(s.string(),OL),jq=s.record(s.string(),s.unknown()),qv=s.enum(da).describe(`Application type must be one of: ${da.join(", ")}`),Kv=s.enum(jt).describe(`OpenNext deployment pattern: ${jt.join(", ")}`),DL=s.enum(["before-imports","after-imports","after-app-init","after-tags","after-resource","end-of-file"]),ML=s.enum(["import","app-init","tags","database","compute","storage","network","messaging","cdn","pattern","vpc-peer","vpc-peer-accepter","cross-plan-connection","custom"]),V$=s.object({sourceText:s.string(),position:DL,afterManagedResource:s.object({type:ML,name:s.string().optional()}).strict().optional(),originalLine:s.number().int().optional(),leadingComments:s.array(s.string()).optional(),orphaned:s.boolean().optional(),orphanedComment:s.string().optional()}).strict(),G$=s.union([s.object({tier:s.enum($t)}).strict(),s.literal(!1)]),Z$=s.union([s.object({instanceType:s.string().optional()}).strict(),s.literal(!1)]),jL=Gu(d.MAX_LENGTH.ORGANISATION_NAME),zL=s.string().regex(L.EMAIL,d.EMAIL),L$=s.string().refine(e=>nr.includes(e),{message:d.REGION}),zq=s.object({name:jL,email:zL,accountName:s.string().optional(),primaryRegion:L$.optional().default(mi),secondaryRegions:s.array(L$).optional(),security:s.enum(R$).optional(),force:s.boolean().optional()}).strict();function va(e){return e.issues.map(t=>`${t.path.length>0?`${t.path.join(".")}: `:""}${t.message}`).join(`
192
- `)}ga(va,"getZodErrorMessage");var wi=s.number().min(1,d.ALARM.PERCENTAGE.MIN).max(100,d.ALARM.PERCENTAGE.MAX),LL=s.number().min(1,d.ALARM.FREE_STORAGE_GIB.MIN),W$=s.union([s.literal(!1),s.object({cpuThreshold:wi.optional(),memoryThreshold:wi.optional(),runningTasksMinimum:s.number().int().min(0).optional(),http5xxThreshold:wi.optional()}).strict()]),H$=s.union([s.literal(!1),s.object({cpuThreshold:wi.optional(),freeStorageThresholdGiB:LL.optional(),connectionsThreshold:s.number().int().min(1).optional()}).strict()]),q$=s.union([s.literal(!1),s.object({errorRateThreshold:wi.optional(),durationThresholdPercent:wi.optional()}).strict()]);var ir=s.number().int(d.BACKUP_RETENTION.INTEGER).min(1,d.BACKUP_RETENTION.MIN).max(35,d.BACKUP_RETENTION.MAX),ba=s.number().int(d.MONITORING_INTERVAL.INTEGER).refine(e=>mt(P$,e),{message:d.MONITORING_INTERVAL.VALUES}),Wu=s.number().int(d.DATABASE.PORT.INTEGER).min(1024,d.DATABASE.PORT.MIN).max(65535,d.DATABASE.PORT.MAX),UL=s.enum(Ou).describe(`Database type must be one of: ${Ou.join(", ")}`),FL=s.object({maxConnections:s.number().int(d.MAX_CONNECTIONS.INTEGER).min(1,d.MAX_CONNECTIONS.MIN).max(100,d.MAX_CONNECTIONS.MAX).optional(),maxIdleConnections:s.number().int(d.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.INTEGER).min(0,d.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MIN).max(100,d.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MAX).optional(),connectionBorrowTimeout:s.number().int(d.PROXY_CONFIG.BORROW_TIMEOUT.INTEGER).min(1,d.PROXY_CONFIG.BORROW_TIMEOUT.MIN).max(3600,d.PROXY_CONFIG.BORROW_TIMEOUT.MAX).optional(),requireTLS:s.boolean().optional()}).strict().describe("RDS Proxy configuration"),BL=s.object({instanceType:s.string().optional(),availabilityZone:s.string().optional()}).strict().describe("Read replica configuration"),VL=s.object({automaticallyAfterDays:s.number().int(d.ROTATION.INTEGER).min(1,d.ROTATION.MIN).max(365,d.ROTATION.MAX).optional()}).strict().describe("Secret rotation configuration"),Hu=s.object({username:s.string().min(1,d.REQUIRED.USERNAME).max(63,d.USERNAME.MAX_LENGTH).optional(),secretRotation:VL.optional()}).strict().describe("Database credentials configuration"),qu=Ke(FL),Ku=Ke(BL),GL=s.object({scaleWithWriter:s.boolean().optional(),enableDatabaseInsights:s.boolean().optional(),identifierSuffix:s.string().min(1,d.IDENTIFIER_SUFFIX.REQUIRED).max(50,d.IDENTIFIER_SUFFIX.MAX_LENGTH).optional(),availabilityZone:s.string().optional()}).strict().describe("Configuration for a single Aurora reader instance"),ya=s.object({enableDatabaseInsights:s.boolean().optional(),identifierSuffix:s.string().min(1,d.IDENTIFIER_SUFFIX.REQUIRED).max(50,d.IDENTIFIER_SUFFIX.MAX_LENGTH).optional(),availabilityZone:s.string().optional()}).strict().describe("Configuration for Aurora writer instance"),ZL=s.object({count:s.number().int(d.READER.COUNT.INTEGER).min(0,d.READER.COUNT.MIN).max(15,d.READER.COUNT.MAX).optional(),instances:s.array(GL).max(15,d.READER_INSTANCES.MAX).optional(),defaultEnableDatabaseInsights:s.boolean().optional()}).strict().refine(e=>!(e.count!==void 0&&e.instances!==void 0),{message:d.READER_INSTANCES.COUNT_OR_INSTANCES,path:["count"]}).describe("Aurora readers configuration"),Sa=Ke(ZL),WL=s.object({awsManaged:s.literal(!0)}).strict(),HL=s.object({useCMK:s.literal(!0)}).strict(),K$=s.union([WL,HL]),qL=s.object({mode:s.enum(["standard","advanced"]).optional(),encryptionKey:K$.optional()}).strict().describe("Database Insights configuration"),Yu=Ke(qL),Xu=s.object({storageKey:K$.optional()}).strict().describe("Encryption configuration (DESTRUCTIVE to change storageKey)"),Y$=s.object({name:V,type:UL,databaseName:s.string().min(1,d.REQUIRED.DATABASE_NAME),instanceType:s.string().optional(),allocatedStorage:s.number().optional(),multiAz:s.boolean().optional(),publiclyAccessible:s.boolean().optional(),databaseInsights:Yu.optional(),port:Wu.optional(),deletionProtection:s.boolean().optional(),proxy:qu.optional(),credentials:Hu.optional(),readReplica:Ku.optional(),encryption:Xu.optional(),writer:ya.optional(),readers:Sa.optional(),backupRetention:ir.optional(),preferredMaintenanceWindow:s.string().optional(),monitoringInterval:ba.optional(),primaryRegion:s.string().optional(),secondaryRegions:s.array(s.string()).optional(),globalClusterIdentifier:s.string().optional(),enableGlobalWriteForwarding:s.boolean().optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional(),databaseEngine:s.enum(Ci).optional(),engineExpression:s.string().optional(),variableName:s.string().optional(),extraProperties:s.array(Re).optional(),alarms:H$.optional()}).strict(),Ju=s.object({appName:ye,nameProvidedByFlag:s.boolean().optional(),databaseName:s.string().min(1,d.REQUIRED.DATABASE_NAME).max(63,d.MAX_LENGTH.DATABASE_NAME).regex(L.DATABASE_NAME,d.DATABASE_NAME),resourceName:V.optional(),connectionConfig:s.object({connectToCompute:s.array(s.string()).optional(),connectToServices:s.array(s.string()).optional()}).strict().optional(),databaseInsights:Yu.optional(),port:Wu.optional(),proxy:qu.optional(),credentials:Hu.optional(),encryption:Xu.optional(),deletionProtection:s.boolean().optional()}).strict(),X$={databaseType:s.literal("Instance"),instanceType:s.string().optional(),multiAz:s.boolean().optional(),readReplica:Ku.optional(),publiclyAccessible:s.boolean().optional(),backupRetention:ir.optional(),allocatedStorage:s.number().optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()},J$={databaseType:s.literal("Aurora"),writer:ya.optional(),readers:Sa.optional(),backupRetention:ir.optional(),preferredMaintenanceWindow:s.string().optional(),monitoringInterval:ba.optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()},Q$={databaseType:s.literal("GlobalAurora"),primaryRegion:s.string().min(1,d.GLOBAL_AURORA.PRIMARY_REGION_REQUIRED),secondaryRegions:s.array(s.string()).optional(),globalClusterIdentifier:s.string().optional(),enableGlobalWriteForwarding:s.boolean().optional(),writer:ya.optional(),readers:Sa.optional(),backupRetention:ir.optional(),preferredMaintenanceWindow:s.string().optional(),monitoringInterval:ba.optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()},eT=s.object({appName:ye,nameProvidedByFlag:s.boolean().optional(),databaseName:s.string().min(1,d.REQUIRED.DATABASE_NAME).max(63,d.MAX_LENGTH.DATABASE_NAME).regex(L.DATABASE_NAME,d.DATABASE_NAME),resourceName:V.optional(),connectionConfig:s.object({connectToCompute:s.array(s.string()).optional(),connectToServices:s.array(s.string()).optional()}).strict().optional()}).strict(),tT={databaseType:s.literal("ClickHouse"),instanceType:s.string().optional(),coldTier:s.union([s.object({mode:s.literal("s3")}).strict(),s.literal(!1)]).optional(),optimiseSchedule:s.union([s.string(),s.literal(!1)]).optional(),backupSchedule:s.union([s.string(),s.literal(!1)]).optional(),backupRetentionDays:ir.optional()},KL=Ju.extend(X$).strict(),YL=Ju.extend(J$).strict(),XL=Ju.extend(Q$).strict(),JL=eT.extend(tT).strict(),qq=s.discriminatedUnion("databaseType",[KL,YL,XL,JL]),Yv=Ju.extend({resourceName:V}).strict(),QL=Yv.extend(X$).strict(),eU=Yv.extend(J$).strict(),tU=Yv.extend(Q$).strict(),rU=eT.extend({resourceName:V}).strict(),nU=rU.extend(tT).strict(),Kq=s.discriminatedUnion("databaseType",[QL,eU,tU,nU]),Yq=s.object({appName:ye,databaseName:s.string().min(1,d.REQUIRED.DATABASE_NAME),maxConnections:s.number().int(d.MAX_CONNECTIONS.INTEGER).min(1,d.MAX_CONNECTIONS.MIN).max(100,d.MAX_CONNECTIONS.MAX).optional(),maxIdleConnections:s.number().int(d.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.INTEGER).min(0,d.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MIN).max(100,d.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MAX).optional(),connectionBorrowTimeout:s.number().int(d.PROXY_CONFIG.BORROW_TIMEOUT.INTEGER).min(1,d.PROXY_CONFIG.BORROW_TIMEOUT.MIN).max(3600,d.PROXY_CONFIG.BORROW_TIMEOUT.MAX).optional(),requireTLS:s.boolean().optional(),nameProvidedByFlag:s.boolean().optional()}).strict(),iU=["S","N","B"],Zu=s.object({name:s.string(),type:s.enum(iU)}).strict(),rT=s.object({name:V,partitionKey:Zu,sortKey:Zu.optional(),globalSecondaryIndexes:s.array(s.object({indexName:s.string(),partitionKey:Zu,sortKey:Zu.optional()}).strict()).optional(),ttlAttribute:s.string().optional(),stream:s.boolean().optional(),variableName:s.string().optional(),extraProperties:s.array(Re).optional()}).strict(),oU=s.object({mode:s.literal("s3")}).strict(),nT=s.object({name:V,type:s.literal("ClickHouse"),databaseName:F$,instanceType:s.string().optional(),coldTier:s.union([oU,s.literal(!1)]).optional(),optimiseSchedule:s.union([s.string(),s.literal(!1)]).optional(),backupSchedule:s.union([s.string(),s.literal(!1)]).optional(),backupRetentionDays:ir.optional(),variableName:s.string().optional(),extraProperties:s.array(Re).optional()}).strict();var aU=s.object({count:s.number().int(d.NAT_GATEWAY.INTEGER).min(0,d.NAT_GATEWAY.MIN).max(3,d.NAT_GATEWAY.MAX).optional()}).strict().describe("NAT gateway configuration"),iT=Ke(aU),Xv=s.enum(["cloudwatch","s3"]),sU=s.object({destination:Xv.optional(),retentionDays:s.number().int(d.RETENTION_DAYS.INTEGER).min(1,d.RETENTION_DAYS.MIN).max(365,d.RETENTION_DAYS.MAX).optional(),trafficType:s.enum(["ALL","ACCEPT","REJECT"]).optional()}).strict().describe("VPC flow log configuration"),oT=Ke(sU),cU=s.object({s3:s.boolean().optional(),dynamodb:s.boolean().optional()}).strict().describe("Gateway VPC endpoints (FREE)"),uU=Ke(cU),lU=s.object({ecr:s.boolean().optional(),secretsManager:s.boolean().optional(),kms:s.boolean().optional(),cloudwatchLogs:s.boolean().optional(),ssm:s.boolean().optional(),sts:s.boolean().optional()}).strict().describe("Interface VPC endpoints (cost per hour)"),dU=Ke(lU),mU=s.object({gateway:uU.optional(),interface:dU.optional()}).strict().describe("VPC endpoints configuration"),aT=Ke(mU),Qu=s.object({maxAzs:s.number().int(d.MAX_AZS.INTEGER).min(1,d.MAX_AZS.MIN).max(3,d.MAX_AZS.MAX).optional(),natGateways:iT.optional(),flowLogs:oT.optional(),vpcEndpoints:aT.optional(),cidrMask:s.number().int(d.CIDR_MASK.INTEGER).min(16,d.CIDR_MASK.MIN).max(28,d.CIDR_MASK.MAX).optional()}).strict(),sT=s.string().min(1,d.REQUIRED.NETWORK_NAME).max(50,d.MAX_LENGTH.NETWORK_NAME).regex(L.RESOURCE_NAME,d.RESOURCE_NAME),cT=Qu.extend({name:sT}).strict(),uT=Ke(Qu),t7=s.object({appName:ye,networkName:sT.optional(),maxAzs:s.number().int(d.MAX_AZS.INTEGER).min(1,d.MAX_AZS.MIN).max(3,d.MAX_AZS.MAX).optional(),natGateways:iT.optional(),flowLogs:oT.optional(),vpcEndpoints:aT.optional()}).strict(),pU=L.CIDR,Jv=s.string().regex(pU,d.CIDR),fU=s.object({kind:s.literal("database"),resource:s.string().min(1,d.REQUIRED.RESOURCE_REFERENCE),name:V,allowedFromCidrs:s.array(Jv),access:s.enum(["read","write","readWrite"]).optional()}).strict(),gU=s.object({kind:s.literal("ecsService"),resource:s.string().min(1,d.REQUIRED.RESOURCE_REFERENCE),serviceName:s.string().min(1,d.REQUIRED.SERVICE_NAME),name:V,allowedFromCidrs:s.array(Jv),port:fn.optional()}).strict(),hU=s.discriminatedUnion("kind",[fU,gU]),r7=s.object({name:V,peerAppName:s.string().min(1,d.REQUIRED.APP_NAME),peerAccountId:s.string().regex(L.AWS_ACCOUNT_ID,d.AWS_ACCOUNT_ID),peerRegion:s.string().min(1,d.VPC_PEER.REGION_REQUIRED).optional(),peerVpcId:s.string().regex(L.VPC_ID,d.VPC_ID).optional(),peerVpcCidr:Jv.optional(),peerRoleArn:s.string().regex(L.ROLE_ARN,d.ROLE_ARN).optional(),peerRouteTableIds:s.array(s.string().min(1,d.VPC_PEER.ROUTE_TABLE_ID_REQUIRED)).optional(),localVpcName:s.string().min(1,d.REQUIRED.NETWORK_NAME).optional(),enableDnsResolution:s.boolean().optional()}).strict(),n7=s.object({name:V,requesterAccountIds:s.array(s.string().regex(L.AWS_ACCOUNT_ID,d.AWS_ACCOUNT_ID)).min(1,d.VPC_PEER.MIN_REQUESTER_ACCOUNTS),localVpcName:s.string().min(1,d.REQUIRED.NETWORK_NAME).optional(),publishToSsm:s.boolean().optional(),exposedResources:s.array(hU).optional()}).strict();var el=["storage","cdn","compute"],vU=s.object({sid:s.string().optional(),effect:s.enum(["Allow","Deny"]),principals:s.array(s.string()),actions:s.array(s.string()),resources:s.array(s.string()).optional(),conditions:s.record(s.string(),s.record(s.string(),s.union([s.string(),s.array(s.string())]))).optional()}).strict(),lT=s.object({name:V,bucketName:s.string().optional(),publicReadAccess:s.boolean().optional(),websiteHosting:s.object({indexDocument:s.string(),errorDocument:s.string().optional()}).strict().optional(),backupVaultTier:s.enum($t).optional(),versioned:s.boolean().optional(),encryption:s.enum(Pi).optional(),kmsKeyArn:s.string().optional(),cors:s.array(s.object({allowedOrigins:s.array(s.string()),allowedMethods:s.array(s.string()),allowedHeaders:s.array(s.string()).optional(),exposedHeaders:s.array(s.string()).optional(),maxAge:s.number().optional()}).strict()).optional(),deployment:s.object({source:s.string(),prune:s.boolean().optional(),cacheControl:s.object({maxAge:s.number().optional(),immutable:s.boolean().optional()}).strict().optional()}).strict().optional(),retain:s.boolean().optional(),resourcePolicyStatements:s.array(vU).optional(),stackPlacement:s.enum(el).optional(),variableName:s.string().optional(),extraProperties:s.array(Re).optional()}).strict().refine(e=>e.encryption!=="KMS"||!!e.kmsKeyArn,{message:d.KMS.KEY_REQUIRED}),u7=s.object({appName:ye,bucketName:U$,nameProvidedByFlag:s.boolean().optional(),storagePreset:s.enum(z$).optional(),publicReadAccess:s.boolean().optional(),websiteHosting:s.object({indexDocument:s.string(),errorDocument:s.string().optional()}).strict().optional(),backupVaultTier:s.enum($t).optional(),versioned:s.boolean().optional(),encryption:s.enum(Pi).optional(),kmsKeyArn:s.string().optional(),cors:s.array(s.object({allowedOrigins:s.array(s.string()),allowedMethods:s.array(s.string()),allowedHeaders:s.array(s.string()).optional(),exposedHeaders:s.array(s.string()).optional(),maxAge:s.number().optional()}).strict()).optional(),connectionConfig:s.object({connectToCompute:s.array(s.string()).optional(),connectToServices:s.array(s.string()).optional()}).strict().optional()}).strict().refine(e=>e.encryption!=="KMS"||!!e.kmsKeyArn,{message:d.KMS.KEY_REQUIRED,path:["kmsKeyArn"]});var Qv=s.enum(["DESTROY","RETAIN"]),dT=s.object({name:V,queueType:s.enum(["standard","fifo"]).default("standard"),visibilityTimeout:s.number().int(d.SQS.VISIBILITY_TIMEOUT.INTEGER).min(0,d.SQS.VISIBILITY_TIMEOUT.MIN).max(43200,d.SQS.VISIBILITY_TIMEOUT.MAX).optional(),retentionPeriod:s.number().int(d.SQS.RETENTION_PERIOD.INTEGER).min(60,d.SQS.RETENTION_PERIOD.MIN).max(1209600,d.SQS.RETENTION_PERIOD.MAX).optional(),contentBasedDeduplication:s.boolean().optional(),removalPolicy:Qv.optional(),variableName:s.string().optional(),extraProperties:s.array(Re).optional()}).strict();var mT=s.object({type:s.literal("basic-auth"),username:s.string().min(1),password:s.string().min(1)}).strict(),pT=s.object({name:V,defaultOriginRef:s.string(),behaviours:s.array(s.object({pathPattern:s.string(),originRef:s.string(),cachePolicy:s.enum(["CACHING_OPTIMIZED","CACHING_DISABLED"]).optional()}).strict()).optional(),customDomain:s.string().optional(),certificateArn:s.string().optional(),accessGate:s.union([s.literal(!1),mT]).optional(),extraProperties:s.array(Re).optional()}).strict(),v7=s.object({appName:s.string(),name:V.optional(),defaultOriginRef:s.string(),behaviours:s.array(s.object({pathPattern:s.string(),originRef:s.string(),cachePolicy:s.enum(["CACHING_OPTIMIZED","CACHING_DISABLED"]).optional()}).strict()).optional(),customDomain:s.string().optional(),certificateArn:s.string().optional(),accessGate:s.union([s.literal(!1),mT]).optional(),nameProvidedByFlag:s.boolean().optional()}).strict();var bU=Object.defineProperty,eb=(e,t)=>bU(e,"name",{value:t,configurable:!0}),yU=new Set(["t4g","c6g","c6gd","c6gn","c7g","c7gd","c7gn","r6g","r6gd","r7g","r7gd","r8g","r8gd","c8g","c8gd","c8gn","m6g","m6gd","m7g","m7gd","m8g","m8gd","x8g","i8g","a1","x2gd","im4gn","is4gen","i4g","hpc7g"]);function ki(e){let t=e.split(".")[0]??"";return yU.has(t)?"ARM":"STANDARD"}eb(ki,"getArchitectureForInstanceType");function tl(e,t){let n=ki(e);return n!==t?{valid:!1,message:`Instance type '${e}' requires ${n} architecture, but '${t}' AMI was specified. Use a ${n==="ARM"?"Graviton instance (t4g, c6g, r6g, m6g, etc.)":"Intel/AMD instance (t3, c5, r5, m5, etc.)"} instead.`}:{valid:!0}}eb(tl,"validateArchitectureMatch");function fT(e,t){return ki(e)===t}eb(fT,"isArchitectureCompatible");var SU=Object.defineProperty,rl=(e,t)=>SU(e,"name",{value:t,configurable:!0});var _U=1;var EU=/^[A-Za-z0-9_.-]+$/,xU=s.object({id:s.string().min(1,"buildSecret id cannot be empty").regex(EU,"buildSecret id may contain only letters, digits, '_', '.', and '-' (no comma, '=', or whitespace, which would break the buildx --secret argv)"),ssm:s.string().min(1,"ssm parameter name cannot be empty").optional(),secretsManager:s.object({name:s.string().min(1,"secret name cannot be empty").optional(),arn:s.string().min(1,"secret arn cannot be empty").optional(),field:s.string().min(1,"secret field cannot be empty").optional()}).strict().refine(e=>e.name===void 0!=(e.arn===void 0),"secretsManager requires exactly one of name or arn").optional(),env:s.string().min(1,"env variable name cannot be empty").optional()}).strict().superRefine((e,t)=>{[e.ssm,e.secretsManager,e.env].filter(n=>n!==void 0).length!==1&&t.addIssue({code:s.ZodIssueCode.custom,message:"buildSecret requires exactly one source (ssm, secretsManager, or env)"})}),AU=s.union([s.string(),s.object({ssm:s.string().min(1,"ssm parameter name cannot be empty").optional(),secretsManager:s.object({name:s.string().min(1,"secret name cannot be empty").optional(),arn:s.string().min(1,"secret arn cannot be empty").optional(),field:s.string().min(1,"secret field cannot be empty").optional()}).strict().refine(e=>e.name===void 0!=(e.arn===void 0),"secretsManager requires exactly one of name or arn").optional(),env:s.string().min(1,"env variable name cannot be empty").optional(),acknowledgePublic:s.boolean().optional()}).strict().superRefine((e,t)=>{[e.ssm,e.secretsManager,e.env].filter(n=>n!==void 0).length!==1&&t.addIssue({code:s.ZodIssueCode.custom,message:"buildArg value requires exactly one source (ssm, secretsManager, or env)"})})]),Lt=s.object({path:s.string(),context:s.string().min(1,"context cannot be empty").optional(),target:s.string().min(1,"target cannot be empty").optional(),buildArgs:s.record(s.string(),AU).optional(),buildSecrets:s.array(xU).optional()}).strict(),E7=Lt.partial();function IU(e,t){if(t===void 0)return e;let n=t.context??e.context,i=t.target??e.target,r=t.buildArgs??e.buildArgs,o=t.buildSecrets??e.buildSecrets;return{path:t.path??e.path,...n!==void 0&&{context:n},...i!==void 0&&{target:i},...r!==void 0&&{buildArgs:r},...o!==void 0&&{buildSecrets:o}}}rl(IU,"mergeDockerBuild");function tb(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}rl(tb,"isRecord");function gT(e){if(!tb(e)||typeof e.path!="string"||e.path.length===0)return;let t=typeof e.context=="string"&&e.context.length>0?e.context:void 0,n=typeof e.target=="string"&&e.target.length>0?e.target:void 0,i=tb(e.buildArgs)&&Object.keys(e.buildArgs).length>0?e.buildArgs:void 0,r=Array.isArray(e.buildSecrets)&&e.buildSecrets.length>0?e.buildSecrets:void 0,o={path:e.path,...t!==void 0&&{context:t},...n!==void 0&&{target:n},...i!==void 0&&{buildArgs:i},...r!==void 0&&{buildSecrets:r}},a=Lt.safeParse(o);return a.success?a.data:void 0}rl(gT,"normaliseDockerBuild");function $U(e){if(e===void 0)return;let t=gT(e);return t===void 0?void 0:JSON.stringify(t)}rl($U,"dockerBuildFingerprint");var TU=s.object({name:s.string(),clusterName:s.string().optional(),docker:Lt.optional(),containerPort:s.number().optional(),secrets:s.array(s.string()).optional(),ssmSecretsPath:s.string().optional(),importedSecretNames:s.array(s.string()).optional()}).strict(),CU=s.object({type:s.enum(jt),name:s.string(),source:s.string()}).strict(),RU=s.object({repositoryName:s.string()}).strict(),PU=["x86_64","arm64"],NU=s.object({name:s.string(),secrets:s.array(s.string()).optional(),ssmSecretsPath:s.string().optional(),importedSecretNames:s.array(s.string()).optional(),docker:Lt.optional(),imageKey:s.string().optional(),architecture:s.enum(PU).optional()}).strict(),wU=s.object({templateHash:s.string(),synthTimestamp:s.string()}).strict(),kU=s.object({constructPath:s.string().max(512),group:s.string().max(128),resourceType:s.string().max(256)}).strict(),OU=s.object({synthesisedBy:s.string().min(1).max(128),minimumEngineVersion:s.string().min(1).max(32),maximumEngineMajor:s.number().int().min(0).optional(),minimumAwsCdkCli:s.string().min(1).max(32).optional()}).strict(),DU=s.object({appName:s.string().min(1).max(128),slot:s.string().min(1).max(64),clusterName:s.string().min(1).max(128),anchor:s.string().min(1).max(128),pinned:s.boolean(),currentServiceName:s.string().min(1).max(256),legacyKey:s.string().min(1).max(256),legacyAnchor:s.string().min(1).max(256),legacyServiceName:s.string().min(1).max(512),legacyKeyFields:s.array(s.string().max(64)).max(32)}).strict(),x7=s.object({version:s.literal(_U),generatedAt:s.string(),appName:s.string(),services:s.array(TU),lambdas:s.array(NU),pattern:CU.optional(),ecr:RU.optional(),stacks:s.record(s.string(),wU),resourceMap:s.record(s.string(),kU).optional(),engineCompat:OU.optional(),identityAliases:s.array(DU).optional()}).strict();var MU=Object.defineProperty,jU=(e,t)=>MU(e,"name",{value:t,configurable:!0});function vT(e){return!(e.image!==void 0&&e.docker!==void 0)}jU(vT,"imageDockerMutexCheck");var bT=s.number().int(d.CAPACITY.MIN.INTEGER).min(Wv,d.GENERATOR_CAPACITY.MIN.MIN).max(Hv,d.GENERATOR_CAPACITY.MIN.MAX),yT=s.number().int(d.CAPACITY.MAX.INTEGER).min(Wv,d.GENERATOR_CAPACITY.MAX.MIN).max(Hv,d.GENERATOR_CAPACITY.MAX.MAX),Oi=s.number().int(d.LAMBDA.MEMORY.INTEGER).min(k$,d.LAMBDA.MEMORY.MIN).max(O$,d.LAMBDA.MEMORY.MAX).refine(e=>e===128||e%64===0,d.LAMBDA.MEMORY.MULTIPLE),ST=s.string().regex(L.LAMBDA_RUNTIME_IDENTIFIER,d.LAMBDA.RUNTIME),rb=s.number().int(d.CPU.INTEGER).min(256,d.CPU.MIN).max(4096,d.CPU.MAX),il=s.number().int(d.CAPACITY.DESIRED.INTEGER).min(0,d.CAPACITY.DESIRED.MIN).max(Ri,d.CAPACITY.DESIRED.MAX),_a=s.object({connectToDatabase:s.array(s.string()).optional()}).strict(),zU=s.object({minSize:s.number().int(d.CAPACITY.WARM_POOL.MIN_SIZE.INTEGER).min(0,d.CAPACITY.WARM_POOL.MIN_SIZE.MIN).max(D$,d.CAPACITY.WARM_POOL.MIN_SIZE.MAX).optional(),reuseOnScaleIn:s.boolean().optional()}).strict(),nb=s.object({instanceType:s.string().optional(),amiHardwareType:s.enum(Uu).optional(),minCapacity:s.number().int(d.CAPACITY.MIN.INTEGER).min(0,d.CAPACITY.MIN.MIN_0).max(Ri,d.CAPACITY.MIN.MAX).optional(),maxCapacity:s.number().int(d.CAPACITY.MAX.INTEGER).min(1,d.CAPACITY.MAX.MIN_1).max(Ri,d.CAPACITY.MAX.MAX).optional(),memoryLimitMiB:ha(128).optional(),warmPool:zU.optional(),extraProperties:s.array(Re).optional()}).strict().superRefine((e,t)=>{if(!e.instanceType||!e.amiHardwareType)return;let n=tl(e.instanceType,e.amiHardwareType);n.valid||t.addIssue({code:"custom",message:n.message??d.ARCHITECTURE_MISMATCH,path:["instanceType"]})}).superRefine((e,t)=>{e.minCapacity===0&&!e.warmPool&&t.addIssue({code:"custom",message:d.CAPACITY.WARM_POOL_REQUIRED,path:["minCapacity"]}),e.warmPool?.minSize!==void 0&&e.maxCapacity!==void 0&&e.warmPool.minSize>e.maxCapacity&&t.addIssue({code:"custom",message:d.CAPACITY.WARM_POOL.MIN_SIZE_EXCEEDS_MAX_CAPACITY,path:["warmPool","minSize"]})}),LU=s.enum(ma).describe(`Compute type must be one of: ${ma.join(", ")}`),ib=s.enum($i).describe(`ECS capacity provider must be one of: ${$i.join(", ")}`),ob=s.string().refine(e=>mt(Fu,e),{message:d.INSTANCE_TYPE}),_T=s.object({sourceType:s.enum(["sqs","dynamodb","eventbridge"]),sourceRef:s.string().describe("Name of the source resource"),batchSize:s.number().int(d.BATCH_SIZE.INTEGER).min(1,d.BATCH_SIZE.MIN).max(1e4,d.BATCH_SIZE.MAX).optional(),startingPosition:s.enum(["TRIM_HORIZON","LATEST"]).optional(),maxBatchingWindow:s.number().int(d.BATCHING_WINDOW.INTEGER).min(0,d.BATCHING_WINDOW.MIN).max(300,d.BATCHING_WINDOW.MAX).optional(),reportBatchItemFailures:s.boolean().optional()}).strict(),UU=s.object({name:s.string().min(1,d.REQUIRED.CONTAINER_NAME).optional(),image:s.string().optional(),port:fn.optional(),environment:Ni.optional(),secretsImport:B$.optional(),command:s.array(s.string()).optional(),entryPoint:s.array(s.string()).optional(),essential:s.boolean().optional(),healthCheck:s.object({command:s.array(s.string()),interval:s.number().int(d.HEALTH_CHECK.INTERVAL.INTEGER).min(5,d.HEALTH_CHECK.INTERVAL.MIN).max(300,d.HEALTH_CHECK.INTERVAL.MAX).optional(),timeout:s.number().int(d.HEALTH_CHECK.TIMEOUT.INTEGER).min(2,d.HEALTH_CHECK.TIMEOUT.MIN).max(60,d.HEALTH_CHECK.TIMEOUT.MAX).optional(),retries:s.number().int(d.HEALTH_CHECK.RETRIES.INTEGER).min(1,d.HEALTH_CHECK.RETRIES.MIN).max(10,d.HEALTH_CHECK.RETRIES.MAX).optional(),startPeriod:s.number().int(d.HEALTH_CHECK.START_PERIOD.INTEGER).min(0,d.HEALTH_CHECK.START_PERIOD.MIN).max(300,d.HEALTH_CHECK.START_PERIOD.MAX).optional()}).strict().optional(),ssmSecrets:s.array(s.string().regex(L.SECRET_NAME,d.SECRET_NAME)).optional(),extraProperties:s.array(Re).optional()}).strict(),ET=s.string().min(1,d.REQUIRED.SERVICE_NAME).max(255,d.MAX_LENGTH.SERVICE_NAME).regex(L.ECS_SERVICE_NAME,d.ECS_SERVICE_NAME),xT=s.object({domain:s.string().optional(),loadBalancer:s.union([s.literal(!1),s.enum(zu)]).optional(),directAccess:s.boolean().optional(),extraProperties:s.array(Re).optional()}).strict().refine(e=>!(e.directAccess&&e.domain),{message:d.DIRECT_ACCESS.NO_DOMAIN,path:["directAccess"]}).refine(e=>!(e.directAccess&&typeof e.loadBalancer=="string"),{message:d.DIRECT_ACCESS.NO_LOAD_BALANCER}).describe("Cluster-level configuration"),nl=s.object({path:s.string().optional(),host:s.string().optional(),priority:s.number().int(d.PRIORITY.INTEGER).min(1,d.PRIORITY.MIN).max(5e4,d.PRIORITY.MAX).optional(),healthCheckPath:s.string().optional()}).strict().describe("Path/host-based routing configuration"),FU=s.object({desiredCount:il.optional(),minCapacity:s.number().int(d.CAPACITY.MIN.INTEGER).min(0,d.CAPACITY.MIN.MIN_0).max(Ri,d.CAPACITY.MIN.MAX).optional(),maxCapacity:s.number().int(d.CAPACITY.MAX.INTEGER).min(1,d.CAPACITY.MAX.MIN_1).max(Ri,d.CAPACITY.MAX.MAX).optional(),scalingType:s.enum(Lu).optional()}).strict().refine(pn.check,pn.params).describe("ECS service scaling configuration"),AT=s.object({name:ET,docker:Lt.optional(),needsDatabaseConnection:s.boolean().optional(),needsStorageConnection:s.boolean().optional(),needsMessagingConnection:s.boolean().optional(),image:s.string().optional(),containers:s.array(UU).optional(),routing:s.union([nl,s.array(nl).min(1)]).optional(),cpu:rb.optional(),memoryLimitMiB:ha(512).optional(),desiredCount:il.optional(),scaling:Ke(FU).optional(),capacityProvider:ib,ec2Config:nb.optional(),ssmSecretsPath:s.string().regex(L.SSM_PATH,d.SSM_PATH).optional(),extraProperties:s.array(Re).optional(),alarms:W$.optional()}).strict().superRefine((e,t)=>{vT(e)||t.addIssue({code:"custom",path:["docker"],message:d.IMAGE_DOCKER_MUTEX})}).describe("Configuration for a service in an ECS cluster"),IT=s.object({name:V,type:LU,needsConnection:s.boolean(),connectedDatabase:s.array(s.string()).optional(),connectedStorage:s.array(s.string()).optional(),connectedMessaging:s.array(s.string()).optional(),cluster:xT.optional(),services:s.array(AT).optional(),docker:Lt.partial().optional(),deployment:s.enum(Mu).optional(),codePath:s.string().optional(),timeout:s.number().int(d.LAMBDA.TIMEOUT.INTEGER).min(Bu,d.LAMBDA.TIMEOUT.MIN).max(Vu,d.LAMBDA.TIMEOUT.MAX).optional(),memory:Oi.optional(),handler:s.string().optional(),runtime:ST.optional(),environment:Ni.optional(),secrets:Ni.optional(),eventSources:s.array(_T).optional(),functionUrl:s.object({authType:s.enum(fa)}).strict().optional(),description:s.string().optional(),scheduleExpression:s.string().optional(),architecture:s.enum(ju).optional(),ephemeralStorageSize:s.number().int(d.EPHEMERAL_STORAGE.INTEGER).min(512,d.EPHEMERAL_STORAGE.MIN).max(10240,d.EPHEMERAL_STORAGE.MAX).optional(),functionName:s.string().optional(),ssmSecrets:s.array(s.string()).optional(),ssmSecretsPath:s.string().optional(),alarms:q$.optional(),instanceType:ob.optional(),enableSSH:s.boolean().optional(),keyName:s.string().optional(),userData:s.string().optional(),securityGroups:s.array(s.string()).optional(),variableName:s.string().optional(),extraProperties:s.array(Re).optional()}).strict().superRefine((e,t)=>{if(e.type==="ecs"&&e.services)for(let n=0;n<e.services.length;n++){let i=e.services[n];i?.ec2Config?.instanceType&&!i.ec2Config.amiHardwareType&&ki(i.ec2Config.instanceType)!=="ARM"&&t.addIssue({code:"custom",message:`Service '${i.name??n}' uses instance type '${i.ec2Config.instanceType}' (x86), which requires Docker images built for linux/amd64. The default build targets linux/arm64 (Graviton). Use a Graviton instance type (t4g, c6g, r6g, m6g, etc.) or set amiHardwareType: "STANDARD" to acknowledge x86.`,path:["services",n,"ec2Config","instanceType"]})}e.type==="lambda"&&e.deployment==="container"&&e.architecture==="X86_64"&&t.addIssue({code:"custom",message:"Lambda architecture 'X86_64' requires Docker images built for linux/amd64, but the default build targets linux/arm64. Use 'ARM_64' for Graviton Lambdas (recommended) or ensure your build pipeline targets linux/amd64.",path:["architecture"]})}),w7=s.object({appName:ye,clusterName:V,containerPort:fn,nameProvidedByFlag:s.boolean().optional(),ecrRepository:s.string().optional(),capacityProvider:ib.optional(),useAppEcr:s.boolean().optional(),desiredCount:il.optional(),cpu:rb.optional(),memoryLimitMiB:ha(512).optional(),minCapacity:bT.optional(),maxCapacity:yT.optional(),ec2Config:nb.optional(),connectionConfig:_a.optional()}).strict().refine(pn.check,pn.params),k7=s.object({appName:ye,functionName:V,nameProvidedByFlag:s.boolean().optional(),lambdaType:s.enum(["basic","web","custom"]).optional(),ecrRepository:s.string().optional(),timeout:s.number().int(d.LAMBDA.TIMEOUT.INTEGER).min(Bu,d.LAMBDA.TIMEOUT.MIN).max(Vu,d.LAMBDA.TIMEOUT.MAX).optional(),memory:Oi.optional(),enableFunctionUrl:s.boolean().optional(),description:s.string().optional(),enableCors:s.boolean().optional(),corsOrigins:s.string().optional(),corsHeaders:s.string().optional(),corsMethods:s.array(s.enum(j$)).optional(),corsCredentials:s.boolean().optional(),connectionConfig:_a.optional()}).strict(),O7=s.object({appName:ye,instanceName:V,nameProvidedByFlag:s.boolean().optional(),instanceType:ob.optional(),enableSSH:s.boolean().optional(),minCapacity:bT.optional(),maxCapacity:yT.optional(),connectionConfig:_a.optional()}).strict().refine(pn.check,pn.params),D7=s.object({appName:ye,clusterName:V,serviceName:ET,capacityProvider:ib,containerPort:fn.optional(),cpu:rb.optional(),memoryLimitMiB:ha(512).optional(),desiredCount:il.optional(),ec2Config:nb.optional(),routing:s.union([nl,s.array(nl).min(1)]).optional(),docker:Lt.partial().optional(),nameProvidedByFlag:s.boolean().optional(),connectionConfig:_a.optional()}).strict(),ab=s.object({appName:ye,computeName:V,nameProvidedByFlag:s.boolean().optional(),connectionConfig:_a.optional()}).strict(),BU=ab.extend({type:s.literal("ecs"),cluster:xT.optional(),services:s.array(AT).min(1,d.SERVICE.MIN_REQUIRED),docker:Lt.partial().optional()}).strict().refine(e=>{let t=e.services.filter(n=>n.containers?.some(i=>i.port));return t.length>1?t.every(n=>(Array.isArray(n.routing)?n.routing:n.routing?[n.routing]:[]).some(i=>i.path||i.host)):!0},{message:d.SERVICE.ROUTING_REQUIRED}).refine(e=>{let t=e.services.map(n=>n.name);return new Set(t).size===t.length},{message:d.SERVICE.UNIQUE_WITHIN_CLUSTER}),VU=ab.extend({type:s.literal("lambda"),timeout:s.number().int(d.LAMBDA.TIMEOUT.INTEGER).min(Bu,d.LAMBDA.TIMEOUT.MIN).max(Vu,d.LAMBDA.TIMEOUT.MAX).optional(),memory:Oi.optional(),handler:s.string().optional(),runtime:ST.optional(),environment:Ni.optional(),secrets:Ni.optional(),description:s.string().optional(),functionUrl:s.union([s.object({authType:s.enum(fa).optional()}).strict(),s.literal(!1)]).optional(),eventSources:s.array(_T).optional()}).strict(),GU=ab.extend({type:s.literal("ec2"),instanceType:ob.optional(),enableSSH:s.boolean().optional(),keyName:s.string().optional(),userData:s.string().optional(),securityGroups:s.array(s.string()).optional()}).strict(),$T=s.discriminatedUnion("type",[BU,VU,GU]),hT=s.object({path:s.string().min(1,d.REQUIRED.ROUTING_PATH),priority:s.number().int(d.PRIORITY.INTEGER).min(1,d.PRIORITY.MIN).max(5e4,d.PRIORITY.MAX).optional()}).strict(),TT=s.object({name:s.string().min(1,d.REQUIRED.SERVICE_NAME).max(255,d.MAX_LENGTH.SERVICE_NAME).regex(L.RESOURCE_NAME,d.RESOURCE_NAME),serviceType:s.enum(["web","worker"]).optional(),docker:Lt.partial().optional(),containerPort:fn.optional(),needsDatabaseConnection:s.boolean().optional(),routing:s.union([hT,s.array(hT).min(1)]).optional()}).strict().superRefine((e,t)=>{e.serviceType==="worker"&&(e.containerPort!==void 0&&t.addIssue({code:"custom",path:["containerPort"],message:"Worker services are not reachable inbound; remove containerPort."}),e.routing!==void 0&&t.addIssue({code:"custom",path:["routing"],message:"Worker services have no ALB route; remove routing."}))}),M7=s.object({appName:ye,instanceType:s.string().optional()}).strict();var sb=s.object({memorySize:Oi.optional(),timeout:s.number().int(d.LAMBDA.TIMEOUT.INTEGER).min(1,d.LAMBDA.TIMEOUT.MIN).max(900,d.LAMBDA.TIMEOUT.MAX).optional(),ephemeralStorageSize:s.number().int(d.EPHEMERAL_STORAGE.INTEGER).min(512,d.EPHEMERAL_STORAGE.MIN).max(10240,d.EPHEMERAL_STORAGE.MAX).optional()}).strict(),CT=s.object({type:s.enum(Zv).optional(),databaseName:s.string().optional(),databaseEngine:s.enum(Ci).optional(),deletionProtection:s.boolean().optional(),backupRetention:ir.optional(),port:Wu.optional(),publiclyAccessible:s.boolean().optional(),allowedIpCidr:s.string().optional(),instanceType:s.string().optional(),allocatedStorage:s.number().int(d.ALLOCATED_STORAGE.INTEGER).min(20,d.ALLOCATED_STORAGE.MIN).max(65536,d.ALLOCATED_STORAGE.MAX).optional(),multiAz:s.boolean().optional(),readReplica:Ku.optional(),writer:ya.optional(),readers:Sa.optional(),allowVpcAccess:s.boolean().optional(),monitoringInterval:ba.optional(),preferredMaintenanceWindow:s.string().optional(),databaseInsights:Yu.optional(),proxy:qu.optional(),credentials:Hu.optional(),encryption:Xu.optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()}).strict(),RT=s.object({server:sb.optional(),imageOptimisation:sb.optional(),revalidation:sb.optional()}).strict(),cb=s.object({versioned:s.boolean().optional()}).strict(),PT=s.object({assets:cb.optional(),cache:cb.optional(),media:cb.optional()}).strict(),ZU=s.object({visibilityTimeout:s.number().int(d.SQS.VISIBILITY_TIMEOUT.INTEGER).min(0,d.SQS.VISIBILITY_TIMEOUT.MIN).max(43200,d.SQS.VISIBILITY_TIMEOUT.MAX).optional(),messageRetentionPeriod:s.number().int(d.SQS.RETENTION_PERIOD.INTEGER).min(60,d.SQS.RETENTION_PERIOD.MIN).max(1209600,d.SQS.RETENTION_PERIOD.MAX).optional(),maxMessageSize:s.number().int(d.MAX_MESSAGE_SIZE.INTEGER).min(1024,d.MAX_MESSAGE_SIZE.MIN).max(262144,d.MAX_MESSAGE_SIZE.MAX).optional(),deadLetterQueue:s.union([s.literal(!1),s.object({enabled:s.boolean().optional(),maxReceiveCount:s.number().int(d.DLQ.MAX_RECEIVE_COUNT.INTEGER).min(1,d.DLQ.MAX_RECEIVE_COUNT.MIN).max(1e3,d.DLQ.MAX_RECEIVE_COUNT.MAX).optional()}).strict()]).optional()}).strict(),NT=s.object({revalidationQueue:ZU.optional()}).strict(),wT=s.object({domainNames:s.array(s.string()).optional(),certificateArn:s.string().optional()}).strict(),kT=s.record(s.string().regex(L.ENV_VAR_NAME,d.ENV_VAR_NAME),s.string()).optional(),WU=s.object({type:s.literal("payload"),name:s.string().min(1,d.REQUIRED.PATTERN_NAME),domain:s.string().optional(),database:CT.optional(),compute:RT.optional(),storage:PT.optional(),messaging:NT.optional(),cdn:wT.optional(),environment:kT}).strict(),HU=s.object({type:s.literal("nextjs"),name:s.string().min(1,d.REQUIRED.PATTERN_NAME),domain:s.string().optional(),database:CT.optional(),compute:RT.optional(),storage:PT.optional(),messaging:NT.optional(),cdn:wT.optional(),environment:kT}).strict(),ub=s.enum(Yo),qU=s.object({command:s.string().min(1,d.REQUIRED.BUILD_COMMAND),outputDir:s.string().min(1,d.REQUIRED.OUTPUT_DIR)}).strict(),KU=s.object({headers:s.boolean().optional(),contentSecurityPolicy:s.string().optional()}).strict(),YU=s.object({to:s.string().min(1,d.REQUIRED.FORMS_TO).regex(L.EMAIL,d.EMAIL),from:s.string().regex(L.EMAIL,d.EMAIL).optional(),corsOrigin:s.string().regex(L.HTTP_ORIGIN,"corsOrigin must be an exact origin such as https://example.com (no path, no trailing slash)").optional(),maxConcurrency:s.number().int().min(1).max(100).optional()}).strict(),XU=s.object({behaviours:s.array(s.unknown()).optional()}).strict(),lb=s.object({type:s.literal("staticsite"),name:s.string().min(1,d.REQUIRED.PATTERN_NAME),source:s.string().min(1,d.REQUIRED.SOURCE),build:qU,routing:ub.optional(),security:KU.optional(),domain:s.string().optional(),forms:YU.optional(),cdn:XU.optional()}).strict().superRefine((e,t)=>{if(e.forms===void 0)return;let n=e.domain;if(n===void 0||n===""){t.addIssue({code:"custom",path:["domain"],message:"A domain is required when forms are enabled: SES sends only from a verified identity, and the site's domain is the identity the pattern verifies"});return}let i=e.forms.from;i!==void 0&&!lu(i,n)&&t.addIssue({code:"custom",path:["forms","from"],message:`forms.from must be an address at ${n} (the verified SES identity) \u2014 for example noreply@${n}. Use forms.to for the recipient.`})}),Ea=s.discriminatedUnion("type",[WU,HU,lb]),OT=s.enum(["lightweight","standard","resilient","custom"]),DT=s.object({type:s.enum(Zv),instanceType:s.string().optional(),backupRetention:ir.optional(),deletionProtection:s.boolean().optional(),encryption:s.union([s.object({useCMK:s.literal(!0)}).strict(),s.literal(!1)]).optional()}).strict(),MT=s.object({memorySize:Oi.optional(),timeout:s.number().int(d.LAMBDA.TIMEOUT.INTEGER).min(1,d.LAMBDA.TIMEOUT.MIN).max(900,d.LAMBDA.TIMEOUT.MAX).optional()}).strict();var jT=s.object({appName:ye,type:qv,pattern:Kv.optional(),patternConfig:Ea.optional(),owner:s.string().optional(),tags:s.record(s.string(),s.string()).optional(),vpcId:s.string().optional(),network:Qu.optional(),backup:G$.optional(),tunnel:Z$.optional(),additionalNetworks:s.array(cT).optional(),database:s.array(Y$),s3:s.array(lT),compute:s.array(IT),dynamodb:s.array(rT).optional(),clickhouse:s.array(nT).optional(),sqs:s.array(dT).optional(),cdn:pT.optional(),customCodeBlocks:s.array(V$).optional(),additionalManagedImports:s.array(s.object({moduleSpecifier:s.string(),namedImports:s.array(s.string()),defaultImport:s.string().optional()}).strict()).optional()}).strict(),rK=s.object({name:ye,type:qv,pattern:Kv.optional(),patternTier:OT.optional(),patternDomain:s.string().optional(),source:s.string().min(1,d.REQUIRED.SOURCE).optional(),buildCommand:s.string().min(1,d.REQUIRED.BUILD_COMMAND).optional(),outputDir:s.string().min(1,d.REQUIRED.OUTPUT_DIR).optional(),routing:ub.optional(),formsTo:s.string().min(1,d.REQUIRED.FORMS_TO).regex(L.EMAIL,d.EMAIL).optional(),corsOrigin:s.string().regex(L.HTTP_ORIGIN,"corsOrigin must be an exact origin such as https://example.com (no path, no trailing slash)").optional(),customDatabase:DT.optional(),customCompute:MT.optional(),region:s.string().optional(),owner:s.string().optional(),includeDatabase:s.boolean().optional(),databaseName:s.string().min(1,d.DATABASE.NAME.REQUIRED).max(63,d.DATABASE.NAME.MAX_LENGTH).optional(),vpcId:s.string().optional(),network:uT.optional(),services:s.array(TT).optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()}).strict().superRefine((e,t)=>{e.formsTo!==void 0&&(e.patternDomain!==void 0&&e.patternDomain!==""||t.addIssue({code:"custom",path:["patternDomain"],message:"A domain is required when forms are enabled: SES sends only from a verified identity, and the site's domain is the identity the pattern verifies"}))}),nK=s.object({name:V,localResource:s.string().min(1),remoteApp:s.string().min(1),remoteResource:s.string().min(1),permission:s.enum(["read","write","read-write"]),remoteArn:s.string().optional()}).strict();var JU=["fjall-managed","external","external-manual"],cK=s.enum(JU);var zT=s.object({givenName:s.string().min(1),familyName:s.string().min(1),displayName:s.string().min(1).optional(),expires:s.string().min(1).optional()}).strict(),LT=s.object({name:s.string().min(1),path:s.string().min(1).optional()}).strict(),QU=s.union([s.object({managedPolicyArn:s.string().min(1)}).strict(),s.object({customerManagedPolicy:LT}).strict()]),e4=s.object({managedPolicies:s.array(s.string().min(1)).optional(),inlinePolicy:s.record(s.string(),s.unknown()).optional(),customerManagedPolicies:s.array(LT).optional(),permissionsBoundary:QU.optional(),sessionDuration:s.string().min(1).optional(),description:s.string().optional(),accounts:s.union([s.array(s.string().min(1)),s.literal("all")]).optional(),includeManagementAccount:s.boolean().optional(),groups:s.array(s.string().min(1)).optional()}).strict(),t4=s.object({description:s.string().optional()}).strict(),ol=s.string().regex(L.EMAIL,d.EMAIL),db={groups:s.record(s.string(),t4).optional(),permissionSets:s.record(s.string(),e4).optional(),memberships:s.record(s.string(),s.array(ol)).optional(),resolutionVersion:s.number().int().min(1).optional(),defaultPermissionSets:s.boolean().optional()},r4=s.discriminatedUnion("source",[s.object({...db,source:s.literal("fjall-managed"),users:s.record(ol,zT)}).strict(),s.object({...db,source:s.literal("external")}).strict(),s.object({...db,source:s.literal("external-manual"),users:s.record(ol,zT).optional()}).strict()]),uK=s.object({name:V,type:s.literal("organisation").optional(),organisationName:s.string().min(1).optional(),orgEmail:ol.optional(),accounts:s.unknown().optional(),accountIds:s.record(s.string(),s.string()).optional(),identityCentre:s.union([r4,s.literal(!1)]).optional(),allowedRegions:s.array(s.string().min(1)).optional()}).strict();var n4=Object.defineProperty,i4=(e,t)=>n4(e,"name",{value:t,configurable:!0}),o4=[1,3,5,7,14,30,60,90,120,150,180,365,400,545,731,1827,3653],a4=s.object({buildkiteQueue:s.string().min(1,"buildkiteQueue cannot be empty").max(100).regex(/^[a-zA-Z0-9-_]+$/,"buildkiteQueue must be alphanumeric with hyphens/underscores"),buildkiteOrgSlug:s.string().min(1,"buildkiteOrgSlug cannot be empty").max(100).regex(/^[a-z0-9-]+$/,"buildkiteOrgSlug must be a lowercase Buildkite organisation slug"),agentTokenSsmParameterName:s.string().min(2).regex(/^\//,"agentTokenSsmParameterName must be a full path (leading /)").optional(),agentTokenKmsKeyArn:s.string().min(1).optional(),fjallApiKeySsmParameterName:s.string().min(2).regex(/^\//,"fjallApiKeySsmParameterName must be a full path (leading /)").optional(),instanceType:s.string().min(1).default("c8g.xlarge"),agentVolumeSizeGib:s.number().int().min(20).max(1e3).default(250),agentMinInstances:s.number().int().min(0).default(0),agentMaxInstances:s.number().int().min(1).default(2),agentsPerInstance:s.number().int().min(1).default(1),spotCapacityPercentage:s.number().int().min(0).max(100).default(0),scaleInIdlePeriodSeconds:s.number().int().min(60).default(600),disconnectAfterUptimeSeconds:s.number().int().min(3600).default(86400),maxInstanceLifetimeDays:s.number().int().min(1).max(365).default(7),terminateInstanceAfterJob:s.boolean().default(!1),purgeBuildsOnDiskFull:s.boolean().default(!0),terminateInstanceOnDiskFull:s.boolean().default(!1),logRetentionDays:s.number().int().min(1).default(30),agentLogRetentionDays:s.literal(o4).default(7),buildkiteAgentRelease:s.enum(["stable","beta","edge"]).default("stable"),buildkiteAgentTags:s.string().default(""),buildkiteAgentTimestampLines:s.boolean().default(!1),buildkiteAgentExperiments:s.string().default(""),buildkiteAgentTracingBackend:s.enum(["","datadog","opentelemetry"]).default(""),buildkiteAgentCancelGracePeriodSeconds:s.number().int().min(10).default(60),enableSecretsPlugin:s.boolean().default(!0),enableEcrPlugin:s.boolean().default(!1),enableDockerLoginPlugin:s.boolean().default(!1),enableDockerUserNamespaceRemap:s.boolean().default(!0),enableDockerExperimental:s.boolean().default(!1),dockerNetworkingProtocol:s.enum(["ipv4","dualstack"]).default("ipv4"),enableInstanceStorage:s.boolean().default(!1),mountTmpfsAtTmp:s.boolean().default(!0),buildkiteAgentEnableGitMirrors:s.boolean().default(!1),bootstrapScriptUrl:s.string().default(""),agentEnvFileUrl:s.string().default(""),scalerEventSchedulePeriod:s.string().min(1).default("1 minute"),scalerMinPollInterval:s.string().min(1).default("10s"),scaleOutFactor:s.string().min(1).default("1.0"),scaleOutWaitingForJobs:s.boolean().default(!1),rolePermissionsBoundaryArn:s.string().min(1).optional(),alarmSnsTopicArn:s.string().min(1).optional(),applicationId:s.string().min(1).optional(),costAllocationEnvironment:s.string().min(1).optional(),costAllocationOwner:s.string().min(1).optional()}).strict(),s4=a4.refine(e=>e.agentMinInstances<=e.agentMaxInstances,{message:"agentMinInstances must be <= agentMaxInstances"});function c4(e){let t=s4.safeParse(e);if(!t.success){let n=t.error.issues.map(i=>` - ${i.path.join(".")||"(root)"}: ${i.message}`).join(`
188
+ `);return{buffer:[],stream:r}}flush(){let t=this.flushBuffer(this.buffer,this.mainLogStream,this.mainLogPath);this.buffer=t.buffer,this.mainLogStream=t.stream;let n=this.flushBuffer(this.debugBuffer,this.debugLogStream,this.debugLogPath);this.debugBuffer=n.buffer,this.debugLogStream=n.stream}close(){this.isClosing=!0,this.flush(),this.flushInterval&&(clearInterval(this.flushInterval),this.flushInterval=null),this.mainLogStream&&(this.mainLogStream.end(),this.mainLogStream=null),this.debugLogStream&&(this.debugLogStream.end(),this.debugLogStream=null),this.buffer=[],this.debugBuffer=[],this.initialised=!1,this.isClosing=!1}async closeAndFlush(){this.isClosing=!0,this.flush(),this.flushInterval&&(clearInterval(this.flushInterval),this.flushInterval=null);let t=[];this.mainLogStream&&(t.push(this.mainLogStream),this.mainLogStream=null),this.debugLogStream&&(t.push(this.debugLogStream),this.debugLogStream=null),this.buffer=[],this.debugBuffer=[],this.initialised=!1,await Promise.all(t.map(n=>new Promise(i=>{n.end(()=>i())}))),this.isClosing=!1}};import{createWriteStream as wL,existsSync as kL,mkdirSync as OL}from"fs";import{join as D$}from"path";var gn={trace:0,debug:1,info:2,warn:3,error:4},qe={MAX_FILE_SIZE:10*1024*1024,MAX_FILES:5,MAX_BUFFER_SIZE:100,FLUSH_INTERVAL_MS:500,LOG_FILENAME:"fjall.jsonl",DEBUG_LOG_FILENAME:"fjall-debug.jsonl"};import{join as RL}from"path";import{homedir as CL}from"os";var $L=Object.defineProperty,TL=(e,t)=>$L(e,"name",{value:t,configurable:!0});function Or(){let e=process.env.FJALL_LOG_DIR;return e!==void 0&&e!==""?e:RL(CL(),".fjall","logs")}TL(Or,"getDefaultLogDir");var NL=Object.defineProperty,PL=(e,t)=>NL(e,"name",{value:t,configurable:!0}),ha=class{static{PL(this,"DeploymentLoggerImpl")}mainLogger;appName;operationType;logStream=null;logPath;deploymentId;buffer=[];flushInterval=null;isClosing=!1;maxBufferSize=qe.MAX_BUFFER_SIZE;constructor(t,n,i){this.mainLogger=t,this.appName=n,this.operationType=i,this.deploymentId=`${i}-${Date.now()}`;let r=Or(),o=D$(r,"deployments",n);kL(o)||OL(o,{recursive:!0});let a=new Date().toISOString().replace(/[:.]/g,"-"),c=`${i}-${a}.jsonl`;this.logPath=D$(o,c);try{this.logStream=wL(this.logPath,{flags:"a"}),this.flushInterval=setInterval(()=>this.flush(),qe.FLUSH_INTERVAL_MS),this.info("DeploymentLogger","Deployment logging initialised",{appName:n,operationType:i,deploymentId:this.deploymentId,logPath:this.logPath})}catch{}}log(t,n,i,r,o,a){if(this.isClosing)return;let c={timestamp:new Date().toISOString(),level:t,component:n,message:i,correlationId:this.deploymentId,...r&&Object.keys(r).length>0&&{data:r},...o&&{stackName:o},...a&&{phase:a}};this.buffer.push(c),this.mainLogger.logWithCorrelation(t,n,i,this.deploymentId,r,o,a),this.buffer.length>=this.maxBufferSize&&this.flush()}flush(){if(!(this.buffer.length===0||!this.logStream)){for(let t of this.buffer)this.logStream.write(JSON.stringify(t)+`
189
+ `);this.buffer=[]}}info(t,n,i){this.log("info",t,n,i)}warn(t,n,i){this.log("warn",t,n,i)}error(t,n,i){this.log("error",t,n,i)}debug(t,n,i){this.log("debug",t,n,i)}stackEvent(t,n,i,r){this.log("info","StackDeployment",i,r,t,n)}dockerEvent(t,n){this.log("info","DockerOperation",t,{percentage:n})}ecsEvent(t,n,i){this.log("info","ECSDeployment",t,{percentage:n,taskCount:i})}close(){this.isClosing=!0,this.flush(),this.flushInterval&&(clearInterval(this.flushInterval),this.flushInterval=null),this.logStream&&(this.logStream.end(),this.logStream=null),this.buffer=[],this.isClosing=!1}getLogPath(){return this.logPath}getDeploymentId(){return this.deploymentId}};var DL=Object.defineProperty,ML=(e,t)=>DL(e,"name",{value:t,configurable:!0}),ju=class e{static{ML(this,"Logger")}static instance=null;config;debugEnabled;traceEnabled;minLevel;fileWriter;mainLogPath;debugLogPath;constructor(){let t=Or(),n=Lv(t,"debug"),i=this.parseEnvInt("FJALL_LOG_MAX_SIZE",qe.MAX_FILE_SIZE),r=this.parseEnvInt("FJALL_LOG_MAX_FILES",qe.MAX_FILES);this.config={logDir:t,debugLogDir:n,maxFileSize:i,maxFiles:r,maxBufferSize:qe.MAX_BUFFER_SIZE,flushIntervalMs:qe.FLUSH_INTERVAL_MS},this.mainLogPath=Lv(t,qe.LOG_FILENAME),this.debugLogPath=Lv(n,qe.DEBUG_LOG_FILENAME),this.debugEnabled=process.env.FJALL_DEBUG==="true"||process.env.FJALL_TRACE==="true"||process.argv.includes("--verbose")||process.argv.includes("-v"),this.traceEnabled=process.env.FJALL_TRACE==="true";let o=process.env.FJALL_LOG_LEVEL?.toLowerCase();o&&o in gn?this.minLevel=o:this.traceEnabled?this.minLevel="trace":this.debugEnabled?this.minLevel="debug":this.minLevel="info",this.fileWriter=new Mu(this.config,this.mainLogPath,this.debugLogPath,this.debugEnabled)}parseEnvInt(t,n){let i=process.env[t];if(i){let r=parseInt(i,10);if(!isNaN(r)&&r>0)return r}return n}static getInstance(){return e.instance||(e.instance=new e),e.instance}shouldLog(t){return gn[t]>=gn[this.minLevel]}createEntry(t,n,i,r,o,a,c){return{timestamp:new Date().toISOString(),level:t,component:n,message:i,...o&&{correlationId:o},...r&&Object.keys(r).length>0&&{data:r},...a&&{stackName:a},...c&&{phase:c}}}log(t,n,i,r,o,a,c){if(!this.shouldLog(t))return;let u=this.createEntry(t,n,i,r,o,a,c),l=t==="debug"||t==="trace";this.fileWriter.write(u,l),this.writeConsole(u)}writeConsole(t){if(ye.shouldSuppressOutput||ye.isNonInteractive){this.debugEnabled&&this.writeDebugMirror(t);return}let n=this.getConsolePrefix(t.level),i=`[${t.component}]`,r=`${n} ${i} ${t.message}`;t.level==="error"?console.error(r):t.level==="warn"?console.warn(r):console.log(r)}writeDebugMirror(t){let n=this.getConsolePrefix(t.level),i=`[${t.component}]`,r="";if(t.data&&Object.keys(t.data).length>0)try{r=` ${JSON.stringify(t.data)}`}catch{r=" [unserialisable data]"}let o=`${n} ${i} ${t.message}${r}`;process.stderr.write(`${Ei(o)}
190
+ `)}getConsolePrefix(t){switch(t){case"error":return"[ERROR]";case"warn":return"[WARN]";case"info":return"[INFO]";case"debug":return"[DEBUG]";case"trace":return"[TRACE]"}}error(t,n,i){this.log("error",t,n,i)}warn(t,n,i){this.log("warn",t,n,i)}info(t,n,i){this.log("info",t,n,i)}debug(t,n,i){this.log("debug",t,n,i)}trace(t,n,i){this.log("trace",t,n,i)}isDebugEnabled(){return this.debugEnabled}isTraceEnabled(){return this.traceEnabled}enableDebug(){this.debugEnabled=!0,gn[this.minLevel]>gn.debug&&(this.minLevel="debug"),this.fileWriter.setDebugEnabled(!0),this.fileWriter.isInitialised&&this.fileWriter.initialiseDebugStream()}withCorrelation(t){return new Pi(this,t)}forDeployment(t,n="deploy"){return new ha(this,t,n)}close(){this.fileWriter.close()}async flushAndClose(){await this.fileWriter.closeAndFlush()}getLogPath(){return this.mainLogPath}getDebugLogPath(){return this.debugLogPath}getLogDir(){return this.config.logDir}logWithCorrelation(t,n,i,r,o,a,c){this.log(t,n,i,o,r,a,c)}static reset(){e.instance&&(e.instance.close(),e.instance=null)}};var jL=Object.defineProperty,zL=(e,t)=>jL(e,"name",{value:t,configurable:!0}),Du=ju.getInstance();function BL(e){let t=Or(),n=j$(t,"debug"),i=j$(n,qe.DEBUG_LOG_FILENAME);try{M$(n)||LL(n,{recursive:!0}),M$(i)&&UL(i).size>qe.MAX_FILE_SIZE&&new wi({maxFiles:qe.MAX_FILES}).rotate(i);let r={timestamp:new Date().toISOString(),level:"debug",component:"Emergency",message:e};FL(i,JSON.stringify(r)+`
191
+ `)}catch{}}zL(BL,"writeDebugSync");var VL=Object.defineProperty,ki=(e,t)=>VL(e,"name",{value:t,configurable:!0});function Uv(e){return e.success===!0}ki(Uv,"isSuccess");function Fv(e){return e.success===!1}ki(Fv,"isFailure");function P(e){return{success:!0,data:e}}ki(P,"success");function $(e){return{success:!1,error:e}}ki($,"failure");async function Bv(e){try{let t=await e();return P(t)}catch(t){return $(At(t))}}ki(Bv,"tryAsync");function Vv(e){try{let t=e();return P(t)}catch(t){return $(At(t))}}ki(Vv,"trySync");var GL=Object.defineProperty,ZL=(e,t)=>GL(e,"name",{value:t,configurable:!0}),z$=/^[a-zA-Z][a-zA-Z0-9-]*$/,WL=ea.source.replace(/^\^|\$$/g,""),L=Object.freeze({IDENTIFIER:z$,NEW_APP_NAME:/^[a-z][a-z0-9-]*$/,RESOURCE_NAME:/^[a-zA-Z][a-zA-Z0-9]*$/,ECS_SERVICE_NAME:z$,BUCKET_NAME:/^[a-z][a-z0-9-]*[a-z0-9]$|^[a-z][a-z0-9]*$/,DATABASE_NAME:/^[a-zA-Z][a-zA-Z0-9_]*$/,RESOURCE_TYPE:/^[a-z]+(:[a-z]+)?$/,SSM_PATH:new RegExp(`^(?:/${WL})+$`),SECRET_NAME:pu,SSM_COMPONENT:ea,EMAIL:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,DOCKER_IMAGE:/^[a-z0-9][a-z0-9._-]*[a-z0-9](:[a-z0-9._-]+)?$/,DOMAIN:/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/i,HTTP_ORIGIN:/^https?:\/\/[a-z0-9.-]+(:\d+)?$/i,PASCAL_CASE:/^[A-Z][A-Za-z0-9]*$/,AWS_ACCOUNT_ID:/^\d{12}$/,VPC_ID:/^vpc-[a-z0-9]+$/,ROLE_ARN:/^arn:aws[a-zA-Z-]*:iam::\d{12}:role\/.+$/,CIDR:/^((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\/(3[0-2]|[12]?\d)$/,SCHEDULE_EXPRESSION:/^(rate\(1 (?:minute|hour|day)\)|rate\((?:[2-9]|[1-9]\d+) (?:minutes|hours|days)\)|cron\([^\s()]+ [^\s()]+ [^\s()]+ [^\s()]+ [^\s()]+ [^\s()]+\))$/,LAMBDA_RUNTIME_IDENTIFIER:/^[A-Za-z0-9._-]+$/,ENV_VAR_NAME:/^[A-Za-z_][A-Za-z0-9_]*$/});function Gv(e){let t=/^rate\((\d+) (minute|minutes|hour|hours|day|days)\)$/.exec(e);if(!t)return;let n=t[1],i=t[2];if(n===void 0||i===void 0)return;let r=parseInt(n,10);if(!Number.isFinite(r)||r<1)return;let o=i==="minute"||i==="hour"||i==="day";if(!(o&&r!==1)&&!(!o&&r===1))return i==="minute"||i==="minutes"?{everyMs:r*6e4}:i==="hour"||i==="hours"?{everyMs:r*60*6e4}:{everyMs:r*24*60*6e4}}ZL(Gv,"parseRateExpression");var d=Object.freeze({IDENTIFIER:"Must start with a letter, contain only letters, numbers, and hyphens",NEW_APP_NAME:"Must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens",IDENTIFIER_MIN_LENGTH:"Must be at least 2 characters",IDENTIFIER_NO_TRAILING_HYPHEN:"Must not end with a hyphen",IDENTIFIER_NO_CONSECUTIVE_HYPHENS:"Must not contain consecutive hyphens",RESOURCE_NAME:"Must start with a letter and contain only letters and numbers (PascalCase recommended)",ECS_SERVICE_NAME:"Service name must start with a letter and contain only letters, numbers, and hyphens",BUCKET_NAME:"Bucket name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens",DATABASE_NAME:"Database name must start with a letter and contain only letters, numbers, and underscores",RESOURCE_TYPE:"Resource type must be in format 'category' or 'category:type'",SSM_PATH:"SSM path must start with / and contain valid namespace segments (e.g., /myapp/ApiCluster/service)",SECRET_NAME:Uh,SSM_COMPONENT:fu,EMAIL:"Please enter a valid email address",DOMAIN:"Please enter a valid domain (e.g., cms.example.com)",DOCKER_IMAGE:"Invalid Docker image name format",REQUIRED:{APP_NAME:"Application name is required",RESOURCE_NAME:"Resource name is required",BUCKET_NAME:"Bucket name is required",SERVICE_NAME:"Service name is required",NETWORK_NAME:"Network name is required",DATABASE_NAME:"Database name is required",ORGANISATION_NAME:"Organisation name is required",EMAIL:"Email is required",NAME:"Name is required",USERNAME:"Username is required",CONTAINER_NAME:"Container name is required",GROUP:"Group is required",PATTERN_NAME:"Pattern name is required",SOURCE:"Source directory is required",BUILD_COMMAND:"Build command is required",OUTPUT_DIR:"Output directory is required",FORMS_TO:"Forms recipient address is required",ROUTING_PATH:"Routing path is required",RESOURCE_REFERENCE:"Resource reference is required",RESOURCE_TYPE:"Resource type is required",VARIANT:"Variant is required",SUBTYPE:"Subtype is required",DEPLOY_TARGET:"Deploy target is required",DESTROY_TARGET:"Destroy target is required"},MAX_LENGTH:{APP_NAME:"Application name must be 50 characters or less",RESOURCE_NAME:"Resource name must be 63 characters or less",BUCKET_NAME:"Bucket name must be 63 characters or less",SERVICE_NAME:"Service name must be 255 characters or less",NETWORK_NAME:"Network name must be 50 characters or less",DATABASE_NAME:"Database name must be 63 characters or less",ORGANISATION_NAME:"Organisation name must be 50 characters or less"},PORT:{INTEGER:"Port must be an integer",MIN:"Port must be at least 1",MAX:"Port cannot exceed 65535"},USERNAME:{MAX_LENGTH:"Username cannot exceed 63 characters"},LAMBDA:{MEMORY:{INTEGER:"Lambda memory must be an integer",MIN:"Memory must be at least 128 MB",MAX:"Memory cannot exceed 10240 MB",MULTIPLE:"Memory must be 128 MB or a multiple of 64 MB"},TIMEOUT:{INTEGER:"Timeout must be an integer",MIN:"Timeout must be at least 1 second",MAX:"Timeout cannot exceed 900 seconds"},RUNTIME:"Lambda runtime must contain only letters, digits, dots, underscores, or dashes (e.g. 'NODEJS_20_X' or 'nodejs20.x')"},ENV_VAR_NAME:"Environment variable names must start with a letter or underscore and contain only letters, digits, and underscores",PRIORITY:{INTEGER:"Priority must be an integer",MIN:"Priority must be at least 1",MAX:"Priority cannot exceed 50000"},CAPACITY:{MIN:{INTEGER:"Minimum capacity must be an integer",MIN_0:"Minimum capacity must be at least 0",MIN_1:"Minimum capacity must be at least 1",MAX:"Minimum capacity cannot exceed 100"},MAX:{INTEGER:"Maximum capacity must be an integer",MIN_0:"Maximum capacity must be at least 0",MIN_1:"Maximum capacity must be at least 1",MAX:"Maximum capacity cannot exceed 100"},DESIRED:{INTEGER:"Desired count must be an integer",MIN:"Desired count must be at least 0",MAX:"Desired count cannot exceed 100"},WARM_POOL_REQUIRED:"minCapacity 0 requires a warmPool \u2014 without it, new tasks wait 60-90s for a cold instance launch",WARM_POOL:{MIN_SIZE:{INTEGER:"Warm pool minSize must be an integer",MIN:"Warm pool minSize must be at least 0",MAX:"Warm pool minSize cannot exceed 100"},MIN_SIZE_EXCEEDS_MAX_CAPACITY:"warmPool.minSize cannot exceed maxCapacity \u2014 the warm pool cannot hold more instances than the ASG allows"}},MEMORY_LIMIT:{INTEGER:"Memory limit must be an integer",MIN_512:"Memory limit must be at least 512 MiB",MIN_128:"Memory limit must be at least 128 MiB",MAX:"Memory limit cannot exceed 30720 MiB"},DATABASE:{PORT:{INTEGER:"Database port must be an integer",MIN:"Database port must be at least 1024",MAX:"Database port cannot exceed 65535"},NAME:{REQUIRED:"Database name is required",MAX_LENGTH:"Database name must be 63 characters or less"}},BACKUP_RETENTION:{INTEGER:"Backup retention must be an integer",MIN:"Backup retention must be at least 1 day",MAX:"Backup retention cannot exceed 35 days"},SQS:{VISIBILITY_TIMEOUT:{INTEGER:"Visibility timeout must be an integer",MIN:"Visibility timeout must be at least 0 seconds",MAX:"Visibility timeout cannot exceed 43200 seconds (12 hours)"},RETENTION_PERIOD:{INTEGER:"Retention period must be an integer",MIN:"Retention period must be at least 60 seconds",MAX:"Retention period cannot exceed 1209600 seconds (14 days)"}},READER:{COUNT:{INTEGER:"Reader count must be an integer",MIN:"Reader count must be at least 0",MAX:"Reader count cannot exceed 15"}},IDENTIFIER_SUFFIX:{REQUIRED:"Identifier suffix is required when specified",MAX_LENGTH:"Identifier suffix cannot exceed 50 characters"},ROTATION:{INTEGER:"Rotation days must be an integer",MIN:"Rotation interval must be at least 1 day",MAX:"Rotation interval cannot exceed 365 days"},MAX_CONNECTIONS:{INTEGER:"Max connections must be an integer",MIN:"Max connections must be at least 1",MAX:"Max connections cannot exceed 100"},MONITORING_INTERVAL:{INTEGER:"Monitoring interval must be an integer",MIN:"Monitoring interval must be at least 0",MAX:"Monitoring interval cannot exceed 60 seconds",VALUES:"Monitoring interval must be 0, 1, 5, 10, 15, 30, or 60 seconds"},RETENTION_DAYS:{INTEGER:"Retention days must be an integer",MIN:"Retention days must be at least 1",MAX:"Retention days cannot exceed 365"},BATCH_SIZE:{INTEGER:"Batch size must be an integer",MIN:"Batch size must be at least 1",MAX:"Batch size cannot exceed 10000"},SERVICE:{UNIQUE_WITHIN_CLUSTER:"Service names must be unique within a cluster",MIN_REQUIRED:"At least one service is required",ROUTING_REQUIRED:"Multiple services with ports require routing config (path or host)"},PROXY_CONFIG:{MAX_IDLE_CONNECTIONS:{INTEGER:"Max idle connections must be an integer",MIN:"Max idle connections must be at least 0",MAX:"Max idle connections cannot exceed 100"},BORROW_TIMEOUT:{INTEGER:"Connection borrow timeout must be an integer",MIN:"Connection borrow timeout must be at least 1 second",MAX:"Connection borrow timeout cannot exceed 3600 seconds"}},MAX_AZS:{INTEGER:"Max AZs must be an integer",MIN:"Max AZs must be at least 1",MAX:"Max AZs cannot exceed 3"},BATCHING_WINDOW:{INTEGER:"Max batching window must be an integer",MIN:"Max batching window must be at least 0",MAX:"Max batching window cannot exceed 300 seconds"},HEALTH_CHECK:{INTERVAL:{INTEGER:"Health check interval must be an integer",MIN:"Health check interval must be at least 5 seconds",MAX:"Health check interval cannot exceed 300 seconds"},TIMEOUT:{INTEGER:"Health check timeout must be an integer",MIN:"Health check timeout must be at least 2 seconds",MAX:"Health check timeout cannot exceed 60 seconds"},RETRIES:{INTEGER:"Health check retries must be an integer",MIN:"Health check retries must be at least 1",MAX:"Health check retries cannot exceed 10"},START_PERIOD:{INTEGER:"Health check start period must be an integer",MIN:"Health check start period must be at least 0 seconds",MAX:"Health check start period cannot exceed 300 seconds"}},EPHEMERAL_STORAGE:{INTEGER:"Ephemeral storage size must be an integer",MIN:"Ephemeral storage size must be at least 512 MB",MAX:"Ephemeral storage size cannot exceed 10240 MB"},MAX_MESSAGE_SIZE:{INTEGER:"Max message size must be an integer",MIN:"Max message size must be at least 1024 bytes",MAX:"Max message size cannot exceed 262144 bytes (256 KB)"},CAPACITY_CONSTRAINT:{MIN_LTE_MAX:"minCapacity must be less than or equal to maxCapacity"},DIRECT_ACCESS:{NO_DOMAIN:"directAccess cannot be used with domain (no ALB for HTTPS)",NO_LOAD_BALANCER:"directAccess cannot be used with loadBalancer (mutually exclusive)"},GLOBAL_AURORA:{PRIMARY_REGION_REQUIRED:"primaryRegion is required for GlobalAurora databases"},NAT_GATEWAY:{INTEGER:"NAT gateway count must be an integer",MIN:"NAT gateway count must be at least 0",MAX:"NAT gateway count cannot exceed 3"},CIDR_MASK:{INTEGER:"CIDR mask must be an integer",MIN:"CIDR mask must be at least 16",MAX:"CIDR mask cannot exceed 28"},CPU:{INTEGER:"CPU must be an integer",MIN:"CPU must be at least 256 units",MAX:"CPU cannot exceed 4096 units"},KMS:{KEY_REQUIRED:"KMS key ARN is required when using KMS encryption"},READER_INSTANCES:{MAX:"Cannot have more than 15 reader instances",COUNT_OR_INSTANCES:"Cannot specify both 'count' and 'instances' - use one or the other"},GENERATOR_CAPACITY:{MIN:{MIN:"Minimum capacity must be at least 1",MAX:"Minimum capacity cannot exceed 1000"},MAX:{MIN:"Maximum capacity must be at least 1",MAX:"Maximum capacity cannot exceed 1000"}},INSTANCE_TYPE:"Unknown instance type. Common types include: t4g.micro, t4g.small, m5.large",ARCHITECTURE_MISMATCH:"Architecture mismatch between instance type and AMI",ALLOCATED_STORAGE:{INTEGER:"Allocated storage must be an integer",MIN:"Allocated storage must be at least 20 GB",MAX:"Allocated storage cannot exceed 65536 GB"},DLQ:{MAX_RECEIVE_COUNT:{INTEGER:"Max receive count must be an integer",MIN:"Max receive count must be at least 1",MAX:"Max receive count cannot exceed 1000"}},ALARM:{PERCENTAGE:{MIN:"Threshold must be at least 1%",MAX:"Threshold must be at most 100%"},FREE_STORAGE_GIB:{MIN:"Free storage threshold must be at least 1 GiB"}},REGION:"Invalid AWS region",PASCAL_CASE:"Resource name must start with an uppercase letter and contain only alphanumerics (PascalCase).",IMAGE_DOCKER_MUTEX:"image and docker are mutually exclusive",AWS_ACCOUNT_ID:"AWS account id must be exactly 12 digits (no hyphens)",VPC_ID:"VPC id must look like vpc-abc12345",ROLE_ARN:"Role ARN must have the form arn:aws:iam::<account-id>:role/<name>",CIDR:"CIDR must be in dotted-quad/prefix-length form (e.g. 10.0.0.0/16)",VPC_PEER:{MIN_REQUESTER_ACCOUNTS:"At least one requester account id is required",REGION_REQUIRED:"Peer region is required when specified",ROUTE_TABLE_ID_REQUIRED:"Route table id must not be empty"},SCHEDULE_EXPRESSION:"Schedule expression must be 'rate(N minute|minutes|hour|hours|day|days)' with N>=1, or 'cron(<6-field AWS expression>)'"});var HL=Object.defineProperty,pt=(e,t)=>HL(e,"name",{value:t,configurable:!0}),qL=["us-east-2","us-west-2","us-east-1","eu-west-1","eu-central-1","ap-southeast-1"],KL=Object.freeze(qL.flatMap(e=>{let t=yi(e);return t?[t]:[]})),Zv=Object.freeze(["us-east-2","us-west-2","us-east-1","eu-west-1","ap-southeast-1"]);function zu(e){return e?e.split(",").map(t=>t.trim()).filter(Boolean):[]}pt(zu,"parseRegionList");function Wv(e){return ir.includes(e)}pt(Wv,"isValidRegion");function Hv(e){return/^[a-z]{2}-[a-z]+-[1-9]$/.test(e)}pt(Hv,"isValidRegionFormat");function qv(e){if(!e)return Zv.slice(0,3);let t=e.toLowerCase().split("-"),n=t[0],i=t.length>1?t[1]:"",r=[];return n&&i&&(r=ir.filter(o=>o.startsWith(`${n}-${i}`))),r.length===0&&n&&(r=ir.filter(o=>o.startsWith(`${n}-`))),r.length>0?r.slice(0,3):Zv.slice(0,3)}pt(qv,"getSuggestions");function Kv(e){if(Wv(e))return!0;let t=qv(e);return Hv(e)?`Unknown region. Try: ${t.join(", ")}`:`Invalid format. Try: ${t.join(", ")}`}pt(Kv,"validateRegion");function L$(e){if(!e||e.trim()==="")return!0;let t=zu(e);for(let n of t){let i=Kv(n);if(i!==!0)return i}return!0}pt(L$,"validateRegionList");function Yv(e,t){return e.filter(n=>n!==t)}pt(Yv,"filterDuplicateRegions");function Xv(e){return{label:e.city,value:e.code,description:e.optIn?`${e.code} \u2014 opt-in required`:e.code}}pt(Xv,"toRegionOption");function U$(){return lt.map(Xv)}pt(U$,"getRegionOptions");function F$(e){return lt.filter(t=>t.code!==e).map(Xv)}pt(F$,"getRegionOptionsExcluding");function B$(e){let t=lt.find(n=>n.code===e);return t?t.city:e}pt(B$,"getRegionName");function V$(e){return t=>{let n=zu(t);return Yv(n,e)}}pt(V$,"createRegionFormatter");var Lu="9.0.0";var Uu=["Aurora","Instance","GlobalAurora","ClickHouse"],Oi=["FARGATE","FARGATE_SPOT","EC2"],$t=["standard","resilient","enterprise"],Fu=["tinkerer","lightweight","standard","resilient","enterprise"],Jv="custom",va=[...Fu,Jv];var YL=Object.defineProperty,XL=(e,t)=>YL(e,"name",{value:t,configurable:!0}),G$=Object.freeze({RESOURCE_SUFFIXES:Object.freeze({storage:"Storage",database:"Database",cluster:"Cluster",function:"Function",instance:"Instance",compute:"Compute"})}),ba=["ecs","lambda","ec2"],Di=Object.freeze({ECS:"ecs",LAMBDA:"lambda",EC2:"ec2"}),Bu=["code","container"],ya=Object.freeze({CODE:"code",CONTAINER:"container"}),Vu=["ARM_64","X86_64"],Z$="ARM_64",Sa=["NONE","AWS_IAM"],Gu=["public","internal"],Zu=["CPU","MEMORY"],Wu=["ARM","STANDARD"],Qv=["Instance","Aurora"],Mi=["postgresql","mysql"],W$=["foundation","compliance","hardened"];var Hu=["t3.nano","t3.micro","t3.small","t3.medium","t3.large","t3.xlarge","t3.2xlarge","t3a.nano","t3a.micro","t3a.small","t3a.medium","t3a.large","t3a.xlarge","t3a.2xlarge","t4g.nano","t4g.micro","t4g.small","t4g.medium","t4g.large","t4g.xlarge","t4g.2xlarge","c5.large","c5.xlarge","c5.2xlarge","c5.4xlarge","c5.9xlarge","c5.12xlarge","c5.18xlarge","c5.24xlarge","c5a.large","c5a.xlarge","c5a.2xlarge","c5a.4xlarge","c5a.8xlarge","c5a.12xlarge","c5a.16xlarge","c5a.24xlarge","c6g.medium","c6g.large","c6g.xlarge","c6g.2xlarge","c6g.4xlarge","c6g.8xlarge","c6g.12xlarge","c6g.16xlarge","r5.large","r5.xlarge","r5.2xlarge","r5.4xlarge","r5.8xlarge","r5.12xlarge","r5.16xlarge","r5.24xlarge","r5a.large","r5a.xlarge","r5a.2xlarge","r5a.4xlarge","r5a.8xlarge","r5a.12xlarge","r5a.16xlarge","r5a.24xlarge","r6g.medium","r6g.large","r6g.xlarge","r6g.2xlarge","r6g.4xlarge","r6g.8xlarge","r6g.12xlarge","r6g.16xlarge","i3.large","i3.xlarge","i3.2xlarge","i3.4xlarge","i3.8xlarge","i3.16xlarge","p3.2xlarge","p3.8xlarge","p3.16xlarge","g4dn.xlarge","g4dn.2xlarge","g4dn.4xlarge","g4dn.8xlarge","g4dn.12xlarge","g4dn.16xlarge","m5.large","m5.xlarge","m5.2xlarge","m5.4xlarge","m5.8xlarge","m5.12xlarge","m5.16xlarge","m5.24xlarge","m5a.large","m5a.xlarge","m5a.2xlarge","m5a.4xlarge","m5a.8xlarge","m5a.12xlarge","m5a.16xlarge","m5a.24xlarge"],H$=[0,1,5,10,15,30,60];function ft(e,t){return e.includes(t)}XL(ft,"constIncludes");var q$=1,K$=65535,nK=Object.freeze({postgresql:5432,mysql:3306}),Y$=128,X$=10240,qu=1,Ku=900,eb=1,tb=1e3,ji=100,J$=100;var Q$=3e3;var eT=["GET","POST","PUT","DELETE","HEAD","OPTIONS","PATCH"],tT=["standard","assets","upload","website"],zi=["AES256","KMS"];var JL=Object.defineProperty,_a=(e,t)=>JL(e,"name",{value:t,configurable:!0}),Ke=_a(e=>s.union([s.literal(!1),e]),"optionalOrDisabled"),hn={check:_a(e=>e.minCapacity!==void 0&&e.maxCapacity!==void 0?e.minCapacity<=e.maxCapacity:!0,"check"),params:{message:d.CAPACITY_CONSTRAINT.MIN_LTE_MAX,path:["maxCapacity"]}},Ea=_a(e=>s.number().int(d.MEMORY_LIMIT.INTEGER).min(e,e===128?d.MEMORY_LIMIT.MIN_128:d.MEMORY_LIMIT.MIN_512).max(30720,d.MEMORY_LIMIT.MAX),"memoryLimitMiBSchema"),V=s.string().min(1,d.REQUIRED.RESOURCE_NAME).max(63,d.MAX_LENGTH.RESOURCE_NAME).regex(L.RESOURCE_NAME,d.RESOURCE_NAME),nT=s.string().min(1,d.REQUIRED.BUCKET_NAME).max(63,d.MAX_LENGTH.BUCKET_NAME).regex(L.BUCKET_NAME,d.BUCKET_NAME),iT=s.string().min(1,d.REQUIRED.DATABASE_NAME).max(63,d.MAX_LENGTH.DATABASE_NAME).regex(L.DATABASE_NAME,d.DATABASE_NAME);function Yu(e,t=L.IDENTIFIER,n=d.IDENTIFIER){return s.string().min(2,d.IDENTIFIER_MIN_LENGTH).max(50,e).regex(t,n).refine(i=>!i.endsWith("-"),{message:d.IDENTIFIER_NO_TRAILING_HYPHEN}).refine(i=>!i.includes("--"),{message:d.IDENTIFIER_NO_CONSECUTIVE_HYPHENS})}_a(Yu,"identifierSchema");var Se=Yu(d.MAX_LENGTH.APP_NAME),lK=Yu(d.MAX_LENGTH.APP_NAME,L.NEW_APP_NAME,d.NEW_APP_NAME),vn=s.number().int(d.PORT.INTEGER).min(q$,d.PORT.MIN).max(K$,d.PORT.MAX),Pe=s.object({key:s.string(),sourceText:s.string()}).strict(),QL=s.object({__identifier:s.string()}).strict(),eU=s.object({__expression:s.string()}).strict(),tU=s.object({__call:s.string()}).strict(),rU=s.union([QL,eU,tU]),nU=s.union([s.string(),s.number(),s.boolean(),rU]),Li=s.record(s.string().regex(L.ENV_VAR_NAME,d.ENV_VAR_NAME),nU),iU=s.object({id:s.string(),name:s.string().optional(),arn:s.string().optional(),field:s.string().optional()}).strict().refine(e=>e.name!==void 0!=(e.arn!==void 0),{message:"secretsImport requires exactly one of `name` or `arn`."}),oT=s.record(s.string(),iU),dK=s.record(s.string(),s.unknown()),rb=s.enum(va).describe(`Application type must be one of: ${va.join(", ")}`),nb=s.enum(jt).describe(`OpenNext deployment pattern: ${jt.join(", ")}`),oU=s.enum(["before-imports","after-imports","after-app-init","after-tags","after-resource","end-of-file"]),aU=s.enum(["import","app-init","tags","database","compute","storage","network","messaging","cdn","pattern","vpc-peer","vpc-peer-accepter","cross-plan-connection","custom"]),aT=s.object({sourceText:s.string(),position:oU,afterManagedResource:s.object({type:aU,name:s.string().optional()}).strict().optional(),originalLine:s.number().int().optional(),leadingComments:s.array(s.string()).optional(),orphaned:s.boolean().optional(),orphanedComment:s.string().optional()}).strict(),sT=s.union([s.object({tier:s.enum($t)}).strict(),s.literal(!1)]),cT=s.union([s.object({instanceType:s.string().optional()}).strict(),s.literal(!1)]),sU=Yu(d.MAX_LENGTH.ORGANISATION_NAME),cU=s.string().regex(L.EMAIL,d.EMAIL),rT=s.string().refine(e=>ir.includes(e),{message:d.REGION}),mK=s.object({name:sU,email:cU,accountName:s.string().optional(),primaryRegion:rT.optional().default(bi),secondaryRegions:s.array(rT).optional(),security:s.enum(W$).optional(),force:s.boolean().optional()}).strict();function xa(e){return e.issues.map(t=>`${t.path.length>0?`${t.path.join(".")}: `:""}${t.message}`).join(`
192
+ `)}_a(xa,"getZodErrorMessage");var Ui=s.number().min(1,d.ALARM.PERCENTAGE.MIN).max(100,d.ALARM.PERCENTAGE.MAX),uU=s.number().min(1,d.ALARM.FREE_STORAGE_GIB.MIN),uT=s.union([s.literal(!1),s.object({cpuThreshold:Ui.optional(),memoryThreshold:Ui.optional(),runningTasksMinimum:s.number().int().min(0).optional(),http5xxThreshold:Ui.optional()}).strict()]),lT=s.union([s.literal(!1),s.object({cpuThreshold:Ui.optional(),freeStorageThresholdGiB:uU.optional(),connectionsThreshold:s.number().int().min(1).optional()}).strict()]),dT=s.union([s.literal(!1),s.object({errorRateThreshold:Ui.optional(),durationThresholdPercent:Ui.optional()}).strict()]);var or=s.number().int(d.BACKUP_RETENTION.INTEGER).min(1,d.BACKUP_RETENTION.MIN).max(35,d.BACKUP_RETENTION.MAX),Aa=s.number().int(d.MONITORING_INTERVAL.INTEGER).refine(e=>ft(H$,e),{message:d.MONITORING_INTERVAL.VALUES}),Ju=s.number().int(d.DATABASE.PORT.INTEGER).min(1024,d.DATABASE.PORT.MIN).max(65535,d.DATABASE.PORT.MAX),lU=s.enum(Uu).describe(`Database type must be one of: ${Uu.join(", ")}`),dU=s.object({maxConnections:s.number().int(d.MAX_CONNECTIONS.INTEGER).min(1,d.MAX_CONNECTIONS.MIN).max(100,d.MAX_CONNECTIONS.MAX).optional(),maxIdleConnections:s.number().int(d.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.INTEGER).min(0,d.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MIN).max(100,d.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MAX).optional(),connectionBorrowTimeout:s.number().int(d.PROXY_CONFIG.BORROW_TIMEOUT.INTEGER).min(1,d.PROXY_CONFIG.BORROW_TIMEOUT.MIN).max(3600,d.PROXY_CONFIG.BORROW_TIMEOUT.MAX).optional(),requireTLS:s.boolean().optional()}).strict().describe("RDS Proxy configuration"),mU=s.object({instanceType:s.string().optional(),availabilityZone:s.string().optional()}).strict().describe("Read replica configuration"),pU=s.object({automaticallyAfterDays:s.number().int(d.ROTATION.INTEGER).min(1,d.ROTATION.MIN).max(365,d.ROTATION.MAX).optional()}).strict().describe("Secret rotation configuration"),Qu=s.object({username:s.string().min(1,d.REQUIRED.USERNAME).max(63,d.USERNAME.MAX_LENGTH).optional(),secretRotation:pU.optional()}).strict().describe("Database credentials configuration"),el=Ke(dU),tl=Ke(mU),fU=s.object({scaleWithWriter:s.boolean().optional(),enableDatabaseInsights:s.boolean().optional(),identifierSuffix:s.string().min(1,d.IDENTIFIER_SUFFIX.REQUIRED).max(50,d.IDENTIFIER_SUFFIX.MAX_LENGTH).optional(),availabilityZone:s.string().optional()}).strict().describe("Configuration for a single Aurora reader instance"),Ia=s.object({enableDatabaseInsights:s.boolean().optional(),identifierSuffix:s.string().min(1,d.IDENTIFIER_SUFFIX.REQUIRED).max(50,d.IDENTIFIER_SUFFIX.MAX_LENGTH).optional(),availabilityZone:s.string().optional()}).strict().describe("Configuration for Aurora writer instance"),gU=s.object({count:s.number().int(d.READER.COUNT.INTEGER).min(0,d.READER.COUNT.MIN).max(15,d.READER.COUNT.MAX).optional(),instances:s.array(fU).max(15,d.READER_INSTANCES.MAX).optional(),defaultEnableDatabaseInsights:s.boolean().optional()}).strict().refine(e=>!(e.count!==void 0&&e.instances!==void 0),{message:d.READER_INSTANCES.COUNT_OR_INSTANCES,path:["count"]}).describe("Aurora readers configuration"),$a=Ke(gU),hU=s.object({awsManaged:s.literal(!0)}).strict(),vU=s.object({useCMK:s.literal(!0)}).strict(),mT=s.union([hU,vU]),bU=s.object({mode:s.enum(["standard","advanced"]).optional(),encryptionKey:mT.optional()}).strict().describe("Database Insights configuration"),rl=Ke(bU),nl=s.object({storageKey:mT.optional()}).strict().describe("Encryption configuration (DESTRUCTIVE to change storageKey)"),pT=s.object({name:V,type:lU,databaseName:s.string().min(1,d.REQUIRED.DATABASE_NAME),instanceType:s.string().optional(),allocatedStorage:s.number().optional(),multiAz:s.boolean().optional(),publiclyAccessible:s.boolean().optional(),databaseInsights:rl.optional(),port:Ju.optional(),deletionProtection:s.boolean().optional(),proxy:el.optional(),credentials:Qu.optional(),readReplica:tl.optional(),encryption:nl.optional(),writer:Ia.optional(),readers:$a.optional(),backupRetention:or.optional(),preferredMaintenanceWindow:s.string().optional(),monitoringInterval:Aa.optional(),primaryRegion:s.string().optional(),secondaryRegions:s.array(s.string()).optional(),globalClusterIdentifier:s.string().optional(),enableGlobalWriteForwarding:s.boolean().optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional(),databaseEngine:s.enum(Mi).optional(),engineExpression:s.string().optional(),variableName:s.string().optional(),extraProperties:s.array(Pe).optional(),alarms:lT.optional()}).strict(),il=s.object({appName:Se,nameProvidedByFlag:s.boolean().optional(),databaseName:s.string().min(1,d.REQUIRED.DATABASE_NAME).max(63,d.MAX_LENGTH.DATABASE_NAME).regex(L.DATABASE_NAME,d.DATABASE_NAME),resourceName:V.optional(),connectionConfig:s.object({connectToCompute:s.array(s.string()).optional(),connectToServices:s.array(s.string()).optional()}).strict().optional(),databaseInsights:rl.optional(),port:Ju.optional(),proxy:el.optional(),credentials:Qu.optional(),encryption:nl.optional(),deletionProtection:s.boolean().optional()}).strict(),fT={databaseType:s.literal("Instance"),instanceType:s.string().optional(),multiAz:s.boolean().optional(),readReplica:tl.optional(),publiclyAccessible:s.boolean().optional(),backupRetention:or.optional(),allocatedStorage:s.number().optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()},gT={databaseType:s.literal("Aurora"),writer:Ia.optional(),readers:$a.optional(),backupRetention:or.optional(),preferredMaintenanceWindow:s.string().optional(),monitoringInterval:Aa.optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()},hT={databaseType:s.literal("GlobalAurora"),primaryRegion:s.string().min(1,d.GLOBAL_AURORA.PRIMARY_REGION_REQUIRED),secondaryRegions:s.array(s.string()).optional(),globalClusterIdentifier:s.string().optional(),enableGlobalWriteForwarding:s.boolean().optional(),writer:Ia.optional(),readers:$a.optional(),backupRetention:or.optional(),preferredMaintenanceWindow:s.string().optional(),monitoringInterval:Aa.optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()},vT=s.object({appName:Se,nameProvidedByFlag:s.boolean().optional(),databaseName:s.string().min(1,d.REQUIRED.DATABASE_NAME).max(63,d.MAX_LENGTH.DATABASE_NAME).regex(L.DATABASE_NAME,d.DATABASE_NAME),resourceName:V.optional(),connectionConfig:s.object({connectToCompute:s.array(s.string()).optional(),connectToServices:s.array(s.string()).optional()}).strict().optional()}).strict(),bT={databaseType:s.literal("ClickHouse"),instanceType:s.string().optional(),coldTier:s.union([s.object({mode:s.literal("s3")}).strict(),s.literal(!1)]).optional(),optimiseSchedule:s.union([s.string(),s.literal(!1)]).optional(),backupSchedule:s.union([s.string(),s.literal(!1)]).optional(),backupRetentionDays:or.optional()},yU=il.extend(fT).strict(),SU=il.extend(gT).strict(),_U=il.extend(hT).strict(),EU=vT.extend(bT).strict(),EK=s.discriminatedUnion("databaseType",[yU,SU,_U,EU]),ib=il.extend({resourceName:V}).strict(),xU=ib.extend(fT).strict(),AU=ib.extend(gT).strict(),IU=ib.extend(hT).strict(),$U=vT.extend({resourceName:V}).strict(),TU=$U.extend(bT).strict(),xK=s.discriminatedUnion("databaseType",[xU,AU,IU,TU]),AK=s.object({appName:Se,databaseName:s.string().min(1,d.REQUIRED.DATABASE_NAME),maxConnections:s.number().int(d.MAX_CONNECTIONS.INTEGER).min(1,d.MAX_CONNECTIONS.MIN).max(100,d.MAX_CONNECTIONS.MAX).optional(),maxIdleConnections:s.number().int(d.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.INTEGER).min(0,d.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MIN).max(100,d.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MAX).optional(),connectionBorrowTimeout:s.number().int(d.PROXY_CONFIG.BORROW_TIMEOUT.INTEGER).min(1,d.PROXY_CONFIG.BORROW_TIMEOUT.MIN).max(3600,d.PROXY_CONFIG.BORROW_TIMEOUT.MAX).optional(),requireTLS:s.boolean().optional(),nameProvidedByFlag:s.boolean().optional()}).strict(),RU=["S","N","B"],Xu=s.object({name:s.string(),type:s.enum(RU)}).strict(),yT=s.object({name:V,partitionKey:Xu,sortKey:Xu.optional(),globalSecondaryIndexes:s.array(s.object({indexName:s.string(),partitionKey:Xu,sortKey:Xu.optional()}).strict()).optional(),ttlAttribute:s.string().optional(),stream:s.boolean().optional(),variableName:s.string().optional(),extraProperties:s.array(Pe).optional()}).strict(),CU=s.object({mode:s.literal("s3")}).strict(),ST=s.object({name:V,type:s.literal("ClickHouse"),databaseName:iT,instanceType:s.string().optional(),coldTier:s.union([CU,s.literal(!1)]).optional(),optimiseSchedule:s.union([s.string(),s.literal(!1)]).optional(),backupSchedule:s.union([s.string(),s.literal(!1)]).optional(),backupRetentionDays:or.optional(),variableName:s.string().optional(),extraProperties:s.array(Pe).optional()}).strict();var NU=s.object({count:s.number().int(d.NAT_GATEWAY.INTEGER).min(0,d.NAT_GATEWAY.MIN).max(3,d.NAT_GATEWAY.MAX).optional()}).strict().describe("NAT gateway configuration"),_T=Ke(NU),ob=s.enum(["cloudwatch","s3"]),PU=s.object({destination:ob.optional(),retentionDays:s.number().int(d.RETENTION_DAYS.INTEGER).min(1,d.RETENTION_DAYS.MIN).max(365,d.RETENTION_DAYS.MAX).optional(),trafficType:s.enum(["ALL","ACCEPT","REJECT"]).optional()}).strict().describe("VPC flow log configuration"),ET=Ke(PU),wU=s.object({s3:s.boolean().optional(),dynamodb:s.boolean().optional()}).strict().describe("Gateway VPC endpoints (FREE)"),kU=Ke(wU),OU=s.object({ecr:s.boolean().optional(),secretsManager:s.boolean().optional(),kms:s.boolean().optional(),cloudwatchLogs:s.boolean().optional(),ssm:s.boolean().optional(),sts:s.boolean().optional()}).strict().describe("Interface VPC endpoints (cost per hour)"),DU=Ke(OU),MU=s.object({gateway:kU.optional(),interface:DU.optional()}).strict().describe("VPC endpoints configuration"),xT=Ke(MU),ol=s.object({maxAzs:s.number().int(d.MAX_AZS.INTEGER).min(1,d.MAX_AZS.MIN).max(3,d.MAX_AZS.MAX).optional(),natGateways:_T.optional(),flowLogs:ET.optional(),vpcEndpoints:xT.optional(),cidrMask:s.number().int(d.CIDR_MASK.INTEGER).min(16,d.CIDR_MASK.MIN).max(28,d.CIDR_MASK.MAX).optional()}).strict(),AT=s.string().min(1,d.REQUIRED.NETWORK_NAME).max(50,d.MAX_LENGTH.NETWORK_NAME).regex(L.RESOURCE_NAME,d.RESOURCE_NAME),IT=ol.extend({name:AT}).strict(),$T=Ke(ol),CK=s.object({appName:Se,networkName:AT.optional(),maxAzs:s.number().int(d.MAX_AZS.INTEGER).min(1,d.MAX_AZS.MIN).max(3,d.MAX_AZS.MAX).optional(),natGateways:_T.optional(),flowLogs:ET.optional(),vpcEndpoints:xT.optional()}).strict(),jU=L.CIDR,ab=s.string().regex(jU,d.CIDR),zU=s.object({kind:s.literal("database"),resource:s.string().min(1,d.REQUIRED.RESOURCE_REFERENCE),name:V,allowedFromCidrs:s.array(ab),access:s.enum(["read","write","readWrite"]).optional()}).strict(),LU=s.object({kind:s.literal("ecsService"),resource:s.string().min(1,d.REQUIRED.RESOURCE_REFERENCE),serviceName:s.string().min(1,d.REQUIRED.SERVICE_NAME),name:V,allowedFromCidrs:s.array(ab),port:vn.optional()}).strict(),UU=s.discriminatedUnion("kind",[zU,LU]),NK=s.object({name:V,peerAppName:s.string().min(1,d.REQUIRED.APP_NAME),peerAccountId:s.string().regex(L.AWS_ACCOUNT_ID,d.AWS_ACCOUNT_ID),peerRegion:s.string().min(1,d.VPC_PEER.REGION_REQUIRED).optional(),peerVpcId:s.string().regex(L.VPC_ID,d.VPC_ID).optional(),peerVpcCidr:ab.optional(),peerRoleArn:s.string().regex(L.ROLE_ARN,d.ROLE_ARN).optional(),peerRouteTableIds:s.array(s.string().min(1,d.VPC_PEER.ROUTE_TABLE_ID_REQUIRED)).optional(),localVpcName:s.string().min(1,d.REQUIRED.NETWORK_NAME).optional(),enableDnsResolution:s.boolean().optional()}).strict(),PK=s.object({name:V,requesterAccountIds:s.array(s.string().regex(L.AWS_ACCOUNT_ID,d.AWS_ACCOUNT_ID)).min(1,d.VPC_PEER.MIN_REQUESTER_ACCOUNTS),localVpcName:s.string().min(1,d.REQUIRED.NETWORK_NAME).optional(),publishToSsm:s.boolean().optional(),exposedResources:s.array(UU).optional()}).strict();var al=["storage","cdn","compute"],FU=s.object({sid:s.string().optional(),effect:s.enum(["Allow","Deny"]),principals:s.array(s.string()),actions:s.array(s.string()),resources:s.array(s.string()).optional(),conditions:s.record(s.string(),s.record(s.string(),s.union([s.string(),s.array(s.string())]))).optional()}).strict(),TT=s.object({name:V,bucketName:s.string().optional(),publicReadAccess:s.boolean().optional(),websiteHosting:s.object({indexDocument:s.string(),errorDocument:s.string().optional()}).strict().optional(),backupVaultTier:s.enum($t).optional(),versioned:s.boolean().optional(),encryption:s.enum(zi).optional(),kmsKeyArn:s.string().optional(),cors:s.array(s.object({allowedOrigins:s.array(s.string()),allowedMethods:s.array(s.string()),allowedHeaders:s.array(s.string()).optional(),exposedHeaders:s.array(s.string()).optional(),maxAge:s.number().optional()}).strict()).optional(),deployment:s.object({source:s.string(),prune:s.boolean().optional(),cacheControl:s.object({maxAge:s.number().optional(),immutable:s.boolean().optional()}).strict().optional()}).strict().optional(),retain:s.boolean().optional(),resourcePolicyStatements:s.array(FU).optional(),stackPlacement:s.enum(al).optional(),variableName:s.string().optional(),extraProperties:s.array(Pe).optional()}).strict().refine(e=>e.encryption!=="KMS"||!!e.kmsKeyArn,{message:d.KMS.KEY_REQUIRED}),jK=s.object({appName:Se,bucketName:nT,nameProvidedByFlag:s.boolean().optional(),storagePreset:s.enum(tT).optional(),publicReadAccess:s.boolean().optional(),websiteHosting:s.object({indexDocument:s.string(),errorDocument:s.string().optional()}).strict().optional(),backupVaultTier:s.enum($t).optional(),versioned:s.boolean().optional(),encryption:s.enum(zi).optional(),kmsKeyArn:s.string().optional(),cors:s.array(s.object({allowedOrigins:s.array(s.string()),allowedMethods:s.array(s.string()),allowedHeaders:s.array(s.string()).optional(),exposedHeaders:s.array(s.string()).optional(),maxAge:s.number().optional()}).strict()).optional(),connectionConfig:s.object({connectToCompute:s.array(s.string()).optional(),connectToServices:s.array(s.string()).optional()}).strict().optional()}).strict().refine(e=>e.encryption!=="KMS"||!!e.kmsKeyArn,{message:d.KMS.KEY_REQUIRED,path:["kmsKeyArn"]});var sb=s.enum(["DESTROY","RETAIN"]),RT=s.object({name:V,queueType:s.enum(["standard","fifo"]).default("standard"),visibilityTimeout:s.number().int(d.SQS.VISIBILITY_TIMEOUT.INTEGER).min(0,d.SQS.VISIBILITY_TIMEOUT.MIN).max(43200,d.SQS.VISIBILITY_TIMEOUT.MAX).optional(),retentionPeriod:s.number().int(d.SQS.RETENTION_PERIOD.INTEGER).min(60,d.SQS.RETENTION_PERIOD.MIN).max(1209600,d.SQS.RETENTION_PERIOD.MAX).optional(),contentBasedDeduplication:s.boolean().optional(),removalPolicy:sb.optional(),variableName:s.string().optional(),extraProperties:s.array(Pe).optional()}).strict();var CT=s.object({type:s.literal("basic-auth"),username:s.string().min(1),password:s.string().min(1)}).strict(),NT=s.object({name:V,defaultOriginRef:s.string(),behaviours:s.array(s.object({pathPattern:s.string(),originRef:s.string(),cachePolicy:s.enum(["CACHING_OPTIMIZED","CACHING_DISABLED"]).optional()}).strict()).optional(),customDomain:s.string().optional(),certificateArn:s.string().optional(),accessGate:s.union([s.literal(!1),CT]).optional(),extraProperties:s.array(Pe).optional()}).strict(),ZK=s.object({appName:s.string(),name:V.optional(),defaultOriginRef:s.string(),behaviours:s.array(s.object({pathPattern:s.string(),originRef:s.string(),cachePolicy:s.enum(["CACHING_OPTIMIZED","CACHING_DISABLED"]).optional()}).strict()).optional(),customDomain:s.string().optional(),certificateArn:s.string().optional(),accessGate:s.union([s.literal(!1),CT]).optional(),nameProvidedByFlag:s.boolean().optional()}).strict();var BU=Object.defineProperty,cb=(e,t)=>BU(e,"name",{value:t,configurable:!0}),VU=new Set(["t4g","c6g","c6gd","c6gn","c7g","c7gd","c7gn","r6g","r6gd","r7g","r7gd","r8g","r8gd","c8g","c8gd","c8gn","m6g","m6gd","m7g","m7gd","m8g","m8gd","x8g","i8g","a1","x2gd","im4gn","is4gen","i4g","hpc7g"]);function Fi(e){let t=e.split(".")[0]??"";return VU.has(t)?"ARM":"STANDARD"}cb(Fi,"getArchitectureForInstanceType");function sl(e,t){let n=Fi(e);return n!==t?{valid:!1,message:`Instance type '${e}' requires ${n} architecture, but '${t}' AMI was specified. Use a ${n==="ARM"?"Graviton instance (t4g, c6g, r6g, m6g, etc.)":"Intel/AMD instance (t3, c5, r5, m5, etc.)"} instead.`}:{valid:!0}}cb(sl,"validateArchitectureMatch");function PT(e,t){return Fi(e)===t}cb(PT,"isArchitectureCompatible");var GU=Object.defineProperty,cl=(e,t)=>GU(e,"name",{value:t,configurable:!0});var ZU=1;var WU=/^[A-Za-z0-9_.-]+$/,HU=s.object({id:s.string().min(1,"buildSecret id cannot be empty").regex(WU,"buildSecret id may contain only letters, digits, '_', '.', and '-' (no comma, '=', or whitespace, which would break the buildx --secret argv)"),ssm:s.string().min(1,"ssm parameter name cannot be empty").optional(),secretsManager:s.object({name:s.string().min(1,"secret name cannot be empty").optional(),arn:s.string().min(1,"secret arn cannot be empty").optional(),field:s.string().min(1,"secret field cannot be empty").optional()}).strict().refine(e=>e.name===void 0!=(e.arn===void 0),"secretsManager requires exactly one of name or arn").optional(),env:s.string().min(1,"env variable name cannot be empty").optional()}).strict().superRefine((e,t)=>{[e.ssm,e.secretsManager,e.env].filter(n=>n!==void 0).length!==1&&t.addIssue({code:s.ZodIssueCode.custom,message:"buildSecret requires exactly one source (ssm, secretsManager, or env)"})}),qU=s.union([s.string(),s.object({ssm:s.string().min(1,"ssm parameter name cannot be empty").optional(),secretsManager:s.object({name:s.string().min(1,"secret name cannot be empty").optional(),arn:s.string().min(1,"secret arn cannot be empty").optional(),field:s.string().min(1,"secret field cannot be empty").optional()}).strict().refine(e=>e.name===void 0!=(e.arn===void 0),"secretsManager requires exactly one of name or arn").optional(),env:s.string().min(1,"env variable name cannot be empty").optional(),acknowledgePublic:s.boolean().optional()}).strict().superRefine((e,t)=>{[e.ssm,e.secretsManager,e.env].filter(n=>n!==void 0).length!==1&&t.addIssue({code:s.ZodIssueCode.custom,message:"buildArg value requires exactly one source (ssm, secretsManager, or env)"})})]),Lt=s.object({path:s.string(),context:s.string().min(1,"context cannot be empty").optional(),target:s.string().min(1,"target cannot be empty").optional(),buildArgs:s.record(s.string(),qU).optional(),buildSecrets:s.array(HU).optional()}).strict(),YK=Lt.partial();function KU(e,t){if(t===void 0)return e;let n=t.context??e.context,i=t.target??e.target,r=t.buildArgs??e.buildArgs,o=t.buildSecrets??e.buildSecrets;return{path:t.path??e.path,...n!==void 0&&{context:n},...i!==void 0&&{target:i},...r!==void 0&&{buildArgs:r},...o!==void 0&&{buildSecrets:o}}}cl(KU,"mergeDockerBuild");function ub(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}cl(ub,"isRecord");function wT(e){if(!ub(e)||typeof e.path!="string"||e.path.length===0)return;let t=typeof e.context=="string"&&e.context.length>0?e.context:void 0,n=typeof e.target=="string"&&e.target.length>0?e.target:void 0,i=ub(e.buildArgs)&&Object.keys(e.buildArgs).length>0?e.buildArgs:void 0,r=Array.isArray(e.buildSecrets)&&e.buildSecrets.length>0?e.buildSecrets:void 0,o={path:e.path,...t!==void 0&&{context:t},...n!==void 0&&{target:n},...i!==void 0&&{buildArgs:i},...r!==void 0&&{buildSecrets:r}},a=Lt.safeParse(o);return a.success?a.data:void 0}cl(wT,"normaliseDockerBuild");function YU(e){if(e===void 0)return;let t=wT(e);return t===void 0?void 0:JSON.stringify(t)}cl(YU,"dockerBuildFingerprint");var XU=s.object({name:s.string(),clusterName:s.string().optional(),docker:Lt.optional(),containerPort:s.number().optional(),secrets:s.array(s.string()).optional(),ssmSecretsPath:s.string().optional(),importedSecretNames:s.array(s.string()).optional()}).strict(),JU=s.object({type:s.enum(jt),name:s.string(),source:s.string()}).strict(),QU=s.object({repositoryName:s.string()}).strict(),e4=["x86_64","arm64"],t4=s.object({name:s.string(),secrets:s.array(s.string()).optional(),ssmSecretsPath:s.string().optional(),importedSecretNames:s.array(s.string()).optional(),docker:Lt.optional(),imageKey:s.string().optional(),architecture:s.enum(e4).optional()}).strict(),r4=s.object({templateHash:s.string(),synthTimestamp:s.string()}).strict(),n4=s.object({constructPath:s.string().max(512),group:s.string().max(128),resourceType:s.string().max(256)}).strict(),i4=s.object({synthesisedBy:s.string().min(1).max(128),minimumEngineVersion:s.string().min(1).max(32),maximumEngineMajor:s.number().int().min(0).optional(),minimumAwsCdkCli:s.string().min(1).max(32).optional()}).strict(),o4=s.object({appName:s.string().min(1).max(128),slot:s.string().min(1).max(64),clusterName:s.string().min(1).max(128),anchor:s.string().min(1).max(128),pinned:s.boolean(),currentServiceName:s.string().min(1).max(256),legacyKey:s.string().min(1).max(256),legacyAnchor:s.string().min(1).max(256),legacyServiceName:s.string().min(1).max(512),legacyKeyFields:s.array(s.string().max(64)).max(32)}).strict(),XK=s.object({version:s.literal(ZU),generatedAt:s.string(),appName:s.string(),services:s.array(XU),lambdas:s.array(t4),pattern:JU.optional(),ecr:QU.optional(),stacks:s.record(s.string(),r4),resourceMap:s.record(s.string(),n4).optional(),engineCompat:i4.optional(),identityAliases:s.array(o4).optional()}).strict();var a4=Object.defineProperty,s4=(e,t)=>a4(e,"name",{value:t,configurable:!0});function OT(e){return!(e.image!==void 0&&e.docker!==void 0)}s4(OT,"imageDockerMutexCheck");var DT=s.number().int(d.CAPACITY.MIN.INTEGER).min(eb,d.GENERATOR_CAPACITY.MIN.MIN).max(tb,d.GENERATOR_CAPACITY.MIN.MAX),MT=s.number().int(d.CAPACITY.MAX.INTEGER).min(eb,d.GENERATOR_CAPACITY.MAX.MIN).max(tb,d.GENERATOR_CAPACITY.MAX.MAX),Bi=s.number().int(d.LAMBDA.MEMORY.INTEGER).min(Y$,d.LAMBDA.MEMORY.MIN).max(X$,d.LAMBDA.MEMORY.MAX).refine(e=>e===128||e%64===0,d.LAMBDA.MEMORY.MULTIPLE),jT=s.string().regex(L.LAMBDA_RUNTIME_IDENTIFIER,d.LAMBDA.RUNTIME),lb=s.number().int(d.CPU.INTEGER).min(256,d.CPU.MIN).max(4096,d.CPU.MAX),ll=s.number().int(d.CAPACITY.DESIRED.INTEGER).min(0,d.CAPACITY.DESIRED.MIN).max(ji,d.CAPACITY.DESIRED.MAX),Ta=s.object({connectToDatabase:s.array(s.string()).optional()}).strict(),c4=s.object({minSize:s.number().int(d.CAPACITY.WARM_POOL.MIN_SIZE.INTEGER).min(0,d.CAPACITY.WARM_POOL.MIN_SIZE.MIN).max(J$,d.CAPACITY.WARM_POOL.MIN_SIZE.MAX).optional(),reuseOnScaleIn:s.boolean().optional()}).strict(),db=s.object({instanceType:s.string().optional(),amiHardwareType:s.enum(Wu).optional(),minCapacity:s.number().int(d.CAPACITY.MIN.INTEGER).min(0,d.CAPACITY.MIN.MIN_0).max(ji,d.CAPACITY.MIN.MAX).optional(),maxCapacity:s.number().int(d.CAPACITY.MAX.INTEGER).min(1,d.CAPACITY.MAX.MIN_1).max(ji,d.CAPACITY.MAX.MAX).optional(),memoryLimitMiB:Ea(128).optional(),warmPool:c4.optional(),extraProperties:s.array(Pe).optional()}).strict().superRefine((e,t)=>{if(!e.instanceType||!e.amiHardwareType)return;let n=sl(e.instanceType,e.amiHardwareType);n.valid||t.addIssue({code:"custom",message:n.message??d.ARCHITECTURE_MISMATCH,path:["instanceType"]})}).superRefine((e,t)=>{e.minCapacity===0&&!e.warmPool&&t.addIssue({code:"custom",message:d.CAPACITY.WARM_POOL_REQUIRED,path:["minCapacity"]}),e.warmPool?.minSize!==void 0&&e.maxCapacity!==void 0&&e.warmPool.minSize>e.maxCapacity&&t.addIssue({code:"custom",message:d.CAPACITY.WARM_POOL.MIN_SIZE_EXCEEDS_MAX_CAPACITY,path:["warmPool","minSize"]})}),u4=s.enum(ba).describe(`Compute type must be one of: ${ba.join(", ")}`),mb=s.enum(Oi).describe(`ECS capacity provider must be one of: ${Oi.join(", ")}`),pb=s.string().refine(e=>ft(Hu,e),{message:d.INSTANCE_TYPE}),zT=s.object({sourceType:s.enum(["sqs","dynamodb","eventbridge"]),sourceRef:s.string().describe("Name of the source resource"),batchSize:s.number().int(d.BATCH_SIZE.INTEGER).min(1,d.BATCH_SIZE.MIN).max(1e4,d.BATCH_SIZE.MAX).optional(),startingPosition:s.enum(["TRIM_HORIZON","LATEST"]).optional(),maxBatchingWindow:s.number().int(d.BATCHING_WINDOW.INTEGER).min(0,d.BATCHING_WINDOW.MIN).max(300,d.BATCHING_WINDOW.MAX).optional(),reportBatchItemFailures:s.boolean().optional()}).strict(),l4=s.object({name:s.string().min(1,d.REQUIRED.CONTAINER_NAME).optional(),image:s.string().optional(),port:vn.optional(),environment:Li.optional(),secretsImport:oT.optional(),command:s.array(s.string()).optional(),entryPoint:s.array(s.string()).optional(),essential:s.boolean().optional(),healthCheck:s.object({command:s.array(s.string()),interval:s.number().int(d.HEALTH_CHECK.INTERVAL.INTEGER).min(5,d.HEALTH_CHECK.INTERVAL.MIN).max(300,d.HEALTH_CHECK.INTERVAL.MAX).optional(),timeout:s.number().int(d.HEALTH_CHECK.TIMEOUT.INTEGER).min(2,d.HEALTH_CHECK.TIMEOUT.MIN).max(60,d.HEALTH_CHECK.TIMEOUT.MAX).optional(),retries:s.number().int(d.HEALTH_CHECK.RETRIES.INTEGER).min(1,d.HEALTH_CHECK.RETRIES.MIN).max(10,d.HEALTH_CHECK.RETRIES.MAX).optional(),startPeriod:s.number().int(d.HEALTH_CHECK.START_PERIOD.INTEGER).min(0,d.HEALTH_CHECK.START_PERIOD.MIN).max(300,d.HEALTH_CHECK.START_PERIOD.MAX).optional()}).strict().optional(),ssmSecrets:s.array(s.string().regex(L.SECRET_NAME,d.SECRET_NAME)).optional(),extraProperties:s.array(Pe).optional()}).strict(),LT=s.string().min(1,d.REQUIRED.SERVICE_NAME).max(255,d.MAX_LENGTH.SERVICE_NAME).regex(L.ECS_SERVICE_NAME,d.ECS_SERVICE_NAME),UT=s.object({domain:s.string().optional(),loadBalancer:s.union([s.literal(!1),s.enum(Gu)]).optional(),directAccess:s.boolean().optional(),extraProperties:s.array(Pe).optional()}).strict().refine(e=>!(e.directAccess&&e.domain),{message:d.DIRECT_ACCESS.NO_DOMAIN,path:["directAccess"]}).refine(e=>!(e.directAccess&&typeof e.loadBalancer=="string"),{message:d.DIRECT_ACCESS.NO_LOAD_BALANCER}).describe("Cluster-level configuration"),ul=s.object({path:s.string().optional(),host:s.string().optional(),priority:s.number().int(d.PRIORITY.INTEGER).min(1,d.PRIORITY.MIN).max(5e4,d.PRIORITY.MAX).optional(),healthCheckPath:s.string().optional()}).strict().describe("Path/host-based routing configuration"),d4=s.object({desiredCount:ll.optional(),minCapacity:s.number().int(d.CAPACITY.MIN.INTEGER).min(0,d.CAPACITY.MIN.MIN_0).max(ji,d.CAPACITY.MIN.MAX).optional(),maxCapacity:s.number().int(d.CAPACITY.MAX.INTEGER).min(1,d.CAPACITY.MAX.MIN_1).max(ji,d.CAPACITY.MAX.MAX).optional(),scalingType:s.enum(Zu).optional()}).strict().refine(hn.check,hn.params).describe("ECS service scaling configuration"),FT=s.object({name:LT,docker:Lt.optional(),needsDatabaseConnection:s.boolean().optional(),needsStorageConnection:s.boolean().optional(),needsMessagingConnection:s.boolean().optional(),image:s.string().optional(),containers:s.array(l4).optional(),routing:s.union([ul,s.array(ul).min(1)]).optional(),cpu:lb.optional(),memoryLimitMiB:Ea(512).optional(),desiredCount:ll.optional(),scaling:Ke(d4).optional(),capacityProvider:mb,ec2Config:db.optional(),ssmSecretsPath:s.string().regex(L.SSM_PATH,d.SSM_PATH).optional(),extraProperties:s.array(Pe).optional(),alarms:uT.optional()}).strict().superRefine((e,t)=>{OT(e)||t.addIssue({code:"custom",path:["docker"],message:d.IMAGE_DOCKER_MUTEX})}).describe("Configuration for a service in an ECS cluster"),BT=s.object({name:V,type:u4,needsConnection:s.boolean(),connectedDatabase:s.array(s.string()).optional(),connectedStorage:s.array(s.string()).optional(),connectedMessaging:s.array(s.string()).optional(),cluster:UT.optional(),services:s.array(FT).optional(),docker:Lt.partial().optional(),deployment:s.enum(Bu).optional(),codePath:s.string().optional(),timeout:s.number().int(d.LAMBDA.TIMEOUT.INTEGER).min(qu,d.LAMBDA.TIMEOUT.MIN).max(Ku,d.LAMBDA.TIMEOUT.MAX).optional(),memory:Bi.optional(),handler:s.string().optional(),runtime:jT.optional(),environment:Li.optional(),secrets:Li.optional(),eventSources:s.array(zT).optional(),functionUrl:s.object({authType:s.enum(Sa)}).strict().optional(),description:s.string().optional(),scheduleExpression:s.string().optional(),architecture:s.enum(Vu).optional(),ephemeralStorageSize:s.number().int(d.EPHEMERAL_STORAGE.INTEGER).min(512,d.EPHEMERAL_STORAGE.MIN).max(10240,d.EPHEMERAL_STORAGE.MAX).optional(),functionName:s.string().optional(),ssmSecrets:s.array(s.string()).optional(),ssmSecretsPath:s.string().optional(),alarms:dT.optional(),instanceType:pb.optional(),enableSSH:s.boolean().optional(),keyName:s.string().optional(),userData:s.string().optional(),securityGroups:s.array(s.string()).optional(),variableName:s.string().optional(),extraProperties:s.array(Pe).optional()}).strict().superRefine((e,t)=>{if(e.type==="ecs"&&e.services)for(let n=0;n<e.services.length;n++){let i=e.services[n];i?.ec2Config?.instanceType&&!i.ec2Config.amiHardwareType&&Fi(i.ec2Config.instanceType)!=="ARM"&&t.addIssue({code:"custom",message:`Service '${i.name??n}' uses instance type '${i.ec2Config.instanceType}' (x86), which requires Docker images built for linux/amd64. The default build targets linux/arm64 (Graviton). Use a Graviton instance type (t4g, c6g, r6g, m6g, etc.) or set amiHardwareType: "STANDARD" to acknowledge x86.`,path:["services",n,"ec2Config","instanceType"]})}e.type==="lambda"&&e.deployment==="container"&&e.architecture==="X86_64"&&t.addIssue({code:"custom",message:"Lambda architecture 'X86_64' requires Docker images built for linux/amd64, but the default build targets linux/arm64. Use 'ARM_64' for Graviton Lambdas (recommended) or ensure your build pipeline targets linux/amd64.",path:["architecture"]})}),a7=s.object({appName:Se,clusterName:V,containerPort:vn,nameProvidedByFlag:s.boolean().optional(),ecrRepository:s.string().optional(),capacityProvider:mb.optional(),useAppEcr:s.boolean().optional(),desiredCount:ll.optional(),cpu:lb.optional(),memoryLimitMiB:Ea(512).optional(),minCapacity:DT.optional(),maxCapacity:MT.optional(),ec2Config:db.optional(),connectionConfig:Ta.optional()}).strict().refine(hn.check,hn.params),s7=s.object({appName:Se,functionName:V,nameProvidedByFlag:s.boolean().optional(),lambdaType:s.enum(["basic","web","custom"]).optional(),ecrRepository:s.string().optional(),timeout:s.number().int(d.LAMBDA.TIMEOUT.INTEGER).min(qu,d.LAMBDA.TIMEOUT.MIN).max(Ku,d.LAMBDA.TIMEOUT.MAX).optional(),memory:Bi.optional(),enableFunctionUrl:s.boolean().optional(),description:s.string().optional(),enableCors:s.boolean().optional(),corsOrigins:s.string().optional(),corsHeaders:s.string().optional(),corsMethods:s.array(s.enum(eT)).optional(),corsCredentials:s.boolean().optional(),connectionConfig:Ta.optional()}).strict(),c7=s.object({appName:Se,instanceName:V,nameProvidedByFlag:s.boolean().optional(),instanceType:pb.optional(),enableSSH:s.boolean().optional(),minCapacity:DT.optional(),maxCapacity:MT.optional(),connectionConfig:Ta.optional()}).strict().refine(hn.check,hn.params),u7=s.object({appName:Se,clusterName:V,serviceName:LT,capacityProvider:mb,containerPort:vn.optional(),cpu:lb.optional(),memoryLimitMiB:Ea(512).optional(),desiredCount:ll.optional(),ec2Config:db.optional(),routing:s.union([ul,s.array(ul).min(1)]).optional(),docker:Lt.partial().optional(),nameProvidedByFlag:s.boolean().optional(),connectionConfig:Ta.optional()}).strict(),fb=s.object({appName:Se,computeName:V,nameProvidedByFlag:s.boolean().optional(),connectionConfig:Ta.optional()}).strict(),m4=fb.extend({type:s.literal("ecs"),cluster:UT.optional(),services:s.array(FT).min(1,d.SERVICE.MIN_REQUIRED),docker:Lt.partial().optional()}).strict().refine(e=>{let t=e.services.filter(n=>n.containers?.some(i=>i.port));return t.length>1?t.every(n=>(Array.isArray(n.routing)?n.routing:n.routing?[n.routing]:[]).some(i=>i.path||i.host)):!0},{message:d.SERVICE.ROUTING_REQUIRED}).refine(e=>{let t=e.services.map(n=>n.name);return new Set(t).size===t.length},{message:d.SERVICE.UNIQUE_WITHIN_CLUSTER}),p4=fb.extend({type:s.literal("lambda"),timeout:s.number().int(d.LAMBDA.TIMEOUT.INTEGER).min(qu,d.LAMBDA.TIMEOUT.MIN).max(Ku,d.LAMBDA.TIMEOUT.MAX).optional(),memory:Bi.optional(),handler:s.string().optional(),runtime:jT.optional(),environment:Li.optional(),secrets:Li.optional(),description:s.string().optional(),functionUrl:s.union([s.object({authType:s.enum(Sa).optional()}).strict(),s.literal(!1)]).optional(),eventSources:s.array(zT).optional()}).strict(),f4=fb.extend({type:s.literal("ec2"),instanceType:pb.optional(),enableSSH:s.boolean().optional(),keyName:s.string().optional(),userData:s.string().optional(),securityGroups:s.array(s.string()).optional()}).strict(),VT=s.discriminatedUnion("type",[m4,p4,f4]),kT=s.object({path:s.string().min(1,d.REQUIRED.ROUTING_PATH),priority:s.number().int(d.PRIORITY.INTEGER).min(1,d.PRIORITY.MIN).max(5e4,d.PRIORITY.MAX).optional()}).strict(),GT=s.object({name:s.string().min(1,d.REQUIRED.SERVICE_NAME).max(255,d.MAX_LENGTH.SERVICE_NAME).regex(L.RESOURCE_NAME,d.RESOURCE_NAME),serviceType:s.enum(["web","worker"]).optional(),docker:Lt.partial().optional(),containerPort:vn.optional(),needsDatabaseConnection:s.boolean().optional(),routing:s.union([kT,s.array(kT).min(1)]).optional()}).strict().superRefine((e,t)=>{e.serviceType==="worker"&&(e.containerPort!==void 0&&t.addIssue({code:"custom",path:["containerPort"],message:"Worker services are not reachable inbound; remove containerPort."}),e.routing!==void 0&&t.addIssue({code:"custom",path:["routing"],message:"Worker services have no ALB route; remove routing."}))}),l7=s.object({appName:Se,instanceType:s.string().optional()}).strict();var gb=s.object({memorySize:Bi.optional(),timeout:s.number().int(d.LAMBDA.TIMEOUT.INTEGER).min(1,d.LAMBDA.TIMEOUT.MIN).max(900,d.LAMBDA.TIMEOUT.MAX).optional(),ephemeralStorageSize:s.number().int(d.EPHEMERAL_STORAGE.INTEGER).min(512,d.EPHEMERAL_STORAGE.MIN).max(10240,d.EPHEMERAL_STORAGE.MAX).optional()}).strict(),ZT=s.object({type:s.enum(Qv).optional(),databaseName:s.string().optional(),databaseEngine:s.enum(Mi).optional(),deletionProtection:s.boolean().optional(),backupRetention:or.optional(),port:Ju.optional(),publiclyAccessible:s.boolean().optional(),allowedIpCidr:s.string().optional(),instanceType:s.string().optional(),allocatedStorage:s.number().int(d.ALLOCATED_STORAGE.INTEGER).min(20,d.ALLOCATED_STORAGE.MIN).max(65536,d.ALLOCATED_STORAGE.MAX).optional(),multiAz:s.boolean().optional(),readReplica:tl.optional(),writer:Ia.optional(),readers:$a.optional(),allowVpcAccess:s.boolean().optional(),monitoringInterval:Aa.optional(),preferredMaintenanceWindow:s.string().optional(),databaseInsights:rl.optional(),proxy:el.optional(),credentials:Qu.optional(),encryption:nl.optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()}).strict(),WT=s.object({server:gb.optional(),imageOptimisation:gb.optional(),revalidation:gb.optional()}).strict(),hb=s.object({versioned:s.boolean().optional()}).strict(),HT=s.object({assets:hb.optional(),cache:hb.optional(),media:hb.optional()}).strict(),g4=s.object({visibilityTimeout:s.number().int(d.SQS.VISIBILITY_TIMEOUT.INTEGER).min(0,d.SQS.VISIBILITY_TIMEOUT.MIN).max(43200,d.SQS.VISIBILITY_TIMEOUT.MAX).optional(),messageRetentionPeriod:s.number().int(d.SQS.RETENTION_PERIOD.INTEGER).min(60,d.SQS.RETENTION_PERIOD.MIN).max(1209600,d.SQS.RETENTION_PERIOD.MAX).optional(),maxMessageSize:s.number().int(d.MAX_MESSAGE_SIZE.INTEGER).min(1024,d.MAX_MESSAGE_SIZE.MIN).max(262144,d.MAX_MESSAGE_SIZE.MAX).optional(),deadLetterQueue:s.union([s.literal(!1),s.object({enabled:s.boolean().optional(),maxReceiveCount:s.number().int(d.DLQ.MAX_RECEIVE_COUNT.INTEGER).min(1,d.DLQ.MAX_RECEIVE_COUNT.MIN).max(1e3,d.DLQ.MAX_RECEIVE_COUNT.MAX).optional()}).strict()]).optional()}).strict(),qT=s.object({revalidationQueue:g4.optional()}).strict(),KT=s.object({domainNames:s.array(s.string()).optional(),certificateArn:s.string().optional()}).strict(),YT=s.record(s.string().regex(L.ENV_VAR_NAME,d.ENV_VAR_NAME),s.string()).optional(),h4=s.object({type:s.literal("payload"),name:s.string().min(1,d.REQUIRED.PATTERN_NAME),domain:s.string().optional(),database:ZT.optional(),compute:WT.optional(),storage:HT.optional(),messaging:qT.optional(),cdn:KT.optional(),environment:YT}).strict(),v4=s.object({type:s.literal("nextjs"),name:s.string().min(1,d.REQUIRED.PATTERN_NAME),domain:s.string().optional(),database:ZT.optional(),compute:WT.optional(),storage:HT.optional(),messaging:qT.optional(),cdn:KT.optional(),environment:YT}).strict(),vb=s.enum(ra),b4=s.object({command:s.string().min(1,d.REQUIRED.BUILD_COMMAND),outputDir:s.string().min(1,d.REQUIRED.OUTPUT_DIR)}).strict(),y4=s.object({headers:s.boolean().optional(),contentSecurityPolicy:s.string().optional()}).strict(),S4=s.object({to:s.string().min(1,d.REQUIRED.FORMS_TO).regex(L.EMAIL,d.EMAIL),from:s.string().regex(L.EMAIL,d.EMAIL).optional(),corsOrigin:s.string().regex(L.HTTP_ORIGIN,"corsOrigin must be an exact origin such as https://example.com (no path, no trailing slash)").optional(),maxConcurrency:s.number().int().min(1).max(100).optional()}).strict(),_4=s.object({behaviours:s.array(s.unknown()).optional()}).strict(),bb=s.object({type:s.literal("staticsite"),name:s.string().min(1,d.REQUIRED.PATTERN_NAME),source:s.string().min(1,d.REQUIRED.SOURCE),build:b4,routing:vb.optional(),security:y4.optional(),domain:s.string().optional(),forms:S4.optional(),cdn:_4.optional()}).strict().superRefine((e,t)=>{if(e.forms===void 0)return;let n=e.domain;if(n===void 0||n===""){t.addIssue({code:"custom",path:["domain"],message:"A domain is required when forms are enabled: SES sends only from a verified identity, and the site's domain is the identity the pattern verifies"});return}let i=e.forms.from;i!==void 0&&!hu(i,n)&&t.addIssue({code:"custom",path:["forms","from"],message:`forms.from must be an address at ${n} (the verified SES identity) \u2014 for example noreply@${n}. Use forms.to for the recipient.`})}),Ra=s.discriminatedUnion("type",[h4,v4,bb]),XT=s.enum(["lightweight","standard","resilient","custom"]),JT=s.object({type:s.enum(Qv),instanceType:s.string().optional(),backupRetention:or.optional(),deletionProtection:s.boolean().optional(),encryption:s.union([s.object({useCMK:s.literal(!0)}).strict(),s.literal(!1)]).optional()}).strict(),QT=s.object({memorySize:Bi.optional(),timeout:s.number().int(d.LAMBDA.TIMEOUT.INTEGER).min(1,d.LAMBDA.TIMEOUT.MIN).max(900,d.LAMBDA.TIMEOUT.MAX).optional()}).strict();var e0=s.object({appName:Se,type:rb,pattern:nb.optional(),patternConfig:Ra.optional(),owner:s.string().optional(),tags:s.record(s.string(),s.string()).optional(),vpcId:s.string().optional(),network:ol.optional(),backup:sT.optional(),tunnel:cT.optional(),additionalNetworks:s.array(IT).optional(),database:s.array(pT),s3:s.array(TT),compute:s.array(BT),dynamodb:s.array(yT).optional(),clickhouse:s.array(ST).optional(),sqs:s.array(RT).optional(),cdn:NT.optional(),customCodeBlocks:s.array(aT).optional(),additionalManagedImports:s.array(s.object({moduleSpecifier:s.string(),namedImports:s.array(s.string()),defaultImport:s.string().optional()}).strict()).optional()}).strict(),N7=s.object({name:Se,type:rb,pattern:nb.optional(),patternTier:XT.optional(),patternDomain:s.string().optional(),source:s.string().min(1,d.REQUIRED.SOURCE).optional(),buildCommand:s.string().min(1,d.REQUIRED.BUILD_COMMAND).optional(),outputDir:s.string().min(1,d.REQUIRED.OUTPUT_DIR).optional(),routing:vb.optional(),formsTo:s.string().min(1,d.REQUIRED.FORMS_TO).regex(L.EMAIL,d.EMAIL).optional(),corsOrigin:s.string().regex(L.HTTP_ORIGIN,"corsOrigin must be an exact origin such as https://example.com (no path, no trailing slash)").optional(),customDatabase:JT.optional(),customCompute:QT.optional(),region:s.string().optional(),owner:s.string().optional(),includeDatabase:s.boolean().optional(),databaseName:s.string().min(1,d.DATABASE.NAME.REQUIRED).max(63,d.DATABASE.NAME.MAX_LENGTH).optional(),vpcId:s.string().optional(),network:$T.optional(),services:s.array(GT).optional(),snapshotIdentifier:s.string().optional(),snapshotUsername:s.string().optional()}).strict().superRefine((e,t)=>{e.formsTo!==void 0&&(e.patternDomain!==void 0&&e.patternDomain!==""||t.addIssue({code:"custom",path:["patternDomain"],message:"A domain is required when forms are enabled: SES sends only from a verified identity, and the site's domain is the identity the pattern verifies"}))}),P7=s.object({name:V,localResource:s.string().min(1),remoteApp:s.string().min(1),remoteResource:s.string().min(1),permission:s.enum(["read","write","read-write"]),remoteArn:s.string().optional()}).strict();var E4=["fjall-managed","external","external-manual"],M7=s.enum(E4);var t0=s.object({givenName:s.string().min(1),familyName:s.string().min(1),displayName:s.string().min(1).optional(),expires:s.string().min(1).optional()}).strict(),r0=s.object({name:s.string().min(1),path:s.string().min(1).optional()}).strict(),x4=s.union([s.object({managedPolicyArn:s.string().min(1)}).strict(),s.object({customerManagedPolicy:r0}).strict()]),A4=s.object({managedPolicies:s.array(s.string().min(1)).optional(),inlinePolicy:s.record(s.string(),s.unknown()).optional(),customerManagedPolicies:s.array(r0).optional(),permissionsBoundary:x4.optional(),sessionDuration:s.string().min(1).optional(),description:s.string().optional(),accounts:s.union([s.array(s.string().min(1)),s.literal("all")]).optional(),includeManagementAccount:s.boolean().optional(),groups:s.array(s.string().min(1)).optional()}).strict(),I4=s.object({description:s.string().optional()}).strict(),dl=s.string().regex(L.EMAIL,d.EMAIL),yb={groups:s.record(s.string(),I4).optional(),permissionSets:s.record(s.string(),A4).optional(),memberships:s.record(s.string(),s.array(dl)).optional(),resolutionVersion:s.number().int().min(1).optional(),defaultPermissionSets:s.boolean().optional()},$4=s.discriminatedUnion("source",[s.object({...yb,source:s.literal("fjall-managed"),users:s.record(dl,t0)}).strict(),s.object({...yb,source:s.literal("external")}).strict(),s.object({...yb,source:s.literal("external-manual"),users:s.record(dl,t0).optional()}).strict()]),j7=s.object({name:V,type:s.literal("organisation").optional(),organisationName:s.string().min(1).optional(),orgEmail:dl.optional(),accounts:s.unknown().optional(),accountIds:s.record(s.string(),s.string()).optional(),identityCentre:s.union([$4,s.literal(!1)]).optional(),allowedRegions:s.array(s.string().min(1)).optional()}).strict();var T4=Object.defineProperty,R4=(e,t)=>T4(e,"name",{value:t,configurable:!0}),C4=[1,3,5,7,14,30,60,90,120,150,180,365,400,545,731,1827,3653],N4=s.object({buildkiteQueue:s.string().min(1,"buildkiteQueue cannot be empty").max(100).regex(/^[a-zA-Z0-9-_]+$/,"buildkiteQueue must be alphanumeric with hyphens/underscores"),buildkiteOrgSlug:s.string().min(1,"buildkiteOrgSlug cannot be empty").max(100).regex(/^[a-z0-9-]+$/,"buildkiteOrgSlug must be a lowercase Buildkite organisation slug"),agentTokenSsmParameterName:s.string().min(2).regex(/^\//,"agentTokenSsmParameterName must be a full path (leading /)").optional(),agentTokenKmsKeyArn:s.string().min(1).optional(),fjallApiKeySsmParameterName:s.string().min(2).regex(/^\//,"fjallApiKeySsmParameterName must be a full path (leading /)").optional(),instanceType:s.string().min(1).default("c8g.xlarge"),agentVolumeSizeGib:s.number().int().min(20).max(1e3).default(250),agentMinInstances:s.number().int().min(0).default(0),agentMaxInstances:s.number().int().min(1).default(2),agentsPerInstance:s.number().int().min(1).default(1),spotCapacityPercentage:s.number().int().min(0).max(100).default(0),scaleInIdlePeriodSeconds:s.number().int().min(60).default(600),disconnectAfterUptimeSeconds:s.number().int().min(3600).default(86400),maxInstanceLifetimeDays:s.number().int().min(1).max(365).default(7),terminateInstanceAfterJob:s.boolean().default(!1),purgeBuildsOnDiskFull:s.boolean().default(!0),terminateInstanceOnDiskFull:s.boolean().default(!1),logRetentionDays:s.number().int().min(1).default(30),agentLogRetentionDays:s.literal(C4).default(7),buildkiteAgentRelease:s.enum(["stable","beta","edge"]).default("stable"),buildkiteAgentTags:s.string().default(""),buildkiteAgentTimestampLines:s.boolean().default(!1),buildkiteAgentExperiments:s.string().default(""),buildkiteAgentTracingBackend:s.enum(["","datadog","opentelemetry"]).default(""),buildkiteAgentCancelGracePeriodSeconds:s.number().int().min(10).default(60),enableSecretsPlugin:s.boolean().default(!0),enableEcrPlugin:s.boolean().default(!1),enableDockerLoginPlugin:s.boolean().default(!1),enableDockerUserNamespaceRemap:s.boolean().default(!0),enableDockerExperimental:s.boolean().default(!1),dockerNetworkingProtocol:s.enum(["ipv4","dualstack"]).default("ipv4"),enableInstanceStorage:s.boolean().default(!1),mountTmpfsAtTmp:s.boolean().default(!0),buildkiteAgentEnableGitMirrors:s.boolean().default(!1),bootstrapScriptUrl:s.string().default(""),agentEnvFileUrl:s.string().default(""),scalerEventSchedulePeriod:s.string().min(1).default("1 minute"),scalerMinPollInterval:s.string().min(1).default("10s"),scaleOutFactor:s.string().min(1).default("1.0"),scaleOutWaitingForJobs:s.boolean().default(!1),rolePermissionsBoundaryArn:s.string().min(1).optional(),alarmSnsTopicArn:s.string().min(1).optional(),applicationId:s.string().min(1).optional(),costAllocationEnvironment:s.string().min(1).optional(),costAllocationOwner:s.string().min(1).optional()}).strict(),P4=N4.refine(e=>e.agentMinInstances<=e.agentMaxInstances,{message:"agentMinInstances must be <= agentMaxInstances"});function w4(e){let t=P4.safeParse(e);if(!t.success){let n=t.error.issues.map(i=>` - ${i.path.join(".")||"(root)"}: ${i.message}`).join(`
193
193
  `);throw new Error(`Buildkite: invalid props:
194
- ${n}`)}return t.data}i4(c4,"validateBuildkiteProps");var u4=Object.defineProperty,l4=(e,t)=>u4(e,"name",{value:t,configurable:!0});function d4(e){return`FjallDeployBoundary${e}`}l4(d4,"deployBoundaryName");var mb={Sid:"FjallInheritAdministratorAccess",Effect:"Allow",Action:"*",Resource:"*"},UT=[{Sid:"FjallDenyOrgAndAccountEscape",Effect:"Deny",Action:["organizations:LeaveOrganization","account:CloseAccount"],Resource:"*"},{Sid:"FjallDenyDisableAuditLogging",Effect:"Deny",Action:["cloudtrail:StopLogging"],Resource:"*"},{Sid:"FjallDenyBoundarySelfEscape",Effect:"Deny",Action:["iam:DeleteRolePermissionsBoundary"],Resource:"*"},{Sid:"FjallDenyDisableKmsKey",Effect:"Deny",Action:["kms:DisableKey"],Resource:"*"}],FT=[...UT,{Sid:"FjallDenyStandingHumanCredentials",Effect:"Deny",Action:["iam:CreateUser","iam:CreateLoginProfile","iam:CreateAccessKey","iam:CreateAccountAlias"],Resource:"*"},{Sid:"FjallDenyDisableConfigRecorder",Effect:"Deny",Action:["config:StopConfigurationRecorder"],Resource:"*"}],m4=[...FT,{Sid:"FjallDenyAccountPasswordPolicyTamper",Effect:"Deny",Action:["iam:UpdateAccountPasswordPolicy","iam:DeleteAccountPasswordPolicy"],Resource:"*"},{Sid:"FjallDenyDisableDefaultEbsEncryption",Effect:"Deny",Action:["ec2:DisableEbsEncryptionByDefault"],Resource:"*"}],IK={foundation:[mb,...UT],compliance:[mb,...FT],hardened:[mb,...m4]};var p4=Object.defineProperty,Se=(e,t)=>p4(e,"name",{value:t,configurable:!0});var gb="sts.amazonaws.com";function f4(e){return`FjallDevDeploy${e}`}Se(f4,"devDeployRoleName");function g4(e){return`FjallDevProvisioner${e}`}Se(g4,"devProvisionerRoleName");function h4(e){return`FjallDevSyncWriter${e}`}Se(h4,"devSyncWriterRoleName");var v4="FjallDevBoundary";function BT(e){return`arn:aws:iam::${e}:policy/${v4}`}Se(BT,"devBoundaryPolicyArn");function VT(e){return`org:${e}:dev-provisioner`}Se(VT,"devProvisionerSubject");function GT(e){return`org:${e}:dev-sync`}Se(GT,"devSyncSubject");function pb(e,t){return`org:${e}:acct:${t}`}Se(pb,"deployAccountSubject");function fb(e){return`org:${e}:*`}Se(fb,"genericMachineSubject");var b4=["discovery","connection","org-setup","dev-substrate-setup"];function ZT(e,t){return`org:${e}:${t}`}Se(ZT,"serviceSubject");function y4(e){let{fjallOrgId:t,providerArn:n,issuerDomain:i,accountTier:r,accountId:o}=e,a=e.machineTrustMode??"expanded",c={[`${i}:aud`]:gb},u;if(a==="account-scoped"){if(r===void 0||!ou(r)||o===void 0)throw new Error(`machineTrustMode "account-scoped" requires a governance accountTier and an accountId (got tier: ${String(r)}, accountId ${o===void 0?"absent":"present"}) \u2014 refusing to fall back to the generic machine subject: a silent fallback would re-widen the trust the \xA74.4a Step-3 contract removes`);u=[pb(t,o)]}else o!==void 0?u=[fb(t),pb(t,o)]:u=fb(t);return[{Sid:"FjallMachineSubject",Effect:"Allow",Principal:{Federated:n},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:{...c,[`${i}:sub`]:u}}},{Sid:"FjallUserSubjects",Effect:"Allow",Principal:{Federated:n},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:c,StringLike:{[`${i}:sub`]:`org:${t}:user:*`}}},{Sid:"FjallServiceSubjects",Effect:"Allow",Principal:{Federated:n},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:{...c,[`${i}:sub`]:b4.map(l=>ZT(t,l))}}}]}Se(y4,"buildNarrowedDeployTrustStatements");function S4(e){let{fjallOrgId:t,providerArn:n,issuerDomain:i,accountId:r}=e;return[{Sid:"FjallDevSubjectsThisAccount",Effect:"Allow",Principal:{Federated:n},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:{[`${i}:aud`]:gb},StringLike:{[`${i}:sub`]:`org:${t}:dev:${r}:*`}}}]}Se(S4,"buildDevDeployTrustStatements");function hb(e){let{providerArn:t,issuerDomain:n,sid:i,subject:r}=e;return[{Sid:i,Effect:"Allow",Principal:{Federated:t},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:{[`${n}:aud`]:gb,[`${n}:sub`]:r}}}]}Se(hb,"buildServiceSubjectTrustStatements");function _4(e){return hb({...e,sid:"FjallDevProvisionerSubject",subject:VT(e.fjallOrgId)})}Se(_4,"buildDevProvisionerTrustStatements");function E4(e){return hb({...e,sid:"FjallDevSyncSubject",subject:GT(e.fjallOrgId)})}Se(E4,"buildDevSyncWriterTrustStatements");function x4({accountId:e}){return[{Sid:"FjallDevEcsTaggedMutations",Effect:"Allow",Action:["ecs:UpdateService","ecs:DeleteService","ecs:RunTask","ecs:StopTask"],Resource:`arn:aws:ecs:*:${e}:*`,Condition:{StringEquals:{"aws:ResourceTag/fjall:dev":"true"}}},{Sid:"FjallDevEcsTaggedCreates",Effect:"Allow",Action:["ecs:RegisterTaskDefinition","ecs:CreateService"],Resource:"*",Condition:{StringEquals:{"aws:RequestTag/fjall:dev":"true"}}},{Sid:"FjallDevEcsTagOnCreate",Effect:"Allow",Action:["ecs:TagResource"],Resource:`arn:aws:ecs:*:${e}:*`,Condition:{StringEquals:{"ecs:CreateAction":["RegisterTaskDefinition","CreateService","RunTask"]}}},{Sid:"FjallDevEcsReads",Effect:"Allow",Action:["ecs:Describe*","ecs:List*"],Resource:"*"},{Sid:"FjallDevEcsDeregisterTaskDefinition",Effect:"Allow",Action:["ecs:DeregisterTaskDefinition"],Resource:`arn:aws:ecs:*:${e}:task-definition/fjall-dev-*`},{Sid:"FjallDevElbTaggedMutations",Effect:"Allow",Action:["elasticloadbalancing:ModifyRule","elasticloadbalancing:DeleteRule","elasticloadbalancing:ModifyTargetGroup","elasticloadbalancing:ModifyTargetGroupAttributes","elasticloadbalancing:DeleteTargetGroup","elasticloadbalancing:RegisterTargets","elasticloadbalancing:DeregisterTargets"],Resource:`arn:aws:elasticloadbalancing:*:${e}:*`,Condition:{StringEquals:{"aws:ResourceTag/fjall:dev":"true"}}},{Sid:"FjallDevElbTaggedCreates",Effect:"Allow",Action:["elasticloadbalancing:CreateTargetGroup","elasticloadbalancing:CreateRule"],Resource:`arn:aws:elasticloadbalancing:*:${e}:*`,Condition:{StringEquals:{"aws:RequestTag/fjall:dev":"true"}}},{Sid:"FjallDevElbTagOnCreate",Effect:"Allow",Action:["elasticloadbalancing:AddTags"],Resource:`arn:aws:elasticloadbalancing:*:${e}:*`,Condition:{StringEquals:{"elasticloadbalancing:CreateAction":["CreateTargetGroup","CreateRule"]}}},{Sid:"FjallDevElbReads",Effect:"Allow",Action:["elasticloadbalancing:Describe*"],Resource:"*"},{Sid:"FjallDevSsmDevTree",Effect:"Allow",Action:["ssm:GetParameter*","ssm:PutParameter","ssm:AddTagsToResource"],Resource:`arn:aws:ssm:*:${e}:parameter/fjall/dev/*`},{Sid:"FjallDevLogsMutations",Effect:"Allow",Action:["logs:PutRetentionPolicy","logs:DeleteLogGroup"],Resource:`arn:aws:logs:*:${e}:log-group:/fjall/dev/*`},{Sid:"FjallDevLogsTaggedCreate",Effect:"Allow",Action:["logs:CreateLogGroup","logs:TagResource"],Resource:`arn:aws:logs:*:${e}:log-group:/fjall/dev/*`,Condition:{StringEquals:{"aws:RequestTag/fjall:dev":"true"}}},{Sid:"FjallDevLogsRead",Effect:"Allow",Action:["logs:GetLogEvents","logs:DescribeLogStreams","logs:FilterLogEvents"],Resource:`arn:aws:logs:*:${e}:log-group:/fjall/dev/*`},{Sid:"FjallDevLogsDescribeGroups",Effect:"Allow",Action:["logs:DescribeLogGroups"],Resource:"*"},{Sid:"FjallDevKmsViaDevAlias",Effect:"Allow",Action:["kms:Encrypt","kms:Decrypt","kms:GenerateDataKey"],Resource:`arn:aws:kms:*:${e}:key/*`,Condition:{"ForAnyValue:StringLike":{"kms:ResourceAliases":"alias/fjall-dev-*"}}},{Sid:"FjallDevKmsSsmSecureString",Effect:"Allow",Action:["kms:Encrypt","kms:Decrypt","kms:GenerateDataKey"],Resource:`arn:aws:kms:*:${e}:key/*`,Condition:{StringLike:{"kms:ViaService":"ssm.*.amazonaws.com"}}},{Sid:"FjallDevEcrAuthToken",Effect:"Allow",Action:["ecr:GetAuthorizationToken"],Resource:"*"},{Sid:"FjallDevEcrPushPull",Effect:"Allow",Action:["ecr:PutImage","ecr:InitiateLayerUpload","ecr:UploadLayerPart","ecr:CompleteLayerUpload","ecr:BatchCheckLayerAvailability","ecr:BatchGetImage","ecr:GetDownloadUrlForLayer","ecr:DescribeImages"],Resource:`arn:aws:ecr:*:${e}:repository/*`},{Sid:"FjallDevPassDevPathRoles",Effect:"Allow",Action:["iam:PassRole"],Resource:`arn:aws:iam::${e}:role/fjall/dev/*`}]}Se(x4,"buildDevDeployPolicyStatements");function A4({accountId:e}){return[{Sid:"FjallDevProvisionerBoundedRoleWrites",Effect:"Allow",Action:["iam:CreateRole","iam:PutRolePolicy","iam:AttachRolePolicy"],Resource:`arn:aws:iam::${e}:role/fjall/dev/*`,Condition:{StringEquals:{"iam:PermissionsBoundary":BT(e)}}},{Sid:"FjallDevProvisionerPathRoleOps",Effect:"Allow",Action:["iam:DeleteRole","iam:DeleteRolePolicy","iam:DetachRolePolicy","iam:ListRolePolicies","iam:TagRole"],Resource:`arn:aws:iam::${e}:role/fjall/dev/*`},{Sid:"FjallDevProvisionerListRoles",Effect:"Allow",Action:["iam:ListRoles"],Resource:"*"},{Sid:"FjallDevProvisionerDevMasterSecrets",Effect:"Allow",Action:["secretsmanager:GetSecretValue"],Resource:`arn:aws:secretsmanager:*:${e}:secret:fjall-dev-*`},{Sid:"FjallDevProvisionerKmsDecryptViaSecretsManager",Effect:"Allow",Action:["kms:Decrypt"],Resource:`arn:aws:kms:*:${e}:key/*`,Condition:{StringLike:{"kms:ViaService":"secretsmanager.*.amazonaws.com"}}},{Sid:"FjallDevProvisionerDataApi",Effect:"Allow",Action:["rds-data:ExecuteStatement","rds-data:BatchExecuteStatement","rds-data:BeginTransaction","rds-data:CommitTransaction","rds-data:RollbackTransaction"],Resource:`arn:aws:rds:*:${e}:cluster:fjall-dev-*`},{Sid:"FjallDevProvisionerMetrics",Effect:"Allow",Action:["cloudwatch:GetMetricData"],Resource:"*"},{Sid:"FjallDevProvisionerOrphanDiscovery",Effect:"Allow",Action:["tag:GetResources"],Resource:"*"},{Sid:"FjallDevProvisionerSsmTeardown",Effect:"Allow",Action:["ssm:DeleteParameter*"],Resource:`arn:aws:ssm:*:${e}:parameter/fjall/dev/*`},{Sid:"FjallDevProvisionerLogsTeardown",Effect:"Allow",Action:["logs:DeleteLogGroup"],Resource:`arn:aws:logs:*:${e}:log-group:/fjall/dev/*`},{Sid:"FjallDevProvisionerTaggedTeardown",Effect:"Allow",Action:["ecs:UpdateService","ecs:StopTask","ecs:DeleteService","elasticloadbalancing:DeleteRule","elasticloadbalancing:DeleteTargetGroup","elasticloadbalancing:DeregisterTargets"],Resource:[`arn:aws:ecs:*:${e}:*`,`arn:aws:elasticloadbalancing:*:${e}:*`],Condition:{StringEquals:{"aws:ResourceTag/fjall:dev":"true"}}},{Sid:"FjallDevProvisionerTeardownReads",Effect:"Allow",Action:["ecs:Describe*","elasticloadbalancing:Describe*"],Resource:"*"},{Sid:"FjallDevProvisionerImageJanitor",Effect:"Allow",Action:["ecr:ListImages","ecr:DescribeImages","ecr:BatchDeleteImage"],Resource:`arn:aws:ecr:*:${e}:repository/*`},{Sid:"FjallDevProvisionerSsmReadAll",Effect:"Allow",Action:["ssm:GetParameter*"],Resource:`arn:aws:ssm:*:${e}:parameter/*`},{Sid:"FjallDevProvisionerKmsDecryptViaSsm",Effect:"Allow",Action:["kms:Decrypt"],Resource:`arn:aws:kms:*:${e}:key/*`,Condition:{StringLike:{"kms:ViaService":"ssm.*.amazonaws.com"}}}]}Se(A4,"buildDevProvisionerPolicyStatements");function I4({accountId:e}){return[{Sid:"FjallDevSyncPrefixReadWrite",Effect:"Allow",Action:["s3:GetObject","s3:PutObject"],Resource:`arn:aws:s3:::fjall-dev-sync-${e}-*/*`,Condition:{StringEquals:{"aws:ResourceAccount":e}}}]}Se(I4,"buildDevSyncWriterPolicyStatements");function $4({accountId:e}){return[{Sid:"FjallDevBoundarySsmDevRead",Effect:"Allow",Action:["ssm:GetParameter*"],Resource:`arn:aws:ssm:*:${e}:parameter/fjall/dev/*`},{Sid:"FjallDevBoundaryKmsDecryptDevAlias",Effect:"Allow",Action:["kms:Decrypt"],Resource:`arn:aws:kms:*:${e}:key/*`,Condition:{"ForAnyValue:StringLike":{"kms:ResourceAliases":"alias/fjall-dev-*"}}},{Sid:"FjallDevBoundarySyncPrefixReadWrite",Effect:"Allow",Action:["s3:GetObject","s3:PutObject"],Resource:`arn:aws:s3:::fjall-dev-sync-${e}-*/*`,Condition:{StringEquals:{"aws:ResourceAccount":e}}},{Sid:"FjallDevBoundarySlotLogs",Effect:"Allow",Action:["logs:CreateLogStream","logs:PutLogEvents"],Resource:`arn:aws:logs:*:${e}:log-group:/fjall/dev/*`},{Sid:"FjallDevBoundarySyncQueue",Effect:"Allow",Action:["sqs:ReceiveMessage","sqs:DeleteMessage","sqs:GetQueueUrl"],Resource:`arn:aws:sqs:*:${e}:fjall-dev-sync-${e}-*`}]}Se($4,"buildDevBoundaryStatements");var T4=Object.defineProperty,pt=(e,t)=>T4(e,"name",{value:t,configurable:!0});function R(e){return JSON.stringify(e)}pt(R,"escapeStringLiteral");function gn(e){return e.map(R).join(", ")}pt(gn,"formatStringArray");var C4="import:SharedAlarmTopicArn";function hn(e=" "){return`
195
- ${e}...(getConfig().environment === "production" ? { alertsTopic: ${R(C4)} } : {}),`}pt(hn,"emitProductionAlertsTopicSpread");function vb(e){if(typeof e!="object"||e===null)return!1;let t=e;return typeof t.__identifier=="string"||typeof t.__expression=="string"||typeof t.__call=="string"}pt(vb,"isSpecialValue");function or(e){return e.replace(/[^a-zA-Z0-9]/g," ").split(" ").map((t,n)=>n===0?t.charAt(0).toLowerCase()+t.slice(1):t.charAt(0).toUpperCase()+t.slice(1)).join("")}pt(or,"toVariableName");function ae(e){return e.variableName??or(e.name)}pt(ae,"getVariableName");function xa(e,t){for(let n of e.database)if(n.name===t&&n.variableName)return n.variableName;for(let n of e.s3)if(n.name===t&&n.variableName)return n.variableName;for(let n of e.compute)if(n.name===t&&n.variableName)return n.variableName;for(let n of e.dynamodb??[])if(n.name===t&&n.variableName)return n.variableName;for(let n of e.sqs??[])if(n.name===t&&n.variableName)return n.variableName;return or(t)}pt(xa,"resolveResourceVariable");function WT(e){let t=Object.entries(e);return t.length===0?!0:t.length>1?!1:t.every(([,n])=>typeof n=="string"||typeof n=="number"||typeof n=="boolean"||n===null)}pt(WT,"isSimpleObject");function Z(e,t=" "){if(e==null)return"undefined";if(typeof e=="string")return JSON.stringify(e);if(typeof e=="number"||typeof e=="boolean")return String(e);if(vb(e)){if("__identifier"in e)return e.__identifier;if("__expression"in e)return e.__expression;if("__call"in e)return e.__call}if(Array.isArray(e))return`[${e.map(n=>Z(n,t)).join(", ")}]`;if(typeof e=="object"){let n=Object.entries(e).filter(([,o])=>o!==void 0);if(WT(e)){let o=n.map(([a,c])=>`${a}: ${Z(c,t)}`).join(", ");return o?`{ ${o} }`:"{}"}let i=t+" ",r=n.map(([o,a])=>`${i}${o}: ${Z(a,i)}`).join(`,
194
+ ${n}`)}return t.data}R4(w4,"validateBuildkiteProps");var k4=Object.defineProperty,O4=(e,t)=>k4(e,"name",{value:t,configurable:!0});function D4(e){return`FjallDeployBoundary${e}`}O4(D4,"deployBoundaryName");var Sb={Sid:"FjallInheritAdministratorAccess",Effect:"Allow",Action:"*",Resource:"*"},n0=[{Sid:"FjallDenyOrgAndAccountEscape",Effect:"Deny",Action:["organizations:LeaveOrganization","account:CloseAccount"],Resource:"*"},{Sid:"FjallDenyDisableAuditLogging",Effect:"Deny",Action:["cloudtrail:StopLogging"],Resource:"*"},{Sid:"FjallDenyBoundarySelfEscape",Effect:"Deny",Action:["iam:DeleteRolePermissionsBoundary"],Resource:"*"},{Sid:"FjallDenyDisableKmsKey",Effect:"Deny",Action:["kms:DisableKey"],Resource:"*"}],i0=[...n0,{Sid:"FjallDenyStandingHumanCredentials",Effect:"Deny",Action:["iam:CreateUser","iam:CreateLoginProfile","iam:CreateAccessKey","iam:CreateAccountAlias"],Resource:"*"},{Sid:"FjallDenyDisableConfigRecorder",Effect:"Deny",Action:["config:StopConfigurationRecorder"],Resource:"*"}],M4=[...i0,{Sid:"FjallDenyAccountPasswordPolicyTamper",Effect:"Deny",Action:["iam:UpdateAccountPasswordPolicy","iam:DeleteAccountPasswordPolicy"],Resource:"*"},{Sid:"FjallDenyDisableDefaultEbsEncryption",Effect:"Deny",Action:["ec2:DisableEbsEncryptionByDefault"],Resource:"*"}],Q7={foundation:[Sb,...n0],compliance:[Sb,...i0],hardened:[Sb,...M4]};var j4=Object.defineProperty,_e=(e,t)=>j4(e,"name",{value:t,configurable:!0});var xb="sts.amazonaws.com";function z4(e){return`FjallDevDeploy${e}`}_e(z4,"devDeployRoleName");function L4(e){return`FjallDevProvisioner${e}`}_e(L4,"devProvisionerRoleName");function U4(e){return`FjallDevSyncWriter${e}`}_e(U4,"devSyncWriterRoleName");var F4="FjallDevBoundary";function o0(e){return`arn:aws:iam::${e}:policy/${F4}`}_e(o0,"devBoundaryPolicyArn");function a0(e){return`org:${e}:dev-provisioner`}_e(a0,"devProvisionerSubject");function s0(e){return`org:${e}:dev-sync`}_e(s0,"devSyncSubject");function _b(e,t){return`org:${e}:acct:${t}`}_e(_b,"deployAccountSubject");function Eb(e){return`org:${e}:*`}_e(Eb,"genericMachineSubject");var B4=["discovery","connection","org-setup","dev-substrate-setup"];function c0(e,t){return`org:${e}:${t}`}_e(c0,"serviceSubject");function V4(e){let{fjallOrgId:t,providerArn:n,issuerDomain:i,accountTier:r,accountId:o}=e,a=e.machineTrustMode??"expanded",c={[`${i}:aud`]:xb},u;if(a==="account-scoped"){if(r===void 0||!du(r)||o===void 0)throw new Error(`machineTrustMode "account-scoped" requires a governance accountTier and an accountId (got tier: ${String(r)}, accountId ${o===void 0?"absent":"present"}) \u2014 refusing to fall back to the generic machine subject: a silent fallback would re-widen the trust the \xA74.4a Step-3 contract removes`);u=[_b(t,o)]}else o!==void 0?u=[Eb(t),_b(t,o)]:u=Eb(t);return[{Sid:"FjallMachineSubject",Effect:"Allow",Principal:{Federated:n},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:{...c,[`${i}:sub`]:u}}},{Sid:"FjallUserSubjects",Effect:"Allow",Principal:{Federated:n},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:c,StringLike:{[`${i}:sub`]:`org:${t}:user:*`}}},{Sid:"FjallServiceSubjects",Effect:"Allow",Principal:{Federated:n},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:{...c,[`${i}:sub`]:B4.map(l=>c0(t,l))}}}]}_e(V4,"buildNarrowedDeployTrustStatements");function G4(e){let{fjallOrgId:t,providerArn:n,issuerDomain:i,accountId:r}=e;return[{Sid:"FjallDevSubjectsThisAccount",Effect:"Allow",Principal:{Federated:n},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:{[`${i}:aud`]:xb},StringLike:{[`${i}:sub`]:`org:${t}:dev:${r}:*`}}}]}_e(G4,"buildDevDeployTrustStatements");function Ab(e){let{providerArn:t,issuerDomain:n,sid:i,subject:r}=e;return[{Sid:i,Effect:"Allow",Principal:{Federated:t},Action:"sts:AssumeRoleWithWebIdentity",Condition:{StringEquals:{[`${n}:aud`]:xb,[`${n}:sub`]:r}}}]}_e(Ab,"buildServiceSubjectTrustStatements");function Z4(e){return Ab({...e,sid:"FjallDevProvisionerSubject",subject:a0(e.fjallOrgId)})}_e(Z4,"buildDevProvisionerTrustStatements");function W4(e){return Ab({...e,sid:"FjallDevSyncSubject",subject:s0(e.fjallOrgId)})}_e(W4,"buildDevSyncWriterTrustStatements");function H4({accountId:e}){return[{Sid:"FjallDevEcsTaggedMutations",Effect:"Allow",Action:["ecs:UpdateService","ecs:DeleteService","ecs:RunTask","ecs:StopTask"],Resource:`arn:aws:ecs:*:${e}:*`,Condition:{StringEquals:{"aws:ResourceTag/fjall:dev":"true"}}},{Sid:"FjallDevEcsTaggedCreates",Effect:"Allow",Action:["ecs:RegisterTaskDefinition","ecs:CreateService"],Resource:"*",Condition:{StringEquals:{"aws:RequestTag/fjall:dev":"true"}}},{Sid:"FjallDevEcsTagOnCreate",Effect:"Allow",Action:["ecs:TagResource"],Resource:`arn:aws:ecs:*:${e}:*`,Condition:{StringEquals:{"ecs:CreateAction":["RegisterTaskDefinition","CreateService","RunTask"]}}},{Sid:"FjallDevEcsReads",Effect:"Allow",Action:["ecs:Describe*","ecs:List*"],Resource:"*"},{Sid:"FjallDevEcsDeregisterTaskDefinition",Effect:"Allow",Action:["ecs:DeregisterTaskDefinition"],Resource:`arn:aws:ecs:*:${e}:task-definition/fjall-dev-*`},{Sid:"FjallDevElbTaggedMutations",Effect:"Allow",Action:["elasticloadbalancing:ModifyRule","elasticloadbalancing:DeleteRule","elasticloadbalancing:ModifyTargetGroup","elasticloadbalancing:ModifyTargetGroupAttributes","elasticloadbalancing:DeleteTargetGroup","elasticloadbalancing:RegisterTargets","elasticloadbalancing:DeregisterTargets"],Resource:`arn:aws:elasticloadbalancing:*:${e}:*`,Condition:{StringEquals:{"aws:ResourceTag/fjall:dev":"true"}}},{Sid:"FjallDevElbTaggedCreates",Effect:"Allow",Action:["elasticloadbalancing:CreateTargetGroup","elasticloadbalancing:CreateRule"],Resource:`arn:aws:elasticloadbalancing:*:${e}:*`,Condition:{StringEquals:{"aws:RequestTag/fjall:dev":"true"}}},{Sid:"FjallDevElbTagOnCreate",Effect:"Allow",Action:["elasticloadbalancing:AddTags"],Resource:`arn:aws:elasticloadbalancing:*:${e}:*`,Condition:{StringEquals:{"elasticloadbalancing:CreateAction":["CreateTargetGroup","CreateRule"]}}},{Sid:"FjallDevElbReads",Effect:"Allow",Action:["elasticloadbalancing:Describe*"],Resource:"*"},{Sid:"FjallDevSsmDevTree",Effect:"Allow",Action:["ssm:GetParameter*","ssm:PutParameter","ssm:AddTagsToResource"],Resource:`arn:aws:ssm:*:${e}:parameter/fjall/dev/*`},{Sid:"FjallDevLogsMutations",Effect:"Allow",Action:["logs:PutRetentionPolicy","logs:DeleteLogGroup"],Resource:`arn:aws:logs:*:${e}:log-group:/fjall/dev/*`},{Sid:"FjallDevLogsTaggedCreate",Effect:"Allow",Action:["logs:CreateLogGroup","logs:TagResource"],Resource:`arn:aws:logs:*:${e}:log-group:/fjall/dev/*`,Condition:{StringEquals:{"aws:RequestTag/fjall:dev":"true"}}},{Sid:"FjallDevLogsRead",Effect:"Allow",Action:["logs:GetLogEvents","logs:DescribeLogStreams","logs:FilterLogEvents"],Resource:`arn:aws:logs:*:${e}:log-group:/fjall/dev/*`},{Sid:"FjallDevLogsDescribeGroups",Effect:"Allow",Action:["logs:DescribeLogGroups"],Resource:"*"},{Sid:"FjallDevKmsViaDevAlias",Effect:"Allow",Action:["kms:Encrypt","kms:Decrypt","kms:GenerateDataKey"],Resource:`arn:aws:kms:*:${e}:key/*`,Condition:{"ForAnyValue:StringLike":{"kms:ResourceAliases":"alias/fjall-dev-*"}}},{Sid:"FjallDevKmsSsmSecureString",Effect:"Allow",Action:["kms:Encrypt","kms:Decrypt","kms:GenerateDataKey"],Resource:`arn:aws:kms:*:${e}:key/*`,Condition:{StringLike:{"kms:ViaService":"ssm.*.amazonaws.com"}}},{Sid:"FjallDevEcrAuthToken",Effect:"Allow",Action:["ecr:GetAuthorizationToken"],Resource:"*"},{Sid:"FjallDevEcrPushPull",Effect:"Allow",Action:["ecr:PutImage","ecr:InitiateLayerUpload","ecr:UploadLayerPart","ecr:CompleteLayerUpload","ecr:BatchCheckLayerAvailability","ecr:BatchGetImage","ecr:GetDownloadUrlForLayer","ecr:DescribeImages"],Resource:`arn:aws:ecr:*:${e}:repository/*`},{Sid:"FjallDevPassDevPathRoles",Effect:"Allow",Action:["iam:PassRole"],Resource:`arn:aws:iam::${e}:role/fjall/dev/*`}]}_e(H4,"buildDevDeployPolicyStatements");function q4({accountId:e}){return[{Sid:"FjallDevProvisionerBoundedRoleWrites",Effect:"Allow",Action:["iam:CreateRole","iam:PutRolePolicy","iam:AttachRolePolicy"],Resource:`arn:aws:iam::${e}:role/fjall/dev/*`,Condition:{StringEquals:{"iam:PermissionsBoundary":o0(e)}}},{Sid:"FjallDevProvisionerPathRoleOps",Effect:"Allow",Action:["iam:DeleteRole","iam:DeleteRolePolicy","iam:DetachRolePolicy","iam:ListRolePolicies","iam:TagRole"],Resource:`arn:aws:iam::${e}:role/fjall/dev/*`},{Sid:"FjallDevProvisionerListRoles",Effect:"Allow",Action:["iam:ListRoles"],Resource:"*"},{Sid:"FjallDevProvisionerDevMasterSecrets",Effect:"Allow",Action:["secretsmanager:GetSecretValue"],Resource:`arn:aws:secretsmanager:*:${e}:secret:fjall-dev-*`},{Sid:"FjallDevProvisionerKmsDecryptViaSecretsManager",Effect:"Allow",Action:["kms:Decrypt"],Resource:`arn:aws:kms:*:${e}:key/*`,Condition:{StringLike:{"kms:ViaService":"secretsmanager.*.amazonaws.com"}}},{Sid:"FjallDevProvisionerDataApi",Effect:"Allow",Action:["rds-data:ExecuteStatement","rds-data:BatchExecuteStatement","rds-data:BeginTransaction","rds-data:CommitTransaction","rds-data:RollbackTransaction"],Resource:`arn:aws:rds:*:${e}:cluster:fjall-dev-*`},{Sid:"FjallDevProvisionerMetrics",Effect:"Allow",Action:["cloudwatch:GetMetricData"],Resource:"*"},{Sid:"FjallDevProvisionerOrphanDiscovery",Effect:"Allow",Action:["tag:GetResources"],Resource:"*"},{Sid:"FjallDevProvisionerSsmTeardown",Effect:"Allow",Action:["ssm:DeleteParameter*"],Resource:`arn:aws:ssm:*:${e}:parameter/fjall/dev/*`},{Sid:"FjallDevProvisionerLogsTeardown",Effect:"Allow",Action:["logs:DeleteLogGroup"],Resource:`arn:aws:logs:*:${e}:log-group:/fjall/dev/*`},{Sid:"FjallDevProvisionerTaggedTeardown",Effect:"Allow",Action:["ecs:UpdateService","ecs:StopTask","ecs:DeleteService","elasticloadbalancing:DeleteRule","elasticloadbalancing:DeleteTargetGroup","elasticloadbalancing:DeregisterTargets"],Resource:[`arn:aws:ecs:*:${e}:*`,`arn:aws:elasticloadbalancing:*:${e}:*`],Condition:{StringEquals:{"aws:ResourceTag/fjall:dev":"true"}}},{Sid:"FjallDevProvisionerTeardownReads",Effect:"Allow",Action:["ecs:Describe*","elasticloadbalancing:Describe*"],Resource:"*"},{Sid:"FjallDevProvisionerImageJanitor",Effect:"Allow",Action:["ecr:ListImages","ecr:DescribeImages","ecr:BatchDeleteImage"],Resource:`arn:aws:ecr:*:${e}:repository/*`},{Sid:"FjallDevProvisionerSsmReadAll",Effect:"Allow",Action:["ssm:GetParameter*"],Resource:`arn:aws:ssm:*:${e}:parameter/*`},{Sid:"FjallDevProvisionerKmsDecryptViaSsm",Effect:"Allow",Action:["kms:Decrypt"],Resource:`arn:aws:kms:*:${e}:key/*`,Condition:{StringLike:{"kms:ViaService":"ssm.*.amazonaws.com"}}}]}_e(q4,"buildDevProvisionerPolicyStatements");function K4({accountId:e}){return[{Sid:"FjallDevSyncPrefixReadWrite",Effect:"Allow",Action:["s3:GetObject","s3:PutObject"],Resource:`arn:aws:s3:::fjall-dev-sync-${e}-*/*`,Condition:{StringEquals:{"aws:ResourceAccount":e}}}]}_e(K4,"buildDevSyncWriterPolicyStatements");function Y4({accountId:e}){return[{Sid:"FjallDevBoundarySsmDevRead",Effect:"Allow",Action:["ssm:GetParameter*"],Resource:`arn:aws:ssm:*:${e}:parameter/fjall/dev/*`},{Sid:"FjallDevBoundaryKmsDecryptDevAlias",Effect:"Allow",Action:["kms:Decrypt"],Resource:`arn:aws:kms:*:${e}:key/*`,Condition:{"ForAnyValue:StringLike":{"kms:ResourceAliases":"alias/fjall-dev-*"}}},{Sid:"FjallDevBoundarySyncPrefixReadWrite",Effect:"Allow",Action:["s3:GetObject","s3:PutObject"],Resource:`arn:aws:s3:::fjall-dev-sync-${e}-*/*`,Condition:{StringEquals:{"aws:ResourceAccount":e}}},{Sid:"FjallDevBoundarySlotLogs",Effect:"Allow",Action:["logs:CreateLogStream","logs:PutLogEvents"],Resource:`arn:aws:logs:*:${e}:log-group:/fjall/dev/*`},{Sid:"FjallDevBoundarySyncQueue",Effect:"Allow",Action:["sqs:ReceiveMessage","sqs:DeleteMessage","sqs:GetQueueUrl"],Resource:`arn:aws:sqs:*:${e}:fjall-dev-sync-${e}-*`}]}_e(Y4,"buildDevBoundaryStatements");var X4=Object.defineProperty,Ye=(e,t)=>X4(e,"name",{value:t,configurable:!0});function R(e){return JSON.stringify(e)}Ye(R,"escapeStringLiteral");function bn(e){return e.map(R).join(", ")}Ye(bn,"formatStringArray");var J4="import:SharedAlarmTopicArn";function yn(e=" "){return`
195
+ ${e}...(getConfig().environment === "production" ? { alertsTopic: ${R(J4)} } : {}),`}Ye(yn,"emitProductionAlertsTopicSpread");function Sn(e){return e===0?"":`_${String(e+1)}`}Ye(Sn,"connectionEnvSuffix");function Q4(e,t){if(e===t)return 1;if(!e.startsWith(`${t}_`))return;let n=e.slice(t.length+1);return/^\d+$/.test(n)?parseInt(n,10):void 0}Ye(Q4,"connectionKeyOrdinal");function Ib(e){if(typeof e!="object"||e===null)return!1;let t=e;return typeof t.__identifier=="string"||typeof t.__expression=="string"||typeof t.__call=="string"}Ye(Ib,"isSpecialValue");function ar(e){return e.replace(/[^a-zA-Z0-9]/g," ").split(" ").map((t,n)=>n===0?t.charAt(0).toLowerCase()+t.slice(1):t.charAt(0).toUpperCase()+t.slice(1)).join("")}Ye(ar,"toVariableName");function ae(e){return e.variableName??ar(e.name)}Ye(ae,"getVariableName");function Ca(e,t){for(let n of e.database)if(n.name===t&&n.variableName)return n.variableName;for(let n of e.s3)if(n.name===t&&n.variableName)return n.variableName;for(let n of e.compute)if(n.name===t&&n.variableName)return n.variableName;for(let n of e.dynamodb??[])if(n.name===t&&n.variableName)return n.variableName;for(let n of e.sqs??[])if(n.name===t&&n.variableName)return n.variableName;return ar(t)}Ye(Ca,"resolveResourceVariable");function u0(e){let t=Object.entries(e);return t.length===0?!0:t.length>1?!1:t.every(([,n])=>typeof n=="string"||typeof n=="number"||typeof n=="boolean"||n===null)}Ye(u0,"isSimpleObject");function Z(e,t=" "){if(e==null)return"undefined";if(typeof e=="string")return JSON.stringify(e);if(typeof e=="number"||typeof e=="boolean")return String(e);if(Ib(e)){if("__identifier"in e)return e.__identifier;if("__expression"in e)return e.__expression;if("__call"in e)return e.__call}if(Array.isArray(e))return`[${e.map(n=>Z(n,t)).join(", ")}]`;if(typeof e=="object"){let n=Object.entries(e).filter(([,o])=>o!==void 0);if(u0(e)){let o=n.map(([a,c])=>`${a}: ${Z(c,t)}`).join(", ");return o?`{ ${o} }`:"{}"}let i=t+" ",r=n.map(([o,a])=>`${i}${o}: ${Z(a,i)}`).join(`,
196
196
  `);return r?`{
197
197
  ${r}
198
- ${t}}`:"{}"}return JSON.stringify(e)}pt(Z,"formatValue");function bb(e,t=" "){return e.map(n=>{let i=n.value.kind==="expression"?n.value.source:Z(n.value.value,t);return`
199
- ${t}${n.key}: ${i}`}).join(",")}pt(bb,"emitProjectedProps");function O(e,t,n,i="raw"){if(!e)return"";let r;switch(i){case"string":r=R(String(n));break;case"object":r=Z(n);break;case"boolean-or-object":r=n===!1?"false":Z(n);break;default:r=String(n)}return`
200
- ${t}: ${r},`}pt(O,"buildProperty");function he(e,t=" "){return e?.length?e.map(n=>`
201
- ${t}${n.key}: ${n.sourceText},`).join(""):""}pt(he,"emitExtraProperties");var R4=Object.defineProperty,Ue=(e,t)=>R4(e,"name",{value:t,configurable:!0}),me=Object.freeze({HOST:"DATABASE_HOST",PORT:"DATABASE_PORT",NAME:"DATABASE_NAME",SSL:"DATABASE_SSL",USERNAME:"DATABASE_USERNAME",PASSWORD:"DATABASE_PASSWORD"}),Aa=Object.freeze({USERNAME:"username",PASSWORD:"password"});function vn(e,t){let n=t.connectedDatabase;return n?.length?e.database.filter(i=>n.includes(i.name)):[]}Ue(vn,"getConnectedDatabases");function Ia(e,t){return`${e}.getCredentials().getImport(${R(t)})`}Ue(Ia,"getCredentialExpression");function $a(e){let t=[],n=Ue((i,r,o)=>{t.push({key:i,expression:r,isSecret:o})},"addEntry");if(e.length===1){let i=ae(e[0]);n(me.HOST,`${i}.getHostEndpoint()`,!1),n(me.PORT,`${i}.getHostPort()`,!1),n(me.NAME,`${i}.getDatabaseName()`,!1),n(me.SSL,'"true"',!1),n(me.USERNAME,Ia(i,Aa.USERNAME),!0),n(me.PASSWORD,Ia(i,Aa.PASSWORD),!0)}else for(let[i,r]of e.entries()){let o=ae(r),a=i===0?"":`_${i+1}`;n(`${me.HOST}${a}`,`${o}.getHostEndpoint()`,!1),n(`${me.PORT}${a}`,`${o}.getHostPort()`,!1),n(`${me.NAME}${a}`,`${o}.getDatabaseName()`,!1),n(`${me.SSL}${a}`,'"true"',!1),n(`${me.USERNAME}${a}`,Ia(o,Aa.USERNAME),!0),n(`${me.PASSWORD}${a}`,Ia(o,Aa.PASSWORD),!0)}return t}Ue($a,"generateDatabaseEnvVarEntries");function HT(e){return`connections: [${e.map(t=>ae(t)).join(", ")}],`}Ue(HT,"formatConnectionsCode");function al(e){return e.expression==='"true"'?"true":{__expression:e.expression}}Ue(al,"toDatabaseEnvVarValue");function sl(e,t){let n={},i={};if(!t.needsConnection||!t.connectedDatabase?.length)return{env:n,secrets:i};let r=vn(e,t),o=$a(r);for(let a of o){let c=al(a);a.isSecret?i[a.key]={__expression:a.expression}:n[a.key]=c}return{env:n,secrets:i}}Ue(sl,"buildDatabaseEnvVars");function qT(e){let t="";return t+=O(e.port!==void 0,"port",e.port),t+=O(e.deletionProtection!==void 0,"deletionProtection",e.deletionProtection),t+=O(e.snapshotIdentifier!==void 0,"snapshotIdentifier",e.snapshotIdentifier,"string"),t+=O(e.snapshotUsername!==void 0,"snapshotUsername",e.snapshotUsername,"string"),t+=O(e.monitoringInterval!==void 0,"monitoringInterval",e.monitoringInterval),t}Ue(qT,"generateDatabaseSharedProps");function KT(e){if(e.type!=="Instance")return"";let t="";return t+=O(e.instanceType!==void 0,"instanceType",e.instanceType,"string"),t+=O(e.allocatedStorage!==void 0,"allocatedStorage",e.allocatedStorage),t+=O(e.multiAz!==void 0,"multiAz",e.multiAz),t+=O(e.publiclyAccessible!==void 0,"publiclyAccessible",e.publiclyAccessible),t+=O(e.encryption!==void 0,"encryption",e.encryption,"object"),t+=O(e.databaseInsights!==void 0,"databaseInsights",e.databaseInsights,"boolean-or-object"),t+=O(e.proxy!==void 0,"proxy",e.proxy,"boolean-or-object"),t+=O(e.readReplica!==void 0,"readReplica",e.readReplica,"boolean-or-object"),t+=O(e.credentials!==void 0,"credentials",e.credentials,"object"),t+=O(e.backupRetention!==void 0,"backupRetention",e.backupRetention),t}Ue(KT,"generateDatabaseInstanceProps");function YT(e){if(e.type!=="Aurora"&&e.type!=="GlobalAurora")return"";let t="";return t+=O(e.encryption!==void 0,"encryption",e.encryption,"object"),t+=O(e.databaseInsights!==void 0,"databaseInsights",e.databaseInsights,"boolean-or-object"),t+=O(e.proxy!==void 0,"proxy",e.proxy,"boolean-or-object"),t+=O(e.credentials!==void 0,"credentials",e.credentials,"object"),t+=O(e.writer!==void 0,"writer",e.writer,"object"),t+=O(e.readers!==void 0,"readers",e.readers,"boolean-or-object"),t+=O(e.backupRetention!==void 0,"backupRetention",e.backupRetention),t+=O(e.preferredMaintenanceWindow!==void 0,"preferredMaintenanceWindow",e.preferredMaintenanceWindow,"string"),t}Ue(YT,"generateDatabaseAuroraProps");function XT(e){if(e.type!=="GlobalAurora")return"";let t="";return t+=O(e.primaryRegion!==void 0,"primaryRegion",e.primaryRegion,"string"),e.secondaryRegions!==void 0&&e.secondaryRegions.length>0&&(t+=`
202
- secondaryRegions: [${gn(e.secondaryRegions)}],`),t+=O(e.globalClusterIdentifier!==void 0,"globalClusterIdentifier",e.globalClusterIdentifier,"string"),t+=O(e.enableGlobalWriteForwarding!==void 0,"enableGlobalWriteForwarding",e.enableGlobalWriteForwarding),t}Ue(XT,"generateDatabaseGlobalAuroraProps");function yb(e,t){return t.compute.some(n=>n.needsConnection&&n.connectedDatabase?.includes(e.name))}Ue(yb,"databaseNeedsVariable");function cl(e){if(e.database.length===0)return"";let t="";for(let n=0;n<e.database.length;n++){let i=e.database[n],r=ae(i),o=yb(i,e),a=n>0,c=o?`const ${r} = `:"";t+=`${a?`
198
+ ${t}}`:"{}"}return JSON.stringify(e)}Ye(Z,"formatValue");function $b(e,t=" "){return e.map(n=>{let i=n.value.kind==="expression"?n.value.source:Z(n.value.value,t);return`
199
+ ${t}${n.key}: ${i}`}).join(",")}Ye($b,"emitProjectedProps");function O(e,t,n,i="raw"){if(!e)return"";let r;switch(i){case"string":r=R(String(n));break;case"object":r=Z(n);break;case"boolean-or-object":r=n===!1?"false":Z(n);break;default:r=String(n)}return`
200
+ ${t}: ${r},`}Ye(O,"buildProperty");function he(e,t=" "){return e?.length?e.map(n=>`
201
+ ${t}${n.key}: ${n.sourceText},`).join(""):""}Ye(he,"emitExtraProperties");var e2=Object.defineProperty,Fe=(e,t)=>e2(e,"name",{value:t,configurable:!0}),me=Object.freeze({HOST:"DATABASE_HOST",PORT:"DATABASE_PORT",NAME:"DATABASE_NAME",SSL:"DATABASE_SSL",USERNAME:"DATABASE_USERNAME",PASSWORD:"DATABASE_PASSWORD"}),Na=Object.freeze({USERNAME:"username",PASSWORD:"password"}),ml="true",Dr=Object.freeze({HOST:"getHostEndpoint",PORT:"getHostPort",NAME:"getDatabaseName",CREDENTIALS:"getCredentials",IMPORT:"getImport"});function _n(e,t){let n=t.connectedDatabase;return n?.length?e.database.filter(i=>n.includes(i.name)):[]}Fe(_n,"getConnectedDatabases");function Pa(e,t){return`${e}.${Dr.CREDENTIALS}().${Dr.IMPORT}(${R(t)})`}Fe(Pa,"getCredentialExpression");function wa(e){let t=[],n=Fe((i,r,o)=>{t.push({key:i,expression:r,isSecret:o})},"addEntry");if(e.length===1){let i=ae(e[0]);n(me.HOST,`${i}.${Dr.HOST}()`,!1),n(me.PORT,`${i}.${Dr.PORT}()`,!1),n(me.NAME,`${i}.${Dr.NAME}()`,!1),n(me.SSL,R(ml),!1),n(me.USERNAME,Pa(i,Na.USERNAME),!0),n(me.PASSWORD,Pa(i,Na.PASSWORD),!0)}else for(let[i,r]of e.entries()){let o=ae(r),a=Sn(i);n(`${me.HOST}${a}`,`${o}.${Dr.HOST}()`,!1),n(`${me.PORT}${a}`,`${o}.${Dr.PORT}()`,!1),n(`${me.NAME}${a}`,`${o}.${Dr.NAME}()`,!1),n(`${me.SSL}${a}`,R(ml),!1),n(`${me.USERNAME}${a}`,Pa(o,Na.USERNAME),!0),n(`${me.PASSWORD}${a}`,Pa(o,Na.PASSWORD),!0)}return t}Fe(wa,"generateDatabaseEnvVarEntries");function l0(e){return`connections: [${e.map(t=>ae(t)).join(", ")}],`}Fe(l0,"formatConnectionsCode");function pl(e){return e.expression===R(ml)?ml:{__expression:e.expression}}Fe(pl,"toDatabaseEnvVarValue");function fl(e,t){let n={},i={};if(!t.needsConnection||!t.connectedDatabase?.length)return{env:n,secrets:i};let r=_n(e,t),o=wa(r);for(let a of o){let c=pl(a);a.isSecret?i[a.key]={__expression:a.expression}:n[a.key]=c}return{env:n,secrets:i}}Fe(fl,"buildDatabaseEnvVars");function d0(e){let t="";return t+=O(e.port!==void 0,"port",e.port),t+=O(e.deletionProtection!==void 0,"deletionProtection",e.deletionProtection),t+=O(e.snapshotIdentifier!==void 0,"snapshotIdentifier",e.snapshotIdentifier,"string"),t+=O(e.snapshotUsername!==void 0,"snapshotUsername",e.snapshotUsername,"string"),t+=O(e.monitoringInterval!==void 0,"monitoringInterval",e.monitoringInterval),t}Fe(d0,"generateDatabaseSharedProps");function m0(e){if(e.type!=="Instance")return"";let t="";return t+=O(e.instanceType!==void 0,"instanceType",e.instanceType,"string"),t+=O(e.allocatedStorage!==void 0,"allocatedStorage",e.allocatedStorage),t+=O(e.multiAz!==void 0,"multiAz",e.multiAz),t+=O(e.publiclyAccessible!==void 0,"publiclyAccessible",e.publiclyAccessible),t+=O(e.encryption!==void 0,"encryption",e.encryption,"object"),t+=O(e.databaseInsights!==void 0,"databaseInsights",e.databaseInsights,"boolean-or-object"),t+=O(e.proxy!==void 0,"proxy",e.proxy,"boolean-or-object"),t+=O(e.readReplica!==void 0,"readReplica",e.readReplica,"boolean-or-object"),t+=O(e.credentials!==void 0,"credentials",e.credentials,"object"),t+=O(e.backupRetention!==void 0,"backupRetention",e.backupRetention),t}Fe(m0,"generateDatabaseInstanceProps");function p0(e){if(e.type!=="Aurora"&&e.type!=="GlobalAurora")return"";let t="";return t+=O(e.encryption!==void 0,"encryption",e.encryption,"object"),t+=O(e.databaseInsights!==void 0,"databaseInsights",e.databaseInsights,"boolean-or-object"),t+=O(e.proxy!==void 0,"proxy",e.proxy,"boolean-or-object"),t+=O(e.credentials!==void 0,"credentials",e.credentials,"object"),t+=O(e.writer!==void 0,"writer",e.writer,"object"),t+=O(e.readers!==void 0,"readers",e.readers,"boolean-or-object"),t+=O(e.backupRetention!==void 0,"backupRetention",e.backupRetention),t+=O(e.preferredMaintenanceWindow!==void 0,"preferredMaintenanceWindow",e.preferredMaintenanceWindow,"string"),t}Fe(p0,"generateDatabaseAuroraProps");function f0(e){if(e.type!=="GlobalAurora")return"";let t="";return t+=O(e.primaryRegion!==void 0,"primaryRegion",e.primaryRegion,"string"),e.secondaryRegions!==void 0&&e.secondaryRegions.length>0&&(t+=`
202
+ secondaryRegions: [${bn(e.secondaryRegions)}],`),t+=O(e.globalClusterIdentifier!==void 0,"globalClusterIdentifier",e.globalClusterIdentifier,"string"),t+=O(e.enableGlobalWriteForwarding!==void 0,"enableGlobalWriteForwarding",e.enableGlobalWriteForwarding),t}Fe(f0,"generateDatabaseGlobalAuroraProps");function Tb(e,t){return t.compute.some(n=>n.needsConnection&&n.connectedDatabase?.includes(e.name))}Fe(Tb,"databaseNeedsVariable");function gl(e){if(e.database.length===0)return"";let t="";for(let n=0;n<e.database.length;n++){let i=e.database[n],r=ae(i),o=Tb(i,e),a=n>0,c=o?`const ${r} = `:"";t+=`${a?`
203
203
  `:""}${c}app.addDatabase(
204
204
  DatabaseFactory.build(${R(i.name)}, {
205
205
  vpc: app.getVpc(),
206
206
  type: ${R(i.type)},
207
207
  databaseName: ${R(i.databaseName)},`,i.engineExpression?t+=`
208
208
  engine: ${i.engineExpression},`:i.databaseEngine&&(t+=`
209
- databaseEngine: ${R(i.databaseEngine)},`),t+=qT(i),t+=KT(i),t+=YT(i),t+=XT(i),t+=he(i.extraProperties),i.alarms===!1?t+=`
209
+ databaseEngine: ${R(i.databaseEngine)},`),t+=d0(i),t+=m0(i),t+=p0(i),t+=f0(i),t+=he(i.extraProperties),i.alarms===!1?t+=`
210
210
  alarms: false,`:typeof i.alarms=="object"&&(t+=`
211
- alarms: ${Z(i.alarms," ")},`),i.type!=="GlobalAurora"&&(t+=hn()),t+=`
211
+ alarms: ${Z(i.alarms," ")},`),i.type!=="GlobalAurora"&&(t+=yn()),t+=`
212
212
  })
213
213
  );
214
- `}return t}Ue(cl,"generateDatabaseCode");function ul(e){if(!e.clickhouse||e.clickhouse.length===0)return"";let t="";for(let n=0;n<e.clickhouse.length;n++){let i=e.clickhouse[n],r=ae(i),o=JT(i,e),a=n>0?`
214
+ `}return t}Fe(gl,"generateDatabaseCode");function hl(e){if(!e.clickhouse||e.clickhouse.length===0)return"";let t="";for(let n=0;n<e.clickhouse.length;n++){let i=e.clickhouse[n],r=ae(i),o=g0(i,e),a=n>0?`
215
215
  `:"",c=o?`const ${r} = `:"";t+=`${a}${c}app.addDatabase(
216
216
  DatabaseFactory.build(${R(i.name)}, {
217
217
  type: "ClickHouse",
@@ -223,94 +223,94 @@ ${t}${n.key}: ${n.sourceText},`).join(""):""}pt(he,"emitExtraProperties");var R4
223
223
  backupRetentionDays: ${i.backupRetentionDays},`),t+=he(i.extraProperties),t+=`
224
224
  })
225
225
  );
226
- `}return t}Ue(ul,"generateClickHouseCode");function JT(e,t){return t.compute.some(n=>n.connectedDatabase?.includes(e.name))}Ue(JT,"clickhouseNeedsVariable");var P4=Object.defineProperty,ll=(e,t)=>P4(e,"name",{value:t,configurable:!0}),Ta=Object.freeze({NAME:"BUCKET_NAME"});function bn(e,t){let{connectedStorage:n}=t;return n?.length?e.s3.filter(i=>n.includes(i.name)):[]}ll(bn,"getConnectedStorage");function Ca(e){let t=[];if(e.length===1){let n=e[0];if(!n)return t;let i=ae(n);t.push({key:Ta.NAME,expression:`${i}.getBucketName()`})}else for(let[n,i]of e.entries()){let r=ae(i),o=n===0?"":`_${n+1}`;t.push({key:`${Ta.NAME}${o}`,expression:`${r}.getBucketName()`})}return t}ll(Ca,"generateStorageEnvVarEntries");function dl(e,t){let n={},i={};if(!t.connectedStorage?.length)return{env:n,secrets:i};let r=bn(e,t),o=Ca(r);for(let a of o)n[a.key]={__expression:a.expression};return{env:n,secrets:i}}ll(dl,"buildStorageEnvVars");function Di(e,t,n=[]){let i=e.map(a=>ae(a)),r=t.map(a=>ae(a)),o=n.map(a=>ae(a));return`connections: [${[...i,...r,...o].join(", ")}],`}ll(Di,"formatAllConnectionsCode");var N4=Object.defineProperty,Sb=(e,t)=>N4(e,"name",{value:t,configurable:!0}),kr=Object.freeze({URL:"QUEUE_URL",ARN:"QUEUE_ARN"});function yn(e,t){let{connectedMessaging:n}=t;return n?.length?(e.sqs??[]).filter(i=>n.includes(i.name)):[]}Sb(yn,"getConnectedMessaging");function Ra(e){let t=[];if(e.length===1){let n=e[0];if(!n)return t;let i=ae(n);t.push({key:kr.URL,expression:`${i}.getQueueUrl()`}),t.push({key:kr.ARN,expression:`${i}.getQueueArn()`})}else for(let[n,i]of e.entries()){let r=ae(i),o=n===0?"":`_${n+1}`;t.push({key:`${kr.URL}${o}`,expression:`${r}.getQueueUrl()`}),t.push({key:`${kr.ARN}${o}`,expression:`${r}.getQueueArn()`})}return t}Sb(Ra,"generateMessagingEnvVarEntries");function ml(e,t){let n={},i={};if(!t.connectedMessaging?.length)return{env:n,secrets:i};let r=yn(e,t),o=Ra(r);for(let a of o)n[a.key]={__expression:a.expression};return{env:n,secrets:i}}Sb(ml,"buildMessagingEnvVars");var w4=Object.defineProperty,Mi=(e,t)=>w4(e,"name",{value:t,configurable:!0});function Sn(e){return!!(e.needsConnection&&e.connectedDatabase?.length)}Mi(Sn,"computeHasDatabaseConnections");function _n(e){return!!e.connectedStorage?.length}Mi(_n,"computeHasStorageConnections");function En(e){return!!e.connectedMessaging?.length}Mi(En,"computeHasMessagingConnections");function Pa(e){return Sn(e)||_n(e)||En(e)}Mi(Pa,"computeHasConnections");var Na={ENVIRONMENT:{__expression:"getConfig().environment"}};function ji(e,t){return Object.entries(e).map(([n,i])=>`${t}${n}: ${Z(i)},`).join(`
227
- `)}Mi(ji,"formatEnvBlock");function zi(e,t,n){return e.length<=1?`{ ${e[0]??""} }`:`{${e.map(i=>`
226
+ `}return t}Fe(hl,"generateClickHouseCode");function g0(e,t){return t.compute.some(n=>n.connectedDatabase?.includes(e.name))}Fe(g0,"clickhouseNeedsVariable");var t2=Object.defineProperty,vl=(e,t)=>t2(e,"name",{value:t,configurable:!0}),ka=Object.freeze({NAME:"BUCKET_NAME"}),h0=Object.freeze({BUCKET_NAME:"getBucketName"});function En(e,t){let{connectedStorage:n}=t;return n?.length?e.s3.filter(i=>n.includes(i.name)):[]}vl(En,"getConnectedStorage");function Oa(e){let t=[];if(e.length===1){let n=e[0];if(!n)return t;let i=ae(n);t.push({key:ka.NAME,expression:`${i}.${h0.BUCKET_NAME}()`})}else for(let[n,i]of e.entries()){let r=ae(i),o=Sn(n);t.push({key:`${ka.NAME}${o}`,expression:`${r}.${h0.BUCKET_NAME}()`})}return t}vl(Oa,"generateStorageEnvVarEntries");function bl(e,t){let n={},i={};if(!t.connectedStorage?.length)return{env:n,secrets:i};let r=En(e,t),o=Oa(r);for(let a of o)n[a.key]={__expression:a.expression};return{env:n,secrets:i}}vl(bl,"buildStorageEnvVars");function Vi(e,t,n=[]){let i=e.map(a=>ae(a)),r=t.map(a=>ae(a)),o=n.map(a=>ae(a));return`connections: [${[...i,...r,...o].join(", ")}],`}vl(Vi,"formatAllConnectionsCode");var r2=Object.defineProperty,Rb=(e,t)=>r2(e,"name",{value:t,configurable:!0}),Mr=Object.freeze({URL:"QUEUE_URL",ARN:"QUEUE_ARN"});function xn(e,t){let{connectedMessaging:n}=t;return n?.length?(e.sqs??[]).filter(i=>n.includes(i.name)):[]}Rb(xn,"getConnectedMessaging");function Da(e){let t=[];if(e.length===1){let n=e[0];if(!n)return t;let i=ae(n);t.push({key:Mr.URL,expression:`${i}.getQueueUrl()`}),t.push({key:Mr.ARN,expression:`${i}.getQueueArn()`})}else for(let[n,i]of e.entries()){let r=ae(i),o=Sn(n);t.push({key:`${Mr.URL}${o}`,expression:`${r}.getQueueUrl()`}),t.push({key:`${Mr.ARN}${o}`,expression:`${r}.getQueueArn()`})}return t}Rb(Da,"generateMessagingEnvVarEntries");function yl(e,t){let n={},i={};if(!t.connectedMessaging?.length)return{env:n,secrets:i};let r=xn(e,t),o=Da(r);for(let a of o)n[a.key]={__expression:a.expression};return{env:n,secrets:i}}Rb(yl,"buildMessagingEnvVars");var n2=Object.defineProperty,Gi=(e,t)=>n2(e,"name",{value:t,configurable:!0});function An(e){return!!(e.needsConnection&&e.connectedDatabase?.length)}Gi(An,"computeHasDatabaseConnections");function In(e){return!!e.connectedStorage?.length}Gi(In,"computeHasStorageConnections");function $n(e){return!!e.connectedMessaging?.length}Gi($n,"computeHasMessagingConnections");function Ma(e){return An(e)||In(e)||$n(e)}Gi(Ma,"computeHasConnections");var ja={ENVIRONMENT:{__expression:"getConfig().environment"}};function Zi(e,t){return Object.entries(e).map(([n,i])=>`${t}${n}: ${Z(i)},`).join(`
227
+ `)}Gi(Zi,"formatEnvBlock");function Wi(e,t,n){return e.length<=1?`{ ${e[0]??""} }`:`{${e.map(i=>`
228
228
  ${n}${i},`).join("")}
229
- ${t}}`}Mi(zi,"formatCompactOrExpandedObject");var k4=Object.defineProperty,QT=(e,t)=>k4(e,"name",{value:t,configurable:!0});function wa(e){let t="";if(e.deployment===pa.CODE&&e.codePath?(t+=`
230
- deployment: "${pa.CODE}",
229
+ ${t}}`}Gi(Wi,"formatCompactOrExpandedObject");var i2=Object.defineProperty,v0=(e,t)=>i2(e,"name",{value:t,configurable:!0});function za(e){let t="";if(e.deployment===ya.CODE&&e.codePath?(t+=`
230
+ deployment: "${ya.CODE}",
231
231
  code: Code.fromAsset(${R(e.codePath)}),`,e.handler&&(t+=`
232
232
  handler: ${R(e.handler)},`),e.runtime&&(t+=`
233
233
  runtime: Runtime.${e.runtime},`)):t+=`
234
- deployment: "${pa.CONTAINER}",
234
+ deployment: "${ya.CONTAINER}",
235
235
  ecrRepository: app.getDefaultContainerRegistry(),`,e.timeout!==void 0&&(t+=`
236
236
  timeout: ${e.timeout},`),e.memory!==void 0&&(t+=`
237
237
  memorySize: ${e.memory},`),e.functionUrl&&(t+=`
238
238
  functionUrl: { authType: FunctionUrlAuthType.${e.functionUrl.authType} },`),e.description&&(t+=`
239
- lambdaDescription: ${R(e.description)},`),e.architecture||e.deployment===pa.CONTAINER){let n=e.architecture??C$;t+=`
239
+ lambdaDescription: ${R(e.description)},`),e.architecture||e.deployment===ya.CONTAINER){let n=e.architecture??Z$;t+=`
240
240
  architecture: Architecture.${n},`}if(e.ephemeralStorageSize!==void 0&&(t+=`
241
241
  ephemeralStorageSize: ${e.ephemeralStorageSize},`),e.functionName&&(t+=`
242
242
  functionName: ${R(e.functionName)},`),e.ssmSecretsPath&&(t+=`
243
243
  ssmSecretsPath: ${R(e.ssmSecretsPath)},`),e.ssmSecrets&&e.ssmSecrets.length>0&&(t+=`
244
- secrets: [${gn(e.ssmSecrets)}],`),!Pa(e)){let n={...Na,...e.environment};t+=`
244
+ secrets: [${bn(e.ssmSecrets)}],`),!Ma(e)){let n={...ja,...e.environment};t+=`
245
245
  environment: {
246
- ${ji(n," ")}
247
- },`}return t+=he(e.extraProperties),t}QT(wa,"generateLambdaCode");function ka(e,t){let n=Sn(e),i=_n(e),r=En(e);if(!n&&!i&&!r)return"";let o=n?vn(t,e):[],a=i?bn(t,e):[],c=r?yn(t,e):[];if(o.length===0&&a.length===0&&c.length===0)return"";let u={...Na},l={};if(o.length>0){let p=$a(o);for(let g of p){let v=al(g);g.isSecret?l[g.key]={__expression:g.expression}:u[g.key]=v}}if(a.length>0){let p=Ca(a);for(let g of p)u[g.key]={__expression:g.expression}}if(c.length>0){let p=Ra(c);for(let g of p)u[g.key]={__expression:g.expression}}if(e.environment)for(let[p,g]of Object.entries(e.environment))u[p]=g;let m="";if(Object.keys(l).length>0){m+=`
246
+ ${Zi(n," ")}
247
+ },`}return t+=he(e.extraProperties),t}v0(za,"generateLambdaCode");function La(e,t){let n=An(e),i=In(e),r=$n(e);if(!n&&!i&&!r)return"";let o=n?_n(t,e):[],a=i?En(t,e):[],c=r?xn(t,e):[];if(o.length===0&&a.length===0&&c.length===0)return"";let u={...ja},l={};if(o.length>0){let p=wa(o);for(let g of p){let v=pl(g);g.isSecret?l[g.key]={__expression:g.expression}:u[g.key]=v}}if(a.length>0){let p=Oa(a);for(let g of p)u[g.key]={__expression:g.expression}}if(c.length>0){let p=Da(c);for(let g of p)u[g.key]={__expression:g.expression}}if(e.environment)for(let[p,g]of Object.entries(e.environment))u[p]=g;let m="";if(Object.keys(l).length>0){m+=`
248
248
  containerSecretsImport: {`;for(let[p,g]of Object.entries(l))m+=`
249
249
  ${p}: ${Z(g)},`;m+=`
250
250
  },`}if(Object.keys(u).length>0){m+=`
251
251
  environment: {`;for(let[p,g]of Object.entries(u))m+=`
252
252
  ${p}: ${Z(g)},`;m+=`
253
253
  },`}return m+=`
254
- ${Di(o,a,c)}`,m}QT(ka,"generateLambdaConnectionsCode");var O4=Object.defineProperty,D4=(e,t)=>O4(e,"name",{value:t,configurable:!0});function Oa(e){let t="";return e.instanceType&&(t+=`
254
+ ${Vi(o,a,c)}`,m}v0(La,"generateLambdaConnectionsCode");var o2=Object.defineProperty,a2=(e,t)=>o2(e,"name",{value:t,configurable:!0});function Ua(e){let t="";return e.instanceType&&(t+=`
255
255
  instanceType: ${R(e.instanceType)},`),e.enableSSH!==void 0&&(t+=e.enableSSH?`
256
256
  ssh: {},`:`
257
- ssh: false,`),t+=he(e.extraProperties),t}D4(Oa,"generateEc2Code");var M4=Object.defineProperty,Ut=(e,t)=>M4(e,"name",{value:t,configurable:!0});function e0(e){let t=[];if(e.instanceType!==void 0&&t.push(`instanceType: ${R(e.instanceType)}`),e.amiHardwareType!==void 0&&t.push(`amiHardwareType: ${R(e.amiHardwareType)}`),e.minCapacity!==void 0&&t.push(`minCapacity: ${e.minCapacity}`),e.maxCapacity!==void 0&&t.push(`maxCapacity: ${e.maxCapacity}`),e.memoryLimitMiB!==void 0&&t.push(`memoryLimitMiB: ${e.memoryLimitMiB}`),e.warmPool!==void 0&&t.push(`warmPool: ${Z(e.warmPool," ")}`),e.extraProperties?.length)for(let n of e.extraProperties)t.push(`${n.key}: ${n.sourceText}`);return`
258
- ec2Config: ${zi(t," "," ")},`}Ut(e0,"generateEcsServiceEc2ConfigCode");function t0(e){if(!e.cluster)return"";let t=[];if(e.cluster.directAccess&&t.push("directAccess: true"),e.cluster.domain&&t.push(`domain: ${R(e.cluster.domain)}`),e.cluster.loadBalancer!==void 0&&t.push(e.cluster.loadBalancer===!1?"loadBalancer: false":`loadBalancer: ${R(e.cluster.loadBalancer)}`),e.cluster.extraProperties?.length)for(let n of e.cluster.extraProperties)t.push(`${n.key}: ${n.sourceText}`);return`
259
- cluster: ${zi(t," "," ")},`}Ut(t0,"generateEcsClusterCode");function r0(e,t,n,i,r,o){let a="";e.name&&(a+=`
257
+ ssh: false,`),t+=he(e.extraProperties),t}a2(Ua,"generateEc2Code");var s2=Object.defineProperty,Ut=(e,t)=>s2(e,"name",{value:t,configurable:!0});function b0(e){let t=[];if(e.instanceType!==void 0&&t.push(`instanceType: ${R(e.instanceType)}`),e.amiHardwareType!==void 0&&t.push(`amiHardwareType: ${R(e.amiHardwareType)}`),e.minCapacity!==void 0&&t.push(`minCapacity: ${e.minCapacity}`),e.maxCapacity!==void 0&&t.push(`maxCapacity: ${e.maxCapacity}`),e.memoryLimitMiB!==void 0&&t.push(`memoryLimitMiB: ${e.memoryLimitMiB}`),e.warmPool!==void 0&&t.push(`warmPool: ${Z(e.warmPool," ")}`),e.extraProperties?.length)for(let n of e.extraProperties)t.push(`${n.key}: ${n.sourceText}`);return`
258
+ ec2Config: ${Wi(t," "," ")},`}Ut(b0,"generateEcsServiceEc2ConfigCode");function y0(e){if(!e.cluster)return"";let t=[];if(e.cluster.directAccess&&t.push("directAccess: true"),e.cluster.domain&&t.push(`domain: ${R(e.cluster.domain)}`),e.cluster.loadBalancer!==void 0&&t.push(e.cluster.loadBalancer===!1?"loadBalancer: false":`loadBalancer: ${R(e.cluster.loadBalancer)}`),e.cluster.extraProperties?.length)for(let n of e.cluster.extraProperties)t.push(`${n.key}: ${n.sourceText}`);return`
259
+ cluster: ${Wi(t," "," ")},`}Ut(y0,"generateEcsClusterCode");function S0(e,t,n,i,r,o){let a="";e.name&&(a+=`
260
260
  name: ${R(e.name)},`),e.image&&(a+=`
261
261
  image: ${R(e.image)},`),e.port!==void 0&&(a+=`
262
262
  port: ${e.port},`),e.essential!==void 0&&(a+=`
263
263
  essential: ${e.essential},`),e.command?.length&&(a+=`
264
264
  command: ${JSON.stringify(e.command)},`),e.entryPoint?.length&&(a+=`
265
- entryPoint: ${JSON.stringify(e.entryPoint)},`);let c=[me.HOST,me.PORT,me.NAME,me.SSL,me.USERNAME,me.PASSWORD,Ta.NAME,kr.URL,kr.ARN],u=Ut(p=>{if(!p)return p;let g={};for(let[v,A]of Object.entries(p))c.some(X=>v===X||v.startsWith(`${X}_`))||(g[v]=A);return Object.keys(g).length>0?g:void 0},"stripConnectionEnv"),l=t?{...o,...n.env,...i.env,...r.env,...e.environment}:{...o,...u(e.environment)},m=t?{...n.secrets,...e.secretsImport}:u(e.secretsImport);return l&&Object.keys(l).length>0&&(a+=`
265
+ entryPoint: ${JSON.stringify(e.entryPoint)},`);let c=[me.HOST,me.PORT,me.NAME,me.SSL,me.USERNAME,me.PASSWORD,ka.NAME,Mr.URL,Mr.ARN],u=Ut(p=>{if(!p)return p;let g={};for(let[v,A]of Object.entries(p))c.some(X=>v===X||v.startsWith(`${X}_`))||(g[v]=A);return Object.keys(g).length>0?g:void 0},"stripConnectionEnv"),l=t?{...o,...n.env,...i.env,...r.env,...e.environment}:{...o,...u(e.environment)},m=t?{...n.secrets,...e.secretsImport}:u(e.secretsImport);return l&&Object.keys(l).length>0&&(a+=`
266
266
  environment: {
267
- ${ji(l," ")}
267
+ ${Zi(l," ")}
268
268
  },`),m&&Object.keys(m).length>0&&(a+=`
269
269
  secretsImport: {
270
- ${ji(m," ")}
270
+ ${Zi(m," ")}
271
271
  },`),e.ssmSecrets&&e.ssmSecrets.length>0&&(a+=`
272
- secrets: [${gn(e.ssmSecrets)}],`),e.healthCheck&&(a+=`
273
- healthCheck: ${Z(e.healthCheck," ")},`),a+=he(e.extraProperties," "),a}Ut(r0,"generateEcsContainerCode");function _b(e,t){let n=[];return e.path&&n.push(`path: ${R(e.path)}`),e.host&&n.push(`host: ${R(e.host)}`),e.priority!==void 0&&n.push(`priority: ${e.priority}`),e.healthCheckPath&&n.push(`healthCheckPath: ${R(e.healthCheckPath)}`),zi(n,t,`${t} `)}Ut(_b,"formatRoutingRule");function n0(e){let t=Array.isArray(e)?e:[e];return t.length===1?`
274
- routing: ${_b(t[0]," ")},`:`
272
+ secrets: [${bn(e.ssmSecrets)}],`),e.healthCheck&&(a+=`
273
+ healthCheck: ${Z(e.healthCheck," ")},`),a+=he(e.extraProperties," "),a}Ut(S0,"generateEcsContainerCode");function Cb(e,t){let n=[];return e.path&&n.push(`path: ${R(e.path)}`),e.host&&n.push(`host: ${R(e.host)}`),e.priority!==void 0&&n.push(`priority: ${e.priority}`),e.healthCheckPath&&n.push(`healthCheckPath: ${R(e.healthCheckPath)}`),Wi(n,t,`${t} `)}Ut(Cb,"formatRoutingRule");function _0(e){let t=Array.isArray(e)?e:[e];return t.length===1?`
274
+ routing: ${Cb(t[0]," ")},`:`
275
275
  routing: [
276
- ${t.map(n=>_b(n," ")).join(`,
276
+ ${t.map(n=>Cb(n," ")).join(`,
277
277
  `)},
278
- ],`}Ut(n0,"generateEcsServiceRoutingCode");function i0(e){if(e===!1)return`
278
+ ],`}Ut(_0,"generateEcsServiceRoutingCode");function E0(e){if(e===!1)return`
279
279
  scaling: false,`;if(typeof e!="object"||!(e.minCapacity!==void 0||e.maxCapacity!==void 0||e.desiredCount!==void 0||e.scalingType!==void 0))return"";let t=[];return e.minCapacity!==void 0&&t.push(`minCapacity: ${e.minCapacity}`),e.maxCapacity!==void 0&&t.push(`maxCapacity: ${e.maxCapacity}`),e.desiredCount!==void 0&&t.push(`desiredCount: ${e.desiredCount}`),e.scalingType&&t.push(`scalingType: ${R(e.scalingType)}`),`
280
- scaling: ${zi(t," "," ")},`}Ut(i0,"generateEcsServiceScalingCode");function o0(e,t,n){return{needsDb:e.needsDatabaseConnection!==void 0?e.needsDatabaseConnection:t&&Sn(n),needsStorage:e.needsStorageConnection!==void 0?e.needsStorageConnection:t&&_n(n),needsMessaging:e.needsMessagingConnection!==void 0?e.needsMessagingConnection:t&&En(n)}}Ut(o0,"deriveServiceConnectionNeeds");function a0(e){let{service:t,isFirstService:n,hasConnections:i,dbEnvVars:r,storageEnvVars:o,messagingEnvVars:a,baseEnvVars:c,plan:u,compute:l}=e,m=`
280
+ scaling: ${Wi(t," "," ")},`}Ut(E0,"generateEcsServiceScalingCode");function x0(e,t,n){return{needsDb:e.needsDatabaseConnection!==void 0?e.needsDatabaseConnection:t&&An(n),needsStorage:e.needsStorageConnection!==void 0?e.needsStorageConnection:t&&In(n),needsMessaging:e.needsMessagingConnection!==void 0?e.needsMessagingConnection:t&&$n(n)}}Ut(x0,"deriveServiceConnectionNeeds");function A0(e){let{service:t,isFirstService:n,hasConnections:i,dbEnvVars:r,storageEnvVars:o,messagingEnvVars:a,baseEnvVars:c,plan:u,compute:l}=e,m=`
281
281
  name: ${R(t.name)},`;m+=`
282
- capacityProvider: ${R(t.capacityProvider)},`,t.ec2Config&&(m+=e0(t.ec2Config)),t.docker&&(m+=`
282
+ capacityProvider: ${R(t.capacityProvider)},`,t.ec2Config&&(m+=b0(t.ec2Config)),t.docker&&(m+=`
283
283
  docker: ${Z(t.docker," ")},`),t.image&&(m+=`
284
284
  image: ${R(t.image)},`),t.ssmSecretsPath&&(m+=`
285
- ssmSecretsPath: ${R(t.ssmSecretsPath)},`);let p=o0(t,n,l);if(t.containers?.length){m+=`
285
+ ssmSecretsPath: ${R(t.ssmSecretsPath)},`);let p=x0(t,n,l);if(t.containers?.length){m+=`
286
286
  containers: [{`;for(let g=0;g<t.containers.length;g++){let v=t.containers[g];if(!v)continue;let A=g===0&&(p.needsDb||p.needsStorage||p.needsMessaging)&&i,X=p.needsDb?r:{env:{},secrets:{}},z=p.needsStorage?o:{env:{},secrets:{}},xe=p.needsMessaging?a:{env:{},secrets:{}};g>0&&(m+=`
287
- }, {`),m+=r0(v,A,X,z,xe,c)}m+=`
288
- }],`}if(t.routing&&(m+=n0(t.routing)),t.cpu!==void 0&&(m+=`
287
+ }, {`),m+=S0(v,A,X,z,xe,c)}m+=`
288
+ }],`}if(t.routing&&(m+=_0(t.routing)),t.cpu!==void 0&&(m+=`
289
289
  cpu: ${t.cpu},`),t.memoryLimitMiB!==void 0&&(m+=`
290
290
  memoryLimitMiB: ${t.memoryLimitMiB},`),t.desiredCount!==void 0&&(m+=`
291
- desiredCount: ${t.desiredCount},`),t.scaling!==void 0&&(m+=i0(t.scaling)),t.alarms===!1?m+=`
291
+ desiredCount: ${t.desiredCount},`),t.scaling!==void 0&&(m+=E0(t.scaling)),t.alarms===!1?m+=`
292
292
  alarms: false,`:typeof t.alarms=="object"&&(m+=`
293
- alarms: ${Z(t.alarms," ")},`),m+=he(t.extraProperties," "),p.needsDb||p.needsStorage||p.needsMessaging){let g=p.needsDb?vn(u,l):[],v=p.needsStorage?bn(u,l):[],A=p.needsMessaging?yn(u,l):[];(g.length>0||v.length>0||A.length>0)&&(m+=`
294
- ${Di(g,v,A)}`)}return m}Ut(a0,"generateEcsServiceCode");function Da(e,t){let n=Pa(e),i={...Na},r={env:{},secrets:{}};if(Sn(e)){let u=sl(t,e);Object.assign(r.env,u.env),Object.assign(r.secrets,u.secrets)}let o={env:{},secrets:{}};if(_n(e)){let u=dl(t,e);Object.assign(o.env,u.env)}let a={env:{},secrets:{}};if(En(e)){let u=ml(t,e);Object.assign(a.env,u.env)}let c=`
295
- ecrRepository: app.getDefaultContainerRegistry(),`;if(c+=t0(e),e.services?.length){c+=`
293
+ alarms: ${Z(t.alarms," ")},`),m+=he(t.extraProperties," "),p.needsDb||p.needsStorage||p.needsMessaging){let g=p.needsDb?_n(u,l):[],v=p.needsStorage?En(u,l):[],A=p.needsMessaging?xn(u,l):[];(g.length>0||v.length>0||A.length>0)&&(m+=`
294
+ ${Vi(g,v,A)}`)}return m}Ut(A0,"generateEcsServiceCode");function Fa(e,t){let n=Ma(e),i={...ja},r={env:{},secrets:{}};if(An(e)){let u=fl(t,e);Object.assign(r.env,u.env),Object.assign(r.secrets,u.secrets)}let o={env:{},secrets:{}};if(In(e)){let u=bl(t,e);Object.assign(o.env,u.env)}let a={env:{},secrets:{}};if($n(e)){let u=yl(t,e);Object.assign(a.env,u.env)}let c=`
295
+ ecrRepository: app.getDefaultContainerRegistry(),`;if(c+=y0(e),e.services?.length){c+=`
296
296
  services: [{`;for(let u=0;u<e.services.length;u++){let l=e.services[u];l&&(u>0&&(c+=`
297
- }, {`),c+=a0({service:l,isFirstService:u===0,hasConnections:n,dbEnvVars:r,storageEnvVars:o,messagingEnvVars:a,baseEnvVars:i,plan:t,compute:e}))}c+=`
298
- }],`}return c+=he(e.extraProperties),c+=hn(),c}Ut(Da,"generateEcsCode");var j4=Object.defineProperty,z4=(e,t)=>j4(e,"name",{value:t,configurable:!0});function pl(e,t){if(e.compute.length===0)return"";let n="";for(let i=0;i<e.compute.length;i++){let r=e.compute[i],o=t.has(r.name)||r.scheduleExpression!==void 0,a=ae(r),c=e.database.length>0||e.s3.length>0||i>0,u=o?`const ${a} = `:"";switch(n+=`${c?`
297
+ }, {`),c+=A0({service:l,isFirstService:u===0,hasConnections:n,dbEnvVars:r,storageEnvVars:o,messagingEnvVars:a,baseEnvVars:i,plan:t,compute:e}))}c+=`
298
+ }],`}return c+=he(e.extraProperties),c+=yn(),c}Ut(Fa,"generateEcsCode");var c2=Object.defineProperty,u2=(e,t)=>c2(e,"name",{value:t,configurable:!0});function Sl(e,t){if(e.compute.length===0)return"";let n="";for(let i=0;i<e.compute.length;i++){let r=e.compute[i],o=t.has(r.name)||r.scheduleExpression!==void 0,a=ae(r),c=e.database.length>0||e.s3.length>0||i>0,u=o?`const ${a} = `:"";switch(n+=`${c?`
299
299
  `:""}${u}app.addCompute(
300
300
  ComputeFactory.build(${R(r.name)}, {
301
- type: ${R(r.type)},`,r.type){case"lambda":n+=wa(r),n+=ka(r,e);break;case"ec2":n+=Oa(r);break;case"ecs":n+=Da(r,e);break;default:{let l=r.type;throw new Error(`Unhandled compute type: ${String(l)}`)}}n+=`
301
+ type: ${R(r.type)},`,r.type){case"lambda":n+=za(r),n+=La(r,e);break;case"ec2":n+=Ua(r);break;case"ecs":n+=Fa(r,e);break;default:{let l=r.type;throw new Error(`Unhandled compute type: ${String(l)}`)}}n+=`
302
302
  })
303
303
  );
304
304
  `,r.scheduleExpression!==void 0&&(n+=`app.addSchedule(${R(`${r.name}Schedule`)}, { schedule: ${R(r.scheduleExpression)}, target: ${a} });
305
- `)}return n}z4(pl,"generateComputeCode");var L4=Object.defineProperty,U4=(e,t)=>L4(e,"name",{value:t,configurable:!0}),F4={kind:"planOnly",reason:"`variableName` is a plan-only round-trip key naming the `const <var> =` binding the scaffold emits; no construct reads it."},B4={kind:"planOnly",reason:"`extraProperties` is a plan-only round-trip key: the scaffold flattens each `{ key, sourceText }` entry into a sibling property, and no construct reads the array."},fl={variableName:F4,extraProperties:B4},V4={constants:[{key:"type",value:{kind:"literal",value:"queue"}}],keys:{retentionPeriod:{kind:"prop",as:"messageRetentionPeriod"},...fl}},G4={keys:{...fl}},Z4={keys:{engineExpression:{kind:"planOnly",reason:"`engineExpression` carries a raw CDK engine expression for the scaffold to inline; the construct reads `databaseEngine` instead, so a cluster pinned to `DatabaseClusterEngine.auroraMysql(...)` still deploys as aurora-postgresql."},...fl}},W4={keys:{...fl}},gl={messaging:V4,storage:G4,database:Z4,network:W4};function s0(e){return Object.prototype.hasOwnProperty.call(gl,e)}U4(s0,"isProjectableType");var H4=Object.defineProperty,q4=(e,t)=>H4(e,"name",{value:t,configurable:!0});function hl(e,t,n={}){let i=gl[e],r=n.editingExisting===!0?[]:i.constants??[],o=new Map(r.map(c=>[c.key,c])),a=[];for(let[c,u]of Object.entries(t)){if(u===void 0)continue;let l=i.keys?.[c];if(l===void 0||l.kind==="prop"){let g=l?.as??c;o.set(g,{key:g,value:{kind:"literal",value:u}});continue}if(l.kind==="planOnly"){a.push({key:c,reason:l.reason});continue}let m=l.bind(u,n);if(m===void 0){a.push({key:c,reason:l.reason});continue}let p=l.as??c;o.set(p,{key:p,value:{kind:"expression",source:m}})}return{props:[...o.values()],unprojectable:a}}q4(hl,"projectPlanToConstructProps");var K4=Object.defineProperty,Li=(e,t)=>K4(e,"name",{value:t,configurable:!0});function c0(e){let t="";return t+=O(e.bucketName!==void 0,"bucketName",e.bucketName,"string"),t+=O(e.stackPlacement!==void 0&&e.stackPlacement!=="storage","stackPlacement",e.stackPlacement,"string"),t+=O(e.publicReadAccess===!0,"publicReadAccess",!0),t+=O(e.websiteHosting!==void 0,"websiteHosting",e.websiteHosting,"object"),t+=O(e.backupVaultTier!==void 0,"backupVaultTier",e.backupVaultTier,"string"),t+=O(e.versioned!==void 0,"versioned",e.versioned),t+=O(e.encryption!==void 0,"encryption",e.encryption,"string"),t+=O(e.kmsKeyArn!==void 0,"kmsKeyArn",e.kmsKeyArn,"string"),t+=O(e.cors!==void 0&&e.cors.length>0,"cors",e.cors,"object"),t+=O(e.deployment!==void 0,"deployment",e.deployment,"object"),t+=O(e.retain===!0,"retain",!0),t}Li(c0,"generateS3BucketProps");function Eb(e,t){return!!(t.compute.some(n=>n.connectedStorage?.includes(e.name))||t.cdn&&(t.cdn.defaultOriginRef===e.name||t.cdn.behaviours?.some(n=>n.originRef===e.name)))}Li(Eb,"s3NeedsVariable");function vl(e){if(e.s3.length===0)return"";let t="";for(let n=0;n<e.s3.length;n++){let i=e.s3[n],r=ae(i),o=Eb(i,e),a=e.database.length>0||n>0?`
306
- `:"",c=c0(i),u=o?`const ${r} = `:"",l=he(i.extraProperties);c||l?t+=`${a}${u}app.addStorage(
305
+ `)}return n}u2(Sl,"generateComputeCode");var l2=Object.defineProperty,d2=(e,t)=>l2(e,"name",{value:t,configurable:!0}),m2={kind:"planOnly",reason:"`variableName` is a plan-only round-trip key naming the `const <var> =` binding the scaffold emits; no construct reads it."},p2={kind:"planOnly",reason:"`extraProperties` is a plan-only round-trip key: the scaffold flattens each `{ key, sourceText }` entry into a sibling property, and no construct reads the array."},_l={variableName:m2,extraProperties:p2},f2={constants:[{key:"type",value:{kind:"literal",value:"queue"}}],keys:{retentionPeriod:{kind:"prop",as:"messageRetentionPeriod"},..._l}},g2={keys:{..._l}},h2={keys:{engineExpression:{kind:"planOnly",reason:"`engineExpression` carries a raw CDK engine expression for the scaffold to inline; the construct reads `databaseEngine` instead, so a cluster pinned to `DatabaseClusterEngine.auroraMysql(...)` still deploys as aurora-postgresql."},..._l}},v2={keys:{..._l}},El={messaging:f2,storage:g2,database:h2,network:v2};function I0(e){return Object.prototype.hasOwnProperty.call(El,e)}d2(I0,"isProjectableType");var b2=Object.defineProperty,y2=(e,t)=>b2(e,"name",{value:t,configurable:!0});function xl(e,t,n={}){let i=El[e],r=n.editingExisting===!0?[]:i.constants??[],o=new Map(r.map(c=>[c.key,c])),a=[];for(let[c,u]of Object.entries(t)){if(u===void 0)continue;let l=i.keys?.[c];if(l===void 0||l.kind==="prop"){let g=l?.as??c;o.set(g,{key:g,value:{kind:"literal",value:u}});continue}if(l.kind==="planOnly"){a.push({key:c,reason:l.reason});continue}let m=l.bind(u,n);if(m===void 0){a.push({key:c,reason:l.reason});continue}let p=l.as??c;o.set(p,{key:p,value:{kind:"expression",source:m}})}return{props:[...o.values()],unprojectable:a}}y2(xl,"projectPlanToConstructProps");var S2=Object.defineProperty,Hi=(e,t)=>S2(e,"name",{value:t,configurable:!0});function $0(e){let t="";return t+=O(e.bucketName!==void 0,"bucketName",e.bucketName,"string"),t+=O(e.stackPlacement!==void 0&&e.stackPlacement!=="storage","stackPlacement",e.stackPlacement,"string"),t+=O(e.publicReadAccess===!0,"publicReadAccess",!0),t+=O(e.websiteHosting!==void 0,"websiteHosting",e.websiteHosting,"object"),t+=O(e.backupVaultTier!==void 0,"backupVaultTier",e.backupVaultTier,"string"),t+=O(e.versioned!==void 0,"versioned",e.versioned),t+=O(e.encryption!==void 0,"encryption",e.encryption,"string"),t+=O(e.kmsKeyArn!==void 0,"kmsKeyArn",e.kmsKeyArn,"string"),t+=O(e.cors!==void 0&&e.cors.length>0,"cors",e.cors,"object"),t+=O(e.deployment!==void 0,"deployment",e.deployment,"object"),t+=O(e.retain===!0,"retain",!0),t}Hi($0,"generateS3BucketProps");function Nb(e,t){return!!(t.compute.some(n=>n.connectedStorage?.includes(e.name))||t.cdn&&(t.cdn.defaultOriginRef===e.name||t.cdn.behaviours?.some(n=>n.originRef===e.name)))}Hi(Nb,"s3NeedsVariable");function Al(e){if(e.s3.length===0)return"";let t="";for(let n=0;n<e.s3.length;n++){let i=e.s3[n],r=ae(i),o=Nb(i,e),a=e.database.length>0||n>0?`
306
+ `:"",c=$0(i),u=o?`const ${r} = `:"",l=he(i.extraProperties);c||l?t+=`${a}${u}app.addStorage(
307
307
  StorageFactory.build(${R(i.name)}, {${c}${l}
308
308
  })
309
309
  );
310
310
  `:t+=`${a}${u}app.addStorage(
311
311
  StorageFactory.build(${R(i.name)}, {})
312
312
  );
313
- `}return t}Li(vl,"generateS3Code");function bl(e){if(!e.dynamodb||e.dynamodb.length===0)return"";let t="";for(let n of e.dynamodb){let i=ae(n);if(t+=`
313
+ `}return t}Hi(Al,"generateS3Code");function Il(e){if(!e.dynamodb||e.dynamodb.length===0)return"";let t="";for(let n of e.dynamodb){let i=ae(n);if(t+=`
314
314
  const ${i} = app.addDatabase(
315
315
  DatabaseFactory.build(${R(n.name)}, {
316
316
  type: "DynamoDB",
@@ -340,22 +340,22 @@ const ${i} = app.addDatabase(
340
340
  stream: true`),t+=he(n.extraProperties),t+=`
341
341
  })
342
342
  );
343
- `}return t}Li(bl,"generateDynamoDBCode");function xb(e,t){return t.compute.some(n=>n.connectedMessaging?.includes(e.name))}Li(xb,"sqsNeedsVariable");function yl(e){if(!e.sqs||e.sqs.length===0)return"";let t="";for(let n of e.sqs){let i=ae(n),r=xb(n,e)?`const ${i} = `:"",{props:o}=hl("messaging",{queueType:n.queueType,visibilityTimeout:n.visibilityTimeout,retentionPeriod:n.retentionPeriod,...n.contentBasedDeduplication===!0&&{contentBasedDeduplication:!0},removalPolicy:n.removalPolicy});t+=`
343
+ `}return t}Hi(Il,"generateDynamoDBCode");function Pb(e,t){return t.compute.some(n=>n.connectedMessaging?.includes(e.name))}Hi(Pb,"sqsNeedsVariable");function $l(e){if(!e.sqs||e.sqs.length===0)return"";let t="";for(let n of e.sqs){let i=ae(n),r=Pb(n,e)?`const ${i} = `:"",{props:o}=xl("messaging",{queueType:n.queueType,visibilityTimeout:n.visibilityTimeout,retentionPeriod:n.retentionPeriod,...n.contentBasedDeduplication===!0&&{contentBasedDeduplication:!0},removalPolicy:n.removalPolicy});t+=`
344
344
  ${r}app.addMessaging(
345
- MessagingFactory.build(${R(n.name)}, {${bb(o)}`,t+=",",t+=he(n.extraProperties),t+=hn(),t+=`
345
+ MessagingFactory.build(${R(n.name)}, {${$b(o)}`,t+=",",t+=he(n.extraProperties),t+=yn(),t+=`
346
346
  })
347
347
  );
348
- `}return t}Li(yl,"generateSQSCode");var Y4=Object.defineProperty,gt=(e,t)=>Y4(e,"name",{value:t,configurable:!0}),Bt=Object.freeze({database:{type:"Instance",backupRetention:7,deletionProtection:!0},compute:{server:{memorySize:1536,timeout:30},imageOptimisation:{memorySize:1536,timeout:30},revalidation:{memorySize:768,timeout:300}}});function xn(e,t,n){return t===void 0?"":`
349
- ${n}${e}: ${t},`}gt(xn,"emitScalar");function Ft(e,t,n){return t===void 0?"":`
350
- ${n}${e}: ${JSON.stringify(t)},`}gt(Ft,"emitStringField");function Ma(e,t,n){return t===void 0?"":t===!1?`
348
+ `}return t}Hi($l,"generateSQSCode");var _2=Object.defineProperty,ht=(e,t)=>_2(e,"name",{value:t,configurable:!0}),Bt=Object.freeze({database:{type:"Instance",backupRetention:7,deletionProtection:!0},compute:{server:{memorySize:1536,timeout:30},imageOptimisation:{memorySize:1536,timeout:30},revalidation:{memorySize:768,timeout:300}}});function Tn(e,t,n){return t===void 0?"":`
349
+ ${n}${e}: ${t},`}ht(Tn,"emitScalar");function Ft(e,t,n){return t===void 0?"":`
350
+ ${n}${e}: ${JSON.stringify(t)},`}ht(Ft,"emitStringField");function Ba(e,t,n){return t===void 0?"":t===!1?`
351
351
  ${n}${e}: false,`:`
352
- ${n}${e}: ${Z(t,n)},`}gt(Ma,"emitObjectOrFalse");function ft(e,t,n){return t===void 0||Object.keys(t).length===0?"":`
353
- ${n}${e}: ${Z(t,n)},`}gt(ft,"emitObject");function u0(e){let t=e??{},n=" ",i=t.type??Bt.database.type,r=t.backupRetention??Bt.database.backupRetention,o=t.deletionProtection??Bt.database.deletionProtection,a=`
354
- ${n}type: "${i}",`;return a+=Ft("databaseName",t.databaseName,n),a+=Ft("databaseEngine",t.databaseEngine,n),i==="Instance"&&t.instanceType!==void 0&&(a+=Ft("instanceType",t.instanceType,n)),a+=xn("allocatedStorage",t.allocatedStorage,n),a+=xn("port",t.port,n),a+=`
352
+ ${n}${e}: ${Z(t,n)},`}ht(Ba,"emitObjectOrFalse");function gt(e,t,n){return t===void 0||Object.keys(t).length===0?"":`
353
+ ${n}${e}: ${Z(t,n)},`}ht(gt,"emitObject");function T0(e){let t=e??{},n=" ",i=t.type??Bt.database.type,r=t.backupRetention??Bt.database.backupRetention,o=t.deletionProtection??Bt.database.deletionProtection,a=`
354
+ ${n}type: "${i}",`;return a+=Ft("databaseName",t.databaseName,n),a+=Ft("databaseEngine",t.databaseEngine,n),i==="Instance"&&t.instanceType!==void 0&&(a+=Ft("instanceType",t.instanceType,n)),a+=Tn("allocatedStorage",t.allocatedStorage,n),a+=Tn("port",t.port,n),a+=`
355
355
  ${n}backupRetention: ${r},`,a+=`
356
- ${n}deletionProtection: ${o},`,a+=xn("publiclyAccessible",t.publiclyAccessible,n),a+=Ft("allowedIpCidr",t.allowedIpCidr,n),a+=xn("multiAz",t.multiAz,n),a+=xn("allowVpcAccess",t.allowVpcAccess,n),a+=xn("monitoringInterval",t.monitoringInterval,n),a+=Ft("preferredMaintenanceWindow",t.preferredMaintenanceWindow,n),a+=Ft("snapshotIdentifier",t.snapshotIdentifier,n),a+=Ft("snapshotUsername",t.snapshotUsername,n),a+=Ma("readReplica",t.readReplica,n),a+=ft("writer",t.writer,n),a+=Ma("readers",t.readers,n),a+=Ma("databaseInsights",t.databaseInsights,n),a+=Ma("proxy",t.proxy,n),a+=ft("credentials",t.credentials,n),a+=ft("encryption",t.encryption,n),`
356
+ ${n}deletionProtection: ${o},`,a+=Tn("publiclyAccessible",t.publiclyAccessible,n),a+=Ft("allowedIpCidr",t.allowedIpCidr,n),a+=Tn("multiAz",t.multiAz,n),a+=Tn("allowVpcAccess",t.allowVpcAccess,n),a+=Tn("monitoringInterval",t.monitoringInterval,n),a+=Ft("preferredMaintenanceWindow",t.preferredMaintenanceWindow,n),a+=Ft("snapshotIdentifier",t.snapshotIdentifier,n),a+=Ft("snapshotUsername",t.snapshotUsername,n),a+=Ba("readReplica",t.readReplica,n),a+=gt("writer",t.writer,n),a+=Ba("readers",t.readers,n),a+=Ba("databaseInsights",t.databaseInsights,n),a+=Ba("proxy",t.proxy,n),a+=gt("credentials",t.credentials,n),a+=gt("encryption",t.encryption,n),`
357
357
  database: {${a}
358
- },`}gt(u0,"emitDatabaseBlock");function l0(e){let t=e??{},n=t.server?.memorySize??Bt.compute.server.memorySize,i=t.server?.timeout??Bt.compute.server.timeout,r=t.imageOptimisation?.memorySize??Bt.compute.imageOptimisation.memorySize,o=t.imageOptimisation?.timeout??Bt.compute.imageOptimisation.timeout,a=t.revalidation?.memorySize??Bt.compute.revalidation.memorySize,c=t.revalidation?.timeout??Bt.compute.revalidation.timeout;return`
358
+ },`}ht(T0,"emitDatabaseBlock");function R0(e){let t=e??{},n=t.server?.memorySize??Bt.compute.server.memorySize,i=t.server?.timeout??Bt.compute.server.timeout,r=t.imageOptimisation?.memorySize??Bt.compute.imageOptimisation.memorySize,o=t.imageOptimisation?.timeout??Bt.compute.imageOptimisation.timeout,a=t.revalidation?.memorySize??Bt.compute.revalidation.memorySize,c=t.revalidation?.timeout??Bt.compute.revalidation.timeout;return`
359
359
  compute: {
360
360
  server: {
361
361
  memorySize: ${n},
@@ -369,47 +369,47 @@ ${n}deletionProtection: ${o},`,a+=xn("publiclyAccessible",t.publiclyAccessible,n
369
369
  memorySize: ${a},
370
370
  timeout: ${c},
371
371
  },
372
- },`}gt(l0,"emitComputeBlock");function d0(e){return ft("storage",e," ")}gt(d0,"emitStorageBlock");function m0(e){return ft("messaging",e," ")}gt(m0,"emitMessagingBlock");function p0(e){return ft("cdn",e," ")}gt(p0,"emitCdnBlock");function f0(e){return ft("environment",e," ")}gt(f0,"emitEnvironmentBlock");function g0(e){let t=" ",n="";return n+=Ft("source",e.source,t),n+=ft("build",e.build,t),n+=Ft("routing",e.routing,t),n+=ft("security",e.security,t),e.domain!==void 0&&e.domain!==""&&(n+=`
373
- ${t}domain: ${JSON.stringify(e.domain)},`),n+=ft("forms",e.forms,t),n+=ft("cdn",e.cdn,t),n}gt(g0,"emitStaticSiteFields");function ja(e){if(!e.patternConfig)return"";let t=e.patternConfig,n=`app.addPattern(
374
- PatternFactory.build("${`${Ve(t.name)}${yi[t.type].constructIdSuffix}`}", {
372
+ },`}ht(R0,"emitComputeBlock");function C0(e){return gt("storage",e," ")}ht(C0,"emitStorageBlock");function N0(e){return gt("messaging",e," ")}ht(N0,"emitMessagingBlock");function P0(e){return gt("cdn",e," ")}ht(P0,"emitCdnBlock");function w0(e){return gt("environment",e," ")}ht(w0,"emitEnvironmentBlock");function k0(e){let t=" ",n="";return n+=Ft("source",e.source,t),n+=gt("build",e.build,t),n+=Ft("routing",e.routing,t),n+=gt("security",e.security,t),e.domain!==void 0&&e.domain!==""&&(n+=`
373
+ ${t}domain: ${JSON.stringify(e.domain)},`),n+=gt("forms",e.forms,t),n+=gt("cdn",e.cdn,t),n}ht(k0,"emitStaticSiteFields");function Va(e){if(!e.patternConfig)return"";let t=e.patternConfig,n=`app.addPattern(
374
+ PatternFactory.build("${`${Ce(t.name)}${Ti[t.type].constructIdSuffix}`}", {
375
375
  type: "${t.type}",
376
376
  name: "${t.name}",`;return t.type==="payload"||t.type==="nextjs"?(t.domain!==void 0&&t.domain!==""&&(n+=`
377
- domain: "${t.domain}",`),n+=u0(t.database),n+=l0(t.compute),n+=d0(t.storage),n+=m0(t.messaging),n+=p0(t.cdn),n+=f0(t.environment)):n+=g0(t),n+=`
377
+ domain: "${t.domain}",`),n+=T0(t.database),n+=R0(t.compute),n+=C0(t.storage),n+=N0(t.messaging),n+=P0(t.cdn),n+=w0(t.environment)):n+=k0(t),n+=`
378
378
  })
379
379
  );
380
380
 
381
- `,n}gt(ja,"generatePatternCodeWithComments");var X4=Object.defineProperty,ar=(e,t)=>X4(e,"name",{value:t,configurable:!0}),za="fjall:costAllocation:owner",J4="engineering";function h0(e){return typeof e=="object"&&e!==null&&Object.keys(e).length===0}ar(h0,"isEmptyObject");function Ab(e){let t={...e};return h0(t.flowLogs)&&delete t.flowLogs,t}ar(Ab,"cleanNetworkConfig");function La(e){if(!e.additionalNetworks||e.additionalNetworks.length===0)return"";let t="";for(let n of e.additionalNetworks){let i=or(n.name),r={};n.maxAzs!==void 0&&(r.maxAzs=n.maxAzs),n.natGateways!==void 0&&(r.natGateways=n.natGateways),n.flowLogs!==void 0&&(r.flowLogs=n.flowLogs),n.vpcEndpoints!==void 0&&(r.vpcEndpoints=n.vpcEndpoints);let o=Ab(r);t+=`const ${i} = app.addNetwork(
381
+ `,n}ht(Va,"generatePatternCodeWithComments");var E2=Object.defineProperty,sr=(e,t)=>E2(e,"name",{value:t,configurable:!0}),Ga="fjall:costAllocation:owner",x2="engineering";function O0(e){return typeof e=="object"&&e!==null&&Object.keys(e).length===0}sr(O0,"isEmptyObject");function wb(e){let t={...e};return O0(t.flowLogs)&&delete t.flowLogs,t}sr(wb,"cleanNetworkConfig");function Za(e){if(!e.additionalNetworks||e.additionalNetworks.length===0)return"";let t="";for(let n of e.additionalNetworks){let i=ar(n.name),r={};n.maxAzs!==void 0&&(r.maxAzs=n.maxAzs),n.natGateways!==void 0&&(r.natGateways=n.natGateways),n.flowLogs!==void 0&&(r.flowLogs=n.flowLogs),n.vpcEndpoints!==void 0&&(r.vpcEndpoints=n.vpcEndpoints);let o=wb(r);t+=`const ${i} = app.addNetwork(
382
382
  NetworkFactory.build("${n.name}", ${Z(o," ")})
383
383
  );
384
384
 
385
- `}return t}ar(La,"generateNetworkCode");function Sl(e){let t={};return e.tags&&Object.keys(e.tags).length>0&&Object.assign(t,e.tags),t[za]||(t[za]=e.owner||J4),`app.addTags({
385
+ `}return t}sr(Za,"generateNetworkCode");function Tl(e){let t={};return e.tags&&Object.keys(e.tags).length>0&&Object.assign(t,e.tags),t[Ga]||(t[Ga]=e.owner||x2),`app.addTags({
386
386
  ${Object.entries(t).map(([n,i])=>` "${n}": "${i}"`).join(`,
387
387
  `)}
388
388
  });
389
389
 
390
- `}ar(Sl,"generateTags");function _l(e){let t=`
390
+ `}sr(Tl,"generateTags");function Rl(e){let t=`
391
391
  const appName = "${e.appName}";
392
392
  `,n=e.backup&&typeof e.backup=="object"?e.backup:void 0,i=e.tunnel&&typeof e.tunnel=="object"?e.tunnel:void 0,r=i?i.instanceType?`tunnel: { instanceType: "${i.instanceType}" }`:"tunnel: true":void 0;if(e.vpcId)t+=`const app = App.getApp(appName, {
393
393
  network: { useExisting: "${e.vpcId}" }`,n&&(t+=`,
394
394
  backup: { tier: "${n.tier}" }`),r&&(t+=`,
395
395
  ${r}`),t+=`
396
396
  });
397
- `;else if(e.network){let o=Ab(e.network);t+=`const app = App.getApp(appName, {
397
+ `;else if(e.network){let o=wb(e.network);t+=`const app = App.getApp(appName, {
398
398
  network: ${Z(o," ")}`,n&&(t+=`,
399
399
  backup: { tier: "${n.tier}" }`),r&&(t+=`,
400
400
  ${r}`),t+=`
401
401
  });
402
402
  `}else t+="const app = App.getApp(appName, { network: false",n&&(t+=`, backup: { tier: "${n.tier}" }`),r&&(t+=`, ${r}`),t+=` });
403
403
  `;return t+=`
404
- `,t}ar(_l,"generateAppInit");function El(e){let t=[];if(e.patternConfig?t.push("PatternFactory"):(e.database.length>0&&t.push("DatabaseFactory"),e.s3.length>0&&t.push("StorageFactory"),e.compute.length>0&&t.push("ComputeFactory"),(e.compute.length>0||e.database.length>0||e.sqs!==void 0&&e.sqs.length>0)&&t.push("getConfig"),e.dynamodb&&e.dynamodb.length>0&&e.database.length===0&&t.push("DatabaseFactory"),e.clickhouse&&e.clickhouse.length>0&&e.database.length===0&&!(e.dynamodb&&e.dynamodb.length>0)&&t.push("DatabaseFactory"),e.sqs&&e.sqs.length>0&&t.push("MessagingFactory"),e.cdn&&t.push("CdnFactory"),e.compute.some(i=>i.type===Ti.LAMBDA&&i.deployment==="code")&&(t.push("Code"),t.push("Runtime")),e.compute.some(i=>i.type===Ti.LAMBDA&&i.functionUrl)&&t.push("FunctionUrlAuthType"),e.compute.some(i=>i.type===Ti.LAMBDA&&(i.architecture||i.deployment==="container"))&&t.push("Architecture")),e.additionalNetworks&&e.additionalNetworks.length>0&&t.push("NetworkFactory"),e.additionalManagedImports){for(let i of e.additionalManagedImports)if(i.moduleSpecifier==="@fjall/components-infrastructure"||i.moduleSpecifier==="@fjall/infrastructure")for(let r of i.namedImports)t.includes(r)||t.push(r)}let n=`#!/usr/bin/env node
404
+ `,t}sr(Rl,"generateAppInit");function Cl(e){let t=[];if(e.patternConfig?t.push("PatternFactory"):(e.database.length>0&&t.push("DatabaseFactory"),e.s3.length>0&&t.push("StorageFactory"),e.compute.length>0&&t.push("ComputeFactory"),(e.compute.length>0||e.database.length>0||e.sqs!==void 0&&e.sqs.length>0)&&t.push("getConfig"),e.dynamodb&&e.dynamodb.length>0&&e.database.length===0&&t.push("DatabaseFactory"),e.clickhouse&&e.clickhouse.length>0&&e.database.length===0&&!(e.dynamodb&&e.dynamodb.length>0)&&t.push("DatabaseFactory"),e.sqs&&e.sqs.length>0&&t.push("MessagingFactory"),e.cdn&&t.push("CdnFactory"),e.compute.some(i=>i.type===Di.LAMBDA&&i.deployment==="code")&&(t.push("Code"),t.push("Runtime")),e.compute.some(i=>i.type===Di.LAMBDA&&i.functionUrl)&&t.push("FunctionUrlAuthType"),e.compute.some(i=>i.type===Di.LAMBDA&&(i.architecture||i.deployment==="container"))&&t.push("Architecture")),e.additionalNetworks&&e.additionalNetworks.length>0&&t.push("NetworkFactory"),e.additionalManagedImports){for(let i of e.additionalManagedImports)if(i.moduleSpecifier==="@fjall/components-infrastructure"||i.moduleSpecifier==="@fjall/infrastructure")for(let r of i.namedImports)t.includes(r)||t.push(r)}let n=`#!/usr/bin/env node
405
405
 
406
406
  import { App${t.length>0?`, ${t.join(", ")}`:""} } from "@fjall/components-infrastructure";
407
407
  `;if(e.additionalManagedImports)for(let i of e.additionalManagedImports){if(i.moduleSpecifier==="@fjall/components-infrastructure"||i.moduleSpecifier==="@fjall/infrastructure")continue;let r=i.namedImports.length>0?`{ ${i.namedImports.join(", ")} }`:"",o=[i.defaultImport??"",r].filter(Boolean).join(", ");o&&(n+=`import ${o} from "${i.moduleSpecifier}";
408
- `)}return n}ar(El,"generateImports");function xl(e){if(!e.cdn)return"";let t=xa(e,e.cdn.defaultOriginRef),n=`
408
+ `)}return n}sr(Cl,"generateImports");function Nl(e){if(!e.cdn)return"";let t=Ca(e,e.cdn.defaultOriginRef),n=`
409
409
  app.addCdn(
410
410
  CdnFactory.build("${e.cdn.name}", {
411
411
  originType: "auto",
412
- origin: ${t}`;if(e.cdn.behaviours&&e.cdn.behaviours.length>0){let i=e.cdn.behaviours.map(r=>{let o=xa(e,r.originRef),a=`{
412
+ origin: ${t}`;if(e.cdn.behaviours&&e.cdn.behaviours.length>0){let i=e.cdn.behaviours.map(r=>{let o=Ca(e,r.originRef),a=`{
413
413
  pathPattern: "${r.pathPattern}",
414
414
  origin: ${o},`;return r.cachePolicy&&(a+=`
415
415
  cachePolicy: "${r.cachePolicy}",`),a+=`
@@ -424,31 +424,31 @@ app.addCdn(
424
424
  accessGate: ${Z(e.cdn.accessGate," ")}`),n+=he(e.cdn.extraProperties),n+=`
425
425
  })
426
426
  );
427
- `,n}ar(xl,"generateCDNCode");function Al(e){let t=new Set;if(e.cdn&&(e.cdn.defaultOriginRef&&t.add(e.cdn.defaultOriginRef),e.cdn.behaviours))for(let n of e.cdn.behaviours)t.add(n.originRef);return t}ar(Al,"collectCdnReferencedResources");function Il(e){return e.patternConfig!==void 0}ar(Il,"usesPatternApproach");var Q4=Object.defineProperty,An=(e,t)=>Q4(e,"name",{value:t,configurable:!0}),Ua="service",Ib="0 4 * * ? *",$b="0 5 * * ? *",sr=Object.freeze({tinkerer:{displayName:"Tinkerer",description:"Free tier eligible, minimal cost for experimentation",database:{Instance:{instanceType:"t4g.micro",multiAz:!1,proxy:!1,readReplica:!1,publiclyAccessible:!0},Aurora:null,GlobalAurora:null,ClickHouse:null},compute:{ecs:{services:[{name:Ua,capacityProvider:"EC2",desiredCount:1,minCapacity:1,maxCapacity:1,ec2Config:{instanceType:"t4g.micro",amiHardwareType:"ARM",minCapacity:1,maxCapacity:1,memoryLimitMiB:400}}],cluster:{directAccess:!0}},lambda:{timeout:30,memory:128}},network:{maxAzs:2,natGateways:!1,flowLogs:!1},backup:!1},lightweight:{displayName:"Lightweight",description:"Streamlined single-AZ deployment for cost efficiency",database:{Instance:{instanceType:"t4g.small",multiAz:!1},Aurora:{readers:!1},GlobalAurora:null,ClickHouse:null},compute:{ecs:{services:[{name:Ua,capacityProvider:"FARGATE_SPOT",cpu:256,memoryLimitMiB:512,desiredCount:1,minCapacity:1,maxCapacity:3}]},lambda:{timeout:30,memory:256}},network:{maxAzs:2,natGateways:{count:1},flowLogs:!1},backup:!1},standard:{displayName:"Standard",description:"Production-ready with sensible defaults",database:{Instance:{instanceType:"t4g.large"},Aurora:{readers:{count:1}},GlobalAurora:{readers:{count:1}},ClickHouse:{instanceType:"t4g.medium",coldTier:{mode:"s3"},optimiseSchedule:Ib,backupSchedule:$b,backupRetentionDays:14}},compute:{ecs:{services:[{name:Ua,capacityProvider:"FARGATE",cpu:512,memoryLimitMiB:1024,desiredCount:2,minCapacity:2,maxCapacity:5}]},lambda:{timeout:60,memory:256}},network:{maxAzs:3,natGateways:{count:1},flowLogs:{},vpcEndpoints:{interface:{ecr:!0}}},backup:!1},resilient:{displayName:"Resilient",description:"High availability with enhanced monitoring and scaling",database:{Instance:{instanceType:"r7g.large",encryption:{storageKey:{useCMK:!0}},databaseInsights:{mode:"advanced",encryptionKey:{useCMK:!0}},proxy:{requireTLS:!0}},Aurora:{readers:{count:2},encryption:{storageKey:{useCMK:!0}},databaseInsights:{mode:"advanced",encryptionKey:{useCMK:!0}},proxy:{requireTLS:!0},backupRetention:30},GlobalAurora:{readers:{count:2},encryption:{storageKey:{useCMK:!0}},databaseInsights:{mode:"advanced",encryptionKey:{useCMK:!0}},proxy:{requireTLS:!0},backupRetention:30,enableGlobalWriteForwarding:!0},ClickHouse:{instanceType:"m6g.large",coldTier:{mode:"s3"},optimiseSchedule:Ib,backupSchedule:$b,backupRetentionDays:14}},compute:{ecs:{services:[{name:Ua,capacityProvider:"FARGATE",cpu:1024,memoryLimitMiB:2048,desiredCount:4,minCapacity:4,maxCapacity:20}]},lambda:{timeout:120,memory:512}},network:{maxAzs:3,natGateways:{count:3},flowLogs:{retentionDays:90},vpcEndpoints:{interface:{ecr:!0,secretsManager:!0}}},backup:{tier:"resilient"}},enterprise:{displayName:"Enterprise",description:"Maximum capability with all features enabled",database:{Instance:{instanceType:"r7g.xlarge",encryption:{storageKey:{useCMK:!0}},databaseInsights:{mode:"advanced",encryptionKey:{useCMK:!0}},proxy:{requireTLS:!0},readReplica:{}},Aurora:{readers:{count:2},encryption:{storageKey:{useCMK:!0}},databaseInsights:{mode:"advanced",encryptionKey:{useCMK:!0}},proxy:{requireTLS:!0},backupRetention:35},GlobalAurora:{readers:{count:2},encryption:{storageKey:{useCMK:!0}},databaseInsights:{mode:"advanced",encryptionKey:{useCMK:!0}},proxy:{requireTLS:!0},backupRetention:35,enableGlobalWriteForwarding:!0},ClickHouse:{instanceType:"m6g.xlarge",coldTier:{mode:"s3"},optimiseSchedule:Ib,backupSchedule:$b,backupRetentionDays:30}},compute:{ecs:{services:[{name:Ua,capacityProvider:"FARGATE",cpu:2048,memoryLimitMiB:4096,desiredCount:6,minCapacity:6,maxCapacity:100}]},lambda:{timeout:300,memory:1024}},network:{maxAzs:3,natGateways:{count:3},flowLogs:{destination:"s3",retentionDays:365},vpcEndpoints:{interface:{ecr:!0,secretsManager:!0,kms:!0,cloudwatchLogs:!0}}},backup:{tier:"enterprise"}}});function e2(e,t){return sr[e].database[t]}An(e2,"getDatabasePreset");function t2(e){return sr[e].compute.ecs}An(t2,"getEcsPreset");function Tb(e){return sr[e].network}An(Tb,"getNetworkPreset");function v0(e){return Du.filter(t=>sr[t].database[e]!==null)}An(v0,"getAvailableTiersForDatabase");function r2(e){return v0(e).map(t=>({label:sr[t].displayName,value:t,description:sr[t].description}))}An(r2,"getTierOptionsForDatabase");function Cb(e){switch(e){case"tinkerer":case"lightweight":case"standard":return"Instance";case"resilient":case"enterprise":return"Aurora"}}An(Cb,"getDefaultDatabaseTypeForTier");function Rb(e,t){let n=sr[e].compute.ecs,i=n.services[0],r=!n.cluster?.directAccess&&n.cluster?.loadBalancer!==!1,o=t.filter(c=>c.serviceType!=="worker").length,a=t.findIndex(c=>c.serviceType!=="worker");return t.map((c,u)=>{let l=u===a,m=c.serviceType==="worker",p;return r&&!m&&(c.routing?p=c.routing:o>1&&(p={path:l?"/*":`/${c.name.toLowerCase()}/*`,...l?{}:{priority:100+u}})),{name:c.name,capacityProvider:i.capacityProvider,ec2Config:i.ec2Config,cpu:i.cpu,memoryLimitMiB:i.memoryLimitMiB,desiredCount:i.desiredCount,minCapacity:i.minCapacity,maxCapacity:i.maxCapacity,routing:p}})}An(Rb,"applyTierDefaultsToServices");var n2=Object.defineProperty,Pb=(e,t)=>n2(e,"name",{value:t,configurable:!0}),Fa=["lightweight","standard","resilient"],i2=[...Fa,"custom"],Or=Object.freeze({lightweight:{displayName:"Lightweight",description:"Cost-effective \xB7 Instance DB, minimal Lambda",database:{type:"Instance",instanceType:"t4g.small",backupRetention:7,deletionProtection:!1},compute:{memorySize:512,timeout:30},network:{maxAzs:2,natGateways:{count:1},flowLogs:!1},backup:!1},standard:{displayName:"Standard",description:"Production-ready \xB7 Instance DB, balanced Lambda",database:{type:"Instance",instanceType:"t4g.large",backupRetention:14,deletionProtection:!0},compute:{memorySize:1536,timeout:60},network:{maxAzs:3,natGateways:{count:1},flowLogs:{}},backup:{tier:"standard"}},resilient:{displayName:"Resilient",description:"High-availability \xB7 Aurora V2, KMS encryption",database:{type:"Aurora",backupRetention:30,deletionProtection:!0,encryption:{useCMK:!0}},compute:{memorySize:2048,timeout:120},network:{maxAzs:3,natGateways:{count:3},flowLogs:{retentionDays:90}},backup:{tier:"resilient"}}});function $l(e){return Or[e]}Pb($l,"getPatternTierPreset");function b0(){return[{label:Or.standard.displayName,value:"standard",description:Or.standard.description},{label:Or.lightweight.displayName,value:"lightweight",description:Or.lightweight.description},{label:Or.resilient.displayName,value:"resilient",description:Or.resilient.description},{label:"Custom",value:"custom",description:"Full control \xB7 Configure everything"}]}Pb(b0,"getPatternTierOptions");var o2=new Set(Fa);function Tl(e){return o2.has(e)}Pb(Tl,"isPatternTierName");var a2=Object.defineProperty,y0=(e,t)=>a2(e,"name",{value:t,configurable:!0}),S0=Object.freeze({standard:{},assets:{versioned:!0,deployment:{source:"./assets"}},upload:{versioned:!0,cors:[{allowedOrigins:["*"],allowedMethods:["GET","PUT","POST"]}]},website:{publicReadAccess:!0,websiteHosting:{indexDocument:"index.html",errorDocument:"error.html"}}});function _0(e){return{...S0[e]}}y0(_0,"getStoragePreset");function E0(){return[{label:"Standard",value:"standard"},{label:"Assets",value:"assets"},{label:"Upload",value:"upload"},{label:"Website Hosting",value:"website"}]}y0(E0,"getStoragePresetOptions");import*as ve from"typescript";import*as D from"typescript";var s2=Object.defineProperty,Ui=(e,t)=>s2(e,"name",{value:t,configurable:!0});function B(e){let t={};for(let n of e.properties){if(!D.isPropertyAssignment(n))continue;let i=D.isIdentifier(n.name)||D.isStringLiteral(n.name)?n.name.text:void 0;i!==void 0&&(t[i]=Dr(n.initializer))}return t}Ui(B,"parseObjectLiteral");function Dr(e){if(D.isStringLiteral(e))return e.text;if(D.isNumericLiteral(e))return Number(e.text);if(e.kind===D.SyntaxKind.TrueKeyword)return!0;if(e.kind===D.SyntaxKind.FalseKeyword)return!1;if(D.isArrayLiteralExpression(e))return e.elements.map(t=>Dr(t));if(D.isObjectLiteralExpression(e))return B(e);if(D.isIdentifier(e))return{__identifier:e.text};if(D.isPropertyAccessExpression(e))return{__expression:e.getText()};if(D.isCallExpression(e))return{__call:e.getText()};if(D.isBinaryExpression(e)&&e.operatorToken.kind===D.SyntaxKind.BarBarToken){let t=Dr(e.left),n=Dr(e.right);return typeof n=="string"?n:t}else if(D.isConditionalExpression(e)){let t=Dr(e.whenTrue),n=Dr(e.whenFalse);return typeof n=="string"||typeof n=="number"?n:t}else if(D.isTemplateExpression(e)||D.isNoSubstitutionTemplateLiteral(e))return{__expression:e.getText()};return{__unknown:e.getText()}}Ui(Dr,"evaluateExpression");function Ba(e,t){return nt(e,n=>{if(D.isVariableStatement(n)){for(let i of n.declarationList.declarations)if(D.isIdentifier(i.name)&&i.name.text===t&&i.initializer){if(D.isStringLiteral(i.initializer))return i.initializer.text;if(D.isObjectLiteralExpression(i.initializer)){let r=B(i.initializer);return JSON.stringify(r)}}}})}Ui(Ba,"findVariableValue");function Nb(e,t){return nt(e,n=>{if(D.isVariableStatement(n)){for(let i of n.declarationList.declarations)if(D.isIdentifier(i.name)&&i.name.text===t&&i.initializer&&D.isObjectLiteralExpression(i.initializer))return B(i.initializer)}})}Ui(Nb,"findObjectDeclaration");function Va(e,t){if(!D.isIdentifier(t.expression))return;let n=Nb(e,t.expression.text),i=t.name.text;if(n&&n[i]!==void 0)return String(n[i])}Ui(Va,"evaluatePropertyAccess");function Cl(e,t){let n=t.head.text;for(let i of t.templateSpans){if(D.isIdentifier(i.expression)){let r=Ba(e,i.expression.text);if(r)n+=r;else return t.getText(e).replace(/^`|`$/g,"")}else if(D.isPropertyAccessExpression(i.expression)){let r=Va(e,i.expression);if(r)n+=r;else return t.getText(e).replace(/^`|`$/g,"")}else return t.getText(e).replace(/^`|`$/g,"");n+=i.literal.text}return n}Ui(Cl,"resolveTemplateLiteral");var c2=Object.defineProperty,Q=(e,t)=>c2(e,"name",{value:t,configurable:!0});function ht(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}Q(ht,"isPlainObject");function cr(e){return ht(e)&&"__identifier"in e}Q(cr,"isIdentifierRef");function Mr(e){return ht(e)&&"__expression"in e}Q(Mr,"isExpressionRef");function Tt(e){return ht(e)&&"__call"in e}Q(Tt,"isCallRef");function P(e){return ht(e)&&!("__identifier"in e)&&!("__expression"in e)&&!("__call"in e)&&!("__unknown"in e)}Q(P,"isParsedObject");function b(e){return typeof e=="string"?e:void 0}Q(b,"asString");function C(e){return typeof e=="number"?e:void 0}Q(C,"asNumber");function j(e){return typeof e=="boolean"?e:void 0}Q(j,"asBoolean");function de(e){if(!Array.isArray(e))return;let t=[];for(let n of e)typeof n=="string"&&t.push(n);return t.length>0?t:void 0}Q(de,"asStringArray");function U(e,t){let n=b(e);if(n!==void 0)return mt(t,n)?n:void 0}Q(U,"asStringUnion");function Ye(e){let t={};for(let[n,i]of Object.entries(e))i!==void 0&&(t[n]=i);return t}Q(Ye,"omitUndefined");function Rl(e){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e=="string")return JSON.stringify(e);if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return`[${e.map(Rl).join(", ")}]`;if(!ht(e))return String(e);if(cr(e))return e.__identifier;if(Mr(e))return e.__expression;if(Tt(e))return e.__call;if("__unknown"in e&&typeof e.__unknown=="string")return e.__unknown;let t=Object.entries(e);return t.length===0?"{}":`{ ${t.map(([n,i])=>`${n}: ${Rl(i)}`).join(", ")} }`}Q(Rl,"parsedValueToSourceText");function le(e,t){let n=[];for(let[i,r]of Object.entries(e))t.has(i)||r===void 0||n.push({key:i,sourceText:Rl(r)});return n}Q(le,"captureExtraProperties");function jr(e,t){return ve.isPropertyAssignment(e)&&ve.isIdentifier(e.name)&&e.name.text===t}Q(jr,"isNamedProperty");function Vt(e){return ve.isCallExpression(e)&&ve.isPropertyAccessExpression(e.expression)&&e.expression.name.text==="getApp"&&ve.isIdentifier(e.expression.expression)&&e.expression.expression.text==="App"}Q(Vt,"isAppGetAppCall");function Ie(e,t){let{expression:n}=e;return ve.isPropertyAccessExpression(n)&&n.name.text===t&&e.arguments.length>0}Q(Ie,"isFactoryMethodCall");function nt(e,t){let n,i=Q(r=>{n===void 0&&(n=t(r),n===void 0&&ve.forEachChild(r,i))},"visit");return i(e),n}Q(nt,"findFirstInAst");function Pe(e,t){let n=[],i=Q(r=>{let o=t(r);o!==null&&n.push(o),ve.forEachChild(r,i)},"visit");return i(e),n}Q(Pe,"collectFromAst");function Fe(e,t){return ve.isCallExpression(e)&&ve.isPropertyAccessExpression(e.expression)&&e.expression.name.text==="build"&&ve.isIdentifier(e.expression.expression)&&e.expression.expression.text===t}Q(Fe,"isFactoryBuildCall");function it(e){let t=e.parent;if(ve.isVariableDeclaration(t)&&ve.isIdentifier(t.name))return t.name.text}Q(it,"extractVariableName");var vt=Q(()=>e=>e,"typed");function Fi(e){if(e!=null){if(e===!1)return!1;if(typeof e=="object"&&!Array.isArray(e))return e}}Q(Fi,"asObjectOrFalse");function ur(e,t){return e===!1?!1:P(e)?t(e):void 0}Q(ur,"parseBooleanOrConfig");function Ne(e,t){return P(e)?t(e):void 0}Q(Ne,"parseOptionalConfig");function bt(e,t,n){let i=e[t];return P(i)?n(i):void 0}Q(bt,"extractSubConfig");import*as H from"typescript";import*as Bi from"typescript";var u2=Object.defineProperty,ot=(e,t)=>u2(e,"name",{value:t,configurable:!0});function Ga(e){return e!==void 0&&ht(e)}ot(Ga,"isEnvironmentRecord");function x0(e){if(!P(e))return;let t={};for(let[n,i]of Object.entries(e))if(P(i)){let r=b(i.id),o=b(i.name);r&&o&&(t[n]={id:r,name:o,field:b(i.field)})}return Object.keys(t).length>0?t:void 0}ot(x0,"parseContainerSecretsImport");function A0(e){if(!P(e))return;let t=de(e.command);if(!(!t||t.length===0))return{command:t,interval:C(e.interval),timeout:C(e.timeout),retries:C(e.retries),startPeriod:C(e.startPeriod)}}ot(A0,"parseContainerHealthCheck");function I0(e){let t=le(e,new Set(["name","image","port","environment","essential","command","entryPoint","secretsImport","secrets","healthCheck"]));return{name:b(e.name),image:b(e.image),port:C(e.port),environment:Ga(e.environment)?e.environment:void 0,essential:j(e.essential),command:de(e.command),entryPoint:de(e.entryPoint),secretsImport:x0(e.secretsImport),ssmSecrets:de(e.secrets),healthCheck:A0(e.healthCheck),extraProperties:t.length>0?t:void 0}}ot(I0,"parseServiceContainer");function $0(e){if(Array.isArray(e))return e.filter(P).map(t=>({path:b(t.path),host:b(t.host),priority:C(t.priority),healthCheckPath:b(t.healthCheckPath)}));if(P(e))return{path:b(e.path),host:b(e.host),priority:C(e.priority),healthCheckPath:b(e.healthCheckPath)}}ot($0,"parseServiceRouting");function T0(e){if(e===!1)return!1;if(P(e))return{minCapacity:C(e.minCapacity),maxCapacity:C(e.maxCapacity),desiredCount:C(e.desiredCount),scalingType:U(e.scalingType,Lu)}}ot(T0,"parseServiceScaling");var l2=new Set(["instanceType","amiHardwareType","minCapacity","maxCapacity","memoryLimitMiB","warmPool"]);function C0(e){if(!P(e))return;let t=e.warmPool,n=P(t)?{minSize:C(t.minSize),reuseOnScaleIn:j(t.reuseOnScaleIn)}:void 0,i=le(e,l2);return{instanceType:b(e.instanceType),amiHardwareType:U(e.amiHardwareType,Uu),minCapacity:C(e.minCapacity),maxCapacity:C(e.maxCapacity),memoryLimitMiB:C(e.memoryLimitMiB),warmPool:n,extraProperties:i.length>0?i:void 0}}ot(C0,"parseServiceEc2Config");var d2=new Set(["domain","loadBalancer","directAccess"]);function wb(e){if(!P(e))return;let t=e.loadBalancer,n=le(e,d2);return{domain:b(e.domain),loadBalancer:t===!1?!1:U(t,zu),directAccess:j(e.directAccess),...n.length>0&&{extraProperties:n}}}ot(wb,"extractClusterConfig");function kb(e){let t=e.containers,n=Array.isArray(t)?t.filter(P).map(I0):void 0,i=le(e,new Set(["name","image","docker","ssmSecretsPath","containers","routing","connections","cpu","memoryLimitMiB","desiredCount","scaling","capacityProvider","ec2Config"]));return{name:b(e.name)??"",image:b(e.image),docker:R0(e.docker),ssmSecretsPath:b(e.ssmSecretsPath),containers:n,routing:$0(e.routing),cpu:C(e.cpu),memoryLimitMiB:C(e.memoryLimitMiB),desiredCount:C(e.desiredCount),scaling:T0(e.scaling),capacityProvider:U(e.capacityProvider,$i)??"FARGATE",ec2Config:C0(e.ec2Config),...i.length>0&&{extraProperties:i}}}ot(kb,"parseEcsService");function R0(e){if(!P(e))return;let t=b(e.path);if(t===void 0)return;let n=b(e.context),i=b(e.target);return{path:t,...n!==void 0&&{context:n},...i!==void 0&&{target:i}}}ot(R0,"parseServiceDocker");function Za(e,t){let n=b(e);if(n)return n;if(Mr(e)&&e.__expression.startsWith(t+"."))return e.__expression.slice(t.length+1)}ot(Za,"extractEnumString");function Ob(e){return Tt(e)?e.__call.match(/\(\s*"([^"]+)"\s*\)/)?.[1]:void 0}ot(Ob,"extractCallStringArg");function we(e,t,n){n!==void 0&&(e[t]=n)}ot(we,"assignIfDefined");var m2=Object.defineProperty,Pl=(e,t)=>m2(e,"name",{value:t,configurable:!0}),p2=10;function Db(e,t){return Array.isArray(e)?e.filter(cr).map(n=>t.find(i=>i.variableName===n.__identifier)).filter(n=>n!==void 0).map(n=>n.resourceName):[]}Pl(Db,"resolveConnectedDatabaseNames");function Mb(e,t){return Array.isArray(e)?e.filter(cr).map(n=>t.find(i=>i.variableName===n.__identifier)).filter(n=>n!==void 0).map(n=>n.resourceName):[]}Pl(Mb,"resolveConnectedStorageNames");function jb(e,t,n){if(!Array.isArray(t)||t.length===0)return;let i=t[0];if(!P(i))return;let r=i.containers;if(!Array.isArray(r)||r.length===0)return;let o=r[0];if(!P(o)||!P(o.environment))return;let a=o.environment;(a.DATABASE_HOST||a.DATABASE_PORT||a.DATABASE_NAME)&&(e.needsConnection=!0,n.length>0&&(e.connectedDatabase??[]).length===0&&(e.connectedDatabase=[n[0].name]));for(let c=1;c<=p2;c++)(a[`DATABASE_HOST_${c}`]||a[`DATABASE_PORT_${c}`]||a[`DATABASE_NAME_${c}`])&&(e.needsConnection=!0)}Pl(jb,"inferDatabaseConnectionsFromEnv");function zb(e,t,n){if(!Array.isArray(t)||t.length===0)return;let i=t[0];if(!P(i))return;let r=i.containers;if(!Array.isArray(r)||r.length===0)return;let o=r[0];!P(o)||!P(o.environment)||o.environment.BUCKET_NAME&&n.length>0&&(e.connectedStorage??[]).length===0&&(e.connectedStorage=[n[0].name])}Pl(zb,"inferStorageConnectionsFromEnv");var f2=Object.defineProperty,lr=(e,t)=>f2(e,"name",{value:t,configurable:!0});function P0(e){if(e.arguments.length<2)return null;let t=e.arguments[0],n=e.arguments[1];if(!Bi.isStringLiteral(t)||!Bi.isObjectLiteralExpression(n))return null;let i=t.text,r=B(n);return{resourceName:i,type:b(r.type)??"ecs",config:r,node:e}}lr(P0,"extractComputeResource");function Nl(e){return Pe(e,t=>{if(!Bi.isCallExpression(t)||!Ie(t,"addCompute"))return null;let n=t.arguments[0];if(!Fe(n,"ComputeFactory"))return null;let i=P0(n);if(i){let r=it(t);r&&(i.variableName=r)}return i})}lr(Nl,"findComputeResources");function wl(e,t,n){let i=le(e.config,n);i.length>0&&(t.extraProperties=i)}lr(wl,"applyExtras");function N0(e,t){let n=e.config.docker;if(P(n)){let o=b(n.path),a=b(n.context),c=b(n.target);(o!==void 0||a!==void 0||c!==void 0)&&(t.docker={...o!==void 0&&{path:o},...a!==void 0&&{context:a},...c!==void 0&&{target:c}})}let i=e.config.cluster;i!==void 0&&(t.cluster=wb(i));let r=e.config.services;r!==void 0&&Array.isArray(r)&&(t.services=r.filter(o=>P(o)).map(kb)),wl(e,t,new Set(["type","ecrRepository","docker","cluster","services","connections"]))}lr(N0,"convertEcsCompute");function w0(e,t){if(we(t,"deployment",U(e.config.deployment,Mu)),we(t,"timeout",C(e.config.timeout)),we(t,"memory",C(e.config.memorySize)??C(e.config.memory)),we(t,"handler",b(e.config.handler)),we(t,"runtime",Za(e.config.runtime,"Runtime")),Ga(e.config.environment)&&(t.environment=e.config.environment),Ga(e.config.secrets))t.secrets=e.config.secrets;else{let r=de(e.config.secrets);r&&(t.ssmSecrets=r)}let n=e.config.functionUrl;if(P(n)){let r=U(Za(n.authType,"FunctionUrlAuthType"),fa);r!==void 0&&(t.functionUrl={authType:r})}let i=e.config.code;if(i!==void 0){let r=Ob(i);r&&(t.codePath=r)}we(t,"description",b(e.config.lambdaDescription)),we(t,"architecture",U(Za(e.config.architecture,"Architecture"),ju)),we(t,"ephemeralStorageSize",C(e.config.ephemeralStorageSize)),we(t,"functionName",b(e.config.functionName)),we(t,"ssmSecretsPath",b(e.config.ssmSecretsPath)),wl(e,t,new Set(["type","deployment","timeout","memorySize","memory","handler","runtime","environment","secrets","functionUrl","code","connections","ecrRepository","containerSecretsImport","lambdaDescription","architecture","ephemeralStorageSize","functionName","ssmSecretsPath"]))}lr(w0,"convertLambdaCompute");function k0(e,t){we(t,"instanceType",U(e.config.instanceType,Fu));let n=e.config.ssh;n===!1?t.enableSSH=!1:n!==void 0&&P(n)?t.enableSSH=!0:we(t,"enableSSH",j(e.config.enableSSH)),we(t,"keyName",b(e.config.keyName)),we(t,"userData",b(e.config.userData)),e.config.securityGroups!==void 0&&(t.securityGroups=de(e.config.securityGroups)),wl(e,t,new Set(["type","instanceType","ssh","enableSSH","keyName","userData","securityGroups","connections"]))}lr(k0,"convertEc2Compute");function O0(e,t,n,i){let r=t.config.connections;if(!r&&Array.isArray(t.config.services)){let c=t.config.services[0];P(c)&&(r=c.connections)}if(!r)return;let o=Db(r,n);o.length>0&&(e.needsConnection=!0,e.connectedDatabase=o);let a=Mb(r,i);a.length>0&&(e.connectedStorage=a)}lr(O0,"applyConnectionConfig");function D0(e,t){({ecs:N0,lambda:w0,ec2:k0})[e.type]?.(t,e)}lr(D0,"applyTypeSpecificConfig");function Lb(e,t,n,i){return e.map(r=>{let o=U(r.config.type,ma)??"ecs",a={name:r.resourceName,type:o,needsConnection:!1,connectedDatabase:[],...r.variableName&&{variableName:r.variableName}};return O0(a,r,t,n),D0(a,r),jb(a,r.config.services,i.database),zb(a,r.config.services,i.s3),a})}lr(Lb,"convertComputeResources");import*as yt from"typescript";var g2=Object.defineProperty,h2=(e,t)=>g2(e,"name",{value:t,configurable:!0});function kl(e){return Pe(e,t=>{if(!yt.isCallExpression(t)||!Ie(t,"addSchedule")||t.arguments.length<2)return null;let n=t.arguments[0],i=t.arguments[1];if(!yt.isStringLiteral(n)||!yt.isObjectLiteralExpression(i))return null;let r=B(i),o=b(r.schedule);if(o===void 0)return null;let a=i.properties.find(c=>yt.isPropertyAssignment(c)&&yt.isIdentifier(c.name)&&c.name.text==="target");return!a||!yt.isPropertyAssignment(a)||!yt.isIdentifier(a.initializer)?null:{id:n.text,schedule:o,targetVariableName:a.initializer.text}})}h2(kl,"findSchedules");import*as ee from"typescript";import*as Be from"typescript";var v2=Object.defineProperty,Wa=(e,t)=>v2(e,"name",{value:t,configurable:!0}),Ub=new Set(["S3Bucket"]);function M0(e,t,n){let i=Be.isIdentifier(e.name)?e.name.text:"";if(t.arguments&&t.arguments.length>=2){let r=t.arguments[1],o=Be.isStringLiteral(r)?r.text:"",a=t.arguments.length>=3?t.arguments[2]:void 0,c=a&&Be.isObjectLiteralExpression(a)?B(a):{};return{variableName:i,resourceName:o,bucketClass:n,config:c,node:e}}return null}Wa(M0,"extractS3Resource");function j0(e,t){if(t.arguments.length<2)return null;let n=t.arguments[0],i=t.arguments[1];if(!Be.isStringLiteral(n)||!Be.isObjectLiteralExpression(i))return null;let r=B(i);return{variableName:it(e)??"",resourceName:n.text,bucketClass:"StorageFactory",config:r,node:e}}Wa(j0,"extractS3FactoryResource");function Fb(e){return Pe(e,t=>{if(!Be.isVariableDeclaration(t)||!t.initializer||!Be.isNewExpression(t.initializer))return null;let n=t.initializer;if(!Be.isIdentifier(n.expression))return null;let i=n.expression.text;return Ub.has(i)?M0(t,n,i):null})}Wa(Fb,"findS3Resources");function Bb(e){return Pe(e,t=>{if(!Be.isCallExpression(t)||!Ie(t,"addStorage"))return null;let n=t.arguments[0];return Fe(n,"StorageFactory")?j0(t,n):null})}Wa(Bb,"findS3FactoryResources");function Vb(e){return e.map(t=>({name:t.resourceName,...b(t.config.bucketName)&&{bucketName:b(t.config.bucketName)},...j(t.config.publicReadAccess)===!0&&{publicReadAccess:!0},...P(t.config.websiteHosting)&&(()=>{let n=t.config.websiteHosting;return{websiteHosting:{indexDocument:b(n.indexDocument)??"index.html",...b(n.errorDocument)&&{errorDocument:b(n.errorDocument)}}}})(),...U(t.config.backupVaultTier,$t)&&{backupVaultTier:U(t.config.backupVaultTier,$t)},...j(t.config.versioned)!==void 0&&{versioned:j(t.config.versioned)},...U(t.config.encryption,Pi)&&{encryption:U(t.config.encryption,Pi)},...b(t.config.kmsKeyArn)&&{kmsKeyArn:b(t.config.kmsKeyArn)},...Array.isArray(t.config.cors)&&t.config.cors.length>0&&{cors:t.config.cors.filter(P).map(n=>({allowedOrigins:Array.isArray(n.allowedOrigins)?n.allowedOrigins.filter(i=>typeof i=="string"):[],allowedMethods:Array.isArray(n.allowedMethods)?n.allowedMethods.filter(i=>typeof i=="string"):[]}))},...P(t.config.deployment)&&(()=>{let n=t.config.deployment;return{deployment:{source:b(n.source)??"",...j(n.prune)!==void 0&&{prune:j(n.prune)},...P(n.cacheControl)&&(()=>{let i=n.cacheControl;return{cacheControl:{...C(i.maxAge)!==void 0&&{maxAge:C(i.maxAge)},...j(i.immutable)!==void 0&&{immutable:j(i.immutable)}}}})()}}})(),...U(t.config.stackPlacement,el)&&{stackPlacement:U(t.config.stackPlacement,el)},...t.variableName&&{variableName:t.variableName},...(()=>{let n=new Set(["bucketName","publicReadAccess","websiteHosting","backupVaultTier","versioned","encryption","kmsKeyArn","cors","deployment","stackPlacement"]),i=le(t.config,n);return i.length>0?{extraProperties:i}:{}})()}))}Wa(Vb,"convertS3Resources");var b2=Object.defineProperty,In=(e,t)=>b2(e,"name",{value:t,configurable:!0}),z0=new Set(["App","Architecture","DatabaseFactory","StorageFactory","ComputeFactory","getConfig","MessagingFactory","CdnFactory","Code","Runtime","FunctionUrlAuthType","NetworkFactory","PatternFactory","CrossPlanConnectionFactory"]);function Ol(e){return!!(e.startsWith("@fjall/")||e==="aws-cdk-lib"||e.startsWith("aws-cdk-lib/")||e==="constructs")}In(Ol,"isManagedModuleSpecifier");function Xe(e){let t=[];for(let n of e.statements){let i=n.getFullStart(),r=n.getEnd();if(ee.isImportDeclaration(n)){t.push({type:"import",node:n,startPos:i,endPos:r,isManaged:L0(n)});continue}if(ee.isVariableStatement(n)){t.push(U0(n,i,r));continue}if(ee.isExpressionStatement(n)){t.push(F0(n,i,r));continue}t.push({type:"custom",node:n,startPos:i,endPos:r,isManaged:!1})}return t}In(Xe,"classifyStatements");function L0(e){return ee.isStringLiteral(e.moduleSpecifier)?Ol(e.moduleSpecifier.text):!1}In(L0,"isManagedImport");function U0(e,t,n){for(let i of e.declarationList.declarations)if(i.initializer){if(Vt(i.initializer))return{type:"app-init",node:e,resourceName:ee.isIdentifier(i.name)?i.name.text:void 0,startPos:t,endPos:n,isManaged:!0};if(ee.isIdentifier(i.name)&&i.name.text==="appName"&&ee.isStringLiteral(i.initializer))return{type:"app-init",node:e,startPos:t,endPos:n,isManaged:!0};if(ee.isNewExpression(i.initializer)){let r=i.initializer;if(ee.isIdentifier(r.expression)){let o=r.expression.text;if(Ub.has(o)){let a=r.arguments&&r.arguments.length>=2&&ee.isStringLiteral(r.arguments[1])?r.arguments[1].text:void 0;return{type:"storage",node:e,resourceName:a,startPos:t,endPos:n,isManaged:!0}}}}if(ee.isCallExpression(i.initializer)){let r=Gb(i.initializer,e,t,n);if(r.type!=="custom")return r}}return{type:"custom",node:e,startPos:t,endPos:n,isManaged:!1}}In(U0,"classifyVariableStatement");function F0(e,t,n){let i=e.expression;return ee.isCallExpression(i)?Gb(i,e,t,n):{type:"custom",node:e,startPos:t,endPos:n,isManaged:!1}}In(F0,"classifyExpressionStatement");function Gb(e,t,n,i){let r=e.expression;if(ee.isPropertyAccessExpression(r)&&ee.isIdentifier(r.expression)){let o=r.name.text;if(o==="addTags")return{type:"tags",node:t,startPos:n,endPos:i,isManaged:!0};let a={addDatabase:{type:"database",factory:"DatabaseFactory"},addCompute:{type:"compute",factory:"ComputeFactory"},addNetwork:{type:"network",factory:"NetworkFactory"},addMessaging:{type:"messaging",factory:"MessagingFactory"},addCdn:{type:"cdn",factory:"CdnFactory"},addPattern:{type:"pattern",factory:"PatternFactory"},addStorage:{type:"storage",factory:"StorageFactory"}}[o];if(a){let c=B0(e,a.factory);return{type:a.type,node:t,resourceName:c,startPos:n,endPos:i,isManaged:!0}}}return{type:"custom",node:t,startPos:n,endPos:i,isManaged:!1}}In(Gb,"classifyCallExpression");function B0(e,t){if(e.arguments.length===0)return;let n=e.arguments[0];if(!ee.isCallExpression(n))return;let i=n.expression;if(!ee.isPropertyAccessExpression(i)||i.name.text!=="build"||!ee.isIdentifier(i.expression)||i.expression.text!==t||n.arguments.length===0)return;let r=n.arguments[0];if(ee.isStringLiteral(r))return r.text}In(B0,"extractResourceNameFromFactoryCall");import*as V0 from"typescript";var y2=Object.defineProperty,$n=(e,t)=>y2(e,"name",{value:t,configurable:!0}),S2={import:"after-imports","app-init":"after-app-init",tags:"after-tags"};function G0(e){if(!e)return{position:"before-imports"};let t=S2[e.type];return t?{position:t}:{position:"after-resource",afterManagedResource:{type:e.type,name:e.resourceName}}}$n(G0,"determineCustomBlockPosition");function Ha(e,t){let n=t??Xe(e),i=[],r=e.getFullText(),o=null;for(let a of n)if(a.type==="custom"&&!a.isManaged){let{position:c,afterManagedResource:u}=G0(o),l=Z0(r,a.node),m=W0(r,a.node),p=e.getLineAndCharacterOfPosition(a.node.getStart());i.push({sourceText:l,position:c,afterManagedResource:u,originalLine:p.line+1,leadingComments:m.length>0?m:void 0})}else a.isManaged&&(o=a);return i}$n(Ha,"extractCustomCodeBlocks");function Z0(e,t){let n=t.getFullStart(),i=t.getEnd(),r=e.slice(n,i).split(`
427
+ `,n}sr(Nl,"generateCDNCode");function Pl(e){let t=new Set;if(e.cdn&&(e.cdn.defaultOriginRef&&t.add(e.cdn.defaultOriginRef),e.cdn.behaviours))for(let n of e.cdn.behaviours)t.add(n.originRef);return t}sr(Pl,"collectCdnReferencedResources");function wl(e){return e.patternConfig!==void 0}sr(wl,"usesPatternApproach");var A2=Object.defineProperty,Rn=(e,t)=>A2(e,"name",{value:t,configurable:!0}),Wa="service",kb="0 4 * * ? *",Ob="0 5 * * ? *",cr=Object.freeze({tinkerer:{displayName:"Tinkerer",description:"Free tier eligible, minimal cost for experimentation",database:{Instance:{instanceType:"t4g.micro",multiAz:!1,proxy:!1,readReplica:!1,publiclyAccessible:!0},Aurora:null,GlobalAurora:null,ClickHouse:null},compute:{ecs:{services:[{name:Wa,capacityProvider:"EC2",desiredCount:1,minCapacity:1,maxCapacity:1,ec2Config:{instanceType:"t4g.micro",amiHardwareType:"ARM",minCapacity:1,maxCapacity:1,memoryLimitMiB:400}}],cluster:{directAccess:!0}},lambda:{timeout:30,memory:128}},network:{maxAzs:2,natGateways:!1,flowLogs:!1},backup:!1},lightweight:{displayName:"Lightweight",description:"Streamlined single-AZ deployment for cost efficiency",database:{Instance:{instanceType:"t4g.small",multiAz:!1},Aurora:{readers:!1},GlobalAurora:null,ClickHouse:null},compute:{ecs:{services:[{name:Wa,capacityProvider:"FARGATE_SPOT",cpu:256,memoryLimitMiB:512,desiredCount:1,minCapacity:1,maxCapacity:3}]},lambda:{timeout:30,memory:256}},network:{maxAzs:2,natGateways:{count:1},flowLogs:!1},backup:!1},standard:{displayName:"Standard",description:"Production-ready with sensible defaults",database:{Instance:{instanceType:"t4g.large"},Aurora:{readers:{count:1}},GlobalAurora:{readers:{count:1}},ClickHouse:{instanceType:"t4g.medium",coldTier:{mode:"s3"},optimiseSchedule:kb,backupSchedule:Ob,backupRetentionDays:14}},compute:{ecs:{services:[{name:Wa,capacityProvider:"FARGATE",cpu:512,memoryLimitMiB:1024,desiredCount:2,minCapacity:2,maxCapacity:5}]},lambda:{timeout:60,memory:256}},network:{maxAzs:3,natGateways:{count:1},flowLogs:{},vpcEndpoints:{interface:{ecr:!0}}},backup:!1},resilient:{displayName:"Resilient",description:"High availability with enhanced monitoring and scaling",database:{Instance:{instanceType:"r7g.large",encryption:{storageKey:{useCMK:!0}},databaseInsights:{mode:"advanced",encryptionKey:{useCMK:!0}},proxy:{requireTLS:!0}},Aurora:{readers:{count:2},encryption:{storageKey:{useCMK:!0}},databaseInsights:{mode:"advanced",encryptionKey:{useCMK:!0}},proxy:{requireTLS:!0},backupRetention:30},GlobalAurora:{readers:{count:2},encryption:{storageKey:{useCMK:!0}},databaseInsights:{mode:"advanced",encryptionKey:{useCMK:!0}},proxy:{requireTLS:!0},backupRetention:30,enableGlobalWriteForwarding:!0},ClickHouse:{instanceType:"m6g.large",coldTier:{mode:"s3"},optimiseSchedule:kb,backupSchedule:Ob,backupRetentionDays:14}},compute:{ecs:{services:[{name:Wa,capacityProvider:"FARGATE",cpu:1024,memoryLimitMiB:2048,desiredCount:4,minCapacity:4,maxCapacity:20}]},lambda:{timeout:120,memory:512}},network:{maxAzs:3,natGateways:{count:3},flowLogs:{retentionDays:90},vpcEndpoints:{interface:{ecr:!0,secretsManager:!0}}},backup:{tier:"resilient"}},enterprise:{displayName:"Enterprise",description:"Maximum capability with all features enabled",database:{Instance:{instanceType:"r7g.xlarge",encryption:{storageKey:{useCMK:!0}},databaseInsights:{mode:"advanced",encryptionKey:{useCMK:!0}},proxy:{requireTLS:!0},readReplica:{}},Aurora:{readers:{count:2},encryption:{storageKey:{useCMK:!0}},databaseInsights:{mode:"advanced",encryptionKey:{useCMK:!0}},proxy:{requireTLS:!0},backupRetention:35},GlobalAurora:{readers:{count:2},encryption:{storageKey:{useCMK:!0}},databaseInsights:{mode:"advanced",encryptionKey:{useCMK:!0}},proxy:{requireTLS:!0},backupRetention:35,enableGlobalWriteForwarding:!0},ClickHouse:{instanceType:"m6g.xlarge",coldTier:{mode:"s3"},optimiseSchedule:kb,backupSchedule:Ob,backupRetentionDays:30}},compute:{ecs:{services:[{name:Wa,capacityProvider:"FARGATE",cpu:2048,memoryLimitMiB:4096,desiredCount:6,minCapacity:6,maxCapacity:100}]},lambda:{timeout:300,memory:1024}},network:{maxAzs:3,natGateways:{count:3},flowLogs:{destination:"s3",retentionDays:365},vpcEndpoints:{interface:{ecr:!0,secretsManager:!0,kms:!0,cloudwatchLogs:!0}}},backup:{tier:"enterprise"}}});function I2(e,t){return cr[e].database[t]}Rn(I2,"getDatabasePreset");function $2(e){return cr[e].compute.ecs}Rn($2,"getEcsPreset");function Db(e){return cr[e].network}Rn(Db,"getNetworkPreset");function D0(e){return Fu.filter(t=>cr[t].database[e]!==null)}Rn(D0,"getAvailableTiersForDatabase");function T2(e){return D0(e).map(t=>({label:cr[t].displayName,value:t,description:cr[t].description}))}Rn(T2,"getTierOptionsForDatabase");function Mb(e){switch(e){case"tinkerer":case"lightweight":case"standard":return"Instance";case"resilient":case"enterprise":return"Aurora"}}Rn(Mb,"getDefaultDatabaseTypeForTier");function jb(e,t){let n=cr[e].compute.ecs,i=n.services[0],r=!n.cluster?.directAccess&&n.cluster?.loadBalancer!==!1,o=t.filter(c=>c.serviceType!=="worker").length,a=t.findIndex(c=>c.serviceType!=="worker");return t.map((c,u)=>{let l=u===a,m=c.serviceType==="worker",p;return r&&!m&&(c.routing?p=c.routing:o>1&&(p={path:l?"/*":`/${c.name.toLowerCase()}/*`,...l?{}:{priority:100+u}})),{name:c.name,capacityProvider:i.capacityProvider,ec2Config:i.ec2Config,cpu:i.cpu,memoryLimitMiB:i.memoryLimitMiB,desiredCount:i.desiredCount,minCapacity:i.minCapacity,maxCapacity:i.maxCapacity,routing:p}})}Rn(jb,"applyTierDefaultsToServices");var R2=Object.defineProperty,zb=(e,t)=>R2(e,"name",{value:t,configurable:!0}),Ha=["lightweight","standard","resilient"],C2=[...Ha,"custom"],jr=Object.freeze({lightweight:{displayName:"Lightweight",description:"Cost-effective \xB7 Instance DB, minimal Lambda",database:{type:"Instance",instanceType:"t4g.small",backupRetention:7,deletionProtection:!1},compute:{memorySize:512,timeout:30},network:{maxAzs:2,natGateways:{count:1},flowLogs:!1},backup:!1},standard:{displayName:"Standard",description:"Production-ready \xB7 Instance DB, balanced Lambda",database:{type:"Instance",instanceType:"t4g.large",backupRetention:14,deletionProtection:!0},compute:{memorySize:1536,timeout:60},network:{maxAzs:3,natGateways:{count:1},flowLogs:{}},backup:{tier:"standard"}},resilient:{displayName:"Resilient",description:"High-availability \xB7 Aurora V2, KMS encryption",database:{type:"Aurora",backupRetention:30,deletionProtection:!0,encryption:{useCMK:!0}},compute:{memorySize:2048,timeout:120},network:{maxAzs:3,natGateways:{count:3},flowLogs:{retentionDays:90}},backup:{tier:"resilient"}}});function kl(e){return jr[e]}zb(kl,"getPatternTierPreset");function M0(){return[{label:jr.standard.displayName,value:"standard",description:jr.standard.description},{label:jr.lightweight.displayName,value:"lightweight",description:jr.lightweight.description},{label:jr.resilient.displayName,value:"resilient",description:jr.resilient.description},{label:"Custom",value:"custom",description:"Full control \xB7 Configure everything"}]}zb(M0,"getPatternTierOptions");var N2=new Set(Ha);function Ol(e){return N2.has(e)}zb(Ol,"isPatternTierName");var P2=Object.defineProperty,j0=(e,t)=>P2(e,"name",{value:t,configurable:!0}),Dl=Object.freeze({standard:{},assets:{versioned:!0,deployment:{source:"./assets"}},upload:{versioned:!0,cors:[{allowedOrigins:["*"],allowedMethods:["GET","PUT","POST"]}]},website:{publicReadAccess:!0,websiteHosting:{indexDocument:"index.html",errorDocument:"error.html"}}});function z0(e){return{...Dl[e]}}j0(z0,"getStoragePreset");function L0(){return[{label:"Standard",value:"standard"},{label:"Assets",value:"assets"},{label:"Upload",value:"upload"},{label:"Website Hosting",value:"website"}]}j0(L0,"getStoragePresetOptions");import*as ve from"typescript";import*as D from"typescript";var w2=Object.defineProperty,qi=(e,t)=>w2(e,"name",{value:t,configurable:!0});function B(e){let t={};for(let n of e.properties){if(!D.isPropertyAssignment(n))continue;let i=D.isIdentifier(n.name)||D.isStringLiteral(n.name)?n.name.text:void 0;i!==void 0&&(t[i]=zr(n.initializer))}return t}qi(B,"parseObjectLiteral");function zr(e){if(D.isStringLiteral(e))return e.text;if(D.isNumericLiteral(e))return Number(e.text);if(e.kind===D.SyntaxKind.TrueKeyword)return!0;if(e.kind===D.SyntaxKind.FalseKeyword)return!1;if(D.isArrayLiteralExpression(e))return e.elements.map(t=>zr(t));if(D.isObjectLiteralExpression(e))return B(e);if(D.isIdentifier(e))return{__identifier:e.text};if(D.isPropertyAccessExpression(e))return{__expression:e.getText()};if(D.isCallExpression(e))return{__call:e.getText()};if(D.isBinaryExpression(e)&&e.operatorToken.kind===D.SyntaxKind.BarBarToken){let t=zr(e.left),n=zr(e.right);return typeof n=="string"?n:t}else if(D.isConditionalExpression(e)){let t=zr(e.whenTrue),n=zr(e.whenFalse);return typeof n=="string"||typeof n=="number"?n:t}else if(D.isTemplateExpression(e)||D.isNoSubstitutionTemplateLiteral(e))return{__expression:e.getText()};return{__unknown:e.getText()}}qi(zr,"evaluateExpression");function qa(e,t){return it(e,n=>{if(D.isVariableStatement(n)){for(let i of n.declarationList.declarations)if(D.isIdentifier(i.name)&&i.name.text===t&&i.initializer){if(D.isStringLiteral(i.initializer))return i.initializer.text;if(D.isObjectLiteralExpression(i.initializer)){let r=B(i.initializer);return JSON.stringify(r)}}}})}qi(qa,"findVariableValue");function Lb(e,t){return it(e,n=>{if(D.isVariableStatement(n)){for(let i of n.declarationList.declarations)if(D.isIdentifier(i.name)&&i.name.text===t&&i.initializer&&D.isObjectLiteralExpression(i.initializer))return B(i.initializer)}})}qi(Lb,"findObjectDeclaration");function Ka(e,t){if(!D.isIdentifier(t.expression))return;let n=Lb(e,t.expression.text),i=t.name.text;if(n&&n[i]!==void 0)return String(n[i])}qi(Ka,"evaluatePropertyAccess");function Ml(e,t){let n=t.head.text;for(let i of t.templateSpans){if(D.isIdentifier(i.expression)){let r=qa(e,i.expression.text);if(r)n+=r;else return t.getText(e).replace(/^`|`$/g,"")}else if(D.isPropertyAccessExpression(i.expression)){let r=Ka(e,i.expression);if(r)n+=r;else return t.getText(e).replace(/^`|`$/g,"")}else return t.getText(e).replace(/^`|`$/g,"");n+=i.literal.text}return n}qi(Ml,"resolveTemplateLiteral");var k2=Object.defineProperty,Q=(e,t)=>k2(e,"name",{value:t,configurable:!0});function vt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}Q(vt,"isPlainObject");function ur(e){return vt(e)&&"__identifier"in e}Q(ur,"isIdentifierRef");function Lr(e){return vt(e)&&"__expression"in e}Q(Lr,"isExpressionRef");function Tt(e){return vt(e)&&"__call"in e}Q(Tt,"isCallRef");function N(e){return vt(e)&&!("__identifier"in e)&&!("__expression"in e)&&!("__call"in e)&&!("__unknown"in e)}Q(N,"isParsedObject");function b(e){return typeof e=="string"?e:void 0}Q(b,"asString");function C(e){return typeof e=="number"?e:void 0}Q(C,"asNumber");function j(e){return typeof e=="boolean"?e:void 0}Q(j,"asBoolean");function de(e){if(!Array.isArray(e))return;let t=[];for(let n of e)typeof n=="string"&&t.push(n);return t.length>0?t:void 0}Q(de,"asStringArray");function U(e,t){let n=b(e);if(n!==void 0)return ft(t,n)?n:void 0}Q(U,"asStringUnion");function Xe(e){let t={};for(let[n,i]of Object.entries(e))i!==void 0&&(t[n]=i);return t}Q(Xe,"omitUndefined");function jl(e){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e=="string")return JSON.stringify(e);if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return`[${e.map(jl).join(", ")}]`;if(!vt(e))return String(e);if(ur(e))return e.__identifier;if(Lr(e))return e.__expression;if(Tt(e))return e.__call;if("__unknown"in e&&typeof e.__unknown=="string")return e.__unknown;let t=Object.entries(e);return t.length===0?"{}":`{ ${t.map(([n,i])=>`${n}: ${jl(i)}`).join(", ")} }`}Q(jl,"parsedValueToSourceText");function le(e,t){let n=[];for(let[i,r]of Object.entries(e))t.has(i)||r===void 0||n.push({key:i,sourceText:jl(r)});return n}Q(le,"captureExtraProperties");function Ur(e,t){return ve.isPropertyAssignment(e)&&ve.isIdentifier(e.name)&&e.name.text===t}Q(Ur,"isNamedProperty");function Vt(e){return ve.isCallExpression(e)&&ve.isPropertyAccessExpression(e.expression)&&e.expression.name.text==="getApp"&&ve.isIdentifier(e.expression.expression)&&e.expression.expression.text==="App"}Q(Vt,"isAppGetAppCall");function Ie(e,t){let{expression:n}=e;return ve.isPropertyAccessExpression(n)&&n.name.text===t&&e.arguments.length>0}Q(Ie,"isFactoryMethodCall");function it(e,t){let n,i=Q(r=>{n===void 0&&(n=t(r),n===void 0&&ve.forEachChild(r,i))},"visit");return i(e),n}Q(it,"findFirstInAst");function we(e,t){let n=[],i=Q(r=>{let o=t(r);o!==null&&n.push(o),ve.forEachChild(r,i)},"visit");return i(e),n}Q(we,"collectFromAst");function Be(e,t){return ve.isCallExpression(e)&&ve.isPropertyAccessExpression(e.expression)&&e.expression.name.text==="build"&&ve.isIdentifier(e.expression.expression)&&e.expression.expression.text===t}Q(Be,"isFactoryBuildCall");function ot(e){let t=e.parent;if(ve.isVariableDeclaration(t)&&ve.isIdentifier(t.name))return t.name.text}Q(ot,"extractVariableName");var bt=Q(()=>e=>e,"typed");function Ki(e){if(e!=null){if(e===!1)return!1;if(typeof e=="object"&&!Array.isArray(e))return e}}Q(Ki,"asObjectOrFalse");function lr(e,t){return e===!1?!1:N(e)?t(e):void 0}Q(lr,"parseBooleanOrConfig");function ke(e,t){return N(e)?t(e):void 0}Q(ke,"parseOptionalConfig");function yt(e,t,n){let i=e[t];return N(i)?n(i):void 0}Q(yt,"extractSubConfig");import*as H from"typescript";import*as Yi from"typescript";var O2=Object.defineProperty,at=(e,t)=>O2(e,"name",{value:t,configurable:!0});function Ya(e){return e!==void 0&&vt(e)}at(Ya,"isEnvironmentRecord");function U0(e){if(!N(e))return;let t={};for(let[n,i]of Object.entries(e))if(N(i)){let r=b(i.id),o=b(i.name);r&&o&&(t[n]={id:r,name:o,field:b(i.field)})}return Object.keys(t).length>0?t:void 0}at(U0,"parseContainerSecretsImport");function F0(e){if(!N(e))return;let t=de(e.command);if(!(!t||t.length===0))return{command:t,interval:C(e.interval),timeout:C(e.timeout),retries:C(e.retries),startPeriod:C(e.startPeriod)}}at(F0,"parseContainerHealthCheck");function B0(e){let t=le(e,new Set(["name","image","port","environment","essential","command","entryPoint","secretsImport","secrets","healthCheck"]));return{name:b(e.name),image:b(e.image),port:C(e.port),environment:Ya(e.environment)?e.environment:void 0,essential:j(e.essential),command:de(e.command),entryPoint:de(e.entryPoint),secretsImport:U0(e.secretsImport),ssmSecrets:de(e.secrets),healthCheck:F0(e.healthCheck),extraProperties:t.length>0?t:void 0}}at(B0,"parseServiceContainer");function V0(e){if(Array.isArray(e))return e.filter(N).map(t=>({path:b(t.path),host:b(t.host),priority:C(t.priority),healthCheckPath:b(t.healthCheckPath)}));if(N(e))return{path:b(e.path),host:b(e.host),priority:C(e.priority),healthCheckPath:b(e.healthCheckPath)}}at(V0,"parseServiceRouting");function G0(e){if(e===!1)return!1;if(N(e))return{minCapacity:C(e.minCapacity),maxCapacity:C(e.maxCapacity),desiredCount:C(e.desiredCount),scalingType:U(e.scalingType,Zu)}}at(G0,"parseServiceScaling");var D2=new Set(["instanceType","amiHardwareType","minCapacity","maxCapacity","memoryLimitMiB","warmPool"]);function Z0(e){if(!N(e))return;let t=e.warmPool,n=N(t)?{minSize:C(t.minSize),reuseOnScaleIn:j(t.reuseOnScaleIn)}:void 0,i=le(e,D2);return{instanceType:b(e.instanceType),amiHardwareType:U(e.amiHardwareType,Wu),minCapacity:C(e.minCapacity),maxCapacity:C(e.maxCapacity),memoryLimitMiB:C(e.memoryLimitMiB),warmPool:n,extraProperties:i.length>0?i:void 0}}at(Z0,"parseServiceEc2Config");var M2=new Set(["domain","loadBalancer","directAccess"]);function Ub(e){if(!N(e))return;let t=e.loadBalancer,n=le(e,M2);return{domain:b(e.domain),loadBalancer:t===!1?!1:U(t,Gu),directAccess:j(e.directAccess),...n.length>0&&{extraProperties:n}}}at(Ub,"extractClusterConfig");function Fb(e){let t=e.containers,n=Array.isArray(t)?t.filter(N).map(B0):void 0,i=le(e,new Set(["name","image","docker","ssmSecretsPath","containers","routing","connections","cpu","memoryLimitMiB","desiredCount","scaling","capacityProvider","ec2Config"]));return{name:b(e.name)??"",image:b(e.image),docker:W0(e.docker),ssmSecretsPath:b(e.ssmSecretsPath),containers:n,routing:V0(e.routing),cpu:C(e.cpu),memoryLimitMiB:C(e.memoryLimitMiB),desiredCount:C(e.desiredCount),scaling:G0(e.scaling),capacityProvider:U(e.capacityProvider,Oi)??"FARGATE",ec2Config:Z0(e.ec2Config),...i.length>0&&{extraProperties:i}}}at(Fb,"parseEcsService");function W0(e){if(!N(e))return;let t=b(e.path);if(t===void 0)return;let n=b(e.context),i=b(e.target);return{path:t,...n!==void 0&&{context:n},...i!==void 0&&{target:i}}}at(W0,"parseServiceDocker");function Xa(e,t){let n=b(e);if(n)return n;if(Lr(e)&&e.__expression.startsWith(t+"."))return e.__expression.slice(t.length+1)}at(Xa,"extractEnumString");function Bb(e){return Tt(e)?e.__call.match(/\(\s*"([^"]+)"\s*\)/)?.[1]:void 0}at(Bb,"extractCallStringArg");function Oe(e,t,n){n!==void 0&&(e[t]=n)}at(Oe,"assignIfDefined");var j2=Object.defineProperty,zl=(e,t)=>j2(e,"name",{value:t,configurable:!0}),z2=10;function Vb(e,t){return Array.isArray(e)?e.filter(ur).map(n=>t.find(i=>i.variableName===n.__identifier)).filter(n=>n!==void 0).map(n=>n.resourceName):[]}zl(Vb,"resolveConnectedDatabaseNames");function Gb(e,t){return Array.isArray(e)?e.filter(ur).map(n=>t.find(i=>i.variableName===n.__identifier)).filter(n=>n!==void 0).map(n=>n.resourceName):[]}zl(Gb,"resolveConnectedStorageNames");function Zb(e,t,n){if(!Array.isArray(t)||t.length===0)return;let i=t[0];if(!N(i))return;let r=i.containers;if(!Array.isArray(r)||r.length===0)return;let o=r[0];if(!N(o)||!N(o.environment))return;let a=o.environment;(a.DATABASE_HOST||a.DATABASE_PORT||a.DATABASE_NAME)&&(e.needsConnection=!0,n.length>0&&(e.connectedDatabase??[]).length===0&&(e.connectedDatabase=[n[0].name]));for(let c=1;c<=z2;c++)(a[`DATABASE_HOST_${c}`]||a[`DATABASE_PORT_${c}`]||a[`DATABASE_NAME_${c}`])&&(e.needsConnection=!0)}zl(Zb,"inferDatabaseConnectionsFromEnv");function Wb(e,t,n){if(!Array.isArray(t)||t.length===0)return;let i=t[0];if(!N(i))return;let r=i.containers;if(!Array.isArray(r)||r.length===0)return;let o=r[0];!N(o)||!N(o.environment)||o.environment.BUCKET_NAME&&n.length>0&&(e.connectedStorage??[]).length===0&&(e.connectedStorage=[n[0].name])}zl(Wb,"inferStorageConnectionsFromEnv");var L2=Object.defineProperty,dr=(e,t)=>L2(e,"name",{value:t,configurable:!0});function H0(e){if(e.arguments.length<2)return null;let t=e.arguments[0],n=e.arguments[1];if(!Yi.isStringLiteral(t)||!Yi.isObjectLiteralExpression(n))return null;let i=t.text,r=B(n);return{resourceName:i,type:b(r.type)??"ecs",config:r,node:e}}dr(H0,"extractComputeResource");function Ll(e){return we(e,t=>{if(!Yi.isCallExpression(t)||!Ie(t,"addCompute"))return null;let n=t.arguments[0];if(!Be(n,"ComputeFactory"))return null;let i=H0(n);if(i){let r=ot(t);r&&(i.variableName=r)}return i})}dr(Ll,"findComputeResources");function Ul(e,t,n){let i=le(e.config,n);i.length>0&&(t.extraProperties=i)}dr(Ul,"applyExtras");function q0(e,t){let n=e.config.docker;if(N(n)){let o=b(n.path),a=b(n.context),c=b(n.target);(o!==void 0||a!==void 0||c!==void 0)&&(t.docker={...o!==void 0&&{path:o},...a!==void 0&&{context:a},...c!==void 0&&{target:c}})}let i=e.config.cluster;i!==void 0&&(t.cluster=Ub(i));let r=e.config.services;r!==void 0&&Array.isArray(r)&&(t.services=r.filter(o=>N(o)).map(Fb)),Ul(e,t,new Set(["type","ecrRepository","docker","cluster","services","connections"]))}dr(q0,"convertEcsCompute");function K0(e,t){if(Oe(t,"deployment",U(e.config.deployment,Bu)),Oe(t,"timeout",C(e.config.timeout)),Oe(t,"memory",C(e.config.memorySize)??C(e.config.memory)),Oe(t,"handler",b(e.config.handler)),Oe(t,"runtime",Xa(e.config.runtime,"Runtime")),Ya(e.config.environment)&&(t.environment=e.config.environment),Ya(e.config.secrets))t.secrets=e.config.secrets;else{let r=de(e.config.secrets);r&&(t.ssmSecrets=r)}let n=e.config.functionUrl;if(N(n)){let r=U(Xa(n.authType,"FunctionUrlAuthType"),Sa);r!==void 0&&(t.functionUrl={authType:r})}let i=e.config.code;if(i!==void 0){let r=Bb(i);r&&(t.codePath=r)}Oe(t,"description",b(e.config.lambdaDescription)),Oe(t,"architecture",U(Xa(e.config.architecture,"Architecture"),Vu)),Oe(t,"ephemeralStorageSize",C(e.config.ephemeralStorageSize)),Oe(t,"functionName",b(e.config.functionName)),Oe(t,"ssmSecretsPath",b(e.config.ssmSecretsPath)),Ul(e,t,new Set(["type","deployment","timeout","memorySize","memory","handler","runtime","environment","secrets","functionUrl","code","connections","ecrRepository","containerSecretsImport","lambdaDescription","architecture","ephemeralStorageSize","functionName","ssmSecretsPath"]))}dr(K0,"convertLambdaCompute");function Y0(e,t){Oe(t,"instanceType",U(e.config.instanceType,Hu));let n=e.config.ssh;n===!1?t.enableSSH=!1:n!==void 0&&N(n)?t.enableSSH=!0:Oe(t,"enableSSH",j(e.config.enableSSH)),Oe(t,"keyName",b(e.config.keyName)),Oe(t,"userData",b(e.config.userData)),e.config.securityGroups!==void 0&&(t.securityGroups=de(e.config.securityGroups)),Ul(e,t,new Set(["type","instanceType","ssh","enableSSH","keyName","userData","securityGroups","connections"]))}dr(Y0,"convertEc2Compute");function X0(e,t,n,i){let r=t.config.connections;if(!r&&Array.isArray(t.config.services)){let c=t.config.services[0];N(c)&&(r=c.connections)}if(!r)return;let o=Vb(r,n);o.length>0&&(e.needsConnection=!0,e.connectedDatabase=o);let a=Gb(r,i);a.length>0&&(e.connectedStorage=a)}dr(X0,"applyConnectionConfig");function J0(e,t){({ecs:q0,lambda:K0,ec2:Y0})[e.type]?.(t,e)}dr(J0,"applyTypeSpecificConfig");function Hb(e,t,n,i){return e.map(r=>{let o=U(r.config.type,ba)??"ecs",a={name:r.resourceName,type:o,needsConnection:!1,connectedDatabase:[],...r.variableName&&{variableName:r.variableName}};return X0(a,r,t,n),J0(a,r),Zb(a,r.config.services,i.database),Wb(a,r.config.services,i.s3),a})}dr(Hb,"convertComputeResources");import*as St from"typescript";var U2=Object.defineProperty,F2=(e,t)=>U2(e,"name",{value:t,configurable:!0});function Fl(e){return we(e,t=>{if(!St.isCallExpression(t)||!Ie(t,"addSchedule")||t.arguments.length<2)return null;let n=t.arguments[0],i=t.arguments[1];if(!St.isStringLiteral(n)||!St.isObjectLiteralExpression(i))return null;let r=B(i),o=b(r.schedule);if(o===void 0)return null;let a=i.properties.find(c=>St.isPropertyAssignment(c)&&St.isIdentifier(c.name)&&c.name.text==="target");return!a||!St.isPropertyAssignment(a)||!St.isIdentifier(a.initializer)?null:{id:n.text,schedule:o,targetVariableName:a.initializer.text}})}F2(Fl,"findSchedules");import*as ee from"typescript";import*as Ve from"typescript";var B2=Object.defineProperty,Ja=(e,t)=>B2(e,"name",{value:t,configurable:!0}),qb=new Set(["S3Bucket"]);function Q0(e,t,n){let i=Ve.isIdentifier(e.name)?e.name.text:"";if(t.arguments&&t.arguments.length>=2){let r=t.arguments[1],o=Ve.isStringLiteral(r)?r.text:"",a=t.arguments.length>=3?t.arguments[2]:void 0,c=a&&Ve.isObjectLiteralExpression(a)?B(a):{};return{variableName:i,resourceName:o,bucketClass:n,config:c,node:e}}return null}Ja(Q0,"extractS3Resource");function eR(e,t){if(t.arguments.length<2)return null;let n=t.arguments[0],i=t.arguments[1];if(!Ve.isStringLiteral(n)||!Ve.isObjectLiteralExpression(i))return null;let r=B(i);return{variableName:ot(e)??"",resourceName:n.text,bucketClass:"StorageFactory",config:r,node:e}}Ja(eR,"extractS3FactoryResource");function Kb(e){return we(e,t=>{if(!Ve.isVariableDeclaration(t)||!t.initializer||!Ve.isNewExpression(t.initializer))return null;let n=t.initializer;if(!Ve.isIdentifier(n.expression))return null;let i=n.expression.text;return qb.has(i)?Q0(t,n,i):null})}Ja(Kb,"findS3Resources");function Yb(e){return we(e,t=>{if(!Ve.isCallExpression(t)||!Ie(t,"addStorage"))return null;let n=t.arguments[0];return Be(n,"StorageFactory")?eR(t,n):null})}Ja(Yb,"findS3FactoryResources");function Xb(e){return e.map(t=>({name:t.resourceName,...b(t.config.bucketName)&&{bucketName:b(t.config.bucketName)},...j(t.config.publicReadAccess)===!0&&{publicReadAccess:!0},...N(t.config.websiteHosting)&&(()=>{let n=t.config.websiteHosting;return{websiteHosting:{indexDocument:b(n.indexDocument)??"index.html",...b(n.errorDocument)&&{errorDocument:b(n.errorDocument)}}}})(),...U(t.config.backupVaultTier,$t)&&{backupVaultTier:U(t.config.backupVaultTier,$t)},...j(t.config.versioned)!==void 0&&{versioned:j(t.config.versioned)},...U(t.config.encryption,zi)&&{encryption:U(t.config.encryption,zi)},...b(t.config.kmsKeyArn)&&{kmsKeyArn:b(t.config.kmsKeyArn)},...Array.isArray(t.config.cors)&&t.config.cors.length>0&&{cors:t.config.cors.filter(N).map(n=>({allowedOrigins:Array.isArray(n.allowedOrigins)?n.allowedOrigins.filter(i=>typeof i=="string"):[],allowedMethods:Array.isArray(n.allowedMethods)?n.allowedMethods.filter(i=>typeof i=="string"):[]}))},...N(t.config.deployment)&&(()=>{let n=t.config.deployment;return{deployment:{source:b(n.source)??"",...j(n.prune)!==void 0&&{prune:j(n.prune)},...N(n.cacheControl)&&(()=>{let i=n.cacheControl;return{cacheControl:{...C(i.maxAge)!==void 0&&{maxAge:C(i.maxAge)},...j(i.immutable)!==void 0&&{immutable:j(i.immutable)}}}})()}}})(),...U(t.config.stackPlacement,al)&&{stackPlacement:U(t.config.stackPlacement,al)},...t.variableName&&{variableName:t.variableName},...(()=>{let n=new Set(["bucketName","publicReadAccess","websiteHosting","backupVaultTier","versioned","encryption","kmsKeyArn","cors","deployment","stackPlacement"]),i=le(t.config,n);return i.length>0?{extraProperties:i}:{}})()}))}Ja(Xb,"convertS3Resources");var V2=Object.defineProperty,Cn=(e,t)=>V2(e,"name",{value:t,configurable:!0}),tR=new Set(["App","Architecture","DatabaseFactory","StorageFactory","ComputeFactory","getConfig","MessagingFactory","CdnFactory","Code","Runtime","FunctionUrlAuthType","NetworkFactory","PatternFactory","CrossPlanConnectionFactory"]);function Bl(e){return!!(e.startsWith("@fjall/")||e==="aws-cdk-lib"||e.startsWith("aws-cdk-lib/")||e==="constructs")}Cn(Bl,"isManagedModuleSpecifier");function Je(e){let t=[];for(let n of e.statements){let i=n.getFullStart(),r=n.getEnd();if(ee.isImportDeclaration(n)){t.push({type:"import",node:n,startPos:i,endPos:r,isManaged:rR(n)});continue}if(ee.isVariableStatement(n)){t.push(nR(n,i,r));continue}if(ee.isExpressionStatement(n)){t.push(iR(n,i,r));continue}t.push({type:"custom",node:n,startPos:i,endPos:r,isManaged:!1})}return t}Cn(Je,"classifyStatements");function rR(e){return ee.isStringLiteral(e.moduleSpecifier)?Bl(e.moduleSpecifier.text):!1}Cn(rR,"isManagedImport");function nR(e,t,n){for(let i of e.declarationList.declarations)if(i.initializer){if(Vt(i.initializer))return{type:"app-init",node:e,resourceName:ee.isIdentifier(i.name)?i.name.text:void 0,startPos:t,endPos:n,isManaged:!0};if(ee.isIdentifier(i.name)&&i.name.text==="appName"&&ee.isStringLiteral(i.initializer))return{type:"app-init",node:e,startPos:t,endPos:n,isManaged:!0};if(ee.isNewExpression(i.initializer)){let r=i.initializer;if(ee.isIdentifier(r.expression)){let o=r.expression.text;if(qb.has(o)){let a=r.arguments&&r.arguments.length>=2&&ee.isStringLiteral(r.arguments[1])?r.arguments[1].text:void 0;return{type:"storage",node:e,resourceName:a,startPos:t,endPos:n,isManaged:!0}}}}if(ee.isCallExpression(i.initializer)){let r=Jb(i.initializer,e,t,n);if(r.type!=="custom")return r}}return{type:"custom",node:e,startPos:t,endPos:n,isManaged:!1}}Cn(nR,"classifyVariableStatement");function iR(e,t,n){let i=e.expression;return ee.isCallExpression(i)?Jb(i,e,t,n):{type:"custom",node:e,startPos:t,endPos:n,isManaged:!1}}Cn(iR,"classifyExpressionStatement");function Jb(e,t,n,i){let r=e.expression;if(ee.isPropertyAccessExpression(r)&&ee.isIdentifier(r.expression)){let o=r.name.text;if(o==="addTags")return{type:"tags",node:t,startPos:n,endPos:i,isManaged:!0};let a={addDatabase:{type:"database",factory:"DatabaseFactory"},addCompute:{type:"compute",factory:"ComputeFactory"},addNetwork:{type:"network",factory:"NetworkFactory"},addMessaging:{type:"messaging",factory:"MessagingFactory"},addCdn:{type:"cdn",factory:"CdnFactory"},addPattern:{type:"pattern",factory:"PatternFactory"},addStorage:{type:"storage",factory:"StorageFactory"}}[o];if(a){let c=oR(e,a.factory);return{type:a.type,node:t,resourceName:c,startPos:n,endPos:i,isManaged:!0}}}return{type:"custom",node:t,startPos:n,endPos:i,isManaged:!1}}Cn(Jb,"classifyCallExpression");function oR(e,t){if(e.arguments.length===0)return;let n=e.arguments[0];if(!ee.isCallExpression(n))return;let i=n.expression;if(!ee.isPropertyAccessExpression(i)||i.name.text!=="build"||!ee.isIdentifier(i.expression)||i.expression.text!==t||n.arguments.length===0)return;let r=n.arguments[0];if(ee.isStringLiteral(r))return r.text}Cn(oR,"extractResourceNameFromFactoryCall");import*as aR from"typescript";var G2=Object.defineProperty,Nn=(e,t)=>G2(e,"name",{value:t,configurable:!0}),Z2={import:"after-imports","app-init":"after-app-init",tags:"after-tags"};function sR(e){if(!e)return{position:"before-imports"};let t=Z2[e.type];return t?{position:t}:{position:"after-resource",afterManagedResource:{type:e.type,name:e.resourceName}}}Nn(sR,"determineCustomBlockPosition");function Qa(e,t){let n=t??Je(e),i=[],r=e.getFullText(),o=null;for(let a of n)if(a.type==="custom"&&!a.isManaged){let{position:c,afterManagedResource:u}=sR(o),l=cR(r,a.node),m=uR(r,a.node),p=e.getLineAndCharacterOfPosition(a.node.getStart());i.push({sourceText:l,position:c,afterManagedResource:u,originalLine:p.line+1,leadingComments:m.length>0?m:void 0})}else a.isManaged&&(o=a);return i}Nn(Qa,"extractCustomCodeBlocks");function cR(e,t){let n=t.getFullStart(),i=t.getEnd(),r=e.slice(n,i).split(`
428
428
  `),o=r.findIndex(a=>a.trim()!=="");return r.slice(o===-1?0:o).join(`
429
- `)}$n(Z0,"getStatementTextWithComments");function W0(e,t){let n=[],i=V0.getLeadingCommentRanges(e,t.getFullStart());if(i)for(let r of i){let o=e.slice(r.pos,r.end);n.push(o)}return n}$n(W0,"extractLeadingComments");function Vi(e,t,n,i){let r=i??Xe(e);for(let o of r)if(o.type===t&&o.resourceName===n)return{startPos:o.startPos,endPos:o.endPos,node:o.node};return null}$n(Vi,"findManagedResourcePosition");function Zb(e,t,n){let i=n??Xe(e),r=null;for(let o of i)o.type===t&&o.isManaged&&(r=o);return r}$n(Zb,"getLastManagedStatementOfType");function Wb(e,t){let n=t??Xe(e),i={import:[],"app-init":[],tags:[],database:[],compute:[],storage:[],network:[],messaging:[],cdn:[],pattern:[],"vpc-peer":[],"vpc-peer-accepter":[],"cross-plan-connection":[],custom:[]};for(let r of n)i[r.type].push(r);return i}$n(Wb,"getManagedResourcesByType");import*as dr from"typescript";import*as Ka from"typescript";var _2=Object.defineProperty,Hb=(e,t)=>_2(e,"name",{value:t,configurable:!0}),E2=["S","N","B"];function qa(e){if(!P(e))return;let t=b(e.name),n=U(e.type,E2);if(!(!t||!n))return{name:t,type:n}}Hb(qa,"parseDynamoDBKey");function qb(e){let t=e.node;if(!Ka.isCallExpression(t))return null;let n=t.arguments[0];if(!Ka.isCallExpression(n)||n.arguments.length<2)return null;let i=n.arguments[1];if(!Ka.isObjectLiteralExpression(i))return null;let r=B(i),o=qa(r.partitionKey);if(!o)return null;let a={resourceName:e.resourceName,partitionKey:o,node:e.node};e.variableName&&(a.variableName=e.variableName);let c=qa(r.sortKey);if(c&&(a.sortKey=c),Array.isArray(r.globalSecondaryIndexes)){let p=r.globalSecondaryIndexes.filter(P).map(g=>{let v=qa(g.partitionKey);if(!v)return null;let A=b(g.indexName);if(!A)return null;let X={indexName:A,partitionKey:v},z=qa(g.sortKey);return z&&(X.sortKey=z),X}).filter(g=>g!==null);p.length>0&&(a.globalSecondaryIndexes=p)}let u=b(r.ttlAttribute);u&&(a.ttlAttribute=u);let l=j(r.stream);l!==void 0&&(a.stream=l);let m=le(r,new Set(["type","databaseName","partitionKey","sortKey","globalSecondaryIndexes","ttlAttribute","stream"]));return m.length>0&&(a.extraProperties=m),a}Hb(qb,"extractDynamoDBFields");function Dl(e){if(e.length!==0)return e.map(t=>({name:t.resourceName,partitionKey:t.partitionKey,...Ye({sortKey:t.sortKey,globalSecondaryIndexes:t.globalSecondaryIndexes,ttlAttribute:t.ttlAttribute,stream:t.stream,variableName:t.variableName,extraProperties:t.extraProperties})}))}Hb(Dl,"convertDynamoDBResources");import*as Ya from"typescript";var x2=Object.defineProperty,H0=(e,t)=>x2(e,"name",{value:t,configurable:!0}),A2=new Set(["type","databaseName","instanceType","coldTier","optimiseSchedule","backupSchedule","backupRetentionDays"]);function Kb(e){let t=e.node;if(!Ya.isCallExpression(t))return null;let n=t.arguments[0];if(!Ya.isCallExpression(n)||n.arguments.length<2)return null;let i=n.arguments[1];if(!Ya.isObjectLiteralExpression(i))return null;let r=B(i),o={resourceName:e.resourceName,databaseName:e.databaseName,node:e.node};e.variableName&&(o.variableName=e.variableName);let a=b(r.instanceType);a&&(o.instanceType=a);let c=r.coldTier;c===!1?o.coldTier=!1:P(c)&&b(c.mode)==="s3"&&(o.coldTier={mode:"s3"});let u=r.optimiseSchedule;if(u===!1)o.optimiseSchedule=!1;else{let g=b(u);g&&(o.optimiseSchedule=g)}let l=r.backupSchedule;if(l===!1)o.backupSchedule=!1;else{let g=b(l);g&&(o.backupSchedule=g)}let m=C(r.backupRetentionDays);m!==void 0&&(o.backupRetentionDays=m);let p=le(r,A2);return p.length>0&&(o.extraProperties=p),o}H0(Kb,"extractClickHouseFields");function Ml(e){if(e.length!==0)return e.map(t=>({name:t.resourceName,type:"ClickHouse",databaseName:t.databaseName,...Ye({instanceType:t.instanceType,coldTier:t.coldTier,optimiseSchedule:t.optimiseSchedule,backupSchedule:t.backupSchedule,backupRetentionDays:t.backupRetentionDays,variableName:t.variableName,extraProperties:t.extraProperties})}))}H0(Ml,"convertClickHouseResources");var I2=Object.defineProperty,Gi=(e,t)=>I2(e,"name",{value:t,configurable:!0});function q0(e){let t=b(e.databaseEngine);if(t!==void 0&&mt(Ci,t))return t;let n=e.engine;if(Tt(n)){let i=String(n.__call);if(i.includes("postgres")||i.includes("auroraPostgres"))return"postgresql";if(i.includes("mysql")||i.includes("auroraMysql"))return"mysql"}}Gi(q0,"extractDatabaseEngine");function K0(e){let t=e.engine;if(Tt(t))return String(t.__call)}Gi(K0,"extractEngineExpression");var $2=new Set(["type","databaseName","databaseEngine","engine","vpc","port","deletionProtection","instanceType","multiAz","publiclyAccessible","enableSecretRotation","encryption","databaseInsights","proxy","readReplica","credentials","writer","readers","backupRetention","preferredMaintenanceWindow","primaryRegion","secondaryRegions","globalClusterIdentifier","enableGlobalWriteForwarding","snapshotIdentifier","allocatedStorage","monitoringInterval","snapshotUsername"]);function Y0(e,t,n){if(n.arguments.length<2)return null;let i=n.arguments[0],r=n.arguments[1];if(!dr.isStringLiteral(i)&&!dr.isTemplateExpression(i))return null;let o=dr.isStringLiteral(i)?i.text:Cl(e,i);if(!dr.isObjectLiteralExpression(r))return null;let a=B(r),c={resourceName:o,type:b(a.type)??"",databaseName:b(a.databaseName)??"",databaseEngine:q0(a),engineExpression:K0(a),port:C(a.port),deletionProtection:j(a.deletionProtection),instanceType:b(a.instanceType),multiAz:j(a.multiAz),publiclyAccessible:j(a.publiclyAccessible),enableSecretRotation:j(a.enableSecretRotation),encryption:Ne(a.encryption,vt()),databaseInsights:ur(a.databaseInsights,vt()),proxy:ur(a.proxy,vt()),readReplica:ur(a.readReplica,vt()),credentials:Ne(a.credentials,vt()),writer:Ne(a.writer,vt()),readers:ur(a.readers,vt()),backupRetention:C(a.backupRetention),preferredMaintenanceWindow:b(a.preferredMaintenanceWindow),primaryRegion:b(a.primaryRegion),secondaryRegions:de(a.secondaryRegions),globalClusterIdentifier:b(a.globalClusterIdentifier),enableGlobalWriteForwarding:j(a.enableGlobalWriteForwarding),allocatedStorage:C(a.allocatedStorage),monitoringInterval:C(a.monitoringInterval),snapshotIdentifier:b(a.snapshotIdentifier),snapshotUsername:b(a.snapshotUsername),node:t},u=it(t);u&&(c.variableName=u);let l=le(a,$2);return l.length>0&&(c.extraProperties=l),c}Gi(Y0,"extractDatabaseResource");function Yb(e){return Pe(e,t=>{if(!dr.isCallExpression(t)||!Ie(t,"addDatabase"))return null;let n=t.arguments[0];return Fe(n,"DatabaseFactory")?Y0(e,t,n):null})}Gi(Yb,"findDatabaseResources");function Xb(e){let t=[],n=[],i=[];for(let r of e)if(r.type==="DynamoDB"){let o=qb(r);o&&n.push(o)}else if(r.type==="ClickHouse"){let o=Kb(r);o&&i.push(o)}else t.push(r);return{databases:t,dynamodb:n,clickhouse:i}}Gi(Xb,"splitDatabaseResources");var T2=["Instance","Aurora","GlobalAurora"];function Jb(e){return e.filter(t=>t.type!=="DynamoDB").map(t=>({name:t.resourceName,type:mt(T2,t.type)?t.type:"Instance",databaseName:t.databaseName,...Ye({port:t.port,deletionProtection:t.deletionProtection,instanceType:t.instanceType,multiAz:t.multiAz,publiclyAccessible:t.publiclyAccessible,enableSecretRotation:t.enableSecretRotation,encryption:t.encryption,databaseInsights:t.databaseInsights,proxy:t.proxy,readReplica:t.readReplica,credentials:t.credentials,writer:t.writer,readers:t.readers,backupRetention:t.backupRetention,preferredMaintenanceWindow:t.preferredMaintenanceWindow,primaryRegion:t.primaryRegion,secondaryRegions:t.secondaryRegions,globalClusterIdentifier:t.globalClusterIdentifier,enableGlobalWriteForwarding:t.enableGlobalWriteForwarding,allocatedStorage:t.allocatedStorage,monitoringInterval:t.monitoringInterval,variableName:t.variableName,databaseEngine:t.databaseEngine,engineExpression:t.engineExpression,extraProperties:t.extraProperties})}))}Gi(Jb,"convertDatabaseResources");import*as Wi from"typescript";var C2=Object.defineProperty,Zi=(e,t)=>C2(e,"name",{value:t,configurable:!0});function X0(e,t){if(t.arguments.length<2)return null;let n=t.arguments[0],i=t.arguments[1];if(!Wi.isStringLiteral(n)||!Wi.isObjectLiteralExpression(i))return null;let r=B(i),o={resourceName:n.text,queueType:b(r.queueType)??"standard",visibilityTimeout:C(r.visibilityTimeout),retentionPeriod:C(r.messageRetentionPeriod),contentBasedDeduplication:j(r.contentBasedDeduplication),removalPolicy:b(r.removalPolicy),node:e},a=it(e);a&&(o.variableName=a);let c=le(r,new Set(["type","queueType","visibilityTimeout","messageRetentionPeriod","contentBasedDeduplication","removalPolicy"]));return c.length>0&&(o.extraProperties=c),o}Zi(X0,"extractSQSResource");function Qb(e){if(e!=null){if(e===!1)return!1;if(P(e))return Ye({enabled:j(e.enabled),maxReceiveCount:C(e.maxReceiveCount)})}}Zi(Qb,"parseDeadLetterQueueConfig");function ey(e){return Pe(e,t=>{if(!Wi.isCallExpression(t)||!Ie(t,"addMessaging"))return null;let n=t.arguments[0];return Fe(n,"MessagingFactory")?X0(t,n):null})}Zi(ey,"findSQSResources");function ty(e){if(e.length!==0)return e.map(t=>({name:t.resourceName,queueType:t.queueType==="fifo"?"fifo":"standard",...Ye({visibilityTimeout:t.visibilityTimeout,retentionPeriod:t.retentionPeriod,contentBasedDeduplication:t.contentBasedDeduplication,removalPolicy:Q0(t.removalPolicy),variableName:t.variableName,extraProperties:t.extraProperties})}))}Zi(ty,"convertSQSResources");var R2=new Set(Qv.options);function J0(e){return R2.has(e)}Zi(J0,"isSqsRemovalPolicy");function Q0(e){return e!==void 0&&J0(e)?e:void 0}Zi(Q0,"toSqsRemovalPolicy");import*as Hi from"typescript";var P2=Object.defineProperty,Xa=(e,t)=>P2(e,"name",{value:t,configurable:!0});function tC(e){if(e.arguments.length<2)return null;let t=e.arguments[0],n=e.arguments[1];return!Hi.isStringLiteral(t)||!Hi.isObjectLiteralExpression(n)?null:{resourceName:t.text,config:B(n),node:e}}Xa(tC,"extractCDNResource");function rC(e,t,n){let i=t.find(o=>o.variableName===e);if(i)return i.resourceName;let r=n.find(o=>o.variableName===e||o.resourceName.charAt(0).toLowerCase()+o.resourceName.slice(1)===e);return r?r.resourceName:e}Xa(rC,"resolveOriginIdentifier");var eC=["CACHING_OPTIMIZED","CACHING_DISABLED"];function ry(e){return nt(e,t=>{if(!Hi.isCallExpression(t)||!Ie(t,"addCdn"))return;let n=t.arguments[0];if(Fe(n,"CdnFactory"))return tC(n)??void 0})}Xa(ry,"findCDNResource");function ny(e,t,n){if(!e)return;let i=e,r=i.config,o=Xa(p=>cr(p)?rC(p.__identifier,t,n):b(p)??"","resolveOrigin"),a=o(r.origin),c={name:i.resourceName,defaultOriginRef:a};if(Array.isArray(r.behaviours)){let p=r.behaviours.filter(P).map(g=>({pathPattern:b(g.pathPattern)??"",originRef:o(g.origin),...U(g.cachePolicy,eC)!==void 0&&{cachePolicy:U(g.cachePolicy,eC)}}));p.length>0&&(c.behaviours=p)}let u=b(r.customDomain);if(u)c.customDomain=u;else{let p=de(r.domainNames);p&&p.length>0&&(c.customDomain=p[0])}let l=b(r.certificateArn);if(l&&(c.certificateArn=l),r.accessGate!==void 0){if(r.accessGate===!1)c.accessGate=!1;else if(P(r.accessGate)){let p=r.accessGate,g=b(p.type),v=b(p.username),A=b(p.password);g==="basic-auth"&&v&&A&&(c.accessGate={type:"basic-auth",username:v,password:A})}}let m=le(r,new Set(["originType","origin","behaviours","customDomain","domainNames","certificateArn","accessGate"]));return m.length>0&&(c.extraProperties=m),c}Xa(ny,"convertCDNResource");import*as pe from"typescript";var N2=Object.defineProperty,at=(e,t)=>N2(e,"name",{value:t,configurable:!0}),w2=new Set(Xv.options);function nC(e){if(e!==void 0)return w2.has(e)?e:void 0}at(nC,"asFlowLogDestination");function iy(e){return{maxAzs:C(e.maxAzs),natGateways:ur(e.natGateways,t=>({count:C(t.count)})),flowLogs:ur(e.flowLogs,t=>({destination:b(t.destination),retentionDays:C(t.retentionDays)})),vpcEndpoints:P(e.vpcEndpoints)?e.vpcEndpoints:void 0}}at(iy,"parseNetworkConfigFields");function iC(e,t){if(t.arguments.length<2)return null;let n=t.arguments[0],i=t.arguments[1];if(!pe.isStringLiteral(n))return null;let r=n.text,o=pe.isObjectLiteralExpression(i)?B(i):{},a=iy(o),c={name:r,config:Ye({...a}),node:e},u=it(e);return u&&(c.variableName=u),c}at(iC,"extractNetworkResource");function oy(e){return nt(e,t=>{if(!Vt(t)||t.arguments.length<=1)return;let n=t.arguments[1];if(pe.isObjectLiteralExpression(n)){for(let i of n.properties)if(jr(i,"network")&&pe.isObjectLiteralExpression(i.initializer)){for(let r of i.initializer.properties)if(jr(r,"useExisting")&&pe.isStringLiteral(r.initializer))return r.initializer.text}}})}at(oy,"findVpcId");function ay(e){return nt(e,t=>{if(!Vt(t)||t.arguments.length<=1)return;let n=t.arguments[1];if(pe.isObjectLiteralExpression(n)){for(let i of n.properties)if(jr(i,"network")){if(i.initializer.kind===pe.SyntaxKind.FalseKeyword)return;if(pe.isObjectLiteralExpression(i.initializer)&&!i.initializer.properties.some(r=>jr(r,"useExisting"))){let r=B(i.initializer);return iy(r)}}}})}at(ay,"findNetworkConfig");function sy(e){return nt(e,t=>{if(!Vt(t)||t.arguments.length<=1)return;let n=t.arguments[1];if(pe.isObjectLiteralExpression(n)){for(let i of n.properties)if(jr(i,"backup")){if(i.initializer.kind===pe.SyntaxKind.FalseKeyword)return!1;if(pe.isObjectLiteralExpression(i.initializer)){let r=B(i.initializer),o=b(r.tier);if(o)return{tier:o}}}}})}at(sy,"findBackupConfig");function cy(e){return nt(e,t=>{if(!Vt(t)||t.arguments.length<=1)return;let n=t.arguments[1];if(pe.isObjectLiteralExpression(n)){for(let i of n.properties)if(jr(i,"tunnel")){if(i.initializer.kind===pe.SyntaxKind.FalseKeyword)return!1;if(i.initializer.kind===pe.SyntaxKind.TrueKeyword)return!0;if(pe.isObjectLiteralExpression(i.initializer)){let r=B(i.initializer),o=b(r.instanceType);return o?{instanceType:o}:{}}}}})}at(cy,"findTunnelConfig");function uy(e){return Pe(e,t=>{if(!pe.isCallExpression(t)||!Ie(t,"addNetwork"))return null;let n=t.arguments[0];return Fe(n,"NetworkFactory")?iC(t,n):null})}at(uy,"findNetworkResources");function ly(e){let t=e.flowLogs;return{...Ye({maxAzs:e.maxAzs,natGateways:e.natGateways,vpcEndpoints:e.vpcEndpoints}),...t!==void 0&&{flowLogs:t===!1?!1:Ye({destination:nC(t.destination),retentionDays:t.retentionDays})}}}at(ly,"buildNetworkFields");function dy(e){if(e)return ly(e)}at(dy,"convertNetworkConfig");function my(e){if(e===void 0)return;if(e===!1)return!1;let t=e.tier;if(mt($t,t))return{tier:t}}at(my,"convertBackupConfig");function py(e){if(e===void 0)return;if(e===!1)return!1;if(e===!0)return{};let t={};return e.instanceType&&(t.instanceType=e.instanceType),t}at(py,"convertTunnelConfig");function fy(e){if(!(!e||e.length===0))return e.map(t=>({name:t.name,...ly(t.config)}))}at(fy,"convertAdditionalNetworks");import*as qi from"typescript";var k2=Object.defineProperty,_e=(e,t)=>k2(e,"name",{value:t,configurable:!0}),O2=["Instance","Aurora"],D2=["postgresql","mysql"];function jl(e){if(!P(e))return;let t={...e.memorySize!==void 0&&{memorySize:C(e.memorySize)},...e.timeout!==void 0&&{timeout:C(e.timeout)},...e.ephemeralStorageSize!==void 0&&{ephemeralStorageSize:C(e.ephemeralStorageSize)}};return Object.keys(t).length>0?t:void 0}_e(jl,"parseLambdaConfig");function oC(e){return bt(e,"database",t=>({type:U(t.type,O2),databaseName:b(t.databaseName),databaseEngine:U(t.databaseEngine,D2),deletionProtection:j(t.deletionProtection),backupRetention:C(t.backupRetention),port:C(t.port),publiclyAccessible:j(t.publiclyAccessible),allowedIpCidr:b(t.allowedIpCidr),instanceType:b(t.instanceType),allocatedStorage:C(t.allocatedStorage),multiAz:j(t.multiAz),allowVpcAccess:j(t.allowVpcAccess),monitoringInterval:C(t.monitoringInterval),preferredMaintenanceWindow:b(t.preferredMaintenanceWindow),snapshotIdentifier:b(t.snapshotIdentifier),snapshotUsername:b(t.snapshotUsername),readReplica:Fi(t.readReplica),writer:Ne(t.writer,vt()),readers:Fi(t.readers),databaseInsights:Fi(t.databaseInsights),proxy:Fi(t.proxy),credentials:Ne(t.credentials,vt()),encryption:Ne(t.encryption,vt())}))}_e(oC,"extractPatternDatabaseConfig");function aC(e){return bt(e,"compute",t=>({server:Ne(t.server,jl),imageOptimisation:Ne(t.imageOptimisation,jl),revalidation:Ne(t.revalidation,jl)}))}_e(aC,"extractPatternComputeConfig");function sC(e){let t=_e(n=>({versioned:j(n.versioned)}),"parseVersionedConfig");return bt(e,"storage",n=>({assets:Ne(n.assets,t),cache:Ne(n.cache,t),media:Ne(n.media,t)}))}_e(sC,"extractPatternStorageConfig");function cC(e){return bt(e,"messaging",t=>({revalidationQueue:Ne(t.revalidationQueue,n=>({visibilityTimeout:C(n.visibilityTimeout),messageRetentionPeriod:C(n.messageRetentionPeriod),maxMessageSize:C(n.maxMessageSize),deadLetterQueue:Qb(n.deadLetterQueue)}))}))}_e(cC,"extractPatternMessagingConfig");function uC(e){return bt(e,"cdn",t=>({domainNames:de(t.domainNames),certificateArn:b(t.certificateArn)}))}_e(uC,"extractPatternCdnConfig");function lC(e){return bt(e,"environment",t=>{let n=Object.fromEntries(Object.entries(t).filter(i=>typeof i[1]=="string"));return Object.keys(n).length>0?n:void 0})}_e(lC,"extractPatternEnvironmentConfig");function dC(e,t){let n=mC(e);return{name:t,source:b(e.source),build:bt(e,"build",i=>({command:b(i.command),outputDir:b(i.outputDir)})),routing:U(e.routing,Yo),security:bt(e,"security",i=>({headers:j(i.headers),contentSecurityPolicy:b(i.contentSecurityPolicy)})),domain:b(e.domain),forms:bt(e,"forms",i=>({to:b(i.to),from:b(i.from),corsOrigin:b(i.corsOrigin),maxConcurrency:C(i.maxConcurrency)})),cdn:bt(e,"cdn",i=>({behaviours:Array.isArray(i.behaviours)?i.behaviours:void 0})),...n.length>0&&{unreadableFields:n}}}_e(dC,"extractStaticSiteConfig");function gy(e){return ht(e)&&("__identifier"in e||"__expression"in e||"__call"in e||"__unknown"in e)}_e(gy,"isUnreadableRef");function mC(e){let t=[],n=_e((r,o)=>{gy(r)&&t.push(o)},"check");n(e.source,"source"),n(e.routing,"routing"),n(e.domain,"domain");let i=[[e.build,"build",["command","outputDir"]],[e.security,"security",["headers","contentSecurityPolicy"]],[e.forms,"forms",["to","from","corsOrigin","maxConcurrency"]],[e.cdn,"cdn",["behaviours"]]];for(let[r,o,a]of i)if(gy(r))t.push(o);else if(P(r))for(let c of a)n(r[c],`${o}.${c}`);return t}_e(mC,"collectUnreadableStaticSiteFields");function zr(e){return e!==void 0&&e!==""}_e(zr,"isReadable");function zl(e,t){return new Error(`Static-site pattern '${e}' in infrastructure.ts: Fjall could not read ${t.join(", ")} as inline literal(s). Fjall reads these fields out of the file and writes them back, so they must be written inline (source: "./site"), not as a variable or an expression.`)}_e(zl,"unreadableStaticSiteFields");function pC(e,t){let n=t.to;if(!zr(n))throw zl(e,["forms.to"]);return{to:n,...t.from!==void 0&&{from:t.from},...t.corsOrigin!==void 0&&{corsOrigin:t.corsOrigin},...t.maxConcurrency!==void 0&&{maxConcurrency:t.maxConcurrency}}}_e(pC,"readStaticSiteForms");function fC(e,t){if(e.arguments.length<2)return null;let n=e.arguments[0],i=e.arguments[1];if(!qi.isStringLiteral(n)||!qi.isObjectLiteralExpression(i))return null;let r=n.text,o=B(i),a=o.type,c=it(t),u=b(o.name);return u?a==="payload"||a==="nextjs"?{variableName:c,constructId:r,type:a,config:{name:u,domain:b(o.domain),database:oC(o),compute:aC(o),storage:sC(o),messaging:cC(o),cdn:uC(o),environment:lC(o)},node:e}:a==="staticsite"?{variableName:c,constructId:r,type:"staticsite",config:dC(o,u),node:e}:null:null}_e(fC,"extractPatternResource");function hy(e){return Pe(e,t=>{if(!qi.isCallExpression(t)||!Ie(t,"addPattern"))return null;let n=t.arguments[0];return Fe(n,"PatternFactory")?fC(n,t):null})}_e(hy,"findPatternResources");function vy(e,t){if(!t||t.length===0)return;let n=t[0];if(e.pattern=n.type,n.type==="staticsite"){let{config:r}=n,o=r.source,a=r.build?.command,c=r.build?.outputDir;if(r.unreadableFields!==void 0)throw zl(r.name,r.unreadableFields);if(!zr(o)||!zr(a)||!zr(c)){let u=[];throw zr(o)||u.push("source"),zr(a)||u.push("build.command"),zr(c)||u.push("build.outputDir"),zl(r.name,u)}e.patternConfig={type:"staticsite",name:r.name,source:o,build:{command:a,outputDir:c},routing:r.routing,security:r.security,domain:r.domain,...r.forms!==void 0&&{forms:pC(r.name,r.forms)},cdn:r.cdn};return}let{config:i}=n;e.patternConfig={type:n.type,name:i.name,domain:i.domain,database:i.database,compute:i.compute,storage:i.storage,messaging:i.messaging,cdn:i.cdn,environment:i.environment}}_e(vy,"applyPatternConfig");var M2=Object.defineProperty,Ll=(e,t)=>M2(e,"name",{value:t,configurable:!0});function gC(e,t){for(let n of t){let i=e.compute.find(r=>r.variableName===n.targetVariableName);i!==void 0&&i.type==="lambda"&&(i.scheduleExpression=n.schedule)}}Ll(gC,"applyScheduleBackfill");function hC(e,t){Object.keys(t).length>0&&(e.tags={...t}),t[za]&&(e.owner=t[za])}Ll(hC,"applyTagsAndOwner");function vC(e){let t=[];for(let n of e)if(Ol(n.moduleSpecifier))if(n.moduleSpecifier==="@fjall/components-infrastructure"||n.moduleSpecifier==="@fjall/infrastructure"){let i=n.namedImports.filter(r=>!z0.has(r));i.length>0&&t.push({moduleSpecifier:n.moduleSpecifier,namedImports:i,defaultImport:n.defaultImport})}else(n.namedImports.length>0||n.defaultImport)&&t.push(n);return t.length>0?t:void 0}Ll(vC,"computeAdditionalManagedImports");function Tn(e,t,n){let i={appName:t,type:"standard",database:[],s3:[],compute:[]};if(vy(i,e.patternResources),e.vpcId&&(i.vpcId=e.vpcId),i.network=dy(e.network),i.backup=my(e.backup),i.tunnel=py(e.tunnel),i.additionalNetworks=fy(e.networkResources),hC(i,e.tags),i.database=Jb(e.databaseResources),i.dynamodb=Dl(e.dynamodbResources),i.clickhouse=Ml(e.clickhouseResources),i.sqs=ty(e.sqsResources),i.cdn=ny(e.cdnResource,e.s3Resources,e.computeResources),i.s3=Vb(e.s3Resources),i.compute=Lb(e.computeResources,e.databaseResources,e.s3Resources,i),gC(i,e.schedules),i.additionalManagedImports=vC(e.imports),n?.skipValidation)return i;try{return jT.parse(i)}catch(r){if(r instanceof s.ZodError){let o=va(r);throw new Error(`Invalid infrastructure configuration:
430
- ${o}`)}throw r}}Ll(Tn,"convertToResourcePlan");var j2=Object.defineProperty,Ki=(e,t)=>j2(e,"name",{value:t,configurable:!0});function Lr(e,t){let n=H.createSourceFile("infrastructure.ts",e,H.ScriptTarget.Latest,!0,H.ScriptKind.TS),i=bC(n),{appVariableName:r,appName:o}=SC(n),a=oy(n),c=ay(n),u=sy(n),l=cy(n),m=uy(n),p=Yb(n),{databases:g,dynamodb:v,clickhouse:A}=Xb(p),X=ey(n),z=ry(n),xe=[...Fb(n),...Bb(n)],Sr=Nl(n),ke=kl(n),ne=hy(n),ge=_C(n),wn={sourceFile:n,imports:i,appVariableName:r,appName:o,vpcId:a,network:c,backup:u,tunnel:l,networkResources:m,databaseResources:g,dynamodbResources:v,clickhouseResources:A,sqsResources:X,cdnResource:z,s3Resources:xe,computeResources:Sr,schedules:ke,patternResources:ne,tags:ge};return t?.extractCustomCode&&(wn.customCodeBlocks=Ha(n),wn.classifiedStatements=Xe(n)),wn}Ki(Lr,"parseInfrastructure");function bC(e){let t=[];return H.forEachChild(e,n=>{if(H.isImportDeclaration(n)){if(!H.isStringLiteral(n.moduleSpecifier))return;let i={moduleSpecifier:n.moduleSpecifier.text,namedImports:[]};n.importClause&&(n.importClause.name&&(i.defaultImport=n.importClause.name.text),n.importClause.namedBindings&&H.isNamedImports(n.importClause.namedBindings)&&(i.namedImports=n.importClause.namedBindings.elements.map(r=>r.name.text))),t.push(i)}}),t}Ki(bC,"extractImports");function yC(e,t){return H.isStringLiteral(t)?t.text:H.isIdentifier(t)?Ba(e,t.text)??"":H.isPropertyAccessExpression(t)?Va(e,t)??"":""}Ki(yC,"resolveAppName");function SC(e){return nt(e,t=>{if(H.isVariableStatement(t))for(let n of t.declarationList.declarations){if(!n.initializer||!Vt(n.initializer))continue;let i=H.isIdentifier(n.name)?n.name.text:"",r=n.initializer.arguments.length>0?yC(e,n.initializer.arguments[0]):"";return{appVariableName:i,appName:r}}})??{appVariableName:"",appName:""}}Ki(SC,"findAppVariable");function _C(e){let t={};function n(i){if(H.isCallExpression(i)&&H.isPropertyAccessExpression(i.expression)&&i.expression.name.text==="addTags"&&H.isIdentifier(i.expression.expression)&&i.arguments.length>0){let r=i.arguments[0];if(H.isObjectLiteralExpression(r)){let o=B(r);for(let[a,c]of Object.entries(o))typeof c=="string"?t[a]=c:Mr(c)&&(t[a]="default-value")}}H.forEachChild(i,n)}return Ki(n,"visit"),n(e),t}Ki(_C,"extractTags");import*as Yi from"typescript";var z2=Object.defineProperty,$e=(e,t)=>z2(e,"name",{value:t,configurable:!0});function Xi(e,t,n){return e.slice(0,t)+n+e.slice(t)}$e(Xi,"insertAtPosition");function Ul(e,t){return e.find(n=>n.type===t)}$e(Ul,"findClassification");function by(e,t){return e.filter(n=>n.type===t).pop()}$e(by,"findLastClassification");function Ur(e){return Yi.createSourceFile("infrastructure.ts",e,Yi.ScriptTarget.Latest,!0,Yi.ScriptKind.TS)}$e(Ur,"parseSourceFile");function Fl(e,t){return e.endsWith(`
429
+ `)}Nn(cR,"getStatementTextWithComments");function uR(e,t){let n=[],i=aR.getLeadingCommentRanges(e,t.getFullStart());if(i)for(let r of i){let o=e.slice(r.pos,r.end);n.push(o)}return n}Nn(uR,"extractLeadingComments");function Xi(e,t,n,i){let r=i??Je(e);for(let o of r)if(o.type===t&&o.resourceName===n)return{startPos:o.startPos,endPos:o.endPos,node:o.node};return null}Nn(Xi,"findManagedResourcePosition");function Qb(e,t,n){let i=n??Je(e),r=null;for(let o of i)o.type===t&&o.isManaged&&(r=o);return r}Nn(Qb,"getLastManagedStatementOfType");function ey(e,t){let n=t??Je(e),i={import:[],"app-init":[],tags:[],database:[],compute:[],storage:[],network:[],messaging:[],cdn:[],pattern:[],"vpc-peer":[],"vpc-peer-accepter":[],"cross-plan-connection":[],custom:[]};for(let r of n)i[r.type].push(r);return i}Nn(ey,"getManagedResourcesByType");import*as mr from"typescript";import*as ts from"typescript";var W2=Object.defineProperty,ty=(e,t)=>W2(e,"name",{value:t,configurable:!0}),H2=["S","N","B"];function es(e){if(!N(e))return;let t=b(e.name),n=U(e.type,H2);if(!(!t||!n))return{name:t,type:n}}ty(es,"parseDynamoDBKey");function ry(e){let t=e.node;if(!ts.isCallExpression(t))return null;let n=t.arguments[0];if(!ts.isCallExpression(n)||n.arguments.length<2)return null;let i=n.arguments[1];if(!ts.isObjectLiteralExpression(i))return null;let r=B(i),o=es(r.partitionKey);if(!o)return null;let a={resourceName:e.resourceName,partitionKey:o,node:e.node};e.variableName&&(a.variableName=e.variableName);let c=es(r.sortKey);if(c&&(a.sortKey=c),Array.isArray(r.globalSecondaryIndexes)){let p=r.globalSecondaryIndexes.filter(N).map(g=>{let v=es(g.partitionKey);if(!v)return null;let A=b(g.indexName);if(!A)return null;let X={indexName:A,partitionKey:v},z=es(g.sortKey);return z&&(X.sortKey=z),X}).filter(g=>g!==null);p.length>0&&(a.globalSecondaryIndexes=p)}let u=b(r.ttlAttribute);u&&(a.ttlAttribute=u);let l=j(r.stream);l!==void 0&&(a.stream=l);let m=le(r,new Set(["type","databaseName","partitionKey","sortKey","globalSecondaryIndexes","ttlAttribute","stream"]));return m.length>0&&(a.extraProperties=m),a}ty(ry,"extractDynamoDBFields");function Vl(e){if(e.length!==0)return e.map(t=>({name:t.resourceName,partitionKey:t.partitionKey,...Xe({sortKey:t.sortKey,globalSecondaryIndexes:t.globalSecondaryIndexes,ttlAttribute:t.ttlAttribute,stream:t.stream,variableName:t.variableName,extraProperties:t.extraProperties})}))}ty(Vl,"convertDynamoDBResources");import*as rs from"typescript";var q2=Object.defineProperty,lR=(e,t)=>q2(e,"name",{value:t,configurable:!0}),K2=new Set(["type","databaseName","instanceType","coldTier","optimiseSchedule","backupSchedule","backupRetentionDays"]);function ny(e){let t=e.node;if(!rs.isCallExpression(t))return null;let n=t.arguments[0];if(!rs.isCallExpression(n)||n.arguments.length<2)return null;let i=n.arguments[1];if(!rs.isObjectLiteralExpression(i))return null;let r=B(i),o={resourceName:e.resourceName,databaseName:e.databaseName,node:e.node};e.variableName&&(o.variableName=e.variableName);let a=b(r.instanceType);a&&(o.instanceType=a);let c=r.coldTier;c===!1?o.coldTier=!1:N(c)&&b(c.mode)==="s3"&&(o.coldTier={mode:"s3"});let u=r.optimiseSchedule;if(u===!1)o.optimiseSchedule=!1;else{let g=b(u);g&&(o.optimiseSchedule=g)}let l=r.backupSchedule;if(l===!1)o.backupSchedule=!1;else{let g=b(l);g&&(o.backupSchedule=g)}let m=C(r.backupRetentionDays);m!==void 0&&(o.backupRetentionDays=m);let p=le(r,K2);return p.length>0&&(o.extraProperties=p),o}lR(ny,"extractClickHouseFields");function Gl(e){if(e.length!==0)return e.map(t=>({name:t.resourceName,type:"ClickHouse",databaseName:t.databaseName,...Xe({instanceType:t.instanceType,coldTier:t.coldTier,optimiseSchedule:t.optimiseSchedule,backupSchedule:t.backupSchedule,backupRetentionDays:t.backupRetentionDays,variableName:t.variableName,extraProperties:t.extraProperties})}))}lR(Gl,"convertClickHouseResources");var Y2=Object.defineProperty,Ji=(e,t)=>Y2(e,"name",{value:t,configurable:!0});function dR(e){let t=b(e.databaseEngine);if(t!==void 0&&ft(Mi,t))return t;let n=e.engine;if(Tt(n)){let i=String(n.__call);if(i.includes("postgres")||i.includes("auroraPostgres"))return"postgresql";if(i.includes("mysql")||i.includes("auroraMysql"))return"mysql"}}Ji(dR,"extractDatabaseEngine");function mR(e){let t=e.engine;if(Tt(t))return String(t.__call)}Ji(mR,"extractEngineExpression");var X2=new Set(["type","databaseName","databaseEngine","engine","vpc","port","deletionProtection","instanceType","multiAz","publiclyAccessible","enableSecretRotation","encryption","databaseInsights","proxy","readReplica","credentials","writer","readers","backupRetention","preferredMaintenanceWindow","primaryRegion","secondaryRegions","globalClusterIdentifier","enableGlobalWriteForwarding","snapshotIdentifier","allocatedStorage","monitoringInterval","snapshotUsername"]);function pR(e,t,n){if(n.arguments.length<2)return null;let i=n.arguments[0],r=n.arguments[1];if(!mr.isStringLiteral(i)&&!mr.isTemplateExpression(i))return null;let o=mr.isStringLiteral(i)?i.text:Ml(e,i);if(!mr.isObjectLiteralExpression(r))return null;let a=B(r),c={resourceName:o,type:b(a.type)??"",databaseName:b(a.databaseName)??"",databaseEngine:dR(a),engineExpression:mR(a),port:C(a.port),deletionProtection:j(a.deletionProtection),instanceType:b(a.instanceType),multiAz:j(a.multiAz),publiclyAccessible:j(a.publiclyAccessible),enableSecretRotation:j(a.enableSecretRotation),encryption:ke(a.encryption,bt()),databaseInsights:lr(a.databaseInsights,bt()),proxy:lr(a.proxy,bt()),readReplica:lr(a.readReplica,bt()),credentials:ke(a.credentials,bt()),writer:ke(a.writer,bt()),readers:lr(a.readers,bt()),backupRetention:C(a.backupRetention),preferredMaintenanceWindow:b(a.preferredMaintenanceWindow),primaryRegion:b(a.primaryRegion),secondaryRegions:de(a.secondaryRegions),globalClusterIdentifier:b(a.globalClusterIdentifier),enableGlobalWriteForwarding:j(a.enableGlobalWriteForwarding),allocatedStorage:C(a.allocatedStorage),monitoringInterval:C(a.monitoringInterval),snapshotIdentifier:b(a.snapshotIdentifier),snapshotUsername:b(a.snapshotUsername),node:t},u=ot(t);u&&(c.variableName=u);let l=le(a,X2);return l.length>0&&(c.extraProperties=l),c}Ji(pR,"extractDatabaseResource");function iy(e){return we(e,t=>{if(!mr.isCallExpression(t)||!Ie(t,"addDatabase"))return null;let n=t.arguments[0];return Be(n,"DatabaseFactory")?pR(e,t,n):null})}Ji(iy,"findDatabaseResources");function oy(e){let t=[],n=[],i=[];for(let r of e)if(r.type==="DynamoDB"){let o=ry(r);o&&n.push(o)}else if(r.type==="ClickHouse"){let o=ny(r);o&&i.push(o)}else t.push(r);return{databases:t,dynamodb:n,clickhouse:i}}Ji(oy,"splitDatabaseResources");var J2=["Instance","Aurora","GlobalAurora"];function ay(e){return e.filter(t=>t.type!=="DynamoDB").map(t=>({name:t.resourceName,type:ft(J2,t.type)?t.type:"Instance",databaseName:t.databaseName,...Xe({port:t.port,deletionProtection:t.deletionProtection,instanceType:t.instanceType,multiAz:t.multiAz,publiclyAccessible:t.publiclyAccessible,enableSecretRotation:t.enableSecretRotation,encryption:t.encryption,databaseInsights:t.databaseInsights,proxy:t.proxy,readReplica:t.readReplica,credentials:t.credentials,writer:t.writer,readers:t.readers,backupRetention:t.backupRetention,preferredMaintenanceWindow:t.preferredMaintenanceWindow,primaryRegion:t.primaryRegion,secondaryRegions:t.secondaryRegions,globalClusterIdentifier:t.globalClusterIdentifier,enableGlobalWriteForwarding:t.enableGlobalWriteForwarding,allocatedStorage:t.allocatedStorage,monitoringInterval:t.monitoringInterval,variableName:t.variableName,databaseEngine:t.databaseEngine,engineExpression:t.engineExpression,extraProperties:t.extraProperties})}))}Ji(ay,"convertDatabaseResources");import*as eo from"typescript";var Q2=Object.defineProperty,Qi=(e,t)=>Q2(e,"name",{value:t,configurable:!0});function fR(e,t){if(t.arguments.length<2)return null;let n=t.arguments[0],i=t.arguments[1];if(!eo.isStringLiteral(n)||!eo.isObjectLiteralExpression(i))return null;let r=B(i),o={resourceName:n.text,queueType:b(r.queueType)??"standard",visibilityTimeout:C(r.visibilityTimeout),retentionPeriod:C(r.messageRetentionPeriod),contentBasedDeduplication:j(r.contentBasedDeduplication),removalPolicy:b(r.removalPolicy),node:e},a=ot(e);a&&(o.variableName=a);let c=le(r,new Set(["type","queueType","visibilityTimeout","messageRetentionPeriod","contentBasedDeduplication","removalPolicy"]));return c.length>0&&(o.extraProperties=c),o}Qi(fR,"extractSQSResource");function sy(e){if(e!=null){if(e===!1)return!1;if(N(e))return Xe({enabled:j(e.enabled),maxReceiveCount:C(e.maxReceiveCount)})}}Qi(sy,"parseDeadLetterQueueConfig");function cy(e){return we(e,t=>{if(!eo.isCallExpression(t)||!Ie(t,"addMessaging"))return null;let n=t.arguments[0];return Be(n,"MessagingFactory")?fR(t,n):null})}Qi(cy,"findSQSResources");function uy(e){if(e.length!==0)return e.map(t=>({name:t.resourceName,queueType:t.queueType==="fifo"?"fifo":"standard",...Xe({visibilityTimeout:t.visibilityTimeout,retentionPeriod:t.retentionPeriod,contentBasedDeduplication:t.contentBasedDeduplication,removalPolicy:hR(t.removalPolicy),variableName:t.variableName,extraProperties:t.extraProperties})}))}Qi(uy,"convertSQSResources");var e6=new Set(sb.options);function gR(e){return e6.has(e)}Qi(gR,"isSqsRemovalPolicy");function hR(e){return e!==void 0&&gR(e)?e:void 0}Qi(hR,"toSqsRemovalPolicy");import*as to from"typescript";var t6=Object.defineProperty,ns=(e,t)=>t6(e,"name",{value:t,configurable:!0});function bR(e){if(e.arguments.length<2)return null;let t=e.arguments[0],n=e.arguments[1];return!to.isStringLiteral(t)||!to.isObjectLiteralExpression(n)?null:{resourceName:t.text,config:B(n),node:e}}ns(bR,"extractCDNResource");function yR(e,t,n){let i=t.find(o=>o.variableName===e);if(i)return i.resourceName;let r=n.find(o=>o.variableName===e||o.resourceName.charAt(0).toLowerCase()+o.resourceName.slice(1)===e);return r?r.resourceName:e}ns(yR,"resolveOriginIdentifier");var vR=["CACHING_OPTIMIZED","CACHING_DISABLED"];function ly(e){return it(e,t=>{if(!to.isCallExpression(t)||!Ie(t,"addCdn"))return;let n=t.arguments[0];if(Be(n,"CdnFactory"))return bR(n)??void 0})}ns(ly,"findCDNResource");function dy(e,t,n){if(!e)return;let i=e,r=i.config,o=ns(p=>ur(p)?yR(p.__identifier,t,n):b(p)??"","resolveOrigin"),a=o(r.origin),c={name:i.resourceName,defaultOriginRef:a};if(Array.isArray(r.behaviours)){let p=r.behaviours.filter(N).map(g=>({pathPattern:b(g.pathPattern)??"",originRef:o(g.origin),...U(g.cachePolicy,vR)!==void 0&&{cachePolicy:U(g.cachePolicy,vR)}}));p.length>0&&(c.behaviours=p)}let u=b(r.customDomain);if(u)c.customDomain=u;else{let p=de(r.domainNames);p&&p.length>0&&(c.customDomain=p[0])}let l=b(r.certificateArn);if(l&&(c.certificateArn=l),r.accessGate!==void 0){if(r.accessGate===!1)c.accessGate=!1;else if(N(r.accessGate)){let p=r.accessGate,g=b(p.type),v=b(p.username),A=b(p.password);g==="basic-auth"&&v&&A&&(c.accessGate={type:"basic-auth",username:v,password:A})}}let m=le(r,new Set(["originType","origin","behaviours","customDomain","domainNames","certificateArn","accessGate"]));return m.length>0&&(c.extraProperties=m),c}ns(dy,"convertCDNResource");import*as pe from"typescript";var r6=Object.defineProperty,st=(e,t)=>r6(e,"name",{value:t,configurable:!0}),n6=new Set(ob.options);function SR(e){if(e!==void 0)return n6.has(e)?e:void 0}st(SR,"asFlowLogDestination");function my(e){return{maxAzs:C(e.maxAzs),natGateways:lr(e.natGateways,t=>({count:C(t.count)})),flowLogs:lr(e.flowLogs,t=>({destination:b(t.destination),retentionDays:C(t.retentionDays)})),vpcEndpoints:N(e.vpcEndpoints)?e.vpcEndpoints:void 0}}st(my,"parseNetworkConfigFields");function _R(e,t){if(t.arguments.length<2)return null;let n=t.arguments[0],i=t.arguments[1];if(!pe.isStringLiteral(n))return null;let r=n.text,o=pe.isObjectLiteralExpression(i)?B(i):{},a=my(o),c={name:r,config:Xe({...a}),node:e},u=ot(e);return u&&(c.variableName=u),c}st(_R,"extractNetworkResource");function py(e){return it(e,t=>{if(!Vt(t)||t.arguments.length<=1)return;let n=t.arguments[1];if(pe.isObjectLiteralExpression(n)){for(let i of n.properties)if(Ur(i,"network")&&pe.isObjectLiteralExpression(i.initializer)){for(let r of i.initializer.properties)if(Ur(r,"useExisting")&&pe.isStringLiteral(r.initializer))return r.initializer.text}}})}st(py,"findVpcId");function fy(e){return it(e,t=>{if(!Vt(t)||t.arguments.length<=1)return;let n=t.arguments[1];if(pe.isObjectLiteralExpression(n)){for(let i of n.properties)if(Ur(i,"network")){if(i.initializer.kind===pe.SyntaxKind.FalseKeyword)return;if(pe.isObjectLiteralExpression(i.initializer)&&!i.initializer.properties.some(r=>Ur(r,"useExisting"))){let r=B(i.initializer);return my(r)}}}})}st(fy,"findNetworkConfig");function gy(e){return it(e,t=>{if(!Vt(t)||t.arguments.length<=1)return;let n=t.arguments[1];if(pe.isObjectLiteralExpression(n)){for(let i of n.properties)if(Ur(i,"backup")){if(i.initializer.kind===pe.SyntaxKind.FalseKeyword)return!1;if(pe.isObjectLiteralExpression(i.initializer)){let r=B(i.initializer),o=b(r.tier);if(o)return{tier:o}}}}})}st(gy,"findBackupConfig");function hy(e){return it(e,t=>{if(!Vt(t)||t.arguments.length<=1)return;let n=t.arguments[1];if(pe.isObjectLiteralExpression(n)){for(let i of n.properties)if(Ur(i,"tunnel")){if(i.initializer.kind===pe.SyntaxKind.FalseKeyword)return!1;if(i.initializer.kind===pe.SyntaxKind.TrueKeyword)return!0;if(pe.isObjectLiteralExpression(i.initializer)){let r=B(i.initializer),o=b(r.instanceType);return o?{instanceType:o}:{}}}}})}st(hy,"findTunnelConfig");function vy(e){return we(e,t=>{if(!pe.isCallExpression(t)||!Ie(t,"addNetwork"))return null;let n=t.arguments[0];return Be(n,"NetworkFactory")?_R(t,n):null})}st(vy,"findNetworkResources");function by(e){let t=e.flowLogs;return{...Xe({maxAzs:e.maxAzs,natGateways:e.natGateways,vpcEndpoints:e.vpcEndpoints}),...t!==void 0&&{flowLogs:t===!1?!1:Xe({destination:SR(t.destination),retentionDays:t.retentionDays})}}}st(by,"buildNetworkFields");function yy(e){if(e)return by(e)}st(yy,"convertNetworkConfig");function Sy(e){if(e===void 0)return;if(e===!1)return!1;let t=e.tier;if(ft($t,t))return{tier:t}}st(Sy,"convertBackupConfig");function _y(e){if(e===void 0)return;if(e===!1)return!1;if(e===!0)return{};let t={};return e.instanceType&&(t.instanceType=e.instanceType),t}st(_y,"convertTunnelConfig");function Ey(e){if(!(!e||e.length===0))return e.map(t=>({name:t.name,...by(t.config)}))}st(Ey,"convertAdditionalNetworks");import*as ro from"typescript";var i6=Object.defineProperty,Ee=(e,t)=>i6(e,"name",{value:t,configurable:!0}),o6=["Instance","Aurora"],a6=["postgresql","mysql"];function Zl(e){if(!N(e))return;let t={...e.memorySize!==void 0&&{memorySize:C(e.memorySize)},...e.timeout!==void 0&&{timeout:C(e.timeout)},...e.ephemeralStorageSize!==void 0&&{ephemeralStorageSize:C(e.ephemeralStorageSize)}};return Object.keys(t).length>0?t:void 0}Ee(Zl,"parseLambdaConfig");function ER(e){return yt(e,"database",t=>({type:U(t.type,o6),databaseName:b(t.databaseName),databaseEngine:U(t.databaseEngine,a6),deletionProtection:j(t.deletionProtection),backupRetention:C(t.backupRetention),port:C(t.port),publiclyAccessible:j(t.publiclyAccessible),allowedIpCidr:b(t.allowedIpCidr),instanceType:b(t.instanceType),allocatedStorage:C(t.allocatedStorage),multiAz:j(t.multiAz),allowVpcAccess:j(t.allowVpcAccess),monitoringInterval:C(t.monitoringInterval),preferredMaintenanceWindow:b(t.preferredMaintenanceWindow),snapshotIdentifier:b(t.snapshotIdentifier),snapshotUsername:b(t.snapshotUsername),readReplica:Ki(t.readReplica),writer:ke(t.writer,bt()),readers:Ki(t.readers),databaseInsights:Ki(t.databaseInsights),proxy:Ki(t.proxy),credentials:ke(t.credentials,bt()),encryption:ke(t.encryption,bt())}))}Ee(ER,"extractPatternDatabaseConfig");function xR(e){return yt(e,"compute",t=>({server:ke(t.server,Zl),imageOptimisation:ke(t.imageOptimisation,Zl),revalidation:ke(t.revalidation,Zl)}))}Ee(xR,"extractPatternComputeConfig");function AR(e){let t=Ee(n=>({versioned:j(n.versioned)}),"parseVersionedConfig");return yt(e,"storage",n=>({assets:ke(n.assets,t),cache:ke(n.cache,t),media:ke(n.media,t)}))}Ee(AR,"extractPatternStorageConfig");function IR(e){return yt(e,"messaging",t=>({revalidationQueue:ke(t.revalidationQueue,n=>({visibilityTimeout:C(n.visibilityTimeout),messageRetentionPeriod:C(n.messageRetentionPeriod),maxMessageSize:C(n.maxMessageSize),deadLetterQueue:sy(n.deadLetterQueue)}))}))}Ee(IR,"extractPatternMessagingConfig");function $R(e){return yt(e,"cdn",t=>({domainNames:de(t.domainNames),certificateArn:b(t.certificateArn)}))}Ee($R,"extractPatternCdnConfig");function TR(e){return yt(e,"environment",t=>{let n=Object.fromEntries(Object.entries(t).filter(i=>typeof i[1]=="string"));return Object.keys(n).length>0?n:void 0})}Ee(TR,"extractPatternEnvironmentConfig");function RR(e,t){let n=CR(e);return{name:t,source:b(e.source),build:yt(e,"build",i=>({command:b(i.command),outputDir:b(i.outputDir)})),routing:U(e.routing,ra),security:yt(e,"security",i=>({headers:j(i.headers),contentSecurityPolicy:b(i.contentSecurityPolicy)})),domain:b(e.domain),forms:yt(e,"forms",i=>({to:b(i.to),from:b(i.from),corsOrigin:b(i.corsOrigin),maxConcurrency:C(i.maxConcurrency)})),cdn:yt(e,"cdn",i=>({behaviours:Array.isArray(i.behaviours)?i.behaviours:void 0})),...n.length>0&&{unreadableFields:n}}}Ee(RR,"extractStaticSiteConfig");function xy(e){return vt(e)&&("__identifier"in e||"__expression"in e||"__call"in e||"__unknown"in e)}Ee(xy,"isUnreadableRef");function CR(e){let t=[],n=Ee((r,o)=>{xy(r)&&t.push(o)},"check");n(e.source,"source"),n(e.routing,"routing"),n(e.domain,"domain");let i=[[e.build,"build",["command","outputDir"]],[e.security,"security",["headers","contentSecurityPolicy"]],[e.forms,"forms",["to","from","corsOrigin","maxConcurrency"]],[e.cdn,"cdn",["behaviours"]]];for(let[r,o,a]of i)if(xy(r))t.push(o);else if(N(r))for(let c of a)n(r[c],`${o}.${c}`);return t}Ee(CR,"collectUnreadableStaticSiteFields");function Fr(e){return e!==void 0&&e!==""}Ee(Fr,"isReadable");function Wl(e,t){return new Error(`Static-site pattern '${e}' in infrastructure.ts: Fjall could not read ${t.join(", ")} as inline literal(s). Fjall reads these fields out of the file and writes them back, so they must be written inline (source: "./site"), not as a variable or an expression.`)}Ee(Wl,"unreadableStaticSiteFields");function NR(e,t){let n=t.to;if(!Fr(n))throw Wl(e,["forms.to"]);return{to:n,...t.from!==void 0&&{from:t.from},...t.corsOrigin!==void 0&&{corsOrigin:t.corsOrigin},...t.maxConcurrency!==void 0&&{maxConcurrency:t.maxConcurrency}}}Ee(NR,"readStaticSiteForms");function PR(e,t){if(e.arguments.length<2)return null;let n=e.arguments[0],i=e.arguments[1];if(!ro.isStringLiteral(n)||!ro.isObjectLiteralExpression(i))return null;let r=n.text,o=B(i),a=o.type,c=ot(t),u=b(o.name);return u?a==="payload"||a==="nextjs"?{variableName:c,constructId:r,type:a,config:{name:u,domain:b(o.domain),database:ER(o),compute:xR(o),storage:AR(o),messaging:IR(o),cdn:$R(o),environment:TR(o)},node:e}:a==="staticsite"?{variableName:c,constructId:r,type:"staticsite",config:RR(o,u),node:e}:null:null}Ee(PR,"extractPatternResource");function Ay(e){return we(e,t=>{if(!ro.isCallExpression(t)||!Ie(t,"addPattern"))return null;let n=t.arguments[0];return Be(n,"PatternFactory")?PR(n,t):null})}Ee(Ay,"findPatternResources");function Iy(e,t){if(!t||t.length===0)return;let n=t[0];if(e.pattern=n.type,n.type==="staticsite"){let{config:r}=n,o=r.source,a=r.build?.command,c=r.build?.outputDir;if(r.unreadableFields!==void 0)throw Wl(r.name,r.unreadableFields);if(!Fr(o)||!Fr(a)||!Fr(c)){let u=[];throw Fr(o)||u.push("source"),Fr(a)||u.push("build.command"),Fr(c)||u.push("build.outputDir"),Wl(r.name,u)}e.patternConfig={type:"staticsite",name:r.name,source:o,build:{command:a,outputDir:c},routing:r.routing,security:r.security,domain:r.domain,...r.forms!==void 0&&{forms:NR(r.name,r.forms)},cdn:r.cdn};return}let{config:i}=n;e.patternConfig={type:n.type,name:i.name,domain:i.domain,database:i.database,compute:i.compute,storage:i.storage,messaging:i.messaging,cdn:i.cdn,environment:i.environment}}Ee(Iy,"applyPatternConfig");var s6=Object.defineProperty,Hl=(e,t)=>s6(e,"name",{value:t,configurable:!0});function wR(e,t){for(let n of t){let i=e.compute.find(r=>r.variableName===n.targetVariableName);i!==void 0&&i.type==="lambda"&&(i.scheduleExpression=n.schedule)}}Hl(wR,"applyScheduleBackfill");function kR(e,t){Object.keys(t).length>0&&(e.tags={...t}),t[Ga]&&(e.owner=t[Ga])}Hl(kR,"applyTagsAndOwner");function OR(e){let t=[];for(let n of e)if(Bl(n.moduleSpecifier))if(n.moduleSpecifier==="@fjall/components-infrastructure"||n.moduleSpecifier==="@fjall/infrastructure"){let i=n.namedImports.filter(r=>!tR.has(r));i.length>0&&t.push({moduleSpecifier:n.moduleSpecifier,namedImports:i,defaultImport:n.defaultImport})}else(n.namedImports.length>0||n.defaultImport)&&t.push(n);return t.length>0?t:void 0}Hl(OR,"computeAdditionalManagedImports");function Pn(e,t,n){let i={appName:t,type:"standard",database:[],s3:[],compute:[]};if(Iy(i,e.patternResources),e.vpcId&&(i.vpcId=e.vpcId),i.network=yy(e.network),i.backup=Sy(e.backup),i.tunnel=_y(e.tunnel),i.additionalNetworks=Ey(e.networkResources),kR(i,e.tags),i.database=ay(e.databaseResources),i.dynamodb=Vl(e.dynamodbResources),i.clickhouse=Gl(e.clickhouseResources),i.sqs=uy(e.sqsResources),i.cdn=dy(e.cdnResource,e.s3Resources,e.computeResources),i.s3=Xb(e.s3Resources),i.compute=Hb(e.computeResources,e.databaseResources,e.s3Resources,i),wR(i,e.schedules),i.additionalManagedImports=OR(e.imports),n?.skipValidation)return i;try{return e0.parse(i)}catch(r){if(r instanceof s.ZodError){let o=xa(r);throw new Error(`Invalid infrastructure configuration:
430
+ ${o}`)}throw r}}Hl(Pn,"convertToResourcePlan");var c6=Object.defineProperty,no=(e,t)=>c6(e,"name",{value:t,configurable:!0});function Br(e,t){let n=H.createSourceFile("infrastructure.ts",e,H.ScriptTarget.Latest,!0,H.ScriptKind.TS),i=DR(n),{appVariableName:r,appName:o}=jR(n),a=py(n),c=fy(n),u=gy(n),l=hy(n),m=vy(n),p=iy(n),{databases:g,dynamodb:v,clickhouse:A}=oy(p),X=cy(n),z=ly(n),xe=[...Kb(n),...Yb(n)],_r=Ll(n),De=Fl(n),ne=Ay(n),ge=zR(n),jn={sourceFile:n,imports:i,appVariableName:r,appName:o,vpcId:a,network:c,backup:u,tunnel:l,networkResources:m,databaseResources:g,dynamodbResources:v,clickhouseResources:A,sqsResources:X,cdnResource:z,s3Resources:xe,computeResources:_r,schedules:De,patternResources:ne,tags:ge};return t?.extractCustomCode&&(jn.customCodeBlocks=Qa(n),jn.classifiedStatements=Je(n)),jn}no(Br,"parseInfrastructure");function DR(e){let t=[];return H.forEachChild(e,n=>{if(H.isImportDeclaration(n)){if(!H.isStringLiteral(n.moduleSpecifier))return;let i={moduleSpecifier:n.moduleSpecifier.text,namedImports:[]};n.importClause&&(n.importClause.name&&(i.defaultImport=n.importClause.name.text),n.importClause.namedBindings&&H.isNamedImports(n.importClause.namedBindings)&&(i.namedImports=n.importClause.namedBindings.elements.map(r=>r.name.text))),t.push(i)}}),t}no(DR,"extractImports");function MR(e,t){return H.isStringLiteral(t)?t.text:H.isIdentifier(t)?qa(e,t.text)??"":H.isPropertyAccessExpression(t)?Ka(e,t)??"":""}no(MR,"resolveAppName");function jR(e){return it(e,t=>{if(H.isVariableStatement(t))for(let n of t.declarationList.declarations){if(!n.initializer||!Vt(n.initializer))continue;let i=H.isIdentifier(n.name)?n.name.text:"",r=n.initializer.arguments.length>0?MR(e,n.initializer.arguments[0]):"";return{appVariableName:i,appName:r}}})??{appVariableName:"",appName:""}}no(jR,"findAppVariable");function zR(e){let t={};function n(i){if(H.isCallExpression(i)&&H.isPropertyAccessExpression(i.expression)&&i.expression.name.text==="addTags"&&H.isIdentifier(i.expression.expression)&&i.arguments.length>0){let r=i.arguments[0];if(H.isObjectLiteralExpression(r)){let o=B(r);for(let[a,c]of Object.entries(o))typeof c=="string"?t[a]=c:Lr(c)&&(t[a]="default-value")}}H.forEachChild(i,n)}return no(n,"visit"),n(e),t}no(zR,"extractTags");import*as io from"typescript";var u6=Object.defineProperty,$e=(e,t)=>u6(e,"name",{value:t,configurable:!0});function oo(e,t,n){return e.slice(0,t)+n+e.slice(t)}$e(oo,"insertAtPosition");function ql(e,t){return e.find(n=>n.type===t)}$e(ql,"findClassification");function $y(e,t){return e.filter(n=>n.type===t).pop()}$e($y,"findLastClassification");function Vr(e){return io.createSourceFile("infrastructure.ts",e,io.ScriptTarget.Latest,!0,io.ScriptKind.TS)}$e(Vr,"parseSourceFile");function Kl(e,t){return e.endsWith(`
431
431
 
432
432
  `)||t.startsWith(`
433
433
  `)?"":e.endsWith(`
434
434
  `)?`
435
435
  `:`
436
436
 
437
- `}$e(Fl,"formatLeadingNewlines");function Bl(e,t){return e.slice(Math.max(0,t-2),t)}$e(Bl,"getContextBeforePosition");function Fr(e,t){return t?`${e}:${t}`:e}$e(Fr,"formatResourceId");function Gt(e,t){return{content:t,success:!1,error:Mt(e)}}$e(Gt,"createErrorResult");function yy(e,t,n,i){return Vi(e,n,i)||Gt(new Error(`Resource not found: ${Fr(n,i)}`),t)}$e(yy,"findResourceOrFail");function Sy(e){return"success"in e&&!e.success}$e(Sy,"isFailureResult");function EC(e,t){let{resourceType:n,code:i,afterResource:r}=t;try{let o=Ur(e),a;if(r){let u=Vi(o,r.type,r.name);if(!u)return Gt(new Error(`Insertion target not found: ${Fr(r.type,r.name)}`),e);a=u.endPos}else a=xC(o,n);let c=AC(e,a,i);return{content:Xi(e,a,c),success:!0}}catch(o){return Gt(o,e)}}$e(EC,"addResourceSurgically");function xC(e,t){let n=Xe(e),i=["import","app-init","tags","database","storage","messaging","compute","network","vpc-peer","vpc-peer-accepter","cross-plan-connection","cdn","pattern"],r=i.indexOf(t),o=null;for(let a of n)if(a.isManaged){let c=i.indexOf(a.type);c!==-1&&c<=r&&(o=a)}return o?o.endPos:e.getEnd()}$e(xC,"findInsertionPositionByType");function AC(e,t,n){let i=Bl(e,t),r=e.slice(t,Math.min(e.length,t+2)),o=Fl(i,n),a=r.startsWith(`
437
+ `}$e(Kl,"formatLeadingNewlines");function Yl(e,t){return e.slice(Math.max(0,t-2),t)}$e(Yl,"getContextBeforePosition");function Gr(e,t){return t?`${e}:${t}`:e}$e(Gr,"formatResourceId");function Gt(e,t){return{content:t,success:!1,error:Mt(e)}}$e(Gt,"createErrorResult");function Ty(e,t,n,i){return Xi(e,n,i)||Gt(new Error(`Resource not found: ${Gr(n,i)}`),t)}$e(Ty,"findResourceOrFail");function Ry(e){return"success"in e&&!e.success}$e(Ry,"isFailureResult");function LR(e,t){let{resourceType:n,code:i,afterResource:r}=t;try{let o=Vr(e),a;if(r){let u=Xi(o,r.type,r.name);if(!u)return Gt(new Error(`Insertion target not found: ${Gr(r.type,r.name)}`),e);a=u.endPos}else a=UR(o,n);let c=FR(e,a,i);return{content:oo(e,a,c),success:!0}}catch(o){return Gt(o,e)}}$e(LR,"addResourceSurgically");function UR(e,t){let n=Je(e),i=["import","app-init","tags","database","storage","messaging","compute","network","vpc-peer","vpc-peer-accepter","cross-plan-connection","cdn","pattern"],r=i.indexOf(t),o=null;for(let a of n)if(a.isManaged){let c=i.indexOf(a.type);c!==-1&&c<=r&&(o=a)}return o?o.endPos:e.getEnd()}$e(UR,"findInsertionPositionByType");function FR(e,t,n){let i=Yl(e,t),r=e.slice(t,Math.min(e.length,t+2)),o=Kl(i,n),a=r.startsWith(`
438
438
  `)?"":`
439
- `;return o+n+a}$e(AC,"formatCodeForInsertion");function IC(e,t){let{resourceType:n,resourceName:i,newCode:r}=t;try{let o=Ur(e),a=yy(o,e,n,i);if(Sy(a))return a;let c=a,u=c.node.getFullStart(),l=c.endPos,m=e.slice(u,c.node.getStart()),p=$C(m);return{content:e.slice(0,u)+p+r+e.slice(l),success:!0}}catch(o){return Gt(o,e)}}$e(IC,"updateResourceSurgically");function $C(e){let t=e.match(/^[\s]*[\n\r]+[\s]*/);return t?t[0]:""}$e($C,"extractLeadingWhitespace");function TC(e,t,n,i){let r=e,o=0;for(let a of t){let c=`// [ORPHANED: was after ${Fr(n,i)}]
440
- `,u=a.sourceText.trim(),l=r.indexOf(u,o);l!==-1&&(r=Xi(r,l,c),o=l+c.length+u.length)}return r}$e(TC,"insertOrphanMarkers");function CC(e,t){let{resourceType:n,resourceName:i,orphanHandling:r}=t,o=[];try{let a=Ur(e),c=yy(a,e,n,i);if(Sy(c))return c;let u=c,l=(Lr(e,{extractCustomCode:!0}).customCodeBlocks??[]).filter(A=>A.position==="after-resource"&&A.afterManagedResource?.type===n&&A.afterManagedResource?.name===i);if(l.length>0)if(r==="preserve-with-warning")o.push(`Custom code after ${Fr(n,i)} will be orphaned. Added // [ORPHANED] marker comment.`);else return Gt(new Error(`Orphan handling "${r}" is not yet implemented`),e);let m=u.node.getFullStart(),p=u.endPos,g=e[p]===`
441
- `?p+1:p,v=e.slice(0,m)+e.slice(g);return l.length>0&&r==="preserve-with-warning"&&(v=TC(v,l,n,i)),{content:v,success:!0,warnings:o.length>0?o:void 0}}catch(a){return Gt(a,e)}}$e(CC,"removeResourceSurgically");import*as Cn from"typescript";var L2=Object.defineProperty,St=(e,t)=>L2(e,"name",{value:t,configurable:!0});function wC(e,t){try{let n=Ur(e),i=new Set;for(let c of n.statements)Cn.isImportDeclaration(c)&&i.add(c.getText(n).trim());let r=[];for(let c of t){let u=c.trim();[...i].some(l=>OC(l,u))||r.push(u)}if(r.length===0)return{content:e,success:!0};let o=n.statements.filter(Cn.isImportDeclaration).at(-1)?.getEnd()??0,a=`
439
+ `;return o+n+a}$e(FR,"formatCodeForInsertion");function BR(e,t){let{resourceType:n,resourceName:i,newCode:r}=t;try{let o=Vr(e),a=Ty(o,e,n,i);if(Ry(a))return a;let c=a,u=c.node.getFullStart(),l=c.endPos,m=e.slice(u,c.node.getStart()),p=VR(m);return{content:e.slice(0,u)+p+r+e.slice(l),success:!0}}catch(o){return Gt(o,e)}}$e(BR,"updateResourceSurgically");function VR(e){let t=e.match(/^[\s]*[\n\r]+[\s]*/);return t?t[0]:""}$e(VR,"extractLeadingWhitespace");function GR(e,t,n,i){let r=e,o=0;for(let a of t){let c=`// [ORPHANED: was after ${Gr(n,i)}]
440
+ `,u=a.sourceText.trim(),l=r.indexOf(u,o);l!==-1&&(r=oo(r,l,c),o=l+c.length+u.length)}return r}$e(GR,"insertOrphanMarkers");function ZR(e,t){let{resourceType:n,resourceName:i,orphanHandling:r}=t,o=[];try{let a=Vr(e),c=Ty(a,e,n,i);if(Ry(c))return c;let u=c,l=(Br(e,{extractCustomCode:!0}).customCodeBlocks??[]).filter(A=>A.position==="after-resource"&&A.afterManagedResource?.type===n&&A.afterManagedResource?.name===i);if(l.length>0)if(r==="preserve-with-warning")o.push(`Custom code after ${Gr(n,i)} will be orphaned. Added // [ORPHANED] marker comment.`);else return Gt(new Error(`Orphan handling "${r}" is not yet implemented`),e);let m=u.node.getFullStart(),p=u.endPos,g=e[p]===`
441
+ `?p+1:p,v=e.slice(0,m)+e.slice(g);return l.length>0&&r==="preserve-with-warning"&&(v=GR(v,l,n,i)),{content:v,success:!0,warnings:o.length>0?o:void 0}}catch(a){return Gt(a,e)}}$e(ZR,"removeResourceSurgically");import*as wn from"typescript";var l6=Object.defineProperty,_t=(e,t)=>l6(e,"name",{value:t,configurable:!0});function KR(e,t){try{let n=Vr(e),i=new Set;for(let c of n.statements)wn.isImportDeclaration(c)&&i.add(c.getText(n).trim());let r=[];for(let c of t){let u=c.trim();[...i].some(l=>XR(l,u))||r.push(u)}if(r.length===0)return{content:e,success:!0};let o=n.statements.filter(wn.isImportDeclaration).at(-1)?.getEnd()??0,a=`
442
442
  `+r.join(`
443
- `);return{content:Xi(e,o,a),success:!0}}catch(n){return Gt(n,e)}}St(wC,"ensureImports");function _y(e){return new Set(e.split(",").map(t=>t.trim()).filter(Boolean))}St(_y,"parseNamedImports");function kC(e,t){let n=_y(e),i=_y(t);for(let r of i)if(!n.has(r))return!1;return!0}St(kC,"existingImportCoversRequired");function OC(e,t){let n=e.match(RC),i=t.match(RC);if(!n||!i||n[1]!==i[1])return!1;let r=e.match(PC),o=t.match(PC);return r&&o?kC(r[1],o[1]):!!r==!!o}St(OC,"importsAreEquivalent");var RC=/from\s+["']([^"']+)["']/,PC=/\{([^}]+)\}/,NC={"before-imports":0,"after-imports":1,"after-app-init":2,"after-tags":3,"after-resource":4,"end-of-file":5};function DC(e){return[...e].sort((t,n)=>{let i=NC[n.position]-NC[t.position];return i!==0?i:(n.originalLine??0)-(t.originalLine??0)})}St(DC,"sortCustomBlocksForInsertion");function MC(e,t,n,i){if(n!==null){let o=LC(e,n,t);return Xi(e,n,o)}let r=t.afterManagedResource?`// [ORPHANED: was after ${Fr(t.afterManagedResource.type,t.afterManagedResource.name)}]
443
+ `);return{content:oo(e,o,a),success:!0}}catch(n){return Gt(n,e)}}_t(KR,"ensureImports");function Cy(e){return new Set(e.split(",").map(t=>t.trim()).filter(Boolean))}_t(Cy,"parseNamedImports");function YR(e,t){let n=Cy(e),i=Cy(t);for(let r of i)if(!n.has(r))return!1;return!0}_t(YR,"existingImportCoversRequired");function XR(e,t){let n=e.match(WR),i=t.match(WR);if(!n||!i||n[1]!==i[1])return!1;let r=e.match(HR),o=t.match(HR);return r&&o?YR(r[1],o[1]):!!r==!!o}_t(XR,"importsAreEquivalent");var WR=/from\s+["']([^"']+)["']/,HR=/\{([^}]+)\}/,qR={"before-imports":0,"after-imports":1,"after-app-init":2,"after-tags":3,"after-resource":4,"end-of-file":5};function JR(e){return[...e].sort((t,n)=>{let i=qR[n.position]-qR[t.position];return i!==0?i:(n.originalLine??0)-(t.originalLine??0)})}_t(JR,"sortCustomBlocksForInsertion");function QR(e,t,n,i){if(n!==null){let o=rC(e,n,t);return oo(e,n,o)}let r=t.afterManagedResource?`// [ORPHANED: was after ${Gr(t.afterManagedResource.type,t.afterManagedResource.name)}]
444
444
  `:`// [ORPHANED]
445
445
  `;return i.push(`Custom code from line ${t.originalLine} could not be positioned. Added at end of file.`),e+`
446
- `+r+t.sourceText}St(MC,"insertOrOrphanBlock");function Vl(e,t,n){if(!t||t.length===0)return{content:e,success:!0};try{let i=Ur(e),r=Xe(i),o=[],a=DC(t),c=e;for(let u of a){let l=zC(i,r,u,n,o);c=MC(c,u,l,o)}return{content:c,success:!0,warnings:o.length>0?o:void 0}}catch(i){return Gt(i,e)}}St(Vl,"injectCustomCodeBlocks");function jC(e,t,n,i){if(!t.afterManagedResource)return null;let r=t.afterManagedResource,o=(r.name&&n?.get(r.name))??r.name,a=e.find(u=>u.type===r.type&&u.resourceName===o);if(a)return a.endPos;let c=e.filter(u=>u.type===r.type&&u.isManaged);return c.length===1?c[0].endPos:(i&&i.push(`Resource ${Fr(t.afterManagedResource.type,t.afterManagedResource.name)} not found. Custom code may be orphaned.`),null)}St(jC,"findAfterResourcePosition");function zC(e,t,n,i,r){switch(n.position){case"before-imports":return 0;case"after-imports":return by(t,"import")?.endPos??0;case"after-app-init":return Ul(t,"app-init")?.endPos??null;case"after-tags":return Ul(t,"tags")?.endPos??null;case"after-resource":return jC(t,n,i,r);case"end-of-file":return e.getEnd();default:return null}}St(zC,"findCustomCodeInsertPosition");function LC(e,t,n){let i=Bl(e,t),r=n.sourceText;return r=Fl(i,r)+r,r.endsWith(`
446
+ `+r+t.sourceText}_t(QR,"insertOrOrphanBlock");function Xl(e,t,n){if(!t||t.length===0)return{content:e,success:!0};try{let i=Vr(e),r=Je(i),o=[],a=JR(t),c=e;for(let u of a){let l=tC(i,r,u,n,o);c=QR(c,u,l,o)}return{content:c,success:!0,warnings:o.length>0?o:void 0}}catch(i){return Gt(i,e)}}_t(Xl,"injectCustomCodeBlocks");function eC(e,t,n,i){if(!t.afterManagedResource)return null;let r=t.afterManagedResource,o=(r.name&&n?.get(r.name))??r.name,a=e.find(u=>u.type===r.type&&u.resourceName===o);if(a)return a.endPos;let c=e.filter(u=>u.type===r.type&&u.isManaged);return c.length===1?c[0].endPos:(i&&i.push(`Resource ${Gr(t.afterManagedResource.type,t.afterManagedResource.name)} not found. Custom code may be orphaned.`),null)}_t(eC,"findAfterResourcePosition");function tC(e,t,n,i,r){switch(n.position){case"before-imports":return 0;case"after-imports":return $y(t,"import")?.endPos??0;case"after-app-init":return ql(t,"app-init")?.endPos??null;case"after-tags":return ql(t,"tags")?.endPos??null;case"after-resource":return eC(t,n,i,r);case"end-of-file":return e.getEnd();default:return null}}_t(tC,"findCustomCodeInsertPosition");function rC(e,t,n){let i=Yl(e,t),r=n.sourceText;return r=Kl(i,r)+r,r.endsWith(`
447
447
  `)||(r+=`
448
- `),r}St(LC,"formatCustomCodeForInsertion");function UC(e){try{let t=function(r){r.kind===Cn.SyntaxKind.Unknown&&i.push("Unknown node found in AST - possible parse error"),Cn.forEachChild(r,t)};St(t,"visit");let n=Ur(e),i=[];return t(n),i.length>0?{valid:!1,errors:i}:{valid:!0}}catch(t){return{valid:!1,errors:[Mt(t)]}}}St(UC,"validateModifiedFile");import*as Te from"typescript";var Ja=s.enum(["A","AAAA","CNAME","MX","TXT","NS","SRV","CAA"]),U2=s.object({name:s.string(),type:Ja,ttl:s.number().optional(),value:s.string(),priority:s.number().optional(),weight:s.number().optional(),port:s.number().optional()}).strict(),F2=s.object({subdomain:s.string(),targetAccount:s.string(),auto:s.boolean()}).strict(),B2=s.object({domainName:s.string(),subjectAlternativeNames:s.array(s.string())}).strict(),RJ=s.object({origin:s.string(),ttl:s.number(),records:s.array(U2),delegations:s.array(F2),certificates:s.array(B2)}).strict(),Zt=Object.freeze({ORIGIN:"$ORIGIN",TTL:"$TTL",FJALL_DELEGATE:"$FJALL-DELEGATE",FJALL_CERT:"$FJALL-CERT"}),Gl="ALIAS ";var FC=s.discriminatedUnion("kind",[s.object({kind:s.literal("ecs"),appName:s.string()}).strict(),s.object({kind:s.literal("cdn"),appName:s.string()}).strict(),s.object({kind:s.literal("bucket"),bucketName:s.string()}).strict(),s.object({kind:s.literal("custom"),dnsName:s.string(),hostedZoneId:s.string()}).strict()]),BC=FC.options.map(e=>e.shape.kind.value),Ey=s.enum(["A","AAAA"]),xy=s.enum(["route53","external-delegated","external-records"]),VC=s.enum(["zone","full"]),V2=s.object({kind:s.literal("standard"),type:s.enum(["A","AAAA","CNAME","MX","TXT","NS","SRV","CAA"]),name:s.string(),value:s.union([s.string(),s.array(s.string())]),ttl:s.number().int().positive().optional()}).strict(),G2=s.object({kind:s.literal("alias"),type:Ey,name:s.string(),target:FC}).strict(),Z2=s.discriminatedUnion("kind",[V2,G2]),W2=s.object({domainName:s.string(),subjectAlternativeNames:s.array(s.string()).optional(),transparencyLogging:s.boolean().optional(),cloudFront:s.boolean().optional()}).strict(),H2=s.object({subdomain:s.string(),toAccount:s.string(),auto:s.boolean().optional()}).strict(),wJ=s.object({zoneName:s.string(),registrar:xy,hostedZoneId:s.string().optional(),delegatedSubdomain:s.string().optional(),adoptedNameServers:s.array(s.string().min(1)).min(1).optional(),records:s.array(Z2),certificates:s.array(W2),delegations:s.array(H2)}).strict().refine(e=>e.registrar!=="external-delegated"||e.delegatedSubdomain!==void 0,{message:"external-delegated requires delegatedSubdomain"}).refine(e=>e.registrar!=="external-records"||e.delegations.length===0,{message:"external-records forbids delegations"}).refine(e=>e.registrar==="external-delegated"||e.adoptedNameServers===void 0,{message:"adoptedNameServers requires registrar external-delegated"}).refine(e=>e.registrar!=="external-delegated"||e.hostedZoneId===void 0==(e.adoptedNameServers===void 0),{message:"external-delegated adoption requires hostedZoneId and adoptedNameServers together (both-or-neither)"});var q2=Object.defineProperty,fe=(e,t)=>q2(e,"name",{value:t,configurable:!0}),ZC=xy.options,GC=VC.options,K2=Ja.options,Y2=Ey.options;function WC(e){let t=[],n=fe(r=>{if(Te.isNewExpression(r)&&HC(r.expression)){let o=qC(r);o!==void 0&&t.push(o)}Te.forEachChild(r,n)},"visit");if(n(e),t.length===0)return N(void 0);if(t.length>1)return $(new Error(`Expected exactly one 'new Domain(...)' call per infrastructure file, found ${t.length}`));let i=t[0];return i?N(i):N(void 0)}fe(WC,"findDomainConstructCall");function HC(e){return Te.isIdentifier(e)&&e.text==="Domain"}fe(HC,"isDomainIdentifier");function qC(e){let t=e.arguments;if(!t||t.length<3)return;let n=t[0],i=t[1],r=t[2];if(!n||!i||!r||!Te.isObjectLiteralExpression(r))return;let o=KC(e);if(o===void 0)return;let a=YC(e),c=Te.isStringLiteral(i)?i.text:void 0;return{callExpression:e,containingStatement:o,propsObjectLiteral:r,domainVarId:a,scopeArgumentText:n.getText(),constructIdLiteral:c}}fe(qC,"buildMatch");function KC(e){let t=e;for(;t!==void 0;){if(Te.isExpressionStatement(t)||Te.isVariableStatement(t))return t;t=t.parent}}fe(KC,"findContainingTopLevelStatement");function YC(e){let t=e.parent;for(;t!==void 0;){if(Te.isVariableDeclaration(t)&&Te.isIdentifier(t.name)&&t.initializer===e)return t.name.text;t=t.parent}}fe(YC,"extractDomainVarId");function XC(e){switch(e.kind){case"registrar_required":return"'registrar' property is required";case"registrar_unsupported":return`'registrar' must be one of ${ZC.join(", ")}, got ${JSON.stringify(e.value)}`;case"missing_field":return`'${e.field}' property is required`;case"invalid_literal":return`'${e.field}' ${e.reason}`;case"removed_field":return`'${e.field}' was removed from the Domain API \u2014 ${e.cure}`}}fe(XC,"errorMessage");var X2="declare the delegated child as its own Domain with registrar: 'external-delegated' and set 'parentDelegationRoleArn' (the CLI injects it via ManagedDomainBinding.delegationRoleArn); the child UPSERTs its NS records into the parent zone";function JC(e){let t=B(e),n=U(t.registrar,ZC);if(n===void 0){let c=t.registrar;if(c===void 0)return $({kind:"registrar_required"});let u=typeof c=="string"?c:Wl(c);return $({kind:"registrar_unsupported",value:u})}let i=b(t.zoneName);if(i===void 0)return $({kind:"missing_field",field:"zoneName"});let r=eR(t.records);if(!r.success)return r;let o=oR(t.certificates);if(!o.success)return o;if(t.delegations!==void 0)return $({kind:"removed_field",field:"delegations",cure:X2});let a={zoneName:i,description:b(t.description),costAllocationEnvironment:b(t.costAllocationEnvironment),tags:aR(t.tags),records:r.data,certificates:o.data};switch(n){case"route53":return N({...a,registrar:n,hostedZoneId:b(t.hostedZoneId)});case"external-delegated":{let c=b(t.delegatedSubdomain);if(c===void 0)return $({kind:"missing_field",field:"delegatedSubdomain"});let u=b(t.hostedZoneId);if(t.hostedZoneId!==void 0&&u===void 0)return $({kind:"invalid_literal",field:"hostedZoneId",reason:"must be a literal string zone id on external-delegated \u2014 dynamic expressions cannot be round-tripped"});let l=de(t.adoptedNameServers);if(t.adoptedNameServers!==void 0&&l===void 0)return $({kind:"invalid_literal",field:"adoptedNameServers",reason:"must be an array of literal NS hostname strings \u2014 the parent NS UPSERT writes them verbatim"});if(u===void 0!=(l===void 0))return $({kind:"invalid_literal",field:u===void 0?"hostedZoneId":"adoptedNameServers",reason:"adopting an existing child zone requires hostedZoneId and adoptedNameServers together (both-or-neither) \u2014 an imported zone exposes no name-server attribute at synth"});let m=b(t.parentDelegationRoleArn);if(t.parentDelegationRoleArn!==void 0&&m===void 0)return $({kind:"invalid_literal",field:"parentDelegationRoleArn",reason:"must be a literal string ARN (VD2-a) \u2014 the CLI injects it via ManagedDomainBinding.delegationRoleArn; dynamic expressions such as Fn.importValue are not supported"});let p=U(t.phase,GC);return t.phase!==void 0&&p===void 0?$({kind:"invalid_literal",field:"phase",reason:`must be one of ${GC.map(g=>`'${g}'`).join(", ")}`}):N({...a,registrar:n,delegatedSubdomain:c,hostedZoneId:u,adoptedNameServers:l,parentDelegationRoleArn:m,phase:p})}case"external-records":return N({...a,registrar:n})}}fe(JC,"parseDomainProps");function QC(e){return XC(e)}fe(QC,"parseDomainErrorMessage");function eR(e){if(e===void 0)return N([]);if(!Array.isArray(e))return $({kind:"invalid_literal",field:"records",reason:"must be an array"});let t=[];for(let n=0;n<e.length;n++){let i=e[n];if(!P(i))return $({kind:"invalid_literal",field:`records[${n}]`,reason:"must be an object literal"});let r=tR(i,n);if(!r.success)return r;t.push(r.data)}return N(t)}fe(eR,"parseRecordsArray");function tR(e,t){let n=b(e.type),i=b(e.name);if(n===void 0)return $({kind:"missing_field",field:`records[${t}].type`});if(i===void 0)return $({kind:"missing_field",field:`records[${t}].name`});if(e.target!==void 0){if(!Y2.some(u=>u===n))return $({kind:"invalid_literal",field:`records[${t}]`,reason:`alias records must have type 'A' or 'AAAA', got '${n}'`});let c=nR(e.target);return N({kind:"alias",type:n,name:i,target:c})}if(!K2.some(c=>c===n))return $({kind:"invalid_literal",field:`records[${t}]`,reason:`unsupported record type '${n}'`});let r=rR(e.value);if(r===void 0)return $({kind:"invalid_literal",field:`records[${t}].value`,reason:`must be a string or array of strings (got ${JSON.stringify(e.value)})`});let o=C(e.ttl),a={kind:"standard",type:n,name:i,value:r,...o!==void 0?{ttl:o}:{}};return N(a)}fe(tR,"parseRecord");function rR(e){if(e===void 0)return;if(typeof e=="string")return e;let t=de(e);if(t!==void 0)return t}fe(rR,"parseRecordValue");function nR(e){if(Tt(e))return iR(e);if(P(e)){let t=U(e.kind,BC);if(t==="ecs"||t==="cdn"){let n=b(e.appName);if(n!==void 0)return{kind:t,appName:n}}if(t==="bucket"){let n=b(e.bucketName);if(n!==void 0)return{kind:t,bucketName:n}}if(t==="custom"){let n=b(e.dnsName),i=b(e.hostedZoneId);if(n!==void 0&&i!==void 0)return{kind:t,dnsName:n,hostedZoneId:i}}}return{kind:"unresolved",sourceText:Wl(e)}}fe(nR,"parseTarget");function iR(e){let t=e.__call.trim(),n=t.match(/^([A-Za-z_][\w$]*)\s*\(([\s\S]*)\)\s*$/);if(!n)return{kind:"unresolved",sourceText:t};let i=n[1],r=n[2]??"",o=Zl(r);switch(i){case"fjallApp":{let a=Rn(o,0);return a===void 0?{kind:"dynamic",sourceText:t}:{kind:"ecs",appName:a}}case"fjallCdn":{let a=Rn(o,0);return a===void 0?{kind:"dynamic",sourceText:t}:{kind:"cdn",appName:a}}case"fjallBucket":{let a=Rn(o,0);return a===void 0?{kind:"dynamic",sourceText:t}:{kind:"bucket",bucketName:a}}case"aliasTo":{if(o.length>=2){let a=Rn(o,0),c=Rn(o,1);return a!==void 0&&c!==void 0?{kind:"custom",dnsName:a,hostedZoneId:c}:{kind:"dynamic",sourceText:t}}if(o.length===1){let a=o[0]?.trim()??"",c=Ay(a,"dnsName"),u=Ay(a,"hostedZoneId");return c!==void 0&&u!==void 0?{kind:"custom",dnsName:c,hostedZoneId:u}:{kind:"dynamic",sourceText:t}}return{kind:"unresolved",sourceText:t}}default:return{kind:"unresolved",sourceText:t}}}fe(iR,"resolveCallRefTarget");function Zl(e){let t=[],n=0,i=null,r="";for(let a=0;a<e.length;a++){let c=e[a];if(i!==null){if(r+=c,c==="\\"&&a+1<e.length){let u=e[a+1];u!==void 0&&(r+=u,a+=1);continue}c===i&&(i=null);continue}if(c==='"'||c==="'"||c==="`"){i=c,r+=c;continue}if(c==="("||c==="{"||c==="["){n+=1,r+=c;continue}if(c===")"||c==="}"||c==="]"){n-=1,r+=c;continue}if(c===","&&n===0){t.push(r.trim()),r="";continue}r+=c}let o=r.trim();return o.length>0&&t.push(o),t}fe(Zl,"splitTopLevelArgs");function Rn(e,t){let n=e[t];if(n===void 0)return;let i=n.trim();if(i.length<2)return;let r=i[0],o=i[i.length-1];if(r===o&&!(r!=='"'&&r!=="'"&&r!=="`"))return i.slice(1,-1)}fe(Rn,"extractStringLiteralArg");function Ay(e,t){let n=e.trim().replace(/^\{|\}$/g,""),i=Zl(n);for(let r of i){let o=r.indexOf(":");if(o<0||r.slice(0,o).trim().replace(/["'`]/g,"")!==t)continue;let a=r.slice(o+1).trim();return Rn([a],0)}}fe(Ay,"extractObjectFieldString");function oR(e){if(e===void 0)return N([]);if(!Array.isArray(e))return $({kind:"invalid_literal",field:"certificates",reason:"must be an array"});let t=[];for(let n=0;n<e.length;n++){let i=e[n];if(typeof i=="string"){t.push({domainName:i});continue}if(!P(i))return $({kind:"invalid_literal",field:`certificates[${n}]`,reason:"must be a string or object literal"});let r=b(i.domainName);if(r===void 0)return $({kind:"missing_field",field:`certificates[${n}].domainName`});let o=de(i.subjectAlternativeNames),a=j(i.transparencyLogging),c=j(i.cloudFront);if(i.cloudFront!==void 0&&c===void 0)return $({kind:"invalid_literal",field:`certificates[${n}].cloudFront`,reason:"must be a boolean literal \u2014 the CloudFront designation drives the zone-level us-east-1 export contract and cannot be round-tripped from a dynamic expression"});t.push({domainName:r,...o!==void 0?{subjectAlternativeNames:o}:{},...a!==void 0?{transparencyLogging:a}:{},...c!==void 0?{cloudFront:c}:{}})}return N(t)}fe(oR,"parseCertificatesArray");function aR(e){if(e===void 0||!P(e))return;let t={};for(let[n,i]of Object.entries(e)){let r=b(i);r!==void 0&&(t[n]=r)}return Object.keys(t).length===0?void 0:t}fe(aR,"parseStringRecord");function Wl(e){if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="string")return JSON.stringify(e);if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return`[${e.map(t=>Wl(t)).join(", ")}]`;if(typeof e=="object"){if("__call"in e)return String(e.__call);if("__identifier"in e)return String(e.__identifier);if("__expression"in e)return String(e.__expression);if("__unknown"in e)return String(e.__unknown)}return String(e)}fe(Wl,"stringifyParsedValue");var J2=Object.defineProperty,mr=(e,t)=>J2(e,"name",{value:t,configurable:!0});function sR(e){return e?.map(t=>({name:t.name,...t.serviceType!==void 0&&{serviceType:t.serviceType},...t.docker!==void 0&&{docker:t.docker},...t.containerPort!==void 0&&{containerPort:t.containerPort},...t.needsDatabaseConnection!==void 0&&{needsDatabaseConnection:t.needsDatabaseConnection},...t.routing!==void 0&&{routing:t.routing}}))}mr(sR,"toUserServiceConfigs");function cR(e,t,n=!0,i,r){let o={appName:e,type:t,database:[],s3:[],compute:[]};if(t==="custom")return o;let a=t,c=sr[a];return{...o,database:uR(e,c,a,n,r),compute:pR(e,c,a,n,i),network:c.network,backup:c.backup}}mr(cR,"planApplicationResources");function uR(e,t,n,i,r){let o=Cb(n),a=t.database[o];return!i||a===null?[]:[{name:e,type:o,databaseName:On(e),variableName:`${or(e)}Database`,...a,...r?.snapshotIdentifier!==void 0&&{snapshotIdentifier:r.snapshotIdentifier},...r?.snapshotUsername!==void 0&&{snapshotUsername:r.snapshotUsername}}]}mr(uR,"buildDatabasePlan");function lR(e,t){if(!(e===void 0&&t===void 0))return{scaling:{...e!==void 0&&{minCapacity:e},...t!==void 0&&{maxCapacity:t}}}}mr(lR,"buildScalingConfig");function Iy(e){let{minCapacity:t,maxCapacity:n,...i}=e;return{...i,...lR(t,n)}}mr(Iy,"planServiceFromTierPreset");function dR(e,t){let n=Iy(e),i=t?.serviceType==="worker",r=t?.containerPort??M$,o=t?.docker;return{...n,...o?.path!==void 0&&{docker:{path:o.path,...o.context!==void 0&&{context:o.context},...o.target!==void 0&&{target:o.target}}},...t?.needsDatabaseConnection!==void 0&&{needsDatabaseConnection:t.needsDatabaseConnection},containers:i?[{}]:[{port:r}]}}mr(dR,"buildServiceEntry");function mR(e,t){return t||e?.directAccess===!0?e:{...e,loadBalancer:!1}}mr(mR,"resolveClusterConfig");function pR(e,t,n,i,r){let o=t.compute.ecs,a=(r&&r.length>0?Rb(n,r):o.services.map((u,l)=>({...u,name:l===0?"api":`service-${l+1}`}))).map((u,l)=>dR(u,r?.[l])),c=a.some(u=>u.containers?.some(l=>l.port!==void 0));return[{name:e,type:Ti.ECS,needsConnection:i,connectedDatabase:i?[e]:void 0,variableName:`${or(e)}Compute`,cluster:mR(o.cluster,c),services:a}]}mr(pR,"buildComputePlan");function Ji(e,t){let n=[El(e),_l(e),Sl(e)];if(Il(e))n.push(ja(e),La(e));else{let r=Al(e);n.push(La(e),cl(e),ul(e),vl(e),bl(e),yl(e),pl(e,r),xl(e))}let i=n.join("");if(e.customCodeBlocks&&e.customCodeBlocks.length>0){let r=Vl(i,e.customCodeBlocks,t?.resourceMapping);return r.success?N(r.content):$(new Error(`Custom code injection failed: ${r.error??"unknown error"}`))}return N(i)}mr(Ji,"generateInfrastructureFromPlan");var Q2=Object.defineProperty,Qi=(e,t)=>Q2(e,"name",{value:t,configurable:!0}),e6=Tb("standard");function fR(e){return Ea.options.some(t=>t.shape?.type?.value===e)}Qi(fR,"isPatternConfigType");function gR(e,t,n){let{tier:i="standard",domain:r,database:o,compute:a,cdn:c,environment:u,tags:l}=n??{},m=Tl(i);if(!m&&i!=="custom")return $(new Error(`Invalid pattern tier: "${i}". Valid tiers are: ${[...Fa,"custom"].join(", ")}`));if(!fR(t))return $(new Error(`Unsupported pattern type: ${t}`));let p=m?$l(i):null,g=yR(t,e,{domain:r,database:o,compute:a,cdn:c,environment:u,tierPreset:p});if(!g.success)return g;let v=g.data;return N({appName:e,type:"standard",pattern:t,network:p?p.network:e6,backup:p?p.backup:!1,patternConfig:v,database:[],s3:[],compute:[],tags:l??{}})}Qi(gR,"planOpenNextResources");function hR(e,t){return{type:e?.type??t.database.type,instanceType:e?.instanceType??t.database.instanceType,backupRetention:e?.backupRetention??t.database.backupRetention,deletionProtection:e?.deletionProtection??t.database.deletionProtection,...e?.databaseName!==void 0&&{databaseName:e.databaseName},...e?.publiclyAccessible!==void 0&&{publiclyAccessible:e.publiclyAccessible},...e?.allowedIpCidr!==void 0&&{allowedIpCidr:e.allowedIpCidr},...e?.encryption!==void 0&&{encryption:e.encryption}}}Qi(hR,"mergeDatabaseConfig");function vR(e,t){return{memorySize:e?.memorySize??t.compute.memorySize,timeout:e?.timeout??t.compute.timeout}}Qi(vR,"mergeComputeConfig");function bR(e){let{encryption:t,...n}=e;return{...n,...t&&{encryption:{storageKey:t}}}}Qi(bR,"toPatternDatabaseConfig");function yR(e,t,n){let{domain:i,database:r,compute:o,cdn:a,environment:c,tierPreset:u}=n,l=u?hR(r,u):r,m=u?vR(o,u):o,p={type:e,name:t,domain:i,database:l?bR(l):void 0,compute:m?{server:m}:void 0,cdn:a?{domainNames:a.domainNames,certificateArn:a.certificateArn}:void 0,environment:c},g=Ea.safeParse(p);return g.success?N(g.data):$(new Error(`Invalid pattern config: ${g.error.message}`))}Qi(yR,"buildPatternConfig");var t6=Object.defineProperty,r6=(e,t)=>t6(e,"name",{value:t,configurable:!0});function SR(e,t){let n={type:"staticsite",name:e,source:t.source,build:t.build,...t.routing!==void 0&&{routing:t.routing},...t.security!==void 0&&{security:t.security},...t.domain!==void 0&&{domain:t.domain},...t.forms!==void 0&&{forms:t.forms},...t.cdn!==void 0&&{cdn:t.cdn}},i=lb.safeParse(n);return i.success?N({appName:e,type:"standard",pattern:"staticsite",patternConfig:i.data,database:[],s3:[],compute:[],tags:t.tags??{}}):$(new Error(`Invalid static-site pattern config: ${i.error.message}`))}r6(SR,"planStaticSiteResources");var n6=Object.defineProperty,Hl=(e,t)=>n6(e,"name",{value:t,configurable:!0});function _R(e){let t=e.split("/");if(t.length!==2||!t[0]||!t[1])throw new Error(`Invalid service reference format: '${e}'. Expected 'ClusterName/ServiceName'.`);return t[0]}Hl(_R,"parseServiceReference");function $y(e,t,n){n==="database"?(e.needsConnection=!0,e.connectedDatabase=[...new Set([...e.connectedDatabase??[],t])]):e.connectedStorage=[...new Set([...e.connectedStorage??[],t])]}Hl($y,"addResourceConnection");function ql(e,t,n,i){let r=new Set(t),o=[...new Set(t.map(_R))];for(let a of o){let c=e.compute.find(u=>u.name===a);if(c?.services){$y(c,n,i);for(let u of c.services){let l=`${a}/${u.name}`;r.has(l)&&(i==="database"?u.needsDatabaseConnection=!0:u.needsStorageConnection=!0)}}}}Hl(ql,"applyServiceConnections");function Kl(e,t,n,i){for(let r of e.compute)if(t.includes(r.name)&&($y(r,n,i),r.services))for(let o of r.services)i==="database"?o.needsDatabaseConnection=!0:o.needsStorageConnection=!0}Hl(Kl,"applyComputeConnections");var i6=Object.defineProperty,Ee=(e,t)=>i6(e,"name",{value:t,configurable:!0});function ER(e){let t=e.database.length>0,n=e.cdn!==void 0;return[{type:"database",label:"Database (RDS)",available:!0},{type:"database:proxy",label:"RDS Proxy",available:t,reason:t?void 0:"Requires at least one database"},{type:"storage:s3",label:"S3 Bucket",available:!0},{type:"network",label:"Network (VPC)",available:!0},{type:"compute:ecs",label:"Compute (ECS)",available:!0},{type:"compute:lambda",label:"Compute (Lambda)",available:!0},{type:"cdn",label:"CDN (CloudFront)",available:!n,reason:n?"A CDN is already configured. Remove existing CDN first.":void 0},{type:"tunnel",label:"Database Tunnel",available:t&&!e.tunnel,reason:t?e.tunnel?"Tunnel is already enabled":void 0:"Requires at least one database"}]}Ee(ER,"listAvailableResources");function Qa(e,t){if(DR(e,t.resourceName))return $(new Error(`Resource name '${t.resourceName}' is already used in this application.`));switch(t.type){case"database":return xR(e,t);case"database:proxy":return AR(e,t);case"storage:s3":return N(void 0);case"network":return N(void 0);case"compute:ecs":return!t.services||t.services.length===0?$(new Error("ECS compute requires at least one service.")):N(void 0);case"compute:lambda":return N(void 0);case"cdn":return IR(e,t);case"tunnel":return $R(e);default:{let n=t;return $(new Error(`Unknown resource type: ${String(n)}`))}}}Ee(Qa,"validateResourceAddition");function xR(e,t){let n=t.databaseName??t.resourceName.toLowerCase();return e.database.some(i=>i.databaseName===n)?$(new Error(`Database name '${n}' already exists. Choose a different database name.`)):t.databaseType==="GlobalAurora"&&!t.primaryRegion?$(new Error("GlobalAurora databases require a primaryRegion.")):N(void 0)}Ee(xR,"validateDatabaseAddition");function AR(e,t){let n=e.database.find(i=>i.name===t.targetDatabase||i.databaseName===t.targetDatabase);if(!n){let i=e.database.map(r=>r.name).join(", ")||"none";return $(new Error(`Database '${t.targetDatabase}' not found. Available databases: ${i}`))}return n.proxy!==void 0&&n.proxy!==!1?$(new Error(`Database '${n.name}' already has RDS Proxy enabled.`)):N(void 0)}Ee(AR,"validateProxyAddition");function IR(e,t){if(e.cdn)return $(new Error("A CDN is already configured for this application. Remove the existing CDN first."));if(!Ty(e,t.defaultOriginRef))return $(new Error(`Origin '${t.defaultOriginRef}' not found in plan. CDN origin must reference an existing resource.`));if(t.behaviours){for(let n of t.behaviours)if(!Ty(e,n.originRef))return $(new Error(`Behaviour origin '${n.originRef}' not found in plan.`))}return N(void 0)}Ee(IR,"validateCdnAddition");function $R(e){return e.tunnel&&typeof e.tunnel=="object"?$(new Error("Tunnel is already enabled for this application.")):e.database.length===0?$(new Error("No databases found \u2014 tunnel requires at least one relational database.")):N(void 0)}Ee($R,"validateTunnelAddition");function Yl(e,t){let n=Qa(e,t);if(!n.success)return n;switch(t.type){case"database":return TR(e,t);case"database:proxy":return CR(e,t);case"storage:s3":return RR(e,t);case"network":return PR(e,t);case"compute:ecs":return NR(e,t);case"compute:lambda":return wR(e,t);case"cdn":return kR(e,t);case"tunnel":return OR(e,t);default:{let i=t;return $(new Error(`Unknown resource type: ${String(i)}`))}}}Ee(Yl,"addResourceToPlan");function TR(e,t){let n=t.databaseName??t.resourceName.toLowerCase(),i={name:t.resourceName,type:t.databaseType,databaseName:n},r;switch(t.databaseType){case"Instance":r={...i,...t.instanceType!==void 0?{instanceType:t.instanceType}:{},...t.multiAz!==void 0?{multiAz:t.multiAz}:{},...t.readReplica!==void 0?{readReplica:t.readReplica}:{},...t.publiclyAccessible!==void 0?{publiclyAccessible:t.publiclyAccessible}:{},...t.backupRetention!==void 0?{backupRetention:t.backupRetention}:{}};break;case"Aurora":r={...i,...t.writer!==void 0?{writer:t.writer}:{},...t.readers!==void 0?{readers:t.readers}:{},...t.backupRetention!==void 0?{backupRetention:t.backupRetention}:{},...t.preferredMaintenanceWindow!==void 0?{preferredMaintenanceWindow:t.preferredMaintenanceWindow}:{}};break;case"GlobalAurora":r={...i,primaryRegion:t.primaryRegion,...t.secondaryRegions!==void 0?{secondaryRegions:t.secondaryRegions}:{}};break;default:{let a=t.databaseType;return $(new Error(`Unknown database type: ${String(a)}`))}}let o={...e,database:[...e.database,r]};return Cy(o,t.resourceName,"database",t),N(o)}Ee(TR,"addDatabase");function CR(e,t){let n=e.database.map(o=>({...o})),i=n.find(o=>o.name===t.targetDatabase||o.databaseName===t.targetDatabase);if(!i)return $(new Error(`Database '${t.targetDatabase}' not found.`));let r={};return t.maxConnections!==void 0&&(r.maxConnections=t.maxConnections),t.maxIdleConnections!==void 0&&(r.maxIdleConnections=t.maxIdleConnections),t.connectionBorrowTimeout!==void 0&&(r.connectionBorrowTimeout=t.connectionBorrowTimeout),t.requireTLS!==void 0&&(r.requireTLS=t.requireTLS),i.proxy=Object.keys(r).length>0?r:{},N({...e,database:n})}Ee(CR,"addProxy");function RR(e,t){let n=t.bucketName??t.resourceName.toLowerCase(),i=Ve(n),r=e.s3.length,o=r===0?"":`${r+1}`,a={name:i,bucketName:n,variableName:`bucket${o}`,...t.publicReadAccess!==void 0?{publicReadAccess:t.publicReadAccess}:{},...t.versioned!==void 0?{versioned:t.versioned}:{},...t.encryption!==void 0?{encryption:t.encryption}:{},...t.websiteHosting?{websiteHosting:{indexDocument:"index.html"}}:{}},c={...e,s3:[...e.s3,a]};return Cy(c,i,"storage",t),N(c)}Ee(RR,"addS3");function PR(e,t){let n={};if(t.maxAzs!==void 0&&(n.maxAzs=t.maxAzs),t.natGateways!==void 0&&(n.natGateways=t.natGateways),t.flowLogs!==void 0&&(n.flowLogs=t.flowLogs),t.vpcEndpoints!==void 0&&(n.vpcEndpoints=t.vpcEndpoints),t.networkName){let i={name:t.networkName,...n};return N({...e,additionalNetworks:[...e.additionalNetworks??[],i]})}return N({...e,network:{...e.network??{},...n}})}Ee(PR,"addNetwork");function NR(e,t){let n=t.connectedDatabase??[],i={name:t.resourceName,type:"ecs",needsConnection:n.length>0,connectedDatabase:n,...t.loadBalancer!==void 0?{cluster:{loadBalancer:t.loadBalancer}}:{},services:t.services.map(r=>({name:r.name,capacityProvider:r.capacityProvider??"FARGATE",...r.port!==void 0?{containers:[{port:r.port}]}:{},...r.cpu!==void 0?{cpu:r.cpu}:{},...r.memory!==void 0?{memoryLimitMiB:r.memory}:{}})),...t.docker!==void 0&&{docker:t.docker}};return N({...e,compute:[...e.compute,i]})}Ee(NR,"addEcsCompute");function wR(e,t){let n=t.connectedDatabase??[],i={name:t.resourceName,type:"lambda",needsConnection:n.length>0,connectedDatabase:n,...t.timeout!==void 0?{timeout:t.timeout}:{},...t.memory!==void 0?{memory:t.memory}:{},...t.handler!==void 0?{handler:t.handler}:{},...t.runtime!==void 0?{runtime:t.runtime}:{}};return N({...e,compute:[...e.compute,i]})}Ee(wR,"addLambdaCompute");function kR(e,t){let n={name:t.resourceName,defaultOriginRef:t.defaultOriginRef,...t.customDomain!==void 0?{customDomain:t.customDomain}:{},...t.certificateArn!==void 0?{certificateArn:t.certificateArn}:{},...t.behaviours&&t.behaviours.length>0?{behaviours:[...t.behaviours].map(i=>({pathPattern:i.pathPattern,originRef:i.originRef,...i.cachePolicy!==void 0?{cachePolicy:i.cachePolicy}:{}}))}:{}};return N({...e,cdn:n})}Ee(kR,"addCdn");function OR(e,t){let n=t.instanceType?{instanceType:t.instanceType}:{};return N({...e,tunnel:n})}Ee(OR,"addTunnel");function DR(e,t){let n=[...e.database.map(i=>i.name),...e.s3.map(i=>i.name),...e.compute.map(i=>i.name),...(e.dynamodb??[]).map(i=>i.name),...(e.sqs??[]).map(i=>i.name)];return e.cdn&&n.push(e.cdn.name),n.includes(t)}Ee(DR,"isResourceNameTaken");function Ty(e,t){return e.database.some(n=>n.name===t)||e.s3.some(n=>n.name===t)||e.compute.some(n=>n.name===t)||(e.dynamodb??[]).some(n=>n.name===t)||(e.sqs??[]).some(n=>n.name===t)}Ee(Ty,"resourceExistsInPlan");function Cy(e,t,n,i){i.connectToCompute&&i.connectToCompute.length>0&&Kl(e,[...i.connectToCompute],t,n),i.connectToServices&&i.connectToServices.length>0&&ql(e,[...i.connectToServices],t,n)}Ee(Cy,"applyConnections");var o6=Object.defineProperty,a6=(e,t)=>o6(e,"name",{value:t,configurable:!0});function MR(e,t,n){let i;try{i=Lr(e,{extractCustomCode:!0})}catch(u){return $(new Error(`Failed to parse infrastructure.ts: ${u instanceof Error?u.message:String(u)}`))}let r;try{r=Tn(i,t,{skipValidation:!0})}catch(u){return $(new Error(`Failed to build resource plan: ${u instanceof Error?u.message:String(u)}`))}i.customCodeBlocks&&i.customCodeBlocks.length>0&&(r.customCodeBlocks=i.customCodeBlocks);let o=Qa(r,n);if(!o.success)return o;let a=Yl(r,n);if(!a.success)return a;let c=Ji(a.data);return c.success?N({originalContent:e,modifiedContent:c.data,addedResource:{type:n.type,name:n.resourceName}}):$(new Error(`Code generation failed: ${c.error.message}`))}a6(MR,"generateResourceChange");var s6=Object.defineProperty,Wt=(e,t)=>s6(e,"name",{value:t,configurable:!0}),c6=new Set(Ja.options);function jR(e){return c6.has(e.toUpperCase())}Wt(jR,"isRecordType");function zR(e){return e.endsWith(".")?e.slice(0,-1):e}Wt(zR,"stripTrailingDot");function LR(e){let t=!1;for(let n=0;n<e.length;n++)if(e[n]==='"')t=!t;else if(e[n]===";"&&!t)return e.slice(0,n).trimEnd();return e}Wt(LR,"stripInlineComment");function UR(e,t){let n=e.slice(t).join(" "),i=[],r="",o=!1;for(let a of n)a==='"'?(o&&(i.push(r),r=""),o=!o):o&&(r+=a);return i.join(" ")}Wt(UR,"parseTxtValue");function FR(e){let t=/;\s*auto\s*$/.test(e),n=e.replace(/;\s*auto\s*$/,"").trim().match(/^\$FJALL-DELEGATE\s+(\S+)\s+TO\s+(\S+)$/i);if(n)return{subdomain:n[1],targetAccount:n[2],auto:t}}Wt(FR,"parseDelegateDirective");function BR(e){if(e.length<2)return;let t=e[1],n=e.slice(2);return{domainName:t,subjectAlternativeNames:n}}Wt(BR,"parseCertDirective");function VR(e){let t=[],n="",i=!1;for(let r of e)r==='"'?(i=!i,n+=r):/\s/.test(r)&&!i?n.length>0&&(t.push(n),n=""):n+=r;return n.length>0&&t.push(n),t}Wt(VR,"tokenise");function GR(e){if(e.length<2)return;let t=0,n=e[t++],i,r;for(;t<e.length&&r===void 0;){let a=e[t].toUpperCase();if(a==="IN")t++;else if(jR(a))r=a,t++;else if(/^\d+$/.test(e[t]))i=parseInt(e[t],10),t++;else return}if(!r)return;let o=e.slice(t);switch(r){case"MX":{if(o.length<2)return;let a=parseInt(o[0],10),c=o.slice(1).join(" ");return{name:n,type:r,ttl:i,value:c,priority:a}}case"SRV":{if(o.length<4)return;let a=parseInt(o[0],10),c=parseInt(o[1],10),u=parseInt(o[2],10),l=o[3];return{name:n,type:r,ttl:i,value:l,priority:a,weight:c,port:u}}case"TXT":{let a=UR(e,t);return{name:n,type:r,ttl:i,value:a}}case"CAA":{let a=o.join(" ");return{name:n,type:r,ttl:i,value:a}}case"A":{if(o.length===0)return;if(o[0].toUpperCase()==="ALIAS"){if(o.length<2)return;let a=o.slice(1).join(" ");return{name:n,type:r,ttl:i,value:`${Gl}${a}`}}return{name:n,type:r,ttl:i,value:o[0]}}default:return o.length===0?void 0:{name:n,type:r,ttl:i,value:o[0]}}}Wt(GR,"parseRecord");function ZR(e){let t=e.split(`
449
- `),n,i=300,r=[],o=[],a=[];for(let c of t){let u=c.trim();if(u===""||u.startsWith(";"))continue;if(u.toUpperCase().startsWith(Zt.FJALL_DELEGATE)){let v=FR(u);v&&o.push(v);continue}let l=LR(u);if(l==="")continue;let m=VR(l);if(m.length===0)continue;let p=m[0].toUpperCase();if(p===Zt.ORIGIN){if(m.length<2)continue;n=zR(m[1]);continue}if(p===Zt.TTL){if(m.length<2)continue;i=parseInt(m[1],10);continue}if(p===Zt.FJALL_CERT){let v=BR(m);v&&a.push(v);continue}let g=GR(m);g&&r.push(g)}return n?N({origin:n,ttl:i,records:r,delegations:o,certificates:a}):$(new Error("Missing $ORIGIN directive"))}Wt(ZR,"parseZoneFile");function WR(e,t){if(!e.startsWith("fjall:"))return;let n=e.split(":");if(n.length<3)return;let i=n[1],r=n[2],o=`${i}:${r}`;return t.get(o)??t.get(e)}Wt(WR,"resolveAlias");var u6=Object.defineProperty,Ry=(e,t)=>u6(e,"name",{value:t,configurable:!0});function HR(e,t){return e.length>=t?e:e+" ".repeat(t-e.length)}Ry(HR,"padRight");function qR(e,t){let n=HR(e.name,24),i=e.ttl!==void 0&&e.ttl!==t?`${e.ttl} `:"";switch(e.type){case"MX":return`${n} ${i}IN MX ${e.priority??10} ${e.value}`;case"SRV":return`${n} ${i}IN SRV ${e.priority??0} ${e.weight??0} ${e.port??0} ${e.value}`;case"TXT":return`${n} ${i}IN TXT "${e.value}"`;case"CAA":return`${n} ${i}IN CAA ${e.value}`;default:return e.type==="A"&&e.value.startsWith(Gl)?`${n} ${i}IN A ${e.value}`:`${n} ${i}IN ${e.type} ${e.value}`}}Ry(qR,"formatRecord");function KR(e){let t=[];if(t.push("; zone.bind \u2014 managed by fjall"),t.push(`${Zt.ORIGIN} ${e.origin}.`),t.push(`${Zt.TTL} ${e.ttl}`),t.push(""),e.certificates.length>0){for(let n of e.certificates){let i=[n.domainName,...n.subjectAlternativeNames];t.push(`${Zt.FJALL_CERT} ${i.join(" ")}`)}t.push("")}if(e.delegations.length>0){for(let n of e.delegations){let i=n.auto?" ; auto":"";t.push(`${Zt.FJALL_DELEGATE} ${n.subdomain} TO ${n.targetAccount}${i}`)}t.push("")}for(let n of e.records)t.push(qR(n,e.ttl));return t.join(`
448
+ `),r}_t(rC,"formatCustomCodeForInsertion");function nC(e){try{let t=function(r){r.kind===wn.SyntaxKind.Unknown&&i.push("Unknown node found in AST - possible parse error"),wn.forEachChild(r,t)};_t(t,"visit");let n=Vr(e),i=[];return t(n),i.length>0?{valid:!1,errors:i}:{valid:!0}}catch(t){return{valid:!1,errors:[Mt(t)]}}}_t(nC,"validateModifiedFile");import*as Te from"typescript";var is=s.enum(["A","AAAA","CNAME","MX","TXT","NS","SRV","CAA"]),d6=s.object({name:s.string(),type:is,ttl:s.number().optional(),value:s.string(),priority:s.number().optional(),weight:s.number().optional(),port:s.number().optional()}).strict(),m6=s.object({subdomain:s.string(),targetAccount:s.string(),auto:s.boolean()}).strict(),p6=s.object({domainName:s.string(),subjectAlternativeNames:s.array(s.string())}).strict(),nQ=s.object({origin:s.string(),ttl:s.number(),records:s.array(d6),delegations:s.array(m6),certificates:s.array(p6)}).strict(),Zt=Object.freeze({ORIGIN:"$ORIGIN",TTL:"$TTL",FJALL_DELEGATE:"$FJALL-DELEGATE",FJALL_CERT:"$FJALL-CERT"}),iC="ALIAS ";var oC=s.discriminatedUnion("kind",[s.object({kind:s.literal("ecs"),appName:s.string(),computeName:s.string().min(1).optional()}).strict(),s.object({kind:s.literal("cdn"),appName:s.string()}).strict(),s.object({kind:s.literal("bucket"),bucketName:s.string()}).strict(),s.object({kind:s.literal("custom"),dnsName:s.string(),hostedZoneId:s.string()}).strict()]),aC=oC.options.map(e=>e.shape.kind.value),Ny=s.enum(["A","AAAA"]),Py=s.enum(["route53","external-delegated","external-records"]),sC=s.enum(["zone","full"]),f6=s.object({kind:s.literal("standard"),type:s.enum(["A","AAAA","CNAME","MX","TXT","NS","SRV","CAA"]),name:s.string(),value:s.union([s.string(),s.array(s.string())]),ttl:s.number().int().positive().optional()}).strict(),g6=s.object({kind:s.literal("alias"),type:Ny,name:s.string(),target:oC}).strict(),h6=s.discriminatedUnion("kind",[f6,g6]),v6=s.object({domainName:s.string(),subjectAlternativeNames:s.array(s.string()).optional(),transparencyLogging:s.boolean().optional(),cloudFront:s.boolean().optional()}).strict(),b6=s.object({subdomain:s.string(),toAccount:s.string(),auto:s.boolean().optional()}).strict(),aQ=s.object({zoneName:s.string(),registrar:Py,hostedZoneId:s.string().optional(),delegatedSubdomain:s.string().optional(),adoptedNameServers:s.array(s.string().min(1)).min(1).optional(),records:s.array(h6),certificates:s.array(v6),delegations:s.array(b6)}).strict().refine(e=>e.registrar!=="external-delegated"||e.delegatedSubdomain!==void 0,{message:"external-delegated requires delegatedSubdomain"}).refine(e=>e.registrar!=="external-records"||e.delegations.length===0,{message:"external-records forbids delegations"}).refine(e=>e.registrar==="external-delegated"||e.adoptedNameServers===void 0,{message:"adoptedNameServers requires registrar external-delegated"}).refine(e=>e.registrar!=="external-delegated"||e.hostedZoneId===void 0==(e.adoptedNameServers===void 0),{message:"external-delegated adoption requires hostedZoneId and adoptedNameServers together (both-or-neither)"});var y6=Object.defineProperty,fe=(e,t)=>y6(e,"name",{value:t,configurable:!0}),uC=Py.options,cC=sC.options,S6=is.options,_6=Ny.options;function lC(e){let t=[],n=fe(r=>{if(Te.isNewExpression(r)&&dC(r.expression)){let o=mC(r);o!==void 0&&t.push(o)}Te.forEachChild(r,n)},"visit");if(n(e),t.length===0)return P(void 0);if(t.length>1)return $(new Error(`Expected exactly one 'new Domain(...)' call per infrastructure file, found ${t.length}`));let i=t[0];return i?P(i):P(void 0)}fe(lC,"findDomainConstructCall");function dC(e){return Te.isIdentifier(e)&&e.text==="Domain"}fe(dC,"isDomainIdentifier");function mC(e){let t=e.arguments;if(!t||t.length<3)return;let n=t[0],i=t[1],r=t[2];if(!n||!i||!r||!Te.isObjectLiteralExpression(r))return;let o=pC(e);if(o===void 0)return;let a=fC(e),c=Te.isStringLiteral(i)?i.text:void 0;return{callExpression:e,containingStatement:o,propsObjectLiteral:r,domainVarId:a,scopeArgumentText:n.getText(),constructIdLiteral:c}}fe(mC,"buildMatch");function pC(e){let t=e;for(;t!==void 0;){if(Te.isExpressionStatement(t)||Te.isVariableStatement(t))return t;t=t.parent}}fe(pC,"findContainingTopLevelStatement");function fC(e){let t=e.parent;for(;t!==void 0;){if(Te.isVariableDeclaration(t)&&Te.isIdentifier(t.name)&&t.initializer===e)return t.name.text;t=t.parent}}fe(fC,"extractDomainVarId");function gC(e){switch(e.kind){case"registrar_required":return"'registrar' property is required";case"registrar_unsupported":return`'registrar' must be one of ${uC.join(", ")}, got ${JSON.stringify(e.value)}`;case"missing_field":return`'${e.field}' property is required`;case"invalid_literal":return`'${e.field}' ${e.reason}`;case"removed_field":return`'${e.field}' was removed from the Domain API \u2014 ${e.cure}`}}fe(gC,"errorMessage");var E6="declare the delegated child as its own Domain with registrar: 'external-delegated' and set 'parentDelegationRoleArn' (the CLI injects it via ManagedDomainBinding.delegationRoleArn); the child UPSERTs its NS records into the parent zone";function hC(e){let t=B(e),n=U(t.registrar,uC);if(n===void 0){let c=t.registrar;if(c===void 0)return $({kind:"registrar_required"});let u=typeof c=="string"?c:Ql(c);return $({kind:"registrar_unsupported",value:u})}let i=b(t.zoneName);if(i===void 0)return $({kind:"missing_field",field:"zoneName"});let r=bC(t.records);if(!r.success)return r;let o=xC(t.certificates);if(!o.success)return o;if(t.delegations!==void 0)return $({kind:"removed_field",field:"delegations",cure:E6});let a={zoneName:i,description:b(t.description),costAllocationEnvironment:b(t.costAllocationEnvironment),tags:AC(t.tags),records:r.data,certificates:o.data};switch(n){case"route53":return P({...a,registrar:n,hostedZoneId:b(t.hostedZoneId)});case"external-delegated":{let c=b(t.delegatedSubdomain);if(c===void 0)return $({kind:"missing_field",field:"delegatedSubdomain"});let u=b(t.hostedZoneId);if(t.hostedZoneId!==void 0&&u===void 0)return $({kind:"invalid_literal",field:"hostedZoneId",reason:"must be a literal string zone id on external-delegated \u2014 dynamic expressions cannot be round-tripped"});let l=de(t.adoptedNameServers);if(t.adoptedNameServers!==void 0&&l===void 0)return $({kind:"invalid_literal",field:"adoptedNameServers",reason:"must be an array of literal NS hostname strings \u2014 the parent NS UPSERT writes them verbatim"});if(u===void 0!=(l===void 0))return $({kind:"invalid_literal",field:u===void 0?"hostedZoneId":"adoptedNameServers",reason:"adopting an existing child zone requires hostedZoneId and adoptedNameServers together (both-or-neither) \u2014 an imported zone exposes no name-server attribute at synth"});let m=b(t.parentDelegationRoleArn);if(t.parentDelegationRoleArn!==void 0&&m===void 0)return $({kind:"invalid_literal",field:"parentDelegationRoleArn",reason:"must be a literal string ARN (VD2-a) \u2014 the CLI injects it via ManagedDomainBinding.delegationRoleArn; dynamic expressions such as Fn.importValue are not supported"});let p=U(t.phase,cC);return t.phase!==void 0&&p===void 0?$({kind:"invalid_literal",field:"phase",reason:`must be one of ${cC.map(g=>`'${g}'`).join(", ")}`}):P({...a,registrar:n,delegatedSubdomain:c,hostedZoneId:u,adoptedNameServers:l,parentDelegationRoleArn:m,phase:p})}case"external-records":return P({...a,registrar:n})}}fe(hC,"parseDomainProps");function vC(e){return gC(e)}fe(vC,"parseDomainErrorMessage");function bC(e){if(e===void 0)return P([]);if(!Array.isArray(e))return $({kind:"invalid_literal",field:"records",reason:"must be an array"});let t=[];for(let n=0;n<e.length;n++){let i=e[n];if(!N(i))return $({kind:"invalid_literal",field:`records[${n}]`,reason:"must be an object literal"});let r=yC(i,n);if(!r.success)return r;t.push(r.data)}return P(t)}fe(bC,"parseRecordsArray");function yC(e,t){let n=b(e.type),i=b(e.name);if(n===void 0)return $({kind:"missing_field",field:`records[${t}].type`});if(i===void 0)return $({kind:"missing_field",field:`records[${t}].name`});if(e.target!==void 0){if(!_6.some(u=>u===n))return $({kind:"invalid_literal",field:`records[${t}]`,reason:`alias records must have type 'A' or 'AAAA', got '${n}'`});let c=_C(e.target);return P({kind:"alias",type:n,name:i,target:c})}if(!S6.some(c=>c===n))return $({kind:"invalid_literal",field:`records[${t}]`,reason:`unsupported record type '${n}'`});let r=SC(e.value);if(r===void 0)return $({kind:"invalid_literal",field:`records[${t}].value`,reason:`must be a string or array of strings (got ${JSON.stringify(e.value)})`});let o=C(e.ttl),a={kind:"standard",type:n,name:i,value:r,...o!==void 0?{ttl:o}:{}};return P(a)}fe(yC,"parseRecord");function SC(e){if(e===void 0)return;if(typeof e=="string")return e;let t=de(e);if(t!==void 0)return t}fe(SC,"parseRecordValue");function _C(e){if(Tt(e))return EC(e);if(N(e)){let t=U(e.kind,aC);if(t==="ecs"||t==="cdn"){let n=b(e.appName);if(n!==void 0)return{kind:t,appName:n}}if(t==="bucket"){let n=b(e.bucketName);if(n!==void 0)return{kind:t,bucketName:n}}if(t==="custom"){let n=b(e.dnsName),i=b(e.hostedZoneId);if(n!==void 0&&i!==void 0)return{kind:t,dnsName:n,hostedZoneId:i}}}return{kind:"unresolved",sourceText:Ql(e)}}fe(_C,"parseTarget");function EC(e){let t=e.__call.trim(),n=t.match(/^([A-Za-z_][\w$]*)\s*\(([\s\S]*)\)\s*$/);if(!n)return{kind:"unresolved",sourceText:t};let i=n[1],r=n[2]??"",o=Jl(r);switch(i){case"fjallApp":{let a=Zr(o,0);if(a===void 0)return{kind:"dynamic",sourceText:t};if(o.length<2)return{kind:"ecs",appName:a};let c=Zr(o,1);return c===void 0?{kind:"dynamic",sourceText:t}:{kind:"ecs",appName:a,computeName:c}}case"fjallCdn":{let a=Zr(o,0);return a===void 0?{kind:"dynamic",sourceText:t}:{kind:"cdn",appName:a}}case"fjallBucket":{let a=Zr(o,0);return a===void 0?{kind:"dynamic",sourceText:t}:{kind:"bucket",bucketName:a}}case"aliasTo":{if(o.length>=2){let a=Zr(o,0),c=Zr(o,1);return a!==void 0&&c!==void 0?{kind:"custom",dnsName:a,hostedZoneId:c}:{kind:"dynamic",sourceText:t}}if(o.length===1){let a=o[0]?.trim()??"",c=wy(a,"dnsName"),u=wy(a,"hostedZoneId");return c!==void 0&&u!==void 0?{kind:"custom",dnsName:c,hostedZoneId:u}:{kind:"dynamic",sourceText:t}}return{kind:"unresolved",sourceText:t}}default:return{kind:"unresolved",sourceText:t}}}fe(EC,"resolveCallRefTarget");function Jl(e){let t=[],n=0,i=null,r="";for(let a=0;a<e.length;a++){let c=e[a];if(i!==null){if(r+=c,c==="\\"&&a+1<e.length){let u=e[a+1];u!==void 0&&(r+=u,a+=1);continue}c===i&&(i=null);continue}if(c==='"'||c==="'"||c==="`"){i=c,r+=c;continue}if(c==="("||c==="{"||c==="["){n+=1,r+=c;continue}if(c===")"||c==="}"||c==="]"){n-=1,r+=c;continue}if(c===","&&n===0){t.push(r.trim()),r="";continue}r+=c}let o=r.trim();return o.length>0&&t.push(o),t}fe(Jl,"splitTopLevelArgs");function Zr(e,t){let n=e[t];if(n===void 0)return;let i=n.trim();if(i.length<2)return;let r=i[0],o=i[i.length-1];if(r===o&&!(r!=='"'&&r!=="'"&&r!=="`"))return i.slice(1,-1)}fe(Zr,"extractStringLiteralArg");function wy(e,t){let n=e.trim().replace(/^\{|\}$/g,""),i=Jl(n);for(let r of i){let o=r.indexOf(":");if(o<0||r.slice(0,o).trim().replace(/["'`]/g,"")!==t)continue;let a=r.slice(o+1).trim();return Zr([a],0)}}fe(wy,"extractObjectFieldString");function xC(e){if(e===void 0)return P([]);if(!Array.isArray(e))return $({kind:"invalid_literal",field:"certificates",reason:"must be an array"});let t=[];for(let n=0;n<e.length;n++){let i=e[n];if(typeof i=="string"){t.push({domainName:i});continue}if(!N(i))return $({kind:"invalid_literal",field:`certificates[${n}]`,reason:"must be a string or object literal"});let r=b(i.domainName);if(r===void 0)return $({kind:"missing_field",field:`certificates[${n}].domainName`});let o=de(i.subjectAlternativeNames),a=j(i.transparencyLogging),c=j(i.cloudFront);if(i.cloudFront!==void 0&&c===void 0)return $({kind:"invalid_literal",field:`certificates[${n}].cloudFront`,reason:"must be a boolean literal \u2014 the CloudFront designation drives the zone-level us-east-1 export contract and cannot be round-tripped from a dynamic expression"});t.push({domainName:r,...o!==void 0?{subjectAlternativeNames:o}:{},...a!==void 0?{transparencyLogging:a}:{},...c!==void 0?{cloudFront:c}:{}})}return P(t)}fe(xC,"parseCertificatesArray");function AC(e){if(e===void 0||!N(e))return;let t={};for(let[n,i]of Object.entries(e)){let r=b(i);r!==void 0&&(t[n]=r)}return Object.keys(t).length===0?void 0:t}fe(AC,"parseStringRecord");function Ql(e){if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="string")return JSON.stringify(e);if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return`[${e.map(t=>Ql(t)).join(", ")}]`;if(typeof e=="object"){if("__call"in e)return String(e.__call);if("__identifier"in e)return String(e.__identifier);if("__expression"in e)return String(e.__expression);if("__unknown"in e)return String(e.__unknown)}return String(e)}fe(Ql,"stringifyParsedValue");var x6=Object.defineProperty,pr=(e,t)=>x6(e,"name",{value:t,configurable:!0});function IC(e){return e?.map(t=>({name:t.name,...t.serviceType!==void 0&&{serviceType:t.serviceType},...t.docker!==void 0&&{docker:t.docker},...t.containerPort!==void 0&&{containerPort:t.containerPort},...t.needsDatabaseConnection!==void 0&&{needsDatabaseConnection:t.needsDatabaseConnection},...t.routing!==void 0&&{routing:t.routing}}))}pr(IC,"toUserServiceConfigs");function $C(e,t,n=!0,i,r){let o={appName:e,type:t,database:[],s3:[],compute:[]};if(t==="custom")return o;let a=t,c=cr[a];return{...o,database:TC(e,c,a,n,r),compute:PC(e,c,a,n,i),network:c.network,backup:c.backup}}pr($C,"planApplicationResources");function TC(e,t,n,i,r){let o=Mb(n),a=t.database[o];return!i||a===null?[]:[{name:e,type:o,databaseName:Ln(e),variableName:`${ar(e)}Database`,...a,...r?.snapshotIdentifier!==void 0&&{snapshotIdentifier:r.snapshotIdentifier},...r?.snapshotUsername!==void 0&&{snapshotUsername:r.snapshotUsername}}]}pr(TC,"buildDatabasePlan");function RC(e,t){if(!(e===void 0&&t===void 0))return{scaling:{...e!==void 0&&{minCapacity:e},...t!==void 0&&{maxCapacity:t}}}}pr(RC,"buildScalingConfig");function ky(e){let{minCapacity:t,maxCapacity:n,...i}=e;return{...i,...RC(t,n)}}pr(ky,"planServiceFromTierPreset");function CC(e,t){let n=ky(e),i=t?.serviceType==="worker",r=t?.containerPort??Q$,o=t?.docker;return{...n,...o?.path!==void 0&&{docker:{path:o.path,...o.context!==void 0&&{context:o.context},...o.target!==void 0&&{target:o.target}}},...t?.needsDatabaseConnection!==void 0&&{needsDatabaseConnection:t.needsDatabaseConnection},containers:i?[{}]:[{port:r}]}}pr(CC,"buildServiceEntry");function NC(e,t){return t||e?.directAccess===!0?e:{...e,loadBalancer:!1}}pr(NC,"resolveClusterConfig");function PC(e,t,n,i,r){let o=t.compute.ecs,a=(r&&r.length>0?jb(n,r):o.services.map((u,l)=>({...u,name:l===0?"api":`service-${l+1}`}))).map((u,l)=>CC(u,r?.[l])),c=a.some(u=>u.containers?.some(l=>l.port!==void 0));return[{name:e,type:Di.ECS,needsConnection:i,connectedDatabase:i?[e]:void 0,variableName:`${ar(e)}Compute`,cluster:NC(o.cluster,c),services:a}]}pr(PC,"buildComputePlan");function ao(e,t){let n=[Cl(e),Rl(e),Tl(e)];if(wl(e))n.push(Va(e),Za(e));else{let r=Pl(e);n.push(Za(e),gl(e),hl(e),Al(e),Il(e),$l(e),Sl(e,r),Nl(e))}let i=n.join("");if(e.customCodeBlocks&&e.customCodeBlocks.length>0){let r=Xl(i,e.customCodeBlocks,t?.resourceMapping);return r.success?P(r.content):$(new Error(`Custom code injection failed: ${r.error??"unknown error"}`))}return P(i)}pr(ao,"generateInfrastructureFromPlan");var A6=Object.defineProperty,so=(e,t)=>A6(e,"name",{value:t,configurable:!0}),I6=Db("standard");function wC(e){return Ra.options.some(t=>t.shape?.type?.value===e)}so(wC,"isPatternConfigType");function kC(e,t,n){let{tier:i="standard",domain:r,database:o,compute:a,cdn:c,environment:u,tags:l}=n??{},m=Ol(i);if(!m&&i!=="custom")return $(new Error(`Invalid pattern tier: "${i}". Valid tiers are: ${[...Ha,"custom"].join(", ")}`));if(!wC(t))return $(new Error(`Unsupported pattern type: ${t}`));let p=m?kl(i):null,g=jC(t,e,{domain:r,database:o,compute:a,cdn:c,environment:u,tierPreset:p});if(!g.success)return g;let v=g.data;return P({appName:e,type:"standard",pattern:t,network:p?p.network:I6,backup:p?p.backup:!1,patternConfig:v,database:[],s3:[],compute:[],tags:l??{}})}so(kC,"planOpenNextResources");function OC(e,t){return{type:e?.type??t.database.type,instanceType:e?.instanceType??t.database.instanceType,backupRetention:e?.backupRetention??t.database.backupRetention,deletionProtection:e?.deletionProtection??t.database.deletionProtection,...e?.databaseName!==void 0&&{databaseName:e.databaseName},...e?.publiclyAccessible!==void 0&&{publiclyAccessible:e.publiclyAccessible},...e?.allowedIpCidr!==void 0&&{allowedIpCidr:e.allowedIpCidr},...e?.encryption!==void 0&&{encryption:e.encryption}}}so(OC,"mergeDatabaseConfig");function DC(e,t){return{memorySize:e?.memorySize??t.compute.memorySize,timeout:e?.timeout??t.compute.timeout}}so(DC,"mergeComputeConfig");function MC(e){let{encryption:t,...n}=e;return{...n,...t&&{encryption:{storageKey:t}}}}so(MC,"toPatternDatabaseConfig");function jC(e,t,n){let{domain:i,database:r,compute:o,cdn:a,environment:c,tierPreset:u}=n,l=u?OC(r,u):r,m=u?DC(o,u):o,p={type:e,name:t,domain:i,database:l?MC(l):void 0,compute:m?{server:m}:void 0,cdn:a?{domainNames:a.domainNames,certificateArn:a.certificateArn}:void 0,environment:c},g=Ra.safeParse(p);return g.success?P(g.data):$(new Error(`Invalid pattern config: ${g.error.message}`))}so(jC,"buildPatternConfig");var $6=Object.defineProperty,T6=(e,t)=>$6(e,"name",{value:t,configurable:!0});function zC(e,t){let n={type:"staticsite",name:e,source:t.source,build:t.build,...t.routing!==void 0&&{routing:t.routing},...t.security!==void 0&&{security:t.security},...t.domain!==void 0&&{domain:t.domain},...t.forms!==void 0&&{forms:t.forms},...t.cdn!==void 0&&{cdn:t.cdn}},i=bb.safeParse(n);return i.success?P({appName:e,type:"standard",pattern:"staticsite",patternConfig:i.data,database:[],s3:[],compute:[],tags:t.tags??{}}):$(new Error(`Invalid static-site pattern config: ${i.error.message}`))}T6(zC,"planStaticSiteResources");var R6=Object.defineProperty,ed=(e,t)=>R6(e,"name",{value:t,configurable:!0});function LC(e){let t=e.split("/");if(t.length!==2||!t[0]||!t[1])throw new Error(`Invalid service reference format: '${e}'. Expected 'ClusterName/ServiceName'.`);return t[0]}ed(LC,"parseServiceReference");function Oy(e,t,n){n==="database"?(e.needsConnection=!0,e.connectedDatabase=[...new Set([...e.connectedDatabase??[],t])]):e.connectedStorage=[...new Set([...e.connectedStorage??[],t])]}ed(Oy,"addResourceConnection");function td(e,t,n,i){let r=new Set(t),o=[...new Set(t.map(LC))];for(let a of o){let c=e.compute.find(u=>u.name===a);if(c?.services){Oy(c,n,i);for(let u of c.services){let l=`${a}/${u.name}`;r.has(l)&&(i==="database"?u.needsDatabaseConnection=!0:u.needsStorageConnection=!0)}}}}ed(td,"applyServiceConnections");function rd(e,t,n,i){for(let r of e.compute)if(t.includes(r.name)&&(Oy(r,n,i),r.services))for(let o of r.services)i==="database"?o.needsDatabaseConnection=!0:o.needsStorageConnection=!0}ed(rd,"applyComputeConnections");var C6=Object.defineProperty,be=(e,t)=>C6(e,"name",{value:t,configurable:!0});function UC(e){let t=e.database.length>0,n=e.cdn!==void 0;return[{type:"database",label:"Database (RDS)",available:!0},{type:"database:proxy",label:"RDS Proxy",available:t,reason:t?void 0:"Requires at least one database"},{type:"storage:s3",label:"S3 Bucket",available:!0},{type:"network",label:"Network (VPC)",available:!0},{type:"compute:ecs",label:"Compute (ECS)",available:!0},{type:"compute:lambda",label:"Compute (Lambda)",available:!0},{type:"cdn",label:"CDN (CloudFront)",available:!n,reason:n?"A CDN is already configured. Remove existing CDN first.":void 0},{type:"tunnel",label:"Database Tunnel",available:t&&!e.tunnel,reason:t?e.tunnel?"Tunnel is already enabled":void 0:"Requires at least one database"}]}be(UC,"listAvailableResources");function os(e,t){if(My(e,t.resourceName))return $(new Error(jy(t.resourceName)));switch(t.type){case"database":return FC(e,t);case"database:proxy":return BC(e,t);case"storage:s3":return P(void 0);case"network":return P(void 0);case"compute:ecs":return!t.services||t.services.length===0?$(new Error("ECS compute requires at least one service.")):P(void 0);case"compute:lambda":return P(void 0);case"cdn":return VC(e,t);case"tunnel":return GC(e);default:{let n=t;return $(new Error(`Unknown resource type: ${String(n)}`))}}}be(os,"validateResourceAddition");function FC(e,t){let n=t.databaseName??t.resourceName.toLowerCase();return e.database.some(i=>i.databaseName===n)?$(new Error(`Database name '${n}' already exists. Choose a different database name.`)):t.databaseType==="GlobalAurora"&&!t.primaryRegion?$(new Error("GlobalAurora databases require a primaryRegion.")):P(void 0)}be(FC,"validateDatabaseAddition");function BC(e,t){let n=e.database.find(i=>i.name===t.targetDatabase||i.databaseName===t.targetDatabase);if(!n){let i=e.database.map(r=>r.name).join(", ")||"none";return $(new Error(`Database '${t.targetDatabase}' not found. Available databases: ${i}`))}return n.proxy!==void 0&&n.proxy!==!1?$(new Error(`Database '${n.name}' already has RDS Proxy enabled.`)):P(void 0)}be(BC,"validateProxyAddition");function VC(e,t){if(e.cdn)return $(new Error("A CDN is already configured for this application. Remove the existing CDN first."));if(!Dy(e,t.defaultOriginRef))return $(new Error(`Origin '${t.defaultOriginRef}' not found in plan. CDN origin must reference an existing resource.`));if(t.behaviours){for(let n of t.behaviours)if(!Dy(e,n.originRef))return $(new Error(`Behaviour origin '${n.originRef}' not found in plan.`))}return P(void 0)}be(VC,"validateCdnAddition");function GC(e){return e.tunnel&&typeof e.tunnel=="object"?$(new Error("Tunnel is already enabled for this application.")):e.database.length===0?$(new Error("No databases found \u2014 tunnel requires at least one relational database.")):P(void 0)}be(GC,"validateTunnelAddition");function nd(e,t){let n=os(e,t);if(!n.success)return n;switch(t.type){case"database":return ZC(e,t);case"database:proxy":return WC(e,t);case"storage:s3":return HC(e,t);case"network":return qC(e,t);case"compute:ecs":return KC(e,t);case"compute:lambda":return YC(e,t);case"cdn":return XC(e,t);case"tunnel":return JC(e,t);default:{let i=t;return $(new Error(`Unknown resource type: ${String(i)}`))}}}be(nd,"addResourceToPlan");function ZC(e,t){let n=t.databaseName??t.resourceName.toLowerCase(),i={name:t.resourceName,type:t.databaseType,databaseName:n},r;switch(t.databaseType){case"Instance":r={...i,...t.instanceType!==void 0?{instanceType:t.instanceType}:{},...t.multiAz!==void 0?{multiAz:t.multiAz}:{},...t.readReplica!==void 0?{readReplica:t.readReplica}:{},...t.publiclyAccessible!==void 0?{publiclyAccessible:t.publiclyAccessible}:{},...t.backupRetention!==void 0?{backupRetention:t.backupRetention}:{}};break;case"Aurora":r={...i,...t.writer!==void 0?{writer:t.writer}:{},...t.readers!==void 0?{readers:t.readers}:{},...t.backupRetention!==void 0?{backupRetention:t.backupRetention}:{},...t.preferredMaintenanceWindow!==void 0?{preferredMaintenanceWindow:t.preferredMaintenanceWindow}:{}};break;case"GlobalAurora":r={...i,primaryRegion:t.primaryRegion,...t.secondaryRegions!==void 0?{secondaryRegions:t.secondaryRegions}:{}};break;default:{let a=t.databaseType;return $(new Error(`Unknown database type: ${String(a)}`))}}let o={...e,database:[...e.database,r]};return zy(o,t.resourceName,"database",t),P(o)}be(ZC,"addDatabase");function WC(e,t){let n=e.database.map(o=>({...o})),i=n.find(o=>o.name===t.targetDatabase||o.databaseName===t.targetDatabase);if(!i)return $(new Error(`Database '${t.targetDatabase}' not found.`));let r={};return t.maxConnections!==void 0&&(r.maxConnections=t.maxConnections),t.maxIdleConnections!==void 0&&(r.maxIdleConnections=t.maxIdleConnections),t.connectionBorrowTimeout!==void 0&&(r.connectionBorrowTimeout=t.connectionBorrowTimeout),t.requireTLS!==void 0&&(r.requireTLS=t.requireTLS),i.proxy=Object.keys(r).length>0?r:{},P({...e,database:n})}be(WC,"addProxy");function HC(e,t){let n=t.bucketName??t.resourceName.toLowerCase(),i=Ce(n),r=e.s3.length,o=r===0?"":`${r+1}`,a={name:i,bucketName:n,variableName:`bucket${o}`,...t.publicReadAccess!==void 0?{publicReadAccess:t.publicReadAccess}:{},...t.versioned!==void 0?{versioned:t.versioned}:{},...t.encryption!==void 0?{encryption:t.encryption}:{},...t.websiteHosting?{websiteHosting:{indexDocument:"index.html"}}:{}},c={...e,s3:[...e.s3,a]};return zy(c,i,"storage",t),P(c)}be(HC,"addS3");function qC(e,t){let n={};if(t.maxAzs!==void 0&&(n.maxAzs=t.maxAzs),t.natGateways!==void 0&&(n.natGateways=t.natGateways),t.flowLogs!==void 0&&(n.flowLogs=t.flowLogs),t.vpcEndpoints!==void 0&&(n.vpcEndpoints=t.vpcEndpoints),t.networkName){let i={name:t.networkName,...n};return P({...e,additionalNetworks:[...e.additionalNetworks??[],i]})}return P({...e,network:{...e.network??{},...n}})}be(qC,"addNetwork");function KC(e,t){let n=t.connectedDatabase??[],i={name:t.resourceName,type:"ecs",needsConnection:n.length>0,connectedDatabase:n,...t.loadBalancer!==void 0?{cluster:{loadBalancer:t.loadBalancer}}:{},services:t.services.map(r=>({name:r.name,capacityProvider:r.capacityProvider??"FARGATE",...r.port!==void 0?{containers:[{port:r.port}]}:{},...r.cpu!==void 0?{cpu:r.cpu}:{},...r.memory!==void 0?{memoryLimitMiB:r.memory}:{}})),...t.docker!==void 0&&{docker:t.docker}};return P({...e,compute:[...e.compute,i]})}be(KC,"addEcsCompute");function YC(e,t){let n=t.connectedDatabase??[],i={name:t.resourceName,type:"lambda",needsConnection:n.length>0,connectedDatabase:n,...t.timeout!==void 0?{timeout:t.timeout}:{},...t.memory!==void 0?{memory:t.memory}:{},...t.handler!==void 0?{handler:t.handler}:{},...t.runtime!==void 0?{runtime:t.runtime}:{}};return P({...e,compute:[...e.compute,i]})}be(YC,"addLambdaCompute");function XC(e,t){let n={name:t.resourceName,defaultOriginRef:t.defaultOriginRef,...t.customDomain!==void 0?{customDomain:t.customDomain}:{},...t.certificateArn!==void 0?{certificateArn:t.certificateArn}:{},...t.behaviours&&t.behaviours.length>0?{behaviours:[...t.behaviours].map(i=>({pathPattern:i.pathPattern,originRef:i.originRef,...i.cachePolicy!==void 0?{cachePolicy:i.cachePolicy}:{}}))}:{}};return P({...e,cdn:n})}be(XC,"addCdn");function JC(e,t){let n=t.instanceType?{instanceType:t.instanceType}:{};return P({...e,tunnel:n})}be(JC,"addTunnel");function My(e,t){let n=[...e.database.map(i=>i.name),...(e.clickhouse??[]).map(i=>i.name),...e.s3.map(i=>i.name),...e.compute.map(i=>i.name),...(e.dynamodb??[]).map(i=>i.name),...(e.sqs??[]).map(i=>i.name),...(e.additionalNetworks??[]).map(i=>i.name)];return e.cdn&&n.push(e.cdn.name),n.includes(t)}be(My,"isResourceNameTaken");function jy(e){return`Resource name '${e}' is already used in this application.`}be(jy,"resourceNameTakenMessage");function Dy(e,t){return e.database.some(n=>n.name===t)||e.s3.some(n=>n.name===t)||e.compute.some(n=>n.name===t)||(e.dynamodb??[]).some(n=>n.name===t)||(e.sqs??[]).some(n=>n.name===t)}be(Dy,"resourceExistsInPlan");function zy(e,t,n,i){i.connectToCompute&&i.connectToCompute.length>0&&rd(e,[...i.connectToCompute],t,n),i.connectToServices&&i.connectToServices.length>0&&td(e,[...i.connectToServices],t,n)}be(zy,"applyConnections");var N6=Object.defineProperty,P6=(e,t)=>N6(e,"name",{value:t,configurable:!0});function QC(e,t,n){let i;try{i=Br(e,{extractCustomCode:!0})}catch(u){return $(new Error(`Failed to parse infrastructure.ts: ${u instanceof Error?u.message:String(u)}`))}let r;try{r=Pn(i,t,{skipValidation:!0})}catch(u){return $(new Error(`Failed to build resource plan: ${u instanceof Error?u.message:String(u)}`))}i.customCodeBlocks&&i.customCodeBlocks.length>0&&(r.customCodeBlocks=i.customCodeBlocks);let o=os(r,n);if(!o.success)return o;let a=nd(r,n);if(!a.success)return a;let c=ao(a.data);return c.success?P({originalContent:e,modifiedContent:c.data,addedResource:{type:n.type,name:n.resourceName}}):$(new Error(`Code generation failed: ${c.error.message}`))}P6(QC,"generateResourceChange");var w6=Object.defineProperty,kn=(e,t)=>w6(e,"name",{value:t,configurable:!0});function Wt(e,...t){let n={};for(let i of t)e[i]!==void 0&&(n[i]=e[i]);return n}kn(Wt,"pickDefined");function eN(e,t){let n={name:e,type:t.databaseType,databaseName:t.databaseName,...Wt(t,"databaseInsights","port","proxy","credentials","encryption","deletionProtection")};switch(t.databaseType){case"Instance":return{...n,...Wt(t,"instanceType","multiAz","readReplica","publiclyAccessible","backupRetention","allocatedStorage","snapshotIdentifier","snapshotUsername")};case"Aurora":return{...n,...Wt(t,"writer","readers","backupRetention","preferredMaintenanceWindow","monitoringInterval","snapshotIdentifier","snapshotUsername")};case"GlobalAurora":return{...n,primaryRegion:t.primaryRegion,...t.secondaryRegions&&t.secondaryRegions.length>0&&{secondaryRegions:t.secondaryRegions},...Wt(t,"globalClusterIdentifier","enableGlobalWriteForwarding","writer","readers","backupRetention","preferredMaintenanceWindow","monitoringInterval","snapshotIdentifier","snapshotUsername")};default:return t}}kn(eN,"buildRelationalResourcePlan");function tN(e){return`${e}Database`}kn(tN,"defaultRelationalDatabaseName");function rN(e,t){return`Database name '${e}' already exists in ${t}. Please choose a different database name.`}kn(rN,"duplicateDatabaseNameMessage");function nN(e,t){let n=e.find(r=>r.name===t.databaseName||r.databaseName===t.databaseName);if(!n)return{ok:!1,message:`Database '${t.databaseName}' not found. Available databases: ${e.map(r=>r.name).join(", ")||"none"}`};if(n.proxy!==void 0&&n.proxy!==!1)return{ok:!1,message:`Database '${n.name}' already has RDS Proxy enabled.`};let i=Wt(t,"maxConnections","maxIdleConnections","connectionBorrowTimeout","requireTLS");return{ok:!0,database:n,proxyValue:Object.keys(i).length>0?i:{}}}kn(nN,"resolveProxyAddition");function iN(e,t){return{name:e,type:"ClickHouse",databaseName:t.databaseName,...Wt(t,"instanceType","coldTier","optimiseSchedule","backupSchedule","backupRetentionDays")}}kn(iN,"buildClickHouseResourcePlan");function oN(e,t,n){let i=t.storagePreset??"standard",r=Dl[i],o=n===0?"":`${n+1}`;return{name:e,bucketName:t.bucketName,variableName:`bucket${o}`,...r,...Wt(t,"publicReadAccess","websiteHosting","backupVaultTier","versioned","encryption","kmsKeyArn","cors")}}kn(oN,"buildS3ResourcePlan");var k6=Object.defineProperty,Ht=(e,t)=>k6(e,"name",{value:t,configurable:!0}),O6=new Set(is.options);function aN(e){return O6.has(e.toUpperCase())}Ht(aN,"isRecordType");function sN(e){return e.endsWith(".")?e.slice(0,-1):e}Ht(sN,"stripTrailingDot");function cN(e){let t=!1;for(let n=0;n<e.length;n++)if(e[n]==='"')t=!t;else if(e[n]===";"&&!t)return e.slice(0,n).trimEnd();return e}Ht(cN,"stripInlineComment");function uN(e,t){let n=e.slice(t).join(" "),i=[],r="",o=!1;for(let a of n)a==='"'?(o&&(i.push(r),r=""),o=!o):o&&(r+=a);return i.join(" ")}Ht(uN,"parseTxtValue");function lN(e){let t=/;\s*auto\s*$/.test(e),n=e.replace(/;\s*auto\s*$/,"").trim().match(/^\$FJALL-DELEGATE\s+(\S+)\s+TO\s+(\S+)$/i);if(n)return{subdomain:n[1],targetAccount:n[2],auto:t}}Ht(lN,"parseDelegateDirective");function dN(e){if(e.length<2)return;let t=e[1],n=e.slice(2);return{domainName:t,subjectAlternativeNames:n}}Ht(dN,"parseCertDirective");function mN(e){let t=[],n="",i=!1;for(let r of e)r==='"'?(i=!i,n+=r):/\s/.test(r)&&!i?n.length>0&&(t.push(n),n=""):n+=r;return n.length>0&&t.push(n),t}Ht(mN,"tokenise");function pN(e){if(e.length<2)return;let t=0,n=e[t++],i,r;for(;t<e.length&&r===void 0;){let a=e[t].toUpperCase();if(a==="IN")t++;else if(aN(a))r=a,t++;else if(/^\d+$/.test(e[t]))i=parseInt(e[t],10),t++;else return}if(!r)return;let o=e.slice(t);switch(r){case"MX":{if(o.length<2)return;let a=parseInt(o[0],10),c=o.slice(1).join(" ");return{name:n,type:r,ttl:i,value:c,priority:a}}case"SRV":{if(o.length<4)return;let a=parseInt(o[0],10),c=parseInt(o[1],10),u=parseInt(o[2],10),l=o[3];return{name:n,type:r,ttl:i,value:l,priority:a,weight:c,port:u}}case"TXT":{let a=uN(e,t);return{name:n,type:r,ttl:i,value:a}}case"CAA":{let a=o.join(" ");return{name:n,type:r,ttl:i,value:a}}case"A":case"AAAA":{if(o.length===0)return;if(o[0].toUpperCase()==="ALIAS"){if(o.length<2)return;let a=o.slice(1).join(" ");return{name:n,type:r,ttl:i,value:`${iC}${a}`}}return{name:n,type:r,ttl:i,value:o[0]}}default:return o.length===0?void 0:{name:n,type:r,ttl:i,value:o[0]}}}Ht(pN,"parseRecord");function fN(e){let t=e.split(`
449
+ `),n,i=300,r=[],o=[],a=[];for(let c of t){let u=c.trim();if(u===""||u.startsWith(";"))continue;if(u.toUpperCase().startsWith(Zt.FJALL_DELEGATE)){let v=lN(u);v&&o.push(v);continue}let l=cN(u);if(l==="")continue;let m=mN(l);if(m.length===0)continue;let p=m[0].toUpperCase();if(p===Zt.ORIGIN){if(m.length<2)continue;n=sN(m[1]);continue}if(p===Zt.TTL){if(m.length<2)continue;i=parseInt(m[1],10);continue}if(p===Zt.FJALL_CERT){let v=dN(m);v&&a.push(v);continue}let g=pN(m);g&&r.push(g)}return n?P({origin:n,ttl:i,records:r,delegations:o,certificates:a}):$(new Error("Missing $ORIGIN directive"))}Ht(fN,"parseZoneFile");function gN(e,t){if(!e.startsWith("fjall:"))return;let n=e.split(":");if(n.length<3)return;let i=n[1],r=n[2],o=`${i}:${r}`;return t.get(o)??t.get(e)}Ht(gN,"resolveAlias");var D6=Object.defineProperty,Ly=(e,t)=>D6(e,"name",{value:t,configurable:!0});function hN(e,t){return e.length>=t?e:e+" ".repeat(t-e.length)}Ly(hN,"padRight");function vN(e,t){let n=hN(e.name,24),i=e.ttl!==void 0&&e.ttl!==t?`${e.ttl} `:"";switch(e.type){case"MX":return`${n} ${i}IN MX ${e.priority??10} ${e.value}`;case"SRV":return`${n} ${i}IN SRV ${e.priority??0} ${e.weight??0} ${e.port??0} ${e.value}`;case"TXT":return`${n} ${i}IN TXT "${e.value}"`;case"CAA":return`${n} ${i}IN CAA ${e.value}`;default:return`${n} ${i}IN ${e.type} ${e.value}`}}Ly(vN,"formatRecord");function bN(e){let t=[];if(t.push("; zone.bind \u2014 managed by fjall"),t.push(`${Zt.ORIGIN} ${e.origin}.`),t.push(`${Zt.TTL} ${e.ttl}`),t.push(""),e.certificates.length>0){for(let n of e.certificates){let i=[n.domainName,...n.subjectAlternativeNames];t.push(`${Zt.FJALL_CERT} ${i.join(" ")}`)}t.push("")}if(e.delegations.length>0){for(let n of e.delegations){let i=n.auto?" ; auto":"";t.push(`${Zt.FJALL_DELEGATE} ${n.subdomain} TO ${n.targetAccount}${i}`)}t.push("")}for(let n of e.records)t.push(vN(n,e.ttl));return t.join(`
450
450
  `)+`
451
- `}Ry(KR,"generateZoneFile");var l6=Object.defineProperty,Py=(e,t)=>l6(e,"name",{value:t,configurable:!0});function YR(e){let{domainName:t,hostedZoneId:n,records:i=[]}=e,r=`fjall/domains/${t}`;return[{path:`${r}/infrastructure.ts`,content:XR({domainName:t,records:i,hostedZoneId:n})},{path:`${r}/package.json`,content:JR(t)},{path:`${r}/tsconfig.json`,content:m6},{path:`${r}/cdk.json`,content:p6},{path:`${r}/.gitignore`,content:d6}]}Py(YR,"generateDomainFiles");function XR(e){let{domainName:t,records:n,hostedZoneId:i}=e,r=Ve(t.split(".").join("")),o=ps(t),a=n.map(l=>{let m=l.ttl!==void 0?`, ttl: ${l.ttl}`:"";return` { type: ${JSON.stringify(l.type)}, name: ${JSON.stringify(l.name)}, value: ${JSON.stringify(l.value)}${m} },`}),c=a.length>0?`[
451
+ `}Ly(bN,"generateZoneFile");var M6=Object.defineProperty,Uy=(e,t)=>M6(e,"name",{value:t,configurable:!0});function yN(e){let{domainName:t,hostedZoneId:n,records:i=[]}=e,r=`fjall/domains/${t}`;return[{path:`${r}/infrastructure.ts`,content:SN({domainName:t,records:i,hostedZoneId:n})},{path:`${r}/package.json`,content:_N(t)},{path:`${r}/tsconfig.json`,content:z6},{path:`${r}/cdk.json`,content:L6},{path:`${r}/.gitignore`,content:j6}]}Uy(yN,"generateDomainFiles");function SN(e){let{domainName:t,records:n,hostedZoneId:i}=e,r=Ce(t.split(".").join("")),o=ys(t),a=n.map(l=>{let m=l.ttl!==void 0?`, ttl: ${l.ttl}`:"";return` { type: ${JSON.stringify(l.type)}, name: ${JSON.stringify(l.name)}, value: ${JSON.stringify(l.value)}${m} },`}),c=a.length>0?`[
452
452
  ${a.join(`
453
453
  `)}
454
454
  ]`:"[]",u=i?` hostedZoneId: ${JSON.stringify(i)},
@@ -474,8 +474,8 @@ ${u} certificates: [
474
474
  ],
475
475
  records: ${c},
476
476
  });
477
- `}Py(XR,"generateDefaultInfrastructureTs");function JR(e){return JSON.stringify({name:`domain-${e}`,version:ku,scripts:{},devDependencies:{"@types/node":"20.4.9","ts-node":"^10.9.1",typescript:"~5.1.6"},dependencies:{"@fjall/components-infrastructure":`^${ku}`,"aws-cdk-lib":"^2.263.0",constructs:"^10.7.2"}},null,2)+`
478
- `}Py(JR,"generateDomainPackageJson");var d6=`node_modules/
477
+ `}Uy(SN,"generateDefaultInfrastructureTs");function _N(e){return JSON.stringify({name:`domain-${e}`,version:Lu,scripts:{},devDependencies:{"@types/node":"20.4.9","ts-node":"^10.9.1",typescript:"~5.1.6"},dependencies:{"@fjall/components-infrastructure":`^${Lu}`,"aws-cdk-lib":"^2.263.0",constructs:"^10.7.2"}},null,2)+`
478
+ `}Uy(_N,"generateDomainPackageJson");var j6=`node_modules/
479
479
  cdk.out/
480
480
  *.d.ts
481
481
  *.js
@@ -483,12 +483,12 @@ cdk.out/
483
483
  .fjall-state*.json.tmp
484
484
  .deploy-state.json
485
485
  .deploy-state.json.tmp
486
- `,m6=JSON.stringify({compilerOptions:{target:"ES2020",module:"commonjs",lib:["es2020","dom"],declaration:!0,strict:!0,noImplicitAny:!0,strictNullChecks:!0,noImplicitThis:!0,alwaysStrict:!0,noUnusedLocals:!1,noUnusedParameters:!1,noImplicitReturns:!0,noFallthroughCasesInSwitch:!1,inlineSourceMap:!0,inlineSources:!0,experimentalDecorators:!0,strictPropertyInitialization:!1,typeRoots:["./node_modules/@types"]},exclude:["node_modules","cdk.out"]},null,2)+`
487
- `,p6=JSON.stringify({app:"npx ts-node --prefer-ts-exts --transpile-only infrastructure.ts",assetMetadata:!1,pathMetadata:!1,versionReporting:!1,watch:{include:["**"],exclude:["README.md","cdk*.json","**/*.d.ts","**/*.js","tsconfig.json","package*.json","yarn.lock","node_modules","test"]},context:{"@aws-cdk/aws-lambda:recognizeLayerVersion":!0,"@aws-cdk/core:checkSecretUsage":!0,"@aws-cdk/core:target-partitions":["aws","aws-cn"],"@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver":!0,"@aws-cdk/aws-ec2:uniqueImdsv2TemplateName":!0,"@aws-cdk/aws-ecs:arnFormatIncludesClusterName":!0,"@aws-cdk/aws-iam:minimizePolicies":!0,"@aws-cdk/core:validateSnapshotRemovalPolicy":!0,"@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName":!0,"@aws-cdk/aws-s3:createDefaultLoggingPolicy":!0,"@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption":!0,"@aws-cdk/aws-apigateway:disableCloudWatchRole":!0,"@aws-cdk/core:enablePartitionLiterals":!0,"@aws-cdk/aws-events:eventsTargetQueueSameAccount":!0,"@aws-cdk/aws-iam:standardizedServicePrincipals":!0,"@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker":!0,"@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName":!0,"@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy":!0,"@aws-cdk/aws-route53-patters:useCertificate":!0,"@aws-cdk/customresources:installLatestAwsSdkDefault":!1,"@aws-cdk/aws-rds:databaseProxyUniqueResourceName":!0,"@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup":!0,"@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId":!0,"@aws-cdk/aws-ec2:launchTemplateDefaultUserData":!0,"@aws-cdk/aws-secretsmanager:useAttachedSecretResourcePolicyForSecretTargetAttachments":!0,"@aws-cdk/aws-redshift:columnId":!0,"@aws-cdk/aws-stepfunctions-tasks:enableEmrServicePolicyV2":!0,"@aws-cdk/aws-ec2:restrictDefaultSecurityGroup":!0,"@aws-cdk/aws-apigateway:requestValidatorUniqueId":!0,"@aws-cdk/aws-kms:aliasNameRef":!0,"@aws-cdk/aws-autoscaling:generateLaunchTemplateInsteadOfLaunchConfig":!0,"@aws-cdk/core:includePrefixInUniqueNameGeneration":!0,"@aws-cdk/aws-opensearchservice:enableOpensearchMultiAzWithStandby":!0}},null,2)+`
488
- `;var f6=Object.defineProperty,Br=(e,t)=>f6(e,"name",{value:t,configurable:!0});function eP(e,t,n){let i=e.root?QR.join(e.root,t):t;try{if(eo.existsSync(i)){let r=`${i}.bak`,o=`${r}.tmp`;eo.writeFileSync(o,n),eo.renameSync(o,r)}return N(void 0)}catch(r){let o=At(r);return Ru.warn("Generator",`Failed to create backup of ${t}`,{error:hi(o.message)}),$(o)}}Br(eP,"createInfrastructureBackup");function g6(e,...t){let n={};for(let i of t)e[i]!==void 0&&(n[i]=e[i]);return n}Br(g6,"pickDefined");function tP(e,t){try{let n=Lr(e,{extractCustomCode:!0}),i=Tn(n,t,{skipValidation:!0});return n.customCodeBlocks?.length&&(i.customCodeBlocks=n.customCodeBlocks),N({parsed:n,plan:i})}catch(n){return $(At(n))}}Br(tP,"parseAndBuildPlan");function rP(e,t){let n=tP(e,t);if(!n.success)throw new Error(`Failed to parse infrastructure: ${n.error.message}`,{cause:n.error});return n.data}Br(rP,"parseAndBuildPlanOrThrow");function nP(e,t,n){let i=e.safeParse(t);if(!i.success)throw new Error(`Invalid ${n} generator options:
489
- ${va(i.error)}`);return i.data}Br(nP,"validateGeneratorOptions");function iP(e,t){let n=Qt(t),i=e.read(n)?.toString();if(!i)throw new Error(`App '${t}' not found. Expected infrastructure.ts at: ${n}`);return{path:n,content:i}}Br(iP,"readInfrastructureOrThrow");async function Ny(e,t,n,i,r){let o=nP(t,n,i),{path:a,content:c}=iP(e,o.appName),{plan:u}=rP(c,o.appName),l=await r({tree:e,validated:o,plan:u,infrastructurePath:a,content:c}),m=oP(e,a,c,l);if(!m.success)throw new Error(m.error.message,{cause:m.error})}Br(Ny,"withInfrastructurePlan");function oP(e,t,n,i){let r=Ji(i);if(!r.success)return $(r.error);let o=eP(e,t,n);return o.success?(e.write(t,r.data),N(void 0)):$(new Error(`Failed to create backup: ${o.error.message}`))}Br(oP,"generateAndWriteInfrastructure");var h6=Object.defineProperty,Xl=(e,t)=>h6(e,"name",{value:t,configurable:!0}),to=1e3;function v6(e,t,n,i){if(bd(e,t,i)===0)return n;for(let r=2;r<=to;r++){let o=`${n}${r}`;try{return ao(e,t,o),o}catch{}}return`${n}${to}`}Xl(v6,"generateUniqueResourceName");function aP(e,t){let n=T$.RESOURCE_SUFFIXES[t];return`${e}${n}`}Xl(aP,"getDefaultResourceName");function b6(e,t,n){let i=aP(t,n);if(!Kr(e,t,i))return i;for(let r=2;r<=to;r++){let o=`${i}${r}`;if(!Kr(e,t,o))return o}return`${i}${to}`}Xl(b6,"getUniqueDefaultResourceName");function wy(e,t,n){if(!Kr(e,t,n))return n;let i=n.match(/^(.+?)(\d*)$/);if(!i)return n;let r=i[1],o=i[2]?parseInt(i[2],10)+1:2;for(let a=o;a<=o+to;a++){let c=`${r}${a}`;if(!Kr(e,t,c))return c}return`${r}${o+to}`}Xl(wy,"ensureUniqueResourceName");var VS=qk(Mk(),1),EV=Object.defineProperty,jk=(e,t)=>EV(e,"name",{value:t,configurable:!0});async function GS(e,t,n,i){let r=`Connect to existing ${t}?`,o=`Found ${e} ${t}s. Configure connections?`,a=e===1?n??r:i?.replace("{count}",()=>String(e))??o,c=await(0,VS.default)([{type:"confirm",name:"shouldConnect",message:a,initial:!0}]);return c?c.shouldConnect:!1}jk(GS,"promptForConnection");async function ZS(e,t,n){if(e.length===1)return process.stdout.write(`
486
+ `,z6=JSON.stringify({compilerOptions:{target:"ES2020",module:"commonjs",lib:["es2020","dom"],declaration:!0,strict:!0,noImplicitAny:!0,strictNullChecks:!0,noImplicitThis:!0,alwaysStrict:!0,noUnusedLocals:!1,noUnusedParameters:!1,noImplicitReturns:!0,noFallthroughCasesInSwitch:!1,inlineSourceMap:!0,inlineSources:!0,experimentalDecorators:!0,strictPropertyInitialization:!1,typeRoots:["./node_modules/@types"]},exclude:["node_modules","cdk.out"]},null,2)+`
487
+ `,L6=JSON.stringify({app:"npx ts-node --prefer-ts-exts --transpile-only infrastructure.ts",assetMetadata:!1,pathMetadata:!1,versionReporting:!1,watch:{include:["**"],exclude:["README.md","cdk*.json","**/*.d.ts","**/*.js","tsconfig.json","package*.json","yarn.lock","node_modules","test"]},context:{"@aws-cdk/aws-lambda:recognizeLayerVersion":!0,"@aws-cdk/core:checkSecretUsage":!0,"@aws-cdk/core:target-partitions":["aws","aws-cn"],"@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver":!0,"@aws-cdk/aws-ec2:uniqueImdsv2TemplateName":!0,"@aws-cdk/aws-ecs:arnFormatIncludesClusterName":!0,"@aws-cdk/aws-iam:minimizePolicies":!0,"@aws-cdk/core:validateSnapshotRemovalPolicy":!0,"@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName":!0,"@aws-cdk/aws-s3:createDefaultLoggingPolicy":!0,"@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption":!0,"@aws-cdk/aws-apigateway:disableCloudWatchRole":!0,"@aws-cdk/core:enablePartitionLiterals":!0,"@aws-cdk/aws-events:eventsTargetQueueSameAccount":!0,"@aws-cdk/aws-iam:standardizedServicePrincipals":!0,"@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker":!0,"@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName":!0,"@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy":!0,"@aws-cdk/aws-route53-patters:useCertificate":!0,"@aws-cdk/customresources:installLatestAwsSdkDefault":!1,"@aws-cdk/aws-rds:databaseProxyUniqueResourceName":!0,"@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup":!0,"@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId":!0,"@aws-cdk/aws-ec2:launchTemplateDefaultUserData":!0,"@aws-cdk/aws-secretsmanager:useAttachedSecretResourcePolicyForSecretTargetAttachments":!0,"@aws-cdk/aws-redshift:columnId":!0,"@aws-cdk/aws-stepfunctions-tasks:enableEmrServicePolicyV2":!0,"@aws-cdk/aws-ec2:restrictDefaultSecurityGroup":!0,"@aws-cdk/aws-apigateway:requestValidatorUniqueId":!0,"@aws-cdk/aws-kms:aliasNameRef":!0,"@aws-cdk/aws-autoscaling:generateLaunchTemplateInsteadOfLaunchConfig":!0,"@aws-cdk/core:includePrefixInUniqueNameGeneration":!0,"@aws-cdk/aws-opensearchservice:enableOpensearchMultiAzWithStandby":!0}},null,2)+`
488
+ `;var U6=Object.defineProperty,On=(e,t)=>U6(e,"name",{value:t,configurable:!0});function xN(e,t,n){let i=e.root?EN.join(e.root,t):t;try{if(co.existsSync(i)){let r=`${i}.bak`,o=`${r}.tmp`;co.writeFileSync(o,n),co.renameSync(o,r)}return P(void 0)}catch(r){let o=At(r);return Du.warn("Generator",`Failed to create backup of ${t}`,{error:Ei(o.message)}),$(o)}}On(xN,"createInfrastructureBackup");function AN(e,t){try{let n=Br(e,{extractCustomCode:!0}),i=Pn(n,t,{skipValidation:!0});return n.customCodeBlocks?.length&&(i.customCodeBlocks=n.customCodeBlocks),P({parsed:n,plan:i})}catch(n){return $(At(n))}}On(AN,"parseAndBuildPlan");function IN(e,t){let n=AN(e,t);if(!n.success)throw new Error(`Failed to parse infrastructure: ${n.error.message}`,{cause:n.error});return n.data}On(IN,"parseAndBuildPlanOrThrow");function $N(e,t,n){let i=e.safeParse(t);if(!i.success)throw new Error(`Invalid ${n} generator options:
489
+ ${xa(i.error)}`);return i.data}On($N,"validateGeneratorOptions");function TN(e,t){let n=er(t),i=e.read(n)?.toString();if(!i)throw new Error(`App '${t}' not found. Expected infrastructure.ts at: ${n}`);return{path:n,content:i}}On(TN,"readInfrastructureOrThrow");async function Fy(e,t,n,i,r){let o=$N(t,n,i),{path:a,content:c}=TN(e,o.appName),{plan:u}=IN(c,o.appName),l=await r({tree:e,validated:o,plan:u,infrastructurePath:a,content:c}),m=RN(e,a,c,l);if(!m.success)throw new Error(m.error.message,{cause:m.error})}On(Fy,"withInfrastructurePlan");function RN(e,t,n,i){let r=ao(i);if(!r.success)return $(r.error);let o=xN(e,t,n);return o.success?(e.write(t,r.data),P(void 0)):$(new Error(`Failed to create backup: ${o.error.message}`))}On(RN,"generateAndWriteInfrastructure");var F6=Object.defineProperty,id=(e,t)=>F6(e,"name",{value:t,configurable:!0}),uo=1e3;function B6(e,t,n,i){if(Id(e,t,i)===0)return n;for(let r=2;r<=uo;r++){let o=`${n}${r}`;try{return go(e,t,o),o}catch{}}return`${n}${uo}`}id(B6,"generateUniqueResourceName");function CN(e,t){let n=G$.RESOURCE_SUFFIXES[t];return`${e}${n}`}id(CN,"getDefaultResourceName");function V6(e,t,n){let i=CN(t,n);if(!Jr(e,t,i))return i;for(let r=2;r<=uo;r++){let o=`${i}${r}`;if(!Jr(e,t,o))return o}return`${i}${uo}`}id(V6,"getUniqueDefaultResourceName");function By(e,t,n){if(!Jr(e,t,n))return n;let i=n.match(/^(.+?)(\d*)$/);if(!i)return n;let r=i[1],o=i[2]?parseInt(i[2],10)+1:2;for(let a=o;a<=o+uo;a++){let c=`${r}${a}`;if(!Jr(e,t,c))return c}return`${r}${o+uo}`}id(By,"ensureUniqueResourceName");var QS=vO(oO(),1),HV=Object.defineProperty,aO=(e,t)=>HV(e,"name",{value:t,configurable:!0});async function e_(e,t,n,i){let r=`Connect to existing ${t}?`,o=`Found ${e} ${t}s. Configure connections?`,a=e===1?n??r:i?.replace("{count}",()=>String(e))??o,c=await(0,QS.default)([{type:"confirm",name:"shouldConnect",message:a,initial:!0}]);return c?c.shouldConnect:!1}aO(e_,"promptForConnection");async function t_(e,t,n){if(e.length===1)return process.stdout.write(`
490
490
  Auto-selected: ${e[0].name}
491
- `),[e[0].name];let i=[];for(;i.length===0;)i=(await(0,VS.default)([{type:"multiselect",name:"selected",message:t,choices:e.map(r=>({title:r.name,value:r.name,description:n?.(r),selected:!1}))}]))?.selected||[],i.length===0&&process.stdout.write(`
491
+ `),[e[0].name];let i=[];for(;i.length===0;)i=(await(0,QS.default)([{type:"multiselect",name:"selected",message:t,choices:e.map(r=>({title:r.name,value:r.name,description:n?.(r),selected:!1}))}]))?.selected||[],i.length===0&&process.stdout.write(`
492
492
  Please select at least one resource
493
493
 
494
- `);return i}jk(ZS,"selectResources");var xV=Object.defineProperty,WS=(e,t)=>xV(e,"name",{value:t,configurable:!0});function zk(e,t,n){let i=n.length>0;switch(t.type){case"ecs":return{name:e,type:"ecs",needsConnection:i,connectedDatabase:n,cluster:t.cluster,services:t.services,...t.docker!==void 0&&{docker:t.docker}};case"lambda":return{name:e,type:"lambda",needsConnection:i,connectedDatabase:n,timeout:t.timeout,memory:t.memory,handler:t.handler,runtime:t.runtime,environment:t.environment,secrets:t.secrets};case"ec2":return{name:e,type:"ec2",needsConnection:i,connectedDatabase:n,instanceType:t.instanceType,enableSSH:t.enableSSH,keyName:t.keyName,userData:t.userData,securityGroups:t.securityGroups};default:return t}}WS(zk,"buildComputeResourcePlan");async function Lk(e,t){await Ny(e,$T,t,"compute",async({tree:n,validated:i,plan:r})=>{i.nameProvidedByFlag||ao(n,i.appName,i.computeName);let o=i.nameProvidedByFlag?wy(n,i.appName,i.computeName):i.computeName,a=await Uk(i,r),c=zk(o,i,a);return{...r,compute:[...r.compute,c]}})}WS(Lk,"computeGenerator");async function Uk(e,t){return e.connectionConfig?e.connectionConfig.connectToDatabase??[]:t.database.length>0&&!e.nameProvidedByFlag&&await GS(t.database.length,"database","Connect to existing database?","Found {count} databases. Configure connections?")?ZS(t.database,"Select databases to connect:",n=>`${n.type} - ${n.databaseName}`):[]}WS(Uk,"resolveConnectedDatabase");var $te=Lk;export{Lk as computeGenerator,$te as default};
494
+ `);return i}aO(t_,"selectResources");var qV=Object.defineProperty,r_=(e,t)=>qV(e,"name",{value:t,configurable:!0});function sO(e,t,n){let i=n.length>0;switch(t.type){case"ecs":return{name:e,type:"ecs",needsConnection:i,connectedDatabase:n,cluster:t.cluster,services:t.services,...t.docker!==void 0&&{docker:t.docker}};case"lambda":return{name:e,type:"lambda",needsConnection:i,connectedDatabase:n,timeout:t.timeout,memory:t.memory,handler:t.handler,runtime:t.runtime,environment:t.environment,secrets:t.secrets};case"ec2":return{name:e,type:"ec2",needsConnection:i,connectedDatabase:n,instanceType:t.instanceType,enableSSH:t.enableSSH,keyName:t.keyName,userData:t.userData,securityGroups:t.securityGroups};default:return t}}r_(sO,"buildComputeResourcePlan");async function cO(e,t){await Fy(e,VT,t,"compute",async({tree:n,validated:i,plan:r})=>{i.nameProvidedByFlag||go(n,i.appName,i.computeName);let o=i.nameProvidedByFlag?By(n,i.appName,i.computeName):i.computeName,a=await uO(i,r),c=sO(o,i,a);return{...r,compute:[...r.compute,c]}})}r_(cO,"computeGenerator");async function uO(e,t){return e.connectionConfig?e.connectionConfig.connectToDatabase??[]:t.database.length>0&&!e.nameProvidedByFlag&&await e_(t.database.length,"database","Connect to existing database?","Found {count} databases. Configure connections?")?t_(t.database,"Select databases to connect:",n=>`${n.type} - ${n.databaseName}`):[]}r_(uO,"resolveConnectedDatabase");var ire=cO;export{cO as computeGenerator,ire as default};