@novu/framework 2.8.0 → 2.9.0-nightly.20251202.474f9cfa96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/cjs/{index-DMh2JJ5c.d.cts → index-S0QKfWxm.d.cts} +13 -2
  2. package/dist/cjs/index.cjs +33 -33
  3. package/dist/cjs/index.d.cts +1 -1
  4. package/dist/cjs/servers/express.cjs +32 -32
  5. package/dist/cjs/servers/express.d.cts +2 -2
  6. package/dist/cjs/servers/h3.cjs +28 -28
  7. package/dist/cjs/servers/h3.d.cts +2 -2
  8. package/dist/cjs/servers/lambda.cjs +56 -56
  9. package/dist/cjs/servers/lambda.d.cts +2 -2
  10. package/dist/cjs/servers/nest.cjs +63 -63
  11. package/dist/cjs/servers/nest.d.cts +2 -2
  12. package/dist/cjs/servers/next.cjs +30 -30
  13. package/dist/cjs/servers/next.d.cts +2 -2
  14. package/dist/cjs/servers/nuxt.cjs +28 -28
  15. package/dist/cjs/servers/nuxt.d.cts +2 -2
  16. package/dist/cjs/servers/remix.cjs +32 -32
  17. package/dist/cjs/servers/remix.d.cts +2 -2
  18. package/dist/cjs/servers/sveltekit.cjs +28 -28
  19. package/dist/cjs/servers/sveltekit.d.cts +2 -2
  20. package/dist/esm/{chunk-BEJRLOTZ.js → chunk-3VXCWACY.js} +55 -55
  21. package/dist/esm/{index-DnpUToB5.d.ts → index-CmEcpAEO.d.ts} +13 -2
  22. package/dist/esm/index.d.ts +1 -1
  23. package/dist/esm/index.js +1 -1
  24. package/dist/esm/servers/express.d.ts +2 -2
  25. package/dist/esm/servers/express.js +1 -1
  26. package/dist/esm/servers/h3.d.ts +2 -2
  27. package/dist/esm/servers/h3.js +1 -1
  28. package/dist/esm/servers/lambda.d.ts +2 -2
  29. package/dist/esm/servers/lambda.js +1 -1
  30. package/dist/esm/servers/nest.d.ts +2 -2
  31. package/dist/esm/servers/nest.js +1 -1
  32. package/dist/esm/servers/next.d.ts +2 -2
  33. package/dist/esm/servers/next.js +1 -1
  34. package/dist/esm/servers/nuxt.d.ts +2 -2
  35. package/dist/esm/servers/nuxt.js +1 -1
  36. package/dist/esm/servers/remix.d.ts +2 -2
  37. package/dist/esm/servers/remix.js +1 -1
  38. package/dist/esm/servers/sveltekit.d.ts +2 -2
  39. package/dist/esm/servers/sveltekit.js +1 -1
  40. package/package.json +1 -1
@@ -1,14 +1,14 @@
1
- "use strict";var Zs=Object.create;var Lt=Object.defineProperty;var Cr=Object.getOwnPropertyDescriptor;var ea=Object.getOwnPropertyNames;var ta=Object.getPrototypeOf,na=Object.prototype.hasOwnProperty;var ia=(d,n)=>{for(var o in n)Lt(d,o,{get:n[o],enumerable:!0})},Mr=(d,n,o,l)=>{if(n&&typeof n=="object"||typeof n=="function")for(let g of ea(n))!na.call(d,g)&&g!==o&&Lt(d,g,{get:()=>n[g],enumerable:!(l=Cr(n,g))||l.enumerable});return d};var st=(d,n,o)=>(o=d!=null?Zs(ta(d)):{},Mr(n||!d||!d.__esModule?Lt(o,"default",{value:d,enumerable:!0}):o,d)),ra=d=>Mr(Lt({},"__esModule",{value:!0}),d),Ke=(d,n,o,l)=>{for(var g=l>1?void 0:l?Cr(n,o):n,N=d.length-1,M;N>=0;N--)(M=d[N])&&(g=(l?M(n,o,g):M(g))||g);return l&&g&&Lt(n,o,g),g},ze=(d,n)=>(o,l)=>n(o,l,d);var rl={};ia(rl,{Client:()=>vt,CronExpression:()=>bi,NOVU_OPTIONS:()=>Pt,NovuClient:()=>Ge,NovuController:()=>Ye,NovuHandler:()=>Je,NovuModule:()=>Jt,NovuRequestHandler:()=>Et,REGISTER_API_PATH:()=>Ei,SeverityLevelEnum:()=>Gn,frameworkName:()=>jo,providerSchemas:()=>Vn,registerApiPath:()=>zn,workflow:()=>Uo});module.exports=ra(rl);var so=require("jsonrepair");var Dt=(l=>(l.TRIGGER="trigger",l.EXECUTE="execute",l.PREVIEW="preview",l))(Dt||{}),rn=(l=>(l.DISCOVER="discover",l.HEALTH_CHECK="health-check",l.CODE="code",l))(rn||{});var bi=(F=>(F.EVERY_SECOND="* * * * * *",F.EVERY_5_SECONDS="*/5 * * * * *",F.EVERY_10_SECONDS="*/10 * * * * *",F.EVERY_30_SECONDS="*/30 * * * * *",F.EVERY_MINUTE="*/1 * * * *",F.EVERY_5_MINUTES="0 */5 * * * *",F.EVERY_10_MINUTES="0 */10 * * * *",F.EVERY_30_MINUTES="0 */30 * * * *",F.EVERY_HOUR="0 0-23/1 * * *",F.EVERY_2_HOURS="0 0-23/2 * * *",F.EVERY_3_HOURS="0 0-23/3 * * *",F.EVERY_4_HOURS="0 0-23/4 * * *",F.EVERY_5_HOURS="0 0-23/5 * * *",F.EVERY_6_HOURS="0 0-23/6 * * *",F.EVERY_7_HOURS="0 0-23/7 * * *",F.EVERY_8_HOURS="0 0-23/8 * * *",F.EVERY_9_HOURS="0 0-23/9 * * *",F.EVERY_10_HOURS="0 0-23/10 * * *",F.EVERY_11_HOURS="0 0-23/11 * * *",F.EVERY_12_HOURS="0 0-23/12 * * *",F.EVERY_DAY_AT_1AM="0 01 * * *",F.EVERY_DAY_AT_2AM="0 02 * * *",F.EVERY_DAY_AT_3AM="0 03 * * *",F.EVERY_DAY_AT_4AM="0 04 * * *",F.EVERY_DAY_AT_5AM="0 05 * * *",F.EVERY_DAY_AT_6AM="0 06 * * *",F.EVERY_DAY_AT_7AM="0 07 * * *",F.EVERY_DAY_AT_8AM="0 08 * * *",F.EVERY_DAY_AT_9AM="0 09 * * *",F.EVERY_DAY_AT_10AM="0 10 * * *",F.EVERY_DAY_AT_11AM="0 11 * * *",F.EVERY_DAY_AT_NOON="0 12 * * *",F.EVERY_DAY_AT_1PM="0 13 * * *",F.EVERY_DAY_AT_2PM="0 14 * * *",F.EVERY_DAY_AT_3PM="0 15 * * *",F.EVERY_DAY_AT_4PM="0 16 * * *",F.EVERY_DAY_AT_5PM="0 17 * * *",F.EVERY_DAY_AT_6PM="0 18 * * *",F.EVERY_DAY_AT_7PM="0 19 * * *",F.EVERY_DAY_AT_8PM="0 20 * * *",F.EVERY_DAY_AT_9PM="0 21 * * *",F.EVERY_DAY_AT_10PM="0 22 * * *",F.EVERY_DAY_AT_11PM="0 23 * * *",F.EVERY_DAY_AT_MIDNIGHT="0 0 * * *",F.EVERY_WEEK="0 0 * * 0",F.EVERY_WEEKDAY="0 0 * * 1-5",F.EVERY_WEEKEND="0 0 * * 6,0",F.EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT="0 0 1 * *",F.EVERY_1ST_DAY_OF_MONTH_AT_NOON="0 12 1 * *",F.EVERY_2ND_HOUR="0 */2 * * *",F.EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM="0 1-23/2 * * *",F.EVERY_2ND_MONTH="0 0 1 */2 *",F.EVERY_QUARTER="0 0 1 */3 *",F.EVERY_6_MONTHS="0 0 1 */6 *",F.EVERY_YEAR="0 0 1 0 *",F.EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM="0 */30 9-17 * * *",F.EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM="0 */30 9-18 * * *",F.EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM="0 */30 10-19 * * *",F.MONDAY_TO_FRIDAY_AT_1AM="0 0 01 * * 1-5",F.MONDAY_TO_FRIDAY_AT_2AM="0 0 02 * * 1-5",F.MONDAY_TO_FRIDAY_AT_3AM="0 0 03 * * 1-5",F.MONDAY_TO_FRIDAY_AT_4AM="0 0 04 * * 1-5",F.MONDAY_TO_FRIDAY_AT_5AM="0 0 05 * * 1-5",F.MONDAY_TO_FRIDAY_AT_6AM="0 0 06 * * 1-5",F.MONDAY_TO_FRIDAY_AT_7AM="0 0 07 * * 1-5",F.MONDAY_TO_FRIDAY_AT_8AM="0 0 08 * * 1-5",F.MONDAY_TO_FRIDAY_AT_9AM="0 0 09 * * 1-5",F.MONDAY_TO_FRIDAY_AT_09_30AM="0 30 09 * * 1-5",F.MONDAY_TO_FRIDAY_AT_10AM="0 0 10 * * 1-5",F.MONDAY_TO_FRIDAY_AT_11AM="0 0 11 * * 1-5",F.MONDAY_TO_FRIDAY_AT_11_30AM="0 30 11 * * 1-5",F.MONDAY_TO_FRIDAY_AT_12PM="0 0 12 * * 1-5",F.MONDAY_TO_FRIDAY_AT_1PM="0 0 13 * * 1-5",F.MONDAY_TO_FRIDAY_AT_2PM="0 0 14 * * 1-5",F.MONDAY_TO_FRIDAY_AT_3PM="0 0 15 * * 1-5",F.MONDAY_TO_FRIDAY_AT_4PM="0 0 16 * * 1-5",F.MONDAY_TO_FRIDAY_AT_5PM="0 0 17 * * 1-5",F.MONDAY_TO_FRIDAY_AT_6PM="0 0 18 * * 1-5",F.MONDAY_TO_FRIDAY_AT_7PM="0 0 19 * * 1-5",F.MONDAY_TO_FRIDAY_AT_8PM="0 0 20 * * 1-5",F.MONDAY_TO_FRIDAY_AT_9PM="0 0 21 * * 1-5",F.MONDAY_TO_FRIDAY_AT_10PM="0 0 22 * * 1-5",F.MONDAY_TO_FRIDAY_AT_11PM="0 0 23 * * 1-5",F))(bi||{});var qe=(ce=>(ce.BRIDGE_ERROR="BridgeError",ce.EXECUTION_EVENT_CONTROL_INVALID_ERROR="ExecutionEventControlInvalidError",ce.EXECUTION_EVENT_PAYLOAD_INVALID_ERROR="ExecutionEventPayloadInvalidError",ce.EXECUTION_PROVIDER_OUTPUT_INVALID_ERROR="ExecutionProviderOutputInvalidError",ce.EXECUTION_STATE_CONTROL_INVALID_ERROR="ExecutionStateControlInvalidError",ce.EXECUTION_STATE_CORRUPT_ERROR="ExecutionStateCorruptError",ce.EXECUTION_STATE_OUTPUT_INVALID_ERROR="ExecutionStateOutputInvalidError",ce.EXECUTION_STATE_RESULT_INVALID_ERROR="ExecutionStateResultInvalidError",ce.INVALID_ACTION_ERROR="InvalidActionError",ce.METHOD_NOT_ALLOWED_ERROR="MethodNotAllowedError",ce.MISSING_DEPENDENCY_ERROR="MissingDependencyError",ce.MISSING_SECRET_KEY_ERROR="MissingSecretKeyError",ce.PROVIDER_EXECUTION_FAILED_ERROR="ProviderExecutionFailedError",ce.PROVIDER_NOT_FOUND_ERROR="ProviderNotFoundError",ce.SIGNATURE_EXPIRED_ERROR="SignatureExpiredError",ce.SIGNATURE_INVALID_ERROR="SignatureInvalidError",ce.SIGNATURE_MISMATCH_ERROR="SignatureMismatchError",ce.SIGNATURE_NOT_FOUND_ERROR="SignatureNotFoundError",ce.SIGNATURE_VERSION_INVALID_ERROR="SignatureVersionInvalidError",ce.SIGNING_KEY_NOT_FOUND_ERROR="SigningKeyNotFoundError",ce.STEP_ALREADY_EXISTS_ERROR="StepAlreadyExistsError",ce.STEP_CONTROL_COMPILATION_FAILED_ERROR="StepControlCompilationFailedError",ce.STEP_EXECUTION_FAILED_ERROR="StepExecutionFailedError",ce.STEP_NOT_FOUND_ERROR="StepNotFoundError",ce.WORKFLOW_ALREADY_EXISTS_ERROR="WorkflowAlreadyExistsError",ce.WORKFLOW_NOT_FOUND_ERROR="WorkflowNotFoundError",ce.WORKFLOW_PAYLOAD_INVALID_ERROR="WorkflowPayloadInvalidError",ce))(qe||{});var on=(l=>(l.POST="POST",l.GET="GET",l.OPTIONS="OPTIONS",l))(on||{});var oa=d=>{var o,l;if(typeof d!="object"||d===null)return!1;let n=Object.getPrototypeOf(d);return(l=(o=n==null?void 0:n.constructor)==null?void 0:o.name.endsWith("Error"))!=null?l:!1},at=class extends Error{},sn=class extends at{constructor(){super(...arguments);this.statusCode=404}},Fe=class extends at{constructor(){super(...arguments);this.statusCode=400}},ut=class extends at{constructor(){super(...arguments);this.statusCode=401}},dt=class extends at{constructor(n,{cause:o}={}){var l;oa(o)?(super(`${n}: ${o.message}`),this.data={stack:(l=o.stack)!=null?l:n}):(super(`${n}${o?`: ${JSON.stringify(o,null,2)}`:""}`),this.data={stack:n})}},an=class extends at{constructor(){super(...arguments);this.statusCode=409}};var Tt=class extends dt{constructor(o){super("Unknown BridgeError",{cause:o});this.statusCode=500;this.code="BridgeError"}};var ln=class extends Fe{constructor(o,l){super(`Workflow with id: \`${o}\` has a corrupt state. Step with id: \`${l}\` does not exist. Please provide the missing state.`);this.code="ExecutionStateCorruptError";this.data={workflowId:o,stepId:l}}},Ft=class extends Fe{constructor(o,l){super(`Workflow with id: \`${o}\` has invalid \`payload\`. Please provide the correct event payload.`);this.code="ExecutionEventPayloadInvalidError";this.data=l}},cn=class extends Fe{constructor(o,l){super(`Workflow with id: \`${o}\` has invalid \`controls\`. Please provide the correct event controls.`);this.code="ExecutionEventControlInvalidError";this.data=l}},pn=class extends Fe{constructor(o,l,g){super(`Workflow with id: \`${o}\` has an invalid state. Step with id: \`${l}\` has invalid \`controls\`. Please provide the correct step controls.`);this.code="ExecutionStateControlInvalidError";this.data=g}},un=class extends Fe{constructor(o,l,g){super(`Workflow with id: \`${o}\` has an invalid state. Step with id: \`${l}\` has invalid output. Please provide the correct step output.`);this.code="ExecutionStateOutputInvalidError";this.data=g}},dn=class extends Fe{constructor(o,l,g){super(`Workflow with id: \`${o}\` has an invalid state. Step with id: \`${l}\` has invalid result. Please provide the correct step result.`);this.code="ExecutionStateResultInvalidError";this.data=g}},fn=class extends Fe{constructor(o,l,g){super(`Workflow with id: \`${o}\` has invalid controls syntax in step with id: \`${l}\`. Please correct step control syntax.`);this.code="StepControlCompilationFailedError";this.data=g}},hn=class extends Fe{constructor(o,l,g,N){super(`Workflow with id: \`${o}\` has an invalid state. Step with id: \`${l}\` and provider with id: \`${g}\` has invalid output. Please provide the correct provider output.`);this.code="ExecutionProviderOutputInvalidError";this.data=N}},mn=class extends Fe{constructor(o,l){super(`Workflow with id: \`${o}\` has invalid \`payload\`. Please provide the correct payload.`);this.code="WorkflowPayloadInvalidError";this.data=l}};var ht=d=>Object.values(qe).includes(d==null?void 0:d.code),Lr=d=>!ht(d)&&typeof d.statusCode=="number"&&d.statusCode>=400&&d.statusCode<500;var Ti=d=>Object.values(d).map(n=>`\`${n}\``).join(", "),yn=d=>d.replaceAll(/(\w)(\w*)/g,(n,o,l)=>o.toUpperCase()+l.toLowerCase()).replaceAll(/[\s-]+/g,"");var gn=class extends at{constructor(){super(...arguments);this.code="MethodNotAllowedError";this.statusCode=405;this.message=`Method not allowed. Please use one of ${Ti(on)}`}},$t=class extends Fe{constructor(o,l){super(`Invalid query string: \`action\`=\`${o}\`. Please use one of ${Ti(l)}`);this.code="InvalidActionError"}},wn=class extends Fe{constructor(){super("Missing secret key. Set the `NOVU_SECRET_KEY` environment variable or pass `secretKey` to the client options.");this.code="MissingSecretKeyError"}};var Sn=class extends Error{constructor(n,o,l){super(),this.data={message:l},this.statusCode=n,this.code=o}};var jt=class extends an{constructor(n,o){super(`${yn(n)} with id: \`${o}\` already exists. Please use a different id.`)}},ft=class extends sn{constructor(n,o){super(`${yn(n)} with id: \`${o}\` does not exist. Please provide a valid id.`)}},Ot=class extends dt{constructor(o,l,g,N){super(`Failed to ${g} ${yn(o)} with id: \`${l}\``,{cause:N});this.statusCode=502}};var bn=class extends ft{constructor(o){super("provider",o);this.code="ProviderNotFoundError"}},Tn=class extends Ot{constructor(o,l,g){super("provider",o,l,g);this.code="ProviderExecutionFailedError"}};var On=class extends ut{constructor(){super("Signature does not match the expected signature. Please ensure the signature provided in the `novu-signature` header is correct and try again.");this.code="SignatureMismatchError"}},An=class extends ut{constructor(){super("Signature not found. Please provide a signature in the `novu-signature` header");this.code="SignatureNotFoundError"}},vn=class extends ut{constructor(){super("Signature is invalid. Please provide a valid signature in the `novu-signature` header");this.code="SignatureInvalidError"}},En=class extends ut{constructor(){super(`Signature expired. Please provide a signature with a timestamp no older than ${5} minutes in the \`novu-signature\` header`);this.code="SignatureExpiredError"}},_n=class extends ut{constructor(){super("Signature key not found. Please provide a valid key in the Client constructor `config.secretKey`");this.code="SigningKeyNotFoundError"}};var Rn=class extends ft{constructor(o){super("step",o);this.code="StepNotFoundError"}},Pn=class extends jt{constructor(o){super("step",o);this.code="StepAlreadyExistsError"}},Yt=class extends Ot{constructor(o,l,g){super("step",o,l,g);this.code="StepExecutionFailedError"}};var Wt=class extends ft{constructor(o){super("workflow",o);this.code="WorkflowNotFoundError"}};var xn=(()=>{var d=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,l=Object.prototype.hasOwnProperty,g=(e,t)=>function(){return e&&(t=(0,e[o(e)[0]])(e=0)),t},N=(e,t)=>function(){return t||(0,e[o(e)[0]])((t={exports:{}}).exports,t),t.exports},M=(e,t)=>{for(var i in t)d(e,i,{get:t[i],enumerable:!0})},z=(e,t,i,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let p of o(t))!l.call(e,p)&&p!==i&&d(e,p,{get:()=>t[p],enumerable:!(c=n(t,p))||c.enumerable});return e},ie=e=>z(d({},"__esModule",{value:!0}),e),Ae={};M(Ae,{JSONSchemaFaker:()=>Nr,default:()=>kr,setDependencies:()=>Ji});function Ne(e,t){return typeof e=="string"?typeof t!="undefined"?It.register(e,t):It.get(e):It.registerMany(e)}function ke(e,t){return e=typeof e=="undefined"?tt.MIN_INTEGER:e,t=typeof t=="undefined"?tt.MAX_INTEGER:t,Math.floor(te("random")()*(t-e+1))+e}function Se(e){return zt.default.prototype.max=te("defaultRandExpMax"),zt.default.prototype.randInt=(i,c)=>i+Math.floor(te("random")()*(1+(c-i))),new zt.default(e).gen()}function Ce(e){return e[Math.floor(te("random")()*e.length)]}function $e(e){let t,i,c=e.length,p=e.slice();for(;c>0;)i=Math.floor(te("random")()*c),c-=1,t=p[c],p[c]=p[i],p[i]=t;return p}function ct(e,t){return te("random")()*(t-e)+e}function Ze(e,t,i,c,p=!1){return i=typeof i=="undefined"?tt.MIN_NUMBER:i,c=typeof c=="undefined"?tt.MAX_NUMBER:c,e=typeof e=="undefined"?i:e,t=typeof t=="undefined"?c:t,t<e&&(t+=e),p?ct(e,t):ke(e,t)}function Gt(e){switch(e){case"seconds":return Ze(0,60)*60;case"minutes":return Ze(15,50)*612;case"hours":return Ze(12,72)*36123;case"days":return Ze(7,30)*86412345;case"weeks":return Ze(4,52)*604812345;case"months":return Ze(2,13)*2592012345;case"years":return Ze(1,20)*31104012345;default:break}}function Xn(e){if(e)return Gt(e);let t=te("minDateTime"),i=te("maxDateTime");typeof t=="string"&&(t=new Date(t)),typeof i=="string"&&(i=new Date(i));let c=new Date().getTime();return typeof t=="number"&&(t=new Date(c+t)),typeof i=="number"&&(i=new Date(c+i)),new Date(ct(t.getTime(),i.getTime()))}function _i(e,t,i){if(t=decodeURIComponent(t),i&&i[t])return ce(i[t]);let c=t.replace("#/","/").split("/"),p=e.$ref&&i&&i[e.$ref]||e;for(!p&&!c[0]&&(c[0]=e.$ref.split("#/")[0]),i&&t.includes("#/")&&i[c[0]]&&(p=i[c.shift()]),c[0]||c.shift();p&&c.length>0;){let h=c.shift();if(!p[h])throw new Error(`Prop not found: ${h} (${t})`);p=p[h]}return p}function Ht(e){return typeof e=="string"&&nr.test(e)}function et(e){return["number","boolean"].includes(typeof e)}function He(e,...t){return t.filter(i=>typeof e[i]!="undefined").length>0}function Ri(e){if(e.includes(" "))return new Date(e).toISOString().substr(0,10);let[t,i,c]=e.split("T")[0].split("-");return i=`0${Math.max(1,Math.min(12,i))}`.slice(-2),c=`0${Math.max(1,Math.min(31,c))}`.slice(-2),`${t}-${i}-${c}`}function qo(e){if(e.includes(" "))return new Date(e).toISOString().substr(0,10);let[t,i]=e.split("T"),[c,p,h]=t.split("-"),[f,O,U]=i.substr(0,8).split(":");return p=`0${Math.max(1,Math.min(12,p))}`.slice(-2),h=`0${Math.max(1,Math.min(31,h))}`.slice(-2),f=`0${Math.max(1,Math.min(23,f))}`.slice(-2),O=`0${Math.max(1,Math.min(59,O))}`.slice(-2),U=`0${Math.max(1,Math.min(59,U))}`.slice(-2),`${c}-${p}-${h}T${f}:${O}:${U}.000Z`}function Bo(e,t,i){let c={};switch(e||t.type){case"integer":case"number":if(typeof t.minimum!="undefined"&&(c.minimum=t.minimum),typeof t.maximum!="undefined"&&(c.maximum=t.maximum),t.enum){let h=Math.max(c.minimum||0,0),f=Math.min(c.maximum||1/0,1/0);t.exclusiveMinimum&&h===t.minimum&&(h+=t.multipleOf||1),t.exclusiveMaximum&&f===t.maximum&&(f-=t.multipleOf||1),(h||f!==1/0)&&(t.enum=t.enum.filter(O=>O>=h&&O<=f))}break;case"string":{c.minLength=te("minLength")||0,c.maxLength=te("maxLength")||Number.MAX_SAFE_INTEGER,typeof t.minLength!="undefined"&&(c.minLength=Math.max(c.minLength,t.minLength)),typeof t.maxLength!="undefined"&&(c.maxLength=Math.min(c.maxLength,t.maxLength));break}default:break}let p=i(c);if(p==null)return null;switch(e||t.type){case"number":p=Ht(p)?parseFloat(p):p;break;case"integer":p=Ht(p)?parseInt(p,10):p;break;case"boolean":p=!!p;break;case"string":{if(et(p))return p;p=String(p);let h=Math.max(c.minLength||0,0),f=Math.min(c.maxLength||1/0,1/0),O,U=0;for(;p.length<h;)if(O=p,t.pattern?p+=Z.randexp(t.pattern):p+=`${Z.pick([" ","/","_","-","+","=","@","^"])}${p}`,p===O){if(U+=1,U===3)break}else U=0;switch(p.length>f&&(p=p.substr(0,f)),t.format){case"date-time":case"datetime":p=new Date(qo(p)).toISOString().replace(/([0-9])0+Z$/,"$1Z");break;case"full-date":case"date":p=new Date(Ri(p)).toISOString().substr(0,10);break;case"time":p=new Date(`1969-01-01 ${p}`).toISOString().substr(11);break;default:break}break}default:break}return p}function wt(e,t){return Object.keys(t).forEach(i=>{typeof t[i]!="object"||t[i]===null?e[i]=t[i]:Array.isArray(t[i])?(e[i]=e[i]||[],t[i].forEach((c,p)=>{e.type==="array"&&t.type==="array"?e[i][p]=wt(e[i][p]||{},c,!0):Array.isArray(e[i])&&e[i].indexOf(c)===-1&&e[i].push(c)})):typeof e[i]!="object"||e[i]===null||Array.isArray(e[i])?e[i]=wt({},t[i]):e[i]=wt(e[i],t[i])}),e}function ce(e,t=new Map){if(!e||typeof e!="object")return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){let c=[];return t.set(e,c),c.push(...e.map(p=>ce(p,t))),c}let i={};return t.set(e,i),Object.keys(e).reduce((c,p)=>(c[p]=ce(e[p],t),c),i)}function Jo(e){let t=JSON.stringify(e),i=JSON.stringify(e,null,2);return t.length>400?`${i.substr(0,400)}...`:i}function Pi(){return Z.pick([!1,!0,null,-1,NaN,Math.PI,1/0,void 0,[],{},Math.random(),Math.random().toString(36).substr(2)])}function Go(e,t){if(e.enum)return e.enum.includes(t);if(e.const)return e.const===t}function Ho(e,t){let i=wt({},t);if(typeof e.minimum!="undefined"&&(i.maximum=e.minimum,i.exclusiveMaximum=!0),typeof e.maximum!="undefined"&&(i.minimum=e.maximum>i.maximum?0:e.maximum,i.exclusiveMinimum=!0),typeof e.minLength!="undefined"&&(i.maxLength=e.minLength),typeof e.maxLength!="undefined"&&(i.minLength=e.maxLength>i.maxLength?0:e.maxLength),e.type)i.type=Z.pick(tt.SCALAR_TYPES.filter(c=>(Array.isArray(e.type)?e.type:[e.type]).every(h=>c==="number"||c==="integer"?h!=="number"&&h!=="integer":c!==h)));else if(e.enum){let c;do c=Pi();while(e.enum.indexOf(c)!==-1);i.enum=[c]}return e.required&&i.properties&&e.required.forEach(c=>{delete i.properties[c]}),i}function Qn(e,t){let i=t.minimum!==void 0,c=t.maximum!==void 0;return(i||c)&&(!i||e>=t.minimum)&&(!c||e<=t.maximum)}function Ko(e,t){return!t.every(i=>Qn(e,i))}function zo(e,t){return t.reduce((c,p)=>c+(Qn(e,p)?1:0),0)===1}function Xo(e){return["enum","const","default","examples","required","definitions","items","properties"].includes(e)}function Qo(e,t){return Object.keys(e).filter(i=>!t.includes(i)).reduce((i,c)=>(Array.isArray(e[c])?i[c]=e[c].slice():i[c]=e[c]instanceof Object?wt({},e[c]):e[c],i),{})}function xi(e,t){return Array.isArray(e)?e.map(i=>xi(i,t)):(typeof e=="string"&&(e=e.replace(/#\{([\w.-]+)\}/g,(i,c)=>t[c])),e)}function Zn(e){return Object.prototype.toString.call(e)==="[object Object]"&&!Object.keys(e).length}function Ii(e,t){t=t.items||t;let i=te("alwaysFakeOptionals"),c=Array.isArray(t.required)&&t.required.includes(e)||i,p=typeof t.thunk=="function"||t.additionalProperties&&typeof t.additionalProperties.thunk=="function";return!c&&!p}function ei(e,t,i=!1){if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(c=>ei(c,t,!0)).filter(c=>typeof c!="undefined");if(Object.keys(e).forEach(c=>{if(Zn(e[c]))Ii(c,t)&&delete e[c];else{let p=t;t&&t.properties&&t.properties[c]&&(p=t.properties[c]);let h=ei(e[c],p);Zn(h)||(e[c]=h)}typeof e[c]=="undefined"&&delete e[c]}),!(!Object.keys(e).length&&i))return e}function Zo(e){return(t,i,c,p)=>{let h=t,f=[];typeof t=="object"&&(h=Object.keys(t)[0],Array.isArray(t[h])?f=t[h]:f.push(t[h]));let O=h.split("."),U=e();for(;O.length>1;)U=U[O.shift()];return t=typeof U=="object"?U[O[0]]:U,typeof t=="function"&&(t=t.apply(U,f.map(T=>de.template(T,p)))),Object.prototype.toString.call(t)==="[object Object]"&&Object.keys(t).forEach(T=>{if(typeof t[T]=="function")throw new Error(`Cannot resolve value for '${c}: ${h}', given: ${t}`)}),t}}function es(e,t){if(typeof e=="undefined")return bt.list();if(typeof e=="string")if(typeof t=="function")bt.register(e,t);else if(t===null||t===!1)bt.unregister(e);else return bt.get(e);else bt.registerMany(e)}function ts(e,t,i){return Object.keys(e).filter(c=>{let p=sr.indexOf(t)>-1;return i.indexOf(c)>-1&&!p}).length>0}function ns(e,t){let i=Object.keys(Nt);for(let c=0;c<i.length;c+=1){let p=i[c],h=t[t.length-1];if(ts(e,h,Nt[p]))return p}}function is(){return te("random")()>.5}function rs(){return null}function os(e,t,i,c,p,h){let f=[],O=[];function U($){let E=JSON.stringify($.value);return O.indexOf(E)===-1?(O.push(E),f.push($),!0):!1}t.forEach(U);let T=100;for(;f.length!==t.length&&(U(h(i.items||c,e,p))||(T-=1),!!T););return f}function ss(e,t,i,c){let p=[];if(!(e.items||e.additionalItems)){if(de.hasProperties(e,"minItems","maxItems","uniqueItems")&&(e.minItems!==0||e.maxItems!==0))throw new Xt(`missing items for ${de.short(e)}`,t);return p}if(Array.isArray(e.items))return e.items.map((W,ae)=>{let Q=t.concat(["items",ae]);return c(W,Q,i)});let h=e.minItems,f=e.maxItems,O=te("minItems"),U=te("maxItems");O&&(h=typeof h=="undefined"?O:Math.min(O,h)),U&&(f=typeof f=="undefined"?U:Math.min(U,f),f&&f>U&&(f=U),h&&h>U&&(h=f));let T=te("alwaysFakeOptionals")===!0?1:te("optionalsProbability"),$=te("alwaysFakeOptionals")||te("fixedProbabilities")||!1,E=Z.number(h,f,1,5);T!==null&&(E=Math.max($?Math.round((f||E)*T):Math.abs(Z.number(h,f)*T),h||0));let J=typeof e.additionalItems=="object"?e.additionalItems:{};for(let W=p.length;W<E;W+=1){let ae=t.concat(["items",W]),Q=c(e.items||J,ae,i);p.push(Q)}if(e.contains&&E>0){let W=Z.number(0,E-1);p[W]=c(e.contains,t.concat(["items",W]),i)}return e.uniqueItems?os(t.concat(["items"]),p,e,J,i,c):p}function as(e){let t=typeof e.minimum=="undefined"||e.minimum===-Number.MAX_VALUE?tt.MIN_INTEGER:e.minimum,i=typeof e.maximum=="undefined"||e.maximum===Number.MAX_VALUE?tt.MAX_INTEGER:e.maximum,c=e.multipleOf,p=c&&String(c).match(/e-(\d)|\.(\d+)$/);if(p){let h=(Math.random()*Z.number(0,10)+1)*c,f=p[1]||p[2].length,O=parseFloat(h.toFixed(f)),U=Z.number(t,i-1);return String(O).includes(".")?U+O:(U+O).toExponential()}if(c&&(i=Math.floor(i/c)*c,t=Math.ceil(t/c)*c),e.exclusiveMinimum&&t===e.minimum&&(t+=c||1),e.exclusiveMaximum&&i===e.maximum&&(i-=c||1),t>i)return NaN;if(c){let h=Z.number(Math.floor(t/c),Math.floor(i/c))*c;for(;h<t;)h+=c;return h}return Z.number(t,i,void 0,void 0,e.type!=="integer")}function ls(e){return Math.floor(mi({...e}))}function cs(e){return Z.shuffle(yr).slice(0,e)}function ps(e,t,i,c){let p={},h=e.properties||{},f=e.patternProperties||{},O=typeof e.required=="boolean"?[]:(e.required||[]).slice(),U=e.additionalProperties!==!1,T=Object.keys(h),$=Object.keys(f),E=T.concat($).reduce((Y,m)=>(O.indexOf(m)===-1&&Y.push(m),Y),[]),J=O.concat(E),W=U&&e.additionalProperties===!0?Zt:e.additionalProperties;if(!U&&T.length===0&&$.length===0&&de.hasProperties(e,"minProperties","maxProperties","dependencies","required"))return null;if(te("requiredOnly")===!0)return O.forEach(Y=>{h[Y]&&(p[Y]=h[Y])}),c(p,t.concat(["properties"]),i,e);let ae=te("alwaysFakeOptionals")===!0?1:te("optionalsProbability"),Q=te("alwaysFakeOptionals")||te("fixedProbabilities")||!1,ne=te("ignoreProperties")||[],he=te("reuseProperties"),ye=te("fillProperties"),j=e.maxProperties||J.length+(U?Z.number(1,5):0),S=Math.max(e.minProperties||0,O.length),b=Math.max(0,J.length-S);J.length===1&&!O.length&&(S=Math.max(Z.number(ye?1:0,j),S)),ae!==null&&(Q===!0?b=Math.round(S-O.length+ae*(J.length-S)):b=Z.number(S-O.length,ae*(J.length-S)));let R=Z.shuffle(E).slice(0,b),x=E.filter(Y=>R.indexOf(Y)!==-1),L=ae!==null||O.length===j?j:Z.number(0,j),_=O.concat(Z.shuffle(x).slice(0,L)).slice(0,j),I=[],C=[];if(e.dependencies&&(Object.keys(e.dependencies).forEach(Y=>{let m=e.dependencies[Y];if(_.indexOf(Y)!==-1)if(Array.isArray(m))m.forEach(k=>{_.indexOf(k)===-1&&_.push(k)});else if(Array.isArray(m.oneOf||m.anyOf)){let k=m.oneOf||m.anyOf;C.push({prop:Y,values:k})}else I.push(m)}),I.length))return delete e.dependencies,c({allOf:I.concat(e)},t.concat(["properties"]),i,e);let V=[],G=[];_.forEach(Y=>{if(h[Y]&&["{}","true"].includes(JSON.stringify(h[Y].not)))return;for(let k=0;k<ne.length;k+=1)if(ne[k]instanceof RegExp&&ne[k].test(Y)||typeof ne[k]=="string"&&ne[k]===Y||typeof ne[k]=="function"&&ne[k](h[Y],Y)){V.push(Y);return}W===!1&&O.indexOf(Y)!==-1&&(p[Y]=h[Y]),h[Y]&&(p[Y]=h[Y]);let m;if($.forEach(k=>{Y.match(new RegExp(k))&&(m=!0,p[Y]?de.merge(p[Y],f[k]):p[Z.randexp(Y)]=f[k])}),!m){let k=f[Y]||W;k&&W!==!1?p[f[Y]?Z.randexp(Y):Y]=h[Y]||k:G.push(Y)}});let ee=Object.keys(p).length+(ye?0:V.length),Oe=Y=>Z.randexp(`_?[_a-f\\d]{1,3}${Y?"\\$?":""}`);function ve(Y){let m;do{if(!Y.length)break;m=Y.shift()}while(p[m]);return m}let _e=S;if(U&&!O.length&&(_e=Math.max(ae===null||W?Z.number(ye?1:0,j):0,S)),!x.length&&!b&&U&&Q===!0&&ye){let Y=Z.number(0,j);for(let m=0;m<Y;m+=1)p[Qt(1)+Oe(Y[m])]=W||Zt}for(;ye&&!(!($.length||U)||ee>=_e);){if(U)if(he&&T.length-ee>_e){let Y=0,m;do{if(Y+=1,Y>1e3)break;m=ve(O)||Z.pick(T)}while(typeof p[m]!="undefined");typeof p[m]=="undefined"&&(p[m]=h[m],ee+=1)}else if($.length&&!W){let Y=Z.pick($),m=Z.randexp(Y);p[m]||(p[m]=f[Y],ee+=1)}else{let Y=ve(O)||Qt(1)+Oe();p[Y]||(p[Y]=W||Zt,ee+=1)}for(let Y=0;ee<S&&Y<$.length;Y+=1){let m=$[Y],k=Z.randexp(m);p[k]||(p[k]=f[m],ee+=1)}}if(O.length===0&&(!U||ae===!1)){let Y=Z.number(S,j);for(;ee<Y;){let m=ve(T);m&&(p[m]=h[m]),ee+=1}}let Pe=p;if(te("sortProperties")!==null){let Y=Object.keys(h);Pe=Object.keys(p).sort((k,H)=>te("sortProperties")?k.localeCompare(H):Y.indexOf(k)-Y.indexOf(H)).reduce((k,H)=>(k[H]=p[H],k),{})}let Me=c(Pe,t.concat(["properties"]),i,e);return C.forEach(Y=>{for(let m of Y.values)if(de.hasValue(m.properties[Y.prop],Me.value[Y.prop])){Object.keys(m.properties).forEach(k=>{k!==Y.prop&&de.merge(Me.value,c(m.properties,t.concat(["properties"]),i,e).value)});break}}),Me}function Ni(){let e=Z.number(1,5);return Qt(e).join(" ")}function us(e=0,t=140){let i=Math.max(0,e),c=Z.number(i,t),p=Ni();for(;p.length<i;)p+=Ni();return p.length>c&&(p=p.substr(0,c)),p}function ds(){return[0,0,0,0].map(()=>Z.number(0,255)).join(".")}function fs(){return Z.date().toISOString()}function hs(){return en().slice(0,10)}function ms(){return en().slice(11)}function ys(e){return Z.randexp(We[e]).replace(Or,(t,i)=>Z.randexp(We[i]))}function gs(e,t){let i=hi(e.format);if(typeof i=="function")return i(e);switch(e.format){case"date-time":case"datetime":return en();case"date":return Sr();case"time":return br();case"ipv4":return wr();case"regex":return".+?";case"email":case"hostname":case"ipv6":case"uri":case"uri-reference":case"iri":case"iri-reference":case"idn-email":case"idn-hostname":case"json-pointer":case"slug":case"uri-template":case"uuid":case"duration":return Ar(e.format);default:if(typeof i=="undefined"){if(te("failOnInvalidFormat"))throw new Error(`unknown registry key ${de.short(e.format)}`);return t()}throw new Error(`unsupported format '${e.format}'`)}}function ws(e){return de.typecast("string",e,i=>e.format?gs(e,()=>yi(i.minLength,i.maxLength)):e.pattern?Z.randexp(e.pattern):yi(i.minLength,i.maxLength))}function Ss({$comment:e,title:t,description:i}){return Object.entries({comment:e,title:t,description:i}).filter(([,c])=>c).reduce((c,[p,h])=>(c[p]=h,c),{})}function St(e,t,i,c){if(e=i(e,null,t),e&&(e.oneOf||e.anyOf||e.allOf)&&(e=i(e,null,t)),!e)throw new Error(`Cannot traverse at '${t.join(".")}', given '${JSON.stringify(c)}'`);let p={...Ss(e),schemaPath:t};if(t[t.length-1]!=="properties"){if(te("useExamplesValue")&&Array.isArray(e.examples)){let T=e.examples.concat("default"in e?[e.default]:[]);return{value:de.typecast(null,e,()=>Z.pick(T)),context:p}}if(te("useExamplesValue")&&typeof e.example!="undefined")return{value:de.typecast(null,e,()=>e.example),context:p};if(te("useDefaultValue")&&"default"in e&&(e.default!==""||!te("replaceEmptyByRandomValue")))return{value:e.default,context:p};if("template"in e)return{value:de.template(e.template,c),context:p};if("const"in e)return{value:e.const,context:p}}if(e.not&&typeof e.not=="object"&&(e=de.notValue(e.not,de.omitProps(e,["not"])),e.type&&e.type==="object")){let{value:T,context:$}=St(e,t.concat(["not"]),i,c);return{value:de.clean(T,e,!1),context:{...p,items:$}}}if(typeof e.thunk=="function"){let{value:T,context:$}=St(e.thunk(c),t,i);return{value:T,context:{...p,items:$}}}if(e.jsonPath)return{value:e,context:p};let h=e.type;if(Array.isArray(h)?h=Z.pick(h):typeof h=="undefined"&&(h=ar(e,t)||h,h&&(e.type=h)),typeof e.generate=="function"){let T=de.typecast(null,e,()=>e.generate(c,t)),$=T===null?"null":typeof T;if($===h||$==="number"&&h==="integer"||Array.isArray(T)&&h==="array")return{value:T,context:p}}if(typeof e.pattern=="string")return{value:de.typecast("string",e,()=>Z.randexp(e.pattern)),context:p};if(Array.isArray(e.enum))return{value:de.typecast(null,e,()=>Z.pick(e.enum)),context:p};if(typeof h=="string")if(kt[h])try{let T=kt[h](e,t,i,St);return h==="array"?{value:T.map(({value:$})=>$),context:{...p,items:T.map(Array.isArray(e.items)?({context:$})=>$:({context:$})=>({...$,schemaPath:$.schemaPath.slice(0,-1)}))}}:h==="object"?T!==null?{value:T.value,context:{...p,items:T.context}}:{value:{},context:p}:{value:T,context:p}}catch(T){throw typeof T.path=="undefined"?new Xt(T.stack,t):T}else{if(te("failOnInvalidTypes"))throw new Xt(`unknown primitive ${de.short(h)}`,t.concat(["type"]));{let T=te("defaultInvalidTypeProduct");return typeof T=="string"&&kt[T]?{value:kt[T](e,t,i,St),context:p}:{value:T,context:p}}}let f={},O={...p};Array.isArray(e)&&(f=[]);let U=te("pruneProperties")||[];return Object.keys(e).forEach(T=>{if(!U.includes(T)&&e[T]!==null)if(typeof e[T]=="object"&&T!=="definitions"){let{value:$,context:E}=St(e[T],t.concat([T]),i,f);f[T]=de.clean($,e[T],!1),O[T]=E,f[T]===null&&te("omitNulls")&&(delete f[T],delete O[T])}else f[T]=e[T]}),{value:f,context:O}}function bs(e){return Array.isArray(e)?Z.pick(e):e}function Ts(e,t){if(!Array.isArray(e))return e;let i=t?e.pop():e.shift();return t?e.unshift(i):e.push(i),i}function ti(e,t,i,c){if(!e||typeof e!="object")return e;if(i||(i={}),t||(t=e),Array.isArray(e))return e.map(p=>ti(p,t,i,c));if(e.jsonPath){let{JSONPath:p}=ci(),h=typeof e.jsonPath!="object"?{path:e.jsonPath}:e.jsonPath;h.group=e.group||h.group||c,h.cycle=e.cycle||h.cycle||!1,h.reverse=e.reverse||h.reverse||!1,h.count=e.count||h.count||1;let f=`${h.group}__${h.path}`;return i[f]||(h.count>1?i[f]=p(h.path,t).slice(0,h.count):i[f]=p(h.path,t)),h.cycle||h.reverse?Ts(i[f],h.reverse):bs(i[f])}return Object.keys(e).forEach(p=>{e[p]=ti(e[p],t,i,p)}),e}function Os(e,t,i,c){if(Object.prototype.toString.call(t)!=="[object Object]")throw new Error(`Invalid input, expecting object but given ${typeof t}`);let p=te("refDepthMin")||0,h=te("refDepthMax")||3;try{let{resolveSchema:f}=Pr({refs:e,schema:t,container:i,synchronous:c,refDepthMin:p,refDepthMax:h}),O=_r(de.clone(t),[],f);return te("resolveJsonPath")?{value:ti(O.value),context:O.context}:O}catch(f){throw f.path?new Error(`${f.message} in /${f.path.join("/")}`):f}}function As(e){return e.value}function vs(e,t){return t.reduce((i,c)=>c in i?i[c]:{},e)}function ni(e,t,i,c=i){let{title:p,description:h,comment:f}=vs(e,t),O=[];te("renderTitle")&&p&&O.push(` ${p}`,""),te("renderDescription")&&h&&O.push(` ${h}`),te("renderComment")&&f&&O.push(` ${f}`),i.commentBefore=O.join(`
2
- `),c instanceof xr?c.items.forEach(U=>{ni(e,[...t,"items",U.key.value],U.key,U.value)}):c instanceof Ir&&c.items.forEach((U,T)=>{ni(e,[...t,"items",T],U)})}function Es({value:e,context:t}){let i=Ct.createNode(e);ni(t,[],i);let c=new Ct.Document;return c.contents=i,c.toString()}function ki(){it.define("autoIncrement",function(t,i){if(!this.offset){let c=i.minimum||1,p=c+tt.MAX_NUMBER,h=t.initialOffset||i.initialOffset;this.offset=h||Z.number(c,p)}return t?this.offset++:i}),it.define("sequentialDate",function(t,i){if(this.now||(this.now=Z.date()),t){if(i=this.now.toISOString(),t=t===!0?"days":t,["seconds","minutes","hours","days","weeks","months","years"].indexOf(t)===-1)throw new Error(`Unsupported increment by ${de.short(t)}`);this.now.setTime(this.now.getTime()+Z.date(t))}return i})}function Ci(e,t){let i={};Array.isArray(e)?e.forEach(p=>{i[p.$id||p.id]=p}):i=e||{};function c(p){if(!p||typeof p!="object")return;if(Array.isArray(p))return p.forEach(c);let h=p.$id||p.id;typeof h=="string"&&!i[h]&&(i[h]=p),Object.keys(p).forEach(f=>{c(p[f])})}return c(e),c(t),i}var Mi,ii,Li,ri,Di,Ui,je,Fi,oi,F,si,$i,ji,Yi,Wi,Vi,xt,Kt,ai,qi,Bi,li,ci,Ji,Gi,pi,ue,ui,Hi,Ki,It,te,di,fi,zi,Xi,Qi,Zi,er,tr,tt,zt,Z,nr,de,ir,rr,bt,hi,or,Xt,Nt,sr,ar,lr,cr,pr,ur,dr,fr,hr,mi,mr,yr,Qt,Zt,gr,yi,wr,en,Sr,br,gi,tn,Tr,We,Or,Ar,vr,Er,kt,_r,Rr,Pr,wi,Si,De,_s,Rs,Ps,xs,Is,Ns,ks,Cs,Ms,Ls,Ds,Us,xr,Ir,Ct,it,Te,Nr,kr,Fs=g({"src/shared.js"(){Mi=Object.create,ii=Object.defineProperty,Li=Object.getOwnPropertyDescriptor,ri=Object.getOwnPropertyNames,Di=Object.getPrototypeOf,Ui=Object.prototype.hasOwnProperty,je=(e,t)=>function(){return t||(0,e[ri(e)[0]])((t={exports:{}}).exports,t),t.exports},Fi=(e,t,i,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let p of ri(t))!Ui.call(e,p)&&p!==i&&ii(e,p,{get:()=>t[p],enumerable:!(c=Li(t,p))||c.enumerable});return e},oi=(e,t,i)=>(i=e!=null?Mi(Di(e)):{},Fi(t||!e||!e.__esModule?ii(i,"default",{value:e,enumerable:!0}):i,e)),F=je({"node_modules/ret/lib/types.js"(e,t){t.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}}}),si=je({"node_modules/ret/lib/sets.js"(e){var t=F(),i=()=>[{type:t.RANGE,from:48,to:57}],c=()=>[{type:t.CHAR,value:95},{type:t.RANGE,from:97,to:122},{type:t.RANGE,from:65,to:90}].concat(i()),p=()=>[{type:t.CHAR,value:9},{type:t.CHAR,value:10},{type:t.CHAR,value:11},{type:t.CHAR,value:12},{type:t.CHAR,value:13},{type:t.CHAR,value:32},{type:t.CHAR,value:160},{type:t.CHAR,value:5760},{type:t.RANGE,from:8192,to:8202},{type:t.CHAR,value:8232},{type:t.CHAR,value:8233},{type:t.CHAR,value:8239},{type:t.CHAR,value:8287},{type:t.CHAR,value:12288},{type:t.CHAR,value:65279}],h=()=>[{type:t.CHAR,value:10},{type:t.CHAR,value:13},{type:t.CHAR,value:8232},{type:t.CHAR,value:8233}];e.words=()=>({type:t.SET,set:c(),not:!1}),e.notWords=()=>({type:t.SET,set:c(),not:!0}),e.ints=()=>({type:t.SET,set:i(),not:!1}),e.notInts=()=>({type:t.SET,set:i(),not:!0}),e.whitespace=()=>({type:t.SET,set:p(),not:!1}),e.notWhitespace=()=>({type:t.SET,set:p(),not:!0}),e.anyChar=()=>({type:t.SET,set:h(),not:!0})}}),$i=je({"node_modules/ret/lib/util.js"(e){var t=F(),i=si(),c="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",p={0:0,t:9,n:10,v:11,f:12,r:13};e.strToChars=h=>{var f=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return h=h.replace(f,(O,U,T,$,E,J,W,ae)=>{if(T)return O;var Q=U?8:$?parseInt($,16):E?parseInt(E,16):J?parseInt(J,8):W?c.indexOf(W):p[ae],ne=String.fromCharCode(Q);return/[[\]{}^$.|?*+()]/.test(ne)&&(ne="\\"+ne),ne}),h},e.tokenizeClass=(h,f)=>{for(var O=[],U=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,T,$;(T=U.exec(h))!=null;)if(T[1])O.push(i.words());else if(T[2])O.push(i.ints());else if(T[3])O.push(i.whitespace());else if(T[4])O.push(i.notWords());else if(T[5])O.push(i.notInts());else if(T[6])O.push(i.notWhitespace());else if(T[7])O.push({type:t.RANGE,from:(T[8]||T[9]).charCodeAt(0),to:T[10].charCodeAt(0)});else if($=T[12])O.push({type:t.CHAR,value:$.charCodeAt(0)});else return[O,U.lastIndex];e.error(f,"Unterminated character class")},e.error=(h,f)=>{throw new SyntaxError("Invalid regular expression: /"+h+"/: "+f)}}}),ji=je({"node_modules/ret/lib/positions.js"(e){var t=F();e.wordBoundary=()=>({type:t.POSITION,value:"b"}),e.nonWordBoundary=()=>({type:t.POSITION,value:"B"}),e.begin=()=>({type:t.POSITION,value:"^"}),e.end=()=>({type:t.POSITION,value:"$"})}}),Yi=je({"node_modules/ret/lib/index.js"(e,t){var i=$i(),c=F(),p=si(),h=ji();t.exports=f=>{var O=0,U,T,$={type:c.ROOT,stack:[]},E=$,J=$.stack,W=[],ae=x=>{i.error(f,`Nothing to repeat at column ${x-1}`)},Q=i.strToChars(f);for(U=Q.length;O<U;)switch(T=Q[O++],T){case"\\":switch(T=Q[O++],T){case"b":J.push(h.wordBoundary());break;case"B":J.push(h.nonWordBoundary());break;case"w":J.push(p.words());break;case"W":J.push(p.notWords());break;case"d":J.push(p.ints());break;case"D":J.push(p.notInts());break;case"s":J.push(p.whitespace());break;case"S":J.push(p.notWhitespace());break;default:/\d/.test(T)?J.push({type:c.REFERENCE,value:parseInt(T,10)}):J.push({type:c.CHAR,value:T.charCodeAt(0)})}break;case"^":J.push(h.begin());break;case"$":J.push(h.end());break;case"[":{var ne;Q[O]==="^"?(ne=!0,O++):ne=!1;var he=i.tokenizeClass(Q.slice(O),f);O+=he[1],J.push({type:c.SET,set:he[0],not:ne});break}case".":J.push(p.anyChar());break;case"(":{var ye={type:c.GROUP,stack:[],remember:!0};T=Q[O],T==="?"&&(T=Q[O+1],O+=2,T==="="?ye.followedBy=!0:T==="!"?ye.notFollowedBy=!0:T!==":"&&i.error(f,`Invalid group, character '${T}' after '?' at column ${O-1}`),ye.remember=!1),J.push(ye),W.push(E),E=ye,J=ye.stack;break}case")":W.length===0&&i.error(f,`Unmatched ) at column ${O-1}`),E=W.pop(),J=E.options?E.options[E.options.length-1]:E.stack;break;case"|":{E.options||(E.options=[E.stack],delete E.stack);var j=[];E.options.push(j),J=j;break}case"{":{var S=/^(\d+)(,(\d+)?)?\}/.exec(Q.slice(O)),b,R;S!==null?(J.length===0&&ae(O),b=parseInt(S[1],10),R=S[2]?S[3]?parseInt(S[3],10):1/0:b,O+=S[0].length,J.push({type:c.REPETITION,min:b,max:R,value:J.pop()})):J.push({type:c.CHAR,value:123});break}case"?":J.length===0&&ae(O),J.push({type:c.REPETITION,min:0,max:1,value:J.pop()});break;case"+":J.length===0&&ae(O),J.push({type:c.REPETITION,min:1,max:1/0,value:J.pop()});break;case"*":J.length===0&&ae(O),J.push({type:c.REPETITION,min:0,max:1/0,value:J.pop()});break;default:J.push({type:c.CHAR,value:T.charCodeAt(0)})}return W.length!==0&&i.error(f,"Unterminated group"),$},t.exports.types=c}}),Wi=je({"node_modules/drange/lib/index.js"(e,t){var i=class At{constructor(h,f){this.low=h,this.high=f,this.length=1+f-h}overlaps(h){return!(this.high<h.low||this.low>h.high)}touches(h){return!(this.high+1<h.low||this.low-1>h.high)}add(h){return new At(Math.min(this.low,h.low),Math.max(this.high,h.high))}subtract(h){return h.low<=this.low&&h.high>=this.high?[]:h.low>this.low&&h.high<this.high?[new At(this.low,h.low-1),new At(h.high+1,this.high)]:h.low<=this.low?[new At(h.high+1,this.high)]:[new At(this.low,h.low-1)]}toString(){return this.low==this.high?this.low.toString():this.low+"-"+this.high}},c=class Vt{constructor(h,f){this.ranges=[],this.length=0,h!=null&&this.add(h,f)}_update_length(){this.length=this.ranges.reduce((h,f)=>h+f.length,0)}add(h,f){var O=U=>{for(var T=0;T<this.ranges.length&&!U.touches(this.ranges[T]);)T++;for(var $=this.ranges.slice(0,T);T<this.ranges.length&&U.touches(this.ranges[T]);)U=U.add(this.ranges[T]),T++;$.push(U),this.ranges=$.concat(this.ranges.slice(T)),this._update_length()};return h instanceof Vt?h.ranges.forEach(O):(f==null&&(f=h),O(new i(h,f))),this}subtract(h,f){var O=U=>{for(var T=0;T<this.ranges.length&&!U.overlaps(this.ranges[T]);)T++;for(var $=this.ranges.slice(0,T);T<this.ranges.length&&U.overlaps(this.ranges[T]);)$=$.concat(this.ranges[T].subtract(U)),T++;this.ranges=$.concat(this.ranges.slice(T)),this._update_length()};return h instanceof Vt?h.ranges.forEach(O):(f==null&&(f=h),O(new i(h,f))),this}intersect(h,f){var O=[],U=T=>{for(var $=0;$<this.ranges.length&&!T.overlaps(this.ranges[$]);)$++;for(;$<this.ranges.length&&T.overlaps(this.ranges[$]);){var E=Math.max(this.ranges[$].low,T.low),J=Math.min(this.ranges[$].high,T.high);O.push(new i(E,J)),$++}};return h instanceof Vt?h.ranges.forEach(U):(f==null&&(f=h),U(new i(h,f))),this.ranges=O,this._update_length(),this}index(h){for(var f=0;f<this.ranges.length&&this.ranges[f].length<=h;)h-=this.ranges[f].length,f++;return this.ranges[f].low+h}toString(){return"[ "+this.ranges.join(", ")+" ]"}clone(){return new Vt(this)}numbers(){return this.ranges.reduce((h,f)=>{for(var O=f.low;O<=f.high;)h.push(O),O++;return h},[])}subranges(){return this.ranges.map(h=>({low:h.low,high:h.high,length:1+h.high-h.low}))}};t.exports=c}}),Vi=je({"node_modules/randexp/lib/randexp.js"(e,t){var i=Yi(),c=Wi(),p=i.types;t.exports=class qt{constructor(f,O){if(this._setDefaults(f),f instanceof RegExp)this.ignoreCase=f.ignoreCase,this.multiline=f.multiline,f=f.source;else if(typeof f=="string")this.ignoreCase=O&&O.indexOf("i")!==-1,this.multiline=O&&O.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=i(f)}_setDefaults(f){this.max=f.max!=null?f.max:qt.prototype.max!=null?qt.prototype.max:100,this.defaultRange=f.defaultRange?f.defaultRange:this.defaultRange.clone(),f.randInt&&(this.randInt=f.randInt)}gen(){return this._gen(this.tokens,[])}_gen(f,O){var U,T,$,E,J;switch(f.type){case p.ROOT:case p.GROUP:if(f.followedBy||f.notFollowedBy)return"";for(f.remember&&f.groupNumber===void 0&&(f.groupNumber=O.push(null)-1),U=f.options?this._randSelect(f.options):f.stack,T="",E=0,J=U.length;E<J;E++)T+=this._gen(U[E],O);return f.remember&&(O[f.groupNumber]=T),T;case p.POSITION:return"";case p.SET:{var W=this._expand(f);return W.length?String.fromCharCode(this._randSelect(W)):""}case p.REPETITION:for($=this.randInt(f.min,f.max===1/0?f.min+this.max:f.max),T="",E=0;E<$;E++)T+=this._gen(f.value,O);return T;case p.REFERENCE:return O[f.value-1]||"";case p.CHAR:{var ae=this.ignoreCase&&this._randBool()?this._toOtherCase(f.value):f.value;return String.fromCharCode(ae)}}}_toOtherCase(f){return f+(97<=f&&f<=122?-32:65<=f&&f<=90?32:0)}_randBool(){return!this.randInt(0,1)}_randSelect(f){return f instanceof c?f.index(this.randInt(0,f.length-1)):f[this.randInt(0,f.length-1)]}_expand(f){if(f.type===i.types.CHAR)return new c(f.value);if(f.type===i.types.RANGE)return new c(f.from,f.to);{let O=new c;for(let U=0;U<f.set.length;U++){let T=this._expand(f.set[U]);if(O.add(T),this.ignoreCase)for(let $=0;$<T.length;$++){let E=T.index($),J=this._toOtherCase(E);E!==J&&O.add(J)}}return f.not?this.defaultRange.clone().subtract(O):this.defaultRange.clone().intersect(O)}}randInt(f,O){return f+Math.floor(Math.random()*(1+O-f))}get defaultRange(){return this._range=this._range||new c(32,126)}set defaultRange(f){this._range=f}static randexp(f,O){var U;return typeof f=="string"&&(f=new RegExp(f,O)),f._randexp===void 0?(U=new qt(f,O),f._randexp=U):(U=f._randexp,U._setDefaults(f)),U.gen()}static sugar(){RegExp.prototype.gen=function(){return qt.randexp(this)}}}}}),xt=je({"node_modules/yaml/dist/PlainValue-ec8e588e.js"(e){var t={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},i={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},c="tag:yaml.org,2002:",p={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function h(j){let S=[0],b=j.indexOf(`
1
+ "use strict";var Zo=Object.create;var Lt=Object.defineProperty;var Mi=Object.getOwnPropertyDescriptor;var ea=Object.getOwnPropertyNames;var ta=Object.getPrototypeOf,na=Object.prototype.hasOwnProperty;var ra=(d,n)=>{for(var s in n)Lt(d,s,{get:n[s],enumerable:!0})},Ci=(d,n,s,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let g of ea(n))!na.call(d,g)&&g!==s&&Lt(d,g,{get:()=>n[g],enumerable:!(a=Mi(n,g))||a.enumerable});return d};var ot=(d,n,s)=>(s=d!=null?Zo(ta(d)):{},Ci(n||!d||!d.__esModule?Lt(s,"default",{value:d,enumerable:!0}):s,d)),ia=d=>Ci(Lt({},"__esModule",{value:!0}),d),Ke=(d,n,s,a)=>{for(var g=a>1?void 0:a?Mi(n,s):n,N=d.length-1,C;N>=0;N--)(C=d[N])&&(g=(a?C(n,s,g):C(g))||g);return a&&g&&Lt(n,s,g),g},ze=(d,n)=>(s,a)=>n(s,a,d);var sl={};ra(sl,{Client:()=>vt,CronExpression:()=>br,NOVU_OPTIONS:()=>Pt,NovuClient:()=>Ge,NovuController:()=>Ye,NovuHandler:()=>Je,NovuModule:()=>Jt,NovuRequestHandler:()=>Et,REGISTER_API_PATH:()=>Er,SeverityLevelEnum:()=>Gn,frameworkName:()=>$s,providerSchemas:()=>Vn,registerApiPath:()=>zn,workflow:()=>Ds});module.exports=ia(sl);var os=require("jsonrepair");var Dt=(a=>(a.TRIGGER="trigger",a.EXECUTE="execute",a.PREVIEW="preview",a))(Dt||{}),rn=(a=>(a.DISCOVER="discover",a.HEALTH_CHECK="health-check",a.CODE="code",a))(rn||{});var br=(F=>(F.EVERY_SECOND="* * * * * *",F.EVERY_5_SECONDS="*/5 * * * * *",F.EVERY_10_SECONDS="*/10 * * * * *",F.EVERY_30_SECONDS="*/30 * * * * *",F.EVERY_MINUTE="*/1 * * * *",F.EVERY_5_MINUTES="0 */5 * * * *",F.EVERY_10_MINUTES="0 */10 * * * *",F.EVERY_30_MINUTES="0 */30 * * * *",F.EVERY_HOUR="0 0-23/1 * * *",F.EVERY_2_HOURS="0 0-23/2 * * *",F.EVERY_3_HOURS="0 0-23/3 * * *",F.EVERY_4_HOURS="0 0-23/4 * * *",F.EVERY_5_HOURS="0 0-23/5 * * *",F.EVERY_6_HOURS="0 0-23/6 * * *",F.EVERY_7_HOURS="0 0-23/7 * * *",F.EVERY_8_HOURS="0 0-23/8 * * *",F.EVERY_9_HOURS="0 0-23/9 * * *",F.EVERY_10_HOURS="0 0-23/10 * * *",F.EVERY_11_HOURS="0 0-23/11 * * *",F.EVERY_12_HOURS="0 0-23/12 * * *",F.EVERY_DAY_AT_1AM="0 01 * * *",F.EVERY_DAY_AT_2AM="0 02 * * *",F.EVERY_DAY_AT_3AM="0 03 * * *",F.EVERY_DAY_AT_4AM="0 04 * * *",F.EVERY_DAY_AT_5AM="0 05 * * *",F.EVERY_DAY_AT_6AM="0 06 * * *",F.EVERY_DAY_AT_7AM="0 07 * * *",F.EVERY_DAY_AT_8AM="0 08 * * *",F.EVERY_DAY_AT_9AM="0 09 * * *",F.EVERY_DAY_AT_10AM="0 10 * * *",F.EVERY_DAY_AT_11AM="0 11 * * *",F.EVERY_DAY_AT_NOON="0 12 * * *",F.EVERY_DAY_AT_1PM="0 13 * * *",F.EVERY_DAY_AT_2PM="0 14 * * *",F.EVERY_DAY_AT_3PM="0 15 * * *",F.EVERY_DAY_AT_4PM="0 16 * * *",F.EVERY_DAY_AT_5PM="0 17 * * *",F.EVERY_DAY_AT_6PM="0 18 * * *",F.EVERY_DAY_AT_7PM="0 19 * * *",F.EVERY_DAY_AT_8PM="0 20 * * *",F.EVERY_DAY_AT_9PM="0 21 * * *",F.EVERY_DAY_AT_10PM="0 22 * * *",F.EVERY_DAY_AT_11PM="0 23 * * *",F.EVERY_DAY_AT_MIDNIGHT="0 0 * * *",F.EVERY_WEEK="0 0 * * 0",F.EVERY_WEEKDAY="0 0 * * 1-5",F.EVERY_WEEKEND="0 0 * * 6,0",F.EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT="0 0 1 * *",F.EVERY_1ST_DAY_OF_MONTH_AT_NOON="0 12 1 * *",F.EVERY_2ND_HOUR="0 */2 * * *",F.EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM="0 1-23/2 * * *",F.EVERY_2ND_MONTH="0 0 1 */2 *",F.EVERY_QUARTER="0 0 1 */3 *",F.EVERY_6_MONTHS="0 0 1 */6 *",F.EVERY_YEAR="0 0 1 0 *",F.EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM="0 */30 9-17 * * *",F.EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM="0 */30 9-18 * * *",F.EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM="0 */30 10-19 * * *",F.MONDAY_TO_FRIDAY_AT_1AM="0 0 01 * * 1-5",F.MONDAY_TO_FRIDAY_AT_2AM="0 0 02 * * 1-5",F.MONDAY_TO_FRIDAY_AT_3AM="0 0 03 * * 1-5",F.MONDAY_TO_FRIDAY_AT_4AM="0 0 04 * * 1-5",F.MONDAY_TO_FRIDAY_AT_5AM="0 0 05 * * 1-5",F.MONDAY_TO_FRIDAY_AT_6AM="0 0 06 * * 1-5",F.MONDAY_TO_FRIDAY_AT_7AM="0 0 07 * * 1-5",F.MONDAY_TO_FRIDAY_AT_8AM="0 0 08 * * 1-5",F.MONDAY_TO_FRIDAY_AT_9AM="0 0 09 * * 1-5",F.MONDAY_TO_FRIDAY_AT_09_30AM="0 30 09 * * 1-5",F.MONDAY_TO_FRIDAY_AT_10AM="0 0 10 * * 1-5",F.MONDAY_TO_FRIDAY_AT_11AM="0 0 11 * * 1-5",F.MONDAY_TO_FRIDAY_AT_11_30AM="0 30 11 * * 1-5",F.MONDAY_TO_FRIDAY_AT_12PM="0 0 12 * * 1-5",F.MONDAY_TO_FRIDAY_AT_1PM="0 0 13 * * 1-5",F.MONDAY_TO_FRIDAY_AT_2PM="0 0 14 * * 1-5",F.MONDAY_TO_FRIDAY_AT_3PM="0 0 15 * * 1-5",F.MONDAY_TO_FRIDAY_AT_4PM="0 0 16 * * 1-5",F.MONDAY_TO_FRIDAY_AT_5PM="0 0 17 * * 1-5",F.MONDAY_TO_FRIDAY_AT_6PM="0 0 18 * * 1-5",F.MONDAY_TO_FRIDAY_AT_7PM="0 0 19 * * 1-5",F.MONDAY_TO_FRIDAY_AT_8PM="0 0 20 * * 1-5",F.MONDAY_TO_FRIDAY_AT_9PM="0 0 21 * * 1-5",F.MONDAY_TO_FRIDAY_AT_10PM="0 0 22 * * 1-5",F.MONDAY_TO_FRIDAY_AT_11PM="0 0 23 * * 1-5",F))(br||{});var qe=(ce=>(ce.BRIDGE_ERROR="BridgeError",ce.EXECUTION_EVENT_CONTROL_INVALID_ERROR="ExecutionEventControlInvalidError",ce.EXECUTION_EVENT_PAYLOAD_INVALID_ERROR="ExecutionEventPayloadInvalidError",ce.EXECUTION_PROVIDER_OUTPUT_INVALID_ERROR="ExecutionProviderOutputInvalidError",ce.EXECUTION_STATE_CONTROL_INVALID_ERROR="ExecutionStateControlInvalidError",ce.EXECUTION_STATE_CORRUPT_ERROR="ExecutionStateCorruptError",ce.EXECUTION_STATE_OUTPUT_INVALID_ERROR="ExecutionStateOutputInvalidError",ce.EXECUTION_STATE_RESULT_INVALID_ERROR="ExecutionStateResultInvalidError",ce.INVALID_ACTION_ERROR="InvalidActionError",ce.METHOD_NOT_ALLOWED_ERROR="MethodNotAllowedError",ce.MISSING_DEPENDENCY_ERROR="MissingDependencyError",ce.MISSING_SECRET_KEY_ERROR="MissingSecretKeyError",ce.PROVIDER_EXECUTION_FAILED_ERROR="ProviderExecutionFailedError",ce.PROVIDER_NOT_FOUND_ERROR="ProviderNotFoundError",ce.SIGNATURE_EXPIRED_ERROR="SignatureExpiredError",ce.SIGNATURE_INVALID_ERROR="SignatureInvalidError",ce.SIGNATURE_MISMATCH_ERROR="SignatureMismatchError",ce.SIGNATURE_NOT_FOUND_ERROR="SignatureNotFoundError",ce.SIGNATURE_VERSION_INVALID_ERROR="SignatureVersionInvalidError",ce.SIGNING_KEY_NOT_FOUND_ERROR="SigningKeyNotFoundError",ce.STEP_ALREADY_EXISTS_ERROR="StepAlreadyExistsError",ce.STEP_CONTROL_COMPILATION_FAILED_ERROR="StepControlCompilationFailedError",ce.STEP_EXECUTION_FAILED_ERROR="StepExecutionFailedError",ce.STEP_NOT_FOUND_ERROR="StepNotFoundError",ce.WORKFLOW_ALREADY_EXISTS_ERROR="WorkflowAlreadyExistsError",ce.WORKFLOW_NOT_FOUND_ERROR="WorkflowNotFoundError",ce.WORKFLOW_PAYLOAD_INVALID_ERROR="WorkflowPayloadInvalidError",ce))(qe||{});var sn=(a=>(a.POST="POST",a.GET="GET",a.OPTIONS="OPTIONS",a))(sn||{});var sa=d=>{var s,a;if(typeof d!="object"||d===null)return!1;let n=Object.getPrototypeOf(d);return(a=(s=n==null?void 0:n.constructor)==null?void 0:s.name.endsWith("Error"))!=null?a:!1},at=class extends Error{},on=class extends at{constructor(){super(...arguments);this.statusCode=404}},Fe=class extends at{constructor(){super(...arguments);this.statusCode=400}},ut=class extends at{constructor(){super(...arguments);this.statusCode=401}},dt=class extends at{constructor(n,{cause:s}={}){var a;sa(s)?(super(`${n}: ${s.message}`),this.data={stack:(a=s.stack)!=null?a:n}):(super(`${n}${s?`: ${JSON.stringify(s,null,2)}`:""}`),this.data={stack:n})}},an=class extends at{constructor(){super(...arguments);this.statusCode=409}};var Tt=class extends dt{constructor(s){super("Unknown BridgeError",{cause:s});this.statusCode=500;this.code="BridgeError"}};var ln=class extends Fe{constructor(s,a){super(`Workflow with id: \`${s}\` has a corrupt state. Step with id: \`${a}\` does not exist. Please provide the missing state.`);this.code="ExecutionStateCorruptError";this.data={workflowId:s,stepId:a}}},Ft=class extends Fe{constructor(s,a){super(`Workflow with id: \`${s}\` has invalid \`payload\`. Please provide the correct event payload.`);this.code="ExecutionEventPayloadInvalidError";this.data=a}},cn=class extends Fe{constructor(s,a){super(`Workflow with id: \`${s}\` has invalid \`controls\`. Please provide the correct event controls.`);this.code="ExecutionEventControlInvalidError";this.data=a}},pn=class extends Fe{constructor(s,a,g){super(`Workflow with id: \`${s}\` has an invalid state. Step with id: \`${a}\` has invalid \`controls\`. Please provide the correct step controls.`);this.code="ExecutionStateControlInvalidError";this.data=g}},un=class extends Fe{constructor(s,a,g){super(`Workflow with id: \`${s}\` has an invalid state. Step with id: \`${a}\` has invalid output. Please provide the correct step output.`);this.code="ExecutionStateOutputInvalidError";this.data=g}},dn=class extends Fe{constructor(s,a,g){super(`Workflow with id: \`${s}\` has an invalid state. Step with id: \`${a}\` has invalid result. Please provide the correct step result.`);this.code="ExecutionStateResultInvalidError";this.data=g}},fn=class extends Fe{constructor(s,a,g){super(`Workflow with id: \`${s}\` has invalid controls syntax in step with id: \`${a}\`. Please correct step control syntax.`);this.code="StepControlCompilationFailedError";this.data=g}},hn=class extends Fe{constructor(s,a,g,N){super(`Workflow with id: \`${s}\` has an invalid state. Step with id: \`${a}\` and provider with id: \`${g}\` has invalid output. Please provide the correct provider output.`);this.code="ExecutionProviderOutputInvalidError";this.data=N}},mn=class extends Fe{constructor(s,a){super(`Workflow with id: \`${s}\` has invalid \`payload\`. Please provide the correct payload.`);this.code="WorkflowPayloadInvalidError";this.data=a}};var ht=d=>Object.values(qe).includes(d==null?void 0:d.code),Li=d=>!ht(d)&&typeof d.statusCode=="number"&&d.statusCode>=400&&d.statusCode<500;var Tr=d=>Object.values(d).map(n=>`\`${n}\``).join(", "),yn=d=>d.replaceAll(/(\w)(\w*)/g,(n,s,a)=>s.toUpperCase()+a.toLowerCase()).replaceAll(/[\s-]+/g,"");var gn=class extends at{constructor(){super(...arguments);this.code="MethodNotAllowedError";this.statusCode=405;this.message=`Method not allowed. Please use one of ${Tr(sn)}`}},$t=class extends Fe{constructor(s,a){super(`Invalid query string: \`action\`=\`${s}\`. Please use one of ${Tr(a)}`);this.code="InvalidActionError"}},wn=class extends Fe{constructor(){super("Missing secret key. Set the `NOVU_SECRET_KEY` environment variable or pass `secretKey` to the client options.");this.code="MissingSecretKeyError"}};var Sn=class extends Error{constructor(n,s,a){super(),this.data={message:a},this.statusCode=n,this.code=s}};var jt=class extends an{constructor(n,s){super(`${yn(n)} with id: \`${s}\` already exists. Please use a different id.`)}},ft=class extends on{constructor(n,s){super(`${yn(n)} with id: \`${s}\` does not exist. Please provide a valid id.`)}},Ot=class extends dt{constructor(s,a,g,N){super(`Failed to ${g} ${yn(s)} with id: \`${a}\``,{cause:N});this.statusCode=502}};var bn=class extends ft{constructor(s){super("provider",s);this.code="ProviderNotFoundError"}},Tn=class extends Ot{constructor(s,a,g){super("provider",s,a,g);this.code="ProviderExecutionFailedError"}};var On=class extends ut{constructor(){super("Signature does not match the expected signature. Please ensure the signature provided in the `novu-signature` header is correct and try again.");this.code="SignatureMismatchError"}},An=class extends ut{constructor(){super("Signature not found. Please provide a signature in the `novu-signature` header");this.code="SignatureNotFoundError"}},vn=class extends ut{constructor(){super("Signature is invalid. Please provide a valid signature in the `novu-signature` header");this.code="SignatureInvalidError"}},En=class extends ut{constructor(){super(`Signature expired. Please provide a signature with a timestamp no older than ${5} minutes in the \`novu-signature\` header`);this.code="SignatureExpiredError"}},_n=class extends ut{constructor(){super("Signature key not found. Please provide a valid key in the Client constructor `config.secretKey`");this.code="SigningKeyNotFoundError"}};var Rn=class extends ft{constructor(s){super("step",s);this.code="StepNotFoundError"}},Pn=class extends jt{constructor(s){super("step",s);this.code="StepAlreadyExistsError"}},Yt=class extends Ot{constructor(s,a,g){super("step",s,a,g);this.code="StepExecutionFailedError"}};var Wt=class extends ft{constructor(s){super("workflow",s);this.code="WorkflowNotFoundError"}};var xn=(()=>{var d=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,g=(e,t)=>function(){return e&&(t=(0,e[s(e)[0]])(e=0)),t},N=(e,t)=>function(){return t||(0,e[s(e)[0]])((t={exports:{}}).exports,t),t.exports},C=(e,t)=>{for(var r in t)d(e,r,{get:t[r],enumerable:!0})},z=(e,t,r,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let p of s(t))!a.call(e,p)&&p!==r&&d(e,p,{get:()=>t[p],enumerable:!(c=n(t,p))||c.enumerable});return e},re=e=>z(d({},"__esModule",{value:!0}),e),Se={};C(Se,{JSONSchemaFaker:()=>Ni,default:()=>ki,setDependencies:()=>Jr});function Ne(e,t){return typeof e=="string"?typeof t!="undefined"?It.register(e,t):It.get(e):It.registerMany(e)}function ke(e,t){return e=typeof e=="undefined"?tt.MIN_INTEGER:e,t=typeof t=="undefined"?tt.MAX_INTEGER:t,Math.floor(te("random")()*(t-e+1))+e}function be(e){return zt.default.prototype.max=te("defaultRandExpMax"),zt.default.prototype.randInt=(r,c)=>r+Math.floor(te("random")()*(1+(c-r))),new zt.default(e).gen()}function Me(e){return e[Math.floor(te("random")()*e.length)]}function $e(e){let t,r,c=e.length,p=e.slice();for(;c>0;)r=Math.floor(te("random")()*c),c-=1,t=p[c],p[c]=p[r],p[r]=t;return p}function ct(e,t){return te("random")()*(t-e)+e}function Ze(e,t,r,c,p=!1){return r=typeof r=="undefined"?tt.MIN_NUMBER:r,c=typeof c=="undefined"?tt.MAX_NUMBER:c,e=typeof e=="undefined"?r:e,t=typeof t=="undefined"?c:t,t<e&&(t+=e),p?ct(e,t):ke(e,t)}function Gt(e){switch(e){case"seconds":return Ze(0,60)*60;case"minutes":return Ze(15,50)*612;case"hours":return Ze(12,72)*36123;case"days":return Ze(7,30)*86412345;case"weeks":return Ze(4,52)*604812345;case"months":return Ze(2,13)*2592012345;case"years":return Ze(1,20)*31104012345;default:break}}function Xn(e){if(e)return Gt(e);let t=te("minDateTime"),r=te("maxDateTime");typeof t=="string"&&(t=new Date(t)),typeof r=="string"&&(r=new Date(r));let c=new Date().getTime();return typeof t=="number"&&(t=new Date(c+t)),typeof r=="number"&&(r=new Date(c+r)),new Date(ct(t.getTime(),r.getTime()))}function _r(e,t,r){if(t=decodeURIComponent(t),r&&r[t])return ce(r[t]);let c=t.replace("#/","/").split("/"),p=e.$ref&&r&&r[e.$ref]||e;for(!p&&!c[0]&&(c[0]=e.$ref.split("#/")[0]),r&&t.includes("#/")&&r[c[0]]&&(p=r[c.shift()]),c[0]||c.shift();p&&c.length>0;){let h=c.shift();if(!p[h])throw new Error(`Prop not found: ${h} (${t})`);p=p[h]}return p}function Ht(e){return typeof e=="string"&&ni.test(e)}function et(e){return["number","boolean"].includes(typeof e)}function He(e,...t){return t.filter(r=>typeof e[r]!="undefined").length>0}function Rr(e){if(e.includes(" "))return new Date(e).toISOString().substr(0,10);let[t,r,c]=e.split("T")[0].split("-");return r=`0${Math.max(1,Math.min(12,r))}`.slice(-2),c=`0${Math.max(1,Math.min(31,c))}`.slice(-2),`${t}-${r}-${c}`}function Vs(e){if(e.includes(" "))return new Date(e).toISOString().substr(0,10);let[t,r]=e.split("T"),[c,p,h]=t.split("-"),[f,O,U]=r.substr(0,8).split(":");return p=`0${Math.max(1,Math.min(12,p))}`.slice(-2),h=`0${Math.max(1,Math.min(31,h))}`.slice(-2),f=`0${Math.max(1,Math.min(23,f))}`.slice(-2),O=`0${Math.max(1,Math.min(59,O))}`.slice(-2),U=`0${Math.max(1,Math.min(59,U))}`.slice(-2),`${c}-${p}-${h}T${f}:${O}:${U}.000Z`}function qs(e,t,r){let c={};switch(e||t.type){case"integer":case"number":if(typeof t.minimum!="undefined"&&(c.minimum=t.minimum),typeof t.maximum!="undefined"&&(c.maximum=t.maximum),t.enum){let h=Math.max(c.minimum||0,0),f=Math.min(c.maximum||1/0,1/0);t.exclusiveMinimum&&h===t.minimum&&(h+=t.multipleOf||1),t.exclusiveMaximum&&f===t.maximum&&(f-=t.multipleOf||1),(h||f!==1/0)&&(t.enum=t.enum.filter(O=>O>=h&&O<=f))}break;case"string":{c.minLength=te("minLength")||0,c.maxLength=te("maxLength")||Number.MAX_SAFE_INTEGER,typeof t.minLength!="undefined"&&(c.minLength=Math.max(c.minLength,t.minLength)),typeof t.maxLength!="undefined"&&(c.maxLength=Math.min(c.maxLength,t.maxLength));break}default:break}let p=r(c);if(p==null)return null;switch(e||t.type){case"number":p=Ht(p)?parseFloat(p):p;break;case"integer":p=Ht(p)?parseInt(p,10):p;break;case"boolean":p=!!p;break;case"string":{if(et(p))return p;p=String(p);let h=Math.max(c.minLength||0,0),f=Math.min(c.maxLength||1/0,1/0),O,U=0;for(;p.length<h;)if(O=p,t.pattern?p+=Z.randexp(t.pattern):p+=`${Z.pick([" ","/","_","-","+","=","@","^"])}${p}`,p===O){if(U+=1,U===3)break}else U=0;switch(p.length>f&&(p=p.substr(0,f)),t.format){case"date-time":case"datetime":p=new Date(Vs(p)).toISOString().replace(/([0-9])0+Z$/,"$1Z");break;case"full-date":case"date":p=new Date(Rr(p)).toISOString().substr(0,10);break;case"time":p=new Date(`1969-01-01 ${p}`).toISOString().substr(11);break;default:break}break}default:break}return p}function wt(e,t){return Object.keys(t).forEach(r=>{typeof t[r]!="object"||t[r]===null?e[r]=t[r]:Array.isArray(t[r])?(e[r]=e[r]||[],t[r].forEach((c,p)=>{e.type==="array"&&t.type==="array"?e[r][p]=wt(e[r][p]||{},c,!0):Array.isArray(e[r])&&e[r].indexOf(c)===-1&&e[r].push(c)})):typeof e[r]!="object"||e[r]===null||Array.isArray(e[r])?e[r]=wt({},t[r]):e[r]=wt(e[r],t[r])}),e}function ce(e,t=new Map){if(!e||typeof e!="object")return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){let c=[];return t.set(e,c),c.push(...e.map(p=>ce(p,t))),c}let r={};return t.set(e,r),Object.keys(e).reduce((c,p)=>(c[p]=ce(e[p],t),c),r)}function Bs(e){let t=JSON.stringify(e),r=JSON.stringify(e,null,2);return t.length>400?`${r.substr(0,400)}...`:r}function Pr(){return Z.pick([!1,!0,null,-1,NaN,Math.PI,1/0,void 0,[],{},Math.random(),Math.random().toString(36).substr(2)])}function Js(e,t){if(e.enum)return e.enum.includes(t);if(e.const)return e.const===t}function Gs(e,t){let r=wt({},t);if(typeof e.minimum!="undefined"&&(r.maximum=e.minimum,r.exclusiveMaximum=!0),typeof e.maximum!="undefined"&&(r.minimum=e.maximum>r.maximum?0:e.maximum,r.exclusiveMinimum=!0),typeof e.minLength!="undefined"&&(r.maxLength=e.minLength),typeof e.maxLength!="undefined"&&(r.minLength=e.maxLength>r.maxLength?0:e.maxLength),e.type)r.type=Z.pick(tt.SCALAR_TYPES.filter(c=>(Array.isArray(e.type)?e.type:[e.type]).every(h=>c==="number"||c==="integer"?h!=="number"&&h!=="integer":c!==h)));else if(e.enum){let c;do c=Pr();while(e.enum.indexOf(c)!==-1);r.enum=[c]}return e.required&&r.properties&&e.required.forEach(c=>{delete r.properties[c]}),r}function Qn(e,t){let r=t.minimum!==void 0,c=t.maximum!==void 0;return(r||c)&&(!r||e>=t.minimum)&&(!c||e<=t.maximum)}function Hs(e,t){return!t.every(r=>Qn(e,r))}function Ks(e,t){return t.reduce((c,p)=>c+(Qn(e,p)?1:0),0)===1}function zs(e){return["enum","const","default","examples","required","definitions","items","properties"].includes(e)}function Xs(e,t){return Object.keys(e).filter(r=>!t.includes(r)).reduce((r,c)=>(Array.isArray(e[c])?r[c]=e[c].slice():r[c]=e[c]instanceof Object?wt({},e[c]):e[c],r),{})}function xr(e,t){return Array.isArray(e)?e.map(r=>xr(r,t)):(typeof e=="string"&&(e=e.replace(/#\{([\w.-]+)\}/g,(r,c)=>t[c])),e)}function Zn(e){return Object.prototype.toString.call(e)==="[object Object]"&&!Object.keys(e).length}function Ir(e,t){t=t.items||t;let r=te("alwaysFakeOptionals"),c=Array.isArray(t.required)&&t.required.includes(e)||r,p=typeof t.thunk=="function"||t.additionalProperties&&typeof t.additionalProperties.thunk=="function";return!c&&!p}function er(e,t,r=!1){if(!e||typeof e!="object")return e;if(Array.isArray(e))return e.map(c=>er(c,t,!0)).filter(c=>typeof c!="undefined");if(Object.keys(e).forEach(c=>{if(Zn(e[c]))Ir(c,t)&&delete e[c];else{let p=t;t&&t.properties&&t.properties[c]&&(p=t.properties[c]);let h=er(e[c],p);Zn(h)||(e[c]=h)}typeof e[c]=="undefined"&&delete e[c]}),!(!Object.keys(e).length&&r))return e}function Qs(e){return(t,r,c,p)=>{let h=t,f=[];typeof t=="object"&&(h=Object.keys(t)[0],Array.isArray(t[h])?f=t[h]:f.push(t[h]));let O=h.split("."),U=e();for(;O.length>1;)U=U[O.shift()];return t=typeof U=="object"?U[O[0]]:U,typeof t=="function"&&(t=t.apply(U,f.map(T=>de.template(T,p)))),Object.prototype.toString.call(t)==="[object Object]"&&Object.keys(t).forEach(T=>{if(typeof t[T]=="function")throw new Error(`Cannot resolve value for '${c}: ${h}', given: ${t}`)}),t}}function Zs(e,t){if(typeof e=="undefined")return bt.list();if(typeof e=="string")if(typeof t=="function")bt.register(e,t);else if(t===null||t===!1)bt.unregister(e);else return bt.get(e);else bt.registerMany(e)}function eo(e,t,r){return Object.keys(e).filter(c=>{let p=oi.indexOf(t)>-1;return r.indexOf(c)>-1&&!p}).length>0}function to(e,t){let r=Object.keys(Nt);for(let c=0;c<r.length;c+=1){let p=r[c],h=t[t.length-1];if(eo(e,h,Nt[p]))return p}}function no(){return te("random")()>.5}function ro(){return null}function io(e,t,r,c,p,h){let f=[],O=[];function U($){let E=JSON.stringify($.value);return O.indexOf(E)===-1?(O.push(E),f.push($),!0):!1}t.forEach(U);let T=100;for(;f.length!==t.length&&(U(h(r.items||c,e,p))||(T-=1),!!T););return f}function so(e,t,r,c){let p=[];if(!(e.items||e.additionalItems)){if(de.hasProperties(e,"minItems","maxItems","uniqueItems")&&(e.minItems!==0||e.maxItems!==0))throw new Xt(`missing items for ${de.short(e)}`,t);return p}if(Array.isArray(e.items))return e.items.map((W,ae)=>{let Q=t.concat(["items",ae]);return c(W,Q,r)});let h=e.minItems,f=e.maxItems,O=te("minItems"),U=te("maxItems");O&&(h=typeof h=="undefined"?O:Math.min(O,h)),U&&(f=typeof f=="undefined"?U:Math.min(U,f),f&&f>U&&(f=U),h&&h>U&&(h=f));let T=te("alwaysFakeOptionals")===!0?1:te("optionalsProbability"),$=te("alwaysFakeOptionals")||te("fixedProbabilities")||!1,E=Z.number(h,f,1,5);T!==null&&(E=Math.max($?Math.round((f||E)*T):Math.abs(Z.number(h,f)*T),h||0));let J=typeof e.additionalItems=="object"?e.additionalItems:{};for(let W=p.length;W<E;W+=1){let ae=t.concat(["items",W]),Q=c(e.items||J,ae,r);p.push(Q)}if(e.contains&&E>0){let W=Z.number(0,E-1);p[W]=c(e.contains,t.concat(["items",W]),r)}return e.uniqueItems?io(t.concat(["items"]),p,e,J,r,c):p}function oo(e){let t=typeof e.minimum=="undefined"||e.minimum===-Number.MAX_VALUE?tt.MIN_INTEGER:e.minimum,r=typeof e.maximum=="undefined"||e.maximum===Number.MAX_VALUE?tt.MAX_INTEGER:e.maximum,c=e.multipleOf,p=c&&String(c).match(/e-(\d)|\.(\d+)$/);if(p){let h=(Math.random()*Z.number(0,10)+1)*c,f=p[1]||p[2].length,O=parseFloat(h.toFixed(f)),U=Z.number(t,r-1);return String(O).includes(".")?U+O:(U+O).toExponential()}if(c&&(r=Math.floor(r/c)*c,t=Math.ceil(t/c)*c),e.exclusiveMinimum&&t===e.minimum&&(t+=c||1),e.exclusiveMaximum&&r===e.maximum&&(r-=c||1),t>r)return NaN;if(c){let h=Z.number(Math.floor(t/c),Math.floor(r/c))*c;for(;h<t;)h+=c;return h}return Z.number(t,r,void 0,void 0,e.type!=="integer")}function ao(e){return Math.floor(mr({...e}))}function lo(e){return Z.shuffle(yi).slice(0,e)}function co(e,t,r,c){let p={},h=e.properties||{},f=e.patternProperties||{},O=typeof e.required=="boolean"?[]:(e.required||[]).slice(),U=e.additionalProperties!==!1,T=Object.keys(h),$=Object.keys(f),E=T.concat($).reduce((Y,m)=>(O.indexOf(m)===-1&&Y.push(m),Y),[]),J=O.concat(E),W=U&&e.additionalProperties===!0?Zt:e.additionalProperties;if(!U&&T.length===0&&$.length===0&&de.hasProperties(e,"minProperties","maxProperties","dependencies","required"))return null;if(te("requiredOnly")===!0)return O.forEach(Y=>{h[Y]&&(p[Y]=h[Y])}),c(p,t.concat(["properties"]),r,e);let ae=te("alwaysFakeOptionals")===!0?1:te("optionalsProbability"),Q=te("alwaysFakeOptionals")||te("fixedProbabilities")||!1,ne=te("ignoreProperties")||[],he=te("reuseProperties"),ye=te("fillProperties"),j=e.maxProperties||J.length+(U?Z.number(1,5):0),S=Math.max(e.minProperties||0,O.length),b=Math.max(0,J.length-S);J.length===1&&!O.length&&(S=Math.max(Z.number(ye?1:0,j),S)),ae!==null&&(Q===!0?b=Math.round(S-O.length+ae*(J.length-S)):b=Z.number(S-O.length,ae*(J.length-S)));let R=Z.shuffle(E).slice(0,b),x=E.filter(Y=>R.indexOf(Y)!==-1),L=ae!==null||O.length===j?j:Z.number(0,j),_=O.concat(Z.shuffle(x).slice(0,L)).slice(0,j),I=[],M=[];if(e.dependencies&&(Object.keys(e.dependencies).forEach(Y=>{let m=e.dependencies[Y];if(_.indexOf(Y)!==-1)if(Array.isArray(m))m.forEach(k=>{_.indexOf(k)===-1&&_.push(k)});else if(Array.isArray(m.oneOf||m.anyOf)){let k=m.oneOf||m.anyOf;M.push({prop:Y,values:k})}else I.push(m)}),I.length))return delete e.dependencies,c({allOf:I.concat(e)},t.concat(["properties"]),r,e);let V=[],G=[];_.forEach(Y=>{if(h[Y]&&["{}","true"].includes(JSON.stringify(h[Y].not)))return;for(let k=0;k<ne.length;k+=1)if(ne[k]instanceof RegExp&&ne[k].test(Y)||typeof ne[k]=="string"&&ne[k]===Y||typeof ne[k]=="function"&&ne[k](h[Y],Y)){V.push(Y);return}W===!1&&O.indexOf(Y)!==-1&&(p[Y]=h[Y]),h[Y]&&(p[Y]=h[Y]);let m;if($.forEach(k=>{Y.match(new RegExp(k))&&(m=!0,p[Y]?de.merge(p[Y],f[k]):p[Z.randexp(Y)]=f[k])}),!m){let k=f[Y]||W;k&&W!==!1?p[f[Y]?Z.randexp(Y):Y]=h[Y]||k:G.push(Y)}});let ee=Object.keys(p).length+(ye?0:V.length),Ae=Y=>Z.randexp(`_?[_a-f\\d]{1,3}${Y?"\\$?":""}`);function ve(Y){let m;do{if(!Y.length)break;m=Y.shift()}while(p[m]);return m}let _e=S;if(U&&!O.length&&(_e=Math.max(ae===null||W?Z.number(ye?1:0,j):0,S)),!x.length&&!b&&U&&Q===!0&&ye){let Y=Z.number(0,j);for(let m=0;m<Y;m+=1)p[Qt(1)+Ae(Y[m])]=W||Zt}for(;ye&&!(!($.length||U)||ee>=_e);){if(U)if(he&&T.length-ee>_e){let Y=0,m;do{if(Y+=1,Y>1e3)break;m=ve(O)||Z.pick(T)}while(typeof p[m]!="undefined");typeof p[m]=="undefined"&&(p[m]=h[m],ee+=1)}else if($.length&&!W){let Y=Z.pick($),m=Z.randexp(Y);p[m]||(p[m]=f[Y],ee+=1)}else{let Y=ve(O)||Qt(1)+Ae();p[Y]||(p[Y]=W||Zt,ee+=1)}for(let Y=0;ee<S&&Y<$.length;Y+=1){let m=$[Y],k=Z.randexp(m);p[k]||(p[k]=f[m],ee+=1)}}if(O.length===0&&(!U||ae===!1)){let Y=Z.number(S,j);for(;ee<Y;){let m=ve(T);m&&(p[m]=h[m]),ee+=1}}let Pe=p;if(te("sortProperties")!==null){let Y=Object.keys(h);Pe=Object.keys(p).sort((k,H)=>te("sortProperties")?k.localeCompare(H):Y.indexOf(k)-Y.indexOf(H)).reduce((k,H)=>(k[H]=p[H],k),{})}let Ce=c(Pe,t.concat(["properties"]),r,e);return M.forEach(Y=>{for(let m of Y.values)if(de.hasValue(m.properties[Y.prop],Ce.value[Y.prop])){Object.keys(m.properties).forEach(k=>{k!==Y.prop&&de.merge(Ce.value,c(m.properties,t.concat(["properties"]),r,e).value)});break}}),Ce}function Nr(){let e=Z.number(1,5);return Qt(e).join(" ")}function po(e=0,t=140){let r=Math.max(0,e),c=Z.number(r,t),p=Nr();for(;p.length<r;)p+=Nr();return p.length>c&&(p=p.substr(0,c)),p}function uo(){return[0,0,0,0].map(()=>Z.number(0,255)).join(".")}function fo(){return Z.date().toISOString()}function ho(){return en().slice(0,10)}function mo(){return en().slice(11)}function yo(e){return Z.randexp(We[e]).replace(Oi,(t,r)=>Z.randexp(We[r]))}function go(e,t){let r=hr(e.format);if(typeof r=="function")return r(e);switch(e.format){case"date-time":case"datetime":return en();case"date":return Si();case"time":return bi();case"ipv4":return wi();case"regex":return".+?";case"email":case"hostname":case"ipv6":case"uri":case"uri-reference":case"iri":case"iri-reference":case"idn-email":case"idn-hostname":case"json-pointer":case"slug":case"uri-template":case"uuid":case"duration":return Ai(e.format);default:if(typeof r=="undefined"){if(te("failOnInvalidFormat"))throw new Error(`unknown registry key ${de.short(e.format)}`);return t()}throw new Error(`unsupported format '${e.format}'`)}}function wo(e){return de.typecast("string",e,r=>e.format?go(e,()=>yr(r.minLength,r.maxLength)):e.pattern?Z.randexp(e.pattern):yr(r.minLength,r.maxLength))}function So({$comment:e,title:t,description:r}){return Object.entries({comment:e,title:t,description:r}).filter(([,c])=>c).reduce((c,[p,h])=>(c[p]=h,c),{})}function St(e,t,r,c){if(e=r(e,null,t),e&&(e.oneOf||e.anyOf||e.allOf)&&(e=r(e,null,t)),!e)throw new Error(`Cannot traverse at '${t.join(".")}', given '${JSON.stringify(c)}'`);let p={...So(e),schemaPath:t};if(t[t.length-1]!=="properties"){if(te("useExamplesValue")&&Array.isArray(e.examples)){let T=e.examples.concat("default"in e?[e.default]:[]);return{value:de.typecast(null,e,()=>Z.pick(T)),context:p}}if(te("useExamplesValue")&&typeof e.example!="undefined")return{value:de.typecast(null,e,()=>e.example),context:p};if(te("useDefaultValue")&&"default"in e&&(e.default!==""||!te("replaceEmptyByRandomValue")))return{value:e.default,context:p};if("template"in e)return{value:de.template(e.template,c),context:p};if("const"in e)return{value:e.const,context:p}}if(e.not&&typeof e.not=="object"&&(e=de.notValue(e.not,de.omitProps(e,["not"])),e.type&&e.type==="object")){let{value:T,context:$}=St(e,t.concat(["not"]),r,c);return{value:de.clean(T,e,!1),context:{...p,items:$}}}if(typeof e.thunk=="function"){let{value:T,context:$}=St(e.thunk(c),t,r);return{value:T,context:{...p,items:$}}}if(e.jsonPath)return{value:e,context:p};let h=e.type;if(Array.isArray(h)?h=Z.pick(h):typeof h=="undefined"&&(h=ai(e,t)||h,h&&(e.type=h)),typeof e.generate=="function"){let T=de.typecast(null,e,()=>e.generate(c,t)),$=T===null?"null":typeof T;if($===h||$==="number"&&h==="integer"||Array.isArray(T)&&h==="array")return{value:T,context:p}}if(typeof e.pattern=="string")return{value:de.typecast("string",e,()=>Z.randexp(e.pattern)),context:p};if(Array.isArray(e.enum))return{value:de.typecast(null,e,()=>Z.pick(e.enum)),context:p};if(typeof h=="string")if(kt[h])try{let T=kt[h](e,t,r,St);return h==="array"?{value:T.map(({value:$})=>$),context:{...p,items:T.map(Array.isArray(e.items)?({context:$})=>$:({context:$})=>({...$,schemaPath:$.schemaPath.slice(0,-1)}))}}:h==="object"?T!==null?{value:T.value,context:{...p,items:T.context}}:{value:{},context:p}:{value:T,context:p}}catch(T){throw typeof T.path=="undefined"?new Xt(T.stack,t):T}else{if(te("failOnInvalidTypes"))throw new Xt(`unknown primitive ${de.short(h)}`,t.concat(["type"]));{let T=te("defaultInvalidTypeProduct");return typeof T=="string"&&kt[T]?{value:kt[T](e,t,r,St),context:p}:{value:T,context:p}}}let f={},O={...p};Array.isArray(e)&&(f=[]);let U=te("pruneProperties")||[];return Object.keys(e).forEach(T=>{if(!U.includes(T)&&e[T]!==null)if(typeof e[T]=="object"&&T!=="definitions"){let{value:$,context:E}=St(e[T],t.concat([T]),r,f);f[T]=de.clean($,e[T],!1),O[T]=E,f[T]===null&&te("omitNulls")&&(delete f[T],delete O[T])}else f[T]=e[T]}),{value:f,context:O}}function bo(e){return Array.isArray(e)?Z.pick(e):e}function To(e,t){if(!Array.isArray(e))return e;let r=t?e.pop():e.shift();return t?e.unshift(r):e.push(r),r}function tr(e,t,r,c){if(!e||typeof e!="object")return e;if(r||(r={}),t||(t=e),Array.isArray(e))return e.map(p=>tr(p,t,r,c));if(e.jsonPath){let{JSONPath:p}=cr(),h=typeof e.jsonPath!="object"?{path:e.jsonPath}:e.jsonPath;h.group=e.group||h.group||c,h.cycle=e.cycle||h.cycle||!1,h.reverse=e.reverse||h.reverse||!1,h.count=e.count||h.count||1;let f=`${h.group}__${h.path}`;return r[f]||(h.count>1?r[f]=p(h.path,t).slice(0,h.count):r[f]=p(h.path,t)),h.cycle||h.reverse?To(r[f],h.reverse):bo(r[f])}return Object.keys(e).forEach(p=>{e[p]=tr(e[p],t,r,p)}),e}function Oo(e,t,r,c){if(Object.prototype.toString.call(t)!=="[object Object]")throw new Error(`Invalid input, expecting object but given ${typeof t}`);let p=te("refDepthMin")||0,h=te("refDepthMax")||3;try{let{resolveSchema:f}=Pi({refs:e,schema:t,container:r,synchronous:c,refDepthMin:p,refDepthMax:h}),O=_i(de.clone(t),[],f);return te("resolveJsonPath")?{value:tr(O.value),context:O.context}:O}catch(f){throw f.path?new Error(`${f.message} in /${f.path.join("/")}`):f}}function Ao(e){return e.value}function vo(e,t){return t.reduce((r,c)=>c in r?r[c]:{},e)}function nr(e,t,r,c=r){let{title:p,description:h,comment:f}=vo(e,t),O=[];te("renderTitle")&&p&&O.push(` ${p}`,""),te("renderDescription")&&h&&O.push(` ${h}`),te("renderComment")&&f&&O.push(` ${f}`),r.commentBefore=O.join(`
2
+ `),c instanceof xi?c.items.forEach(U=>{nr(e,[...t,"items",U.key.value],U.key,U.value)}):c instanceof Ii&&c.items.forEach((U,T)=>{nr(e,[...t,"items",T],U)})}function Eo({value:e,context:t}){let r=Mt.createNode(e);nr(t,[],r);let c=new Mt.Document;return c.contents=r,c.toString()}function kr(){rt.define("autoIncrement",function(t,r){if(!this.offset){let c=r.minimum||1,p=c+tt.MAX_NUMBER,h=t.initialOffset||r.initialOffset;this.offset=h||Z.number(c,p)}return t?this.offset++:r}),rt.define("sequentialDate",function(t,r){if(this.now||(this.now=Z.date()),t){if(r=this.now.toISOString(),t=t===!0?"days":t,["seconds","minutes","hours","days","weeks","months","years"].indexOf(t)===-1)throw new Error(`Unsupported increment by ${de.short(t)}`);this.now.setTime(this.now.getTime()+Z.date(t))}return r})}function Mr(e,t){let r={};Array.isArray(e)?e.forEach(p=>{r[p.$id||p.id]=p}):r=e||{};function c(p){if(!p||typeof p!="object")return;if(Array.isArray(p))return p.forEach(c);let h=p.$id||p.id;typeof h=="string"&&!r[h]&&(r[h]=p),Object.keys(p).forEach(f=>{c(p[f])})}return c(e),c(t),r}var Cr,rr,Lr,ir,Dr,Ur,je,Fr,sr,F,or,$r,jr,Yr,Wr,Vr,xt,Kt,ar,qr,Br,lr,cr,Jr,Gr,pr,ue,ur,Hr,Kr,It,te,dr,fr,zr,Xr,Qr,Zr,ei,ti,tt,zt,Z,ni,de,ri,ii,bt,hr,si,Xt,Nt,oi,ai,li,ci,pi,ui,di,fi,hi,mr,mi,yi,Qt,Zt,gi,yr,wi,en,Si,bi,gr,tn,Ti,We,Oi,Ai,vi,Ei,kt,_i,Ri,Pi,wr,Sr,De,_o,Ro,Po,xo,Io,No,ko,Mo,Co,Lo,Do,Uo,xi,Ii,Mt,rt,Oe,Ni,ki,Fo=g({"src/shared.js"(){Cr=Object.create,rr=Object.defineProperty,Lr=Object.getOwnPropertyDescriptor,ir=Object.getOwnPropertyNames,Dr=Object.getPrototypeOf,Ur=Object.prototype.hasOwnProperty,je=(e,t)=>function(){return t||(0,e[ir(e)[0]])((t={exports:{}}).exports,t),t.exports},Fr=(e,t,r,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let p of ir(t))!Ur.call(e,p)&&p!==r&&rr(e,p,{get:()=>t[p],enumerable:!(c=Lr(t,p))||c.enumerable});return e},sr=(e,t,r)=>(r=e!=null?Cr(Dr(e)):{},Fr(t||!e||!e.__esModule?rr(r,"default",{value:e,enumerable:!0}):r,e)),F=je({"node_modules/ret/lib/types.js"(e,t){t.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}}}),or=je({"node_modules/ret/lib/sets.js"(e){var t=F(),r=()=>[{type:t.RANGE,from:48,to:57}],c=()=>[{type:t.CHAR,value:95},{type:t.RANGE,from:97,to:122},{type:t.RANGE,from:65,to:90}].concat(r()),p=()=>[{type:t.CHAR,value:9},{type:t.CHAR,value:10},{type:t.CHAR,value:11},{type:t.CHAR,value:12},{type:t.CHAR,value:13},{type:t.CHAR,value:32},{type:t.CHAR,value:160},{type:t.CHAR,value:5760},{type:t.RANGE,from:8192,to:8202},{type:t.CHAR,value:8232},{type:t.CHAR,value:8233},{type:t.CHAR,value:8239},{type:t.CHAR,value:8287},{type:t.CHAR,value:12288},{type:t.CHAR,value:65279}],h=()=>[{type:t.CHAR,value:10},{type:t.CHAR,value:13},{type:t.CHAR,value:8232},{type:t.CHAR,value:8233}];e.words=()=>({type:t.SET,set:c(),not:!1}),e.notWords=()=>({type:t.SET,set:c(),not:!0}),e.ints=()=>({type:t.SET,set:r(),not:!1}),e.notInts=()=>({type:t.SET,set:r(),not:!0}),e.whitespace=()=>({type:t.SET,set:p(),not:!1}),e.notWhitespace=()=>({type:t.SET,set:p(),not:!0}),e.anyChar=()=>({type:t.SET,set:h(),not:!0})}}),$r=je({"node_modules/ret/lib/util.js"(e){var t=F(),r=or(),c="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",p={0:0,t:9,n:10,v:11,f:12,r:13};e.strToChars=h=>{var f=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return h=h.replace(f,(O,U,T,$,E,J,W,ae)=>{if(T)return O;var Q=U?8:$?parseInt($,16):E?parseInt(E,16):J?parseInt(J,8):W?c.indexOf(W):p[ae],ne=String.fromCharCode(Q);return/[[\]{}^$.|?*+()]/.test(ne)&&(ne="\\"+ne),ne}),h},e.tokenizeClass=(h,f)=>{for(var O=[],U=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,T,$;(T=U.exec(h))!=null;)if(T[1])O.push(r.words());else if(T[2])O.push(r.ints());else if(T[3])O.push(r.whitespace());else if(T[4])O.push(r.notWords());else if(T[5])O.push(r.notInts());else if(T[6])O.push(r.notWhitespace());else if(T[7])O.push({type:t.RANGE,from:(T[8]||T[9]).charCodeAt(0),to:T[10].charCodeAt(0)});else if($=T[12])O.push({type:t.CHAR,value:$.charCodeAt(0)});else return[O,U.lastIndex];e.error(f,"Unterminated character class")},e.error=(h,f)=>{throw new SyntaxError("Invalid regular expression: /"+h+"/: "+f)}}}),jr=je({"node_modules/ret/lib/positions.js"(e){var t=F();e.wordBoundary=()=>({type:t.POSITION,value:"b"}),e.nonWordBoundary=()=>({type:t.POSITION,value:"B"}),e.begin=()=>({type:t.POSITION,value:"^"}),e.end=()=>({type:t.POSITION,value:"$"})}}),Yr=je({"node_modules/ret/lib/index.js"(e,t){var r=$r(),c=F(),p=or(),h=jr();t.exports=f=>{var O=0,U,T,$={type:c.ROOT,stack:[]},E=$,J=$.stack,W=[],ae=x=>{r.error(f,`Nothing to repeat at column ${x-1}`)},Q=r.strToChars(f);for(U=Q.length;O<U;)switch(T=Q[O++],T){case"\\":switch(T=Q[O++],T){case"b":J.push(h.wordBoundary());break;case"B":J.push(h.nonWordBoundary());break;case"w":J.push(p.words());break;case"W":J.push(p.notWords());break;case"d":J.push(p.ints());break;case"D":J.push(p.notInts());break;case"s":J.push(p.whitespace());break;case"S":J.push(p.notWhitespace());break;default:/\d/.test(T)?J.push({type:c.REFERENCE,value:parseInt(T,10)}):J.push({type:c.CHAR,value:T.charCodeAt(0)})}break;case"^":J.push(h.begin());break;case"$":J.push(h.end());break;case"[":{var ne;Q[O]==="^"?(ne=!0,O++):ne=!1;var he=r.tokenizeClass(Q.slice(O),f);O+=he[1],J.push({type:c.SET,set:he[0],not:ne});break}case".":J.push(p.anyChar());break;case"(":{var ye={type:c.GROUP,stack:[],remember:!0};T=Q[O],T==="?"&&(T=Q[O+1],O+=2,T==="="?ye.followedBy=!0:T==="!"?ye.notFollowedBy=!0:T!==":"&&r.error(f,`Invalid group, character '${T}' after '?' at column ${O-1}`),ye.remember=!1),J.push(ye),W.push(E),E=ye,J=ye.stack;break}case")":W.length===0&&r.error(f,`Unmatched ) at column ${O-1}`),E=W.pop(),J=E.options?E.options[E.options.length-1]:E.stack;break;case"|":{E.options||(E.options=[E.stack],delete E.stack);var j=[];E.options.push(j),J=j;break}case"{":{var S=/^(\d+)(,(\d+)?)?\}/.exec(Q.slice(O)),b,R;S!==null?(J.length===0&&ae(O),b=parseInt(S[1],10),R=S[2]?S[3]?parseInt(S[3],10):1/0:b,O+=S[0].length,J.push({type:c.REPETITION,min:b,max:R,value:J.pop()})):J.push({type:c.CHAR,value:123});break}case"?":J.length===0&&ae(O),J.push({type:c.REPETITION,min:0,max:1,value:J.pop()});break;case"+":J.length===0&&ae(O),J.push({type:c.REPETITION,min:1,max:1/0,value:J.pop()});break;case"*":J.length===0&&ae(O),J.push({type:c.REPETITION,min:0,max:1/0,value:J.pop()});break;default:J.push({type:c.CHAR,value:T.charCodeAt(0)})}return W.length!==0&&r.error(f,"Unterminated group"),$},t.exports.types=c}}),Wr=je({"node_modules/drange/lib/index.js"(e,t){var r=class At{constructor(h,f){this.low=h,this.high=f,this.length=1+f-h}overlaps(h){return!(this.high<h.low||this.low>h.high)}touches(h){return!(this.high+1<h.low||this.low-1>h.high)}add(h){return new At(Math.min(this.low,h.low),Math.max(this.high,h.high))}subtract(h){return h.low<=this.low&&h.high>=this.high?[]:h.low>this.low&&h.high<this.high?[new At(this.low,h.low-1),new At(h.high+1,this.high)]:h.low<=this.low?[new At(h.high+1,this.high)]:[new At(this.low,h.low-1)]}toString(){return this.low==this.high?this.low.toString():this.low+"-"+this.high}},c=class Vt{constructor(h,f){this.ranges=[],this.length=0,h!=null&&this.add(h,f)}_update_length(){this.length=this.ranges.reduce((h,f)=>h+f.length,0)}add(h,f){var O=U=>{for(var T=0;T<this.ranges.length&&!U.touches(this.ranges[T]);)T++;for(var $=this.ranges.slice(0,T);T<this.ranges.length&&U.touches(this.ranges[T]);)U=U.add(this.ranges[T]),T++;$.push(U),this.ranges=$.concat(this.ranges.slice(T)),this._update_length()};return h instanceof Vt?h.ranges.forEach(O):(f==null&&(f=h),O(new r(h,f))),this}subtract(h,f){var O=U=>{for(var T=0;T<this.ranges.length&&!U.overlaps(this.ranges[T]);)T++;for(var $=this.ranges.slice(0,T);T<this.ranges.length&&U.overlaps(this.ranges[T]);)$=$.concat(this.ranges[T].subtract(U)),T++;this.ranges=$.concat(this.ranges.slice(T)),this._update_length()};return h instanceof Vt?h.ranges.forEach(O):(f==null&&(f=h),O(new r(h,f))),this}intersect(h,f){var O=[],U=T=>{for(var $=0;$<this.ranges.length&&!T.overlaps(this.ranges[$]);)$++;for(;$<this.ranges.length&&T.overlaps(this.ranges[$]);){var E=Math.max(this.ranges[$].low,T.low),J=Math.min(this.ranges[$].high,T.high);O.push(new r(E,J)),$++}};return h instanceof Vt?h.ranges.forEach(U):(f==null&&(f=h),U(new r(h,f))),this.ranges=O,this._update_length(),this}index(h){for(var f=0;f<this.ranges.length&&this.ranges[f].length<=h;)h-=this.ranges[f].length,f++;return this.ranges[f].low+h}toString(){return"[ "+this.ranges.join(", ")+" ]"}clone(){return new Vt(this)}numbers(){return this.ranges.reduce((h,f)=>{for(var O=f.low;O<=f.high;)h.push(O),O++;return h},[])}subranges(){return this.ranges.map(h=>({low:h.low,high:h.high,length:1+h.high-h.low}))}};t.exports=c}}),Vr=je({"node_modules/randexp/lib/randexp.js"(e,t){var r=Yr(),c=Wr(),p=r.types;t.exports=class qt{constructor(f,O){if(this._setDefaults(f),f instanceof RegExp)this.ignoreCase=f.ignoreCase,this.multiline=f.multiline,f=f.source;else if(typeof f=="string")this.ignoreCase=O&&O.indexOf("i")!==-1,this.multiline=O&&O.indexOf("m")!==-1;else throw new Error("Expected a regexp or string");this.tokens=r(f)}_setDefaults(f){this.max=f.max!=null?f.max:qt.prototype.max!=null?qt.prototype.max:100,this.defaultRange=f.defaultRange?f.defaultRange:this.defaultRange.clone(),f.randInt&&(this.randInt=f.randInt)}gen(){return this._gen(this.tokens,[])}_gen(f,O){var U,T,$,E,J;switch(f.type){case p.ROOT:case p.GROUP:if(f.followedBy||f.notFollowedBy)return"";for(f.remember&&f.groupNumber===void 0&&(f.groupNumber=O.push(null)-1),U=f.options?this._randSelect(f.options):f.stack,T="",E=0,J=U.length;E<J;E++)T+=this._gen(U[E],O);return f.remember&&(O[f.groupNumber]=T),T;case p.POSITION:return"";case p.SET:{var W=this._expand(f);return W.length?String.fromCharCode(this._randSelect(W)):""}case p.REPETITION:for($=this.randInt(f.min,f.max===1/0?f.min+this.max:f.max),T="",E=0;E<$;E++)T+=this._gen(f.value,O);return T;case p.REFERENCE:return O[f.value-1]||"";case p.CHAR:{var ae=this.ignoreCase&&this._randBool()?this._toOtherCase(f.value):f.value;return String.fromCharCode(ae)}}}_toOtherCase(f){return f+(97<=f&&f<=122?-32:65<=f&&f<=90?32:0)}_randBool(){return!this.randInt(0,1)}_randSelect(f){return f instanceof c?f.index(this.randInt(0,f.length-1)):f[this.randInt(0,f.length-1)]}_expand(f){if(f.type===r.types.CHAR)return new c(f.value);if(f.type===r.types.RANGE)return new c(f.from,f.to);{let O=new c;for(let U=0;U<f.set.length;U++){let T=this._expand(f.set[U]);if(O.add(T),this.ignoreCase)for(let $=0;$<T.length;$++){let E=T.index($),J=this._toOtherCase(E);E!==J&&O.add(J)}}return f.not?this.defaultRange.clone().subtract(O):this.defaultRange.clone().intersect(O)}}randInt(f,O){return f+Math.floor(Math.random()*(1+O-f))}get defaultRange(){return this._range=this._range||new c(32,126)}set defaultRange(f){this._range=f}static randexp(f,O){var U;return typeof f=="string"&&(f=new RegExp(f,O)),f._randexp===void 0?(U=new qt(f,O),f._randexp=U):(U=f._randexp,U._setDefaults(f)),U.gen()}static sugar(){RegExp.prototype.gen=function(){return qt.randexp(this)}}}}}),xt=je({"node_modules/yaml/dist/PlainValue-ec8e588e.js"(e){var t={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},r={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},c="tag:yaml.org,2002:",p={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function h(j){let S=[0],b=j.indexOf(`
3
3
  `);for(;b!==-1;)b+=1,S.push(b),b=j.indexOf(`
4
4
  `,b);return S}function f(j){let S,b;return typeof j=="string"?(S=h(j),b=j):(Array.isArray(j)&&(j=j[0]),j&&j.context&&(j.lineStarts||(j.lineStarts=h(j.context.src)),S=j.lineStarts,b=j.context.src)),{lineStarts:S,src:b}}function O(j,S){if(typeof j!="number"||j<0)return null;let{lineStarts:b,src:R}=f(S);if(!b||!R||j>R.length)return null;for(let L=0;L<b.length;++L){let _=b[L];if(j<_)return{line:L,col:j-b[L-1]+1};if(j===_)return{line:L+1,col:1}}let x=b.length;return{line:x,col:j-b[x-1]+1}}function U(j,S){let{lineStarts:b,src:R}=f(S);if(!b||!(j>=1)||j>b.length)return null;let x=b[j-1],L=b[j];for(;L&&L>x&&R[L-1]===`
5
- `;)--L;return R.slice(x,L)}function T({start:j,end:S},b,R=80){let x=U(j.line,b);if(!x)return null;let{col:L}=j;if(x.length>R)if(L<=R-10)x=x.substr(0,R-1)+"\u2026";else{let G=Math.round(R/2);x.length>L+G&&(x=x.substr(0,L+G-1)+"\u2026"),L-=x.length-R,x="\u2026"+x.substr(1-R)}let _=1,I="";S&&(S.line===j.line&&L+(S.col-j.col)<=R+1?_=S.col-j.col:(_=Math.min(x.length+1,R)-L,I="\u2026"));let C=L>1?" ".repeat(L-1):"",V="^".repeat(_);return`${x}
6
- ${C}${V}${I}`}var $=class Ur{static copy(S){return new Ur(S.start,S.end)}constructor(S,b){this.start=S,this.end=b||S}isEmpty(){return typeof this.start!="number"||!this.end||this.end<=this.start}setOrigRange(S,b){let{start:R,end:x}=this;if(S.length===0||x<=S[0])return this.origStart=R,this.origEnd=x,b;let L=b;for(;L<S.length&&!(S[L]>R);)++L;this.origStart=R+L;let _=L;for(;L<S.length&&!(S[L]>=x);)++L;return this.origEnd=x+L,_}},E=class lt{static addStringTerminator(S,b,R){if(R[R.length-1]===`
5
+ `;)--L;return R.slice(x,L)}function T({start:j,end:S},b,R=80){let x=U(j.line,b);if(!x)return null;let{col:L}=j;if(x.length>R)if(L<=R-10)x=x.substr(0,R-1)+"\u2026";else{let G=Math.round(R/2);x.length>L+G&&(x=x.substr(0,L+G-1)+"\u2026"),L-=x.length-R,x="\u2026"+x.substr(1-R)}let _=1,I="";S&&(S.line===j.line&&L+(S.col-j.col)<=R+1?_=S.col-j.col:(_=Math.min(x.length+1,R)-L,I="\u2026"));let M=L>1?" ".repeat(L-1):"",V="^".repeat(_);return`${x}
6
+ ${M}${V}${I}`}var $=class Ui{static copy(S){return new Ui(S.start,S.end)}constructor(S,b){this.start=S,this.end=b||S}isEmpty(){return typeof this.start!="number"||!this.end||this.end<=this.start}setOrigRange(S,b){let{start:R,end:x}=this;if(S.length===0||x<=S[0])return this.origStart=R,this.origEnd=x,b;let L=b;for(;L<S.length&&!(S[L]>R);)++L;this.origStart=R+L;let _=L;for(;L<S.length&&!(S[L]>=x);)++L;return this.origEnd=x+L,_}},E=class lt{static addStringTerminator(S,b,R){if(R[R.length-1]===`
7
7
  `)return R;let x=lt.endOfWhiteSpace(S,b);return x>=S.length||S[x]===`
8
8
  `?R+`
9
9
  `:R}static atDocumentBoundary(S,b,R){let x=S[b];if(!x)return!0;let L=S[b-1];if(L&&L!==`
10
- `)return!1;if(R){if(x!==R)return!1}else if(x!==t.DIRECTIVES_END&&x!==t.DOCUMENT_END)return!1;let _=S[b+1],I=S[b+2];if(_!==x||I!==x)return!1;let C=S[b+3];return!C||C===`
11
- `||C===" "||C===" "}static endOfIdentifier(S,b){let R=S[b],x=R==="<",L=x?[`
10
+ `)return!1;if(R){if(x!==R)return!1}else if(x!==t.DIRECTIVES_END&&x!==t.DOCUMENT_END)return!1;let _=S[b+1],I=S[b+2];if(_!==x||I!==x)return!1;let M=S[b+3];return!M||M===`
11
+ `||M===" "||M===" "}static endOfIdentifier(S,b){let R=S[b],x=R==="<",L=x?[`
12
12
  `," "," ",">"]:[`
13
13
  `," "," ","[","]","{","}",","];for(;R&&L.indexOf(R)===-1;)R=S[b+=1];return x&&R===">"&&(b+=1),b}static endOfIndent(S,b){let R=S[b];for(;R===" ";)R=S[b+=1];return b}static endOfLine(S,b){let R=S[b];for(;R&&R!==`
14
14
  `;)R=S[b+=1];return b}static endOfWhiteSpace(S,b){let R=S[b];for(;R===" "||R===" ";)R=S[b+=1];return b}static startOfLine(S,b){let R=S[b-1];if(R===`
@@ -21,86 +21,86 @@ ${C}${V}${I}`}var $=class Ur{static copy(S){return new Ur(S.start,S.end)}constru
21
21
  `;){switch(I){case`
22
22
  `:x=0,b+=1,_+=`
23
23
  `;break;case" ":x<=R&&(L=!0),b=lt.endOfWhiteSpace(S,b+2)-1;break;case" ":x+=1,b+=1;break}I=S[b+1]}return _||(_=" "),I&&x<=R&&(L=!0),{fold:_,offset:b,error:L}}constructor(S,b,R){Object.defineProperty(this,"context",{value:R||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=b||[],this.type=S,this.value=null}getPropValue(S,b,R){if(!this.context)return null;let{src:x}=this.context,L=this.props[S];return L&&x[L.start]===b?x.slice(L.start+(R?1:0),L.end):null}get anchor(){for(let S=0;S<this.props.length;++S){let b=this.getPropValue(S,t.ANCHOR,!0);if(b!=null)return b}return null}get comment(){let S=[];for(let b=0;b<this.props.length;++b){let R=this.getPropValue(b,t.COMMENT,!0);R!=null&&S.push(R)}return S.length>0?S.join(`
24
- `):null}commentHasRequiredWhitespace(S){let{src:b}=this.context;if(this.header&&S===this.header.end||!this.valueRange)return!1;let{end:R}=this.valueRange;return S!==R||lt.atBlank(b,R-1)}get hasComment(){if(this.context){let{src:S}=this.context;for(let b=0;b<this.props.length;++b)if(S[this.props[b].start]===t.COMMENT)return!0}return!1}get hasProps(){if(this.context){let{src:S}=this.context;for(let b=0;b<this.props.length;++b)if(S[this.props[b].start]!==t.COMMENT)return!0}return!1}get includesTrailingLines(){return!1}get jsonLike(){return[i.FLOW_MAP,i.FLOW_SEQ,i.QUOTE_DOUBLE,i.QUOTE_SINGLE].indexOf(this.type)!==-1}get rangeAsLinePos(){if(!this.range||!this.context)return;let S=O(this.range.start,this.context.root);if(!S)return;let b=O(this.range.end,this.context.root);return{start:S,end:b}}get rawValue(){if(!this.valueRange||!this.context)return null;let{start:S,end:b}=this.valueRange;return this.context.src.slice(S,b)}get tag(){for(let S=0;S<this.props.length;++S){let b=this.getPropValue(S,t.TAG,!1);if(b!=null){if(b[1]==="<")return{verbatim:b.slice(2,-1)};{let[R,x,L]=b.match(/^(.*!)([^!]*)$/);return{handle:x,suffix:L}}}}return null}get valueRangeContainsNewline(){if(!this.valueRange||!this.context)return!1;let{start:S,end:b}=this.valueRange,{src:R}=this.context;for(let x=S;x<b;++x)if(R[x]===`
24
+ `):null}commentHasRequiredWhitespace(S){let{src:b}=this.context;if(this.header&&S===this.header.end||!this.valueRange)return!1;let{end:R}=this.valueRange;return S!==R||lt.atBlank(b,R-1)}get hasComment(){if(this.context){let{src:S}=this.context;for(let b=0;b<this.props.length;++b)if(S[this.props[b].start]===t.COMMENT)return!0}return!1}get hasProps(){if(this.context){let{src:S}=this.context;for(let b=0;b<this.props.length;++b)if(S[this.props[b].start]!==t.COMMENT)return!0}return!1}get includesTrailingLines(){return!1}get jsonLike(){return[r.FLOW_MAP,r.FLOW_SEQ,r.QUOTE_DOUBLE,r.QUOTE_SINGLE].indexOf(this.type)!==-1}get rangeAsLinePos(){if(!this.range||!this.context)return;let S=O(this.range.start,this.context.root);if(!S)return;let b=O(this.range.end,this.context.root);return{start:S,end:b}}get rawValue(){if(!this.valueRange||!this.context)return null;let{start:S,end:b}=this.valueRange;return this.context.src.slice(S,b)}get tag(){for(let S=0;S<this.props.length;++S){let b=this.getPropValue(S,t.TAG,!1);if(b!=null){if(b[1]==="<")return{verbatim:b.slice(2,-1)};{let[R,x,L]=b.match(/^(.*!)([^!]*)$/);return{handle:x,suffix:L}}}}return null}get valueRangeContainsNewline(){if(!this.valueRange||!this.context)return!1;let{start:S,end:b}=this.valueRange,{src:R}=this.context;for(let x=S;x<b;++x)if(R[x]===`
25
25
  `)return!0;return!1}parseComment(S){let{src:b}=this.context;if(b[S]===t.COMMENT){let R=lt.endOfLine(b,S+1),x=new $(S,R);return this.props.push(x),R}return S}setOrigRanges(S,b){return this.range&&(b=this.range.setOrigRange(S,b)),this.valueRange&&this.valueRange.setOrigRange(S,b),this.props.forEach(R=>R.setOrigRange(S,b)),b}toString(){let{context:{src:S},range:b,value:R}=this;if(R!=null)return R;let x=S.slice(b.start,b.end);return lt.addStringTerminator(S,b.end,x)}},J=class extends Error{constructor(j,S,b){if(!b||!(S instanceof E))throw new Error(`Invalid arguments for new ${j}`);super(),this.name=j,this.message=b,this.source=S}makePretty(){if(!this.source)return;this.nodeType=this.source.type;let j=this.source.context&&this.source.context.root;if(typeof this.offset=="number"){this.range=new $(this.offset,this.offset+1);let S=j&&O(this.offset,j);if(S){let b={line:S.line,col:S.col+1};this.linePos={start:S,end:b}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){let{line:S,col:b}=this.linePos.start;this.message+=` at line ${S}, column ${b}`;let R=j&&T(this.linePos,j);R&&(this.message+=`:
26
26
 
27
27
  ${R}
28
- `)}delete this.source}},W=class extends J{constructor(j,S){super("YAMLReferenceError",j,S)}},ae=class extends J{constructor(j,S){super("YAMLSemanticError",j,S)}},Q=class extends J{constructor(j,S){super("YAMLSyntaxError",j,S)}},ne=class extends J{constructor(j,S){super("YAMLWarning",j,S)}};function he(j,S,b){return S in j?Object.defineProperty(j,S,{value:b,enumerable:!0,configurable:!0,writable:!0}):j[S]=b,j}var ye=class Oi extends E{static endOfLine(S,b,R){let x=S[b],L=b;for(;x&&x!==`
28
+ `)}delete this.source}},W=class extends J{constructor(j,S){super("YAMLReferenceError",j,S)}},ae=class extends J{constructor(j,S){super("YAMLSemanticError",j,S)}},Q=class extends J{constructor(j,S){super("YAMLSyntaxError",j,S)}},ne=class extends J{constructor(j,S){super("YAMLWarning",j,S)}};function he(j,S,b){return S in j?Object.defineProperty(j,S,{value:b,enumerable:!0,configurable:!0,writable:!0}):j[S]=b,j}var ye=class Or extends E{static endOfLine(S,b,R){let x=S[b],L=b;for(;x&&x!==`
29
29
  `&&!(R&&(x==="["||x==="]"||x==="{"||x==="}"||x===","));){let _=S[L+1];if(x===":"&&(!_||_===`
30
30
  `||_===" "||_===" "||R&&_===",")||(x===" "||x===" ")&&_==="#")break;L+=1,x=_}return L}get strValue(){if(!this.valueRange||!this.context)return null;let{start:S,end:b}=this.valueRange,{src:R}=this.context,x=R[b-1];for(;S<b&&(x===`
31
- `||x===" "||x===" ");)x=R[--b-1];let L="";for(let I=S;I<b;++I){let C=R[I];if(C===`
32
- `){let{fold:V,offset:G}=E.foldNewline(R,I,-1);L+=V,I=G}else if(C===" "||C===" "){let V=I,G=R[I+1];for(;I<b&&(G===" "||G===" ");)I+=1,G=R[I+1];G!==`
33
- `&&(L+=I>V?R.slice(V,I+1):C)}else L+=C}let _=R[S];switch(_){case" ":{let I="Plain value cannot start with a tab character";return{errors:[new ae(this,I)],str:L}}case"@":case"`":{let I=`Plain value cannot start with reserved character ${_}`;return{errors:[new ae(this,I)],str:L}}default:return L}}parseBlockValue(S){let{indent:b,inFlow:R,src:x}=this.context,L=S,_=S;for(let I=x[L];I===`
34
- `&&!E.atDocumentBoundary(x,L+1);I=x[L]){let C=E.endOfBlockIndent(x,b,L+1);if(C===null||x[C]==="#")break;x[C]===`
35
- `?L=C:(_=Oi.endOfLine(x,C,R),L=_)}return this.valueRange.isEmpty()&&(this.valueRange.start=S),this.valueRange.end=_,_}parse(S,b){this.context=S;let{inFlow:R,src:x}=S,L=b,_=x[L];return _&&_!=="#"&&_!==`
36
- `&&(L=Oi.endOfLine(x,b,R)),this.valueRange=new $(b,L),L=E.endOfWhiteSpace(x,L),L=this.parseComment(L),(!this.hasComment||this.valueRange.isEmpty())&&(L=this.parseBlockValue(L)),L}};e.Char=t,e.Node=E,e.PlainValue=ye,e.Range=$,e.Type=i,e.YAMLError=J,e.YAMLReferenceError=W,e.YAMLSemanticError=ae,e.YAMLSyntaxError=Q,e.YAMLWarning=ne,e._defineProperty=he,e.defaultTagPrefix=c,e.defaultTags=p}}),Kt=je({"node_modules/yaml/dist/resolveSeq-d03cb037.js"(e){var t=xt();function i(s,r,a){return a?`#${a.replace(/[\s\S]^/gm,`$&${r}#`)}
37
- ${r}${s}`:s}function c(s,r,a){return a?a.indexOf(`
38
- `)===-1?`${s} #${a}`:`${s}
39
- `+a.replace(/^/gm,`${r||""}#`):s}var p=class{};function h(s,r,a){if(Array.isArray(s))return s.map((u,y)=>h(u,String(y),a));if(s&&typeof s.toJSON=="function"){let u=a&&a.anchors&&a.anchors.get(s);u&&(a.onCreate=w=>{u.res=w,delete a.onCreate});let y=s.toJSON(r,a);return u&&a.onCreate&&a.onCreate(y),y}return(!a||!a.keep)&&typeof s=="bigint"?Number(s):s}var f=class extends p{constructor(s){super(),this.value=s}toJSON(s,r){return r&&r.keep?this.value:h(this.value,s,r)}toString(){return String(this.value)}};function O(s,r,a){let u=a;for(let y=r.length-1;y>=0;--y){let w=r[y];if(Number.isInteger(w)&&w>=0){let A=[];A[w]=u,u=A}else{let A={};Object.defineProperty(A,w,{value:u,writable:!0,enumerable:!0,configurable:!0}),u=A}}return s.createNode(u,!1)}var U=s=>s==null||typeof s=="object"&&s[Symbol.iterator]().next().done,T=class mt extends p{constructor(r){super(),t._defineProperty(this,"items",[]),this.schema=r}addIn(r,a){if(U(r))this.add(a);else{let[u,...y]=r,w=this.get(u,!0);if(w instanceof mt)w.addIn(y,a);else if(w===void 0&&this.schema)this.set(u,O(this.schema,y,a));else throw new Error(`Expected YAML collection at ${u}. Remaining path: ${y}`)}}deleteIn([r,...a]){if(a.length===0)return this.delete(r);let u=this.get(r,!0);if(u instanceof mt)return u.deleteIn(a);throw new Error(`Expected YAML collection at ${r}. Remaining path: ${a}`)}getIn([r,...a],u){let y=this.get(r,!0);return a.length===0?!u&&y instanceof f?y.value:y:y instanceof mt?y.getIn(a,u):void 0}hasAllNullValues(){return this.items.every(r=>{if(!r||r.type!=="PAIR")return!1;let a=r.value;return a==null||a instanceof f&&a.value==null&&!a.commentBefore&&!a.comment&&!a.tag})}hasIn([r,...a]){if(a.length===0)return this.has(r);let u=this.get(r,!0);return u instanceof mt?u.hasIn(a):!1}setIn([r,...a],u){if(a.length===0)this.set(r,u);else{let y=this.get(r,!0);if(y instanceof mt)y.setIn(a,u);else if(y===void 0&&this.schema)this.set(r,O(this.schema,a,u));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${a}`)}}toJSON(){return null}toString(r,{blockItem:a,flowChars:u,isMap:y,itemIndent:w},A,v){let{indent:P,indentStep:D,stringify:q}=r,X=this.type===t.Type.FLOW_MAP||this.type===t.Type.FLOW_SEQ||r.inFlow;X&&(w+=D);let be=y&&this.hasAllNullValues();r=Object.assign({},r,{allNullValues:be,indent:w,inFlow:X,type:null});let oe=!1,ge=!1,se=this.items.reduce((xe,pe,Ee)=>{let fe;pe&&(!oe&&pe.spaceBefore&&xe.push({type:"comment",str:""}),pe.commentBefore&&pe.commentBefore.match(/^.*$/gm).forEach(Qs=>{xe.push({type:"comment",str:`#${Qs}`})}),pe.comment&&(fe=pe.comment),X&&(!oe&&pe.spaceBefore||pe.commentBefore||pe.comment||pe.key&&(pe.key.commentBefore||pe.key.comment)||pe.value&&(pe.value.commentBefore||pe.value.comment))&&(ge=!0)),oe=!1;let Ue=q(pe,r,()=>fe=null,()=>oe=!0);return X&&!ge&&Ue.includes(`
40
- `)&&(ge=!0),X&&Ee<this.items.length-1&&(Ue+=","),Ue=c(Ue,w,fe),oe&&(fe||X)&&(oe=!1),xe.push({type:"item",str:Ue}),xe},[]),me;if(se.length===0)me=u.start+u.end;else if(X){let{start:xe,end:pe}=u,Ee=se.map(fe=>fe.str);if(ge||Ee.reduce((fe,Ue)=>fe+Ue.length+2,2)>mt.maxFlowStringSingleLineLength){me=xe;for(let fe of Ee)me+=fe?`
31
+ `||x===" "||x===" ");)x=R[--b-1];let L="";for(let I=S;I<b;++I){let M=R[I];if(M===`
32
+ `){let{fold:V,offset:G}=E.foldNewline(R,I,-1);L+=V,I=G}else if(M===" "||M===" "){let V=I,G=R[I+1];for(;I<b&&(G===" "||G===" ");)I+=1,G=R[I+1];G!==`
33
+ `&&(L+=I>V?R.slice(V,I+1):M)}else L+=M}let _=R[S];switch(_){case" ":{let I="Plain value cannot start with a tab character";return{errors:[new ae(this,I)],str:L}}case"@":case"`":{let I=`Plain value cannot start with reserved character ${_}`;return{errors:[new ae(this,I)],str:L}}default:return L}}parseBlockValue(S){let{indent:b,inFlow:R,src:x}=this.context,L=S,_=S;for(let I=x[L];I===`
34
+ `&&!E.atDocumentBoundary(x,L+1);I=x[L]){let M=E.endOfBlockIndent(x,b,L+1);if(M===null||x[M]==="#")break;x[M]===`
35
+ `?L=M:(_=Or.endOfLine(x,M,R),L=_)}return this.valueRange.isEmpty()&&(this.valueRange.start=S),this.valueRange.end=_,_}parse(S,b){this.context=S;let{inFlow:R,src:x}=S,L=b,_=x[L];return _&&_!=="#"&&_!==`
36
+ `&&(L=Or.endOfLine(x,b,R)),this.valueRange=new $(b,L),L=E.endOfWhiteSpace(x,L),L=this.parseComment(L),(!this.hasComment||this.valueRange.isEmpty())&&(L=this.parseBlockValue(L)),L}};e.Char=t,e.Node=E,e.PlainValue=ye,e.Range=$,e.Type=r,e.YAMLError=J,e.YAMLReferenceError=W,e.YAMLSemanticError=ae,e.YAMLSyntaxError=Q,e.YAMLWarning=ne,e._defineProperty=he,e.defaultTagPrefix=c,e.defaultTags=p}}),Kt=je({"node_modules/yaml/dist/resolveSeq-d03cb037.js"(e){var t=xt();function r(o,i,l){return l?`#${l.replace(/[\s\S]^/gm,`$&${i}#`)}
37
+ ${i}${o}`:o}function c(o,i,l){return l?l.indexOf(`
38
+ `)===-1?`${o} #${l}`:`${o}
39
+ `+l.replace(/^/gm,`${i||""}#`):o}var p=class{};function h(o,i,l){if(Array.isArray(o))return o.map((u,y)=>h(u,String(y),l));if(o&&typeof o.toJSON=="function"){let u=l&&l.anchors&&l.anchors.get(o);u&&(l.onCreate=w=>{u.res=w,delete l.onCreate});let y=o.toJSON(i,l);return u&&l.onCreate&&l.onCreate(y),y}return(!l||!l.keep)&&typeof o=="bigint"?Number(o):o}var f=class extends p{constructor(o){super(),this.value=o}toJSON(o,i){return i&&i.keep?this.value:h(this.value,o,i)}toString(){return String(this.value)}};function O(o,i,l){let u=l;for(let y=i.length-1;y>=0;--y){let w=i[y];if(Number.isInteger(w)&&w>=0){let A=[];A[w]=u,u=A}else{let A={};Object.defineProperty(A,w,{value:u,writable:!0,enumerable:!0,configurable:!0}),u=A}}return o.createNode(u,!1)}var U=o=>o==null||typeof o=="object"&&o[Symbol.iterator]().next().done,T=class mt extends p{constructor(i){super(),t._defineProperty(this,"items",[]),this.schema=i}addIn(i,l){if(U(i))this.add(l);else{let[u,...y]=i,w=this.get(u,!0);if(w instanceof mt)w.addIn(y,l);else if(w===void 0&&this.schema)this.set(u,O(this.schema,y,l));else throw new Error(`Expected YAML collection at ${u}. Remaining path: ${y}`)}}deleteIn([i,...l]){if(l.length===0)return this.delete(i);let u=this.get(i,!0);if(u instanceof mt)return u.deleteIn(l);throw new Error(`Expected YAML collection at ${i}. Remaining path: ${l}`)}getIn([i,...l],u){let y=this.get(i,!0);return l.length===0?!u&&y instanceof f?y.value:y:y instanceof mt?y.getIn(l,u):void 0}hasAllNullValues(){return this.items.every(i=>{if(!i||i.type!=="PAIR")return!1;let l=i.value;return l==null||l instanceof f&&l.value==null&&!l.commentBefore&&!l.comment&&!l.tag})}hasIn([i,...l]){if(l.length===0)return this.has(i);let u=this.get(i,!0);return u instanceof mt?u.hasIn(l):!1}setIn([i,...l],u){if(l.length===0)this.set(i,u);else{let y=this.get(i,!0);if(y instanceof mt)y.setIn(l,u);else if(y===void 0&&this.schema)this.set(i,O(this.schema,l,u));else throw new Error(`Expected YAML collection at ${i}. Remaining path: ${l}`)}}toJSON(){return null}toString(i,{blockItem:l,flowChars:u,isMap:y,itemIndent:w},A,v){let{indent:P,indentStep:D,stringify:q}=i,X=this.type===t.Type.FLOW_MAP||this.type===t.Type.FLOW_SEQ||i.inFlow;X&&(w+=D);let Te=y&&this.hasAllNullValues();i=Object.assign({},i,{allNullValues:Te,indent:w,inFlow:X,type:null});let se=!1,ge=!1,oe=this.items.reduce((xe,pe,Ee)=>{let fe;pe&&(!se&&pe.spaceBefore&&xe.push({type:"comment",str:""}),pe.commentBefore&&pe.commentBefore.match(/^.*$/gm).forEach(Qo=>{xe.push({type:"comment",str:`#${Qo}`})}),pe.comment&&(fe=pe.comment),X&&(!se&&pe.spaceBefore||pe.commentBefore||pe.comment||pe.key&&(pe.key.commentBefore||pe.key.comment)||pe.value&&(pe.value.commentBefore||pe.value.comment))&&(ge=!0)),se=!1;let Ue=q(pe,i,()=>fe=null,()=>se=!0);return X&&!ge&&Ue.includes(`
40
+ `)&&(ge=!0),X&&Ee<this.items.length-1&&(Ue+=","),Ue=c(Ue,w,fe),se&&(fe||X)&&(se=!1),xe.push({type:"item",str:Ue}),xe},[]),me;if(oe.length===0)me=u.start+u.end;else if(X){let{start:xe,end:pe}=u,Ee=oe.map(fe=>fe.str);if(ge||Ee.reduce((fe,Ue)=>fe+Ue.length+2,2)>mt.maxFlowStringSingleLineLength){me=xe;for(let fe of Ee)me+=fe?`
41
41
  ${D}${P}${fe}`:`
42
42
  `;me+=`
43
- ${P}${pe}`}else me=`${xe} ${Ee.join(" ")} ${pe}`}else{let xe=se.map(a);me=xe.shift();for(let pe of xe)me+=pe?`
43
+ ${P}${pe}`}else me=`${xe} ${Ee.join(" ")} ${pe}`}else{let xe=oe.map(l);me=xe.shift();for(let pe of xe)me+=pe?`
44
44
  ${P}${pe}`:`
45
45
  `}return this.comment?(me+=`
46
- `+this.comment.replace(/^/gm,`${P}#`),A&&A()):oe&&v&&v(),me}};t._defineProperty(T,"maxFlowStringSingleLineLength",60);function $(s){let r=s instanceof f?s.value:s;return r&&typeof r=="string"&&(r=Number(r)),Number.isInteger(r)&&r>=0?r:null}var E=class extends T{add(s){this.items.push(s)}delete(s){let r=$(s);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(s,r){let a=$(s);if(typeof a!="number")return;let u=this.items[a];return!r&&u instanceof f?u.value:u}has(s){let r=$(s);return typeof r=="number"&&r<this.items.length}set(s,r){let a=$(s);if(typeof a!="number")throw new Error(`Expected a valid index, not ${s}.`);this.items[a]=r}toJSON(s,r){let a=[];r&&r.onCreate&&r.onCreate(a);let u=0;for(let y of this.items)a.push(h(y,String(u++),r));return a}toString(s,r,a){return s?super.toString(s,{blockItem:u=>u.type==="comment"?u.str:`- ${u.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(s.indent||"")+" "},r,a):JSON.stringify(this)}},J=(s,r,a)=>r===null?"":typeof r!="object"?String(r):s instanceof p&&a&&a.doc?s.toString({anchors:Object.create(null),doc:a.doc,indent:"",indentStep:a.indentStep,inFlow:!0,inStringifyKey:!0,stringify:a.stringify}):JSON.stringify(r),W=class Fr extends p{constructor(r,a=null){super(),this.key=r,this.value=a,this.type=Fr.Type.PAIR}get commentBefore(){return this.key instanceof p?this.key.commentBefore:void 0}set commentBefore(r){if(this.key==null&&(this.key=new f(null)),this.key instanceof p)this.key.commentBefore=r;else{let a="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(a)}}addToJSMap(r,a){let u=h(this.key,"",r);if(a instanceof Map){let y=h(this.value,u,r);a.set(u,y)}else if(a instanceof Set)a.add(u);else{let y=J(this.key,u,r),w=h(this.value,y,r);y in a?Object.defineProperty(a,y,{value:w,writable:!0,enumerable:!0,configurable:!0}):a[y]=w}return a}toJSON(r,a){let u=a&&a.mapAsMap?new Map:{};return this.addToJSMap(a,u)}toString(r,a,u){if(!r||!r.doc)return JSON.stringify(this);let{indent:y,indentSeq:w,simpleKeys:A}=r.doc.options,{key:v,value:P}=this,D=v instanceof p&&v.comment;if(A){if(D)throw new Error("With simple keys, key nodes cannot have comments");if(v instanceof T){let Ue="With simple keys, collection cannot be used as a key value";throw new Error(Ue)}}let q=!A&&(!v||D||(v instanceof p?v instanceof T||v.type===t.Type.BLOCK_FOLDED||v.type===t.Type.BLOCK_LITERAL:typeof v=="object")),{doc:X,indent:be,indentStep:oe,stringify:ge}=r;r=Object.assign({},r,{implicitKey:!q,indent:be+oe});let se=!1,me=ge(v,r,()=>D=null,()=>se=!0);if(me=c(me,r.indent,D),!q&&me.length>1024){if(A)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");q=!0}if(r.allNullValues&&!A)return this.comment?(me=c(me,r.indent,this.comment),a&&a()):se&&!D&&u&&u(),r.inFlow&&!q?me:`? ${me}`;me=q?`? ${me}
47
- ${be}:`:`${me}:`,this.comment&&(me=c(me,r.indent,this.comment),a&&a());let xe="",pe=null;if(P instanceof p){if(P.spaceBefore&&(xe=`
48
- `),P.commentBefore){let Ue=P.commentBefore.replace(/^/gm,`${r.indent}#`);xe+=`
49
- ${Ue}`}pe=P.comment}else P&&typeof P=="object"&&(P=X.schema.createNode(P,!0));r.implicitKey=!1,!q&&!this.comment&&P instanceof f&&(r.indentAtStart=me.length+1),se=!1,!w&&y>=2&&!r.inFlow&&!q&&P instanceof E&&P.type!==t.Type.FLOW_SEQ&&!P.tag&&!X.anchors.getName(P)&&(r.indent=r.indent.substr(2));let Ee=ge(P,r,()=>pe=null,()=>se=!0),fe=" ";return xe||this.comment?fe=`${xe}
50
- ${r.indent}`:!q&&P instanceof T?(!(Ee[0]==="["||Ee[0]==="{")||Ee.includes(`
46
+ `+this.comment.replace(/^/gm,`${P}#`),A&&A()):se&&v&&v(),me}};t._defineProperty(T,"maxFlowStringSingleLineLength",60);function $(o){let i=o instanceof f?o.value:o;return i&&typeof i=="string"&&(i=Number(i)),Number.isInteger(i)&&i>=0?i:null}var E=class extends T{add(o){this.items.push(o)}delete(o){let i=$(o);return typeof i!="number"?!1:this.items.splice(i,1).length>0}get(o,i){let l=$(o);if(typeof l!="number")return;let u=this.items[l];return!i&&u instanceof f?u.value:u}has(o){let i=$(o);return typeof i=="number"&&i<this.items.length}set(o,i){let l=$(o);if(typeof l!="number")throw new Error(`Expected a valid index, not ${o}.`);this.items[l]=i}toJSON(o,i){let l=[];i&&i.onCreate&&i.onCreate(l);let u=0;for(let y of this.items)l.push(h(y,String(u++),i));return l}toString(o,i,l){return o?super.toString(o,{blockItem:u=>u.type==="comment"?u.str:`- ${u.str}`,flowChars:{start:"[",end:"]"},isMap:!1,itemIndent:(o.indent||"")+" "},i,l):JSON.stringify(this)}},J=(o,i,l)=>i===null?"":typeof i!="object"?String(i):o instanceof p&&l&&l.doc?o.toString({anchors:Object.create(null),doc:l.doc,indent:"",indentStep:l.indentStep,inFlow:!0,inStringifyKey:!0,stringify:l.stringify}):JSON.stringify(i),W=class Fi extends p{constructor(i,l=null){super(),this.key=i,this.value=l,this.type=Fi.Type.PAIR}get commentBefore(){return this.key instanceof p?this.key.commentBefore:void 0}set commentBefore(i){if(this.key==null&&(this.key=new f(null)),this.key instanceof p)this.key.commentBefore=i;else{let l="Pair.commentBefore is an alias for Pair.key.commentBefore. To set it, the key must be a Node.";throw new Error(l)}}addToJSMap(i,l){let u=h(this.key,"",i);if(l instanceof Map){let y=h(this.value,u,i);l.set(u,y)}else if(l instanceof Set)l.add(u);else{let y=J(this.key,u,i),w=h(this.value,y,i);y in l?Object.defineProperty(l,y,{value:w,writable:!0,enumerable:!0,configurable:!0}):l[y]=w}return l}toJSON(i,l){let u=l&&l.mapAsMap?new Map:{};return this.addToJSMap(l,u)}toString(i,l,u){if(!i||!i.doc)return JSON.stringify(this);let{indent:y,indentSeq:w,simpleKeys:A}=i.doc.options,{key:v,value:P}=this,D=v instanceof p&&v.comment;if(A){if(D)throw new Error("With simple keys, key nodes cannot have comments");if(v instanceof T){let Ue="With simple keys, collection cannot be used as a key value";throw new Error(Ue)}}let q=!A&&(!v||D||(v instanceof p?v instanceof T||v.type===t.Type.BLOCK_FOLDED||v.type===t.Type.BLOCK_LITERAL:typeof v=="object")),{doc:X,indent:Te,indentStep:se,stringify:ge}=i;i=Object.assign({},i,{implicitKey:!q,indent:Te+se});let oe=!1,me=ge(v,i,()=>D=null,()=>oe=!0);if(me=c(me,i.indent,D),!q&&me.length>1024){if(A)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");q=!0}if(i.allNullValues&&!A)return this.comment?(me=c(me,i.indent,this.comment),l&&l()):oe&&!D&&u&&u(),i.inFlow&&!q?me:`? ${me}`;me=q?`? ${me}
47
+ ${Te}:`:`${me}:`,this.comment&&(me=c(me,i.indent,this.comment),l&&l());let xe="",pe=null;if(P instanceof p){if(P.spaceBefore&&(xe=`
48
+ `),P.commentBefore){let Ue=P.commentBefore.replace(/^/gm,`${i.indent}#`);xe+=`
49
+ ${Ue}`}pe=P.comment}else P&&typeof P=="object"&&(P=X.schema.createNode(P,!0));i.implicitKey=!1,!q&&!this.comment&&P instanceof f&&(i.indentAtStart=me.length+1),oe=!1,!w&&y>=2&&!i.inFlow&&!q&&P instanceof E&&P.type!==t.Type.FLOW_SEQ&&!P.tag&&!X.anchors.getName(P)&&(i.indent=i.indent.substr(2));let Ee=ge(P,i,()=>pe=null,()=>oe=!0),fe=" ";return xe||this.comment?fe=`${xe}
50
+ ${i.indent}`:!q&&P instanceof T?(!(Ee[0]==="["||Ee[0]==="{")||Ee.includes(`
51
51
  `))&&(fe=`
52
- ${r.indent}`):Ee[0]===`
53
- `&&(fe=""),se&&!pe&&u&&u(),c(me+fe+Ee,r.indent,pe)}};t._defineProperty(W,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var ae=(s,r)=>{if(s instanceof Q){let a=r.get(s.source);return a.count*a.aliasCount}else if(s instanceof T){let a=0;for(let u of s.items){let y=ae(u,r);y>a&&(a=y)}return a}else if(s instanceof W){let a=ae(s.key,r),u=ae(s.value,r);return Math.max(a,u)}return 1},Q=class $r extends p{static stringify({range:r,source:a},{anchors:u,doc:y,implicitKey:w,inStringifyKey:A}){let v=Object.keys(u).find(D=>u[D]===a);if(!v&&A&&(v=y.anchors.getName(a)||y.anchors.newName()),v)return`*${v}${w?" ":""}`;let P=y.anchors.getName(a)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${P} [${r}]`)}constructor(r){super(),this.source=r,this.type=t.Type.ALIAS}set tag(r){throw new Error("Alias nodes cannot have tags")}toJSON(r,a){if(!a)return h(this.source,r,a);let{anchors:u,maxAliasCount:y}=a,w=u.get(this.source);if(!w||w.res===void 0){let A="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new t.YAMLReferenceError(this.cstNode,A):new ReferenceError(A)}if(y>=0&&(w.count+=1,w.aliasCount===0&&(w.aliasCount=ae(this.source,u)),w.count*w.aliasCount>y)){let A="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new t.YAMLReferenceError(this.cstNode,A):new ReferenceError(A)}return w.res}toString(r){return $r.stringify(this,r)}};t._defineProperty(Q,"default",!0);function ne(s,r){let a=r instanceof f?r.value:r;for(let u of s)if(u instanceof W&&(u.key===r||u.key===a||u.key&&u.key.value===a))return u}var he=class extends T{add(s,r){s?s instanceof W||(s=new W(s.key||s,s.value)):s=new W(s);let a=ne(this.items,s.key),u=this.schema&&this.schema.sortMapEntries;if(a)if(r)a.value=s.value;else throw new Error(`Key ${s.key} already set`);else if(u){let y=this.items.findIndex(w=>u(s,w)<0);y===-1?this.items.push(s):this.items.splice(y,0,s)}else this.items.push(s)}delete(s){let r=ne(this.items,s);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(s,r){let a=ne(this.items,s),u=a&&a.value;return!r&&u instanceof f?u.value:u}has(s){return!!ne(this.items,s)}set(s,r){this.add(new W(s,r),!0)}toJSON(s,r,a){let u=a?new a:r&&r.mapAsMap?new Map:{};r&&r.onCreate&&r.onCreate(u);for(let y of this.items)y.addToJSMap(r,u);return u}toString(s,r,a){if(!s)return JSON.stringify(this);for(let u of this.items)if(!(u instanceof W))throw new Error(`Map items must all be pairs; found ${JSON.stringify(u)} instead`);return super.toString(s,{blockItem:u=>u.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:s.indent||""},r,a)}},ye="<<",j=class extends W{constructor(s){if(s instanceof W){let r=s.value;r instanceof E||(r=new E,r.items.push(s.value),r.range=s.value.range),super(s.key,r),this.range=s.range}else super(new f(ye),new E);this.type=W.Type.MERGE_PAIR}addToJSMap(s,r){for(let{source:a}of this.value.items){if(!(a instanceof he))throw new Error("Merge sources must be maps");let u=a.toJSON(null,s,Map);for(let[y,w]of u)r instanceof Map?r.has(y)||r.set(y,w):r instanceof Set?r.add(y):Object.prototype.hasOwnProperty.call(r,y)||Object.defineProperty(r,y,{value:w,writable:!0,enumerable:!0,configurable:!0})}return r}toString(s,r){let a=this.value;if(a.items.length>1)return super.toString(s,r);this.value=a.items[0];let u=super.toString(s,r);return this.value=a,u}},S={defaultType:t.Type.BLOCK_LITERAL,lineWidth:76},b={trueStr:"true",falseStr:"false"},R={asBigInt:!1},x={nullStr:"null"},L={defaultType:t.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function _(s,r,a){for(let{format:u,test:y,resolve:w}of r)if(y){let A=s.match(y);if(A){let v=w.apply(null,A);return v instanceof f||(v=new f(v)),u&&(v.format=u),v}}return a&&(s=a(s)),new f(s)}var I="flow",C="block",V="quoted",G=(s,r)=>{let a=s[r+1];for(;a===" "||a===" ";){do a=s[r+=1];while(a&&a!==`
54
- `);a=s[r+1]}return r};function ee(s,r,a,{indentAtStart:u,lineWidth:y=80,minContentWidth:w=20,onFold:A,onOverflow:v}){if(!y||y<0)return s;let P=Math.max(1+w,1+y-r.length);if(s.length<=P)return s;let D=[],q={},X=y-r.length;typeof u=="number"&&(u>y-Math.max(2,w)?D.push(0):X=y-u);let be,oe,ge=!1,se=-1,me=-1,xe=-1;a===C&&(se=G(s,se),se!==-1&&(X=se+P));for(let Ee;Ee=s[se+=1];){if(a===V&&Ee==="\\"){switch(me=se,s[se+1]){case"x":se+=3;break;case"u":se+=5;break;case"U":se+=9;break;default:se+=1}xe=se}if(Ee===`
55
- `)a===C&&(se=G(s,se)),X=se+P,be=void 0;else{if(Ee===" "&&oe&&oe!==" "&&oe!==`
56
- `&&oe!==" "){let fe=s[se+1];fe&&fe!==" "&&fe!==`
57
- `&&fe!==" "&&(be=se)}if(se>=X)if(be)D.push(be),X=be+P,be=void 0;else if(a===V){for(;oe===" "||oe===" ";)oe=Ee,Ee=s[se+=1],ge=!0;let fe=se>xe+1?se-2:me-1;if(q[fe])return s;D.push(fe),q[fe]=!0,X=fe+P,be=void 0}else ge=!0}oe=Ee}if(ge&&v&&v(),D.length===0)return s;A&&A();let pe=s.slice(0,D[0]);for(let Ee=0;Ee<D.length;++Ee){let fe=D[Ee],Ue=D[Ee+1]||s.length;fe===0?pe=`
58
- ${r}${s.slice(0,Ue)}`:(a===V&&q[fe]&&(pe+=`${s[fe]}\\`),pe+=`
59
- ${r}${s.slice(fe+1,Ue)}`)}return pe}var Oe=({indentAtStart:s})=>s?Object.assign({indentAtStart:s},L.fold):L.fold,ve=s=>/^(%|---|\.\.\.)/m.test(s);function _e(s,r,a){if(!r||r<0)return!1;let u=r-a,y=s.length;if(y<=u)return!1;for(let w=0,A=0;w<y;++w)if(s[w]===`
60
- `){if(w-A>u)return!0;if(A=w+1,y-A<=u)return!1}return!0}function Pe(s,r){let{implicitKey:a}=r,{jsonEncoding:u,minMultiLineLength:y}=L.doubleQuoted,w=JSON.stringify(s);if(u)return w;let A=r.indent||(ve(s)?" ":""),v="",P=0;for(let D=0,q=w[D];q;q=w[++D])if(q===" "&&w[D+1]==="\\"&&w[D+2]==="n"&&(v+=w.slice(P,D)+"\\ ",D+=1,P=D,q="\\"),q==="\\")switch(w[D+1]){case"u":{v+=w.slice(P,D);let X=w.substr(D+2,4);switch(X){case"0000":v+="\\0";break;case"0007":v+="\\a";break;case"000b":v+="\\v";break;case"001b":v+="\\e";break;case"0085":v+="\\N";break;case"00a0":v+="\\_";break;case"2028":v+="\\L";break;case"2029":v+="\\P";break;default:X.substr(0,2)==="00"?v+="\\x"+X.substr(2):v+=w.substr(D,6)}D+=5,P=D+1}break;case"n":if(a||w[D+2]==='"'||w.length<y)D+=1;else{for(v+=w.slice(P,D)+`
52
+ ${i.indent}`):Ee[0]===`
53
+ `&&(fe=""),oe&&!pe&&u&&u(),c(me+fe+Ee,i.indent,pe)}};t._defineProperty(W,"Type",{PAIR:"PAIR",MERGE_PAIR:"MERGE_PAIR"});var ae=(o,i)=>{if(o instanceof Q){let l=i.get(o.source);return l.count*l.aliasCount}else if(o instanceof T){let l=0;for(let u of o.items){let y=ae(u,i);y>l&&(l=y)}return l}else if(o instanceof W){let l=ae(o.key,i),u=ae(o.value,i);return Math.max(l,u)}return 1},Q=class $i extends p{static stringify({range:i,source:l},{anchors:u,doc:y,implicitKey:w,inStringifyKey:A}){let v=Object.keys(u).find(D=>u[D]===l);if(!v&&A&&(v=y.anchors.getName(l)||y.anchors.newName()),v)return`*${v}${w?" ":""}`;let P=y.anchors.getName(l)?"Alias node must be after source node":"Source node not found for alias node";throw new Error(`${P} [${i}]`)}constructor(i){super(),this.source=i,this.type=t.Type.ALIAS}set tag(i){throw new Error("Alias nodes cannot have tags")}toJSON(i,l){if(!l)return h(this.source,i,l);let{anchors:u,maxAliasCount:y}=l,w=u.get(this.source);if(!w||w.res===void 0){let A="This should not happen: Alias anchor was not resolved?";throw this.cstNode?new t.YAMLReferenceError(this.cstNode,A):new ReferenceError(A)}if(y>=0&&(w.count+=1,w.aliasCount===0&&(w.aliasCount=ae(this.source,u)),w.count*w.aliasCount>y)){let A="Excessive alias count indicates a resource exhaustion attack";throw this.cstNode?new t.YAMLReferenceError(this.cstNode,A):new ReferenceError(A)}return w.res}toString(i){return $i.stringify(this,i)}};t._defineProperty(Q,"default",!0);function ne(o,i){let l=i instanceof f?i.value:i;for(let u of o)if(u instanceof W&&(u.key===i||u.key===l||u.key&&u.key.value===l))return u}var he=class extends T{add(o,i){o?o instanceof W||(o=new W(o.key||o,o.value)):o=new W(o);let l=ne(this.items,o.key),u=this.schema&&this.schema.sortMapEntries;if(l)if(i)l.value=o.value;else throw new Error(`Key ${o.key} already set`);else if(u){let y=this.items.findIndex(w=>u(o,w)<0);y===-1?this.items.push(o):this.items.splice(y,0,o)}else this.items.push(o)}delete(o){let i=ne(this.items,o);return i?this.items.splice(this.items.indexOf(i),1).length>0:!1}get(o,i){let l=ne(this.items,o),u=l&&l.value;return!i&&u instanceof f?u.value:u}has(o){return!!ne(this.items,o)}set(o,i){this.add(new W(o,i),!0)}toJSON(o,i,l){let u=l?new l:i&&i.mapAsMap?new Map:{};i&&i.onCreate&&i.onCreate(u);for(let y of this.items)y.addToJSMap(i,u);return u}toString(o,i,l){if(!o)return JSON.stringify(this);for(let u of this.items)if(!(u instanceof W))throw new Error(`Map items must all be pairs; found ${JSON.stringify(u)} instead`);return super.toString(o,{blockItem:u=>u.str,flowChars:{start:"{",end:"}"},isMap:!0,itemIndent:o.indent||""},i,l)}},ye="<<",j=class extends W{constructor(o){if(o instanceof W){let i=o.value;i instanceof E||(i=new E,i.items.push(o.value),i.range=o.value.range),super(o.key,i),this.range=o.range}else super(new f(ye),new E);this.type=W.Type.MERGE_PAIR}addToJSMap(o,i){for(let{source:l}of this.value.items){if(!(l instanceof he))throw new Error("Merge sources must be maps");let u=l.toJSON(null,o,Map);for(let[y,w]of u)i instanceof Map?i.has(y)||i.set(y,w):i instanceof Set?i.add(y):Object.prototype.hasOwnProperty.call(i,y)||Object.defineProperty(i,y,{value:w,writable:!0,enumerable:!0,configurable:!0})}return i}toString(o,i){let l=this.value;if(l.items.length>1)return super.toString(o,i);this.value=l.items[0];let u=super.toString(o,i);return this.value=l,u}},S={defaultType:t.Type.BLOCK_LITERAL,lineWidth:76},b={trueStr:"true",falseStr:"false"},R={asBigInt:!1},x={nullStr:"null"},L={defaultType:t.Type.PLAIN,doubleQuoted:{jsonEncoding:!1,minMultiLineLength:40},fold:{lineWidth:80,minContentWidth:20}};function _(o,i,l){for(let{format:u,test:y,resolve:w}of i)if(y){let A=o.match(y);if(A){let v=w.apply(null,A);return v instanceof f||(v=new f(v)),u&&(v.format=u),v}}return l&&(o=l(o)),new f(o)}var I="flow",M="block",V="quoted",G=(o,i)=>{let l=o[i+1];for(;l===" "||l===" ";){do l=o[i+=1];while(l&&l!==`
54
+ `);l=o[i+1]}return i};function ee(o,i,l,{indentAtStart:u,lineWidth:y=80,minContentWidth:w=20,onFold:A,onOverflow:v}){if(!y||y<0)return o;let P=Math.max(1+w,1+y-i.length);if(o.length<=P)return o;let D=[],q={},X=y-i.length;typeof u=="number"&&(u>y-Math.max(2,w)?D.push(0):X=y-u);let Te,se,ge=!1,oe=-1,me=-1,xe=-1;l===M&&(oe=G(o,oe),oe!==-1&&(X=oe+P));for(let Ee;Ee=o[oe+=1];){if(l===V&&Ee==="\\"){switch(me=oe,o[oe+1]){case"x":oe+=3;break;case"u":oe+=5;break;case"U":oe+=9;break;default:oe+=1}xe=oe}if(Ee===`
55
+ `)l===M&&(oe=G(o,oe)),X=oe+P,Te=void 0;else{if(Ee===" "&&se&&se!==" "&&se!==`
56
+ `&&se!==" "){let fe=o[oe+1];fe&&fe!==" "&&fe!==`
57
+ `&&fe!==" "&&(Te=oe)}if(oe>=X)if(Te)D.push(Te),X=Te+P,Te=void 0;else if(l===V){for(;se===" "||se===" ";)se=Ee,Ee=o[oe+=1],ge=!0;let fe=oe>xe+1?oe-2:me-1;if(q[fe])return o;D.push(fe),q[fe]=!0,X=fe+P,Te=void 0}else ge=!0}se=Ee}if(ge&&v&&v(),D.length===0)return o;A&&A();let pe=o.slice(0,D[0]);for(let Ee=0;Ee<D.length;++Ee){let fe=D[Ee],Ue=D[Ee+1]||o.length;fe===0?pe=`
58
+ ${i}${o.slice(0,Ue)}`:(l===V&&q[fe]&&(pe+=`${o[fe]}\\`),pe+=`
59
+ ${i}${o.slice(fe+1,Ue)}`)}return pe}var Ae=({indentAtStart:o})=>o?Object.assign({indentAtStart:o},L.fold):L.fold,ve=o=>/^(%|---|\.\.\.)/m.test(o);function _e(o,i,l){if(!i||i<0)return!1;let u=i-l,y=o.length;if(y<=u)return!1;for(let w=0,A=0;w<y;++w)if(o[w]===`
60
+ `){if(w-A>u)return!0;if(A=w+1,y-A<=u)return!1}return!0}function Pe(o,i){let{implicitKey:l}=i,{jsonEncoding:u,minMultiLineLength:y}=L.doubleQuoted,w=JSON.stringify(o);if(u)return w;let A=i.indent||(ve(o)?" ":""),v="",P=0;for(let D=0,q=w[D];q;q=w[++D])if(q===" "&&w[D+1]==="\\"&&w[D+2]==="n"&&(v+=w.slice(P,D)+"\\ ",D+=1,P=D,q="\\"),q==="\\")switch(w[D+1]){case"u":{v+=w.slice(P,D);let X=w.substr(D+2,4);switch(X){case"0000":v+="\\0";break;case"0007":v+="\\a";break;case"000b":v+="\\v";break;case"001b":v+="\\e";break;case"0085":v+="\\N";break;case"00a0":v+="\\_";break;case"2028":v+="\\L";break;case"2029":v+="\\P";break;default:X.substr(0,2)==="00"?v+="\\x"+X.substr(2):v+=w.substr(D,6)}D+=5,P=D+1}break;case"n":if(l||w[D+2]==='"'||w.length<y)D+=1;else{for(v+=w.slice(P,D)+`
61
61
 
62
62
  `;w[D+2]==="\\"&&w[D+3]==="n"&&w[D+4]!=='"';)v+=`
63
- `,D+=2;v+=A,w[D+2]===" "&&(v+="\\"),D+=1,P=D+1}break;default:D+=1}return v=P?v+w.slice(P):w,a?v:ee(v,A,V,Oe(r))}function Me(s,r){if(r.implicitKey){if(/\n/.test(s))return Pe(s,r)}else if(/[ \t]\n|\n[ \t]/.test(s))return Pe(s,r);let a=r.indent||(ve(s)?" ":""),u="'"+s.replace(/'/g,"''").replace(/\n+/g,`$&
64
- ${a}`)+"'";return r.implicitKey?u:ee(u,a,I,Oe(r))}function Y({comment:s,type:r,value:a},u,y,w){if(/\n[\t ]+$/.test(a)||/^\s*$/.test(a))return Pe(a,u);let A=u.indent||(u.forceBlockIndent||ve(a)?" ":""),v=A?"2":"1",P=r===t.Type.BLOCK_FOLDED?!1:r===t.Type.BLOCK_LITERAL?!0:!_e(a,L.fold.lineWidth,A.length),D=P?"|":">";if(!a)return D+`
65
- `;let q="",X="";if(a=a.replace(/[\n\t ]*$/,oe=>{let ge=oe.indexOf(`
66
- `);return ge===-1?D+="-":(a===oe||ge!==oe.length-1)&&(D+="+",w&&w()),X=oe.replace(/\n$/,""),""}).replace(/^[\n ]*/,oe=>{oe.indexOf(" ")!==-1&&(D+=v);let ge=oe.match(/ +$/);return ge?(q=oe.slice(0,-ge[0].length),ge[0]):(q=oe,"")}),X&&(X=X.replace(/\n+(?!\n|$)/g,`$&${A}`)),q&&(q=q.replace(/\n+/g,`$&${A}`)),s&&(D+=" #"+s.replace(/ ?[\r\n]+/g," "),y&&y()),!a)return`${D}${v}
67
- ${A}${X}`;if(P)return a=a.replace(/\n+/g,`$&${A}`),`${D}
68
- ${A}${q}${a}${X}`;a=a.replace(/\n+/g,`
69
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${A}`);let be=ee(`${q}${a}${X}`,A,C,L.fold);return`${D}
70
- ${A}${be}`}function m(s,r,a,u){let{comment:y,type:w,value:A}=s,{actualString:v,implicitKey:P,indent:D,inFlow:q}=r;if(P&&/[\n[\]{},]/.test(A)||q&&/[[\]{},]/.test(A))return Pe(A,r);if(!A||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(A))return P||q||A.indexOf(`
71
- `)===-1?A.indexOf('"')!==-1&&A.indexOf("'")===-1?Me(A,r):Pe(A,r):Y(s,r,a,u);if(!P&&!q&&w!==t.Type.PLAIN&&A.indexOf(`
72
- `)!==-1)return Y(s,r,a,u);if(D===""&&ve(A))return r.forceBlockIndent=!0,Y(s,r,a,u);let X=A.replace(/\n+/g,`$&
73
- ${D}`);if(v){let{tags:oe}=r.doc.schema;if(typeof _(X,oe,oe.scalarFallback).value!="string")return Pe(A,r)}let be=P?X:ee(X,D,I,Oe(r));return y&&!q&&(be.indexOf(`
63
+ `,D+=2;v+=A,w[D+2]===" "&&(v+="\\"),D+=1,P=D+1}break;default:D+=1}return v=P?v+w.slice(P):w,l?v:ee(v,A,V,Ae(i))}function Ce(o,i){if(i.implicitKey){if(/\n/.test(o))return Pe(o,i)}else if(/[ \t]\n|\n[ \t]/.test(o))return Pe(o,i);let l=i.indent||(ve(o)?" ":""),u="'"+o.replace(/'/g,"''").replace(/\n+/g,`$&
64
+ ${l}`)+"'";return i.implicitKey?u:ee(u,l,I,Ae(i))}function Y({comment:o,type:i,value:l},u,y,w){if(/\n[\t ]+$/.test(l)||/^\s*$/.test(l))return Pe(l,u);let A=u.indent||(u.forceBlockIndent||ve(l)?" ":""),v=A?"2":"1",P=i===t.Type.BLOCK_FOLDED?!1:i===t.Type.BLOCK_LITERAL?!0:!_e(l,L.fold.lineWidth,A.length),D=P?"|":">";if(!l)return D+`
65
+ `;let q="",X="";if(l=l.replace(/[\n\t ]*$/,se=>{let ge=se.indexOf(`
66
+ `);return ge===-1?D+="-":(l===se||ge!==se.length-1)&&(D+="+",w&&w()),X=se.replace(/\n$/,""),""}).replace(/^[\n ]*/,se=>{se.indexOf(" ")!==-1&&(D+=v);let ge=se.match(/ +$/);return ge?(q=se.slice(0,-ge[0].length),ge[0]):(q=se,"")}),X&&(X=X.replace(/\n+(?!\n|$)/g,`$&${A}`)),q&&(q=q.replace(/\n+/g,`$&${A}`)),o&&(D+=" #"+o.replace(/ ?[\r\n]+/g," "),y&&y()),!l)return`${D}${v}
67
+ ${A}${X}`;if(P)return l=l.replace(/\n+/g,`$&${A}`),`${D}
68
+ ${A}${q}${l}${X}`;l=l.replace(/\n+/g,`
69
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${A}`);let Te=ee(`${q}${l}${X}`,A,M,L.fold);return`${D}
70
+ ${A}${Te}`}function m(o,i,l,u){let{comment:y,type:w,value:A}=o,{actualString:v,implicitKey:P,indent:D,inFlow:q}=i;if(P&&/[\n[\]{},]/.test(A)||q&&/[[\]{},]/.test(A))return Pe(A,i);if(!A||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(A))return P||q||A.indexOf(`
71
+ `)===-1?A.indexOf('"')!==-1&&A.indexOf("'")===-1?Ce(A,i):Pe(A,i):Y(o,i,l,u);if(!P&&!q&&w!==t.Type.PLAIN&&A.indexOf(`
72
+ `)!==-1)return Y(o,i,l,u);if(D===""&&ve(A))return i.forceBlockIndent=!0,Y(o,i,l,u);let X=A.replace(/\n+/g,`$&
73
+ ${D}`);if(v){let{tags:se}=i.doc.schema;if(typeof _(X,se,se.scalarFallback).value!="string")return Pe(A,i)}let Te=P?X:ee(X,D,I,Ae(i));return y&&!q&&(Te.indexOf(`
74
74
  `)!==-1||y.indexOf(`
75
- `)!==-1)?(a&&a(),i(be,D,y)):be}function k(s,r,a,u){let{defaultType:y}=L,{implicitKey:w,inFlow:A}=r,{type:v,value:P}=s;typeof P!="string"&&(P=String(P),s=Object.assign({},s,{value:P}));let D=X=>{switch(X){case t.Type.BLOCK_FOLDED:case t.Type.BLOCK_LITERAL:return Y(s,r,a,u);case t.Type.QUOTE_DOUBLE:return Pe(P,r);case t.Type.QUOTE_SINGLE:return Me(P,r);case t.Type.PLAIN:return m(s,r,a,u);default:return null}};(v!==t.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(P)||(w||A)&&(v===t.Type.BLOCK_FOLDED||v===t.Type.BLOCK_LITERAL))&&(v=t.Type.QUOTE_DOUBLE);let q=D(v);if(q===null&&(q=D(y),q===null))throw new Error(`Unsupported default string type ${y}`);return q}function H({format:s,minFractionDigits:r,tag:a,value:u}){if(typeof u=="bigint")return String(u);if(!isFinite(u))return isNaN(u)?".nan":u<0?"-.inf":".inf";let y=JSON.stringify(u);if(!s&&r&&(!a||a==="tag:yaml.org,2002:float")&&/^\d/.test(y)){let w=y.indexOf(".");w<0&&(w=y.length,y+=".");let A=r-(y.length-w-1);for(;A-- >0;)y+="0"}return y}function K(s,r){let a,u;switch(r.type){case t.Type.FLOW_MAP:a="}",u="flow map";break;case t.Type.FLOW_SEQ:a="]",u="flow sequence";break;default:s.push(new t.YAMLSemanticError(r,"Not a flow collection!?"));return}let y;for(let w=r.items.length-1;w>=0;--w){let A=r.items[w];if(!A||A.type!==t.Type.COMMENT){y=A;break}}if(y&&y.char!==a){let w=`Expected ${u} to end with ${a}`,A;typeof y.offset=="number"?(A=new t.YAMLSemanticError(r,w),A.offset=y.offset+1):(A=new t.YAMLSemanticError(y,w),y.range&&y.range.end&&(A.offset=y.range.end-y.range.start)),s.push(A)}}function re(s,r){let a=r.context.src[r.range.start-1];if(a!==`
76
- `&&a!==" "&&a!==" "){let u="Comments must be separated from other tokens by white space characters";s.push(new t.YAMLSemanticError(r,u))}}function le(s,r){let a=String(r),u=a.substr(0,8)+"..."+a.substr(-8);return new t.YAMLSemanticError(s,`The "${u}" key is too long`)}function Ve(s,r){for(let{afterKey:a,before:u,comment:y}of r){let w=s.items[u];w?(a&&w.value&&(w=w.value),y===void 0?(a||!w.commentBefore)&&(w.spaceBefore=!0):w.commentBefore?w.commentBefore+=`
77
- `+y:w.commentBefore=y):y!==void 0&&(s.comment?s.comment+=`
78
- `+y:s.comment=y)}}function rt(s,r){let a=r.strValue;return a?typeof a=="string"?a:(a.errors.forEach(u=>{u.source||(u.source=r),s.errors.push(u)}),a.str):""}function ot(s,r){let{handle:a,suffix:u}=r.tag,y=s.tagPrefixes.find(w=>w.handle===a);if(!y){let w=s.getDefaults().tagPrefixes;if(w&&(y=w.find(A=>A.handle===a)),!y)throw new t.YAMLSemanticError(r,`The ${a} tag handle is non-default and was not declared.`)}if(!u)throw new t.YAMLSemanticError(r,`The ${a} tag has no suffix.`);if(a==="!"&&(s.version||s.options.version)==="1.0"){if(u[0]==="^")return s.warnings.push(new t.YAMLWarning(r,"YAML 1.0 ^ tag expansion is not supported")),u;if(/[:/]/.test(u)){let w=u.match(/^([a-z0-9-]+)\/(.*)/i);return w?`tag:${w[1]}.yaml.org,2002:${w[2]}`:`tag:${u}`}}return y.prefix+decodeURIComponent(u)}function nt(s,r){let{tag:a,type:u}=r,y=!1;if(a){let{handle:w,suffix:A,verbatim:v}=a;if(v){if(v!=="!"&&v!=="!!")return v;let P=`Verbatim tags aren't resolved, so ${v} is invalid.`;s.errors.push(new t.YAMLSemanticError(r,P))}else if(w==="!"&&!A)y=!0;else try{return ot(s,r)}catch(P){s.errors.push(P)}}switch(u){case t.Type.BLOCK_FOLDED:case t.Type.BLOCK_LITERAL:case t.Type.QUOTE_DOUBLE:case t.Type.QUOTE_SINGLE:return t.defaultTags.STR;case t.Type.FLOW_MAP:case t.Type.MAP:return t.defaultTags.MAP;case t.Type.FLOW_SEQ:case t.Type.SEQ:return t.defaultTags.SEQ;case t.Type.PLAIN:return y?t.defaultTags.STR:null;default:return null}}function Mt(s,r,a){let{tags:u}=s.schema,y=[];for(let A of u)if(A.tag===a)if(A.test)y.push(A);else{let v=A.resolve(s,r);return v instanceof T?v:new f(v)}let w=rt(s,r);return typeof w=="string"&&y.length>0?_(w,y,u.scalarFallback):null}function nn({type:s}){switch(s){case t.Type.FLOW_MAP:case t.Type.MAP:return t.defaultTags.MAP;case t.Type.FLOW_SEQ:case t.Type.SEQ:return t.defaultTags.SEQ;default:return t.defaultTags.STR}}function js(s,r,a){try{let u=Mt(s,r,a);if(u)return a&&r.tag&&(u.tag=a),u}catch(u){return u.source||(u.source=r),s.errors.push(u),null}try{let u=nn(r);if(!u)throw new Error(`The tag ${a} is unavailable`);let y=`The tag ${a} is unavailable, falling back to ${u}`;s.warnings.push(new t.YAMLWarning(r,y));let w=Mt(s,r,u);return w.tag=a,w}catch(u){let y=new t.YAMLReferenceError(r,u.message);return y.stack=u.stack,s.errors.push(y),null}}var Ys=s=>{if(!s)return!1;let{type:r}=s;return r===t.Type.MAP_KEY||r===t.Type.MAP_VALUE||r===t.Type.SEQ_ITEM};function Ws(s,r){let a={before:[],after:[]},u=!1,y=!1,w=Ys(r.context.parent)?r.context.parent.props.concat(r.props):r.props;for(let{start:A,end:v}of w)switch(r.context.src[A]){case t.Char.COMMENT:{if(!r.commentHasRequiredWhitespace(A)){let X="Comments must be separated from other tokens by white space characters";s.push(new t.YAMLSemanticError(r,X))}let{header:P,valueRange:D}=r;(D&&(A>D.start||P&&A>P.start)?a.after:a.before).push(r.context.src.slice(A+1,v));break}case t.Char.ANCHOR:if(u){let P="A node can have at most one anchor";s.push(new t.YAMLSemanticError(r,P))}u=!0;break;case t.Char.TAG:if(y){let P="A node can have at most one tag";s.push(new t.YAMLSemanticError(r,P))}y=!0;break}return{comments:a,hasAnchor:u,hasTag:y}}function Vs(s,r){let{anchors:a,errors:u,schema:y}=s;if(r.type===t.Type.ALIAS){let A=r.rawValue,v=a.getNode(A);if(!v){let D=`Aliased anchor not found: ${A}`;return u.push(new t.YAMLReferenceError(r,D)),null}let P=new Q(v);return a._cstAliases.push(P),P}let w=nt(s,r);if(w)return js(s,r,w);if(r.type!==t.Type.PLAIN){let A=`Failed to resolve ${r.type} node here`;return u.push(new t.YAMLSyntaxError(r,A)),null}try{let A=rt(s,r);return _(A,y.tags,y.tags.scalarFallback)}catch(A){return A.source||(A.source=r),u.push(A),null}}function pt(s,r){if(!r)return null;r.error&&s.errors.push(r.error);let{comments:a,hasAnchor:u,hasTag:y}=Ws(s.errors,r);if(u){let{anchors:A}=s,v=r.anchor,P=A.getNode(v);P&&(A.map[A.newName(v)]=P),A.map[v]=r}if(r.type===t.Type.ALIAS&&(u||y)){let A="An alias node must not specify any properties";s.errors.push(new t.YAMLSemanticError(r,A))}let w=Vs(s,r);if(w){w.range=[r.range.start,r.range.end],s.options.keepCstNodes&&(w.cstNode=r),s.options.keepNodeTypes&&(w.type=r.type);let A=a.before.join(`
75
+ `)!==-1)?(l&&l(),r(Te,D,y)):Te}function k(o,i,l,u){let{defaultType:y}=L,{implicitKey:w,inFlow:A}=i,{type:v,value:P}=o;typeof P!="string"&&(P=String(P),o=Object.assign({},o,{value:P}));let D=X=>{switch(X){case t.Type.BLOCK_FOLDED:case t.Type.BLOCK_LITERAL:return Y(o,i,l,u);case t.Type.QUOTE_DOUBLE:return Pe(P,i);case t.Type.QUOTE_SINGLE:return Ce(P,i);case t.Type.PLAIN:return m(o,i,l,u);default:return null}};(v!==t.Type.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f]/.test(P)||(w||A)&&(v===t.Type.BLOCK_FOLDED||v===t.Type.BLOCK_LITERAL))&&(v=t.Type.QUOTE_DOUBLE);let q=D(v);if(q===null&&(q=D(y),q===null))throw new Error(`Unsupported default string type ${y}`);return q}function H({format:o,minFractionDigits:i,tag:l,value:u}){if(typeof u=="bigint")return String(u);if(!isFinite(u))return isNaN(u)?".nan":u<0?"-.inf":".inf";let y=JSON.stringify(u);if(!o&&i&&(!l||l==="tag:yaml.org,2002:float")&&/^\d/.test(y)){let w=y.indexOf(".");w<0&&(w=y.length,y+=".");let A=i-(y.length-w-1);for(;A-- >0;)y+="0"}return y}function K(o,i){let l,u;switch(i.type){case t.Type.FLOW_MAP:l="}",u="flow map";break;case t.Type.FLOW_SEQ:l="]",u="flow sequence";break;default:o.push(new t.YAMLSemanticError(i,"Not a flow collection!?"));return}let y;for(let w=i.items.length-1;w>=0;--w){let A=i.items[w];if(!A||A.type!==t.Type.COMMENT){y=A;break}}if(y&&y.char!==l){let w=`Expected ${u} to end with ${l}`,A;typeof y.offset=="number"?(A=new t.YAMLSemanticError(i,w),A.offset=y.offset+1):(A=new t.YAMLSemanticError(y,w),y.range&&y.range.end&&(A.offset=y.range.end-y.range.start)),o.push(A)}}function ie(o,i){let l=i.context.src[i.range.start-1];if(l!==`
76
+ `&&l!==" "&&l!==" "){let u="Comments must be separated from other tokens by white space characters";o.push(new t.YAMLSemanticError(i,u))}}function le(o,i){let l=String(i),u=l.substr(0,8)+"..."+l.substr(-8);return new t.YAMLSemanticError(o,`The "${u}" key is too long`)}function Ve(o,i){for(let{afterKey:l,before:u,comment:y}of i){let w=o.items[u];w?(l&&w.value&&(w=w.value),y===void 0?(l||!w.commentBefore)&&(w.spaceBefore=!0):w.commentBefore?w.commentBefore+=`
77
+ `+y:w.commentBefore=y):y!==void 0&&(o.comment?o.comment+=`
78
+ `+y:o.comment=y)}}function it(o,i){let l=i.strValue;return l?typeof l=="string"?l:(l.errors.forEach(u=>{u.source||(u.source=i),o.errors.push(u)}),l.str):""}function st(o,i){let{handle:l,suffix:u}=i.tag,y=o.tagPrefixes.find(w=>w.handle===l);if(!y){let w=o.getDefaults().tagPrefixes;if(w&&(y=w.find(A=>A.handle===l)),!y)throw new t.YAMLSemanticError(i,`The ${l} tag handle is non-default and was not declared.`)}if(!u)throw new t.YAMLSemanticError(i,`The ${l} tag has no suffix.`);if(l==="!"&&(o.version||o.options.version)==="1.0"){if(u[0]==="^")return o.warnings.push(new t.YAMLWarning(i,"YAML 1.0 ^ tag expansion is not supported")),u;if(/[:/]/.test(u)){let w=u.match(/^([a-z0-9-]+)\/(.*)/i);return w?`tag:${w[1]}.yaml.org,2002:${w[2]}`:`tag:${u}`}}return y.prefix+decodeURIComponent(u)}function nt(o,i){let{tag:l,type:u}=i,y=!1;if(l){let{handle:w,suffix:A,verbatim:v}=l;if(v){if(v!=="!"&&v!=="!!")return v;let P=`Verbatim tags aren't resolved, so ${v} is invalid.`;o.errors.push(new t.YAMLSemanticError(i,P))}else if(w==="!"&&!A)y=!0;else try{return st(o,i)}catch(P){o.errors.push(P)}}switch(u){case t.Type.BLOCK_FOLDED:case t.Type.BLOCK_LITERAL:case t.Type.QUOTE_DOUBLE:case t.Type.QUOTE_SINGLE:return t.defaultTags.STR;case t.Type.FLOW_MAP:case t.Type.MAP:return t.defaultTags.MAP;case t.Type.FLOW_SEQ:case t.Type.SEQ:return t.defaultTags.SEQ;case t.Type.PLAIN:return y?t.defaultTags.STR:null;default:return null}}function Ct(o,i,l){let{tags:u}=o.schema,y=[];for(let A of u)if(A.tag===l)if(A.test)y.push(A);else{let v=A.resolve(o,i);return v instanceof T?v:new f(v)}let w=it(o,i);return typeof w=="string"&&y.length>0?_(w,y,u.scalarFallback):null}function nn({type:o}){switch(o){case t.Type.FLOW_MAP:case t.Type.MAP:return t.defaultTags.MAP;case t.Type.FLOW_SEQ:case t.Type.SEQ:return t.defaultTags.SEQ;default:return t.defaultTags.STR}}function jo(o,i,l){try{let u=Ct(o,i,l);if(u)return l&&i.tag&&(u.tag=l),u}catch(u){return u.source||(u.source=i),o.errors.push(u),null}try{let u=nn(i);if(!u)throw new Error(`The tag ${l} is unavailable`);let y=`The tag ${l} is unavailable, falling back to ${u}`;o.warnings.push(new t.YAMLWarning(i,y));let w=Ct(o,i,u);return w.tag=l,w}catch(u){let y=new t.YAMLReferenceError(i,u.message);return y.stack=u.stack,o.errors.push(y),null}}var Yo=o=>{if(!o)return!1;let{type:i}=o;return i===t.Type.MAP_KEY||i===t.Type.MAP_VALUE||i===t.Type.SEQ_ITEM};function Wo(o,i){let l={before:[],after:[]},u=!1,y=!1,w=Yo(i.context.parent)?i.context.parent.props.concat(i.props):i.props;for(let{start:A,end:v}of w)switch(i.context.src[A]){case t.Char.COMMENT:{if(!i.commentHasRequiredWhitespace(A)){let X="Comments must be separated from other tokens by white space characters";o.push(new t.YAMLSemanticError(i,X))}let{header:P,valueRange:D}=i;(D&&(A>D.start||P&&A>P.start)?l.after:l.before).push(i.context.src.slice(A+1,v));break}case t.Char.ANCHOR:if(u){let P="A node can have at most one anchor";o.push(new t.YAMLSemanticError(i,P))}u=!0;break;case t.Char.TAG:if(y){let P="A node can have at most one tag";o.push(new t.YAMLSemanticError(i,P))}y=!0;break}return{comments:l,hasAnchor:u,hasTag:y}}function Vo(o,i){let{anchors:l,errors:u,schema:y}=o;if(i.type===t.Type.ALIAS){let A=i.rawValue,v=l.getNode(A);if(!v){let D=`Aliased anchor not found: ${A}`;return u.push(new t.YAMLReferenceError(i,D)),null}let P=new Q(v);return l._cstAliases.push(P),P}let w=nt(o,i);if(w)return jo(o,i,w);if(i.type!==t.Type.PLAIN){let A=`Failed to resolve ${i.type} node here`;return u.push(new t.YAMLSyntaxError(i,A)),null}try{let A=it(o,i);return _(A,y.tags,y.tags.scalarFallback)}catch(A){return A.source||(A.source=i),u.push(A),null}}function pt(o,i){if(!i)return null;i.error&&o.errors.push(i.error);let{comments:l,hasAnchor:u,hasTag:y}=Wo(o.errors,i);if(u){let{anchors:A}=o,v=i.anchor,P=A.getNode(v);P&&(A.map[A.newName(v)]=P),A.map[v]=i}if(i.type===t.Type.ALIAS&&(u||y)){let A="An alias node must not specify any properties";o.errors.push(new t.YAMLSemanticError(i,A))}let w=Vo(o,i);if(w){w.range=[i.range.start,i.range.end],o.options.keepCstNodes&&(w.cstNode=i),o.options.keepNodeTypes&&(w.type=i.type);let A=l.before.join(`
79
79
  `);A&&(w.commentBefore=w.commentBefore?`${w.commentBefore}
80
- ${A}`:A);let v=a.after.join(`
80
+ ${A}`:A);let v=l.after.join(`
81
81
  `);v&&(w.comment=w.comment?`${w.comment}
82
- ${v}`:v)}return r.resolved=w}function qs(s,r){if(r.type!==t.Type.MAP&&r.type!==t.Type.FLOW_MAP){let A=`A ${r.type} node cannot be resolved as a mapping`;return s.errors.push(new t.YAMLSyntaxError(r,A)),null}let{comments:a,items:u}=r.type===t.Type.FLOW_MAP?Hs(s,r):Gs(s,r),y=new he;y.items=u,Ve(y,a);let w=!1;for(let A=0;A<u.length;++A){let{key:v}=u[A];if(v instanceof T&&(w=!0),s.schema.merge&&v&&v.value===ye){u[A]=new j(u[A]);let P=u[A].value.items,D=null;P.some(q=>{if(q instanceof Q){let{type:X}=q.source;return X===t.Type.MAP||X===t.Type.FLOW_MAP?!1:D="Merge nodes aliases can only point to maps"}return D="Merge nodes can only have Alias nodes as values"}),D&&s.errors.push(new t.YAMLSemanticError(r,D))}else for(let P=A+1;P<u.length;++P){let{key:D}=u[P];if(v===D||v&&D&&Object.prototype.hasOwnProperty.call(v,"value")&&v.value===D.value){let q=`Map keys must be unique; "${v}" is repeated`;s.errors.push(new t.YAMLSemanticError(r,q));break}}}if(w&&!s.options.mapAsMap){let A="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";s.warnings.push(new t.YAMLWarning(r,A))}return r.resolved=y,y}var Bs=({context:{lineStart:s,node:r,src:a},props:u})=>{if(u.length===0)return!1;let{start:y}=u[0];if(r&&y>r.valueRange.start||a[y]!==t.Char.COMMENT)return!1;for(let w=s;w<y;++w)if(a[w]===`
83
- `)return!1;return!0};function Js(s,r){if(!Bs(s))return;let a=s.getPropValue(0,t.Char.COMMENT,!0),u=!1,y=r.value.commentBefore;if(y&&y.startsWith(a))r.value.commentBefore=y.substr(a.length+1),u=!0;else{let w=r.value.comment;!s.node&&w&&w.startsWith(a)&&(r.value.comment=w.substr(a.length+1),u=!0)}u&&(r.comment=a)}function Gs(s,r){let a=[],u=[],y,w=null;for(let A=0;A<r.items.length;++A){let v=r.items[A];switch(v.type){case t.Type.BLANK_LINE:a.push({afterKey:!!y,before:u.length});break;case t.Type.COMMENT:a.push({afterKey:!!y,before:u.length,comment:v.comment});break;case t.Type.MAP_KEY:y!==void 0&&u.push(new W(y)),v.error&&s.errors.push(v.error),y=pt(s,v.node),w=null;break;case t.Type.MAP_VALUE:{if(y===void 0&&(y=null),v.error&&s.errors.push(v.error),!v.context.atLineStart&&v.node&&v.node.type===t.Type.MAP&&!v.node.context.atLineStart){let q="Nested mappings are not allowed in compact mappings";s.errors.push(new t.YAMLSemanticError(v.node,q))}let P=v.node;if(!P&&v.props.length>0){P=new t.PlainValue(t.Type.PLAIN,[]),P.context={parent:v,src:v.context.src};let q=v.range.start+1;if(P.range={start:q,end:q},P.valueRange={start:q,end:q},typeof v.range.origStart=="number"){let X=v.range.origStart+1;P.range.origStart=P.range.origEnd=X,P.valueRange.origStart=P.valueRange.origEnd=X}}let D=new W(y,pt(s,P));Js(v,D),u.push(D),y&&typeof w=="number"&&v.range.start>w+1024&&s.errors.push(le(r,y)),y=void 0,w=null}break;default:y!==void 0&&u.push(new W(y)),y=pt(s,v),w=v.range.start,v.error&&s.errors.push(v.error);e:for(let P=A+1;;++P){let D=r.items[P];switch(D&&D.type){case t.Type.BLANK_LINE:case t.Type.COMMENT:continue e;case t.Type.MAP_VALUE:break e;default:{let q="Implicit map keys need to be followed by map values";s.errors.push(new t.YAMLSemanticError(v,q));break e}}}if(v.valueRangeContainsNewline){let P="Implicit map keys need to be on a single line";s.errors.push(new t.YAMLSemanticError(v,P))}}}return y!==void 0&&u.push(new W(y)),{comments:a,items:u}}function Hs(s,r){let a=[],u=[],y,w=!1,A="{";for(let v=0;v<r.items.length;++v){let P=r.items[v];if(typeof P.char=="string"){let{char:D,offset:q}=P;if(D==="?"&&y===void 0&&!w){w=!0,A=":";continue}if(D===":"){if(y===void 0&&(y=null),A===":"){A=",";continue}}else if(w&&(y===void 0&&D!==","&&(y=null),w=!1),y!==void 0&&(u.push(new W(y)),y=void 0,D===",")){A=":";continue}if(D==="}"){if(v===r.items.length-1)continue}else if(D===A){A=":";continue}let X=`Flow map contains an unexpected ${D}`,be=new t.YAMLSyntaxError(r,X);be.offset=q,s.errors.push(be)}else P.type===t.Type.BLANK_LINE?a.push({afterKey:!!y,before:u.length}):P.type===t.Type.COMMENT?(re(s.errors,P),a.push({afterKey:!!y,before:u.length,comment:P.comment})):y===void 0?(A===","&&s.errors.push(new t.YAMLSemanticError(P,"Separator , missing in flow map")),y=pt(s,P)):(A!==","&&s.errors.push(new t.YAMLSemanticError(P,"Indicator : missing in flow map entry")),u.push(new W(y,pt(s,P))),y=void 0,w=!1)}return K(s.errors,r),y!==void 0&&u.push(new W(y)),{comments:a,items:u}}function Ks(s,r){if(r.type!==t.Type.SEQ&&r.type!==t.Type.FLOW_SEQ){let w=`A ${r.type} node cannot be resolved as a sequence`;return s.errors.push(new t.YAMLSyntaxError(r,w)),null}let{comments:a,items:u}=r.type===t.Type.FLOW_SEQ?Xs(s,r):zs(s,r),y=new E;if(y.items=u,Ve(y,a),!s.options.mapAsMap&&u.some(w=>w instanceof W&&w.key instanceof T)){let w="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";s.warnings.push(new t.YAMLWarning(r,w))}return r.resolved=y,y}function zs(s,r){let a=[],u=[];for(let y=0;y<r.items.length;++y){let w=r.items[y];switch(w.type){case t.Type.BLANK_LINE:a.push({before:u.length});break;case t.Type.COMMENT:a.push({comment:w.comment,before:u.length});break;case t.Type.SEQ_ITEM:if(w.error&&s.errors.push(w.error),u.push(pt(s,w.node)),w.hasProps){let A="Sequence items cannot have tags or anchors before the - indicator";s.errors.push(new t.YAMLSemanticError(w,A))}break;default:w.error&&s.errors.push(w.error),s.errors.push(new t.YAMLSyntaxError(w,`Unexpected ${w.type} node in sequence`))}}return{comments:a,items:u}}function Xs(s,r){let a=[],u=[],y=!1,w,A=null,v="[",P=null;for(let D=0;D<r.items.length;++D){let q=r.items[D];if(typeof q.char=="string"){let{char:X,offset:be}=q;if(X!==":"&&(y||w!==void 0)&&(y&&w===void 0&&(w=v?u.pop():null),u.push(new W(w)),y=!1,w=void 0,A=null),X===v)v=null;else if(!v&&X==="?")y=!0;else if(v!=="["&&X===":"&&w===void 0){if(v===","){if(w=u.pop(),w instanceof W){let oe="Chaining flow sequence pairs is invalid",ge=new t.YAMLSemanticError(r,oe);ge.offset=be,s.errors.push(ge)}if(!y&&typeof A=="number"){let oe=q.range?q.range.start:q.offset;oe>A+1024&&s.errors.push(le(r,w));let{src:ge}=P.context;for(let se=A;se<oe;++se)if(ge[se]===`
84
- `){let me="Implicit keys of flow sequence pairs need to be on a single line";s.errors.push(new t.YAMLSemanticError(P,me));break}}}else w=null;A=null,y=!1,v=null}else if(v==="["||X!=="]"||D<r.items.length-1){let oe=`Flow sequence contains an unexpected ${X}`,ge=new t.YAMLSyntaxError(r,oe);ge.offset=be,s.errors.push(ge)}}else if(q.type===t.Type.BLANK_LINE)a.push({before:u.length});else if(q.type===t.Type.COMMENT)re(s.errors,q),a.push({comment:q.comment,before:u.length});else{if(v){let be=`Expected a ${v} in flow sequence`;s.errors.push(new t.YAMLSemanticError(q,be))}let X=pt(s,q);w===void 0?(u.push(X),P=q):(u.push(new W(w,X)),w=void 0),A=q.range.start,v=","}}return K(s.errors,r),w!==void 0&&u.push(new W(w)),{comments:a,items:u}}e.Alias=Q,e.Collection=T,e.Merge=j,e.Node=p,e.Pair=W,e.Scalar=f,e.YAMLMap=he,e.YAMLSeq=E,e.addComment=c,e.binaryOptions=S,e.boolOptions=b,e.findPair=ne,e.intOptions=R,e.isEmptyPath=U,e.nullOptions=x,e.resolveMap=qs,e.resolveNode=pt,e.resolveSeq=Ks,e.resolveString=rt,e.strOptions=L,e.stringifyNumber=H,e.stringifyString=k,e.toJSON=h}}),ai=je({"node_modules/yaml/dist/warnings-1000a372.js"(e){var t=xt(),i=Kt(),c={identify:_=>_ instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(_,I)=>{let C=i.resolveString(_,I);if(typeof Buffer=="function")return Buffer.from(C,"base64");if(typeof atob=="function"){let V=atob(C.replace(/[\n\r]/g,"")),G=new Uint8Array(V.length);for(let ee=0;ee<V.length;++ee)G[ee]=V.charCodeAt(ee);return G}else{let V="This environment does not support reading binary tags; either Buffer or atob is required";return _.errors.push(new t.YAMLReferenceError(I,V)),null}},options:i.binaryOptions,stringify:({comment:_,type:I,value:C},V,G,ee)=>{let Oe;if(typeof Buffer=="function")Oe=C instanceof Buffer?C.toString("base64"):Buffer.from(C.buffer).toString("base64");else if(typeof btoa=="function"){let ve="";for(let _e=0;_e<C.length;++_e)ve+=String.fromCharCode(C[_e]);Oe=btoa(ve)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(I||(I=i.binaryOptions.defaultType),I===t.Type.QUOTE_DOUBLE)C=Oe;else{let{lineWidth:ve}=i.binaryOptions,_e=Math.ceil(Oe.length/ve),Pe=new Array(_e);for(let Me=0,Y=0;Me<_e;++Me,Y+=ve)Pe[Me]=Oe.substr(Y,ve);C=Pe.join(I===t.Type.BLOCK_LITERAL?`
85
- `:" ")}return i.stringifyString({comment:_,type:I,value:C},V,G,ee)}};function p(_,I){let C=i.resolveSeq(_,I);for(let V=0;V<C.items.length;++V){let G=C.items[V];if(!(G instanceof i.Pair)){if(G instanceof i.YAMLMap){if(G.items.length>1){let Oe="Each pair must have its own sequence indicator";throw new t.YAMLSemanticError(I,Oe)}let ee=G.items[0]||new i.Pair;G.commentBefore&&(ee.commentBefore=ee.commentBefore?`${G.commentBefore}
82
+ ${v}`:v)}return i.resolved=w}function qo(o,i){if(i.type!==t.Type.MAP&&i.type!==t.Type.FLOW_MAP){let A=`A ${i.type} node cannot be resolved as a mapping`;return o.errors.push(new t.YAMLSyntaxError(i,A)),null}let{comments:l,items:u}=i.type===t.Type.FLOW_MAP?Ho(o,i):Go(o,i),y=new he;y.items=u,Ve(y,l);let w=!1;for(let A=0;A<u.length;++A){let{key:v}=u[A];if(v instanceof T&&(w=!0),o.schema.merge&&v&&v.value===ye){u[A]=new j(u[A]);let P=u[A].value.items,D=null;P.some(q=>{if(q instanceof Q){let{type:X}=q.source;return X===t.Type.MAP||X===t.Type.FLOW_MAP?!1:D="Merge nodes aliases can only point to maps"}return D="Merge nodes can only have Alias nodes as values"}),D&&o.errors.push(new t.YAMLSemanticError(i,D))}else for(let P=A+1;P<u.length;++P){let{key:D}=u[P];if(v===D||v&&D&&Object.prototype.hasOwnProperty.call(v,"value")&&v.value===D.value){let q=`Map keys must be unique; "${v}" is repeated`;o.errors.push(new t.YAMLSemanticError(i,q));break}}}if(w&&!o.options.mapAsMap){let A="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";o.warnings.push(new t.YAMLWarning(i,A))}return i.resolved=y,y}var Bo=({context:{lineStart:o,node:i,src:l},props:u})=>{if(u.length===0)return!1;let{start:y}=u[0];if(i&&y>i.valueRange.start||l[y]!==t.Char.COMMENT)return!1;for(let w=o;w<y;++w)if(l[w]===`
83
+ `)return!1;return!0};function Jo(o,i){if(!Bo(o))return;let l=o.getPropValue(0,t.Char.COMMENT,!0),u=!1,y=i.value.commentBefore;if(y&&y.startsWith(l))i.value.commentBefore=y.substr(l.length+1),u=!0;else{let w=i.value.comment;!o.node&&w&&w.startsWith(l)&&(i.value.comment=w.substr(l.length+1),u=!0)}u&&(i.comment=l)}function Go(o,i){let l=[],u=[],y,w=null;for(let A=0;A<i.items.length;++A){let v=i.items[A];switch(v.type){case t.Type.BLANK_LINE:l.push({afterKey:!!y,before:u.length});break;case t.Type.COMMENT:l.push({afterKey:!!y,before:u.length,comment:v.comment});break;case t.Type.MAP_KEY:y!==void 0&&u.push(new W(y)),v.error&&o.errors.push(v.error),y=pt(o,v.node),w=null;break;case t.Type.MAP_VALUE:{if(y===void 0&&(y=null),v.error&&o.errors.push(v.error),!v.context.atLineStart&&v.node&&v.node.type===t.Type.MAP&&!v.node.context.atLineStart){let q="Nested mappings are not allowed in compact mappings";o.errors.push(new t.YAMLSemanticError(v.node,q))}let P=v.node;if(!P&&v.props.length>0){P=new t.PlainValue(t.Type.PLAIN,[]),P.context={parent:v,src:v.context.src};let q=v.range.start+1;if(P.range={start:q,end:q},P.valueRange={start:q,end:q},typeof v.range.origStart=="number"){let X=v.range.origStart+1;P.range.origStart=P.range.origEnd=X,P.valueRange.origStart=P.valueRange.origEnd=X}}let D=new W(y,pt(o,P));Jo(v,D),u.push(D),y&&typeof w=="number"&&v.range.start>w+1024&&o.errors.push(le(i,y)),y=void 0,w=null}break;default:y!==void 0&&u.push(new W(y)),y=pt(o,v),w=v.range.start,v.error&&o.errors.push(v.error);e:for(let P=A+1;;++P){let D=i.items[P];switch(D&&D.type){case t.Type.BLANK_LINE:case t.Type.COMMENT:continue e;case t.Type.MAP_VALUE:break e;default:{let q="Implicit map keys need to be followed by map values";o.errors.push(new t.YAMLSemanticError(v,q));break e}}}if(v.valueRangeContainsNewline){let P="Implicit map keys need to be on a single line";o.errors.push(new t.YAMLSemanticError(v,P))}}}return y!==void 0&&u.push(new W(y)),{comments:l,items:u}}function Ho(o,i){let l=[],u=[],y,w=!1,A="{";for(let v=0;v<i.items.length;++v){let P=i.items[v];if(typeof P.char=="string"){let{char:D,offset:q}=P;if(D==="?"&&y===void 0&&!w){w=!0,A=":";continue}if(D===":"){if(y===void 0&&(y=null),A===":"){A=",";continue}}else if(w&&(y===void 0&&D!==","&&(y=null),w=!1),y!==void 0&&(u.push(new W(y)),y=void 0,D===",")){A=":";continue}if(D==="}"){if(v===i.items.length-1)continue}else if(D===A){A=":";continue}let X=`Flow map contains an unexpected ${D}`,Te=new t.YAMLSyntaxError(i,X);Te.offset=q,o.errors.push(Te)}else P.type===t.Type.BLANK_LINE?l.push({afterKey:!!y,before:u.length}):P.type===t.Type.COMMENT?(ie(o.errors,P),l.push({afterKey:!!y,before:u.length,comment:P.comment})):y===void 0?(A===","&&o.errors.push(new t.YAMLSemanticError(P,"Separator , missing in flow map")),y=pt(o,P)):(A!==","&&o.errors.push(new t.YAMLSemanticError(P,"Indicator : missing in flow map entry")),u.push(new W(y,pt(o,P))),y=void 0,w=!1)}return K(o.errors,i),y!==void 0&&u.push(new W(y)),{comments:l,items:u}}function Ko(o,i){if(i.type!==t.Type.SEQ&&i.type!==t.Type.FLOW_SEQ){let w=`A ${i.type} node cannot be resolved as a sequence`;return o.errors.push(new t.YAMLSyntaxError(i,w)),null}let{comments:l,items:u}=i.type===t.Type.FLOW_SEQ?Xo(o,i):zo(o,i),y=new E;if(y.items=u,Ve(y,l),!o.options.mapAsMap&&u.some(w=>w instanceof W&&w.key instanceof T)){let w="Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this.";o.warnings.push(new t.YAMLWarning(i,w))}return i.resolved=y,y}function zo(o,i){let l=[],u=[];for(let y=0;y<i.items.length;++y){let w=i.items[y];switch(w.type){case t.Type.BLANK_LINE:l.push({before:u.length});break;case t.Type.COMMENT:l.push({comment:w.comment,before:u.length});break;case t.Type.SEQ_ITEM:if(w.error&&o.errors.push(w.error),u.push(pt(o,w.node)),w.hasProps){let A="Sequence items cannot have tags or anchors before the - indicator";o.errors.push(new t.YAMLSemanticError(w,A))}break;default:w.error&&o.errors.push(w.error),o.errors.push(new t.YAMLSyntaxError(w,`Unexpected ${w.type} node in sequence`))}}return{comments:l,items:u}}function Xo(o,i){let l=[],u=[],y=!1,w,A=null,v="[",P=null;for(let D=0;D<i.items.length;++D){let q=i.items[D];if(typeof q.char=="string"){let{char:X,offset:Te}=q;if(X!==":"&&(y||w!==void 0)&&(y&&w===void 0&&(w=v?u.pop():null),u.push(new W(w)),y=!1,w=void 0,A=null),X===v)v=null;else if(!v&&X==="?")y=!0;else if(v!=="["&&X===":"&&w===void 0){if(v===","){if(w=u.pop(),w instanceof W){let se="Chaining flow sequence pairs is invalid",ge=new t.YAMLSemanticError(i,se);ge.offset=Te,o.errors.push(ge)}if(!y&&typeof A=="number"){let se=q.range?q.range.start:q.offset;se>A+1024&&o.errors.push(le(i,w));let{src:ge}=P.context;for(let oe=A;oe<se;++oe)if(ge[oe]===`
84
+ `){let me="Implicit keys of flow sequence pairs need to be on a single line";o.errors.push(new t.YAMLSemanticError(P,me));break}}}else w=null;A=null,y=!1,v=null}else if(v==="["||X!=="]"||D<i.items.length-1){let se=`Flow sequence contains an unexpected ${X}`,ge=new t.YAMLSyntaxError(i,se);ge.offset=Te,o.errors.push(ge)}}else if(q.type===t.Type.BLANK_LINE)l.push({before:u.length});else if(q.type===t.Type.COMMENT)ie(o.errors,q),l.push({comment:q.comment,before:u.length});else{if(v){let Te=`Expected a ${v} in flow sequence`;o.errors.push(new t.YAMLSemanticError(q,Te))}let X=pt(o,q);w===void 0?(u.push(X),P=q):(u.push(new W(w,X)),w=void 0),A=q.range.start,v=","}}return K(o.errors,i),w!==void 0&&u.push(new W(w)),{comments:l,items:u}}e.Alias=Q,e.Collection=T,e.Merge=j,e.Node=p,e.Pair=W,e.Scalar=f,e.YAMLMap=he,e.YAMLSeq=E,e.addComment=c,e.binaryOptions=S,e.boolOptions=b,e.findPair=ne,e.intOptions=R,e.isEmptyPath=U,e.nullOptions=x,e.resolveMap=qo,e.resolveNode=pt,e.resolveSeq=Ko,e.resolveString=it,e.strOptions=L,e.stringifyNumber=H,e.stringifyString=k,e.toJSON=h}}),ar=je({"node_modules/yaml/dist/warnings-1000a372.js"(e){var t=xt(),r=Kt(),c={identify:_=>_ instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve:(_,I)=>{let M=r.resolveString(_,I);if(typeof Buffer=="function")return Buffer.from(M,"base64");if(typeof atob=="function"){let V=atob(M.replace(/[\n\r]/g,"")),G=new Uint8Array(V.length);for(let ee=0;ee<V.length;++ee)G[ee]=V.charCodeAt(ee);return G}else{let V="This environment does not support reading binary tags; either Buffer or atob is required";return _.errors.push(new t.YAMLReferenceError(I,V)),null}},options:r.binaryOptions,stringify:({comment:_,type:I,value:M},V,G,ee)=>{let Ae;if(typeof Buffer=="function")Ae=M instanceof Buffer?M.toString("base64"):Buffer.from(M.buffer).toString("base64");else if(typeof btoa=="function"){let ve="";for(let _e=0;_e<M.length;++_e)ve+=String.fromCharCode(M[_e]);Ae=btoa(ve)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(I||(I=r.binaryOptions.defaultType),I===t.Type.QUOTE_DOUBLE)M=Ae;else{let{lineWidth:ve}=r.binaryOptions,_e=Math.ceil(Ae.length/ve),Pe=new Array(_e);for(let Ce=0,Y=0;Ce<_e;++Ce,Y+=ve)Pe[Ce]=Ae.substr(Y,ve);M=Pe.join(I===t.Type.BLOCK_LITERAL?`
85
+ `:" ")}return r.stringifyString({comment:_,type:I,value:M},V,G,ee)}};function p(_,I){let M=r.resolveSeq(_,I);for(let V=0;V<M.items.length;++V){let G=M.items[V];if(!(G instanceof r.Pair)){if(G instanceof r.YAMLMap){if(G.items.length>1){let Ae="Each pair must have its own sequence indicator";throw new t.YAMLSemanticError(I,Ae)}let ee=G.items[0]||new r.Pair;G.commentBefore&&(ee.commentBefore=ee.commentBefore?`${G.commentBefore}
86
86
  ${ee.commentBefore}`:G.commentBefore),G.comment&&(ee.comment=ee.comment?`${G.comment}
87
- ${ee.comment}`:G.comment),G=ee}C.items[V]=G instanceof i.Pair?G:new i.Pair(G)}}return C}function h(_,I,C){let V=new i.YAMLSeq(_);V.tag="tag:yaml.org,2002:pairs";for(let G of I){let ee,Oe;if(Array.isArray(G))if(G.length===2)ee=G[0],Oe=G[1];else throw new TypeError(`Expected [key, value] tuple: ${G}`);else if(G&&G instanceof Object){let _e=Object.keys(G);if(_e.length===1)ee=_e[0],Oe=G[ee];else throw new TypeError(`Expected { key: value } tuple: ${G}`)}else ee=G;let ve=_.createPair(ee,Oe,C);V.items.push(ve)}return V}var f={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:p,createNode:h},O=class jr extends i.YAMLSeq{constructor(){super(),t._defineProperty(this,"add",i.YAMLMap.prototype.add.bind(this)),t._defineProperty(this,"delete",i.YAMLMap.prototype.delete.bind(this)),t._defineProperty(this,"get",i.YAMLMap.prototype.get.bind(this)),t._defineProperty(this,"has",i.YAMLMap.prototype.has.bind(this)),t._defineProperty(this,"set",i.YAMLMap.prototype.set.bind(this)),this.tag=jr.tag}toJSON(I,C){let V=new Map;C&&C.onCreate&&C.onCreate(V);for(let G of this.items){let ee,Oe;if(G instanceof i.Pair?(ee=i.toJSON(G.key,"",C),Oe=i.toJSON(G.value,ee,C)):ee=i.toJSON(G,"",C),V.has(ee))throw new Error("Ordered maps must not include duplicate keys");V.set(ee,Oe)}return V}};t._defineProperty(O,"tag","tag:yaml.org,2002:omap");function U(_,I){let C=p(_,I),V=[];for(let{key:G}of C.items)if(G instanceof i.Scalar)if(V.includes(G.value)){let ee="Ordered maps must not include duplicate keys";throw new t.YAMLSemanticError(I,ee)}else V.push(G.value);return Object.assign(new O,C)}function T(_,I,C){let V=h(_,I,C),G=new O;return G.items=V.items,G}var $={identify:_=>_ instanceof Map,nodeClass:O,default:!1,tag:"tag:yaml.org,2002:omap",resolve:U,createNode:T},E=class Yr extends i.YAMLMap{constructor(){super(),this.tag=Yr.tag}add(I){let C=I instanceof i.Pair?I:new i.Pair(I);i.findPair(this.items,C.key)||this.items.push(C)}get(I,C){let V=i.findPair(this.items,I);return!C&&V instanceof i.Pair?V.key instanceof i.Scalar?V.key.value:V.key:V}set(I,C){if(typeof C!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof C}`);let V=i.findPair(this.items,I);V&&!C?this.items.splice(this.items.indexOf(V),1):!V&&C&&this.items.push(new i.Pair(I))}toJSON(I,C){return super.toJSON(I,C,Set)}toString(I,C,V){if(!I)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(I,C,V);throw new Error("Set items must all have null values")}};t._defineProperty(E,"tag","tag:yaml.org,2002:set");function J(_,I){let C=i.resolveMap(_,I);if(!C.hasAllNullValues())throw new t.YAMLSemanticError(I,"Set items must all have null values");return Object.assign(new E,C)}function W(_,I,C){let V=new E;for(let G of I)V.items.push(_.createPair(G,null,C));return V}var ae={identify:_=>_ instanceof Set,nodeClass:E,default:!1,tag:"tag:yaml.org,2002:set",resolve:J,createNode:W},Q=(_,I)=>{let C=I.split(":").reduce((V,G)=>V*60+Number(G),0);return _==="-"?-C:C},ne=({value:_})=>{if(isNaN(_)||!isFinite(_))return i.stringifyNumber(_);let I="";_<0&&(I="-",_=Math.abs(_));let C=[_%60];return _<60?C.unshift(0):(_=Math.round((_-C[0])/60),C.unshift(_%60),_>=60&&(_=Math.round((_-C[0])/60),C.unshift(_))),I+C.map(V=>V<10?"0"+String(V):String(V)).join(":").replace(/000000\d*$/,"")},he={identify:_=>typeof _=="number",default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(_,I,C)=>Q(I,C.replace(/_/g,"")),stringify:ne},ye={identify:_=>typeof _=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(_,I,C)=>Q(I,C.replace(/_/g,"")),stringify:ne},j={identify:_=>_ instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:/^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\.[0-9]+)?)(?:[ \t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$/,resolve:(_,I,C,V,G,ee,Oe,ve,_e)=>{ve&&(ve=(ve+"00").substr(1,3));let Pe=Date.UTC(I,C-1,V,G||0,ee||0,Oe||0,ve||0);if(_e&&_e!=="Z"){let Me=Q(_e[0],_e.slice(1));Math.abs(Me)<30&&(Me*=60),Pe-=6e4*Me}return new Date(Pe)},stringify:({value:_})=>_.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function S(_){let I=typeof process!="undefined"&&process.env||{};return _?typeof YAML_SILENCE_DEPRECATION_WARNINGS!="undefined"?!YAML_SILENCE_DEPRECATION_WARNINGS:!I.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS!="undefined"?!YAML_SILENCE_WARNINGS:!I.YAML_SILENCE_WARNINGS}function b(_,I){if(S(!1)){let C=typeof process!="undefined"&&process.emitWarning;C?C(_,I):console.warn(I?`${I}: ${_}`:_)}}function R(_){if(S(!0)){let I=_.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");b(`The endpoint 'yaml/${I}' will be removed in a future release.`,"DeprecationWarning")}}var x={};function L(_,I){if(!x[_]&&S(!0)){x[_]=!0;let C=`The option '${_}' will be removed in a future release`;C+=I?`, use '${I}' instead.`:".",b(C,"DeprecationWarning")}}e.binary=c,e.floatTime=ye,e.intTime=he,e.omap=$,e.pairs=f,e.set=ae,e.timestamp=j,e.warn=b,e.warnFileDeprecation=R,e.warnOptionDeprecation=L}}),qi=je({"node_modules/yaml/dist/Schema-88e323a7.js"(e){var t=xt(),i=Kt(),c=ai();function p(m,k,H){let K=new i.YAMLMap(m);if(k instanceof Map)for(let[re,le]of k)K.items.push(m.createPair(re,le,H));else if(k&&typeof k=="object")for(let re of Object.keys(k))K.items.push(m.createPair(re,k[re],H));return typeof m.sortMapEntries=="function"&&K.items.sort(m.sortMapEntries),K}var h={createNode:p,default:!0,nodeClass:i.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:i.resolveMap};function f(m,k,H){let K=new i.YAMLSeq(m);if(k&&k[Symbol.iterator])for(let re of k){let le=m.createNode(re,H.wrapScalars,null,H);K.items.push(le)}return K}var O={createNode:f,default:!0,nodeClass:i.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:i.resolveSeq},U={identify:m=>typeof m=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i.resolveString,stringify(m,k,H,K){return k=Object.assign({actualString:!0},k),i.stringifyString(m,k,H,K)},options:i.strOptions},T=[h,O,U],$=m=>typeof m=="bigint"||Number.isInteger(m),E=(m,k,H)=>i.intOptions.asBigInt?BigInt(m):parseInt(k,H);function J(m,k,H){let{value:K}=m;return $(K)&&K>=0?H+K.toString(k):i.stringifyNumber(m)}var W={identify:m=>m==null,createNode:(m,k,H)=>H.wrapScalars?new i.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:i.nullOptions,stringify:()=>i.nullOptions.nullStr},ae={identify:m=>typeof m=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:m=>m[0]==="t"||m[0]==="T",options:i.boolOptions,stringify:({value:m})=>m?i.boolOptions.trueStr:i.boolOptions.falseStr},Q={identify:m=>$(m)&&m>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(m,k)=>E(m,k,8),options:i.intOptions,stringify:m=>J(m,8,"0o")},ne={identify:$,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:m=>E(m,m,10),options:i.intOptions,stringify:i.stringifyNumber},he={identify:m=>$(m)&&m>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(m,k)=>E(m,k,16),options:i.intOptions,stringify:m=>J(m,16,"0x")},ye={identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(m,k)=>k?NaN:m[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:i.stringifyNumber},j={identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:m=>parseFloat(m),stringify:({value:m})=>Number(m).toExponential()},S={identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(m,k,H){let K=k||H,re=new i.Scalar(parseFloat(m));return K&&K[K.length-1]==="0"&&(re.minFractionDigits=K.length),re},stringify:i.stringifyNumber},b=T.concat([W,ae,Q,ne,he,ye,j,S]),R=m=>typeof m=="bigint"||Number.isInteger(m),x=({value:m})=>JSON.stringify(m),L=[h,O,{identify:m=>typeof m=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i.resolveString,stringify:x},{identify:m=>m==null,createNode:(m,k,H)=>H.wrapScalars?new i.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:x},{identify:m=>typeof m=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:m=>m==="true",stringify:x},{identify:R,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:m=>i.intOptions.asBigInt?BigInt(m):parseInt(m,10),stringify:({value:m})=>R(m)?m.toString():JSON.stringify(m)},{identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:m=>parseFloat(m),stringify:x}];L.scalarFallback=m=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(m)}`)};var _=({value:m})=>m?i.boolOptions.trueStr:i.boolOptions.falseStr,I=m=>typeof m=="bigint"||Number.isInteger(m);function C(m,k,H){let K=k.replace(/_/g,"");if(i.intOptions.asBigInt){switch(H){case 2:K=`0b${K}`;break;case 8:K=`0o${K}`;break;case 16:K=`0x${K}`;break}let le=BigInt(K);return m==="-"?BigInt(-1)*le:le}let re=parseInt(K,H);return m==="-"?-1*re:re}function V(m,k,H){let{value:K}=m;if(I(K)){let re=K.toString(k);return K<0?"-"+H+re.substr(1):H+re}return i.stringifyNumber(m)}var G=T.concat([{identify:m=>m==null,createNode:(m,k,H)=>H.wrapScalars?new i.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:i.nullOptions,stringify:()=>i.nullOptions.nullStr},{identify:m=>typeof m=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>!0,options:i.boolOptions,stringify:_},{identify:m=>typeof m=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:i.boolOptions,stringify:_},{identify:I,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(m,k,H)=>C(k,H,2),stringify:m=>V(m,2,"0b")},{identify:I,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(m,k,H)=>C(k,H,8),stringify:m=>V(m,8,"0")},{identify:I,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(m,k,H)=>C(k,H,10),stringify:i.stringifyNumber},{identify:I,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(m,k,H)=>C(k,H,16),stringify:m=>V(m,16,"0x")},{identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(m,k)=>k?NaN:m[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:i.stringifyNumber},{identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:m=>parseFloat(m.replace(/_/g,"")),stringify:({value:m})=>Number(m).toExponential()},{identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(m,k){let H=new i.Scalar(parseFloat(m.replace(/_/g,"")));if(k){let K=k.replace(/_/g,"");K[K.length-1]==="0"&&(H.minFractionDigits=K.length)}return H},stringify:i.stringifyNumber}],c.binary,c.omap,c.pairs,c.set,c.intTime,c.floatTime,c.timestamp),ee={core:b,failsafe:T,json:L,yaml11:G},Oe={binary:c.binary,bool:ae,float:S,floatExp:j,floatNaN:ye,floatTime:c.floatTime,int:ne,intHex:he,intOct:Q,intTime:c.intTime,map:h,null:W,omap:c.omap,pairs:c.pairs,seq:O,set:c.set,timestamp:c.timestamp};function ve(m,k,H){if(k){let K=H.filter(le=>le.tag===k),re=K.find(le=>!le.format)||K[0];if(!re)throw new Error(`Tag ${k} not found`);return re}return H.find(K=>(K.identify&&K.identify(m)||K.class&&m instanceof K.class)&&!K.format)}function _e(m,k,H){if(m instanceof i.Node)return m;let{defaultPrefix:K,onTagObj:re,prevObjects:le,schema:Ve,wrapScalars:rt}=H;k&&k.startsWith("!!")&&(k=K+k.slice(2));let ot=ve(m,k,Ve.tags);if(!ot){if(typeof m.toJSON=="function"&&(m=m.toJSON()),!m||typeof m!="object")return rt?new i.Scalar(m):m;ot=m instanceof Map?h:m[Symbol.iterator]?O:h}re&&(re(ot),delete H.onTagObj);let nt={value:void 0,node:void 0};if(m&&typeof m=="object"&&le){let Mt=le.get(m);if(Mt){let nn=new i.Alias(Mt);return H.aliasNodes.push(nn),nn}nt.value=m,le.set(m,nt)}return nt.node=ot.createNode?ot.createNode(H.schema,m,H):rt?new i.Scalar(m):m,k&&nt.node instanceof i.Node&&(nt.node.tag=k),nt.node}function Pe(m,k,H,K){let re=m[K.replace(/\W/g,"")];if(!re){let le=Object.keys(m).map(Ve=>JSON.stringify(Ve)).join(", ");throw new Error(`Unknown schema "${K}"; use one of ${le}`)}if(Array.isArray(H))for(let le of H)re=re.concat(le);else typeof H=="function"&&(re=H(re.slice()));for(let le=0;le<re.length;++le){let Ve=re[le];if(typeof Ve=="string"){let rt=k[Ve];if(!rt){let ot=Object.keys(k).map(nt=>JSON.stringify(nt)).join(", ");throw new Error(`Unknown custom tag "${Ve}"; use one of ${ot}`)}re[le]=rt}}return re}var Me=(m,k)=>m.key<k.key?-1:m.key>k.key?1:0,Y=class Wr{constructor({customTags:k,merge:H,schema:K,sortMapEntries:re,tags:le}){this.merge=!!H,this.name=K,this.sortMapEntries=re===!0?Me:re||null,!k&&le&&c.warnOptionDeprecation("tags","customTags"),this.tags=Pe(ee,Oe,k||le,K)}createNode(k,H,K,re){let le={defaultPrefix:Wr.defaultPrefix,schema:this,wrapScalars:H},Ve=re?Object.assign(re,le):le;return _e(k,K,Ve)}createPair(k,H,K){K||(K={wrapScalars:!0});let re=this.createNode(k,K.wrapScalars,null,K),le=this.createNode(H,K.wrapScalars,null,K);return new i.Pair(re,le)}};t._defineProperty(Y,"defaultPrefix",t.defaultTagPrefix),t._defineProperty(Y,"defaultTags",t.defaultTags),e.Schema=Y}}),Bi=je({"node_modules/yaml/dist/types.js"(e){var t=Kt(),i=qi();xt(),ai(),e.Alias=t.Alias,e.Collection=t.Collection,e.Merge=t.Merge,e.Node=t.Node,e.Pair=t.Pair,e.Scalar=t.Scalar,e.YAMLMap=t.YAMLMap,e.YAMLSeq=t.YAMLSeq,e.binaryOptions=t.binaryOptions,e.boolOptions=t.boolOptions,e.intOptions=t.intOptions,e.nullOptions=t.nullOptions,e.strOptions=t.strOptions,e.Schema=i.Schema}}),li={},ci=()=>li,Ji=e=>{Object.assign(li,e)},Gi=class{constructor(){this.data={}}unregister(e){e?delete this.data[e]:this.data={}}register(e,t){this.data[e]=t}registerMany(e){Object.keys(e).forEach(t=>{this.data[t]=e[t]})}get(e){return this.data[e]}list(){return this.data}},pi=Gi,ue={},ui=ue,ue.defaultInvalidTypeProduct=void 0,ue.defaultRandExpMax=10,ue.pruneProperties=[],ue.ignoreProperties=[],ue.ignoreMissingRefs=!1,ue.failOnInvalidTypes=!0,ue.failOnInvalidFormat=!0,ue.alwaysFakeOptionals=!1,ue.optionalsProbability=null,ue.fixedProbabilities=!1,ue.useExamplesValue=!1,ue.useDefaultValue=!1,ue.requiredOnly=!1,ue.omitNulls=!1,ue.minItems=0,ue.maxItems=null,ue.minLength=0,ue.maxLength=null,ue.resolveJsonPath=!1,ue.reuseProperties=!1,ue.fillProperties=!0,ue.sortProperties=!1,ue.replaceEmptyByRandomValue=!1,ue.random=Math.random,ue.minDateTime=new Date("1889-12-31T00:00:00.000Z"),ue.maxDateTime=new Date("1970-01-01T00:00:01.000Z"),ue.renderTitle=!0,ue.renderDescription=!0,ue.renderComment=!1,Hi=class extends pi{constructor(){super(),this.data={...ui},this._defaults=ui}get defaults(){return{...this._defaults}}},Ki=Hi,It=new Ki,Ne.getDefaults=()=>It.defaults,te=Ne,di=["integer","number","string","boolean"],fi=di.concat(["null"]),zi=["array","object"].concat(fi),Xi=2524608e6,Qi=-1e8,Zi=1e8,er=-100,tr=100,tt={ALLOWED_TYPES:di,SCALAR_TYPES:fi,ALL_TYPES:zi,MIN_NUMBER:er,MAX_NUMBER:tr,MIN_INTEGER:Qi,MAX_INTEGER:Zi,MOST_NEAR_DATETIME:Xi},zt=oi(Vi(),1),Z={pick:Ce,date:Xn,shuffle:$e,number:Ze,randexp:Se},nr=/^(0|[1-9][0-9]*)$/,de={hasProperties:He,getLocalRef:_i,omitProps:Qo,typecast:Bo,merge:wt,clone:ce,short:Jo,hasValue:Go,notValue:Ho,anyValue:Pi,validate:Ko,validateValueForSchema:Qn,validateValueForOneOf:zo,isKey:Xo,template:xi,shouldClean:Ii,clean:ei,isEmpty:Zn,clampDate:Ri},ir=class{constructor(){this.registry={},this.support={}}reset(e){e?(delete this.registry[e],delete this.support[e]):(this.registry={},this.support={})}extend(e,t){this.registry[e]=t(this.registry[e]),this.support[e]||(this.support[e]=Zo(()=>this.registry[e]))}define(e,t){this.support[e]=t}get(e){if(typeof this.registry[e]=="undefined")throw new ReferenceError(`'${e}' dependency doesn't exist.`);return this.registry[e]}wrap(e){if(!("generate"in e)){let t=Object.keys(e),i={},c=t.length;for(;c--;){let p=t[c].replace(/^x-/,""),h=this.support[p];if(typeof h=="function"){Object.defineProperty(e,"generate",{configurable:!1,enumerable:!1,writable:!1,value:(f,O)=>h.call(i,e[t[c]],e,t[c],f,O.slice())});break}}}return e}},rr=ir,bt=new pi,hi=es,or=class extends Error{constructor(e,t){super(),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="ParseError",this.message=e,this.path=t}},Xt=or,Nt={array:["additionalItems","items","maxItems","minItems","uniqueItems"],integer:["exclusiveMaximum","exclusiveMinimum","maximum","minimum","multipleOf"],object:["additionalProperties","dependencies","maxProperties","minProperties","patternProperties","properties","required"],string:["maxLength","minLength","pattern","format"]},Nt.number=Nt.integer,sr=["additionalItems","items","additionalProperties","dependencies","patternProperties","properties"],ar=ns,lr=is,cr=lr,pr=cr,ur=rs,dr=ur,fr=dr,hr=ss,mi=as,mr=ls,yr=`Lorem ipsum dolor sit amet consectetur adipisicing elit sed do eiusmod tempor incididunt ut labore
87
+ ${ee.comment}`:G.comment),G=ee}M.items[V]=G instanceof r.Pair?G:new r.Pair(G)}}return M}function h(_,I,M){let V=new r.YAMLSeq(_);V.tag="tag:yaml.org,2002:pairs";for(let G of I){let ee,Ae;if(Array.isArray(G))if(G.length===2)ee=G[0],Ae=G[1];else throw new TypeError(`Expected [key, value] tuple: ${G}`);else if(G&&G instanceof Object){let _e=Object.keys(G);if(_e.length===1)ee=_e[0],Ae=G[ee];else throw new TypeError(`Expected { key: value } tuple: ${G}`)}else ee=G;let ve=_.createPair(ee,Ae,M);V.items.push(ve)}return V}var f={default:!1,tag:"tag:yaml.org,2002:pairs",resolve:p,createNode:h},O=class ji extends r.YAMLSeq{constructor(){super(),t._defineProperty(this,"add",r.YAMLMap.prototype.add.bind(this)),t._defineProperty(this,"delete",r.YAMLMap.prototype.delete.bind(this)),t._defineProperty(this,"get",r.YAMLMap.prototype.get.bind(this)),t._defineProperty(this,"has",r.YAMLMap.prototype.has.bind(this)),t._defineProperty(this,"set",r.YAMLMap.prototype.set.bind(this)),this.tag=ji.tag}toJSON(I,M){let V=new Map;M&&M.onCreate&&M.onCreate(V);for(let G of this.items){let ee,Ae;if(G instanceof r.Pair?(ee=r.toJSON(G.key,"",M),Ae=r.toJSON(G.value,ee,M)):ee=r.toJSON(G,"",M),V.has(ee))throw new Error("Ordered maps must not include duplicate keys");V.set(ee,Ae)}return V}};t._defineProperty(O,"tag","tag:yaml.org,2002:omap");function U(_,I){let M=p(_,I),V=[];for(let{key:G}of M.items)if(G instanceof r.Scalar)if(V.includes(G.value)){let ee="Ordered maps must not include duplicate keys";throw new t.YAMLSemanticError(I,ee)}else V.push(G.value);return Object.assign(new O,M)}function T(_,I,M){let V=h(_,I,M),G=new O;return G.items=V.items,G}var $={identify:_=>_ instanceof Map,nodeClass:O,default:!1,tag:"tag:yaml.org,2002:omap",resolve:U,createNode:T},E=class Yi extends r.YAMLMap{constructor(){super(),this.tag=Yi.tag}add(I){let M=I instanceof r.Pair?I:new r.Pair(I);r.findPair(this.items,M.key)||this.items.push(M)}get(I,M){let V=r.findPair(this.items,I);return!M&&V instanceof r.Pair?V.key instanceof r.Scalar?V.key.value:V.key:V}set(I,M){if(typeof M!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof M}`);let V=r.findPair(this.items,I);V&&!M?this.items.splice(this.items.indexOf(V),1):!V&&M&&this.items.push(new r.Pair(I))}toJSON(I,M){return super.toJSON(I,M,Set)}toString(I,M,V){if(!I)return JSON.stringify(this);if(this.hasAllNullValues())return super.toString(I,M,V);throw new Error("Set items must all have null values")}};t._defineProperty(E,"tag","tag:yaml.org,2002:set");function J(_,I){let M=r.resolveMap(_,I);if(!M.hasAllNullValues())throw new t.YAMLSemanticError(I,"Set items must all have null values");return Object.assign(new E,M)}function W(_,I,M){let V=new E;for(let G of I)V.items.push(_.createPair(G,null,M));return V}var ae={identify:_=>_ instanceof Set,nodeClass:E,default:!1,tag:"tag:yaml.org,2002:set",resolve:J,createNode:W},Q=(_,I)=>{let M=I.split(":").reduce((V,G)=>V*60+Number(G),0);return _==="-"?-M:M},ne=({value:_})=>{if(isNaN(_)||!isFinite(_))return r.stringifyNumber(_);let I="";_<0&&(I="-",_=Math.abs(_));let M=[_%60];return _<60?M.unshift(0):(_=Math.round((_-M[0])/60),M.unshift(_%60),_>=60&&(_=Math.round((_-M[0])/60),M.unshift(_))),I+M.map(V=>V<10?"0"+String(V):String(V)).join(":").replace(/000000\d*$/,"")},he={identify:_=>typeof _=="number",default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,resolve:(_,I,M)=>Q(I,M.replace(/_/g,"")),stringify:ne},ye={identify:_=>typeof _=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,resolve:(_,I,M)=>Q(I,M.replace(/_/g,"")),stringify:ne},j={identify:_=>_ instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:/^(?:([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\.[0-9]+)?)(?:[ \t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?)$/,resolve:(_,I,M,V,G,ee,Ae,ve,_e)=>{ve&&(ve=(ve+"00").substr(1,3));let Pe=Date.UTC(I,M-1,V,G||0,ee||0,Ae||0,ve||0);if(_e&&_e!=="Z"){let Ce=Q(_e[0],_e.slice(1));Math.abs(Ce)<30&&(Ce*=60),Pe-=6e4*Ce}return new Date(Pe)},stringify:({value:_})=>_.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};function S(_){let I=typeof process!="undefined"&&process.env||{};return _?typeof YAML_SILENCE_DEPRECATION_WARNINGS!="undefined"?!YAML_SILENCE_DEPRECATION_WARNINGS:!I.YAML_SILENCE_DEPRECATION_WARNINGS:typeof YAML_SILENCE_WARNINGS!="undefined"?!YAML_SILENCE_WARNINGS:!I.YAML_SILENCE_WARNINGS}function b(_,I){if(S(!1)){let M=typeof process!="undefined"&&process.emitWarning;M?M(_,I):console.warn(I?`${I}: ${_}`:_)}}function R(_){if(S(!0)){let I=_.replace(/.*yaml[/\\]/i,"").replace(/\.js$/,"").replace(/\\/g,"/");b(`The endpoint 'yaml/${I}' will be removed in a future release.`,"DeprecationWarning")}}var x={};function L(_,I){if(!x[_]&&S(!0)){x[_]=!0;let M=`The option '${_}' will be removed in a future release`;M+=I?`, use '${I}' instead.`:".",b(M,"DeprecationWarning")}}e.binary=c,e.floatTime=ye,e.intTime=he,e.omap=$,e.pairs=f,e.set=ae,e.timestamp=j,e.warn=b,e.warnFileDeprecation=R,e.warnOptionDeprecation=L}}),qr=je({"node_modules/yaml/dist/Schema-88e323a7.js"(e){var t=xt(),r=Kt(),c=ar();function p(m,k,H){let K=new r.YAMLMap(m);if(k instanceof Map)for(let[ie,le]of k)K.items.push(m.createPair(ie,le,H));else if(k&&typeof k=="object")for(let ie of Object.keys(k))K.items.push(m.createPair(ie,k[ie],H));return typeof m.sortMapEntries=="function"&&K.items.sort(m.sortMapEntries),K}var h={createNode:p,default:!0,nodeClass:r.YAMLMap,tag:"tag:yaml.org,2002:map",resolve:r.resolveMap};function f(m,k,H){let K=new r.YAMLSeq(m);if(k&&k[Symbol.iterator])for(let ie of k){let le=m.createNode(ie,H.wrapScalars,null,H);K.items.push(le)}return K}var O={createNode:f,default:!0,nodeClass:r.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve:r.resolveSeq},U={identify:m=>typeof m=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:r.resolveString,stringify(m,k,H,K){return k=Object.assign({actualString:!0},k),r.stringifyString(m,k,H,K)},options:r.strOptions},T=[h,O,U],$=m=>typeof m=="bigint"||Number.isInteger(m),E=(m,k,H)=>r.intOptions.asBigInt?BigInt(m):parseInt(k,H);function J(m,k,H){let{value:K}=m;return $(K)&&K>=0?H+K.toString(k):r.stringifyNumber(m)}var W={identify:m=>m==null,createNode:(m,k,H)=>H.wrapScalars?new r.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:r.nullOptions,stringify:()=>r.nullOptions.nullStr},ae={identify:m=>typeof m=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:m=>m[0]==="t"||m[0]==="T",options:r.boolOptions,stringify:({value:m})=>m?r.boolOptions.trueStr:r.boolOptions.falseStr},Q={identify:m=>$(m)&&m>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o([0-7]+)$/,resolve:(m,k)=>E(m,k,8),options:r.intOptions,stringify:m=>J(m,8,"0o")},ne={identify:$,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:m=>E(m,m,10),options:r.intOptions,stringify:r.stringifyNumber},he={identify:m=>$(m)&&m>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x([0-9a-fA-F]+)$/,resolve:(m,k)=>E(m,k,16),options:r.intOptions,stringify:m=>J(m,16,"0x")},ye={identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(m,k)=>k?NaN:m[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:r.stringifyNumber},j={identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:m=>parseFloat(m),stringify:({value:m})=>Number(m).toExponential()},S={identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.([0-9]+)|[0-9]+\.([0-9]*))$/,resolve(m,k,H){let K=k||H,ie=new r.Scalar(parseFloat(m));return K&&K[K.length-1]==="0"&&(ie.minFractionDigits=K.length),ie},stringify:r.stringifyNumber},b=T.concat([W,ae,Q,ne,he,ye,j,S]),R=m=>typeof m=="bigint"||Number.isInteger(m),x=({value:m})=>JSON.stringify(m),L=[h,O,{identify:m=>typeof m=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:r.resolveString,stringify:x},{identify:m=>m==null,createNode:(m,k,H)=>H.wrapScalars?new r.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:x},{identify:m=>typeof m=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:m=>m==="true",stringify:x},{identify:R,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:m=>r.intOptions.asBigInt?BigInt(m):parseInt(m,10),stringify:({value:m})=>R(m)?m.toString():JSON.stringify(m)},{identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:m=>parseFloat(m),stringify:x}];L.scalarFallback=m=>{throw new SyntaxError(`Unresolved plain scalar ${JSON.stringify(m)}`)};var _=({value:m})=>m?r.boolOptions.trueStr:r.boolOptions.falseStr,I=m=>typeof m=="bigint"||Number.isInteger(m);function M(m,k,H){let K=k.replace(/_/g,"");if(r.intOptions.asBigInt){switch(H){case 2:K=`0b${K}`;break;case 8:K=`0o${K}`;break;case 16:K=`0x${K}`;break}let le=BigInt(K);return m==="-"?BigInt(-1)*le:le}let ie=parseInt(K,H);return m==="-"?-1*ie:ie}function V(m,k,H){let{value:K}=m;if(I(K)){let ie=K.toString(k);return K<0?"-"+H+ie.substr(1):H+ie}return r.stringifyNumber(m)}var G=T.concat([{identify:m=>m==null,createNode:(m,k,H)=>H.wrapScalars?new r.Scalar(null):null,default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>null,options:r.nullOptions,stringify:()=>r.nullOptions.nullStr},{identify:m=>typeof m=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>!0,options:r.boolOptions,stringify:_},{identify:m=>typeof m=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>!1,options:r.boolOptions,stringify:_},{identify:I,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^([-+]?)0b([0-1_]+)$/,resolve:(m,k,H)=>M(k,H,2),stringify:m=>V(m,2,"0b")},{identify:I,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^([-+]?)0([0-7_]+)$/,resolve:(m,k,H)=>M(k,H,8),stringify:m=>V(m,8,"0")},{identify:I,default:!0,tag:"tag:yaml.org,2002:int",test:/^([-+]?)([0-9][0-9_]*)$/,resolve:(m,k,H)=>M(k,H,10),stringify:r.stringifyNumber},{identify:I,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^([-+]?)0x([0-9a-fA-F_]+)$/,resolve:(m,k,H)=>M(k,H,16),stringify:m=>V(m,16,"0x")},{identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.inf|(\.nan))$/i,resolve:(m,k)=>k?NaN:m[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:r.stringifyNumber},{identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?([0-9][0-9_]*)?(\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:m=>parseFloat(m.replace(/_/g,"")),stringify:({value:m})=>Number(m).toExponential()},{identify:m=>typeof m=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.([0-9_]*)$/,resolve(m,k){let H=new r.Scalar(parseFloat(m.replace(/_/g,"")));if(k){let K=k.replace(/_/g,"");K[K.length-1]==="0"&&(H.minFractionDigits=K.length)}return H},stringify:r.stringifyNumber}],c.binary,c.omap,c.pairs,c.set,c.intTime,c.floatTime,c.timestamp),ee={core:b,failsafe:T,json:L,yaml11:G},Ae={binary:c.binary,bool:ae,float:S,floatExp:j,floatNaN:ye,floatTime:c.floatTime,int:ne,intHex:he,intOct:Q,intTime:c.intTime,map:h,null:W,omap:c.omap,pairs:c.pairs,seq:O,set:c.set,timestamp:c.timestamp};function ve(m,k,H){if(k){let K=H.filter(le=>le.tag===k),ie=K.find(le=>!le.format)||K[0];if(!ie)throw new Error(`Tag ${k} not found`);return ie}return H.find(K=>(K.identify&&K.identify(m)||K.class&&m instanceof K.class)&&!K.format)}function _e(m,k,H){if(m instanceof r.Node)return m;let{defaultPrefix:K,onTagObj:ie,prevObjects:le,schema:Ve,wrapScalars:it}=H;k&&k.startsWith("!!")&&(k=K+k.slice(2));let st=ve(m,k,Ve.tags);if(!st){if(typeof m.toJSON=="function"&&(m=m.toJSON()),!m||typeof m!="object")return it?new r.Scalar(m):m;st=m instanceof Map?h:m[Symbol.iterator]?O:h}ie&&(ie(st),delete H.onTagObj);let nt={value:void 0,node:void 0};if(m&&typeof m=="object"&&le){let Ct=le.get(m);if(Ct){let nn=new r.Alias(Ct);return H.aliasNodes.push(nn),nn}nt.value=m,le.set(m,nt)}return nt.node=st.createNode?st.createNode(H.schema,m,H):it?new r.Scalar(m):m,k&&nt.node instanceof r.Node&&(nt.node.tag=k),nt.node}function Pe(m,k,H,K){let ie=m[K.replace(/\W/g,"")];if(!ie){let le=Object.keys(m).map(Ve=>JSON.stringify(Ve)).join(", ");throw new Error(`Unknown schema "${K}"; use one of ${le}`)}if(Array.isArray(H))for(let le of H)ie=ie.concat(le);else typeof H=="function"&&(ie=H(ie.slice()));for(let le=0;le<ie.length;++le){let Ve=ie[le];if(typeof Ve=="string"){let it=k[Ve];if(!it){let st=Object.keys(k).map(nt=>JSON.stringify(nt)).join(", ");throw new Error(`Unknown custom tag "${Ve}"; use one of ${st}`)}ie[le]=it}}return ie}var Ce=(m,k)=>m.key<k.key?-1:m.key>k.key?1:0,Y=class Wi{constructor({customTags:k,merge:H,schema:K,sortMapEntries:ie,tags:le}){this.merge=!!H,this.name=K,this.sortMapEntries=ie===!0?Ce:ie||null,!k&&le&&c.warnOptionDeprecation("tags","customTags"),this.tags=Pe(ee,Ae,k||le,K)}createNode(k,H,K,ie){let le={defaultPrefix:Wi.defaultPrefix,schema:this,wrapScalars:H},Ve=ie?Object.assign(ie,le):le;return _e(k,K,Ve)}createPair(k,H,K){K||(K={wrapScalars:!0});let ie=this.createNode(k,K.wrapScalars,null,K),le=this.createNode(H,K.wrapScalars,null,K);return new r.Pair(ie,le)}};t._defineProperty(Y,"defaultPrefix",t.defaultTagPrefix),t._defineProperty(Y,"defaultTags",t.defaultTags),e.Schema=Y}}),Br=je({"node_modules/yaml/dist/types.js"(e){var t=Kt(),r=qr();xt(),ar(),e.Alias=t.Alias,e.Collection=t.Collection,e.Merge=t.Merge,e.Node=t.Node,e.Pair=t.Pair,e.Scalar=t.Scalar,e.YAMLMap=t.YAMLMap,e.YAMLSeq=t.YAMLSeq,e.binaryOptions=t.binaryOptions,e.boolOptions=t.boolOptions,e.intOptions=t.intOptions,e.nullOptions=t.nullOptions,e.strOptions=t.strOptions,e.Schema=r.Schema}}),lr={},cr=()=>lr,Jr=e=>{Object.assign(lr,e)},Gr=class{constructor(){this.data={}}unregister(e){e?delete this.data[e]:this.data={}}register(e,t){this.data[e]=t}registerMany(e){Object.keys(e).forEach(t=>{this.data[t]=e[t]})}get(e){return this.data[e]}list(){return this.data}},pr=Gr,ue={},ur=ue,ue.defaultInvalidTypeProduct=void 0,ue.defaultRandExpMax=10,ue.pruneProperties=[],ue.ignoreProperties=[],ue.ignoreMissingRefs=!1,ue.failOnInvalidTypes=!0,ue.failOnInvalidFormat=!0,ue.alwaysFakeOptionals=!1,ue.optionalsProbability=null,ue.fixedProbabilities=!1,ue.useExamplesValue=!1,ue.useDefaultValue=!1,ue.requiredOnly=!1,ue.omitNulls=!1,ue.minItems=0,ue.maxItems=null,ue.minLength=0,ue.maxLength=null,ue.resolveJsonPath=!1,ue.reuseProperties=!1,ue.fillProperties=!0,ue.sortProperties=!1,ue.replaceEmptyByRandomValue=!1,ue.random=Math.random,ue.minDateTime=new Date("1889-12-31T00:00:00.000Z"),ue.maxDateTime=new Date("1970-01-01T00:00:01.000Z"),ue.renderTitle=!0,ue.renderDescription=!0,ue.renderComment=!1,Hr=class extends pr{constructor(){super(),this.data={...ur},this._defaults=ur}get defaults(){return{...this._defaults}}},Kr=Hr,It=new Kr,Ne.getDefaults=()=>It.defaults,te=Ne,dr=["integer","number","string","boolean"],fr=dr.concat(["null"]),zr=["array","object"].concat(fr),Xr=2524608e6,Qr=-1e8,Zr=1e8,ei=-100,ti=100,tt={ALLOWED_TYPES:dr,SCALAR_TYPES:fr,ALL_TYPES:zr,MIN_NUMBER:ei,MAX_NUMBER:ti,MIN_INTEGER:Qr,MAX_INTEGER:Zr,MOST_NEAR_DATETIME:Xr},zt=sr(Vr(),1),Z={pick:Me,date:Xn,shuffle:$e,number:Ze,randexp:be},ni=/^(0|[1-9][0-9]*)$/,de={hasProperties:He,getLocalRef:_r,omitProps:Xs,typecast:qs,merge:wt,clone:ce,short:Bs,hasValue:Js,notValue:Gs,anyValue:Pr,validate:Hs,validateValueForSchema:Qn,validateValueForOneOf:Ks,isKey:zs,template:xr,shouldClean:Ir,clean:er,isEmpty:Zn,clampDate:Rr},ri=class{constructor(){this.registry={},this.support={}}reset(e){e?(delete this.registry[e],delete this.support[e]):(this.registry={},this.support={})}extend(e,t){this.registry[e]=t(this.registry[e]),this.support[e]||(this.support[e]=Qs(()=>this.registry[e]))}define(e,t){this.support[e]=t}get(e){if(typeof this.registry[e]=="undefined")throw new ReferenceError(`'${e}' dependency doesn't exist.`);return this.registry[e]}wrap(e){if(!("generate"in e)){let t=Object.keys(e),r={},c=t.length;for(;c--;){let p=t[c].replace(/^x-/,""),h=this.support[p];if(typeof h=="function"){Object.defineProperty(e,"generate",{configurable:!1,enumerable:!1,writable:!1,value:(f,O)=>h.call(r,e[t[c]],e,t[c],f,O.slice())});break}}}return e}},ii=ri,bt=new pr,hr=Zs,si=class extends Error{constructor(e,t){super(),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="ParseError",this.message=e,this.path=t}},Xt=si,Nt={array:["additionalItems","items","maxItems","minItems","uniqueItems"],integer:["exclusiveMaximum","exclusiveMinimum","maximum","minimum","multipleOf"],object:["additionalProperties","dependencies","maxProperties","minProperties","patternProperties","properties","required"],string:["maxLength","minLength","pattern","format"]},Nt.number=Nt.integer,oi=["additionalItems","items","additionalProperties","dependencies","patternProperties","properties"],ai=to,li=no,ci=li,pi=ci,ui=ro,di=ui,fi=di,hi=so,mr=oo,mi=ao,yi=`Lorem ipsum dolor sit amet consectetur adipisicing elit sed do eiusmod tempor incididunt ut labore
88
88
  et dolore magna aliqua Ut enim ad minim veniam quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
89
89
  commodo consequat Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
90
90
  pariatur Excepteur sint occaecat cupidatat non proident sunt in culpa qui officia deserunt mollit anim id est
91
- laborum`.split(/\W/),Qt=cs,Zt={type:tt.ALLOWED_TYPES},gr=ps,yi=us,wr=ds,en=fs,Sr=hs,br=ms,gi="[a-zA-Z][a-zA-Z0-9+-.]*",tn=`https?://{hostname}(?:${gi})+`,Tr="(?:\\?([a-z]{1,7}(=\\w{1,5})?&){0,3})?",We={email:"[a-zA-Z\\d][a-zA-Z\\d-]{1,13}[a-zA-Z\\d]@{hostname}",hostname:"[a-zA-Z]{1,33}\\.[a-z]{2,4}",ipv6:"[a-f\\d]{4}(:[a-f\\d]{4}){7}",uri:tn,slug:"[a-zA-Z\\d_-]+","uri-reference":`${tn}${Tr}`,"uri-template":tn.replace("(?:","(?:/\\{[a-z][:a-zA-Z0-9-]*\\}|"),"json-pointer":`(/(?:${gi.replace("]*","/]*")}|~[01]))+`,uuid:"^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$",duration:"^P(?!$)((\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?|(\\d+W)?)$"},We.iri=We["uri-reference"],We["iri-reference"]=We["uri-reference"],We["idn-email"]=We.email,We["idn-hostname"]=We.hostname,Or=new RegExp(`\\{(${Object.keys(We).join("|")})\\}`),Ar=ys,vr=ws,Er={boolean:pr,null:fr,array:hr,integer:mr,number:mi,object:gr,string:vr},kt=Er,_r=St,Rr=({refs:e,schema:t,container:i,synchronous:c,refDepthMax:p,refDepthMin:h})=>{let f={},O={},U=0,T,$;return f.resolveSchema=(E,J,W)=>{if(E==null)return null;if(typeof E.generate=="function")return E;if(typeof(E.$id||E.id)=="string"&&(delete E.id,delete E.$id,delete E.$schema),typeof E.$ref=="string"){let Q=Math.max(h,p)-1;if(E.$ref==="#"||O[E.$ref]<0||T===E.$ref&&++U>Q)return E.$ref!=="#"&&$&&$.length===W.length?de.getLocalRef(t,E.$ref,c&&e):(delete E.$ref,E);typeof O[E.$ref]=="undefined"&&(O[E.$ref]=Z.number(h,p)-1),$=W,T=E.$ref;let ne;E.$ref.indexOf("#/")===-1?ne=e[E.$ref]||null:ne=de.getLocalRef(t,E.$ref,c&&e)||null;let he;if(typeof ne!="undefined"){if(!ne&&te("ignoreMissingRefs")!==!0)throw new Error(`Reference not found: ${E.$ref}`);O[E.$ref]-=1,de.merge(E,ne||{}),he=c&&ne&&ne.$ref}return he||delete E.$ref,E}if(Array.isArray(E.allOf)){let Q=E.allOf;delete E.allOf,Q.forEach(ne=>{let he=f.resolveSchema(ne,null,W);de.merge(E,typeof he.thunk=="function"?he.thunk(E):he),Array.isArray(E.allOf)&&f.resolveSchema(E,J,W)})}if(Array.isArray(E.oneOf||E.anyOf)&&W[W.length-2]!=="dependencies"){let Q=E.oneOf||E.anyOf;return E.enum&&E.oneOf&&(E.enum=E.enum.filter(ne=>de.validate(ne,Q))),{thunk(ne){let he=de.omitProps(E,["anyOf","oneOf"]),ye=Z.pick(Q);return de.merge(he,ye),Q.forEach(j=>{j.required&&j!==ye&&j.required.forEach(S=>{if(ye.required&&ye.required.includes(S))return;let b=he.required&&he.required.includes(S);he.properties&&!b&&delete he.properties[S],ne&&ne.properties&&delete ne.properties[S]})}),he}}}if(Object.keys(E).forEach(Q=>{(Array.isArray(E[Q])||typeof E[Q]=="object")&&!de.isKey(Q)&&(E[Q]=f.resolveSchema(E[Q],Q,W.concat(Q)))}),W){let Q=W[W.length-1];if(Q==="properties"||Q==="items")return E}return i.wrap(E)},f},Pr=Rr,wi=Os,Si=As,De=oi(Bi(),1),_s=De.default.binaryOptions,Rs=De.default.boolOptions,Ps=De.default.intOptions,xs=De.default.nullOptions,Is=De.default.strOptions,Ns=De.default.Schema,ks=De.default.Alias,Cs=De.default.Collection,Ms=De.default.Merge,Ls=De.default.Node,Ds=De.default.Pair,Us=De.default.Scalar,xr=De.default.YAMLMap,Ir=De.default.YAMLSeq,Ct=Es,it=new rr,Te=(e,t,i)=>(console.debug("[json-schema-faker] calling JSONSchemaFaker() is deprecated, call either .generate() or .resolve()"),i&&console.debug("[json-schema-faker] local references are only supported by calling .resolve()"),Te.generate(e,t)),Te.generateWithContext=(e,t)=>{let i=Ci(t,e);return wi(i,e,it,!0)},Te.generate=(e,t)=>Si(Te.generateWithContext(e,t)),Te.generateYAML=(e,t)=>Ct(Te.generateWithContext(e,t)),Te.resolveWithContext=(e,t,i)=>{typeof t=="string"&&(i=t,t={}),i=i||(typeof process!="undefined"&&typeof process.cwd=="function"?process.cwd():""),i=`${i.replace(/\/+$/,"")}/`;let c=Ci(t,e),p={order:1,canRead(f){let O=f.url.replace("/:",":");return c[O]||c[O.split("/").pop()]},read(f,O){try{O(null,this.canRead(f))}catch(U){O(U)}}},{$RefParser:h}=ci();return h.bundle(i,e,{resolve:{file:{order:100},http:{order:200},fixedRefs:p},dereference:{circular:"ignore"}}).then(f=>wi(c,f,it)).catch(f=>{throw new Error(`Error while resolving schema (${f.message})`)})},Te.resolve=(e,t,i)=>Te.resolveWithContext(e,t,i).then(Si),Te.resolveYAML=(e,t,i)=>Te.resolveWithContext(e,t,i).then(Ct),ki(),Te.format=hi,Te.option=te,Te.random=Z,Te.extend=(e,t)=>(it.extend(e,t),Te),Te.define=(e,t)=>(it.define(e,t),Te),Te.reset=e=>(it.reset(e),ki(),Te),Te.locate=e=>it.get(e),Te.VERSION="0.5.5",Nr={...Te},kr=Te}}),$s=N({"src/src/main.iife.js"(e,t){var i=(Fs(),ie(Ae));typeof $RefParser!="undefined"&&typeof JSONPath!="undefined"&&i.setDependencies({...JSONPath,$RefParser}),typeof window!="undefined"&&(window.JSONSchemaFaker=i.default),t.exports=i.default,t.exports.JSONSchemaFaker=i.JSONSchemaFaker}});return $s()})();((d,n)=>{d.JSONSchemaFaker=n()})(typeof self!="undefined"?self:typeof window!="undefined"?window:globalThis,()=>xn);xn.random.shuffle=function(){return["[placeholder]"]};xn.option({useDefaultValue:!0,alwaysFakeOptionals:!0});function Vr(d){return xn.generate(d)}var qr=async(d,n)=>{let o=new TextEncoder,l=o.encode(d),g=o.encode(n),N=await crypto.subtle.importKey("raw",l,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),M=await crypto.subtle.sign("HMAC",N,g);return Array.from(new Uint8Array(M)).map(z=>z.toString(16).padStart(2,"0")).join("")};var la=require("cross-fetch");var Br=async()=>{if(process.env.NOVU_BRIDGE_ORIGIN)return`${process.env.NOVU_BRIDGE_ORIGIN}/api/novu`;if(process.env.NEXT_PUBLIC_VERCEL_ENV==="preview"&&process.env.NEXT_PUBLIC_VERCEL_URL)return`https://${process.env.NEXT_PUBLIC_VERCEL_URL}/api/novu`;try{if(process.env.NODE_ENV==="development"||process.env.NODE_ENV==="dev"){let n=await(await fetch("http://localhost:2022/.well-known/novu")).json();return`${n.tunnelOrigin}${n.route}`}}catch(d){console.error(d)}return""};function Jr(d){return!!d&&typeof d=="object"&&"error"in d&&"message"in d&&"statusCode"in d}var In=(d,n)=>{if(!d)throw new wn;return{post:async(o,l)=>{let g=await fetch(`${n}/v1${o}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`ApiKey ${d}`},body:JSON.stringify(l)}),N=await g.json();if(g.ok)return N;throw Jr(N)?new Sn(N.statusCode,N.error,N.message):new Tt(N)},delete:async o=>(await fetch(`${n}/v1${o}`,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:`ApiKey ${d}`}})).json()}};var Qr=require("liquidjs");function Ai(d,n){let o={...d};for(let l of Object.keys(n)){let g=n[l];g&&typeof g=="object"&&!Array.isArray(g)?o[l]=Ai(o[l]||{},g):(Array.isArray(g),o[l]=g)}return o}function Nn(d,n){let o=n.split(".").reduce((l,g)=>{if(l&&typeof l=="object")return l[g]},d);if(o==null)return"";if(typeof o=="string")return o;if(typeof o=="number"||typeof o=="boolean")return String(o);if(typeof o=="object"){let l=JSON.stringify(o);return l==="{}"?"":l}return""}function Gr(d,n=2,o,l=", "){if(!Array.isArray(d)||d.length===0)return"";let g=o?d.map(z=>typeof z!="object"||!z?"":Nn(z,o)):d;if(g.length===1)return g[0];if(g.length===2)return`${g[0]} and ${g[1]}`;if(g.length===3&&n>=3)return`${g[0]}, ${l}${g[1]} and ${g[2]}`;let N=g.slice(0,n),M=g.length-n;return`${N.join(l)} and ${M} ${M===1?"other":"others"}`}var Hr=st(require("pluralize"),1);function Kr(d,n="",o="",l="true"){if(d==null)return"";let g=0;if(Array.isArray(d)?g=d.length:typeof d=="object"?g=Object.keys(d).length:typeof d=="string"?g=+d:typeof d=="number"?g=d:g=Number(d),Number.isNaN(g)&&(g=0),g<=0)return"";let N;return o?N=g===1?n:o:N=(0,Hr.default)(n,g),l==="true"?`${g} ${N}`:N}var ca=require("liquidjs"),zr=st(require("pluralize"),1),pa=require("zod");var ua="",da=2,fa="other",ha=", ",ma=" and ",ya=", and ";function Xr(d,n=ua,o=da,l=fa,g=ha,N=ma,M=ya){if(!Array.isArray(d)||d.length===0)return"";let z=n?d.map(Se=>typeof Se!="object"||!Se?"":Nn(Se,n)):d,ie=z.length;if(ie===1)return z[0];if(ie===2)return`${z[0]}${N}${z[1]}`;if(o>=ie){let Se=z.slice(0,ie-1),Ce=z[ie-1];return`${Se.join(g)}${M}${Ce}`}let Ae=z.slice(0,o),Ne=ie-o,ke=o===1?N:M;return`${Ae.join(g)}${ke}${Ne} ${(0,zr.default)(l,Ne)}`}function ga(d){return Array.isArray(d)||typeof d=="object"&&d!==null?Zr(d):typeof d=="string"&&d.includes(`
92
- `)?d.replace(/\n/g,"\\n"):d==null?"":String(d)}var Zr=(d,n=0)=>Array.isArray(d)||typeof d=="object"&&d!==null?JSON.stringify(d,null,n).replace(/"/g,"'").replace(/\n/g,"\\n"):d==null?"":String(d);function eo(d){let n=new Qr.Liquid({outputEscape:ga,...d});return n.registerFilter("json",(o,l)=>Zr(o,l)),n.registerFilter("digest",Gr),n.registerFilter("toSentence",Xr),n.registerFilter("pluralize",Kr),n}var yt=st(require("chalk"),1),we={info:d=>yt.default.blue(d),warning:d=>yt.default.yellow(d),error:d=>yt.default.red(d),success:d=>yt.default.green(d),underline:d=>yt.default.underline(d),bold:d=>yt.default.bold(d)},Re={SUCCESS:we.success("\u2714"),ERROR:we.error("\u2717"),WARNING:we.warning("\u26A0"),INFO:we.info("\u2139"),ARROW:we.bold("\u2192"),MOCK:we.info("\u25CB"),HYDRATED:we.bold(we.info("\u2192")),STEP:we.info("\u03C3"),ACTION:we.info("\u03B1"),DURATION:we.info("\u0394"),PROVIDER:we.info("\u2699"),OUTPUT:we.info("\u21E2"),INPUT:we.info("\u21E0"),WORKFLOW:we.info("\u03C9"),STATE:we.info("\u03C3"),EXECUTE:we.info("\u03B5"),PREVIEW:we.info("\u03C1")};function kn(d){return d||process.env.NOVU_API_URL||"https://api.novu.co"}function Cn(d){return d||process.env.NOVU_SECRET_KEY||process.env.NOVU_API_KEY||""}var vi=st(require("sanitize-html"),1),wa={allowedTags:vi.default.defaults.allowedTags.concat(["style","img","html","head","body","link","meta","title"]),allowedAttributes:!1,allowVulnerableTags:!0,parseStyleAttributes:!1,parser:{lowerCaseAttributeNames:!0}},to=d=>{if(!d)return d;let n=/^<!DOCTYPE .*?>/,o=d.match(n),l=(0,vi.default)(d,wa);return o?o[0]+l:l},Mn=d=>Object.keys(d).reduce((n,o)=>{let l=d[o];return typeof l=="string"?n[o]=to(l):Array.isArray(l)?n[o]=l.map(g=>typeof g=="string"?to(g):typeof g=="object"?Mn(g):g):typeof l=="object"&&l!==null?n[o]=Mn(l):n[o]=l,n},{});function no(d){console.log(`
93
- ${we.bold(we.underline("Discovered workflowId:"))} '${d.workflowId}'`),d.steps.forEach((n,o)=>{let l=o===d.steps.length-1;console.log(`${l?"\u2514":"\u251C"} ${Re.STEP} Discovered stepId: '${n.stepId}' Type: '${n.type}'`),n.providers.forEach((N,M)=>{let z=M===n.providers.length-1;console.log(`${l?" ":"\u2502"} ${z?"\u2514":"\u251C"} ${Re.PROVIDER} Discovered provider: '${N.type}'`)})})}var ro=st(require("ajv"),1),oo=st(require("ajv-formats"),1);var io=d=>typeof structuredClone=="function"?structuredClone(d):JSON.parse(JSON.stringify(d));var Ln=class extends dt{constructor(o,l){let g=l.length===1?"it":"them";super(`Tried to use a ${o} in @novu/framework without ${l.join(", ")} installed. Please install ${g} by running \`npm install ${l.join(" ")}\`.`);this.statusCode=500;this.code="MissingDependencyError"}};var Dn=async(d,n)=>{let o=new Set;if((await Promise.allSettled(d.map(g=>g.import))).forEach((g,N)=>{let M=d[N];g.status==="fulfilled"&&M.exports.every(ie=>g.value[ie]!==void 0)||o.add(M.name)}),o.size>0)throw new Ln(n,Array.from(o))};var Un=class{constructor(){this.requiredImports=[];this.ajv=new ro.default({useDefaults:!0,removeAdditional:"failing"}),(0,oo.default)(this.ajv),this.compiledSchemas=new Map}async canHandle(n){let o=n.type==="object"||!!n.anyOf||!!n.allOf||!!n.oneOf;return o&&await Dn(this.requiredImports,"JSON schema"),o}async validate(n,o){let l=this.compiledSchemas.get(o);l||(l=this.ajv.compile(o),this.compiledSchemas.set(o,l));let g=io(n);return l(g)?{success:!0,data:g}:{success:!1,errors:l.errors.map(M=>({path:M.instancePath,message:M.message}))}}async transformToJsonSchema(n){return n}};var Fn=class{constructor(){this.requiredImports=[{name:"zod",import:import("zod"),exports:["ZodType"]},{name:"zod-to-json-schema",import:import("zod-to-json-schema"),exports:["zodToJsonSchema"]}]}async canHandle(n){let o=n.safeParseAsync!==void 0;return o&&await Dn(this.requiredImports,"Zod schema"),o}async validate(n,o){let l=await o.safeParseAsync(n);return l.success?{success:!0,data:l.data}:{success:!1,errors:l.error.errors.map(g=>({path:`/${g.path.join("/")}`,message:g.message}))}}async transformToJsonSchema(n){let{zodToJsonSchema:o}=await import("zod-to-json-schema");return o(n)}};var $n=new Fn,jn=new Un,Yn=async(d,n)=>{if(await $n.canHandle(d))return $n.validate(n,d);if(await jn.canHandle(d))return jn.validate(n,d);throw new Error("Invalid schema")},Le=async d=>{if(await $n.canHandle(d))return $n.transformToJsonSchema(d);if(await jn.canHandle(d))return jn.transformToJsonSchema(d);throw new Error("Invalid schema")};function Sa(){return["development",void 0,"dev"].includes(process.env.NODE_ENV)}var vt=class{constructor(n){this.discoveredWorkflows=new Map;this.discoverWorkflowPromises=new Map;this.version="2.8.0";let o=this.buildOptions(n);this.apiUrl=o.apiUrl,this.secretKey=o.secretKey,this.strictAuthentication=o.strictAuthentication,this.templateEngine=eo()}buildOptions(n){let o={apiUrl:kn(n==null?void 0:n.apiUrl),secretKey:Cn(n==null?void 0:n.secretKey),strictAuthentication:!Sa()};return(n==null?void 0:n.strictAuthentication)!==void 0?o.strictAuthentication=n.strictAuthentication:process.env.NOVU_STRICT_AUTHENTICATION_ENABLED!==void 0&&(o.strictAuthentication=process.env.NOVU_STRICT_AUTHENTICATION_ENABLED==="true"),o}async addWorkflows(n){for(let o of n){if(this.discoveredWorkflows.has(o.id))continue;let l=this.discoverWorkflowPromises.get(o.id);if(l){await l;continue}let g=this.addWorkflow(o);this.discoverWorkflowPromises.set(o.id,g),await g}}async addWorkflow(n){try{let o=await n.discover();no(o),this.discoveredWorkflows.set(n.id,o)}finally{this.discoverWorkflowPromises.delete(n.id)}}healthCheck(){let n=this.getRegisteredWorkflows(),o=n.length,l=n.reduce((g,N)=>g+N.steps.length,0);return{status:"ok",sdkVersion:"2.8.0",frameworkVersion:"2024-06-26",discovered:{workflows:o,steps:l}}}getWorkflow(n){let o=this.discoveredWorkflows.get(n);if(o)return o;throw new Wt(n)}getStep(n,o){let g=this.getWorkflow(n).steps.find(N=>N.stepId===o);if(g)return g;throw new Rn(o)}getRegisteredWorkflows(){return Array.from(this.discoveredWorkflows.values())}discover(){return{workflows:this.getRegisteredWorkflows()}}mock(n){return Vr(n)}async validate(n,o,l,g,N,M,z){let ie=await Yn(o,n);if(ie.success)return ie.data;switch(l){case"event":this.throwInvalidEvent(g,N,ie.errors);case"step":this.throwInvalidStep(M,g,N,ie.errors);case"provider":this.throwInvalidProvider(M,z,g,N,ie.errors);default:throw new Error(`Invalid component: '${l}'`)}}throwInvalidProvider(n,o,l,g,N){if(!n)throw new Error("stepId is required");if(!o)throw new Error("providerId is required");switch(l){case"output":throw new hn(g,n,o,N);default:throw new Error(`Invalid payload type: '${l}'`)}}throwInvalidStep(n,o,l,g){if(!n)throw new Error("stepId is required");switch(o){case"output":throw new un(l,n,g);case"result":throw new dn(l,n,g);case"controls":throw new pn(l,n,g);default:throw new Error(`Invalid payload type: '${o}'`)}}throwInvalidEvent(n,o,l){switch(n){case"controls":throw new cn(o,l);case"payload":throw new Ft(o,l);default:throw new Error(`Invalid payload type: '${n}'`)}}executeStepFactory(n,o,l){return async(g,N,M)=>{if(l())return;let z=this.getStep(n.workflowId,g),ie=n.action==="preview";if(!ie&&g===n.stepId){let Ce=await this.createStepControls(z,n),$e=await this.compileControls(Ce,n);if(await this.shouldSkip(M==null?void 0:M.skip,$e))return o({options:{skip:!0},outputs:{},providers:{}}),{}}let Ae=this.previewStep.bind(this),Ne=this.executeStep.bind(this),Se=await(ie?Ae:Ne)(n,{...z,providers:z.providers.map(Ce=>{var ct;let $e=(ct=M==null?void 0:M.providers)==null?void 0:ct[Ce.type];if(!$e)throw new bn(Ce.type);return{...Ce,resolve:$e}}),resolve:N});return this.shouldSanitize({stepType:z.type,options:M})&&(Se={...Se,outputs:Mn(Se.outputs)}),g===n.stepId&&o({...Se,options:{skip:!1}}),Se.outputs}}shouldSanitize({stepType:n,options:o}){return(o==null?void 0:o.disableOutputSanitization)===!0?!1:["email","in_app"].includes(n)}async shouldSkip(n,o){return n?n(o):!1}async executeWorkflow(n){let g=`${{execute:"Executing",preview:"Previewing"}[n.action]} workflowId:`;console.log(`
94
- ${we.bold(we.underline(g))} '${n.workflowId}'`);let N=this.getWorkflow(n.workflowId),M=process.hrtime(),z={outputs:{},providers:{},options:{skip:!1}},ie,Ae=!1,Ne=new Promise(et=>{ie=et}),ke=et=>{if(Ae)throw new Error("setResult can only be called once per workflow execution");ie(),Ae=!0,z=et},Se=()=>Ae,Ce;try{if(n.action==="execute"&&!n.payload)throw new Ft(n.workflowId,{message:"Event `payload` is required"});let et=await this.createExecutionPayload(n,N),He={...n,payload:et};await Promise.race([Ne,N.execute({payload:et,environment:{},controls:{},subscriber:n.subscriber,context:n.context,step:{email:this.executeStepFactory(He,ke,Se),sms:this.executeStepFactory(He,ke,Se),inApp:this.executeStepFactory(He,ke,Se),digest:this.executeStepFactory(He,ke,Se),delay:this.executeStepFactory(He,ke,Se),push:this.executeStepFactory(He,ke,Se),chat:this.executeStepFactory(He,ke,Se),custom:this.executeStepFactory(He,ke,Se),throttle:this.executeStepFactory(He,ke,Se)}})])}catch(et){Ce=et}let $e=process.hrtime(M),ct=$e[0],Ze=$e[1],Gt=ct*1e3+Ze/1e6,Xn=Ce?Re.ERROR:Re.SUCCESS,Ht={execute:"Executed",preview:"Previewed"}[n.action];if(console.log(`${Xn} ${Ht} workflowId: \`${n.workflowId}\``),this.prettyPrintExecute(n,Gt,Ce),Ce)throw Ce;return{outputs:z.outputs,providers:z.providers,options:z.options,metadata:{status:"success",error:!1,duration:Gt}}}async createExecutionPayload(n,o){let{payload:l}=n;if(n.action==="preview"){let N=this.mock(o.payload.schema);l=Object.assign(N,l)}return await this.validate(l,o.payload.unknownSchema,"event","payload",n.workflowId)}prettyPrintExecute(n,o,l){let g=l?Re.ERROR:Re.SUCCESS,M={execute:"Executed",preview:"Previewed"}[n.action],z=l?"Failed to execute":M,ie=l?we.error:we.success,Ae=`${g} ${z} workflowId: '${n.workflowId}`;console.log(`
95
- ${we.bold(ie(Ae))}'`),console.log(` \u251C ${Re.STEP} stepId: '${n.stepId}'`),console.log(` \u251C ${Re.ACTION} action: '${n.action}'`),console.log(` \u2514 ${Re.DURATION} duration: '${o.toFixed(2)}ms'
96
- `)}async executeProviders(n,o,l){return o.providers.reduce(async(g,N)=>{let M=await g,z=this.previewProvider.bind(this),ie=this.executeProvider.bind(this),Ne=await(n.action==="preview"?z:ie)(n,o,N,l);return{...M,[N.type]:Ne}},Promise.resolve({}))}previewProvider(n,o,l,g){return console.log(` ${Re.MOCK} Mocked provider: \`${l.type}\``),this.mock(l.outputs.schema)}async executeProvider(n,o,l,g){try{if(n.stepId===o.stepId){let N=await this.createStepControls(o,n),M=await l.resolve({controls:N,outputs:g}),z=await this.validate(M,l.outputs.unknownSchema,"step","output",n.workflowId,o.stepId,l.type);return console.log(` ${Re.SUCCESS} Executed provider: \`${l.type}\``),{...z,_passthrough:M._passthrough}}else return console.log(` ${Re.HYDRATED} Hydrated provider: \`${l.type}\``),{}}catch(N){throw console.log(` ${Re.ERROR} Failed to execute provider: \`${l.type}\``),new Tn(l.type,n.action,N)}}async executeStep(n,o){if(n.stepId===o.stepId)try{let l=await this.createStepControls(o,n),g=await this.compileControls(l,n),N=await o.resolve(g),M=await this.validate(N,o.outputs.unknownSchema,"step","output",n.workflowId,o.stepId),z=await this.executeProviders(n,o,M);return console.log(` ${Re.SUCCESS} Executed stepId: \`${o.stepId}\``),{outputs:M,providers:z}}catch(l){throw console.log(` ${Re.ERROR} Failed to execute stepId: \`${o.stepId}\``),ht(l)?l:new Yt(o.stepId,n.action,l)}else try{let l=this.getStepState(n,o.stepId);if(l){let g=await this.validate(l.outputs,o.results.unknownSchema,"step","result",n.workflowId,o.stepId);return console.log(` ${Re.HYDRATED} Hydrated stepId: \`${o.stepId}\``),{outputs:g,providers:await this.executeProviders(n,o,g)}}else throw new ln(n.workflowId,o.stepId)}catch(l){throw console.log(` ${Re.ERROR} Failed to hydrate stepId: \`${o.stepId}\``),l}}async compileControls(n,o){try{let l=this.preprocessTranslationPatterns(JSON.stringify(n)),g=this.templateEngine.parse(l),N=this.getWorkflow(o.workflowId),M={workflow:{workflowId:N.workflowId,name:N.name,description:N.description,tags:N.tags,severity:N.severity},payload:o.payload,subscriber:o.subscriber,context:o.context,steps:ba(o.state),t:{}},z=await this.templateEngine.render(g,M),ie=(0,so.jsonrepair)(z);return JSON.parse(ie)}catch(l){throw new fn(o.workflowId,o.stepId,l)}}preprocessTranslationPatterns(n){return n.replace(/\{\{\s*t\.([\p{L}\p{N}_.-]+)\s*\}\}/gu,'{{ t.$1 | default: "{{t.$1}}" }}')}async createStepControls(n,o){return await this.validate(o.controls,n.controls.unknownSchema,"step","controls",o.workflowId,n.stepId)}async previewStep(n,o){try{return await this.constructStepForPreview(n,o)}catch(l){throw console.log(` ${Re.ERROR} Failed to preview stepId: \`${o.stepId}\``),ht(l)?l:new Yt(o.stepId,n.action,l)}}async constructStepForPreview(n,o){return n.stepId===o.stepId?await this.previewRequiredStep(o,n):await this.extractMockDataForPreviousSteps(n,o)}async extractMockDataForPreviousSteps(n,o){let l={},g=this.getStepState(n,o.stepId),N=this.mock(o.results.schema);return{outputs:Ai(N,(g==null?void 0:g.outputs)||{}),providers:await this.executeProviders(n,o,l)}}async previewRequiredStep(n,o){let l=await this.createStepControls(n,o),g=await this.compileControls(l,o),N=await n.resolve(g),M=await this.validate(N,n.outputs.unknownSchema,"step","output",o.workflowId,n.stepId);return console.log(` ${Re.MOCK} Mocked stepId: \`${n.stepId}\``),{outputs:M,providers:await this.executeProviders(o,n,M)}}getStepState(n,o){return n.state.find(l=>l.stepId===o)}getStepCode(n,o){return{code:this.getStep(n,o).resolve.toString()}}getWorkflowCode(n){return{code:this.getWorkflow(n).execute.toString()}}getCode(n,o){let l;if(n)o?l=this.getStepCode(n,o):l=this.getWorkflowCode(n);else throw new Wt(n);return l}};function ba(d){let n={};for(let o of d)n[o.stepId]=o.outputs;return n}var Et=class{constructor(n){this.handler=n.handler,this.client=n.client?n.client:new vt,this.workflows=n.workflows,this.http=In(this.client.secretKey,this.client.apiUrl),this.frameworkName=n.frameworkName,this.hmacEnabled=this.client.strictAuthentication}createHandler(){return async(...n)=>{await this.client.addWorkflows(this.workflows);let o=await this.handler(...n),l=await this.handleAction({actions:o});return o.transformResponse(l)}}getStaticHeaders(){let n=`novu-framework:v${this.client.version}`;return{"content-type":"application/json","access-control-allow-origin":"*","access-control-allow-methods":"GET, POST","access-control-allow-headers":"*","access-control-max-age":"604800","novu-framework-version":"2024-06-26","novu-framework-sdk":"2.8.0","novu-framework-server":this.frameworkName,"user-agent":n}}createResponse(n,o){return{status:n,body:JSON.stringify(o),headers:{...this.getStaticHeaders()}}}createError(n){return{status:n.statusCode,body:JSON.stringify({message:n.message,data:n.data,code:n.code}),headers:this.getStaticHeaders()}}async handleAction({actions:n}){let o=await n.url(),l=await n.method(),g=o.searchParams.get("action")||"health-check",N=o.searchParams.get("workflowId")||"",M=o.searchParams.get("stepId")||"",z=await n.headers("novu-signature")||"",ie={};try{l==="POST"&&(ie=await n.body())}catch{}try{g!=="health-check"&&await this.validateHmac(ie,z);let Ae=this.getPostActionMap(ie,N,M,g),Ne=this.getGetActionMap(N,M);if(l==="POST")return await this.handlePostAction(g,Ae);if(l==="GET")return await this.handleGetAction(g,Ne);if(l==="OPTIONS")return this.createResponse(200,{})}catch(Ae){return this.handleError(Ae)}return this.createError(new gn(l))}getPostActionMap(n,o,l,g){return{trigger:this.triggerAction({workflowId:o,...n}),execute:async()=>{let N=await this.client.executeWorkflow({...n,workflowId:o,stepId:l,action:g});return this.createResponse(200,N)},preview:async()=>{let N=await this.client.executeWorkflow({...n,workflowId:o,stepId:l,action:g});return this.createResponse(200,N)}}}triggerAction(n){return async()=>{let o={name:n.workflowId,to:n.to,payload:(n==null?void 0:n.payload)||{},transactionId:n.transactionId,overrides:n.overrides||{},...n.actor&&{actor:n.actor},...n.bridgeUrl&&{bridgeUrl:n.bridgeUrl},...n.controls&&{controls:n.controls},...n.context&&{context:n.context}},l=await this.http.post("/events/trigger",o);return this.createResponse(200,l)}}getGetActionMap(n,o){return{discover:async()=>{let l=await this.client.discover();return this.createResponse(200,l)},"health-check":async()=>{let l=await this.client.healthCheck();return this.createResponse(200,l)},code:async()=>{let l=await this.client.getCode(n,o);return this.createResponse(200,l)}}}async handlePostAction(n,o){if(Object.values(Dt).includes(n)){let l=o[n];return l()}else throw new $t(n,Dt)}async handleGetAction(n,o){if(Object.values(rn).includes(n)){let l=o[n];return l()}else throw new $t(n,rn)}handleError(n){if(ht(n))return n.statusCode>=500&&console.error(n),this.createError(n);if(Lr(n))return this.createError(n);{let o=new Tt(n);return console.error(o),this.createError(o)}}async validateHmac(n,o){if(!this.hmacEnabled)return;if(!o)throw new An;if(!this.client.secretKey)throw new _n;let[l,g]=o.split(",");if(!l||!g)throw new vn;let[N,M]=l.split("="),[z,ie]=g.split("=");if(Number(N)<Date.now()-1500)throw new En;if(!(await qr(this.client.secretKey,`${M}.${JSON.stringify(n)}`)===ie))throw new On}};var B={output:{type:"object",properties:{},required:[],additionalProperties:!0}};var Oa={type:"object",properties:{webhookUrl:{type:"string",format:"uri"},text:{type:"string"},blocks:{type:"array",items:{type:"object",properties:{type:{enum:["image","context","actions","divider","section","input","file","header","video","rich_text"]}},required:["type"],additionalProperties:!0}}},additionalProperties:!0},ao={output:Oa};var lo={"chat-webhook":B,discord:B,getstream:B,"grafana-on-call":B,mattermost:B,msteams:B,"rocket-chat":B,ryver:B,slack:ao,"whatsapp-business":B,zulip:B};var Aa={type:"object",properties:{to:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:'Email address of the recipient(s). Example: "Bob bob@host.com". You can use commas to separate multiple recipients (e.g.: "test@example.com,test@example.com" or ["test@example.com", "test@example.com"]).'},from:{type:"string"},subject:{type:"string",description:"Subject of the message."},text:{type:"string",description:"Text version of the message."},html:{type:"string",description:"HTML version of the message."},message:{type:"string",description:"MIME string of the message. Make sure to use multipart/form-data to send this as a file upload."},cc:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"Same as To but for carbon copy"},bcc:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"Same as To but for blind carbon copy"},ampHtml:{type:"string"},tVersion:{type:"string"},tText:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}]},oTag:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"Tag string. See Tagging for more information."},oDkim:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Enables/disabled DKIM signatures on per-message basis. Pass yes or no"},oDeliverytime:{type:"string",description:"Desired time of delivery. See Date Format. Note: Messages can be scheduled for a maximum of 3 days in the future."},oDeliverytimeOptimizePeriod:{type:"string"},oTimeZoneLocalize:{type:"string"},oTestmode:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Enables sending in test mode. Pass yes if needed. See Sending in Test Mode"},oTracking:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Toggles tracking on a per-message basis, see Tracking Messages for details. Pass yes or no."},oTrackingClicks:{anyOf:[{type:"string",enum:["yes","no","htmlonly"]},{type:"boolean"}],description:"Toggles clicks tracking on a per-message basis. Has higher priority than domain-level setting. Pass yes, no or htmlonly."},oTrackingOpens:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Toggles opens tracking on a per-message basis. Has higher priority than domain-level setting. Pass yes or no."},oRequireTls:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}]},oSkipVerification:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}]},recipientVariables:{type:"string"}},required:[],additionalProperties:!0},co={output:Aa};var gt={type:"object",properties:{name:{type:"string"},email:{type:"string"}},description:'JSON object, containing 2 properties: Name and Email address of a previously validated and active sender. Including the Name property in the JSON is optional. This property is not mandatory in case you use TemplateID and you specified a From address for the template. Format : { "Email":"value", "Name":"value" }.',required:["Email"],additionalProperties:!0},va={type:"object",properties:{contentType:{type:"string"},filename:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},Ea={type:"object",properties:{filename:{type:"string"},contentType:{type:"string"},contentId:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},_a={type:"object",properties:{from:gt,sender:gt,to:{type:"array",items:gt},cc:{type:"array",items:gt},bcc:{type:"array",items:gt},replyTo:gt,subject:{type:"string"},textPart:{type:"string",description:"Content of the message, sent in Text and/or HTML format. At least one of these content types needs to be specified. When the HTML part is the only part provided, Mailjet will not generate a Text-part from the HTML version. The property can't be set when you use TemplateID"},htmlPart:{type:"string",description:"Content of the message, sent in Text and/or HTML format. At least one of these content types needs to be specified. When the HTML part is the only part provided, Mailjet will not generate a Text-part from the HTML version. The property can't be set when you use TemplateID"},templateId:{type:"number",description:"an ID for a template that is previously created and stored in Mailjet's system. It is mandatory when From and TextPart and/or HtmlPart are not provided. "},templateLanguage:{type:"boolean"},templateErrorReporting:gt,templateErrorDeliver:{type:"boolean"},attachments:{type:"array",items:va},inlineAttachments:{type:"array",items:Ea},priority:{type:"number"},customCampaign:{type:"string"},deduplicateCampaign:{type:"boolean"},trackOpens:{type:"string",enum:["account_default","disabled","enabled"]},trackClicks:{type:"string",enum:["account_default","disabled","enabled"]},customId:{type:"string"},eventPayload:{type:"string"},urlTags:{type:"string"},headers:{type:"object",additionalProperties:!0},variables:{type:"object",additionalProperties:!0}},required:[],additionalProperties:!0},po={output:_a};var Xe={type:"object",properties:{address:{type:"string"},name:{type:"string"}},additionalProperties:!0},Wn={type:"object",properties:{content:{type:"string"},path:{type:"string"}},additionalProperties:!0},Ra={type:"object",properties:{from:{anyOf:[{type:"string"},Xe]},sender:{anyOf:[{type:"string"},Xe]},to:{anyOf:[{type:"string"},Xe,{type:"array",items:Xe}]},cc:{anyOf:[{type:"string"},Xe,{type:"array",items:Xe}]},bcc:{anyOf:[{type:"string"},Xe,{type:"array",items:Xe}]},replyTo:{anyOf:[{type:"string"},Xe,{type:"array",items:Xe}]},inReplyTo:{anyOf:[{type:"string"},Xe]},references:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},subject:{type:"string"},text:{anyOf:[{type:"string"},Wn]},html:{anyOf:[{type:"string"},Wn]},watchHtml:{anyOf:[{type:"string"},Wn]},amp:{anyOf:[{type:"string"},{type:"object",properties:{content:{type:"string"},path:{type:"string"},href:{type:"string"},encoding:{type:"string"},contentType:{type:"string"},raw:{anyOf:[{type:"string"},Wn]}}}]},icalEvent:{anyOf:[{type:"string"},{type:"object",properties:{content:{type:"string"},path:{type:"string"},method:{type:"string"},filename:{anyOf:[{type:"string"},{type:"boolean"}]},href:{type:"string"},encoding:{type:"string"}}}]},headers:{anyOf:[{type:"object",additionalProperties:!0},{type:"array",items:{type:"object",additionalProperties:!0}}]},list:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},attachments:{type:"array",items:{type:"object",properties:{content:{type:"string"},path:{type:"string"}},additionalProperties:!0}}},required:[],additionalProperties:!0},uo={output:Ra};var Pa={type:"object",properties:{},required:[],additionalProperties:!1},fo={output:Pa};var xa={type:"object",properties:{personalizations:{type:"array",description:"An array of messages and their metadata. Each object within personalizations can be thought of as an envelope - it defines who should receive an individual message and how that message should be handled. See our [Personalizations documentation](https://sendgrid.com/docs/for-developers/sending-email/personalizations/) for examples.",uniqueItems:!1,maxItems:1e3,items:{type:"object",properties:{from:{title:"From Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account."},name:{type:"string",description:"A name or title associated with the sending email address."}},required:["email"]},to:{title:"To Email Array",type:"array",items:{type:"object",properties:{email:{type:"string",format:"email",description:"The intended recipient's email address."},name:{type:"string",description:"The intended recipient's name."}},required:["email"]}},cc:{type:"array",description:"An array of recipients who will receive a copy of your email. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name.",maxItems:1e3,items:{title:"CC BCC Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The intended recipient's email address."},name:{type:"string",description:"The intended recipient's name."}},required:["email"]}},bcc:{type:"array",description:"An array of recipients who will receive a blind carbon copy of your email. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name.",maxItems:1e3,items:{title:"CC BCC Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The intended recipient's email address."},name:{type:"string",description:"The intended recipient's name."}},required:["email"]}},subject:{type:"string",description:"The subject of your email. See character length requirements according to [RFC 2822](http://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit#answer-1592310).",minLength:1},headers:{type:"object",description:"A collection of JSON key/value pairs allowing you to specify handling instructions for your email. You may not overwrite the following headers: `x-sg-id`, `x-sg-eid`, `received`, `dkim-signature`, `Content-Type`, `Content-Transfer-Encoding`, `To`, `From`, `Subject`, `Reply-To`, `CC`, `BCC`"},substitutions:{type:"object",description:'Substitutions allow you to insert data without using Dynamic Transactional Templates. This field should **not** be used in combination with a Dynamic Transactional Template, which can be identified by a `templateId` starting with `d-`. This field is a collection of key/value pairs following the pattern "substitutionTag":"value to substitute". The key/value pairs must be strings. These substitutions will apply to the text and html content of the body of your email, in addition to the `subject` and `reply-to` parameters. The total collective size of your substitutions may not exceed 10,000 bytes per personalization object.',maxProperties:1e4},dynamicTemplateData:{type:"object",description:'Dynamic template data is available using Handlebars syntax in Dynamic Transactional Templates. This field should be used in combination with a Dynamic Transactional Template, which can be identified by a `templateId` starting with `d-`. This field is a collection of key/value pairs following the pattern "variable_name":"value to insert".'},customArgs:{type:"object",description:"Values that are specific to this personalization that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string that is entered into this parameter will be assumed to be the custom argument that you would like to be used. This field may not exceed 10,000 bytes.",maxProperties:1e4},sendAt:{type:"integer",description:"A unix timestamp allowing you to specify when your email should be delivered. Scheduling delivery more than 72 hours in advance is forbidden."}},required:["to"]}},from:{title:"From Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account."},name:{type:"string",description:"A name or title associated with the sending email address."}},required:["email"]},replyTo:{title:"Reply_to Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The email address where any replies or bounces will be returned."},name:{type:"string",description:"A name or title associated with the `replyTo` email address."}},required:["email"]},replyToList:{type:"array",description:"An array of recipients who will receive replies and/or bounces. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name. You can either choose to use \u201CreplyTo\u201D field or \u201CreplyToList\u201D but not both.",uniqueItems:!0,maxItems:1e3,items:{type:"object",properties:{email:{type:"string",description:"The email address where any replies or bounces will be returned.",format:"email"},name:{type:"string",description:"A name or title associated with the `replyToList` email address."}},required:["email"]}},subject:{type:"string",description:"The global or 'message level' subject of your email. This may be overridden by subject lines set in personalizations.",minLength:1},content:{type:"array",description:"An array where you can specify the content of your email. You can include multiple [MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of content, but you must specify at least one MIME type. To include more than one MIME type, add another object to the array containing the `type` and `value` parameters.",items:{type:"object",properties:{type:{type:"string",description:"The MIME type of the content you are including in your email (e.g., `\u201Ctext/plain\u201D` or `\u201Ctext/html\u201D`).",minLength:1},value:{type:"string",description:"The actual content of the specified MIME type that you are including in your email.",minLength:1}},required:["type","value"]}},attachments:{type:"array",description:"An array of objects where you can specify any attachments you want to include.",items:{type:"object",properties:{content:{type:"string",description:"The Base64 encoded content of the attachment.",minLength:1},type:{type:"string",description:"The MIME type of the content you are attaching (e.g., `\u201Ctext/plain\u201D` or `\u201Ctext/html\u201D`).",minLength:1},filename:{type:"string",description:"The attachment's filename."},disposition:{type:"string",default:"attachment",description:"The attachment's content-disposition, specifying how you would like the attachment to be displayed. For example, `\u201Cinline\u201D` results in the attached file are displayed automatically within the message while `\u201Cattachment\u201D` results in the attached file require some action to be taken before it is displayed, such as opening or downloading the file.",enum:["inline","attachment"]},contentId:{type:"string",description:"The attachment's content ID. This is used when the disposition is set to `\u201Cinline\u201D` and the attachment is an image, allowing the file to be displayed within the body of your email."}},required:["content","filename"]}},templateId:{type:"string",description:"An email template ID. A template that contains a subject and content \u2014 either text or html \u2014 will override any subject and content values specified at the personalizations or message level."},headers:{description:"An object containing key/value pairs of header names and the value to substitute for them. The key/value pairs must be strings. You must ensure these are properly encoded if they contain unicode characters. These headers cannot be one of the reserved headers.",type:"object"},categories:{type:"array",description:"An array of category names for this message. Each category name may not exceed 255 characters. ",uniqueItems:!0,maxItems:10,items:{type:"string",maxLength:255}},customArgs:{description:"Values that are specific to the entire send that will be carried along with the email and its activity data. Key/value pairs must be strings. Substitutions will not be made on custom arguments, so any string that is entered into this parameter will be assumed to be the custom argument that you would like to be used. This parameter is overridden by `customArgs` set at the personalizations level. Total `customArgs` size may not exceed 10,000 bytes.",type:"string"},sendAt:{type:"integer",description:"A unix timestamp allowing you to specify when you want your email to be delivered. This may be overridden by the `sendAt` parameter set at the personalizations level. Delivery cannot be scheduled more than 72 hours in advance. If you have the flexibility, it's better to schedule mail for off-peak times. Most emails are scheduled and sent at the top of the hour or half hour. Scheduling email to avoid peak times \u2014 for example, scheduling at 10:53 \u2014 can result in lower deferral rates due to the reduced traffic during off-peak times."},batchId:{type:"string",description:"An ID representing a batch of emails to be sent at the same time. Including a `batchId` in your request allows you include this email in that batch. It also enables you to cancel or pause the delivery of that batch. For more information, see the [Cancel Scheduled Sends API](https://sendgrid.com/docs/api-reference/)."},asm:{type:"object",description:"An object allowing you to specify how to handle unsubscribes.",properties:{groupId:{type:"integer",description:"The unsubscribe group to associate with this email."},groupsToDisplay:{type:"array",description:"An array containing the unsubscribe groups that you would like to be displayed on the unsubscribe preferences page.",maxItems:25,items:{type:"integer"}}},required:["groupId"]},ipPoolName:{type:"string",description:"The IP Pool that you would like to send this email from.",minLength:2,maxLength:64},mailSettings:{type:"object",description:"A collection of different mail settings that you can use to specify how you would like this email to be handled.",properties:{bypassListManagement:{type:"object",description:"Allows you to bypass all unsubscribe groups and suppressions to ensure that the email is delivered to every single recipient. This should only be used in emergencies when it is absolutely necessary that every recipient receives your email. This filter cannot be combined with any other bypass filters. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},bypassSpamManagement:{type:"object",description:"Allows you to bypass the spam report list to ensure that the email is delivered to recipients. Bounce and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypassListManagement` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},bypassBounceManagement:{type:"object",description:"Allows you to bypass the bounce list to ensure that the email is delivered to recipients. Spam report and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypassListManagement` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},bypassUnsubscribeManagement:{type:"object",description:"Allows you to bypass the global unsubscribe list to ensure that the email is delivered to recipients. Bounce and spam report lists will still be checked; addresses on these other lists will not receive the message. This filter applies only to global unsubscribes and will not bypass group unsubscribes. This filter cannot be combined with the `bypassListManagement` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},footer:{type:"object",description:"The default footer that you would like included on every email.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},text:{type:"string",description:"The plain text content of your footer."},html:{type:"string",description:"The HTML content of your footer."}}},sandboxMode:{type:"object",description:"Sandbox Mode allows you to send a test email to ensure that your request body is valid and formatted correctly.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}}}},trackingSettings:{type:"object",description:"Settings to determine how you would like to track the metrics of how your recipients interact with your email.",properties:{clickTracking:{type:"object",description:"Allows you to track if a recipient clicked a link in your email.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},enableText:{type:"boolean",description:"Indicates if this setting should be included in the `text/plain` portion of your email."}}},openTracking:{type:"object",description:"Allows you to track if the email was opened by including a single pixel image in the body of the content. When the pixel is loaded, Twilio SendGrid can log that the email was opened.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},substitutionTag:{type:"string",description:"Allows you to specify a substitution tag that you can insert in the body of your email at a location that you desire. This tag will be replaced by the open tracking pixel."}}},subscriptionTracking:{type:"object",description:"Allows you to insert a subscription management link at the bottom of the text and HTML bodies of your email. If you would like to specify the location of the link within your email, you may use the `substitutionTag`.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},text:{type:"string",description:"Text to be appended to the email with the subscription tracking link. You may control where the link is by using the tag <% %>"},html:{type:"string",description:"HTML to be appended to the email with the subscription tracking link. You may control where the link is by using the tag <% %>"},substitutionTag:{type:"string",description:"A tag that will be replaced with the unsubscribe URL. for example: `[unsubscribe_url]`. If this parameter is used, it will override both the `text` and `html` parameters. The URL of the link will be placed at the substitution tag\u2019s location with no additional formatting."}}},ganalytics:{type:"object",description:"Allows you to enable tracking provided by Google Analytics.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},utmSource:{type:"string",description:"Name of the referrer source. (e.g. Google, SomeDomain.com, or Marketing Email)"},utmMedium:{type:"string",description:"Name of the marketing medium. (e.g. Email)"},utmTerm:{type:"string",description:"Used to identify any paid keywords."},utmContent:{type:"string",description:"Used to differentiate your campaign from advertisements."},utmCampaign:{type:"string",description:"The name of the campaign."}}}}}},required:[],additionalProperties:!1},ho={output:xa};var mo={braze:B,clickatell:B,nodemailer:uo,emailjs:B,"email-webhook":B,"infobip-email":B,mailersend:B,mailgun:co,mailjet:po,mailtrap:B,mandrill:B,netcore:B,"novu-email":fo,outlook365:B,plunk:B,postmark:B,resend:B,sendgrid:ho,sendinblue:B,ses:B,sparkpost:B};var Ia={type:"object",properties:{},required:[],additionalProperties:!1},yo={output:Ia};var go={novu:yo};var wo={anyOf:[{type:"string"},{type:"object",additionalProperties:!0,properties:{name:{type:"string"},volume:{type:"number"},critical:{type:"number"}},required:["name","volume","critical"]}]},Na={type:"object",properties:{topic:{type:"string",description:"The destination topic for the notification."},id:{type:"string",description:"A UUID to identify the notification with APNS. If an id is not supplied, APNS will generate one automatically. If an error occurs the response will contain the id. This property populates the apns-id header."},expiry:{type:"number",description:"A UNIX timestamp when the notification should expire. If the notification cannot be delivered to the device, APNS will retry until it expires. An expiry of 0 indicates that the notification expires immediately, therefore no retries will be attempted."},priority:{type:"number",description:`Provide one of the following values:
91
+ laborum`.split(/\W/),Qt=lo,Zt={type:tt.ALLOWED_TYPES},gi=co,yr=po,wi=uo,en=fo,Si=ho,bi=mo,gr="[a-zA-Z][a-zA-Z0-9+-.]*",tn=`https?://{hostname}(?:${gr})+`,Ti="(?:\\?([a-z]{1,7}(=\\w{1,5})?&){0,3})?",We={email:"[a-zA-Z\\d][a-zA-Z\\d-]{1,13}[a-zA-Z\\d]@{hostname}",hostname:"[a-zA-Z]{1,33}\\.[a-z]{2,4}",ipv6:"[a-f\\d]{4}(:[a-f\\d]{4}){7}",uri:tn,slug:"[a-zA-Z\\d_-]+","uri-reference":`${tn}${Ti}`,"uri-template":tn.replace("(?:","(?:/\\{[a-z][:a-zA-Z0-9-]*\\}|"),"json-pointer":`(/(?:${gr.replace("]*","/]*")}|~[01]))+`,uuid:"^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$",duration:"^P(?!$)((\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?|(\\d+W)?)$"},We.iri=We["uri-reference"],We["iri-reference"]=We["uri-reference"],We["idn-email"]=We.email,We["idn-hostname"]=We.hostname,Oi=new RegExp(`\\{(${Object.keys(We).join("|")})\\}`),Ai=yo,vi=wo,Ei={boolean:pi,null:fi,array:hi,integer:mi,number:mr,object:gi,string:vi},kt=Ei,_i=St,Ri=({refs:e,schema:t,container:r,synchronous:c,refDepthMax:p,refDepthMin:h})=>{let f={},O={},U=0,T,$;return f.resolveSchema=(E,J,W)=>{if(E==null)return null;if(typeof E.generate=="function")return E;if(typeof(E.$id||E.id)=="string"&&(delete E.id,delete E.$id,delete E.$schema),typeof E.$ref=="string"){let Q=Math.max(h,p)-1;if(E.$ref==="#"||O[E.$ref]<0||T===E.$ref&&++U>Q)return E.$ref!=="#"&&$&&$.length===W.length?de.getLocalRef(t,E.$ref,c&&e):(delete E.$ref,E);typeof O[E.$ref]=="undefined"&&(O[E.$ref]=Z.number(h,p)-1),$=W,T=E.$ref;let ne;E.$ref.indexOf("#/")===-1?ne=e[E.$ref]||null:ne=de.getLocalRef(t,E.$ref,c&&e)||null;let he;if(typeof ne!="undefined"){if(!ne&&te("ignoreMissingRefs")!==!0)throw new Error(`Reference not found: ${E.$ref}`);O[E.$ref]-=1,de.merge(E,ne||{}),he=c&&ne&&ne.$ref}return he||delete E.$ref,E}if(Array.isArray(E.allOf)){let Q=E.allOf;delete E.allOf,Q.forEach(ne=>{let he=f.resolveSchema(ne,null,W);de.merge(E,typeof he.thunk=="function"?he.thunk(E):he),Array.isArray(E.allOf)&&f.resolveSchema(E,J,W)})}if(Array.isArray(E.oneOf||E.anyOf)&&W[W.length-2]!=="dependencies"){let Q=E.oneOf||E.anyOf;return E.enum&&E.oneOf&&(E.enum=E.enum.filter(ne=>de.validate(ne,Q))),{thunk(ne){let he=de.omitProps(E,["anyOf","oneOf"]),ye=Z.pick(Q);return de.merge(he,ye),Q.forEach(j=>{j.required&&j!==ye&&j.required.forEach(S=>{if(ye.required&&ye.required.includes(S))return;let b=he.required&&he.required.includes(S);he.properties&&!b&&delete he.properties[S],ne&&ne.properties&&delete ne.properties[S]})}),he}}}if(Object.keys(E).forEach(Q=>{(Array.isArray(E[Q])||typeof E[Q]=="object")&&!de.isKey(Q)&&(E[Q]=f.resolveSchema(E[Q],Q,W.concat(Q)))}),W){let Q=W[W.length-1];if(Q==="properties"||Q==="items")return E}return r.wrap(E)},f},Pi=Ri,wr=Oo,Sr=Ao,De=sr(Br(),1),_o=De.default.binaryOptions,Ro=De.default.boolOptions,Po=De.default.intOptions,xo=De.default.nullOptions,Io=De.default.strOptions,No=De.default.Schema,ko=De.default.Alias,Mo=De.default.Collection,Co=De.default.Merge,Lo=De.default.Node,Do=De.default.Pair,Uo=De.default.Scalar,xi=De.default.YAMLMap,Ii=De.default.YAMLSeq,Mt=Eo,rt=new ii,Oe=(e,t,r)=>(console.debug("[json-schema-faker] calling JSONSchemaFaker() is deprecated, call either .generate() or .resolve()"),r&&console.debug("[json-schema-faker] local references are only supported by calling .resolve()"),Oe.generate(e,t)),Oe.generateWithContext=(e,t)=>{let r=Mr(t,e);return wr(r,e,rt,!0)},Oe.generate=(e,t)=>Sr(Oe.generateWithContext(e,t)),Oe.generateYAML=(e,t)=>Mt(Oe.generateWithContext(e,t)),Oe.resolveWithContext=(e,t,r)=>{typeof t=="string"&&(r=t,t={}),r=r||(typeof process!="undefined"&&typeof process.cwd=="function"?process.cwd():""),r=`${r.replace(/\/+$/,"")}/`;let c=Mr(t,e),p={order:1,canRead(f){let O=f.url.replace("/:",":");return c[O]||c[O.split("/").pop()]},read(f,O){try{O(null,this.canRead(f))}catch(U){O(U)}}},{$RefParser:h}=cr();return h.bundle(r,e,{resolve:{file:{order:100},http:{order:200},fixedRefs:p},dereference:{circular:"ignore"}}).then(f=>wr(c,f,rt)).catch(f=>{throw new Error(`Error while resolving schema (${f.message})`)})},Oe.resolve=(e,t,r)=>Oe.resolveWithContext(e,t,r).then(Sr),Oe.resolveYAML=(e,t,r)=>Oe.resolveWithContext(e,t,r).then(Mt),kr(),Oe.format=hr,Oe.option=te,Oe.random=Z,Oe.extend=(e,t)=>(rt.extend(e,t),Oe),Oe.define=(e,t)=>(rt.define(e,t),Oe),Oe.reset=e=>(rt.reset(e),kr(),Oe),Oe.locate=e=>rt.get(e),Oe.VERSION="0.5.5",Ni={...Oe},ki=Oe}}),$o=N({"src/src/main.iife.js"(e,t){var r=(Fo(),re(Se));typeof $RefParser!="undefined"&&typeof JSONPath!="undefined"&&r.setDependencies({...JSONPath,$RefParser}),typeof window!="undefined"&&(window.JSONSchemaFaker=r.default),t.exports=r.default,t.exports.JSONSchemaFaker=r.JSONSchemaFaker}});return $o()})();((d,n)=>{d.JSONSchemaFaker=n()})(typeof self!="undefined"?self:typeof window!="undefined"?window:globalThis,()=>xn);xn.random.shuffle=function(){return["[placeholder]"]};xn.option({useDefaultValue:!0,alwaysFakeOptionals:!0});function Vi(d){return xn.generate(d)}var qi=async(d,n)=>{let s=new TextEncoder,a=s.encode(d),g=s.encode(n),N=await crypto.subtle.importKey("raw",a,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),C=await crypto.subtle.sign("HMAC",N,g);return Array.from(new Uint8Array(C)).map(z=>z.toString(16).padStart(2,"0")).join("")};var la=require("cross-fetch");var Bi=async()=>{if(process.env.NOVU_BRIDGE_ORIGIN)return`${process.env.NOVU_BRIDGE_ORIGIN}/api/novu`;if(process.env.NEXT_PUBLIC_VERCEL_ENV==="preview"&&process.env.NEXT_PUBLIC_VERCEL_URL)return`https://${process.env.NEXT_PUBLIC_VERCEL_URL}/api/novu`;try{if(process.env.NODE_ENV==="development"||process.env.NODE_ENV==="dev"){let n=await(await fetch("http://localhost:2022/.well-known/novu")).json();return`${n.tunnelOrigin}${n.route}`}}catch(d){console.error(d)}return""};function Ji(d){return!!d&&typeof d=="object"&&"error"in d&&"message"in d&&"statusCode"in d}var In=(d,n)=>{if(!d)throw new wn;return{post:async(s,a)=>{let g=await fetch(`${n}/v1${s}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`ApiKey ${d}`},body:JSON.stringify(a)}),N=await g.json();if(g.ok)return N;throw Ji(N)?new Sn(N.statusCode,N.error,N.message):new Tt(N)},delete:async s=>(await fetch(`${n}/v1${s}`,{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:`ApiKey ${d}`}})).json()}};var Qi=require("liquidjs");function Ar(d,n){let s={...d};for(let a of Object.keys(n)){let g=n[a];g&&typeof g=="object"&&!Array.isArray(g)?s[a]=Ar(s[a]||{},g):(Array.isArray(g),s[a]=g)}return s}function Nn(d,n){let s=n.split(".").reduce((a,g)=>{if(a&&typeof a=="object")return a[g]},d);if(s==null)return"";if(typeof s=="string")return s;if(typeof s=="number"||typeof s=="boolean")return String(s);if(typeof s=="object"){let a=JSON.stringify(s);return a==="{}"?"":a}return""}function Gi(d,n=2,s,a=", "){if(!Array.isArray(d)||d.length===0)return"";let g=s?d.map(z=>typeof z!="object"||!z?"":Nn(z,s)):d;if(g.length===1)return g[0];if(g.length===2)return`${g[0]} and ${g[1]}`;if(g.length===3&&n>=3)return`${g[0]}, ${a}${g[1]} and ${g[2]}`;let N=g.slice(0,n),C=g.length-n;return`${N.join(a)} and ${C} ${C===1?"other":"others"}`}var Hi=ot(require("pluralize"),1);function Ki(d,n="",s="",a="true"){if(d==null)return"";let g=0;if(Array.isArray(d)?g=d.length:typeof d=="object"?g=Object.keys(d).length:typeof d=="string"?g=+d:typeof d=="number"?g=d:g=Number(d),Number.isNaN(g)&&(g=0),g<=0)return"";let N;return s?N=g===1?n:s:N=(0,Hi.default)(n,g),a==="true"?`${g} ${N}`:N}var ca=require("liquidjs"),zi=ot(require("pluralize"),1),pa=require("zod");var ua="",da=2,fa="other",ha=", ",ma=" and ",ya=", and ";function Xi(d,n=ua,s=da,a=fa,g=ha,N=ma,C=ya){if(!Array.isArray(d)||d.length===0)return"";let z=n?d.map(be=>typeof be!="object"||!be?"":Nn(be,n)):d,re=z.length;if(re===1)return z[0];if(re===2)return`${z[0]}${N}${z[1]}`;if(s>=re){let be=z.slice(0,re-1),Me=z[re-1];return`${be.join(g)}${C}${Me}`}let Se=z.slice(0,s),Ne=re-s,ke=s===1?N:C;return`${Se.join(g)}${ke}${Ne} ${(0,zi.default)(a,Ne)}`}function ga(d){return Array.isArray(d)||typeof d=="object"&&d!==null?Zi(d):typeof d=="string"&&d.includes(`
92
+ `)?d.replace(/\n/g,"\\n"):d==null?"":String(d)}var Zi=(d,n=0)=>Array.isArray(d)||typeof d=="object"&&d!==null?JSON.stringify(d,null,n).replace(/"/g,"'").replace(/\n/g,"\\n"):d==null?"":String(d);function es(d){let n=new Qi.Liquid({outputEscape:ga,...d});return n.registerFilter("json",(s,a)=>Zi(s,a)),n.registerFilter("digest",Gi),n.registerFilter("toSentence",Xi),n.registerFilter("pluralize",Ki),n}var yt=ot(require("chalk"),1),we={info:d=>yt.default.blue(d),warning:d=>yt.default.yellow(d),error:d=>yt.default.red(d),success:d=>yt.default.green(d),underline:d=>yt.default.underline(d),bold:d=>yt.default.bold(d)},Re={SUCCESS:we.success("\u2714"),ERROR:we.error("\u2717"),WARNING:we.warning("\u26A0"),INFO:we.info("\u2139"),ARROW:we.bold("\u2192"),MOCK:we.info("\u25CB"),HYDRATED:we.bold(we.info("\u2192")),STEP:we.info("\u03C3"),ACTION:we.info("\u03B1"),DURATION:we.info("\u0394"),PROVIDER:we.info("\u2699"),OUTPUT:we.info("\u21E2"),INPUT:we.info("\u21E0"),WORKFLOW:we.info("\u03C9"),STATE:we.info("\u03C3"),EXECUTE:we.info("\u03B5"),PREVIEW:we.info("\u03C1")};function kn(d){return d||process.env.NOVU_API_URL||"https://api.novu.co"}function Mn(d){return d||process.env.NOVU_SECRET_KEY||process.env.NOVU_API_KEY||""}var vr=ot(require("sanitize-html"),1),wa=["src","alt","width","height","loading","srcset","sizes","crossorigin","usemap","ismap","class","id","style","title","dir","lang"],Sa={allowedTags:vr.default.defaults.allowedTags.concat(["style","img","html","head","body","link","meta","title"]),allowedAttributes:!1,transformTags:{img:(d,n)=>{let s={};for(let[a,g]of Object.entries(n))wa.includes(a.toLowerCase())&&(s[a]=g);return{tagName:d,attribs:s}}},allowVulnerableTags:!0,parseStyleAttributes:!1,parser:{lowerCaseAttributeNames:!0}},ts=d=>{if(!d)return d;let n=/^<!DOCTYPE .*?>/,s=d.match(n),a=(0,vr.default)(d,Sa);return s?s[0]+a:a},Cn=d=>Object.keys(d).reduce((n,s)=>{let a=d[s];return typeof a=="string"?n[s]=ts(a):Array.isArray(a)?n[s]=a.map(g=>typeof g=="string"?ts(g):typeof g=="object"?Cn(g):g):typeof a=="object"&&a!==null?n[s]=Cn(a):n[s]=a,n},{});function ns(d){console.log(`
93
+ ${we.bold(we.underline("Discovered workflowId:"))} '${d.workflowId}'`),d.steps.forEach((n,s)=>{let a=s===d.steps.length-1;console.log(`${a?"\u2514":"\u251C"} ${Re.STEP} Discovered stepId: '${n.stepId}' Type: '${n.type}'`),n.providers.forEach((N,C)=>{let z=C===n.providers.length-1;console.log(`${a?" ":"\u2502"} ${z?"\u2514":"\u251C"} ${Re.PROVIDER} Discovered provider: '${N.type}'`)})})}var is=ot(require("ajv"),1),ss=ot(require("ajv-formats"),1);var rs=d=>typeof structuredClone=="function"?structuredClone(d):JSON.parse(JSON.stringify(d));var Ln=class extends dt{constructor(s,a){let g=a.length===1?"it":"them";super(`Tried to use a ${s} in @novu/framework without ${a.join(", ")} installed. Please install ${g} by running \`npm install ${a.join(" ")}\`.`);this.statusCode=500;this.code="MissingDependencyError"}};var Dn=async(d,n)=>{let s=new Set;if((await Promise.allSettled(d.map(g=>g.import))).forEach((g,N)=>{let C=d[N];g.status==="fulfilled"&&C.exports.every(re=>g.value[re]!==void 0)||s.add(C.name)}),s.size>0)throw new Ln(n,Array.from(s))};var Un=class{constructor(){this.requiredImports=[];this.ajv=new is.default({useDefaults:!0,removeAdditional:"failing"}),(0,ss.default)(this.ajv),this.compiledSchemas=new Map}async canHandle(n){let s=n.type==="object"||!!n.anyOf||!!n.allOf||!!n.oneOf;return s&&await Dn(this.requiredImports,"JSON schema"),s}async validate(n,s){let a=this.compiledSchemas.get(s);a||(a=this.ajv.compile(s),this.compiledSchemas.set(s,a));let g=rs(n);return a(g)?{success:!0,data:g}:{success:!1,errors:a.errors.map(C=>({path:C.instancePath,message:C.message}))}}async transformToJsonSchema(n){return n}};var Fn=class{constructor(){this.requiredImports=[{name:"zod",import:import("zod"),exports:["ZodType"]},{name:"zod-to-json-schema",import:import("zod-to-json-schema"),exports:["zodToJsonSchema"]}]}async canHandle(n){let s=n.safeParseAsync!==void 0;return s&&await Dn(this.requiredImports,"Zod schema"),s}async validate(n,s){let a=await s.safeParseAsync(n);return a.success?{success:!0,data:a.data}:{success:!1,errors:a.error.errors.map(g=>({path:`/${g.path.join("/")}`,message:g.message}))}}async transformToJsonSchema(n){let{zodToJsonSchema:s}=await import("zod-to-json-schema");return s(n)}};var $n=new Fn,jn=new Un,Yn=async(d,n)=>{if(await $n.canHandle(d))return $n.validate(n,d);if(await jn.canHandle(d))return jn.validate(n,d);throw new Error("Invalid schema")},Le=async d=>{if(await $n.canHandle(d))return $n.transformToJsonSchema(d);if(await jn.canHandle(d))return jn.transformToJsonSchema(d);throw new Error("Invalid schema")};function ba(){return["development",void 0,"dev"].includes(process.env.NODE_ENV)}var vt=class{constructor(n){this.discoveredWorkflows=new Map;this.discoverWorkflowPromises=new Map;this.version="2.9.0-nightly.20251202.474f9cfa96";let s=this.buildOptions(n);this.apiUrl=s.apiUrl,this.secretKey=s.secretKey,this.strictAuthentication=s.strictAuthentication,this.templateEngine=es()}buildOptions(n){let s={apiUrl:kn(n==null?void 0:n.apiUrl),secretKey:Mn(n==null?void 0:n.secretKey),strictAuthentication:!ba()};return(n==null?void 0:n.strictAuthentication)!==void 0?s.strictAuthentication=n.strictAuthentication:process.env.NOVU_STRICT_AUTHENTICATION_ENABLED!==void 0&&(s.strictAuthentication=process.env.NOVU_STRICT_AUTHENTICATION_ENABLED==="true"),s}async addWorkflows(n){for(let s of n){if(this.discoveredWorkflows.has(s.id))continue;let a=this.discoverWorkflowPromises.get(s.id);if(a){await a;continue}let g=this.addWorkflow(s);this.discoverWorkflowPromises.set(s.id,g),await g}}async addWorkflow(n){try{let s=await n.discover();ns(s),this.discoveredWorkflows.set(n.id,s)}finally{this.discoverWorkflowPromises.delete(n.id)}}healthCheck(){let n=this.getRegisteredWorkflows(),s=n.length,a=n.reduce((g,N)=>g+N.steps.length,0);return{status:"ok",sdkVersion:"2.9.0-nightly.20251202.474f9cfa96",frameworkVersion:"2024-06-26",discovered:{workflows:s,steps:a}}}getWorkflow(n){let s=this.discoveredWorkflows.get(n);if(s)return s;throw new Wt(n)}getStep(n,s){let g=this.getWorkflow(n).steps.find(N=>N.stepId===s);if(g)return g;throw new Rn(s)}getRegisteredWorkflows(){return Array.from(this.discoveredWorkflows.values())}discover(){return{workflows:this.getRegisteredWorkflows()}}mock(n){return Vi(n)}async validate(n,s,a,g,N,C,z){let re=await Yn(s,n);if(re.success)return re.data;switch(a){case"event":this.throwInvalidEvent(g,N,re.errors);case"step":this.throwInvalidStep(C,g,N,re.errors);case"provider":this.throwInvalidProvider(C,z,g,N,re.errors);default:throw new Error(`Invalid component: '${a}'`)}}throwInvalidProvider(n,s,a,g,N){if(!n)throw new Error("stepId is required");if(!s)throw new Error("providerId is required");switch(a){case"output":throw new hn(g,n,s,N);default:throw new Error(`Invalid payload type: '${a}'`)}}throwInvalidStep(n,s,a,g){if(!n)throw new Error("stepId is required");switch(s){case"output":throw new un(a,n,g);case"result":throw new dn(a,n,g);case"controls":throw new pn(a,n,g);default:throw new Error(`Invalid payload type: '${s}'`)}}throwInvalidEvent(n,s,a){switch(n){case"controls":throw new cn(s,a);case"payload":throw new Ft(s,a);default:throw new Error(`Invalid payload type: '${n}'`)}}executeStepFactory(n,s,a){return async(g,N,C)=>{if(a())return;let z=this.getStep(n.workflowId,g),re=n.action==="preview";if(!re&&g===n.stepId){let Me=await this.createStepControls(z,n),$e=await this.compileControls(Me,n);if(await this.shouldSkip(C==null?void 0:C.skip,$e))return s({options:{skip:!0},outputs:{},providers:{}}),{}}let Se=this.previewStep.bind(this),Ne=this.executeStep.bind(this),be=await(re?Se:Ne)(n,{...z,providers:z.providers.map(Me=>{var ct;let $e=(ct=C==null?void 0:C.providers)==null?void 0:ct[Me.type];if(!$e)throw new bn(Me.type);return{...Me,resolve:$e}}),resolve:N});return this.shouldSanitize({stepType:z.type,options:C})&&(be={...be,outputs:Cn(be.outputs)}),g===n.stepId&&s({...be,options:{skip:!1}}),be.outputs}}shouldSanitize({stepType:n,options:s}){return(s==null?void 0:s.disableOutputSanitization)===!0?!1:["email","in_app"].includes(n)}async shouldSkip(n,s){return n?n(s):!1}async executeWorkflow(n){let g=`${{execute:"Executing",preview:"Previewing"}[n.action]} workflowId:`;console.log(`
94
+ ${we.bold(we.underline(g))} '${n.workflowId}'`);let N=this.getWorkflow(n.workflowId),C=process.hrtime(),z={outputs:{},providers:{},options:{skip:!1}},re,Se=!1,Ne=new Promise(et=>{re=et}),ke=et=>{if(Se)throw new Error("setResult can only be called once per workflow execution");re(),Se=!0,z=et},be=()=>Se,Me;try{if(n.action==="execute"&&!n.payload)throw new Ft(n.workflowId,{message:"Event `payload` is required"});let et=await this.createExecutionPayload(n,N),He={...n,payload:et};await Promise.race([Ne,N.execute({payload:et,environment:{},controls:{},subscriber:n.subscriber,context:n.context,step:{email:this.executeStepFactory(He,ke,be),sms:this.executeStepFactory(He,ke,be),inApp:this.executeStepFactory(He,ke,be),digest:this.executeStepFactory(He,ke,be),delay:this.executeStepFactory(He,ke,be),push:this.executeStepFactory(He,ke,be),chat:this.executeStepFactory(He,ke,be),custom:this.executeStepFactory(He,ke,be),throttle:this.executeStepFactory(He,ke,be)}})])}catch(et){Me=et}let $e=process.hrtime(C),ct=$e[0],Ze=$e[1],Gt=ct*1e3+Ze/1e6,Xn=Me?Re.ERROR:Re.SUCCESS,Ht={execute:"Executed",preview:"Previewed"}[n.action];if(console.log(`${Xn} ${Ht} workflowId: \`${n.workflowId}\``),this.prettyPrintExecute(n,Gt,Me),Me)throw Me;return{outputs:z.outputs,providers:z.providers,options:z.options,metadata:{status:"success",error:!1,duration:Gt}}}async createExecutionPayload(n,s){let{payload:a}=n;if(n.action==="preview"){let N=this.mock(s.payload.schema);a=Object.assign(N,a)}return await this.validate(a,s.payload.unknownSchema,"event","payload",n.workflowId)}prettyPrintExecute(n,s,a){let g=a?Re.ERROR:Re.SUCCESS,C={execute:"Executed",preview:"Previewed"}[n.action],z=a?"Failed to execute":C,re=a?we.error:we.success,Se=`${g} ${z} workflowId: '${n.workflowId}`;console.log(`
95
+ ${we.bold(re(Se))}'`),console.log(` \u251C ${Re.STEP} stepId: '${n.stepId}'`),console.log(` \u251C ${Re.ACTION} action: '${n.action}'`),console.log(` \u2514 ${Re.DURATION} duration: '${s.toFixed(2)}ms'
96
+ `)}async executeProviders(n,s,a){return s.providers.reduce(async(g,N)=>{let C=await g,z=this.previewProvider.bind(this),re=this.executeProvider.bind(this),Ne=await(n.action==="preview"?z:re)(n,s,N,a);return{...C,[N.type]:Ne}},Promise.resolve({}))}previewProvider(n,s,a,g){return console.log(` ${Re.MOCK} Mocked provider: \`${a.type}\``),this.mock(a.outputs.schema)}async executeProvider(n,s,a,g){try{if(n.stepId===s.stepId){let N=await this.createStepControls(s,n),C=await a.resolve({controls:N,outputs:g}),z=await this.validate(C,a.outputs.unknownSchema,"step","output",n.workflowId,s.stepId,a.type);return console.log(` ${Re.SUCCESS} Executed provider: \`${a.type}\``),{...z,_passthrough:C._passthrough}}else return console.log(` ${Re.HYDRATED} Hydrated provider: \`${a.type}\``),{}}catch(N){throw console.log(` ${Re.ERROR} Failed to execute provider: \`${a.type}\``),new Tn(a.type,n.action,N)}}async executeStep(n,s){if(n.stepId===s.stepId)try{let a=await this.createStepControls(s,n),g=await this.compileControls(a,n),N=await s.resolve(g),C=await this.validate(N,s.outputs.unknownSchema,"step","output",n.workflowId,s.stepId),z=await this.executeProviders(n,s,C);return console.log(` ${Re.SUCCESS} Executed stepId: \`${s.stepId}\``),{outputs:C,providers:z}}catch(a){throw console.log(` ${Re.ERROR} Failed to execute stepId: \`${s.stepId}\``),ht(a)?a:new Yt(s.stepId,n.action,a)}else try{let a=this.getStepState(n,s.stepId);if(a){let g=await this.validate(a.outputs,s.results.unknownSchema,"step","result",n.workflowId,s.stepId);return console.log(` ${Re.HYDRATED} Hydrated stepId: \`${s.stepId}\``),{outputs:g,providers:await this.executeProviders(n,s,g)}}else throw new ln(n.workflowId,s.stepId)}catch(a){throw console.log(` ${Re.ERROR} Failed to hydrate stepId: \`${s.stepId}\``),a}}async compileControls(n,s){try{let a=this.preprocessTranslationPatterns(JSON.stringify(n));a=this.preprocessFilterTranslationArgs(a);let g=this.templateEngine.parse(a),N=this.getWorkflow(s.workflowId),C={workflow:{workflowId:N.workflowId,name:N.name,description:N.description,tags:N.tags,severity:N.severity},payload:s.payload,subscriber:s.subscriber,context:s.context,steps:Ta(s.state)},z=await this.templateEngine.render(g,C),re=this.postprocessTranslationMarkers(z),Se=(0,os.jsonrepair)(re);return JSON.parse(Se)}catch(a){throw new fn(s.workflowId,s.stepId,a)}}preprocessTranslationPatterns(n){return n.replace(/\{\{\s*t\.([\p{L}\p{N}_.-]+)\s*\}\}/gu,"[T:$1]")}preprocessFilterTranslationArgs(n){return n.replace(/'t\.([\p{L}\p{N}_.-]+)'/gu,"'[T:$1]'")}postprocessTranslationMarkers(n){return n.replace(/\[T:([\p{L}\p{N}_.-]+)\]/gu,"{{t.$1}}")}async createStepControls(n,s){return await this.validate(s.controls,n.controls.unknownSchema,"step","controls",s.workflowId,n.stepId)}async previewStep(n,s){try{return await this.constructStepForPreview(n,s)}catch(a){throw console.log(` ${Re.ERROR} Failed to preview stepId: \`${s.stepId}\``),ht(a)?a:new Yt(s.stepId,n.action,a)}}async constructStepForPreview(n,s){return n.stepId===s.stepId?await this.previewRequiredStep(s,n):await this.extractMockDataForPreviousSteps(n,s)}async extractMockDataForPreviousSteps(n,s){let a={},g=this.getStepState(n,s.stepId),N=this.mock(s.results.schema);return{outputs:Ar(N,(g==null?void 0:g.outputs)||{}),providers:await this.executeProviders(n,s,a)}}async previewRequiredStep(n,s){let a=await this.createStepControls(n,s),g=await this.compileControls(a,s),N=await n.resolve(g),C=await this.validate(N,n.outputs.unknownSchema,"step","output",s.workflowId,n.stepId);return console.log(` ${Re.MOCK} Mocked stepId: \`${n.stepId}\``),{outputs:C,providers:await this.executeProviders(s,n,C)}}getStepState(n,s){return n.state.find(a=>a.stepId===s)}getStepCode(n,s){return{code:this.getStep(n,s).resolve.toString()}}getWorkflowCode(n){return{code:this.getWorkflow(n).execute.toString()}}getCode(n,s){let a;if(n)s?a=this.getStepCode(n,s):a=this.getWorkflowCode(n);else throw new Wt(n);return a}};function Ta(d){let n={};for(let s of d)n[s.stepId]=s.outputs;return n}var Et=class{constructor(n){this.handler=n.handler,this.client=n.client?n.client:new vt,this.workflows=n.workflows,this.http=In(this.client.secretKey,this.client.apiUrl),this.frameworkName=n.frameworkName,this.hmacEnabled=this.client.strictAuthentication}createHandler(){return async(...n)=>{await this.client.addWorkflows(this.workflows);let s=await this.handler(...n),a=await this.handleAction({actions:s});return s.transformResponse(a)}}getStaticHeaders(){let n=`novu-framework:v${this.client.version}`;return{"content-type":"application/json","access-control-allow-origin":"*","access-control-allow-methods":"GET, POST","access-control-allow-headers":"*","access-control-max-age":"604800","novu-framework-version":"2024-06-26","novu-framework-sdk":"2.9.0-nightly.20251202.474f9cfa96","novu-framework-server":this.frameworkName,"user-agent":n}}createResponse(n,s){return{status:n,body:JSON.stringify(s),headers:{...this.getStaticHeaders()}}}createError(n){return{status:n.statusCode,body:JSON.stringify({message:n.message,data:n.data,code:n.code}),headers:this.getStaticHeaders()}}async handleAction({actions:n}){let s=await n.url(),a=await n.method(),g=s.searchParams.get("action")||"health-check",N=s.searchParams.get("workflowId")||"",C=s.searchParams.get("stepId")||"",z=await n.headers("novu-signature")||"",re={};try{a==="POST"&&(re=await n.body())}catch{}try{g!=="health-check"&&await this.validateHmac(re,z);let Se=this.getPostActionMap(re,N,C,g),Ne=this.getGetActionMap(N,C);if(a==="POST")return await this.handlePostAction(g,Se);if(a==="GET")return await this.handleGetAction(g,Ne);if(a==="OPTIONS")return this.createResponse(200,{})}catch(Se){return this.handleError(Se)}return this.createError(new gn(a))}getPostActionMap(n,s,a,g){return{trigger:this.triggerAction({workflowId:s,...n}),execute:async()=>{let N=await this.client.executeWorkflow({...n,workflowId:s,stepId:a,action:g});return this.createResponse(200,N)},preview:async()=>{let N=await this.client.executeWorkflow({...n,workflowId:s,stepId:a,action:g});return this.createResponse(200,N)}}}triggerAction(n){return async()=>{let s={name:n.workflowId,to:n.to,payload:(n==null?void 0:n.payload)||{},transactionId:n.transactionId,overrides:n.overrides||{},...n.actor&&{actor:n.actor},...n.bridgeUrl&&{bridgeUrl:n.bridgeUrl},...n.controls&&{controls:n.controls},...n.context&&{context:n.context}},a=await this.http.post("/events/trigger",s);return this.createResponse(200,a)}}getGetActionMap(n,s){return{discover:async()=>{let a=await this.client.discover();return this.createResponse(200,a)},"health-check":async()=>{let a=await this.client.healthCheck();return this.createResponse(200,a)},code:async()=>{let a=await this.client.getCode(n,s);return this.createResponse(200,a)}}}async handlePostAction(n,s){if(Object.values(Dt).includes(n)){let a=s[n];return a()}else throw new $t(n,Dt)}async handleGetAction(n,s){if(Object.values(rn).includes(n)){let a=s[n];return a()}else throw new $t(n,rn)}handleError(n){if(ht(n))return n.statusCode>=500&&console.error(n),this.createError(n);if(Li(n))return this.createError(n);{let s=new Tt(n);return console.error(s),this.createError(s)}}async validateHmac(n,s){if(!this.hmacEnabled)return;if(!s)throw new An;if(!this.client.secretKey)throw new _n;let[a,g]=s.split(",");if(!a||!g)throw new vn;let[N,C]=a.split("="),[z,re]=g.split("=");if(Number(N)<Date.now()-1500)throw new En;if(!(await qi(this.client.secretKey,`${C}.${JSON.stringify(n)}`)===re))throw new On}};var B={output:{type:"object",properties:{},required:[],additionalProperties:!0}};var Aa={type:"object",properties:{webhookUrl:{type:"string",format:"uri"},text:{type:"string"},blocks:{type:"array",items:{type:"object",properties:{type:{enum:["image","context","actions","divider","section","input","file","header","video","rich_text"]}},required:["type"],additionalProperties:!0}}},additionalProperties:!0},as={output:Aa};var ls={"chat-webhook":B,discord:B,getstream:B,"grafana-on-call":B,mattermost:B,msteams:B,"rocket-chat":B,ryver:B,slack:as,"whatsapp-business":B,zulip:B};var va={type:"object",properties:{to:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:'Email address of the recipient(s). Example: "Bob bob@host.com". You can use commas to separate multiple recipients (e.g.: "test@example.com,test@example.com" or ["test@example.com", "test@example.com"]).'},from:{type:"string"},subject:{type:"string",description:"Subject of the message."},text:{type:"string",description:"Text version of the message."},html:{type:"string",description:"HTML version of the message."},message:{type:"string",description:"MIME string of the message. Make sure to use multipart/form-data to send this as a file upload."},cc:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"Same as To but for carbon copy"},bcc:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"Same as To but for blind carbon copy"},ampHtml:{type:"string"},tVersion:{type:"string"},tText:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}]},oTag:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"Tag string. See Tagging for more information."},oDkim:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Enables/disabled DKIM signatures on per-message basis. Pass yes or no"},oDeliverytime:{type:"string",description:"Desired time of delivery. See Date Format. Note: Messages can be scheduled for a maximum of 3 days in the future."},oDeliverytimeOptimizePeriod:{type:"string"},oTimeZoneLocalize:{type:"string"},oTestmode:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Enables sending in test mode. Pass yes if needed. See Sending in Test Mode"},oTracking:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Toggles tracking on a per-message basis, see Tracking Messages for details. Pass yes or no."},oTrackingClicks:{anyOf:[{type:"string",enum:["yes","no","htmlonly"]},{type:"boolean"}],description:"Toggles clicks tracking on a per-message basis. Has higher priority than domain-level setting. Pass yes, no or htmlonly."},oTrackingOpens:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}],description:"Toggles opens tracking on a per-message basis. Has higher priority than domain-level setting. Pass yes or no."},oRequireTls:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}]},oSkipVerification:{anyOf:[{type:"string",enum:["yes","no"]},{type:"boolean"}]},recipientVariables:{type:"string"}},required:[],additionalProperties:!0},cs={output:va};var gt={type:"object",properties:{name:{type:"string"},email:{type:"string"}},description:'JSON object, containing 2 properties: Name and Email address of a previously validated and active sender. Including the Name property in the JSON is optional. This property is not mandatory in case you use TemplateID and you specified a From address for the template. Format : { "Email":"value", "Name":"value" }.',required:["Email"],additionalProperties:!0},Ea={type:"object",properties:{contentType:{type:"string"},filename:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},_a={type:"object",properties:{filename:{type:"string"},contentType:{type:"string"},contentId:{type:"string"},base64Content:{type:"string"}},required:["ContentType","Filename","Base64Content"],additionalProperties:!0},Ra={type:"object",properties:{from:gt,sender:gt,to:{type:"array",items:gt},cc:{type:"array",items:gt},bcc:{type:"array",items:gt},replyTo:gt,subject:{type:"string"},textPart:{type:"string",description:"Content of the message, sent in Text and/or HTML format. At least one of these content types needs to be specified. When the HTML part is the only part provided, Mailjet will not generate a Text-part from the HTML version. The property can't be set when you use TemplateID"},htmlPart:{type:"string",description:"Content of the message, sent in Text and/or HTML format. At least one of these content types needs to be specified. When the HTML part is the only part provided, Mailjet will not generate a Text-part from the HTML version. The property can't be set when you use TemplateID"},templateId:{type:"number",description:"an ID for a template that is previously created and stored in Mailjet's system. It is mandatory when From and TextPart and/or HtmlPart are not provided. "},templateLanguage:{type:"boolean"},templateErrorReporting:gt,templateErrorDeliver:{type:"boolean"},attachments:{type:"array",items:Ea},inlineAttachments:{type:"array",items:_a},priority:{type:"number"},customCampaign:{type:"string"},deduplicateCampaign:{type:"boolean"},trackOpens:{type:"string",enum:["account_default","disabled","enabled"]},trackClicks:{type:"string",enum:["account_default","disabled","enabled"]},customId:{type:"string"},eventPayload:{type:"string"},urlTags:{type:"string"},headers:{type:"object",additionalProperties:!0},variables:{type:"object",additionalProperties:!0}},required:[],additionalProperties:!0},ps={output:Ra};var Xe={type:"object",properties:{address:{type:"string"},name:{type:"string"}},additionalProperties:!0},Wn={type:"object",properties:{content:{type:"string"},path:{type:"string"}},additionalProperties:!0},Pa={type:"object",properties:{from:{anyOf:[{type:"string"},Xe]},sender:{anyOf:[{type:"string"},Xe]},to:{anyOf:[{type:"string"},Xe,{type:"array",items:Xe}]},cc:{anyOf:[{type:"string"},Xe,{type:"array",items:Xe}]},bcc:{anyOf:[{type:"string"},Xe,{type:"array",items:Xe}]},replyTo:{anyOf:[{type:"string"},Xe,{type:"array",items:Xe}]},inReplyTo:{anyOf:[{type:"string"},Xe]},references:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},subject:{type:"string"},text:{anyOf:[{type:"string"},Wn]},html:{anyOf:[{type:"string"},Wn]},watchHtml:{anyOf:[{type:"string"},Wn]},amp:{anyOf:[{type:"string"},{type:"object",properties:{content:{type:"string"},path:{type:"string"},href:{type:"string"},encoding:{type:"string"},contentType:{type:"string"},raw:{anyOf:[{type:"string"},Wn]}}}]},icalEvent:{anyOf:[{type:"string"},{type:"object",properties:{content:{type:"string"},path:{type:"string"},method:{type:"string"},filename:{anyOf:[{type:"string"},{type:"boolean"}]},href:{type:"string"},encoding:{type:"string"}}}]},headers:{anyOf:[{type:"object",additionalProperties:!0},{type:"array",items:{type:"object",additionalProperties:!0}}]},list:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]},attachments:{type:"array",items:{type:"object",properties:{content:{type:"string"},path:{type:"string"}},additionalProperties:!0}}},required:[],additionalProperties:!0},us={output:Pa};var xa={type:"object",properties:{},required:[],additionalProperties:!1},ds={output:xa};var Ia={type:"object",properties:{personalizations:{type:"array",description:"An array of messages and their metadata. Each object within personalizations can be thought of as an envelope - it defines who should receive an individual message and how that message should be handled. See our [Personalizations documentation](https://sendgrid.com/docs/for-developers/sending-email/personalizations/) for examples.",uniqueItems:!1,maxItems:1e3,items:{type:"object",properties:{from:{title:"From Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account."},name:{type:"string",description:"A name or title associated with the sending email address."}},required:["email"]},to:{title:"To Email Array",type:"array",items:{type:"object",properties:{email:{type:"string",format:"email",description:"The intended recipient's email address."},name:{type:"string",description:"The intended recipient's name."}},required:["email"]}},cc:{type:"array",description:"An array of recipients who will receive a copy of your email. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name.",maxItems:1e3,items:{title:"CC BCC Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The intended recipient's email address."},name:{type:"string",description:"The intended recipient's name."}},required:["email"]}},bcc:{type:"array",description:"An array of recipients who will receive a blind carbon copy of your email. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name.",maxItems:1e3,items:{title:"CC BCC Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The intended recipient's email address."},name:{type:"string",description:"The intended recipient's name."}},required:["email"]}},subject:{type:"string",description:"The subject of your email. See character length requirements according to [RFC 2822](http://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit#answer-1592310).",minLength:1},headers:{type:"object",description:"A collection of JSON key/value pairs allowing you to specify handling instructions for your email. You may not overwrite the following headers: `x-sg-id`, `x-sg-eid`, `received`, `dkim-signature`, `Content-Type`, `Content-Transfer-Encoding`, `To`, `From`, `Subject`, `Reply-To`, `CC`, `BCC`"},substitutions:{type:"object",description:'Substitutions allow you to insert data without using Dynamic Transactional Templates. This field should **not** be used in combination with a Dynamic Transactional Template, which can be identified by a `templateId` starting with `d-`. This field is a collection of key/value pairs following the pattern "substitutionTag":"value to substitute". The key/value pairs must be strings. These substitutions will apply to the text and html content of the body of your email, in addition to the `subject` and `reply-to` parameters. The total collective size of your substitutions may not exceed 10,000 bytes per personalization object.',maxProperties:1e4},dynamicTemplateData:{type:"object",description:'Dynamic template data is available using Handlebars syntax in Dynamic Transactional Templates. This field should be used in combination with a Dynamic Transactional Template, which can be identified by a `templateId` starting with `d-`. This field is a collection of key/value pairs following the pattern "variable_name":"value to insert".'},customArgs:{type:"object",description:"Values that are specific to this personalization that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string that is entered into this parameter will be assumed to be the custom argument that you would like to be used. This field may not exceed 10,000 bytes.",maxProperties:1e4},sendAt:{type:"integer",description:"A unix timestamp allowing you to specify when your email should be delivered. Scheduling delivery more than 72 hours in advance is forbidden."}},required:["to"]}},from:{title:"From Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account."},name:{type:"string",description:"A name or title associated with the sending email address."}},required:["email"]},replyTo:{title:"Reply_to Email Object",type:"object",properties:{email:{type:"string",format:"email",description:"The email address where any replies or bounces will be returned."},name:{type:"string",description:"A name or title associated with the `replyTo` email address."}},required:["email"]},replyToList:{type:"array",description:"An array of recipients who will receive replies and/or bounces. Each object in this array must contain the recipient's email address. Each object in the array may optionally contain the recipient's name. You can either choose to use \u201CreplyTo\u201D field or \u201CreplyToList\u201D but not both.",uniqueItems:!0,maxItems:1e3,items:{type:"object",properties:{email:{type:"string",description:"The email address where any replies or bounces will be returned.",format:"email"},name:{type:"string",description:"A name or title associated with the `replyToList` email address."}},required:["email"]}},subject:{type:"string",description:"The global or 'message level' subject of your email. This may be overridden by subject lines set in personalizations.",minLength:1},content:{type:"array",description:"An array where you can specify the content of your email. You can include multiple [MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of content, but you must specify at least one MIME type. To include more than one MIME type, add another object to the array containing the `type` and `value` parameters.",items:{type:"object",properties:{type:{type:"string",description:"The MIME type of the content you are including in your email (e.g., `\u201Ctext/plain\u201D` or `\u201Ctext/html\u201D`).",minLength:1},value:{type:"string",description:"The actual content of the specified MIME type that you are including in your email.",minLength:1}},required:["type","value"]}},attachments:{type:"array",description:"An array of objects where you can specify any attachments you want to include.",items:{type:"object",properties:{content:{type:"string",description:"The Base64 encoded content of the attachment.",minLength:1},type:{type:"string",description:"The MIME type of the content you are attaching (e.g., `\u201Ctext/plain\u201D` or `\u201Ctext/html\u201D`).",minLength:1},filename:{type:"string",description:"The attachment's filename."},disposition:{type:"string",default:"attachment",description:"The attachment's content-disposition, specifying how you would like the attachment to be displayed. For example, `\u201Cinline\u201D` results in the attached file are displayed automatically within the message while `\u201Cattachment\u201D` results in the attached file require some action to be taken before it is displayed, such as opening or downloading the file.",enum:["inline","attachment"]},contentId:{type:"string",description:"The attachment's content ID. This is used when the disposition is set to `\u201Cinline\u201D` and the attachment is an image, allowing the file to be displayed within the body of your email."}},required:["content","filename"]}},templateId:{type:"string",description:"An email template ID. A template that contains a subject and content \u2014 either text or html \u2014 will override any subject and content values specified at the personalizations or message level."},headers:{description:"An object containing key/value pairs of header names and the value to substitute for them. The key/value pairs must be strings. You must ensure these are properly encoded if they contain unicode characters. These headers cannot be one of the reserved headers.",type:"object"},categories:{type:"array",description:"An array of category names for this message. Each category name may not exceed 255 characters. ",uniqueItems:!0,maxItems:10,items:{type:"string",maxLength:255}},customArgs:{description:"Values that are specific to the entire send that will be carried along with the email and its activity data. Key/value pairs must be strings. Substitutions will not be made on custom arguments, so any string that is entered into this parameter will be assumed to be the custom argument that you would like to be used. This parameter is overridden by `customArgs` set at the personalizations level. Total `customArgs` size may not exceed 10,000 bytes.",type:"string"},sendAt:{type:"integer",description:"A unix timestamp allowing you to specify when you want your email to be delivered. This may be overridden by the `sendAt` parameter set at the personalizations level. Delivery cannot be scheduled more than 72 hours in advance. If you have the flexibility, it's better to schedule mail for off-peak times. Most emails are scheduled and sent at the top of the hour or half hour. Scheduling email to avoid peak times \u2014 for example, scheduling at 10:53 \u2014 can result in lower deferral rates due to the reduced traffic during off-peak times."},batchId:{type:"string",description:"An ID representing a batch of emails to be sent at the same time. Including a `batchId` in your request allows you include this email in that batch. It also enables you to cancel or pause the delivery of that batch. For more information, see the [Cancel Scheduled Sends API](https://sendgrid.com/docs/api-reference/)."},asm:{type:"object",description:"An object allowing you to specify how to handle unsubscribes.",properties:{groupId:{type:"integer",description:"The unsubscribe group to associate with this email."},groupsToDisplay:{type:"array",description:"An array containing the unsubscribe groups that you would like to be displayed on the unsubscribe preferences page.",maxItems:25,items:{type:"integer"}}},required:["groupId"]},ipPoolName:{type:"string",description:"The IP Pool that you would like to send this email from.",minLength:2,maxLength:64},mailSettings:{type:"object",description:"A collection of different mail settings that you can use to specify how you would like this email to be handled.",properties:{bypassListManagement:{type:"object",description:"Allows you to bypass all unsubscribe groups and suppressions to ensure that the email is delivered to every single recipient. This should only be used in emergencies when it is absolutely necessary that every recipient receives your email. This filter cannot be combined with any other bypass filters. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},bypassSpamManagement:{type:"object",description:"Allows you to bypass the spam report list to ensure that the email is delivered to recipients. Bounce and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypassListManagement` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},bypassBounceManagement:{type:"object",description:"Allows you to bypass the bounce list to ensure that the email is delivered to recipients. Spam report and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypassListManagement` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},bypassUnsubscribeManagement:{type:"object",description:"Allows you to bypass the global unsubscribe list to ensure that the email is delivered to recipients. Bounce and spam report lists will still be checked; addresses on these other lists will not receive the message. This filter applies only to global unsubscribes and will not bypass group unsubscribes. This filter cannot be combined with the `bypassListManagement` filter. See our [documentation](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}},footer:{type:"object",description:"The default footer that you would like included on every email.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},text:{type:"string",description:"The plain text content of your footer."},html:{type:"string",description:"The HTML content of your footer."}}},sandboxMode:{type:"object",description:"Sandbox Mode allows you to send a test email to ensure that your request body is valid and formatted correctly.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."}}}}},trackingSettings:{type:"object",description:"Settings to determine how you would like to track the metrics of how your recipients interact with your email.",properties:{clickTracking:{type:"object",description:"Allows you to track if a recipient clicked a link in your email.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},enableText:{type:"boolean",description:"Indicates if this setting should be included in the `text/plain` portion of your email."}}},openTracking:{type:"object",description:"Allows you to track if the email was opened by including a single pixel image in the body of the content. When the pixel is loaded, Twilio SendGrid can log that the email was opened.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},substitutionTag:{type:"string",description:"Allows you to specify a substitution tag that you can insert in the body of your email at a location that you desire. This tag will be replaced by the open tracking pixel."}}},subscriptionTracking:{type:"object",description:"Allows you to insert a subscription management link at the bottom of the text and HTML bodies of your email. If you would like to specify the location of the link within your email, you may use the `substitutionTag`.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},text:{type:"string",description:"Text to be appended to the email with the subscription tracking link. You may control where the link is by using the tag <% %>"},html:{type:"string",description:"HTML to be appended to the email with the subscription tracking link. You may control where the link is by using the tag <% %>"},substitutionTag:{type:"string",description:"A tag that will be replaced with the unsubscribe URL. for example: `[unsubscribe_url]`. If this parameter is used, it will override both the `text` and `html` parameters. The URL of the link will be placed at the substitution tag\u2019s location with no additional formatting."}}},ganalytics:{type:"object",description:"Allows you to enable tracking provided by Google Analytics.",properties:{enable:{type:"boolean",description:"Indicates if this setting is enabled."},utmSource:{type:"string",description:"Name of the referrer source. (e.g. Google, SomeDomain.com, or Marketing Email)"},utmMedium:{type:"string",description:"Name of the marketing medium. (e.g. Email)"},utmTerm:{type:"string",description:"Used to identify any paid keywords."},utmContent:{type:"string",description:"Used to differentiate your campaign from advertisements."},utmCampaign:{type:"string",description:"The name of the campaign."}}}}}},required:[],additionalProperties:!1},fs={output:Ia};var hs={braze:B,clickatell:B,nodemailer:us,emailjs:B,"email-webhook":B,"infobip-email":B,mailersend:B,mailgun:cs,mailjet:ps,mailtrap:B,mandrill:B,netcore:B,"novu-email":ds,outlook365:B,plunk:B,postmark:B,resend:B,sendgrid:fs,sendinblue:B,ses:B,sparkpost:B};var Na={type:"object",properties:{},required:[],additionalProperties:!1},ms={output:Na};var ys={novu:ms};var gs={anyOf:[{type:"string"},{type:"object",additionalProperties:!0,properties:{name:{type:"string"},volume:{type:"number"},critical:{type:"number"}},required:["name","volume","critical"]}]},ka={type:"object",properties:{topic:{type:"string",description:"The destination topic for the notification."},id:{type:"string",description:"A UUID to identify the notification with APNS. If an id is not supplied, APNS will generate one automatically. If an error occurs the response will contain the id. This property populates the apns-id header."},expiry:{type:"number",description:"A UNIX timestamp when the notification should expire. If the notification cannot be delivered to the device, APNS will retry until it expires. An expiry of 0 indicates that the notification expires immediately, therefore no retries will be attempted."},priority:{type:"number",description:`Provide one of the following values:
97
97
 
98
98
  10 - The push notification is sent to the device immediately. (Default)
99
99
  The push notification must trigger an alert, sound, or badge on the device. It is an error to use this priority for a push notification that contains only the content-available key.
100
100
 
101
101
  5 - The push message is sent at a time that conserves power on the device receiving it.`},collapseId:{type:"string"},pushType:{type:"string",enum:["background","alert","voip"],description:`The type of the notification. The value of this header is alert or background. Specify alert when the delivery of your notification displays an alert, plays a sound, or badges your app's icon. Specify background for silent notifications that do not interact with the user.
102
102
 
103
- The value of this header must accurately reflect the contents of your notification's payload. If there is a mismatch, or if the header is missing on required systems, APNs may delay the delivery of the notification or drop it altogether.`},threadId:{type:"string"},payload:{type:"object",additionalProperties:!0},aps:{type:"object",additionalProperties:!0,properties:{badge:{type:"number"},sound:wo,category:{type:"string"},contentAvailable:{type:"number"},launchImage:{type:"number"},mutableContent:{type:"number"},urlArgs:{type:"array",items:{type:"string"}}}},rawPayload:{type:"object",additionalProperties:!0},badge:{type:"number"},sound:wo,alert:{anyOf:[{type:"string"},{type:"object",additionalProperties:!0,properties:{title:{type:"string"},body:{type:"string"},subtitle:{type:"string"},titleLocKey:{type:"string"},titleLocArgs:{type:"array",items:{type:"string"}},actionLocKey:{type:"string"},locKey:{type:"string"},locArgs:{type:"array",items:{type:"string"}},launchImage:{type:"string"}},required:["body"]}]},contentAvailable:{type:"boolean"},mutableContent:{type:"boolean"},mdm:{anyOf:[{type:"string"},{type:"object",additionalProperties:!0}]},urlArgs:{type:"array",items:{type:"string"}}},required:[],additionalProperties:!0},So={output:Na};var ka={type:"object",properties:{to:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"An Expo push token or an array of Expo push tokens specifying the recipient(s) of this message."},data:{type:"object",additionalProperties:!0,description:'A JSON object delivered to your app. It may be up to about 4KiB; the total notification payload sent to Apple and Google must be at most 4KiB or else you will get a "Message Too Big" error.'},title:{type:"string",description:"The title to display in the notification. Often displayed above the notification body."},subtitle:{type:"string",description:"The subtitle to display in the notification below the title."},body:{type:"string",description:"The message to display in the notification."},sound:{anyOf:[{type:"string"},{type:"null"},{type:"object",properties:{name:{anyOf:[{type:"string",enum:["default"]},{type:"null"}]},volume:{type:"number"},critical:{type:"boolean"}},additionalProperties:!0}],description:"Play a sound when the recipient receives this notification. Specify default to play the device's default notification sound, or omit this field to play no sound. Custom sounds are not supported."},ttl:{type:"number",description:"Time to Live: the number of seconds for which the message may be kept around for redelivery if it hasn't been delivered yet. Defaults to undefined to use the respective defaults of each provider (2419200 (4 weeks) for Android/FCM and 0 for iOS/APNs)."},expiration:{type:"number",description:"Timestamp since the Unix epoch specifying when the message expires. Same effect as ttl (ttl takes precedence over expiration)."},priority:{type:"string",enum:["default","normal","high"],description:'The delivery priority of the message. Specify default or omit this field to use the default priority on each platform ("normal" on Android and "high" on iOS).'},badge:{type:"number",description:"Number to display in the badge on the app icon. Specify zero to clear the badge."},channelId:{type:"string",description:"ID of the Notification Channel through which to display this notification. If an ID is specified but the corresponding channel does not exist on the device (that has not yet been created by your app), the notification will not be displayed to the user."},categoryId:{type:"string",description:"ID of the notification category that this notification is associated with."},mutableContent:{type:"boolean",description:"Specifies whether this notification can be intercepted by the client app. In Expo Go, this defaults to true, and if you change that to false, you may experience issues. In standalone and bare apps, this defaults to false."}},required:[],additionalProperties:!0},bo={output:ka};var Ca={type:"object",properties:{to:{description:`This parameter specifies the recipient of a message.
103
+ The value of this header must accurately reflect the contents of your notification's payload. If there is a mismatch, or if the header is missing on required systems, APNs may delay the delivery of the notification or drop it altogether.`},threadId:{type:"string"},payload:{type:"object",additionalProperties:!0},aps:{type:"object",additionalProperties:!0,properties:{badge:{type:"number"},sound:gs,category:{type:"string"},contentAvailable:{type:"number"},launchImage:{type:"number"},mutableContent:{type:"number"},urlArgs:{type:"array",items:{type:"string"}}}},rawPayload:{type:"object",additionalProperties:!0},badge:{type:"number"},sound:gs,alert:{anyOf:[{type:"string"},{type:"object",additionalProperties:!0,properties:{title:{type:"string"},body:{type:"string"},subtitle:{type:"string"},titleLocKey:{type:"string"},titleLocArgs:{type:"array",items:{type:"string"}},actionLocKey:{type:"string"},locKey:{type:"string"},locArgs:{type:"array",items:{type:"string"}},launchImage:{type:"string"}},required:["body"]}]},contentAvailable:{type:"boolean"},mutableContent:{type:"boolean"},mdm:{anyOf:[{type:"string"},{type:"object",additionalProperties:!0}]},urlArgs:{type:"array",items:{type:"string"}}},required:[],additionalProperties:!0},ws={output:ka};var Ma={type:"object",properties:{to:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"An Expo push token or an array of Expo push tokens specifying the recipient(s) of this message."},data:{type:"object",additionalProperties:!0,description:'A JSON object delivered to your app. It may be up to about 4KiB; the total notification payload sent to Apple and Google must be at most 4KiB or else you will get a "Message Too Big" error.'},title:{type:"string",description:"The title to display in the notification. Often displayed above the notification body."},subtitle:{type:"string",description:"The subtitle to display in the notification below the title."},body:{type:"string",description:"The message to display in the notification."},sound:{anyOf:[{type:"string"},{type:"null"},{type:"object",properties:{name:{anyOf:[{type:"string",enum:["default"]},{type:"null"}]},volume:{type:"number"},critical:{type:"boolean"}},additionalProperties:!0}],description:"Play a sound when the recipient receives this notification. Specify default to play the device's default notification sound, or omit this field to play no sound. Custom sounds are not supported."},ttl:{type:"number",description:"Time to Live: the number of seconds for which the message may be kept around for redelivery if it hasn't been delivered yet. Defaults to undefined to use the respective defaults of each provider (2419200 (4 weeks) for Android/FCM and 0 for iOS/APNs)."},expiration:{type:"number",description:"Timestamp since the Unix epoch specifying when the message expires. Same effect as ttl (ttl takes precedence over expiration)."},priority:{type:"string",enum:["default","normal","high"],description:'The delivery priority of the message. Specify default or omit this field to use the default priority on each platform ("normal" on Android and "high" on iOS).'},badge:{type:"number",description:"Number to display in the badge on the app icon. Specify zero to clear the badge."},channelId:{type:"string",description:"ID of the Notification Channel through which to display this notification. If an ID is specified but the corresponding channel does not exist on the device (that has not yet been created by your app), the notification will not be displayed to the user."},categoryId:{type:"string",description:"ID of the notification category that this notification is associated with."},mutableContent:{type:"boolean",description:"Specifies whether this notification can be intercepted by the client app. In Expo Go, this defaults to true, and if you change that to false, you may experience issues. In standalone and bare apps, this defaults to false."}},required:[],additionalProperties:!0},Ss={output:Ma};var Ca={type:"object",properties:{to:{description:`This parameter specifies the recipient of a message.
104
104
  The value must be a registration token, notification key, or topic. Do not set this field when sending to multiple topics. See **condition**.
105
105
  `,type:"string"},registrationIds:{description:`This parameter specifies a list of devices (registration tokens, or IDs) receiving a multicast message. It must contain at least 1 and at most 1000 registration tokens.
106
106
  Use this parameter only for multicast messaging, not for single recipients. Multicast messages (sending to more than 1 registration tokens) are allowed using HTTP JSON format only.
@@ -136,7 +136,7 @@ If set, and a notification with the same tag is already being shown, the new not
136
136
  `,type:"string"},titleLocArgs:{description:`Indicates the string value to replace format specifiers in the title string for localization.
137
137
  * iOS: Corresponds to "title-loc-args" in the APNs payload.
138
138
  * android: See [Formatting strings](https://developer.android.com/guide/topics/resources/string-resource.html#FormattingAndStyling).
139
- `,type:"string"}}}},required:[],additionalProperties:!0},To={output:Ca};var Ma={allOf:[{allOf:[{anyOf:[{type:"object",properties:{includedSegments:{type:"array",description:`The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excludedSegments.
139
+ `,type:"string"}}}},required:[],additionalProperties:!0},bs={output:Ca};var La={allOf:[{allOf:[{anyOf:[{type:"object",properties:{includedSegments:{type:"array",description:`The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excludedSegments.
140
140
  Example: ["Active Users", "Inactive Users"]
141
141
  `,items:{type:"string"}},excludedSegments:{type:"array",description:`Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in includedSegments. This targeting parameter is only compatible with includedSegments.
142
142
  Example: ["Active Users", "Inactive Users"]
@@ -503,4 +503,4 @@ Examples: All examples are the exact same date & time.
503
503
  "Sept 24 2015 14:00:00 GMT-0700"
504
504
  "Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)"
505
505
  Note: SMS currently only supports sendAfter parameter.
506
- `,writeOnly:!0,nullable:!0}}}],required:[],additionalProperties:!0},Oo={output:Ma};var Ao={apns:So,expo:bo,fcm:To,"one-signal":Oo,"pusher-beams":B,pushpad:B,"push-webhook":B,appio:B};var La={type:"object",properties:{},required:[],additionalProperties:!1},vo={output:La};var Da={type:"object",properties:{to:{type:"string",pattern:"^\\+[1-9]\\d{1,14}$",description:"The recipient's phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (for SMS/MMS) or [channel address](https://www.twilio.com/docs/messaging/channels), e.g. `whatsapp:+15552229999`."},statusCallback:{type:"string",format:"uri",description:"The URL of the endpoint to which Twilio sends [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url). URL must contain a valid hostname and underscores are not allowed. If you include this parameter with the `messagingServiceSid`, Twilio uses this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource). "},applicationSid:{type:"string",minLength:34,maxLength:34,pattern:"^AP[0-9a-fA-F]{32}$",description:"The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App's `statusCallback` URL. Note that the `statusCallback` parameter of a request takes priority over the `applicationSid` parameter; if both are included `applicationSid` is ignored."},maxPrice:{type:"number",description:"[OBSOLETE] This parameter will no longer have any effect as of 2024-06-03."},provideFeedback:{type:"boolean",description:"Boolean indicating whether or not you intend to provide delivery confirmation feedback to Twilio (used in conjunction with the [Message Feedback subresource](https://www.twilio.com/docs/sms/api/message-feedback-resource)). Default value is `false`."},attempt:{type:"integer",description:"Total number of attempts made (including this request) to send the message regardless of the provider used"},validityPeriod:{type:"integer",description:"The maximum length in seconds that the Message can remain in Twilio's outgoing message queue. If a queued Message exceeds the `validityPeriod`, the Message is not sent. Accepted values are integers from `1` to `36000`. Default value is `36000`. A `validityPeriod` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html)"},forceDelivery:{type:"boolean",description:"Reserved"},contentRetention:{type:"string",enum:["retain","discard"],description:"Determines if the message content can be stored or redacted based on privacy settings"},addressRetention:{type:"string",enum:["retain","obfuscate"],description:"Determines if the address can be stored or obfuscated based on privacy settings"},smartEncoded:{type:"boolean",description:"Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`."},persistentAction:{type:"array",items:{type:"string"},description:"Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp)."},shortenUrls:{type:"boolean",description:"For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messagingServiceSid` parameter must also be provided."},scheduleType:{type:"string",enum:["fixed"],description:"For Messaging Services only: Include this parameter with a value of `fixed` in conjunction with the `sendAt` parameter in order to [schedule a Message](https://www.twilio.com/docs/messaging/features/message-scheduling)."},sendAt:{type:"string",format:"date-time",description:"The time that Twilio will send the message. Must be in ISO 8601 format."},sendAsMms:{type:"boolean",description:"If set to `true`, Twilio delivers the message as a single MMS message, regardless of the presence of media."},contentVariables:{type:"string",description:"For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `contentSid` parameter must also be provided. If values are not defined in the `contentVariables` parameter, the [Template's default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used."},riskCheck:{type:"string",enum:["enable","disable"],description:"Include this parameter with a value of `disable` to skip any kind of risk check on the respective message request."},from:{type:"string",pattern:"^\\+[1-9]\\d{1,14}$",description:"The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/quickstart), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/en-us/messaging/channels/sms/short-codes), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messagingServiceSid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool."},messagingServiceSid:{type:"string",minLength:34,maxLength:34,pattern:"^MG[0-9a-fA-F]{32}$",description:"The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool."},body:{type:"string",description:"The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [sendAsMms parameter](https://www.twilio.com/blog/mms-for-long-text-messages)."},mediaUrl:{type:"array",items:{type:"string",format:"uri"},description:"The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/messaging/guides/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `mediaUrl` parameters in the POST request. You can include up to ten `mediaUrl` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply."},contentSid:{type:"string",minLength:34,maxLength:34,pattern:"^HX[0-9a-fA-F]{32}$",description:"For [Content Editor/API](https://www.twilio.com/docs/content) only: The SID of the Content Template to be used with the Message, e.g., `HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. If this parameter is not provided, a Content Template is not used. Find the SID in the Console on the Content Editor page. For Content API users, the SID is found in Twilio's response when [creating the Template](https://www.twilio.com/docs/content/content-api-resources#create-templates) or by [fetching your Templates](https://www.twilio.com/docs/content/content-api-resources#fetch-all-content-resources)."}},required:[],additionalProperties:!0},Eo={output:Da};var _o={"africas-talking":B,"azure-sms":B,bandwidth:B,"brevo-sms":B,"bulk-sms":B,"burst-sms":B,clickatell:B,clicksend:B,"eazy-sms":B,firetext:B,"forty-six-elks":B,"generic-sms":B,gupshup:B,"infobip-sms":B,"isend-sms":B,kannel:B,maqsam:B,messagebird:B,mobishastra:B,nexmo:B,"novu-sms":vo,plivo:B,"ring-central":B,sendchamp:B,simpletexting:B,sms77:B,"sms-central":B,smsmode:B,sns:B,telnyx:B,termii:B,twilio:Eo,"afro-message":B,unifonic:B,imedia:B,sinch:B,"isendpro-sms":B};var Vn={chat:lo,sms:_o,email:mo,push:Ao,in_app:go};var Ua={type:"object",properties:{type:{enum:["regular"]},amount:{type:"number"},unit:{type:"string",enum:["seconds","minutes","hours","days","weeks","months"]},extendToSchedule:{type:"boolean"}},required:["amount","unit"],additionalProperties:!1},Fa={type:"object",properties:{type:{enum:["timed"]},cron:{type:"string"},extendToSchedule:{type:"boolean"}},required:["cron"],additionalProperties:!1},$a={type:"object",properties:{type:{enum:["dynamic"]},dynamicKey:{type:"string"},extendToSchedule:{type:"boolean"}},required:["dynamicKey"],additionalProperties:!1},ja={oneOf:[Ua,Fa,$a]},Ya={type:"object",properties:{duration:{type:"number"}},required:["duration"],additionalProperties:!1},qn={output:ja,result:Ya};var Wa={type:"object",properties:{type:{enum:["regular"]},amount:{type:"number"},unit:{type:"string",enum:["seconds","minutes","hours","days","weeks","months"]},digestKey:{type:"string"},lookBackWindow:{type:"object",properties:{amount:{type:"number"},unit:{type:"string",enum:["seconds","minutes","hours","days","weeks","months"]}},required:["amount","unit"],additionalProperties:!1},extendToSchedule:{type:"boolean"}},required:["amount","unit"],additionalProperties:!1},Va={type:"object",properties:{type:{enum:["timed"]},cron:{type:"string"},digestKey:{type:"string"},extendToSchedule:{type:"boolean"}},required:["cron"],additionalProperties:!1},qa={oneOf:[Wa,Va]},Ba={type:"object",properties:{eventCount:{type:"number"},events:{type:"array",items:{type:"object",properties:{id:{type:"string"},time:{type:"string"},payload:{type:"object"}},required:["id","time","payload"],additionalProperties:!1}}},required:["events"],additionalProperties:!1},Bn={output:qa,result:Ba};var Jn={output:{type:"object",properties:{type:{type:"string",enum:["fixed","dynamic"]},amount:{type:"number"},unit:{type:"string",enum:["minutes","hours","days"]},dynamicKey:{type:"string"},threshold:{type:"number"},throttleKey:{type:"string"}},required:["type"],additionalProperties:!1},result:{type:"object",properties:{throttled:{type:"boolean",description:"Whether the workflow execution was throttled"},executionCount:{type:"number",description:"Number of executions within the throttle window"},threshold:{type:"number",description:"The throttle threshold that was applied"},windowStart:{type:"string",format:"date-time",description:"Start time of the throttle window"}},required:["throttled"],additionalProperties:!1}};var Ja={type:"object",properties:{body:{type:"string"}},required:["body"],additionalProperties:!1},Ga={type:"object",properties:{},required:[],additionalProperties:!1},Ro={output:Ja,result:Ga};var Ha={type:"object",properties:{subject:{type:"string",minLength:1},body:{type:"string"}},required:["subject","body"],additionalProperties:!1},Ka={type:"object",properties:{},required:[],additionalProperties:!1},Po={output:Ha,result:Ka};var za="^(?!mailto:)(?:(https?):\\/\\/[^\\s/$.?#].[^\\s]*)|^(\\/[^\\s]*)$",Io={type:"object",properties:{url:{type:"string",pattern:za},target:{type:"string",enum:["_self","_blank","_parent","_top","_unfencedTop"],default:"_blank"}},if:{properties:{url:{type:"string",pattern:"^/"}}},then:{properties:{target:{default:"_self"}}},else:{properties:{target:{default:"_blank"}}},required:["url"],additionalProperties:!1},xo={type:"object",properties:{label:{type:"string"},redirect:Io},required:["label"],additionalProperties:!1},Xa={type:"object",properties:{subject:{type:"string",minLength:1},body:{type:"string",minLength:1},avatar:{type:"string",format:"uri"},primaryAction:xo,secondaryAction:xo,data:{type:"object",additionalProperties:!0},redirect:Io},anyOf:[{required:["subject"]},{required:["body"]}],additionalProperties:!1},Qa={type:"object",properties:{seen:{type:"boolean"},read:{type:"boolean"},lastSeenDate:{type:"string",format:"date-time",nullable:!0},lastReadDate:{type:"string",format:"date-time",nullable:!0}},required:["seen","read","lastSeenDate","lastReadDate"],additionalProperties:!1},No={output:Xa,result:Qa};var Za={type:"object",properties:{subject:{type:"string"},body:{type:"string"}},required:["subject","body"],additionalProperties:!1},el={type:"object",properties:{},required:[],additionalProperties:!1},ko={output:Za,result:el};var tl={type:"object",properties:{body:{type:"string"}},required:["body"],additionalProperties:!1},nl={type:"object",properties:{},required:[],additionalProperties:!1},Co={output:tl,result:nl};var Qe={chat:Ro,sms:Co,push:ko,email:Po,in_app:No};var Be={type:"object",properties:{},required:[],additionalProperties:!1};var Gn=(g=>(g.NONE="none",g.LOW="low",g.MEDIUM="medium",g.HIGH="high",g))(Gn||{});async function _t(d,n,o){if(d.steps.some(l=>l.stepId===n))throw new Pn(n);d.steps.push(o)}async function Hn(d,n,o,l){return async(g,N,M={})=>{let z=(M==null?void 0:M.controlSchema)||Be;return await _t(d,g,{stepId:g,type:n,controls:{schema:await Le(z),unknownSchema:z},outputs:{schema:await Le(o),unknownSchema:o},results:{schema:await Le(l),unknownSchema:l},resolve:N,code:N.toString(),options:M,providers:[]}),{_ctx:{timestamp:Date.now(),state:{status:"pending",error:!1}}}}}async function Mo(d,n,o){let l=Vn[n],g=Object.entries(o).map(async([N,M])=>{let z=l[N];return{type:N,code:M.toString(),resolve:M,outputs:{schema:await Le(z.output),unknownSchema:z.output}}});d.providers.push(...await Promise.all(g))}async function Rt(d,n,o,l){return async(g,N,M={})=>{let z=(M==null?void 0:M.controlSchema)||Be,ie={stepId:g,type:n,controls:{schema:await Le(z),unknownSchema:z},outputs:{schema:await Le(o),unknownSchema:o},results:{schema:await Le(l),unknownSchema:l},resolve:N,code:N.toString(),options:M,providers:[]};return await _t(d,g,ie),Object.keys(M.providers||{}).length>0&&await Mo(ie,n,M.providers||{}),{_ctx:{timestamp:Date.now(),state:{status:"pending",error:!1}}}}}async function Lo(d,n){return async(o,l,g={})=>{let N=(g==null?void 0:g.controlSchema)||Be,M=(g==null?void 0:g.outputSchema)||Be,[z,ie]=await Promise.all([Le(N),Le(M)]);return await _t(d,o,{stepId:o,type:n,controls:{schema:z,unknownSchema:N},outputs:{schema:ie,unknownSchema:M},results:{schema:ie,unknownSchema:M},resolve:l,code:l.toString(),options:g,providers:[]}),{_ctx:{timestamp:Date.now(),state:{status:"pending",error:!1}}}}}var il={email:"email",sms:"sms",push:"push",inApp:"in_app",chat:"chat"};function Do(d){if(!d)return{};let n={};return d.all&&(n.all=d.all),Object.entries(d.channels||{}).forEach(([o,l])=>{let g=il[o];g&&(n.channels||(n.channels={}),n.channels[g]=l)}),n}function Uo(d,n,o){let l=o||{};return{id:d,trigger:async M=>{let z=In(Cn(M.secretKey),kn(M.apiUrl)),ie=M.payload||{},Ae;if(l.payloadSchema){let $e=await Yn(l.payloadSchema,ie);if($e.success===!1)throw new mn(d,$e.errors);Ae=$e.data}else Ae=M.payload;let Ne=await Br(),ke={name:d,to:M.to,payload:{...Ae},...M.transactionId&&{transactionId:M.transactionId},...M.overrides&&{overrides:M.overrides},...M.actor&&{actor:M.actor},...M.context&&{context:M.context},...Ne&&{bridgeUrl:Ne}},Se=await z.post("/events/trigger",ke);return{cancel:async()=>z.delete(`/events/trigger/${Se.transactionId}`),data:Se}},discover:async()=>{var z;let M={workflowId:d,severity:(z=l.severity)!=null?z:"none",steps:[],code:n.toString(),payload:{schema:await Le(l.payloadSchema||Be),unknownSchema:l.payloadSchema||Be},controls:{schema:await Le(l.controlSchema||Be),unknownSchema:l.controlSchema||Be},tags:l.tags||[],preferences:Do(l.preferences),name:l.name,description:l.description,execute:n};return await n({payload:{},subscriber:{},environment:{},controls:{},context:{},step:{push:await Rt(M,"push",Qe.push.output,Qe.push.result),chat:await Rt(M,"chat",Qe.chat.output,Qe.chat.result),email:await Rt(M,"email",Qe.email.output,Qe.email.result),sms:await Rt(M,"sms",Qe.sms.output,Qe.sms.result),inApp:await Rt(M,"in_app",Qe.in_app.output,Qe.in_app.result),digest:await Hn(M,"digest",Bn.output,Bn.result),delay:await Hn(M,"delay",qn.output,qn.result),throttle:await Hn(M,"throttle",Jn.output,Jn.result),custom:await Lo(M,"custom")}}),M}}}var Bt=require("@nestjs/common");var Fo=require("@nestjs/common"),{ConfigurableModuleClass:Kn,MODULE_OPTIONS_TOKEN:Pt,OPTIONS_TYPE:If,ASYNC_OPTIONS_TYPE:Nf}=new Fo.ConfigurableModuleBuilder().setClassMethodName("register").setFactoryMethodName("createNovuModuleOptions").setExtras(d=>({...d,isGlobal:!0})).build();var Ei="REGISTER_API_PATH";var $o=require("@nestjs/common");var Je=class{handler(n,o){return{body:()=>n.body,headers:g=>{let N=n.headers[g.toLowerCase()];return Array.isArray(N)?N[0]:N},method:()=>n.method||"GET",queryString:g=>{let N=n.query[g];return Array.isArray(N)?N[0]:N},url:()=>{let g=n.headers.host||"",N=g!=null&&g.includes("://")?"":`${n.protocol||"https"}://`;return new URL(n.originalUrl||n.url||"",`${N}${g||""}`)},transformResponse:({body:g,headers:N,status:M})=>(Object.entries(N).forEach(([z,ie])=>{o.setHeader(z,ie)}),o.status(M).send(g))}}};Je=Ke([(0,$o.Injectable)()],Je);var jo="nest",Ge=class{constructor(n,o){this.options=n;this.novuHandler=o;this.novuRequestHandler=new Et({frameworkName:jo,...this.options,handler:this.novuHandler.handler})}async handleRequest(n,o){await this.novuRequestHandler.createHandler()(n,o)}};Ge=Ke([(0,Bt.Injectable)(),ze(0,(0,Bt.Inject)(Pt)),ze(1,(0,Bt.Inject)(Je))],Ge);var Ie=require("@nestjs/common");var Ye=class{constructor(n){this.novuService=n}async handleGet(n,o){await this.novuService.handleRequest(n,o)}async handlePost(n,o){await this.novuService.handleRequest(n,o)}async handleOptions(n,o){await this.novuService.handleRequest(n,o)}};Ke([(0,Ie.Get)(),ze(0,(0,Ie.Req)()),ze(1,(0,Ie.Res)())],Ye.prototype,"handleGet",1),Ke([(0,Ie.Post)(),ze(0,(0,Ie.Req)()),ze(1,(0,Ie.Res)())],Ye.prototype,"handlePost",1),Ke([(0,Ie.Options)(),ze(0,(0,Ie.Req)()),ze(1,(0,Ie.Res)())],Ye.prototype,"handleOptions",1),Ye=Ke([(0,Ie.Controller)(),ze(0,(0,Ie.Inject)(Ge))],Ye);var Vo=require("@nestjs/common");var Yo=require("@nestjs/common/constants");var zn={provide:Ei,useFactory:d=>{if(!d.apiPath)throw new Error("`apiPath` must be provided to set the controller path");Reflect.defineMetadata(Yo.PATH_METADATA,d.apiPath,Ye)},inject:[Pt]};function Wo(d,n=[]){return n.reduce((o,l)=>l(o),d)}var Jt=class extends Kn{static register(n,o){var g;let l=Kn.register(n);return l.controllers=[Wo(Ye,n.controllerDecorators||[])],(g=l.providers)==null||g.push(zn,Ge,Je,...o||[]),l.exports=[Ge,Je],l}static registerAsync(n,o){var g;let l=Kn.registerAsync(n);return l.controllers=[Ye],(g=l.providers)==null||g.push(zn,Ge,Je,...o||[]),l.exports=[Ge,Je],l}};Jt=Ke([(0,Vo.Module)({})],Jt);0&&(module.exports={Client,CronExpression,NOVU_OPTIONS,NovuClient,NovuController,NovuHandler,NovuModule,NovuRequestHandler,REGISTER_API_PATH,SeverityLevelEnum,frameworkName,providerSchemas,registerApiPath,workflow});
506
+ `,writeOnly:!0,nullable:!0}}}],required:[],additionalProperties:!0},Ts={output:La};var Os={apns:ws,expo:Ss,fcm:bs,"one-signal":Ts,"pusher-beams":B,pushpad:B,"push-webhook":B,appio:B};var Da={type:"object",properties:{},required:[],additionalProperties:!1},As={output:Da};var Ua={type:"object",properties:{to:{type:"string",pattern:"^\\+[1-9]\\d{1,14}$",description:"The recipient's phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (for SMS/MMS) or [channel address](https://www.twilio.com/docs/messaging/channels), e.g. `whatsapp:+15552229999`."},statusCallback:{type:"string",format:"uri",description:"The URL of the endpoint to which Twilio sends [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url). URL must contain a valid hostname and underscores are not allowed. If you include this parameter with the `messagingServiceSid`, Twilio uses this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource). "},applicationSid:{type:"string",minLength:34,maxLength:34,pattern:"^AP[0-9a-fA-F]{32}$",description:"The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App's `statusCallback` URL. Note that the `statusCallback` parameter of a request takes priority over the `applicationSid` parameter; if both are included `applicationSid` is ignored."},maxPrice:{type:"number",description:"[OBSOLETE] This parameter will no longer have any effect as of 2024-06-03."},provideFeedback:{type:"boolean",description:"Boolean indicating whether or not you intend to provide delivery confirmation feedback to Twilio (used in conjunction with the [Message Feedback subresource](https://www.twilio.com/docs/sms/api/message-feedback-resource)). Default value is `false`."},attempt:{type:"integer",description:"Total number of attempts made (including this request) to send the message regardless of the provider used"},validityPeriod:{type:"integer",description:"The maximum length in seconds that the Message can remain in Twilio's outgoing message queue. If a queued Message exceeds the `validityPeriod`, the Message is not sent. Accepted values are integers from `1` to `36000`. Default value is `36000`. A `validityPeriod` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html)"},forceDelivery:{type:"boolean",description:"Reserved"},contentRetention:{type:"string",enum:["retain","discard"],description:"Determines if the message content can be stored or redacted based on privacy settings"},addressRetention:{type:"string",enum:["retain","obfuscate"],description:"Determines if the address can be stored or obfuscated based on privacy settings"},smartEncoded:{type:"boolean",description:"Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`."},persistentAction:{type:"array",items:{type:"string"},description:"Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp)."},shortenUrls:{type:"boolean",description:"For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messagingServiceSid` parameter must also be provided."},scheduleType:{type:"string",enum:["fixed"],description:"For Messaging Services only: Include this parameter with a value of `fixed` in conjunction with the `sendAt` parameter in order to [schedule a Message](https://www.twilio.com/docs/messaging/features/message-scheduling)."},sendAt:{type:"string",format:"date-time",description:"The time that Twilio will send the message. Must be in ISO 8601 format."},sendAsMms:{type:"boolean",description:"If set to `true`, Twilio delivers the message as a single MMS message, regardless of the presence of media."},contentVariables:{type:"string",description:"For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `contentSid` parameter must also be provided. If values are not defined in the `contentVariables` parameter, the [Template's default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used."},riskCheck:{type:"string",enum:["enable","disable"],description:"Include this parameter with a value of `disable` to skip any kind of risk check on the respective message request."},from:{type:"string",pattern:"^\\+[1-9]\\d{1,14}$",description:"The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/quickstart), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/en-us/messaging/channels/sms/short-codes), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messagingServiceSid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool."},messagingServiceSid:{type:"string",minLength:34,maxLength:34,pattern:"^MG[0-9a-fA-F]{32}$",description:"The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool."},body:{type:"string",description:"The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [sendAsMms parameter](https://www.twilio.com/blog/mms-for-long-text-messages)."},mediaUrl:{type:"array",items:{type:"string",format:"uri"},description:"The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/messaging/guides/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `mediaUrl` parameters in the POST request. You can include up to ten `mediaUrl` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply."},contentSid:{type:"string",minLength:34,maxLength:34,pattern:"^HX[0-9a-fA-F]{32}$",description:"For [Content Editor/API](https://www.twilio.com/docs/content) only: The SID of the Content Template to be used with the Message, e.g., `HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. If this parameter is not provided, a Content Template is not used. Find the SID in the Console on the Content Editor page. For Content API users, the SID is found in Twilio's response when [creating the Template](https://www.twilio.com/docs/content/content-api-resources#create-templates) or by [fetching your Templates](https://www.twilio.com/docs/content/content-api-resources#fetch-all-content-resources)."}},required:[],additionalProperties:!0},vs={output:Ua};var Es={"africas-talking":B,"azure-sms":B,bandwidth:B,"brevo-sms":B,"bulk-sms":B,"burst-sms":B,clickatell:B,clicksend:B,"eazy-sms":B,firetext:B,"forty-six-elks":B,"generic-sms":B,gupshup:B,"infobip-sms":B,"isend-sms":B,kannel:B,maqsam:B,messagebird:B,mobishastra:B,nexmo:B,"novu-sms":As,plivo:B,"ring-central":B,sendchamp:B,simpletexting:B,sms77:B,"sms-central":B,smsmode:B,sns:B,telnyx:B,termii:B,twilio:vs,"afro-message":B,unifonic:B,imedia:B,sinch:B,"isendpro-sms":B};var Vn={chat:ls,sms:Es,email:hs,push:Os,in_app:ys};var Fa={type:"object",properties:{type:{enum:["regular"]},amount:{type:"number"},unit:{type:"string",enum:["seconds","minutes","hours","days","weeks","months"]},extendToSchedule:{type:"boolean"}},required:["amount","unit"],additionalProperties:!1},$a={type:"object",properties:{type:{enum:["timed"]},cron:{type:"string"},extendToSchedule:{type:"boolean"}},required:["cron"],additionalProperties:!1},ja={type:"object",properties:{type:{enum:["dynamic"]},dynamicKey:{type:"string"},extendToSchedule:{type:"boolean"}},required:["dynamicKey"],additionalProperties:!1},Ya={oneOf:[Fa,$a,ja]},Wa={type:"object",properties:{duration:{type:"number"}},required:["duration"],additionalProperties:!1},qn={output:Ya,result:Wa};var Va={type:"object",properties:{type:{enum:["regular"]},amount:{type:"number"},unit:{type:"string",enum:["seconds","minutes","hours","days","weeks","months"]},digestKey:{type:"string"},lookBackWindow:{type:"object",properties:{amount:{type:"number"},unit:{type:"string",enum:["seconds","minutes","hours","days","weeks","months"]}},required:["amount","unit"],additionalProperties:!1},extendToSchedule:{type:"boolean"}},required:["amount","unit"],additionalProperties:!1},qa={type:"object",properties:{type:{enum:["timed"]},cron:{type:"string"},digestKey:{type:"string"},extendToSchedule:{type:"boolean"}},required:["cron"],additionalProperties:!1},Ba={oneOf:[Va,qa]},Ja={type:"object",properties:{eventCount:{type:"number"},events:{type:"array",items:{type:"object",properties:{id:{type:"string"},time:{type:"string"},payload:{type:"object"}},required:["id","time","payload"],additionalProperties:!1}}},required:["events"],additionalProperties:!1},Bn={output:Ba,result:Ja};var Jn={output:{type:"object",properties:{type:{type:"string",enum:["fixed","dynamic"]},amount:{type:"number"},unit:{type:"string",enum:["minutes","hours","days"]},dynamicKey:{type:"string"},threshold:{type:"number"},throttleKey:{type:"string"}},required:["type"],additionalProperties:!1},result:{type:"object",properties:{throttled:{type:"boolean",description:"Whether the workflow execution was throttled"},executionCount:{type:"number",description:"Number of executions within the throttle window"},threshold:{type:"number",description:"The throttle threshold that was applied"},windowStart:{type:"string",format:"date-time",description:"Start time of the throttle window"}},required:["throttled"],additionalProperties:!1}};var Ga={type:"object",properties:{body:{type:"string"}},required:["body"],additionalProperties:!1},Ha={type:"object",properties:{},required:[],additionalProperties:!1},_s={output:Ga,result:Ha};var Ka={type:"object",properties:{subject:{type:"string",minLength:1},body:{type:"string"}},required:["subject","body"],additionalProperties:!1},za={type:"object",properties:{},required:[],additionalProperties:!1},Rs={output:Ka,result:za};var Xa="^(?!mailto:)(?:(https?):\\/\\/[^\\s/$.?#].[^\\s]*)|^(\\/[^\\s]*)$",xs={type:"object",properties:{url:{type:"string",pattern:Xa},target:{type:"string",enum:["_self","_blank","_parent","_top","_unfencedTop"],default:"_blank"}},if:{properties:{url:{type:"string",pattern:"^/"}}},then:{properties:{target:{default:"_self"}}},else:{properties:{target:{default:"_blank"}}},required:["url"],additionalProperties:!1},Ps={type:"object",properties:{label:{type:"string"},redirect:xs},required:["label"],additionalProperties:!1},Qa={type:"object",properties:{subject:{type:"string",minLength:1},body:{type:"string",minLength:1},avatar:{type:"string",format:"uri"},primaryAction:Ps,secondaryAction:Ps,data:{type:"object",additionalProperties:!0},redirect:xs},anyOf:[{required:["subject"]},{required:["body"]}],additionalProperties:!1},Za={type:"object",properties:{seen:{type:"boolean"},read:{type:"boolean"},lastSeenDate:{type:"string",format:"date-time",nullable:!0},lastReadDate:{type:"string",format:"date-time",nullable:!0}},required:["seen","read","lastSeenDate","lastReadDate"],additionalProperties:!1},Is={output:Qa,result:Za};var el={type:"object",properties:{subject:{type:"string"},body:{type:"string"}},required:["subject","body"],additionalProperties:!1},tl={type:"object",properties:{},required:[],additionalProperties:!1},Ns={output:el,result:tl};var nl={type:"object",properties:{body:{type:"string"}},required:["body"],additionalProperties:!1},rl={type:"object",properties:{},required:[],additionalProperties:!1},ks={output:nl,result:rl};var Qe={chat:_s,sms:ks,push:Ns,email:Rs,in_app:Is};var Be={type:"object",properties:{},required:[],additionalProperties:!1};var Gn=(g=>(g.NONE="none",g.LOW="low",g.MEDIUM="medium",g.HIGH="high",g))(Gn||{});async function _t(d,n,s){if(d.steps.some(a=>a.stepId===n))throw new Pn(n);d.steps.push(s)}async function Hn(d,n,s,a){return async(g,N,C={})=>{let z=(C==null?void 0:C.controlSchema)||Be;return await _t(d,g,{stepId:g,type:n,controls:{schema:await Le(z),unknownSchema:z},outputs:{schema:await Le(s),unknownSchema:s},results:{schema:await Le(a),unknownSchema:a},resolve:N,code:N.toString(),options:C,providers:[]}),{_ctx:{timestamp:Date.now(),state:{status:"pending",error:!1}}}}}async function Ms(d,n,s){let a=Vn[n],g=Object.entries(s).map(async([N,C])=>{let z=a[N];return{type:N,code:C.toString(),resolve:C,outputs:{schema:await Le(z.output),unknownSchema:z.output}}});d.providers.push(...await Promise.all(g))}async function Rt(d,n,s,a){return async(g,N,C={})=>{let z=(C==null?void 0:C.controlSchema)||Be,re={stepId:g,type:n,controls:{schema:await Le(z),unknownSchema:z},outputs:{schema:await Le(s),unknownSchema:s},results:{schema:await Le(a),unknownSchema:a},resolve:N,code:N.toString(),options:C,providers:[]};return await _t(d,g,re),Object.keys(C.providers||{}).length>0&&await Ms(re,n,C.providers||{}),{_ctx:{timestamp:Date.now(),state:{status:"pending",error:!1}}}}}async function Cs(d,n){return async(s,a,g={})=>{let N=(g==null?void 0:g.controlSchema)||Be,C=(g==null?void 0:g.outputSchema)||Be,[z,re]=await Promise.all([Le(N),Le(C)]);return await _t(d,s,{stepId:s,type:n,controls:{schema:z,unknownSchema:N},outputs:{schema:re,unknownSchema:C},results:{schema:re,unknownSchema:C},resolve:a,code:a.toString(),options:g,providers:[]}),{_ctx:{timestamp:Date.now(),state:{status:"pending",error:!1}}}}}var il={email:"email",sms:"sms",push:"push",inApp:"in_app",chat:"chat"};function Ls(d){if(!d)return{};let n={};return d.all&&(n.all=d.all),Object.entries(d.channels||{}).forEach(([s,a])=>{let g=il[s];g&&(n.channels||(n.channels={}),n.channels[g]=a)}),n}function Ds(d,n,s){let a=s||{};return{id:d,trigger:async C=>{let z=In(Mn(C.secretKey),kn(C.apiUrl)),re=C.payload||{},Se;if(a.payloadSchema){let $e=await Yn(a.payloadSchema,re);if($e.success===!1)throw new mn(d,$e.errors);Se=$e.data}else Se=C.payload;let Ne=await Bi(),ke={name:d,to:C.to,payload:{...Se},...C.transactionId&&{transactionId:C.transactionId},...C.overrides&&{overrides:C.overrides},...C.actor&&{actor:C.actor},...C.context&&{context:C.context},...Ne&&{bridgeUrl:Ne}},be=await z.post("/events/trigger",ke);return{cancel:async()=>z.delete(`/events/trigger/${be.transactionId}`),data:be}},discover:async()=>{var z;let C={workflowId:d,severity:(z=a.severity)!=null?z:"none",steps:[],code:n.toString(),payload:{schema:await Le(a.payloadSchema||Be),unknownSchema:a.payloadSchema||Be},controls:{schema:await Le(a.controlSchema||Be),unknownSchema:a.controlSchema||Be},tags:a.tags||[],preferences:Ls(a.preferences),name:a.name,description:a.description,execute:n};return await n({payload:{},subscriber:{},environment:{},controls:{},context:{},step:{push:await Rt(C,"push",Qe.push.output,Qe.push.result),chat:await Rt(C,"chat",Qe.chat.output,Qe.chat.result),email:await Rt(C,"email",Qe.email.output,Qe.email.result),sms:await Rt(C,"sms",Qe.sms.output,Qe.sms.result),inApp:await Rt(C,"in_app",Qe.in_app.output,Qe.in_app.result),digest:await Hn(C,"digest",Bn.output,Bn.result),delay:await Hn(C,"delay",qn.output,qn.result),throttle:await Hn(C,"throttle",Jn.output,Jn.result),custom:await Cs(C,"custom")}}),C}}}var Bt=require("@nestjs/common");var Us=require("@nestjs/common"),{ConfigurableModuleClass:Kn,MODULE_OPTIONS_TOKEN:Pt,OPTIONS_TYPE:Nf,ASYNC_OPTIONS_TYPE:kf}=new Us.ConfigurableModuleBuilder().setClassMethodName("register").setFactoryMethodName("createNovuModuleOptions").setExtras(d=>({...d,isGlobal:!0})).build();var Er="REGISTER_API_PATH";var Fs=require("@nestjs/common");var Je=class{handler(n,s){return{body:()=>n.body,headers:g=>{let N=n.headers[g.toLowerCase()];return Array.isArray(N)?N[0]:N},method:()=>n.method||"GET",queryString:g=>{let N=n.query[g];return Array.isArray(N)?N[0]:N},url:()=>{let g=n.headers.host||"",N=g!=null&&g.includes("://")?"":`${n.protocol||"https"}://`;return new URL(n.originalUrl||n.url||"",`${N}${g||""}`)},transformResponse:({body:g,headers:N,status:C})=>(Object.entries(N).forEach(([z,re])=>{s.setHeader(z,re)}),s.status(C).send(g))}}};Je=Ke([(0,Fs.Injectable)()],Je);var $s="nest",Ge=class{constructor(n,s){this.options=n;this.novuHandler=s;this.novuRequestHandler=new Et({frameworkName:$s,...this.options,handler:this.novuHandler.handler})}async handleRequest(n,s){await this.novuRequestHandler.createHandler()(n,s)}};Ge=Ke([(0,Bt.Injectable)(),ze(0,(0,Bt.Inject)(Pt)),ze(1,(0,Bt.Inject)(Je))],Ge);var Ie=require("@nestjs/common");var Ye=class{constructor(n){this.novuService=n}async handleGet(n,s){await this.novuService.handleRequest(n,s)}async handlePost(n,s){await this.novuService.handleRequest(n,s)}async handleOptions(n,s){await this.novuService.handleRequest(n,s)}};Ke([(0,Ie.Get)(),ze(0,(0,Ie.Req)()),ze(1,(0,Ie.Res)())],Ye.prototype,"handleGet",1),Ke([(0,Ie.Post)(),ze(0,(0,Ie.Req)()),ze(1,(0,Ie.Res)())],Ye.prototype,"handlePost",1),Ke([(0,Ie.Options)(),ze(0,(0,Ie.Req)()),ze(1,(0,Ie.Res)())],Ye.prototype,"handleOptions",1),Ye=Ke([(0,Ie.Controller)(),ze(0,(0,Ie.Inject)(Ge))],Ye);var Ws=require("@nestjs/common");var js=require("@nestjs/common/constants");var zn={provide:Er,useFactory:d=>{if(!d.apiPath)throw new Error("`apiPath` must be provided to set the controller path");Reflect.defineMetadata(js.PATH_METADATA,d.apiPath,Ye)},inject:[Pt]};function Ys(d,n=[]){return n.reduce((s,a)=>a(s),d)}var Jt=class extends Kn{static register(n,s){var g;let a=Kn.register(n);return a.controllers=[Ys(Ye,n.controllerDecorators||[])],(g=a.providers)==null||g.push(zn,Ge,Je,...s||[]),a.exports=[Ge,Je],a}static registerAsync(n,s){var g;let a=Kn.registerAsync(n);return a.controllers=[Ye],(g=a.providers)==null||g.push(zn,Ge,Je,...s||[]),a.exports=[Ge,Je],a}};Jt=Ke([(0,Ws.Module)({})],Jt);0&&(module.exports={Client,CronExpression,NOVU_OPTIONS,NovuClient,NovuController,NovuHandler,NovuModule,NovuRequestHandler,REGISTER_API_PATH,SeverityLevelEnum,frameworkName,providerSchemas,registerApiPath,workflow});