create-twenty-app 0.8.0-canary.9 → 0.9.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.
- package/dist/cli.cjs +2 -2
- package/dist/cli.mjs +10 -3
- package/dist/constants/template/github/workflows/cd.yml +42 -0
- package/dist/constants/template/github/workflows/ci.yml +48 -0
- package/dist/constants/template/src/__tests__/setup-test.ts +31 -23
- package/dist/constants/template/vitest.config.ts +4 -1
- package/package.json +2 -2
package/dist/cli.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";const zA=require("chalk"),r_=require("commander"),UA=require("fs-extra"),Rn=require("path"),jA=require("uuid"),LA=require("node:child_process"),FA=require("node:os"),i_=require("util"),o_=require("child_process"),ZA=require("inquirer"),BA=require("lodash.kebabcase"),rc=require("twenty-sdk/cli");require("lodash.camelcase");const Th=e=>e&&e.__esModule?e:{default:e};function a_(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Xe=Th(zA),_t=a_(UA),zv=a_(Rn),ic=Th(ZA),WA=Th(BA),GA="create-twenty-app",qA="0.
|
|
2
|
+
"use strict";const zA=require("chalk"),r_=require("commander"),UA=require("fs-extra"),Rn=require("path"),jA=require("uuid"),LA=require("node:child_process"),FA=require("node:os"),i_=require("util"),o_=require("child_process"),ZA=require("inquirer"),BA=require("lodash.kebabcase"),rc=require("twenty-sdk/cli");require("lodash.camelcase");const Th=e=>e&&e.__esModule?e:{default:e};function a_(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Xe=Th(zA),_t=a_(UA),zv=a_(Rn),ic=Th(ZA),WA=Th(BA),GA="create-twenty-app",qA="0.9.0",Hc={name:GA,version:qA},HA="src",Uv=async({appName:e,appDisplayName:t,appDescription:r,appDirectory:i})=>{console.log(Xe.default.gray("Generating application project...")),await _t.copy(Rn.join(__dirname,"./constants/template"),i),await KA({appDirectory:i}),await JA({appDisplayName:t,appDescription:r,appDirectory:i}),await VA({appName:e,appDirectory:i})},KA=async({appDirectory:e})=>{const t=[{from:"gitignore",to:".gitignore"},{from:"github",to:".github"}];for(const{from:r,to:i}of t){const n=Rn.join(e,r);await _t.pathExists(n)&&await _t.rename(n,Rn.join(e,i))}},JA=async({appDisplayName:e,appDescription:t,appDirectory:r})=>{const i=Rn.join(r,HA,"constants","universal-identifiers.ts"),n=await _t.readFile(i,"utf-8");await _t.writeFile(i,n.replace("DISPLAY-NAME-TO-BE-GENERATED",e).replace("DESCRIPTION-TO-BE-GENERATED",t).replace(/UUID-TO-BE-GENERATED/g,()=>jA.v4()))},VA=async({appName:e,appDirectory:t})=>{const r=await _t.readJson(Rn.join(t,"package.json"));r.name=e,r.dependencies["twenty-sdk"]=Hc.version,r.dependencies["twenty-client-sdk"]=Hc.version,await _t.writeFile(Rn.join(t,"package.json"),JSON.stringify(r,null,2),"utf8")},yu="twentyhq",_u="twenty",u_="main",hl="packages/twenty-apps/examples",YA=`https://github.com/${yu}/${_u}/tree/${u_}/${hl}`,XA=async()=>{const e=await fetch(`https://api.github.com/repos/${yu}/${_u}/releases/latest`,{headers:{Accept:"application/vnd.github.v3+json"}});return e.ok?(await e.json()).tag_name:u_},s_=async(e,t)=>{const r=`https://api.github.com/repos/${yu}/${_u}/contents/${e}?ref=${t}`,i=await fetch(r,{headers:{Accept:"application/vnd.github.v3+json"}});if(!i.ok)return null;const n=await i.json();return Array.isArray(n)?n:null},QA=async e=>{const t=await s_(hl,e);return t?t.filter(r=>r.type==="dir").map(r=>r.name):[]},eN=async(e,t)=>{const r=`${hl}/${e}`;if(await s_(r,t)!==null)return;const n=await QA(t);throw new Error(`Example "${e}" not found.
|
|
3
3
|
|
|
4
4
|
`+(n.length>0?`Available examples:
|
|
5
5
|
${n.map(a=>` - ${a}`).join(`
|
|
@@ -55,7 +55,7 @@ Expecting `+G.join(", ")+", got '"+(this.terminals_[x]||x)+"'":H="Parse error on
|
|
|
55
55
|
}
|
|
56
56
|
return undefined
|
|
57
57
|
}
|
|
58
|
-
`.trim()},blockValue:function(p){var f=this.aliasable("container.hooks.blockHelperMissing"),y=[this.contextName(0)];this.setupHelperArgs(p,0,y);var _=this.popStack();y.splice(1,0,_),this.push(this.source.functionCall(f,"call",y))},ambiguousBlockValue:function(){var p=this.aliasable("container.hooks.blockHelperMissing"),f=[this.contextName(0)];this.setupHelperArgs("",0,f,!0),this.flushInline();var y=this.topStack();f.splice(1,0,y),this.pushSource(["if (!",this.lastHelper,") { ",y," = ",this.source.functionCall(p,"call",f),"}"])},appendContent:function(p){this.pendingContent?p=this.pendingContent+p:this.pendingLocation=this.source.currentLocation,this.pendingContent=p},append:function(){if(this.isInline())this.replaceStack(function(f){return[" != null ? ",f,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var p=this.popStack();this.pushSource(["if (",p," != null) { ",this.appendToBuffer(p,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(p){this.lastContext=p},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(p,f,y,_){var w=0;!_&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(p[w++])):this.pushContext(),this.resolvePath("context",p,w,f,y)},lookupBlockParam:function(p,f){this.useBlockParams=!0,this.push(["blockParams[",p[0],"][",p[1],"]"]),this.resolvePath("context",f,1)},lookupData:function(p,f,y){p?this.pushStackLiteral("container.data(data, "+p+")"):this.pushStackLiteral("data"),this.resolvePath("data",f,0,!0,y)},resolvePath:function(p,f,y,_,w){var S=this;if(this.options.strict||this.options.assumeObjects){this.push(v(this.options.strict&&w,this,f,y,p));return}for(var x=f.length,O=function(C){S.replaceStack(function(P){var z=S.nameLookup(P,f[C],p);return _?[" && ",z]:[" != null ? ",z," : ",P]})},E=y;E<x;E++)O(E)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(p,f){this.pushContext(),this.pushString(f),f!=="SubExpression"&&(typeof p=="string"?this.pushString(p):this.pushStackLiteral(p))},emptyHash:function(p){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(p?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var p=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(p.ids)),this.stringParams&&(this.push(this.objectLiteral(p.contexts)),this.push(this.objectLiteral(p.types))),this.push(this.objectLiteral(p.values))},pushString:function(p){this.pushStackLiteral(this.quotedString(p))},pushLiteral:function(p){this.pushStackLiteral(p)},pushProgram:function(p){p!=null?this.pushStackLiteral(this.programExpression(p)):this.pushStackLiteral(null)},registerDecorator:function(p,f){var y=this.nameLookup("decorators",f,"decorator"),_=this.setupHelperArgs(f,p);this.decorators.push(["var decorator = ",y,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+f+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",_])," || fn;"])},invokeHelper:function(p,f,y){var _=this.popStack(),w=this.setupHelper(p,f),S=[];y&&S.push(w.name),S.push(_),this.options.strict||S.push(this.aliasable("container.hooks.helperMissing"));var x=["(",this.itemsSeparatedBy(S,"||"),")"],O=this.source.functionCall(x,"call",w.callParams);this.push(O)},itemsSeparatedBy:function(p,f){var y=[];y.push(p[0]);for(var _=1;_<p.length;_++)y.push(f,p[_]);return y},invokeKnownHelper:function(p,f){var y=this.setupHelper(p,f);this.push(this.source.functionCall(y.name,"call",y.callParams))},invokeAmbiguous:function(p,f){this.useRegister("helper");var y=this.popStack();this.emptyHash();var _=this.setupHelper(0,p,f),w=this.lastHelper=this.nameLookup("helpers",p,"helper"),S=["(","(helper = ",w," || ",y,")"];this.options.strict||(S[0]="(helper = ",S.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",S,_.paramsInit?["),(",_.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",_.callParams)," : helper))"])},invokePartial:function(p,f,y){var _=[],w=this.setupParams(f,1,_);p&&(f=this.popStack(),delete w.name),y&&(w.indent=JSON.stringify(y)),w.helpers="helpers",w.partials="partials",w.decorators="container.decorators",p?_.unshift(f):_.unshift(this.nameLookup("partials",f,"partial")),this.options.compat&&(w.depths="depths"),w=this.objectLiteral(w),_.push(w),this.push(this.source.functionCall("container.invokePartial","",_))},assignToHash:function(p){var f=this.popStack(),y=void 0,_=void 0,w=void 0;this.trackIds&&(w=this.popStack()),this.stringParams&&(_=this.popStack(),y=this.popStack());var S=this.hash;y&&(S.contexts[p]=y),_&&(S.types[p]=_),w&&(S.ids[p]=w),S.values[p]=f},pushId:function(p,f,y){p==="BlockParam"?this.pushStackLiteral("blockParams["+f[0]+"].path["+f[1]+"]"+(y?" + "+JSON.stringify("."+y):"")):p==="PathExpression"?this.pushString(f):p==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:h,compileChildren:function(p,f){for(var y=p.children,_=void 0,w=void 0,S=0,x=y.length;S<x;S++){_=y[S],w=new this.compiler;var O=this.matchExistingProgram(_);if(O==null){var E=this.context.programs.push("")-1;_.index=E,_.name="program"+E,this.context.programs[E]=w.compile(_,f,this.context,!this.precompile),this.context.decorators[E]=w.decorators,this.context.environments[E]=_,this.useDepths=this.useDepths||w.useDepths,this.useBlockParams=this.useBlockParams||w.useBlockParams,_.useDepths=this.useDepths,_.useBlockParams=this.useBlockParams}else _.index=O.index,_.name="program"+O.index,this.useDepths=this.useDepths||O.useDepths,this.useBlockParams=this.useBlockParams||O.useBlockParams}},matchExistingProgram:function(p){for(var f=0,y=this.context.environments.length;f<y;f++){var _=this.context.environments[f];if(_&&_.equals(p))return _}},programExpression:function(p){var f=this.environment.children[p],y=[f.index,"data",f.blockParams];return(this.useBlockParams||this.useDepths)&&y.push("blockParams"),this.useDepths&&y.push("depths"),"container.program("+y.join(", ")+")"},useRegister:function(p){this.registers[p]||(this.registers[p]=!0,this.registers.list.push(p))},push:function(p){return p instanceof m||(p=this.source.wrap(p)),this.inlineStack.push(p),p},pushStackLiteral:function(p){this.push(new m(p))},pushSource:function(p){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),p&&this.source.push(p)},replaceStack:function(p){var f=["("],y=void 0,_=void 0,w=void 0;if(!this.isInline())throw new a.default("replaceStack on non-inline");var S=this.popStack(!0);if(S instanceof m)y=[S.value],f=["(",y],w=!0;else{_=!0;var x=this.incrStack();f=["((",this.push(x)," = ",S,")"],y=this.topStack()}var O=p.call(this,y);w||this.popStack(),_&&this.stackSlot--,this.push(f.concat(O,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var p=this.inlineStack;this.inlineStack=[];for(var f=0,y=p.length;f<y;f++){var _=p[f];if(_ instanceof m)this.compileStack.push(_);else{var w=this.incrStack();this.pushSource([w," = ",_,";"]),this.compileStack.push(w)}}},isInline:function(){return this.inlineStack.length},popStack:function(p){var f=this.isInline(),y=(f?this.inlineStack:this.compileStack).pop();if(!p&&y instanceof m)return y.value;if(!f){if(!this.stackSlot)throw new a.default("Invalid stack pop");this.stackSlot--}return y},topStack:function(){var p=this.isInline()?this.inlineStack:this.compileStack,f=p[p.length-1];return f instanceof m?f.value:f},contextName:function(p){return this.useDepths&&p?"depths["+p+"]":"depth"+p},quotedString:function(p){return this.source.quotedString(p)},objectLiteral:function(p){return this.source.objectLiteral(p)},aliasable:function(p){var f=this.aliases[p];return f?(f.referenceCount++,f):(f=this.aliases[p]=this.source.wrap(p),f.aliasable=!0,f.referenceCount=1,f)},setupHelper:function(p,f,y){var _=[],w=this.setupHelperArgs(f,p,_,y),S=this.nameLookup("helpers",f,"helper"),x=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:_,paramsInit:w,name:S,callParams:[x].concat(_)}},setupParams:function(p,f,y){var _={},w=[],S=[],x=[],O=!y,E=void 0;O&&(y=[]),_.name=this.quotedString(p),_.hash=this.popStack(),this.trackIds&&(_.hashIds=this.popStack()),this.stringParams&&(_.hashTypes=this.popStack(),_.hashContexts=this.popStack());var C=this.popStack(),P=this.popStack();(P||C)&&(_.fn=P||"container.noop",_.inverse=C||"container.noop");for(var z=f;z--;)E=this.popStack(),y[z]=E,this.trackIds&&(x[z]=this.popStack()),this.stringParams&&(S[z]=this.popStack(),w[z]=this.popStack());return O&&(_.args=this.source.generateArray(y)),this.trackIds&&(_.ids=this.source.generateArray(x)),this.stringParams&&(_.types=this.source.generateArray(S),_.contexts=this.source.generateArray(w)),this.options.data&&(_.data="data"),this.useBlockParams&&(_.blockParams="blockParams"),_},setupHelperArgs:function(p,f,y,_){var w=this.setupParams(p,f,y);return w.loc=JSON.stringify(this.source.currentLocation),w=this.objectLiteral(w),_?(this.useRegister("options"),y.push("options"),["options=",w]):y?(y.push(w),""):w}},function(){for(var g="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),p=h.RESERVED_WORDS={},f=0,y=g.length;f<y;f++)p[g[f]]=!0}(),h.isValidJavaScriptVariableName=function(g){return!h.RESERVED_WORDS[g]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(g)};function v(g,p,f,y,_){var w=p.popStack(),S=f.length;g&&S--;for(var x=y;x<S;x++)w=p.nameLookup(w,f[x],_);return g?[p.aliasable("container.strict"),"(",w,", ",p.quotedString(f[S]),", ",JSON.stringify(p.source.currentLocation)," )"]:w}t.default=h,e.exports=t.default}(Ec,Ec.exports)),Ec.exports}var L$;function MP(){return L$||(L$=1,function(e,t){t.__esModule=!0;function r(S){return S&&S.__esModule?S:{default:S}}var i=yP(),n=r(i),a=$_(),s=r(a),l=SP(),d=kP(),m=CP(),h=r(m),v=y_(),g=r(v),p=v_(),f=r(p),y=n.default.create;function _(){var S=y();return S.compile=function(x,O){return d.compile(x,O,S)},S.precompile=function(x,O){return d.precompile(x,O,S)},S.AST=s.default,S.Compiler=d.Compiler,S.JavaScriptCompiler=h.default,S.Parser=l.parser,S.parse=l.parse,S.parseWithoutProcessing=l.parseWithoutProcessing,S}var w=_();w.create=_,f.default(w),w.Visitor=g.default,w.default=w,t.default=w,e.exports=t.default}(ac,ac.exports)),ac.exports}MP();var Me=(e=>(e.ACTOR="ACTOR",e.ADDRESS="ADDRESS",e.ARRAY="ARRAY",e.BOOLEAN="BOOLEAN",e.CURRENCY="CURRENCY",e.DATE="DATE",e.DATE_TIME="DATE_TIME",e.EMAILS="EMAILS",e.FILES="FILES",e.FULL_NAME="FULL_NAME",e.LINKS="LINKS",e.MORPH_RELATION="MORPH_RELATION",e.MULTI_SELECT="MULTI_SELECT",e.NUMBER="NUMBER",e.NUMERIC="NUMERIC",e.PHONES="PHONES",e.POSITION="POSITION",e.RATING="RATING",e.RAW_JSON="RAW_JSON",e.RELATION="RELATION",e.RICH_TEXT="RICH_TEXT",e.SELECT="SELECT",e.TEXT="TEXT",e.TS_VECTOR="TS_VECTOR",e.UUID="UUID",e))(Me||{}),ce=(e=>(e.IS="IS",e.IS_NOT_NULL="IS_NOT_NULL",e.IS_NOT="IS_NOT",e.LESS_THAN_OR_EQUAL="LESS_THAN_OR_EQUAL",e.GREATER_THAN_OR_EQUAL="GREATER_THAN_OR_EQUAL",e.IS_BEFORE="IS_BEFORE",e.IS_AFTER="IS_AFTER",e.CONTAINS="CONTAINS",e.DOES_NOT_CONTAIN="DOES_NOT_CONTAIN",e.IS_EMPTY="IS_EMPTY",e.IS_NOT_EMPTY="IS_NOT_EMPTY",e.IS_RELATIVE="IS_RELATIVE",e.IS_IN_PAST="IS_IN_PAST",e.IS_IN_FUTURE="IS_IN_FUTURE",e.IS_TODAY="IS_TODAY",e.VECTOR_SEARCH="VECTOR_SEARCH",e))(ce||{}),Nt=(e=>(e.Is="is",e.IsNotNull="isNotNull",e.IsNot="isNot",e.LessThanOrEqual="lessThan",e.GreaterThanOrEqual="greaterThan",e.IsBefore="isBefore",e.IsAfter="isAfter",e.Contains="contains",e.DoesNotContain="doesNotContain",e.IsEmpty="isEmpty",e.IsNotEmpty="isNotEmpty",e.IsRelative="isRelative",e.IsInPast="isInPast",e.IsInFuture="isInFuture",e.IsToday="isToday",e))(Nt||{});let Nc;const RP=new Uint8Array(16);function DP(){if(!Nc&&(Nc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Nc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Nc(RP)}const kt=[];for(let e=0;e<256;++e)kt.push((e+256).toString(16).slice(1));function zP(e,t=0){return kt[e[t+0]]+kt[e[t+1]]+kt[e[t+2]]+kt[e[t+3]]+"-"+kt[e[t+4]]+kt[e[t+5]]+"-"+kt[e[t+6]]+kt[e[t+7]]+"-"+kt[e[t+8]]+kt[e[t+9]]+"-"+kt[e[t+10]]+kt[e[t+11]]+kt[e[t+12]]+kt[e[t+13]]+kt[e[t+14]]+kt[e[t+15]]}const UP=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),F$={randomUUID:UP};function jP(e,t,r){if(F$.randomUUID&&!e)return F$.randomUUID();e=e||{};const i=e.random||(e.rng||DP)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,zP(i)}var ph=(e=>(e.EMAIL="EMAIL",e.CALENDAR="CALENDAR",e.WORKFLOW="WORKFLOW",e.AGENT="AGENT",e.API="API",e.IMPORT="IMPORT",e.MANUAL="MANUAL",e.SYSTEM="SYSTEM",e.WEBHOOK="WEBHOOK",e.APPLICATION="APPLICATION",e))(ph||{});Me.ACTOR,Me.SELECT,Object.keys(ph).map((e,t)=>({id:jP(),label:`${ph[e].toLowerCase()}`,value:e,position:t})),Me.UUID,Me.TEXT,Me.RAW_JSON;var Zc=(e=>(e.MONDAY="MONDAY",e.SUNDAY="SUNDAY",e.SATURDAY="SATURDAY",e))(Zc||{});Me.CURRENCY+"",Me.EMAILS+"",Me.LINKS+"",Me.PHONES+"",Me.FULL_NAME+"",Me.ADDRESS+"",Me.ACTOR+"",Me.RICH_TEXT+"";const LP={AED:{label:"UAE dirham"},AFN:{label:"Afghan afghani"},ALL:{label:"Albanian lek"},AMD:{label:"Armenian dram"},ANG:{label:"Netherlands Antillean guilder"},AOA:{label:"Angolan kwanza"},ARS:{label:"Argentine peso"},AUD:{label:"Australian dollar"},AWG:{label:"Aruban florin"},AZN:{label:"Azerbaijani manat"},BAM:{label:"Bosnia and Herzegovina mark"},BBD:{label:"Barbados dollar"},BDT:{label:"Bangladeshi taka"},BGN:{label:"Bulgarian lev"},BHD:{label:"Bahraini dinar"},BIF:{label:"Burundian franc"},BMD:{label:"Bermudian dollar"},BND:{label:"Brunei dollar"},BOB:{label:"Boliviano"},BRL:{label:"Brazilian real"},BSD:{label:"Bahamian dollar"},BTN:{label:"Bhutanese ngultrum"},BWP:{label:"Botswana pula"},BYN:{label:"Belarusian ruble"},BZD:{label:"Belize dollar"},CAD:{label:"Canadian dollar"},CDF:{label:"Congolese franc"},CHF:{label:"Swiss franc"},CLP:{label:"Chilean peso"},CNY:{label:"Chinese yuan"},COP:{label:"Colombian peso"},CRC:{label:"Costa Rican colon"},CUP:{label:"Cuban peso"},CVE:{label:"Cape Verdean escudo"},CZK:{label:"Czech koruna"},DJF:{label:"Djiboutian franc"},DKK:{label:"Danish krone"},DOP:{label:"Dominican peso"},DZD:{label:"Algerian Dinar"},EGP:{label:"Egyptian pound"},ERN:{label:"Eritrean nakfa"},ETB:{label:"Ethiopian birr"},EUR:{label:"Euro"},FJD:{label:"Fiji dollar"},FKP:{label:"Falkland Islands pound"},GBP:{label:"British pound"},GEL:{label:"Georgian lari"},GHS:{label:"Ghanaian cedi"},GIP:{label:"Gibraltar pound"},GMD:{label:"Gambian dalasi"},GNF:{label:"Guinean franc"},GTQ:{label:"Guatemalan quetzal"},GYD:{label:"Guyanese dollar"},HKD:{label:"Hong Kong dollar"},HNL:{label:"Honduran lempira"},HTG:{label:"Haitian gourde"},HUF:{label:"Hungarian forint"},IDR:{label:"Indonesian rupiah"},ILS:{label:"Israeli shekel"},INR:{label:"Indian rupee"},IQD:{label:"Iraqi dinar"},IRR:{label:"Iranian rial"},ISK:{label:"Icelandic króna"},JMD:{label:"Jamaican dollar"},JOD:{label:"Jordanian dinar"},JPY:{label:"Japanese yen"},KES:{label:"Kenyan shilling"},KGS:{label:"Kyrgyzstani som"},KHR:{label:"Cambodian riel"},KMF:{label:"Comoro franc"},KPW:{label:"North Korean won"},KRW:{label:"South Korean won"},KWD:{label:"Kuwaiti dinar"},KYD:{label:"Cayman Islands dollar"},KZT:{label:"Kazakhstani tenge"},LAK:{label:"Lao kip"},LBP:{label:"Lebanese pound"},LKR:{label:"Sri Lankan rupee"},LRD:{label:"Liberian dollar"},LSL:{label:"Lesotho loti"},LYD:{label:"Libyan dinar"},MAD:{label:"Moroccan dirham"},MDL:{label:"Moldovan leu"},MGA:{label:"Malagasy ariary"},MKD:{label:"Macedonian denar"},MMK:{label:"Myanmar kyat"},MNT:{label:"Mongolian tögrög"},MOP:{label:"Macanese pataca"},MRU:{label:"Mauritanian ouguiya"},MUR:{label:"Mauritian rupee"},MVR:{label:"Maldivian rufiyaa"},MWK:{label:"Malawian kwacha"},MXN:{label:"Mexican peso"},MYR:{label:"Malaysian ringgit"},MZN:{label:"Mozambican metical"},NAD:{label:"Namibian dollar"},NGN:{label:"Nigerian naira"},NIO:{label:"Nicaraguan córdoba"},NOK:{label:"Norwegian krone"},NPR:{label:"Nepalese rupee"},NZD:{label:"New Zealand dollar"},OMR:{label:"Omani rial"},PAB:{label:"Panamanian balboa"},PEN:{label:"Peruvian sol"},PGK:{label:"Papua New Guinean kina"},PHP:{label:"Philippine peso"},PKR:{label:"Pakistani rupee"},PLN:{label:"Polish złoty"},PYG:{label:"Paraguayan guaraní"},QAR:{label:"Qatari riyal"},RON:{label:"Romanian leu"},RSD:{label:"Serbian dinar"},RUB:{label:"Russian ruble"},RWF:{label:"Rwandan franc"},SAR:{label:"Saudi riyal"},SBD:{label:"Solomon Islands dollar"},SCR:{label:"Seychelles rupee"},SDG:{label:"Sudanese pound"},SEK:{label:"Swedish krona"},SGD:{label:"Singapore dollar"},SHP:{label:"Saint Helena pound"},SLE:{label:"Sierra Leonean leone"},SOS:{label:"Somalian shilling"},SRD:{label:"Surinamese dollar"},SSP:{label:"South Sudanese pound"},STN:{label:"São Tomé and Príncipe dobra"},SVC:{label:"Salvadoran colón"},SYP:{label:"Syrian pound"},SZL:{label:"Swazi lilangeni"},THB:{label:"Thai Baht"},TJS:{label:"Tajikistani somoni"},TMT:{label:"Turkmenistan manat"},TND:{label:"Tunisian dinar"},TOP:{label:"Tongan paʻanga"},TRY:{label:"Turkish lira"},TTD:{label:"Trinidad and Tobago dollar"},TWD:{label:"Taiwanese dollar"},TZS:{label:"Tanzanian shilling"},UAH:{label:"Ukrainian hryvnia"},UGX:{label:"Ugandan shilling"},USD:{label:"United States dollar"},UYU:{label:"Uruguayan peso"},UZS:{label:"Uzbekistani sum"},VES:{label:"Venezuelan bolívar"},VND:{label:"Vietnamese đồng"},VUV:{label:"Vanuatu vatu"},WST:{label:"Samoan tala"},XOF:{label:"West African CFA franc"},XCD:{label:"East Caribbean dollar"},YER:{label:"Yemeni rial"},ZAR:{label:"South African rand"},ZMW:{label:"Zambian kwacha"},ZWG:{label:"Zimbabwe Gold"}};Me.TEXT,Me.FULL_NAME,Me.UUID;const ta=Object.freeze({status:"aborted"});function R(e,t,r){function i(l,d){var m;Object.defineProperty(l,"_zod",{value:l._zod??{},enumerable:!1}),(m=l._zod).traits??(m.traits=new Set),l._zod.traits.add(e),t(l,d);for(const h in s.prototype)h in l||Object.defineProperty(l,h,{value:s.prototype[h].bind(l)});l._zod.constr=s,l._zod.def=d}const n=r?.Parent??Object;class a extends n{}Object.defineProperty(a,"name",{value:e});function s(l){var d;const m=r?.Parent?new a:this;i(m,l),(d=m._zod).deferred??(d.deferred=[]);for(const h of m._zod.deferred)h();return m}return Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:l=>r?.Parent&&l instanceof r.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}const S_=Symbol("zod_brand");class io extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class _l extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Kc={};function Lt(e){return e&&Object.assign(Kc,e),Kc}function FP(e){return e}function ZP(e){return e}function BP(e){}function WP(e){throw new Error}function GP(e){}function Fh(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,n])=>t.indexOf(+i)===-1).map(([i,n])=>n)}function V(e,t="|"){return e.map(r=>fe(r)).join(t)}function Jc(e,t){return typeof t=="bigint"?t.toString():t}function Mu(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function go(e){return e==null}function bl(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function k_(e,t){const r=(e.toString().split(".")[1]||"").length,i=t.toString();let n=(i.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(i)){const d=i.match(/\d?e-(\d?)/);d?.[1]&&(n=Number.parseInt(d[1]))}const a=r>n?r:n,s=Number.parseInt(e.toFixed(a).replace(".","")),l=Number.parseInt(t.toFixed(a).replace(".",""));return s%l/10**a}const Z$=Symbol("evaluating");function Ee(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==Z$)return i===void 0&&(i=Z$,i=r()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function qP(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Ni(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Vr(...e){const t={};for(const r of e){const i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function HP(e){return Vr(e._zod.def)}function KP(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}function JP(e){const t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{const n={};for(let a=0;a<t.length;a++)n[t[a]]=i[a];return n})}function VP(e=10){const t="abcdefghijklmnopqrstuvwxyz";let r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}function hh(e){return JSON.stringify(e)}const Zh="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function aa(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const I_=Mu(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function ao(e){if(aa(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(aa(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function wl(e){return ao(e)?{...e}:Array.isArray(e)?[...e]:e}function YP(e){let t=0;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}const XP=e=>{const 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}`)}},Vc=new Set(["string","number","symbol"]),E_=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Si(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Fn(e,t,r){const i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function B(e){const 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 QP(e){let t;return new Proxy({},{get(r,i,n){return t??(t=e()),Reflect.get(t,i,n)},set(r,i,n,a){return t??(t=e()),Reflect.set(t,i,n,a)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,n){return t??(t=e()),Reflect.defineProperty(t,i,n)}})}function fe(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function O_(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const x_={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]},A_={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function N_(e,t){const r=e._zod.def,i=Vr(e._zod.def,{get shape(){const n={};for(const a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(n[a]=r.shape[a])}return Ni(this,"shape",n),n},checks:[]});return Fn(e,i)}function P_(e,t){const r=e._zod.def,i=Vr(e._zod.def,{get shape(){const n={...e._zod.def.shape};for(const a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete n[a]}return Ni(this,"shape",n),n},checks:[]});return Fn(e,i)}function T_(e,t){if(!ao(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const n=Vr(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return Ni(this,"shape",a),a},checks:[]});return Fn(e,n)}function C_(e,t){if(!ao(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r={...e._zod.def,get shape(){const i={...e._zod.def.shape,...t};return Ni(this,"shape",i),i},checks:e._zod.def.checks};return Fn(e,r)}function M_(e,t){const r=Vr(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return Ni(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return Fn(e,r)}function R_(e,t,r){const i=Vr(t._zod.def,{get shape(){const n=t._zod.def.shape,a={...n};if(r)for(const s in r){if(!(s in n))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(a[s]=e?new e({type:"optional",innerType:n[s]}):n[s])}else for(const s in n)a[s]=e?new e({type:"optional",innerType:n[s]}):n[s];return Ni(this,"shape",a),a},checks:[]});return Fn(t,i)}function D_(e,t,r){const i=Vr(t._zod.def,{get shape(){const n=t._zod.def.shape,a={...n};if(r)for(const s in r){if(!(s in a))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(a[s]=new e({type:"nonoptional",innerType:n[s]}))}else for(const s in n)a[s]=new e({type:"nonoptional",innerType:n[s]});return Ni(this,"shape",a),a},checks:[]});return Fn(t,i)}function no(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Yn(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function hu(e){return typeof e=="string"?e:e?.message}function nr(e,t,r){const i={...e,path:e.path??[]};if(!e.message){const n=hu(e.inst?._zod.def?.error?.(e))??hu(t?.error?.(e))??hu(r.customError?.(e))??hu(r.localeError?.(e))??"Invalid input";i.message=n}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function Sl(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function kl(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ua(...e){const[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function eT(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function z_(e){const t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function U_(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function tT(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return z_(t+r)}function nT(e){return U_(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function rT(e){const t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");const r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}function iT(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}class oT{constructor(...t){}}const j_=Object.freeze(Object.defineProperty({__proto__:null,BIGINT_FORMAT_RANGES:A_,Class:oT,NUMBER_FORMAT_RANGES:x_,aborted:no,allowsEval:I_,assert:GP,assertEqual:FP,assertIs:BP,assertNever:WP,assertNotEqual:ZP,assignProp:Ni,base64ToUint8Array:z_,base64urlToUint8Array:tT,cached:Mu,captureStackTrace:Zh,cleanEnum:eT,cleanRegex:bl,clone:Fn,cloneDef:HP,createTransparentProxy:QP,defineLazy:Ee,esc:hh,escapeRegex:Si,extend:T_,finalizeIssue:nr,floatSafeRemainder:k_,getElementAtPath:KP,getEnumValues:Fh,getLengthableOrigin:kl,getParsedType:XP,getSizableOrigin:Sl,hexToUint8Array:rT,isObject:aa,isPlainObject:ao,issue:ua,joinValues:V,jsonStringifyReplacer:Jc,merge:M_,mergeDefs:Vr,normalizeParams:B,nullish:go,numKeys:YP,objectClone:qP,omit:P_,optionalKeys:O_,partial:R_,pick:N_,prefixIssues:Yn,primitiveTypes:E_,promiseAllObject:JP,propertyKeyTypes:Vc,randomString:VP,required:D_,safeExtend:C_,shallowClone:wl,stringifyPrimitive:fe,uint8ArrayToBase64:U_,uint8ArrayToBase64url:nT,uint8ArrayToHex:iT,unwrapMessage:hu},Symbol.toStringTag,{value:"Module"})),L_=(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,Jc,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Bh=R("$ZodError",L_),$n=R("$ZodError",L_,{Parent:Error});function Wh(e,t=r=>r.message){const r={},i=[];for(const n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}function Gh(e,t){const r=t||function(a){return a.message},i={_errors:[]},n=a=>{for(const s of a.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(l=>n({issues:l}));else if(s.code==="invalid_key")n({issues:s.issues});else if(s.code==="invalid_element")n({issues:s.issues});else if(s.path.length===0)i._errors.push(r(s));else{let l=i,d=0;for(;d<s.path.length;){const m=s.path[d];d===s.path.length-1?(l[m]=l[m]||{_errors:[]},l[m]._errors.push(r(s))):l[m]=l[m]||{_errors:[]},l=l[m],d++}}};return n(e),i}function F_(e,t){const r=t||function(a){return a.message},i={errors:[]},n=(a,s=[])=>{var l,d;for(const m of a.issues)if(m.code==="invalid_union"&&m.errors.length)m.errors.map(h=>n({issues:h},m.path));else if(m.code==="invalid_key")n({issues:m.issues},m.path);else if(m.code==="invalid_element")n({issues:m.issues},m.path);else{const h=[...s,...m.path];if(h.length===0){i.errors.push(r(m));continue}let v=i,g=0;for(;g<h.length;){const p=h[g],f=g===h.length-1;typeof p=="string"?(v.properties??(v.properties={}),(l=v.properties)[p]??(l[p]={errors:[]}),v=v.properties[p]):(v.items??(v.items=[]),(d=v.items)[p]??(d[p]={errors:[]}),v=v.items[p]),f&&v.errors.push(r(m)),g++}}};return n(e),i}function Z_(e){const t=[],r=e.map(i=>typeof i=="object"?i.key:i);for(const i of r)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function B_(e){const t=[],r=[...e.issues].sort((i,n)=>(i.path??[]).length-(n.path??[]).length);for(const i of r)t.push(`✖ ${i.message}`),i.path?.length&&t.push(` → at ${Z_(i.path)}`);return t.join(`
|
|
58
|
+
`.trim()},blockValue:function(p){var f=this.aliasable("container.hooks.blockHelperMissing"),y=[this.contextName(0)];this.setupHelperArgs(p,0,y);var _=this.popStack();y.splice(1,0,_),this.push(this.source.functionCall(f,"call",y))},ambiguousBlockValue:function(){var p=this.aliasable("container.hooks.blockHelperMissing"),f=[this.contextName(0)];this.setupHelperArgs("",0,f,!0),this.flushInline();var y=this.topStack();f.splice(1,0,y),this.pushSource(["if (!",this.lastHelper,") { ",y," = ",this.source.functionCall(p,"call",f),"}"])},appendContent:function(p){this.pendingContent?p=this.pendingContent+p:this.pendingLocation=this.source.currentLocation,this.pendingContent=p},append:function(){if(this.isInline())this.replaceStack(function(f){return[" != null ? ",f,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var p=this.popStack();this.pushSource(["if (",p," != null) { ",this.appendToBuffer(p,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(p){this.lastContext=p},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(p,f,y,_){var w=0;!_&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(p[w++])):this.pushContext(),this.resolvePath("context",p,w,f,y)},lookupBlockParam:function(p,f){this.useBlockParams=!0,this.push(["blockParams[",p[0],"][",p[1],"]"]),this.resolvePath("context",f,1)},lookupData:function(p,f,y){p?this.pushStackLiteral("container.data(data, "+p+")"):this.pushStackLiteral("data"),this.resolvePath("data",f,0,!0,y)},resolvePath:function(p,f,y,_,w){var S=this;if(this.options.strict||this.options.assumeObjects){this.push(v(this.options.strict&&w,this,f,y,p));return}for(var x=f.length,O=function(C){S.replaceStack(function(P){var z=S.nameLookup(P,f[C],p);return _?[" && ",z]:[" != null ? ",z," : ",P]})},E=y;E<x;E++)O(E)},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(p,f){this.pushContext(),this.pushString(f),f!=="SubExpression"&&(typeof p=="string"?this.pushString(p):this.pushStackLiteral(p))},emptyHash:function(p){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(p?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var p=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(p.ids)),this.stringParams&&(this.push(this.objectLiteral(p.contexts)),this.push(this.objectLiteral(p.types))),this.push(this.objectLiteral(p.values))},pushString:function(p){this.pushStackLiteral(this.quotedString(p))},pushLiteral:function(p){this.pushStackLiteral(p)},pushProgram:function(p){p!=null?this.pushStackLiteral(this.programExpression(p)):this.pushStackLiteral(null)},registerDecorator:function(p,f){var y=this.nameLookup("decorators",f,"decorator"),_=this.setupHelperArgs(f,p);this.decorators.push(["var decorator = ",y,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+f+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",_])," || fn;"])},invokeHelper:function(p,f,y){var _=this.popStack(),w=this.setupHelper(p,f),S=[];y&&S.push(w.name),S.push(_),this.options.strict||S.push(this.aliasable("container.hooks.helperMissing"));var x=["(",this.itemsSeparatedBy(S,"||"),")"],O=this.source.functionCall(x,"call",w.callParams);this.push(O)},itemsSeparatedBy:function(p,f){var y=[];y.push(p[0]);for(var _=1;_<p.length;_++)y.push(f,p[_]);return y},invokeKnownHelper:function(p,f){var y=this.setupHelper(p,f);this.push(this.source.functionCall(y.name,"call",y.callParams))},invokeAmbiguous:function(p,f){this.useRegister("helper");var y=this.popStack();this.emptyHash();var _=this.setupHelper(0,p,f),w=this.lastHelper=this.nameLookup("helpers",p,"helper"),S=["(","(helper = ",w," || ",y,")"];this.options.strict||(S[0]="(helper = ",S.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",S,_.paramsInit?["),(",_.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",_.callParams)," : helper))"])},invokePartial:function(p,f,y){var _=[],w=this.setupParams(f,1,_);p&&(f=this.popStack(),delete w.name),y&&(w.indent=JSON.stringify(y)),w.helpers="helpers",w.partials="partials",w.decorators="container.decorators",p?_.unshift(f):_.unshift(this.nameLookup("partials",f,"partial")),this.options.compat&&(w.depths="depths"),w=this.objectLiteral(w),_.push(w),this.push(this.source.functionCall("container.invokePartial","",_))},assignToHash:function(p){var f=this.popStack(),y=void 0,_=void 0,w=void 0;this.trackIds&&(w=this.popStack()),this.stringParams&&(_=this.popStack(),y=this.popStack());var S=this.hash;y&&(S.contexts[p]=y),_&&(S.types[p]=_),w&&(S.ids[p]=w),S.values[p]=f},pushId:function(p,f,y){p==="BlockParam"?this.pushStackLiteral("blockParams["+f[0]+"].path["+f[1]+"]"+(y?" + "+JSON.stringify("."+y):"")):p==="PathExpression"?this.pushString(f):p==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:h,compileChildren:function(p,f){for(var y=p.children,_=void 0,w=void 0,S=0,x=y.length;S<x;S++){_=y[S],w=new this.compiler;var O=this.matchExistingProgram(_);if(O==null){var E=this.context.programs.push("")-1;_.index=E,_.name="program"+E,this.context.programs[E]=w.compile(_,f,this.context,!this.precompile),this.context.decorators[E]=w.decorators,this.context.environments[E]=_,this.useDepths=this.useDepths||w.useDepths,this.useBlockParams=this.useBlockParams||w.useBlockParams,_.useDepths=this.useDepths,_.useBlockParams=this.useBlockParams}else _.index=O.index,_.name="program"+O.index,this.useDepths=this.useDepths||O.useDepths,this.useBlockParams=this.useBlockParams||O.useBlockParams}},matchExistingProgram:function(p){for(var f=0,y=this.context.environments.length;f<y;f++){var _=this.context.environments[f];if(_&&_.equals(p))return _}},programExpression:function(p){var f=this.environment.children[p],y=[f.index,"data",f.blockParams];return(this.useBlockParams||this.useDepths)&&y.push("blockParams"),this.useDepths&&y.push("depths"),"container.program("+y.join(", ")+")"},useRegister:function(p){this.registers[p]||(this.registers[p]=!0,this.registers.list.push(p))},push:function(p){return p instanceof m||(p=this.source.wrap(p)),this.inlineStack.push(p),p},pushStackLiteral:function(p){this.push(new m(p))},pushSource:function(p){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),p&&this.source.push(p)},replaceStack:function(p){var f=["("],y=void 0,_=void 0,w=void 0;if(!this.isInline())throw new a.default("replaceStack on non-inline");var S=this.popStack(!0);if(S instanceof m)y=[S.value],f=["(",y],w=!0;else{_=!0;var x=this.incrStack();f=["((",this.push(x)," = ",S,")"],y=this.topStack()}var O=p.call(this,y);w||this.popStack(),_&&this.stackSlot--,this.push(f.concat(O,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var p=this.inlineStack;this.inlineStack=[];for(var f=0,y=p.length;f<y;f++){var _=p[f];if(_ instanceof m)this.compileStack.push(_);else{var w=this.incrStack();this.pushSource([w," = ",_,";"]),this.compileStack.push(w)}}},isInline:function(){return this.inlineStack.length},popStack:function(p){var f=this.isInline(),y=(f?this.inlineStack:this.compileStack).pop();if(!p&&y instanceof m)return y.value;if(!f){if(!this.stackSlot)throw new a.default("Invalid stack pop");this.stackSlot--}return y},topStack:function(){var p=this.isInline()?this.inlineStack:this.compileStack,f=p[p.length-1];return f instanceof m?f.value:f},contextName:function(p){return this.useDepths&&p?"depths["+p+"]":"depth"+p},quotedString:function(p){return this.source.quotedString(p)},objectLiteral:function(p){return this.source.objectLiteral(p)},aliasable:function(p){var f=this.aliases[p];return f?(f.referenceCount++,f):(f=this.aliases[p]=this.source.wrap(p),f.aliasable=!0,f.referenceCount=1,f)},setupHelper:function(p,f,y){var _=[],w=this.setupHelperArgs(f,p,_,y),S=this.nameLookup("helpers",f,"helper"),x=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:_,paramsInit:w,name:S,callParams:[x].concat(_)}},setupParams:function(p,f,y){var _={},w=[],S=[],x=[],O=!y,E=void 0;O&&(y=[]),_.name=this.quotedString(p),_.hash=this.popStack(),this.trackIds&&(_.hashIds=this.popStack()),this.stringParams&&(_.hashTypes=this.popStack(),_.hashContexts=this.popStack());var C=this.popStack(),P=this.popStack();(P||C)&&(_.fn=P||"container.noop",_.inverse=C||"container.noop");for(var z=f;z--;)E=this.popStack(),y[z]=E,this.trackIds&&(x[z]=this.popStack()),this.stringParams&&(S[z]=this.popStack(),w[z]=this.popStack());return O&&(_.args=this.source.generateArray(y)),this.trackIds&&(_.ids=this.source.generateArray(x)),this.stringParams&&(_.types=this.source.generateArray(S),_.contexts=this.source.generateArray(w)),this.options.data&&(_.data="data"),this.useBlockParams&&(_.blockParams="blockParams"),_},setupHelperArgs:function(p,f,y,_){var w=this.setupParams(p,f,y);return w.loc=JSON.stringify(this.source.currentLocation),w=this.objectLiteral(w),_?(this.useRegister("options"),y.push("options"),["options=",w]):y?(y.push(w),""):w}},function(){for(var g="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),p=h.RESERVED_WORDS={},f=0,y=g.length;f<y;f++)p[g[f]]=!0}(),h.isValidJavaScriptVariableName=function(g){return!h.RESERVED_WORDS[g]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(g)};function v(g,p,f,y,_){var w=p.popStack(),S=f.length;g&&S--;for(var x=y;x<S;x++)w=p.nameLookup(w,f[x],_);return g?[p.aliasable("container.strict"),"(",w,", ",p.quotedString(f[S]),", ",JSON.stringify(p.source.currentLocation)," )"]:w}t.default=h,e.exports=t.default}(Ec,Ec.exports)),Ec.exports}var L$;function MP(){return L$||(L$=1,function(e,t){t.__esModule=!0;function r(S){return S&&S.__esModule?S:{default:S}}var i=yP(),n=r(i),a=$_(),s=r(a),l=SP(),d=kP(),m=CP(),h=r(m),v=y_(),g=r(v),p=v_(),f=r(p),y=n.default.create;function _(){var S=y();return S.compile=function(x,O){return d.compile(x,O,S)},S.precompile=function(x,O){return d.precompile(x,O,S)},S.AST=s.default,S.Compiler=d.Compiler,S.JavaScriptCompiler=h.default,S.Parser=l.parser,S.parse=l.parse,S.parseWithoutProcessing=l.parseWithoutProcessing,S}var w=_();w.create=_,f.default(w),w.Visitor=g.default,w.default=w,t.default=w,e.exports=t.default}(ac,ac.exports)),ac.exports}MP();var Me=(e=>(e.ACTOR="ACTOR",e.ADDRESS="ADDRESS",e.ARRAY="ARRAY",e.BOOLEAN="BOOLEAN",e.CURRENCY="CURRENCY",e.DATE="DATE",e.DATE_TIME="DATE_TIME",e.EMAILS="EMAILS",e.FILES="FILES",e.FULL_NAME="FULL_NAME",e.LINKS="LINKS",e.MORPH_RELATION="MORPH_RELATION",e.MULTI_SELECT="MULTI_SELECT",e.NUMBER="NUMBER",e.NUMERIC="NUMERIC",e.PHONES="PHONES",e.POSITION="POSITION",e.RATING="RATING",e.RAW_JSON="RAW_JSON",e.RELATION="RELATION",e.RICH_TEXT="RICH_TEXT",e.SELECT="SELECT",e.TEXT="TEXT",e.TS_VECTOR="TS_VECTOR",e.UUID="UUID",e))(Me||{}),ce=(e=>(e.IS="IS",e.IS_NOT_NULL="IS_NOT_NULL",e.IS_NOT="IS_NOT",e.LESS_THAN_OR_EQUAL="LESS_THAN_OR_EQUAL",e.GREATER_THAN_OR_EQUAL="GREATER_THAN_OR_EQUAL",e.IS_BEFORE="IS_BEFORE",e.IS_AFTER="IS_AFTER",e.CONTAINS="CONTAINS",e.DOES_NOT_CONTAIN="DOES_NOT_CONTAIN",e.IS_EMPTY="IS_EMPTY",e.IS_NOT_EMPTY="IS_NOT_EMPTY",e.IS_RELATIVE="IS_RELATIVE",e.IS_IN_PAST="IS_IN_PAST",e.IS_IN_FUTURE="IS_IN_FUTURE",e.IS_TODAY="IS_TODAY",e.VECTOR_SEARCH="VECTOR_SEARCH",e))(ce||{}),Nt=(e=>(e.Is="is",e.IsNotNull="isNotNull",e.IsNot="isNot",e.LessThanOrEqual="lessThan",e.GreaterThanOrEqual="greaterThan",e.IsBefore="isBefore",e.IsAfter="isAfter",e.Contains="contains",e.DoesNotContain="doesNotContain",e.IsEmpty="isEmpty",e.IsNotEmpty="isNotEmpty",e.IsRelative="isRelative",e.IsInPast="isInPast",e.IsInFuture="isInFuture",e.IsToday="isToday",e))(Nt||{});let Nc;const RP=new Uint8Array(16);function DP(){if(!Nc&&(Nc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Nc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Nc(RP)}const kt=[];for(let e=0;e<256;++e)kt.push((e+256).toString(16).slice(1));function zP(e,t=0){return kt[e[t+0]]+kt[e[t+1]]+kt[e[t+2]]+kt[e[t+3]]+"-"+kt[e[t+4]]+kt[e[t+5]]+"-"+kt[e[t+6]]+kt[e[t+7]]+"-"+kt[e[t+8]]+kt[e[t+9]]+"-"+kt[e[t+10]]+kt[e[t+11]]+kt[e[t+12]]+kt[e[t+13]]+kt[e[t+14]]+kt[e[t+15]]}const UP=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),F$={randomUUID:UP};function jP(e,t,r){if(F$.randomUUID&&!e)return F$.randomUUID();e=e||{};const i=e.random||(e.rng||DP)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,zP(i)}var ph=(e=>(e.EMAIL="EMAIL",e.CALENDAR="CALENDAR",e.WORKFLOW="WORKFLOW",e.AGENT="AGENT",e.API="API",e.IMPORT="IMPORT",e.MANUAL="MANUAL",e.SYSTEM="SYSTEM",e.WEBHOOK="WEBHOOK",e.APPLICATION="APPLICATION",e))(ph||{});Me.ACTOR,Me.SELECT,Object.keys(ph).map((e,t)=>({id:jP(),label:`${ph[e].toLowerCase()}`,value:e,position:t})),Me.UUID,Me.TEXT,Me.RAW_JSON;var Zc=(e=>(e.MONDAY="MONDAY",e.SUNDAY="SUNDAY",e.SATURDAY="SATURDAY",e))(Zc||{});Me.CURRENCY+"",Me.EMAILS+"",Me.LINKS+"",Me.PHONES+"",Me.FULL_NAME+"",Me.ADDRESS+"",Me.ACTOR+"",Me.RICH_TEXT+"";const LP={AED:{label:"UAE dirham"},AFN:{label:"Afghan afghani"},ALL:{label:"Albanian lek"},AMD:{label:"Armenian dram"},ANG:{label:"Netherlands Antillean guilder"},AOA:{label:"Angolan kwanza"},ARS:{label:"Argentine peso"},AUD:{label:"Australian dollar"},AWG:{label:"Aruban florin"},AZN:{label:"Azerbaijani manat"},BAM:{label:"Bosnia and Herzegovina mark"},BBD:{label:"Barbados dollar"},BDT:{label:"Bangladeshi taka"},BGN:{label:"Bulgarian lev"},BHD:{label:"Bahraini dinar"},BIF:{label:"Burundian franc"},BMD:{label:"Bermudian dollar"},BND:{label:"Brunei dollar"},BOB:{label:"Boliviano"},BRL:{label:"Brazilian real"},BSD:{label:"Bahamian dollar"},BTN:{label:"Bhutanese ngultrum"},BWP:{label:"Botswana pula"},BYN:{label:"Belarusian ruble"},BZD:{label:"Belize dollar"},CAD:{label:"Canadian dollar"},CDF:{label:"Congolese franc"},CHF:{label:"Swiss franc"},CLP:{label:"Chilean peso"},CLF:{label:"Unidad de Fomento"},CNY:{label:"Chinese yuan"},COP:{label:"Colombian peso"},CRC:{label:"Costa Rican colon"},CUP:{label:"Cuban peso"},CVE:{label:"Cape Verdean escudo"},CZK:{label:"Czech koruna"},DJF:{label:"Djiboutian franc"},DKK:{label:"Danish krone"},DOP:{label:"Dominican peso"},DZD:{label:"Algerian Dinar"},EGP:{label:"Egyptian pound"},ERN:{label:"Eritrean nakfa"},ETB:{label:"Ethiopian birr"},EUR:{label:"Euro"},FJD:{label:"Fiji dollar"},FKP:{label:"Falkland Islands pound"},GBP:{label:"British pound"},GEL:{label:"Georgian lari"},GHS:{label:"Ghanaian cedi"},GIP:{label:"Gibraltar pound"},GMD:{label:"Gambian dalasi"},GNF:{label:"Guinean franc"},GTQ:{label:"Guatemalan quetzal"},GYD:{label:"Guyanese dollar"},HKD:{label:"Hong Kong dollar"},HNL:{label:"Honduran lempira"},HTG:{label:"Haitian gourde"},HUF:{label:"Hungarian forint"},IDR:{label:"Indonesian rupiah"},ILS:{label:"Israeli shekel"},INR:{label:"Indian rupee"},IQD:{label:"Iraqi dinar"},IRR:{label:"Iranian rial"},ISK:{label:"Icelandic króna"},JMD:{label:"Jamaican dollar"},JOD:{label:"Jordanian dinar"},JPY:{label:"Japanese yen"},KES:{label:"Kenyan shilling"},KGS:{label:"Kyrgyzstani som"},KHR:{label:"Cambodian riel"},KMF:{label:"Comoro franc"},KPW:{label:"North Korean won"},KRW:{label:"South Korean won"},KWD:{label:"Kuwaiti dinar"},KYD:{label:"Cayman Islands dollar"},KZT:{label:"Kazakhstani tenge"},LAK:{label:"Lao kip"},LBP:{label:"Lebanese pound"},LKR:{label:"Sri Lankan rupee"},LRD:{label:"Liberian dollar"},LSL:{label:"Lesotho loti"},LYD:{label:"Libyan dinar"},MAD:{label:"Moroccan dirham"},MDL:{label:"Moldovan leu"},MGA:{label:"Malagasy ariary"},MKD:{label:"Macedonian denar"},MMK:{label:"Myanmar kyat"},MNT:{label:"Mongolian tögrög"},MOP:{label:"Macanese pataca"},MRU:{label:"Mauritanian ouguiya"},MUR:{label:"Mauritian rupee"},MVR:{label:"Maldivian rufiyaa"},MWK:{label:"Malawian kwacha"},MXN:{label:"Mexican peso"},MYR:{label:"Malaysian ringgit"},MZN:{label:"Mozambican metical"},NAD:{label:"Namibian dollar"},NGN:{label:"Nigerian naira"},NIO:{label:"Nicaraguan córdoba"},NOK:{label:"Norwegian krone"},NPR:{label:"Nepalese rupee"},NZD:{label:"New Zealand dollar"},OMR:{label:"Omani rial"},PAB:{label:"Panamanian balboa"},PEN:{label:"Peruvian sol"},PGK:{label:"Papua New Guinean kina"},PHP:{label:"Philippine peso"},PKR:{label:"Pakistani rupee"},PLN:{label:"Polish złoty"},PYG:{label:"Paraguayan guaraní"},QAR:{label:"Qatari riyal"},RON:{label:"Romanian leu"},RSD:{label:"Serbian dinar"},RUB:{label:"Russian ruble"},RWF:{label:"Rwandan franc"},SAR:{label:"Saudi riyal"},SBD:{label:"Solomon Islands dollar"},SCR:{label:"Seychelles rupee"},SDG:{label:"Sudanese pound"},SEK:{label:"Swedish krona"},SGD:{label:"Singapore dollar"},SHP:{label:"Saint Helena pound"},SLE:{label:"Sierra Leonean leone"},SOS:{label:"Somalian shilling"},SRD:{label:"Surinamese dollar"},SSP:{label:"South Sudanese pound"},STN:{label:"São Tomé and Príncipe dobra"},SVC:{label:"Salvadoran colón"},SYP:{label:"Syrian pound"},SZL:{label:"Swazi lilangeni"},THB:{label:"Thai Baht"},TJS:{label:"Tajikistani somoni"},TMT:{label:"Turkmenistan manat"},TND:{label:"Tunisian dinar"},TOP:{label:"Tongan paʻanga"},TRY:{label:"Turkish lira"},TTD:{label:"Trinidad and Tobago dollar"},TWD:{label:"Taiwanese dollar"},TZS:{label:"Tanzanian shilling"},UAH:{label:"Ukrainian hryvnia"},UGX:{label:"Ugandan shilling"},USD:{label:"United States dollar"},UYU:{label:"Uruguayan peso"},UZS:{label:"Uzbekistani sum"},VES:{label:"Venezuelan bolívar"},VND:{label:"Vietnamese đồng"},VUV:{label:"Vanuatu vatu"},WST:{label:"Samoan tala"},XOF:{label:"West African CFA franc"},XCD:{label:"East Caribbean dollar"},YER:{label:"Yemeni rial"},ZAR:{label:"South African rand"},ZMW:{label:"Zambian kwacha"},ZWG:{label:"Zimbabwe Gold"}};Me.TEXT,Me.FULL_NAME,Me.UUID;const ta=Object.freeze({status:"aborted"});function R(e,t,r){function i(l,d){var m;Object.defineProperty(l,"_zod",{value:l._zod??{},enumerable:!1}),(m=l._zod).traits??(m.traits=new Set),l._zod.traits.add(e),t(l,d);for(const h in s.prototype)h in l||Object.defineProperty(l,h,{value:s.prototype[h].bind(l)});l._zod.constr=s,l._zod.def=d}const n=r?.Parent??Object;class a extends n{}Object.defineProperty(a,"name",{value:e});function s(l){var d;const m=r?.Parent?new a:this;i(m,l),(d=m._zod).deferred??(d.deferred=[]);for(const h of m._zod.deferred)h();return m}return Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:l=>r?.Parent&&l instanceof r.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}const S_=Symbol("zod_brand");class io extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class _l extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Kc={};function Lt(e){return e&&Object.assign(Kc,e),Kc}function FP(e){return e}function ZP(e){return e}function BP(e){}function WP(e){throw new Error}function GP(e){}function Fh(e){const t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,n])=>t.indexOf(+i)===-1).map(([i,n])=>n)}function V(e,t="|"){return e.map(r=>fe(r)).join(t)}function Jc(e,t){return typeof t=="bigint"?t.toString():t}function Mu(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function go(e){return e==null}function bl(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function k_(e,t){const r=(e.toString().split(".")[1]||"").length,i=t.toString();let n=(i.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(i)){const d=i.match(/\d?e-(\d?)/);d?.[1]&&(n=Number.parseInt(d[1]))}const a=r>n?r:n,s=Number.parseInt(e.toFixed(a).replace(".","")),l=Number.parseInt(t.toFixed(a).replace(".",""));return s%l/10**a}const Z$=Symbol("evaluating");function Ee(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==Z$)return i===void 0&&(i=Z$,i=r()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function qP(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Ni(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Vr(...e){const t={};for(const r of e){const i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function HP(e){return Vr(e._zod.def)}function KP(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}function JP(e){const t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{const n={};for(let a=0;a<t.length;a++)n[t[a]]=i[a];return n})}function VP(e=10){const t="abcdefghijklmnopqrstuvwxyz";let r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}function hh(e){return JSON.stringify(e)}const Zh="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function aa(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const I_=Mu(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function ao(e){if(aa(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(aa(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function wl(e){return ao(e)?{...e}:Array.isArray(e)?[...e]:e}function YP(e){let t=0;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}const XP=e=>{const 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}`)}},Vc=new Set(["string","number","symbol"]),E_=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Si(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Fn(e,t,r){const i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function B(e){const 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 QP(e){let t;return new Proxy({},{get(r,i,n){return t??(t=e()),Reflect.get(t,i,n)},set(r,i,n,a){return t??(t=e()),Reflect.set(t,i,n,a)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,n){return t??(t=e()),Reflect.defineProperty(t,i,n)}})}function fe(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function O_(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const x_={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]},A_={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function N_(e,t){const r=e._zod.def,i=Vr(e._zod.def,{get shape(){const n={};for(const a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(n[a]=r.shape[a])}return Ni(this,"shape",n),n},checks:[]});return Fn(e,i)}function P_(e,t){const r=e._zod.def,i=Vr(e._zod.def,{get shape(){const n={...e._zod.def.shape};for(const a in t){if(!(a in r.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete n[a]}return Ni(this,"shape",n),n},checks:[]});return Fn(e,i)}function T_(e,t){if(!ao(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const n=Vr(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return Ni(this,"shape",a),a},checks:[]});return Fn(e,n)}function C_(e,t){if(!ao(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r={...e._zod.def,get shape(){const i={...e._zod.def.shape,...t};return Ni(this,"shape",i),i},checks:e._zod.def.checks};return Fn(e,r)}function M_(e,t){const r=Vr(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t._zod.def.shape};return Ni(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:[]});return Fn(e,r)}function R_(e,t,r){const i=Vr(t._zod.def,{get shape(){const n=t._zod.def.shape,a={...n};if(r)for(const s in r){if(!(s in n))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(a[s]=e?new e({type:"optional",innerType:n[s]}):n[s])}else for(const s in n)a[s]=e?new e({type:"optional",innerType:n[s]}):n[s];return Ni(this,"shape",a),a},checks:[]});return Fn(t,i)}function D_(e,t,r){const i=Vr(t._zod.def,{get shape(){const n=t._zod.def.shape,a={...n};if(r)for(const s in r){if(!(s in a))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(a[s]=new e({type:"nonoptional",innerType:n[s]}))}else for(const s in n)a[s]=new e({type:"nonoptional",innerType:n[s]});return Ni(this,"shape",a),a},checks:[]});return Fn(t,i)}function no(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Yn(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function hu(e){return typeof e=="string"?e:e?.message}function nr(e,t,r){const i={...e,path:e.path??[]};if(!e.message){const n=hu(e.inst?._zod.def?.error?.(e))??hu(t?.error?.(e))??hu(r.customError?.(e))??hu(r.localeError?.(e))??"Invalid input";i.message=n}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function Sl(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function kl(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ua(...e){const[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function eT(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function z_(e){const t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function U_(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function tT(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return z_(t+r)}function nT(e){return U_(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function rT(e){const t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");const r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}function iT(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}class oT{constructor(...t){}}const j_=Object.freeze(Object.defineProperty({__proto__:null,BIGINT_FORMAT_RANGES:A_,Class:oT,NUMBER_FORMAT_RANGES:x_,aborted:no,allowsEval:I_,assert:GP,assertEqual:FP,assertIs:BP,assertNever:WP,assertNotEqual:ZP,assignProp:Ni,base64ToUint8Array:z_,base64urlToUint8Array:tT,cached:Mu,captureStackTrace:Zh,cleanEnum:eT,cleanRegex:bl,clone:Fn,cloneDef:HP,createTransparentProxy:QP,defineLazy:Ee,esc:hh,escapeRegex:Si,extend:T_,finalizeIssue:nr,floatSafeRemainder:k_,getElementAtPath:KP,getEnumValues:Fh,getLengthableOrigin:kl,getParsedType:XP,getSizableOrigin:Sl,hexToUint8Array:rT,isObject:aa,isPlainObject:ao,issue:ua,joinValues:V,jsonStringifyReplacer:Jc,merge:M_,mergeDefs:Vr,normalizeParams:B,nullish:go,numKeys:YP,objectClone:qP,omit:P_,optionalKeys:O_,partial:R_,pick:N_,prefixIssues:Yn,primitiveTypes:E_,promiseAllObject:JP,propertyKeyTypes:Vc,randomString:VP,required:D_,safeExtend:C_,shallowClone:wl,stringifyPrimitive:fe,uint8ArrayToBase64:U_,uint8ArrayToBase64url:nT,uint8ArrayToHex:iT,unwrapMessage:hu},Symbol.toStringTag,{value:"Module"})),L_=(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,Jc,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Bh=R("$ZodError",L_),$n=R("$ZodError",L_,{Parent:Error});function Wh(e,t=r=>r.message){const r={},i=[];for(const n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}function Gh(e,t){const r=t||function(a){return a.message},i={_errors:[]},n=a=>{for(const s of a.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(l=>n({issues:l}));else if(s.code==="invalid_key")n({issues:s.issues});else if(s.code==="invalid_element")n({issues:s.issues});else if(s.path.length===0)i._errors.push(r(s));else{let l=i,d=0;for(;d<s.path.length;){const m=s.path[d];d===s.path.length-1?(l[m]=l[m]||{_errors:[]},l[m]._errors.push(r(s))):l[m]=l[m]||{_errors:[]},l=l[m],d++}}};return n(e),i}function F_(e,t){const r=t||function(a){return a.message},i={errors:[]},n=(a,s=[])=>{var l,d;for(const m of a.issues)if(m.code==="invalid_union"&&m.errors.length)m.errors.map(h=>n({issues:h},m.path));else if(m.code==="invalid_key")n({issues:m.issues},m.path);else if(m.code==="invalid_element")n({issues:m.issues},m.path);else{const h=[...s,...m.path];if(h.length===0){i.errors.push(r(m));continue}let v=i,g=0;for(;g<h.length;){const p=h[g],f=g===h.length-1;typeof p=="string"?(v.properties??(v.properties={}),(l=v.properties)[p]??(l[p]={errors:[]}),v=v.properties[p]):(v.items??(v.items=[]),(d=v.items)[p]??(d[p]={errors:[]}),v=v.items[p]),f&&v.errors.push(r(m)),g++}}};return n(e),i}function Z_(e){const t=[],r=e.map(i=>typeof i=="object"?i.key:i);for(const i of r)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function B_(e){const t=[],r=[...e.issues].sort((i,n)=>(i.path??[]).length-(n.path??[]).length);for(const i of r)t.push(`✖ ${i.message}`),i.path?.length&&t.push(` → at ${Z_(i.path)}`);return t.join(`
|
|
59
59
|
`)}const Ru=e=>(t,r,i,n)=>{const a=i?Object.assign(i,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise)throw new io;if(s.issues.length){const l=new(n?.Err??e)(s.issues.map(d=>nr(d,a,Lt())));throw Zh(l,n?.callee),l}return s.value},gh=Ru($n),Du=e=>async(t,r,i,n)=>{const a=i?Object.assign(i,{async:!0}):{async:!0};let s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){const l=new(n?.Err??e)(s.issues.map(d=>nr(d,a,Lt())));throw Zh(l,n?.callee),l}return s.value},mh=Du($n),zu=e=>(t,r,i)=>{const n=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},n);if(a instanceof Promise)throw new io;return a.issues.length?{success:!1,error:new(e??Bh)(a.issues.map(s=>nr(s,n,Lt())))}:{success:!0,data:a.value}},W_=zu($n),Uu=e=>async(t,r,i)=>{const n=i?Object.assign(i,{async:!0}):{async:!0};let a=t._zod.run({value:r,issues:[]},n);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(s=>nr(s,n,Lt())))}:{success:!0,data:a.value}},G_=Uu($n),qh=e=>(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Ru(e)(t,r,n)},aT=qh($n),Hh=e=>(t,r,i)=>Ru(e)(t,r,i),uT=Hh($n),Kh=e=>async(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Du(e)(t,r,n)},sT=Kh($n),Jh=e=>async(t,r,i)=>Du(e)(t,r,i),cT=Jh($n),Vh=e=>(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return zu(e)(t,r,n)},lT=Vh($n),Yh=e=>(t,r,i)=>zu(e)(t,r,i),fT=Yh($n),Xh=e=>async(t,r,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Uu(e)(t,r,n)},dT=Xh($n),Qh=e=>async(t,r,i)=>Uu(e)(t,r,i),pT=Qh($n),q_=/^[cC][^\s-]{8,}$/,H_=/^[0-9a-z]+$/,K_=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,J_=/^[0-9a-vA-V]{20}$/,V_=/^[A-Za-z0-9]{27}$/,Y_=/^[a-zA-Z0-9_-]{21}$/,X_=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,hT=/^[-+]?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)?)??$/,Q_=/^([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})$/,sa=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)$/,gT=sa(4),mT=sa(6),vT=sa(7),e6=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,$T=/^[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])?)*$/,yT=/^(([^<>()\[\]\\.,;:\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,}))$/,t6=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,_T=t6,bT=/^[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])?)*$/,wT="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function n6(){return new RegExp(wT,"u")}const r6=/^(?:(?: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])$/,i6=/^(([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}|:))$/,o6=/^((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])$/,a6=/^(([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])$/,u6=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,e1=/^[A-Za-z0-9_-]*$/,t1=/^(?=.{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])?)*\.?$/,s6=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,c6=/^\+(?:[0-9]){6,14}[0-9]$/,l6="(?:(?:\\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])))",f6=new RegExp(`^${l6}$`);function d6(e){const 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 p6(e){return new RegExp(`^${d6(e)}$`)}function h6(e){const t=d6({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${r.join("|")})`;return new RegExp(`^${l6}T(?:${i})$`)}const g6=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},m6=/^-?\d+n?$/,v6=/^-?\d+$/,$6=/^-?\d+(?:\.\d+)?/,y6=/^(?:true|false)$/i,_6=/^null$/i,b6=/^undefined$/i,w6=/^[^A-Z]*$/,S6=/^[^a-z]*$/,k6=/^[0-9a-fA-F]*$/;function ju(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Lu(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const ST=/^[0-9a-fA-F]{32}$/,kT=ju(22,"=="),IT=Lu(22),ET=/^[0-9a-fA-F]{40}$/,OT=ju(27,"="),xT=Lu(27),AT=/^[0-9a-fA-F]{64}$/,NT=ju(43,"="),PT=Lu(43),TT=/^[0-9a-fA-F]{96}$/,CT=ju(64,""),MT=Lu(64),RT=/^[0-9a-fA-F]{128}$/,DT=ju(86,"=="),zT=Lu(86),n1=Object.freeze(Object.defineProperty({__proto__:null,base64:u6,base64url:e1,bigint:m6,boolean:y6,browserEmail:bT,cidrv4:o6,cidrv6:a6,cuid:q_,cuid2:H_,date:f6,datetime:h6,domain:s6,duration:X_,e164:c6,email:e6,emoji:n6,extendedDuration:hT,guid:Q_,hex:k6,hostname:t1,html5Email:$T,idnEmail:_T,integer:v6,ipv4:r6,ipv6:i6,ksuid:V_,lowercase:w6,md5_base64:kT,md5_base64url:IT,md5_hex:ST,nanoid:Y_,null:_6,number:$6,rfc5322Email:yT,sha1_base64:OT,sha1_base64url:xT,sha1_hex:ET,sha256_base64:NT,sha256_base64url:PT,sha256_hex:AT,sha384_base64:CT,sha384_base64url:MT,sha384_hex:TT,sha512_base64:DT,sha512_base64url:zT,sha512_hex:RT,string:g6,time:p6,ulid:K_,undefined:b6,unicodeEmail:t6,uppercase:S6,uuid:sa,uuid4:gT,uuid6:mT,uuid7:vT,xid:J_},Symbol.toStringTag,{value:"Module"})),ct=R("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),I6={number:"number",bigint:"bigint",object:"date"},r1=R("$ZodCheckLessThan",(e,t)=>{ct.init(e,t);const r=I6[typeof t.value];e._zod.onattach.push(i=>{const n=i._zod.bag,a=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<a&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:r,code:"too_big",maximum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),i1=R("$ZodCheckGreaterThan",(e,t)=>{ct.init(e,t);const r=I6[typeof t.value];e._zod.onattach.push(i=>{const n=i._zod.bag,a=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>a&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:r,code:"too_small",minimum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),E6=R("$ZodCheckMultipleOf",(e,t)=>{ct.init(e,t),e._zod.onattach.push(r=>{var i;(i=r._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):k_(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),O6=R("$ZodCheckNumberFormat",(e,t)=>{ct.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),i=r?"int":"number",[n,a]=x_[t.format];e._zod.onattach.push(s=>{const l=s._zod.bag;l.format=t.format,l.minimum=n,l.maximum=a,r&&(l.pattern=v6)}),e._zod.check=s=>{const l=s.value;if(r){if(!Number.isInteger(l)){s.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?s.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!t.abort}):s.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!t.abort});return}}l<n&&s.issues.push({origin:"number",input:l,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),l>a&&s.issues.push({origin:"number",input:l,code:"too_big",maximum:a,inst:e})}}),x6=R("$ZodCheckBigIntFormat",(e,t)=>{ct.init(e,t);const[r,i]=A_[t.format];e._zod.onattach.push(n=>{const a=n._zod.bag;a.format=t.format,a.minimum=r,a.maximum=i}),e._zod.check=n=>{const a=n.value;a<r&&n.issues.push({origin:"bigint",input:a,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),a>i&&n.issues.push({origin:"bigint",input:a,code:"too_big",maximum:i,inst:e})}}),A6=R("$ZodCheckMaxSize",(e,t)=>{var r;ct.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!go(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const n=i.value;n.size<=t.maximum||i.issues.push({origin:Sl(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),N6=R("$ZodCheckMinSize",(e,t)=>{var r;ct.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!go(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const n=i.value;n.size>=t.minimum||i.issues.push({origin:Sl(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),P6=R("$ZodCheckSizeEquals",(e,t)=>{var r;ct.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!go(n)&&n.size!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=i=>{const n=i.value,a=n.size;if(a===t.size)return;const s=a>t.size;i.issues.push({origin:Sl(n),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),T6=R("$ZodCheckMaxLength",(e,t)=>{var r;ct.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!go(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{const n=i.value;if(n.length<=t.maximum)return;const s=kl(n);i.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),C6=R("$ZodCheckMinLength",(e,t)=>{var r;ct.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!go(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{const n=i.value;if(n.length>=t.minimum)return;const s=kl(n);i.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),M6=R("$ZodCheckLengthEquals",(e,t)=>{var r;ct.init(e,t),(r=e._zod.def).when??(r.when=i=>{const n=i.value;return!go(n)&&n.length!==void 0}),e._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=i=>{const n=i.value,a=n.length;if(a===t.length)return;const s=kl(n),l=a>t.length;i.issues.push({origin:s,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Fu=R("$ZodCheckStringFormat",(e,t)=>{var r,i;ct.init(e,t),e._zod.onattach.push(n=>{const a=n._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),R6=R("$ZodCheckRegex",(e,t)=>{Fu.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),D6=R("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=w6),Fu.init(e,t)}),z6=R("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=S6),Fu.init(e,t)}),U6=R("$ZodCheckIncludes",(e,t)=>{ct.init(e,t);const r=Si(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=i,e._zod.onattach.push(n=>{const a=n._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(i)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),j6=R("$ZodCheckStartsWith",(e,t)=>{ct.init(e,t);const r=new RegExp(`^${Si(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),L6=R("$ZodCheckEndsWith",(e,t)=>{ct.init(e,t);const r=new RegExp(`.*${Si(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function B$(e,t,r){e.issues.length&&t.issues.push(...Yn(r,e.issues))}const F6=R("$ZodCheckProperty",(e,t)=>{ct.init(e,t),e._zod.check=r=>{const i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>B$(n,r,t.property));B$(i,r,t.property)}}),Z6=R("$ZodCheckMimeType",(e,t)=>{ct.init(e,t);const r=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),B6=R("$ZodCheckOverwrite",(e,t)=>{ct.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class W6{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}const i=t.split(`
|
|
60
60
|
`).filter(s=>s),n=Math.min(...i.map(s=>s.length-s.trimStart().length)),a=i.map(s=>s.slice(n)).map(s=>" ".repeat(this.indent*2)+s);for(const s of a)this.content.push(s)}compile(){const t=Function,r=this?.args,n=[...(this?.content??[""]).map(a=>` ${a}`)];return new t(...r,n.join(`
|
|
61
61
|
`))}}const G6={major:4,minor:1,patch:11},ge=R("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=G6;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const n of i)for(const a of n._zod.onattach)a(e);if(i.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const n=(s,l,d)=>{let m=no(s),h;for(const v of l){if(v._zod.def.when){if(!v._zod.def.when(s))continue}else if(m)continue;const g=s.issues.length,p=v._zod.check(s);if(p instanceof Promise&&d?.async===!1)throw new io;if(h||p instanceof Promise)h=(h??Promise.resolve()).then(async()=>{await p,s.issues.length!==g&&(m||(m=no(s,g)))});else{if(s.issues.length===g)continue;m||(m=no(s,g))}}return h?h.then(()=>s):s},a=(s,l,d)=>{if(no(s))return s.aborted=!0,s;const m=n(l,i,d);if(m instanceof Promise){if(d.async===!1)throw new io;return m.then(h=>e._zod.parse(h,d))}return e._zod.parse(m,d)};e._zod.run=(s,l)=>{if(l.skipChecks)return e._zod.parse(s,l);if(l.direction==="backward"){const m=e._zod.parse({value:s.value,issues:[]},{...l,skipChecks:!0});return m instanceof Promise?m.then(h=>a(h,s,l)):a(m,s,l)}const d=e._zod.parse(s,l);if(d instanceof Promise){if(l.async===!1)throw new io;return d.then(m=>n(m,i,l))}return n(d,i,l)}}e["~standard"]={validate:n=>{try{const a=W_(e,n);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return G_(e,n).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),Zu=R("$ZodString",(e,t)=>{ge.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??g6(e._zod.bag),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Ke=R("$ZodStringFormat",(e,t)=>{Fu.init(e,t),Zu.init(e,t)}),q6=R("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Q_),Ke.init(e,t)}),H6=R("$ZodUUID",(e,t)=>{if(t.version){const 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=sa(i))}else t.pattern??(t.pattern=sa());Ke.init(e,t)}),K6=R("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=e6),Ke.init(e,t)}),J6=R("$ZodURL",(e,t)=>{Ke.init(e,t),e._zod.check=r=>{try{const i=r.value.trim(),n=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t1.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),V6=R("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=n6()),Ke.init(e,t)}),Y6=R("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Y_),Ke.init(e,t)}),X6=R("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=q_),Ke.init(e,t)}),Q6=R("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=H_),Ke.init(e,t)}),eb=R("$ZodULID",(e,t)=>{t.pattern??(t.pattern=K_),Ke.init(e,t)}),tb=R("$ZodXID",(e,t)=>{t.pattern??(t.pattern=J_),Ke.init(e,t)}),nb=R("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=V_),Ke.init(e,t)}),rb=R("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=h6(t)),Ke.init(e,t)}),ib=R("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=f6),Ke.init(e,t)}),ob=R("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=p6(t)),Ke.init(e,t)}),ab=R("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=X_),Ke.init(e,t)}),ub=R("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=r6),Ke.init(e,t),e._zod.onattach.push(r=>{const i=r._zod.bag;i.format="ipv4"})}),sb=R("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=i6),Ke.init(e,t),e._zod.onattach.push(r=>{const i=r._zod.bag;i.format="ipv6"}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),cb=R("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=o6),Ke.init(e,t)}),lb=R("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=a6),Ke.init(e,t),e._zod.check=r=>{const i=r.value.split("/");try{if(i.length!==2)throw new Error;const[n,a]=i;if(!a)throw new Error;const s=Number(a);if(`${s}`!==a)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function o1(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const fb=R("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=u6),Ke.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{o1(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function db(e){if(!e1.test(e))return!1;const t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return o1(r)}const pb=R("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=e1),Ke.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{db(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),hb=R("$ZodE164",(e,t)=>{t.pattern??(t.pattern=c6),Ke.init(e,t)});function gb(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[i]=r;if(!i)return!1;const n=JSON.parse(atob(i));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}const mb=R("$ZodJWT",(e,t)=>{Ke.init(e,t),e._zod.check=r=>{gb(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),vb=R("$ZodCustomStringFormat",(e,t)=>{Ke.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),a1=R("$ZodNumber",(e,t)=>{ge.init(e,t),e._zod.pattern=e._zod.bag.pattern??$6,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;const a=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...a?{received:a}:{}}),r}}),$b=R("$ZodNumber",(e,t)=>{O6.init(e,t),a1.init(e,t)}),u1=R("$ZodBoolean",(e,t)=>{ge.init(e,t),e._zod.pattern=y6,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}const n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),s1=R("$ZodBigInt",(e,t)=>{ge.init(e,t),e._zod.pattern=m6,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),yb=R("$ZodBigInt",(e,t)=>{x6.init(e,t),s1.init(e,t)}),_b=R("$ZodSymbol",(e,t)=>{ge.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),bb=R("$ZodUndefined",(e,t)=>{ge.init(e,t),e._zod.pattern=b6,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,i)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),wb=R("$ZodNull",(e,t)=>{ge.init(e,t),e._zod.pattern=_6,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{const n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),Sb=R("$ZodAny",(e,t)=>{ge.init(e,t),e._zod.parse=r=>r}),kb=R("$ZodUnknown",(e,t)=>{ge.init(e,t),e._zod.parse=r=>r}),Ib=R("$ZodNever",(e,t)=>{ge.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),Eb=R("$ZodVoid",(e,t)=>{ge.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),Ob=R("$ZodDate",(e,t)=>{ge.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}const n=r.value,a=n instanceof Date;return a&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...a?{received:"Invalid Date"}:{},inst:e}),r}});function W$(e,t,r){e.issues.length&&t.issues.push(...Yn(r,e.issues)),t.value[r]=e.value}const xb=R("$ZodArray",(e,t)=>{ge.init(e,t),e._zod.parse=(r,i)=>{const n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);const a=[];for(let s=0;s<n.length;s++){const l=n[s],d=t.element._zod.run({value:l,issues:[]},i);d instanceof Promise?a.push(d.then(m=>W$(m,r,s))):W$(d,r,s)}return a.length?Promise.all(a).then(()=>r):r}});function Yc(e,t,r,i){e.issues.length&&t.issues.push(...Yn(r,e.issues)),e.value===void 0?r in i&&(t.value[r]=void 0):t.value[r]=e.value}function Ab(e){const t=Object.keys(e.shape);for(const i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);const r=O_(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Nb(e,t,r,i,n,a){const s=[],l=n.keySet,d=n.catchall._zod,m=d.def.type;for(const h of Object.keys(t)){if(l.has(h))continue;if(m==="never"){s.push(h);continue}const v=d.run({value:t[h],issues:[]},i);v instanceof Promise?e.push(v.then(g=>Yc(g,r,h,t))):Yc(v,r,h,t)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:a}),e.length?Promise.all(e).then(()=>r):r}const Pb=R("$ZodObject",(e,t)=>{if(ge.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const l=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...l};return Object.defineProperty(t,"shape",{value:d}),d}})}const i=Mu(()=>Ab(t));Ee(e._zod,"propValues",()=>{const l=t.shape,d={};for(const m in l){const h=l[m]._zod;if(h.values){d[m]??(d[m]=new Set);for(const v of h.values)d[m].add(v)}}return d});const n=aa,a=t.catchall;let s;e._zod.parse=(l,d)=>{s??(s=i.value);const m=l.value;if(!n(m))return l.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),l;l.value={};const h=[],v=s.shape;for(const g of s.keys){const f=v[g]._zod.run({value:m[g],issues:[]},d);f instanceof Promise?h.push(f.then(y=>Yc(y,l,g,m))):Yc(f,l,g,m)}return a?Nb(h,m,l,d,i.value,e):h.length?Promise.all(h).then(()=>l):l}}),Tb=R("$ZodObjectJIT",(e,t)=>{Pb.init(e,t);const r=e._zod.parse,i=Mu(()=>Ab(t)),n=g=>{const p=new W6(["shape","payload","ctx"]),f=i.value,y=x=>{const O=hh(x);return`shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`};p.write("const input = payload.value;");const _=Object.create(null);let w=0;for(const x of f.keys)_[x]=`key_${w++}`;p.write("const newResult = {};");for(const x of f.keys){const O=_[x],E=hh(x);p.write(`const ${O} = ${y(x)};`),p.write(`
|
package/dist/cli.mjs
CHANGED
|
@@ -13,7 +13,7 @@ import rc from "inquirer";
|
|
|
13
13
|
import jA from "lodash.kebabcase";
|
|
14
14
|
import { serverStart as LA, detectLocalServer as FA, authLoginOAuth as ZA, ConfigService as BA } from "twenty-sdk/cli";
|
|
15
15
|
import "lodash.camelcase";
|
|
16
|
-
const WA = "create-twenty-app", GA = "0.
|
|
16
|
+
const WA = "create-twenty-app", GA = "0.9.0", Hc = {
|
|
17
17
|
name: WA,
|
|
18
18
|
version: GA
|
|
19
19
|
}, HA = "src", Dv = async ({
|
|
@@ -28,8 +28,14 @@ const WA = "create-twenty-app", GA = "0.8.0-canary.9", Hc = {
|
|
|
28
28
|
appDirectory: i
|
|
29
29
|
}), await JA({ appName: e, appDirectory: i });
|
|
30
30
|
}, qA = async ({ appDirectory: e }) => {
|
|
31
|
-
const t =
|
|
32
|
-
|
|
31
|
+
const t = [
|
|
32
|
+
{ from: "gitignore", to: ".gitignore" },
|
|
33
|
+
{ from: "github", to: ".github" }
|
|
34
|
+
];
|
|
35
|
+
for (const { from: r, to: i } of t) {
|
|
36
|
+
const n = mr(e, r);
|
|
37
|
+
await _t.pathExists(n) && await _t.rename(n, mr(e, i));
|
|
38
|
+
}
|
|
33
39
|
}, KA = async ({
|
|
34
40
|
appDisplayName: e,
|
|
35
41
|
appDescription: t,
|
|
@@ -8498,6 +8504,7 @@ const jP = {
|
|
|
8498
8504
|
CDF: { label: "Congolese franc" },
|
|
8499
8505
|
CHF: { label: "Swiss franc" },
|
|
8500
8506
|
CLP: { label: "Chilean peso" },
|
|
8507
|
+
CLF: { label: "Unidad de Fomento" },
|
|
8501
8508
|
CNY: { label: "Chinese yuan" },
|
|
8502
8509
|
COP: { label: "Colombian peso" },
|
|
8503
8510
|
CRC: { label: "Costa Rican colon" },
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: CD
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
types: [labeled]
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
env:
|
|
14
|
+
TWENTY_DEPLOY_URL: http://localhost:3000
|
|
15
|
+
|
|
16
|
+
concurrency:
|
|
17
|
+
group: cd-${{ github.ref }}
|
|
18
|
+
cancel-in-progress: true
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
deploy-and-install:
|
|
22
|
+
if: >-
|
|
23
|
+
github.event_name == 'push' ||
|
|
24
|
+
(github.event_name == 'pull_request' && github.event.label.name == 'deploy')
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
steps:
|
|
27
|
+
- name: Checkout
|
|
28
|
+
uses: actions/checkout@v4
|
|
29
|
+
with:
|
|
30
|
+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
31
|
+
|
|
32
|
+
- name: Deploy
|
|
33
|
+
uses: twentyhq/twenty/.github/actions/deploy-twenty-app@main
|
|
34
|
+
with:
|
|
35
|
+
api-url: ${{ env.TWENTY_DEPLOY_URL }}
|
|
36
|
+
api-key: ${{ secrets.TWENTY_DEPLOY_API_KEY }}
|
|
37
|
+
|
|
38
|
+
- name: Install
|
|
39
|
+
uses: twentyhq/twenty/.github/actions/install-twenty-app@main
|
|
40
|
+
with:
|
|
41
|
+
api-url: ${{ env.TWENTY_DEPLOY_URL }}
|
|
42
|
+
api-key: ${{ secrets.TWENTY_DEPLOY_API_KEY }}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request: {}
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
env:
|
|
13
|
+
TWENTY_VERSION: latest
|
|
14
|
+
|
|
15
|
+
concurrency:
|
|
16
|
+
group: ci-${{ github.ref }}
|
|
17
|
+
cancel-in-progress: true
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
test:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
steps:
|
|
23
|
+
- name: Checkout
|
|
24
|
+
uses: actions/checkout@v4
|
|
25
|
+
|
|
26
|
+
- name: Spawn Twenty test instance
|
|
27
|
+
id: twenty
|
|
28
|
+
uses: twentyhq/twenty/.github/actions/spawn-twenty-app-dev-test@main
|
|
29
|
+
with:
|
|
30
|
+
twenty-version: ${{ env.TWENTY_VERSION }}
|
|
31
|
+
|
|
32
|
+
- name: Enable Corepack
|
|
33
|
+
run: corepack enable
|
|
34
|
+
|
|
35
|
+
- name: Setup Node.js
|
|
36
|
+
uses: actions/setup-node@v4
|
|
37
|
+
with:
|
|
38
|
+
node-version-file: '.nvmrc'
|
|
39
|
+
cache: yarn
|
|
40
|
+
|
|
41
|
+
- name: Install dependencies
|
|
42
|
+
run: yarn install --immutable
|
|
43
|
+
|
|
44
|
+
- name: Run integration tests
|
|
45
|
+
run: yarn test
|
|
46
|
+
env:
|
|
47
|
+
TWENTY_API_URL: ${{ steps.twenty.outputs.server-url }}
|
|
48
|
+
TWENTY_API_KEY: ${{ steps.twenty.outputs.api-key }}
|
|
@@ -3,43 +3,51 @@ import * as os from 'os';
|
|
|
3
3
|
import * as path from 'path';
|
|
4
4
|
import { beforeAll } from 'vitest';
|
|
5
5
|
|
|
6
|
-
const
|
|
7
|
-
const
|
|
6
|
+
const CONFIG_DIR = path.join(os.homedir(), '.twenty');
|
|
7
|
+
const CONFIG_PATH = path.join(CONFIG_DIR, 'config.test.json');
|
|
8
|
+
|
|
9
|
+
beforeAll(async () => {
|
|
10
|
+
const apiUrl = process.env.TWENTY_API_URL!;
|
|
11
|
+
const token = process.env.TWENTY_API_KEY!;
|
|
12
|
+
|
|
13
|
+
if (!apiUrl || !token) {
|
|
14
|
+
throw new Error(
|
|
15
|
+
'TWENTY_API_URL and TWENTY_API_KEY must be set.\n' +
|
|
16
|
+
'Start a local server: yarn twenty server start\n' +
|
|
17
|
+
'Or set them in vitest env config.',
|
|
18
|
+
);
|
|
19
|
+
}
|
|
8
20
|
|
|
9
|
-
const assertServerIsReachable = async () => {
|
|
10
21
|
let response: Response;
|
|
11
22
|
|
|
12
23
|
try {
|
|
13
|
-
response = await fetch(`${
|
|
24
|
+
response = await fetch(`${apiUrl}/healthz`);
|
|
14
25
|
} catch {
|
|
15
26
|
throw new Error(
|
|
16
|
-
`Twenty server is not reachable at ${
|
|
27
|
+
`Twenty server is not reachable at ${apiUrl}. ` +
|
|
17
28
|
'Make sure the server is running before executing integration tests.',
|
|
18
29
|
);
|
|
19
30
|
}
|
|
20
31
|
|
|
21
32
|
if (!response.ok) {
|
|
22
|
-
throw new Error(`Server at ${
|
|
33
|
+
throw new Error(`Server at ${apiUrl} returned ${response.status}`);
|
|
23
34
|
}
|
|
24
|
-
};
|
|
25
35
|
|
|
26
|
-
|
|
27
|
-
await assertServerIsReachable();
|
|
28
|
-
|
|
29
|
-
fs.mkdirSync(TEST_CONFIG_DIR, { recursive: true });
|
|
30
|
-
|
|
31
|
-
const configFile = {
|
|
32
|
-
remotes: {
|
|
33
|
-
local: {
|
|
34
|
-
apiUrl: process.env.TWENTY_API_URL,
|
|
35
|
-
apiKey: process.env.TWENTY_API_KEY,
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
defaultRemote: 'local',
|
|
39
|
-
};
|
|
36
|
+
fs.mkdirSync(CONFIG_DIR, { recursive: true });
|
|
40
37
|
|
|
41
38
|
fs.writeFileSync(
|
|
42
|
-
|
|
43
|
-
JSON.stringify(
|
|
39
|
+
CONFIG_PATH,
|
|
40
|
+
JSON.stringify(
|
|
41
|
+
{
|
|
42
|
+
remotes: {
|
|
43
|
+
local: { apiUrl, apiKey: token },
|
|
44
|
+
},
|
|
45
|
+
defaultRemote: 'local',
|
|
46
|
+
},
|
|
47
|
+
null,
|
|
48
|
+
2,
|
|
49
|
+
),
|
|
44
50
|
);
|
|
51
|
+
|
|
52
|
+
process.env.TWENTY_APP_ACCESS_TOKEN ??= token;
|
|
45
53
|
});
|
|
@@ -14,8 +14,11 @@ export default defineConfig({
|
|
|
14
14
|
include: ['src/**/*.integration-test.ts'],
|
|
15
15
|
setupFiles: ['src/__tests__/setup-test.ts'],
|
|
16
16
|
env: {
|
|
17
|
+
TWENTY_API_URL: process.env.TWENTY_API_URL ?? 'http://localhost:2020',
|
|
17
18
|
TWENTY_API_KEY:
|
|
18
|
-
|
|
19
|
+
process.env.TWENTY_API_KEY ??
|
|
20
|
+
// Tim Apple (admin) access token for twenty-app-dev
|
|
21
|
+
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIyMDIwMjAyMC05ZTNiLTQ2ZDQtYTU1Ni04OGI5ZGRjMmIwMzQiLCJ1c2VySWQiOiIyMDIwMjAyMC05ZTNiLTQ2ZDQtYTU1Ni04OGI5ZGRjMmIwMzQiLCJ3b3Jrc3BhY2VJZCI6IjIwMjAyMDIwLTFjMjUtNGQwMi1iZjI1LTZhZWNjZjdlYTQxOSIsIndvcmtzcGFjZU1lbWJlcklkIjoiMjAyMDIwMjAtMDY4Ny00YzQxLWI3MDctZWQxYmZjYTk3MmE3IiwidXNlcldvcmtzcGFjZUlkIjoiMjAyMDIwMjAtOWUzYi00NmQ0LWE1NTYtODhiOWRkYzJiMDM1IiwidHlwZSI6IkFDQ0VTUyIsImF1dGhQcm92aWRlciI6InBhc3N3b3JkIiwiaWF0IjoxNzUxMjgxNzA0LCJleHAiOjQ5MDQ4ODE3MDR9.9S4wc0MOr5iczsomlFxZdOHD1IRDS4dnRSwNVNpctF4',
|
|
19
22
|
},
|
|
20
23
|
},
|
|
21
24
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-twenty-app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Command-line interface to create Twenty application",
|
|
5
5
|
"main": "dist/cli.cjs",
|
|
6
6
|
"bin": "dist/cli.cjs",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"lodash.camelcase": "^4.3.0",
|
|
37
37
|
"lodash.kebabcase": "^4.1.1",
|
|
38
38
|
"lodash.startcase": "^4.4.0",
|
|
39
|
-
"twenty-sdk": "0.
|
|
39
|
+
"twenty-sdk": "0.9.0",
|
|
40
40
|
"uuid": "^13.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|