@ripla/godd-mcp 0.1.2-beta-20260312091403
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +412 -0
- package/dist/godd.cjs +465 -0
- package/dist/godd.js +34845 -0
- package/dist/index.js +224 -0
- package/notes-api/.env.example +29 -0
- package/notes-api/README.md +65 -0
- package/notes-api/alembic/README +1 -0
- package/notes-api/alembic/env.py +62 -0
- package/notes-api/alembic/script.py.mako +28 -0
- package/notes-api/alembic/versions/001_initial_notes_tables.py +71 -0
- package/notes-api/alembic.ini +149 -0
- package/notes-api/app/__init__.py +1 -0
- package/notes-api/app/config.py +90 -0
- package/notes-api/app/database.py +31 -0
- package/notes-api/app/main.py +55 -0
- package/notes-api/app/models/__init__.py +17 -0
- package/notes-api/app/models/audit.py +38 -0
- package/notes-api/app/models/base.py +38 -0
- package/notes-api/app/models/session.py +32 -0
- package/notes-api/app/models/setting.py +16 -0
- package/notes-api/app/models/user.py +38 -0
- package/notes-api/app/routers/__init__.py +1 -0
- package/notes-api/app/routers/auth.py +205 -0
- package/notes-api/app/routers/files.py +76 -0
- package/notes-api/app/routers/pr.py +92 -0
- package/notes-api/app/routers/settings.py +44 -0
- package/notes-api/app/routers/tree.py +22 -0
- package/notes-api/app/routers/users.py +145 -0
- package/notes-api/app/schemas/__init__.py +1 -0
- package/notes-api/app/schemas/auth.py +45 -0
- package/notes-api/app/schemas/user.py +41 -0
- package/notes-api/app/security.py +94 -0
- package/notes-api/app/services/__init__.py +1 -0
- package/notes-api/app/services/audit.py +25 -0
- package/notes-api/app/services/business_date.py +38 -0
- package/notes-api/app/services/github.py +140 -0
- package/notes-api/app/services/github_pr.py +120 -0
- package/notes-api/app/services/pr_chain.py +225 -0
- package/notes-api/app/startup.py +66 -0
- package/notes-api/docker/Dockerfile +14 -0
- package/notes-api/docker/Dockerfile.test +14 -0
- package/notes-api/pyproject.toml +53 -0
- package/notes-api/tests/conftest.py +21 -0
- package/notes-api/tests/test_business_date.py +32 -0
- package/notes-api/tests/test_health.py +11 -0
- package/notes-api/uv.lock +1012 -0
- package/notes-app/README.md +30 -0
- package/notes-app/docker/Dockerfile.prod +12 -0
- package/notes-app/docker/Dockerfile.test +12 -0
- package/notes-app/eslint.config.js +23 -0
- package/notes-app/index.html +12 -0
- package/notes-app/nginx.conf +23 -0
- package/notes-app/package.json +37 -0
- package/notes-app/pnpm-lock.yaml +3124 -0
- package/notes-app/src/App.tsx +13 -0
- package/notes-app/src/main.tsx +13 -0
- package/notes-app/src/pages/LoginPage.test.tsx +15 -0
- package/notes-app/src/pages/LoginPage.tsx +10 -0
- package/notes-app/src/pages/MainPage.tsx +14 -0
- package/notes-app/src/styles/globals.css +1 -0
- package/notes-app/src/vite-env.d.ts +1 -0
- package/notes-app/tsconfig.json +24 -0
- package/notes-app/tsconfig.node.json +10 -0
- package/notes-app/vite.config.js +21 -0
- package/notes-app/vite.config.ts +22 -0
- package/notes-app/vitest.config.ts +16 -0
- package/package.json +58 -0
- package/stacks/django-vue.yaml +33 -0
- package/stacks/fastapi-react.yaml +160 -0
- package/stacks/flutter-firebase.yaml +58 -0
- package/stacks/nextjs-prisma.yaml +33 -0
- package/stacks/schema.json +144 -0
- package/templates/agents/architect.hbs +183 -0
- package/templates/agents/auto-documenter.hbs +36 -0
- package/templates/agents/backend-developer.hbs +175 -0
- package/templates/agents/code-reviewer.hbs +29 -0
- package/templates/agents/database-developer.hbs +52 -0
- package/templates/agents/debug-specialist.hbs +39 -0
- package/templates/agents/environment-setup.hbs +41 -0
- package/templates/agents/frontend-developer.hbs +45 -0
- package/templates/agents/integration-qa.hbs +26 -0
- package/templates/agents/performance-qa.hbs +24 -0
- package/templates/agents/pr-writer.hbs +53 -0
- package/templates/agents/quality-lead.hbs +26 -0
- package/templates/agents/requirements-analyst.hbs +26 -0
- package/templates/agents/security-analyst.hbs +21 -0
- package/templates/agents/security-reviewer.hbs +20 -0
- package/templates/agents/ssot-updater.hbs +45 -0
- package/templates/agents/technical-writer.hbs +28 -0
- package/templates/agents/unit-test-engineer.hbs +19 -0
- package/templates/agents/user-clone.hbs +43 -0
- package/templates/github-actions/aws/deploy-notes.yml.hbs +118 -0
- package/templates/github-actions/azure/deploy-notes.yml.hbs +78 -0
- package/templates/github-actions/gcp/deploy-notes.yml.hbs +76 -0
- package/templates/github-actions/vercel-railway/deploy-notes.yml.hbs +49 -0
- package/templates/mindsets/agent-stdio.hbs +51 -0
- package/templates/mindsets/dart.hbs +39 -0
- package/templates/mindsets/ddd-clean-architecture.hbs +52 -0
- package/templates/mindsets/electron.hbs +41 -0
- package/templates/mindsets/fastapi.hbs +40 -0
- package/templates/mindsets/flutter.hbs +56 -0
- package/templates/mindsets/kotlin.hbs +46 -0
- package/templates/mindsets/postgresql.hbs +39 -0
- package/templates/mindsets/python.hbs +39 -0
- package/templates/mindsets/react.hbs +51 -0
- package/templates/mindsets/swift.hbs +46 -0
- package/templates/mindsets/terraform.hbs +53 -0
- package/templates/mindsets/typescript.hbs +34 -0
- package/templates/mindsets/vite.hbs +37 -0
- package/templates/notes-compose.yml +79 -0
- package/templates/partials/cogito-geo.hbs +84 -0
- package/templates/partials/cogito-godd.hbs +22 -0
- package/templates/partials/cogito-grammar.hbs +105 -0
- package/templates/partials/cogito-particle.hbs +76 -0
- package/templates/partials/cogito-root-ai.hbs +79 -0
- package/templates/partials/cogito-root-arch.hbs +75 -0
- package/templates/partials/cogito-root-core.hbs +75 -0
- package/templates/partials/cogito-root-daily.hbs +58 -0
- package/templates/partials/cogito-root-dev.hbs +71 -0
- package/templates/partials/cogito-root-devops.hbs +71 -0
- package/templates/partials/cogito-root-framework.hbs +80 -0
- package/templates/partials/cogito-root-lang.hbs +74 -0
- package/templates/partials/godd-core.hbs +50 -0
- package/templates/partials/project-context.hbs +52 -0
- package/templates/partials/ssot-header.hbs +40 -0
- package/templates/partials/ssot-rules.hbs +30 -0
- package/templates/prompts/adr.hbs +39 -0
- package/templates/prompts/agent-dev-workflow.hbs +34 -0
- package/templates/prompts/analyze-report.hbs +36 -0
- package/templates/prompts/auto-documentation.hbs +37 -0
- package/templates/prompts/check.hbs +52 -0
- package/templates/prompts/commit.hbs +96 -0
- package/templates/prompts/dev.hbs +127 -0
- package/templates/prompts/docs-init.hbs +95 -0
- package/templates/prompts/docs-update.hbs +51 -0
- package/templates/prompts/git-workflow.hbs +125 -0
- package/templates/prompts/impact-analysis.hbs +43 -0
- package/templates/prompts/install.hbs +40 -0
- package/templates/prompts/new-branch.hbs +61 -0
- package/templates/prompts/notes-deploy.hbs +72 -0
- package/templates/prompts/pr-analyze.hbs +44 -0
- package/templates/prompts/pr-create.hbs +125 -0
- package/templates/prompts/push-execute.hbs +83 -0
- package/templates/prompts/push.hbs +24 -0
- package/templates/prompts/release-notes.hbs +38 -0
- package/templates/prompts/requirements-to-business-flow.hbs +29 -0
- package/templates/prompts/requirements-to-tickets.hbs +26 -0
- package/templates/prompts/review.hbs +126 -0
- package/templates/prompts/setup.hbs +247 -0
- package/templates/prompts/spec.hbs +35 -0
- package/templates/prompts/specification-to-tickets.hbs +24 -0
- package/templates/prompts/submit.hbs +143 -0
- package/templates/prompts/sync.hbs +63 -0
- package/templates/prompts/test-plan.hbs +56 -0
- package/templates/terraform/aws/alb.tf.hbs +58 -0
- package/templates/terraform/aws/backend.tf.hbs +10 -0
- package/templates/terraform/aws/cloudfront.tf.hbs +96 -0
- package/templates/terraform/aws/ecr.tf.hbs +30 -0
- package/templates/terraform/aws/ecs.tf.hbs +136 -0
- package/templates/terraform/aws/iam.tf.hbs +88 -0
- package/templates/terraform/aws/local.tf.hbs +34 -0
- package/templates/terraform/aws/output.tf.hbs +49 -0
- package/templates/terraform/aws/provider.tf.hbs +26 -0
- package/templates/terraform/aws/rds.tf.hbs +38 -0
- package/templates/terraform/aws/s3.tf.hbs +34 -0
- package/templates/terraform/aws/secrets.tf.hbs +38 -0
- package/templates/terraform/aws/security_groups.tf.hbs +72 -0
- package/templates/terraform/aws/vpc.tf.hbs +63 -0
- package/templates/terraform/azure/backend.tf.hbs +8 -0
- package/templates/terraform/azure/iam.tf.hbs +36 -0
- package/templates/terraform/azure/main.tf.hbs +199 -0
- package/templates/terraform/azure/output.tf.hbs +19 -0
- package/templates/terraform/azure/provider.tf.hbs +19 -0
- package/templates/terraform/gcp/backend.tf.hbs +6 -0
- package/templates/terraform/gcp/iam.tf.hbs +47 -0
- package/templates/terraform/gcp/main.tf.hbs +171 -0
- package/templates/terraform/gcp/output.tf.hbs +15 -0
- package/templates/terraform/gcp/provider.tf.hbs +19 -0
- package/templates/terraform/vercel-railway/main.tf.hbs +64 -0
- package/templates/terraform/vercel-railway/output.tf.hbs +11 -0
package/dist/godd.cjs
ADDED
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";var ST=Object.create;var ol=Object.defineProperty;var $T=Object.getOwnPropertyDescriptor;var TT=Object.getOwnPropertyNames;var PT=Object.getPrototypeOf,CT=Object.prototype.hasOwnProperty;var v=(e,t)=>()=>(e&&(t=e(e=0)),t);var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Mr=(e,t)=>{for(var r in t)ol(e,r,{get:t[r],enumerable:!0})},ET=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of TT(t))!CT.call(e,o)&&o!==r&&ol(e,o,{get:()=>t[o],enumerable:!(n=$T(t,o))||n.enumerable});return e};var St=(e,t,r)=>(r=e!=null?ST(PT(e)):{},ET(t||!e||!e.__esModule?ol(r,"default",{value:e,enumerable:!0}):r,e));var X,il,I,or,ei=v(()=>{(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function r(o){throw new Error}e.assertNever=r,e.arrayToEnum=o=>{let i={};for(let s of o)i[s]=s;return i},e.getValidEnumValues=o=>{let i=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(let a of i)s[a]=o[a];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let i=[];for(let s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(let s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function n(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(X||(X={}));(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(il||(il={}));I=X.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),or=e=>{switch(typeof e){case"undefined":return I.undefined;case"string":return I.string;case"number":return Number.isNaN(e)?I.nan:I.number;case"boolean":return I.boolean;case"function":return I.function;case"bigint":return I.bigint;case"symbol":return I.symbol;case"object":return Array.isArray(e)?I.array:e===null?I.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?I.promise:typeof Map<"u"&&e instanceof Map?I.map:typeof Set<"u"&&e instanceof Set?I.set:typeof Date<"u"&&e instanceof Date?I.date:I.object;default:return I.unknown}}});var $,IT,dt,Is=v(()=>{ei();$=X.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),IT=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),dt=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(i){return i.message},n={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)n._errors.push(r(s));else{let a=n,c=0;for(;c<s.path.length;){let u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return o(this),n}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,X.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},n=[];for(let o of this.issues)if(o.path.length>0){let i=o.path[0];r[i]=r[i]||[],r[i].push(t(o))}else n.push(t(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};dt.create=e=>new dt(e)});var zT,vr,sl=v(()=>{Is();ei();zT=(e,t)=>{let r;switch(e.code){case $.invalid_type:e.received===I.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case $.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,X.jsonStringifyReplacer)}`;break;case $.unrecognized_keys:r=`Unrecognized key(s) in object: ${X.joinValues(e.keys,", ")}`;break;case $.invalid_union:r="Invalid input";break;case $.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${X.joinValues(e.options)}`;break;case $.invalid_enum_value:r=`Invalid enum value. Expected ${X.joinValues(e.options)}, received '${e.received}'`;break;case $.invalid_arguments:r="Invalid function arguments";break;case $.invalid_return_type:r="Invalid function return type";break;case $.invalid_date:r="Invalid date";break;case $.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:X.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case $.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case $.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case $.custom:r="Invalid input";break;case $.invalid_intersection_types:r="Intersection results could not be merged";break;case $.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case $.not_finite:r="Number must be finite";break;default:r=t.defaultError,X.assertNever(e)}return{message:r}},vr=zT});function RT(e){Yy=e}function to(){return Yy}var Yy,zs=v(()=>{sl();Yy=vr});function E(e,t){let r=to(),n=ti({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===vr?void 0:vr].filter(o=>!!o)});e.common.issues.push(n)}var ti,AT,Ze,Z,pn,Ke,Rs,As,Lr,ro,al=v(()=>{zs();sl();ti=e=>{let{data:t,path:r,errorMaps:n,issueData:o}=e,i=[...r,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="",c=n.filter(u=>!!u).slice().reverse();for(let u of c)a=u(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}},AT=[];Ze=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let n=[];for(let o of r){if(o.status==="aborted")return Z;o.status==="dirty"&&t.dirty(),n.push(o.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){let n=[];for(let o of r){let i=await o.key,s=await o.value;n.push({key:i,value:s})}return e.mergeObjectSync(t,n)}static mergeObjectSync(t,r){let n={};for(let o of r){let{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return Z;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(n[i.value]=s.value)}return{status:t.value,value:n}}},Z=Object.freeze({status:"aborted"}),pn=e=>({status:"dirty",value:e}),Ke=e=>({status:"valid",value:e}),Rs=e=>e.status==="aborted",As=e=>e.status==="dirty",Lr=e=>e.status==="valid",ro=e=>typeof Promise<"u"&&e instanceof Promise});var Qy=v(()=>{});var A,Xy=v(()=>{(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(A||(A={}))});function B(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:o}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,a)=>{let{message:c}=e;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??n??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:c??r??a.defaultError}},description:o}}function n_(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function JT(e){return new RegExp(`^${n_(e)}$`)}function o_(e){let t=`${r_}T${n_(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function YT(e,t){return!!((t==="v4"||!t)&&UT.test(e)||(t==="v6"||!t)&&VT.test(e))}function QT(e,t){if(!LT.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),o=JSON.parse(atob(n));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function XT(e,t){return!!((t==="v4"||!t)&&BT.test(e)||(t==="v6"||!t)&&HT.test(e))}function eP(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}function no(e){if(e instanceof ht){let t={};for(let r in e.shape){let n=e.shape[r];t[r]=ft.create(no(n))}return new ht({...e._def,shape:()=>t})}else return e instanceof kr?new kr({...e._def,type:no(e.element)}):e instanceof ft?ft.create(no(e.unwrap())):e instanceof sr?sr.create(no(e.unwrap())):e instanceof ir?ir.create(e.items.map(t=>no(t))):e}function ul(e,t){let r=or(e),n=or(t);if(e===t)return{valid:!0,data:e};if(r===I.object&&n===I.object){let o=X.objectKeys(t),i=X.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(let a of i){let c=ul(e[a],t[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(r===I.array&&n===I.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let i=0;i<e.length;i++){let s=e[i],a=t[i],c=ul(s,a);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return r===I.date&&n===I.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}function i_(e,t){return new kn({values:e,typeName:P.ZodEnum,...B(t)})}function t_(e,t){let r=typeof e=="function"?e(t):typeof e=="string"?{message:e}:e;return typeof r=="string"?{message:r}:r}function s_(e,t={},r){return e?qr.create().superRefine((n,o)=>{let i=e(n);if(i instanceof Promise)return i.then(s=>{if(!s){let a=t_(t,n),c=a.fatal??r??!0;o.addIssue({code:"custom",...a,fatal:c})}});if(!i){let s=t_(t,n),a=s.fatal??r??!0;o.addIssue({code:"custom",...s,fatal:a})}}):qr.create()}var zt,e_,W,OT,NT,jT,DT,MT,LT,ZT,qT,FT,cl,UT,BT,VT,HT,GT,WT,r_,KT,Zr,dn,fn,hn,mn,oo,gn,yn,qr,xr,Bt,io,kr,ht,_n,br,Os,vn,ir,Ns,so,ao,js,bn,xn,kn,wn,Fr,Rt,ft,sr,Sn,$n,co,tP,ri,ni,Tn,rP,P,nP,a_,c_,oP,iP,u_,sP,aP,cP,uP,lP,pP,dP,fP,hP,ll,mP,gP,yP,_P,vP,bP,xP,kP,wP,SP,$P,TP,PP,CP,EP,IP,zP,RP,AP,OP,NP,jP,DP,MP,l_=v(()=>{Is();zs();Xy();al();ei();zt=class{constructor(t,r,n,o){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},e_=(e,t)=>{if(Lr(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new dt(e.common.issues);return this._error=r,this._error}}};W=class{get description(){return this._def.description}_getType(t){return or(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:or(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ze,ctx:{common:t.parent.common,data:t.data,parsedType:or(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(ro(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){let n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:or(t)},o=this._parseSync({data:t,path:n.path,parent:n});return e_(n,o)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:or(t)};if(!this["~standard"].async)try{let n=this._parseSync({data:t,path:[],parent:r});return Lr(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(n=>Lr(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(t,r){let n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:or(t)},o=this._parse({data:t,path:n.path,parent:n}),i=await(ro(o)?o:Promise.resolve(o));return e_(n,i)}refine(t,r){let n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,i)=>{let s=t(o),a=()=>i.addIssue({code:$.custom,...n(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,r){return this._refinement((n,o)=>t(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(t){return new Rt({schema:this,typeName:P.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return ft.create(this,this._def)}nullable(){return sr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return kr.create(this)}promise(){return Fr.create(this,this._def)}or(t){return _n.create([this,t],this._def)}and(t){return vn.create(this,t,this._def)}transform(t){return new Rt({...B(this._def),schema:this,typeName:P.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Sn({...B(this._def),innerType:this,defaultValue:r,typeName:P.ZodDefault})}brand(){return new ri({typeName:P.ZodBranded,type:this,...B(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new $n({...B(this._def),innerType:this,catchValue:r,typeName:P.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return ni.create(this,t)}readonly(){return Tn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},OT=/^c[^\s-]{8,}$/i,NT=/^[0-9a-z]+$/,jT=/^[0-9A-HJKMNP-TV-Z]{26}$/i,DT=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,MT=/^[a-z0-9_-]{21}$/i,LT=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ZT=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,qT=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,FT="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",UT=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,BT=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,VT=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,HT=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,GT=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,WT=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,r_="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",KT=new RegExp(`^${r_}$`);Zr=class e extends W{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==I.string){let i=this._getOrReturnCtx(t);return E(i,{code:$.invalid_type,expected:I.string,received:i.parsedType}),Z}let n=new Ze,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),E(o,{code:$.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),E(o,{code:$.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(t,o),s?E(o,{code:$.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&E(o,{code:$.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")qT.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"email",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")cl||(cl=new RegExp(FT,"u")),cl.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"emoji",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")DT.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"uuid",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")MT.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"nanoid",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")OT.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"cuid",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")NT.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"cuid2",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")jT.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"ulid",code:$.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),E(o,{validation:"url",code:$.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"regex",code:$.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?o_(i).test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?KT.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?JT(i).test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{code:$.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?ZT.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"duration",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?YT(t.data,i.version)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"ip",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?QT(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"jwt",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?XT(t.data,i.version)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"cidr",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?GT.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"base64",code:$.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?WT.test(t.data)||(o=this._getOrReturnCtx(t,o),E(o,{validation:"base64url",code:$.invalid_string,message:i.message}),n.dirty()):X.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(o=>t.test(o),{validation:r,code:$.invalid_string,...A.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...A.errToObj(t)})}url(t){return this._addCheck({kind:"url",...A.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...A.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...A.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...A.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...A.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...A.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...A.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...A.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...A.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...A.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...A.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...A.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...A.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...A.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...A.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...A.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...A.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...A.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...A.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...A.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...A.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...A.errToObj(r)})}nonempty(t){return this.min(1,A.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Zr.create=e=>new Zr({checks:[],typeName:P.ZodString,coerce:e?.coerce??!1,...B(e)});dn=class e extends W{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==I.number){let i=this._getOrReturnCtx(t);return E(i,{code:$.invalid_type,expected:I.number,received:i.parsedType}),Z}let n,o=new Ze;for(let i of this._def.checks)i.kind==="int"?X.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),E(n,{code:$.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),E(n,{code:$.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),E(n,{code:$.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?eP(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),E(n,{code:$.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),E(n,{code:$.not_finite,message:i.message}),o.dirty()):X.assertNever(i);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,A.toString(r))}gt(t,r){return this.setLimit("min",t,!1,A.toString(r))}lte(t,r){return this.setLimit("max",t,!0,A.toString(r))}lt(t,r){return this.setLimit("max",t,!1,A.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:A.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:A.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:A.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:A.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:A.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:A.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:A.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:A.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:A.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:A.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&X.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}};dn.create=e=>new dn({checks:[],typeName:P.ZodNumber,coerce:e?.coerce||!1,...B(e)});fn=class e extends W{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==I.bigint)return this._getInvalidInput(t);let n,o=new Ze;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),E(n,{code:$.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),E(n,{code:$.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),E(n,{code:$.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):X.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return E(r,{code:$.invalid_type,expected:I.bigint,received:r.parsedType}),Z}gte(t,r){return this.setLimit("min",t,!0,A.toString(r))}gt(t,r){return this.setLimit("min",t,!1,A.toString(r))}lte(t,r){return this.setLimit("max",t,!0,A.toString(r))}lt(t,r){return this.setLimit("max",t,!1,A.toString(r))}setLimit(t,r,n,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:A.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:A.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:A.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:A.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:A.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:A.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};fn.create=e=>new fn({checks:[],typeName:P.ZodBigInt,coerce:e?.coerce??!1,...B(e)});hn=class extends W{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==I.boolean){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.boolean,received:n.parsedType}),Z}return Ke(t.data)}};hn.create=e=>new hn({typeName:P.ZodBoolean,coerce:e?.coerce||!1,...B(e)});mn=class e extends W{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==I.date){let i=this._getOrReturnCtx(t);return E(i,{code:$.invalid_type,expected:I.date,received:i.parsedType}),Z}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return E(i,{code:$.invalid_date}),Z}let n=new Ze,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),E(o,{code:$.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),E(o,{code:$.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):X.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:A.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:A.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};mn.create=e=>new mn({checks:[],coerce:e?.coerce||!1,typeName:P.ZodDate,...B(e)});oo=class extends W{_parse(t){if(this._getType(t)!==I.symbol){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.symbol,received:n.parsedType}),Z}return Ke(t.data)}};oo.create=e=>new oo({typeName:P.ZodSymbol,...B(e)});gn=class extends W{_parse(t){if(this._getType(t)!==I.undefined){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.undefined,received:n.parsedType}),Z}return Ke(t.data)}};gn.create=e=>new gn({typeName:P.ZodUndefined,...B(e)});yn=class extends W{_parse(t){if(this._getType(t)!==I.null){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.null,received:n.parsedType}),Z}return Ke(t.data)}};yn.create=e=>new yn({typeName:P.ZodNull,...B(e)});qr=class extends W{constructor(){super(...arguments),this._any=!0}_parse(t){return Ke(t.data)}};qr.create=e=>new qr({typeName:P.ZodAny,...B(e)});xr=class extends W{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ke(t.data)}};xr.create=e=>new xr({typeName:P.ZodUnknown,...B(e)});Bt=class extends W{_parse(t){let r=this._getOrReturnCtx(t);return E(r,{code:$.invalid_type,expected:I.never,received:r.parsedType}),Z}};Bt.create=e=>new Bt({typeName:P.ZodNever,...B(e)});io=class extends W{_parse(t){if(this._getType(t)!==I.undefined){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.void,received:n.parsedType}),Z}return Ke(t.data)}};io.create=e=>new io({typeName:P.ZodVoid,...B(e)});kr=class e extends W{_parse(t){let{ctx:r,status:n}=this._processInputParams(t),o=this._def;if(r.parsedType!==I.array)return E(r,{code:$.invalid_type,expected:I.array,received:r.parsedType}),Z;if(o.exactLength!==null){let s=r.data.length>o.exactLength.value,a=r.data.length<o.exactLength.value;(s||a)&&(E(r,{code:s?$.too_big:$.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(E(r,{code:$.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(E(r,{code:$.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((s,a)=>o.type._parseAsync(new zt(r,s,r.path,a)))).then(s=>Ze.mergeArray(n,s));let i=[...r.data].map((s,a)=>o.type._parseSync(new zt(r,s,r.path,a)));return Ze.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:A.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:A.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:A.toString(r)}})}nonempty(t){return this.min(1,t)}};kr.create=(e,t)=>new kr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:P.ZodArray,...B(t)});ht=class e extends W{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=X.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==I.object){let u=this._getOrReturnCtx(t);return E(u,{code:$.invalid_type,expected:I.object,received:u.parsedType}),Z}let{status:n,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Bt&&this._def.unknownKeys==="strip"))for(let u in o.data)s.includes(u)||a.push(u);let c=[];for(let u of s){let p=i[u],l=o.data[u];c.push({key:{status:"valid",value:u},value:p._parse(new zt(o,l,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof Bt){let u=this._def.unknownKeys;if(u==="passthrough")for(let p of a)c.push({key:{status:"valid",value:p},value:{status:"valid",value:o.data[p]}});else if(u==="strict")a.length>0&&(E(o,{code:$.unrecognized_keys,keys:a}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let p of a){let l=o.data[p];c.push({key:{status:"valid",value:p},value:u._parse(new zt(o,l,o.path,p)),alwaysSet:p in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let u=[];for(let p of c){let l=await p.key,d=await p.value;u.push({key:l,value:d,alwaysSet:p.alwaysSet})}return u}).then(u=>Ze.mergeObjectSync(n,u)):Ze.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return A.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{let o=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:A.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:P.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let n of X.objectKeys(t))t[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let n of X.objectKeys(this.shape))t[n]||(r[n]=this.shape[n]);return new e({...this._def,shape:()=>r})}deepPartial(){return no(this)}partial(t){let r={};for(let n of X.objectKeys(this.shape)){let o=this.shape[n];t&&!t[n]?r[n]=o:r[n]=o.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let n of X.objectKeys(this.shape))if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof ft;)i=i._def.innerType;r[n]=i}return new e({...this._def,shape:()=>r})}keyof(){return i_(X.objectKeys(this.shape))}};ht.create=(e,t)=>new ht({shape:()=>e,unknownKeys:"strip",catchall:Bt.create(),typeName:P.ZodObject,...B(t)});ht.strictCreate=(e,t)=>new ht({shape:()=>e,unknownKeys:"strict",catchall:Bt.create(),typeName:P.ZodObject,...B(t)});ht.lazycreate=(e,t)=>new ht({shape:e,unknownKeys:"strip",catchall:Bt.create(),typeName:P.ZodObject,...B(t)});_n=class extends W{_parse(t){let{ctx:r}=this._processInputParams(t),n=this._def.options;function o(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new dt(a.ctx.common.issues));return E(r,{code:$.invalid_union,unionErrors:s}),Z}if(r.common.async)return Promise.all(n.map(async i=>{let s={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(o);{let i,s=[];for(let c of n){let u={...r,common:{...r.common,issues:[]},parent:null},p=c._parseSync({data:r.data,path:r.path,parent:u});if(p.status==="valid")return p;p.status==="dirty"&&!i&&(i={result:p,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(c=>new dt(c));return E(r,{code:$.invalid_union,unionErrors:a}),Z}}get options(){return this._def.options}};_n.create=(e,t)=>new _n({options:e,typeName:P.ZodUnion,...B(t)});br=e=>e instanceof bn?br(e.schema):e instanceof Rt?br(e.innerType()):e instanceof xn?[e.value]:e instanceof kn?e.options:e instanceof wn?X.objectValues(e.enum):e instanceof Sn?br(e._def.innerType):e instanceof gn?[void 0]:e instanceof yn?[null]:e instanceof ft?[void 0,...br(e.unwrap())]:e instanceof sr?[null,...br(e.unwrap())]:e instanceof ri||e instanceof Tn?br(e.unwrap()):e instanceof $n?br(e._def.innerType):[],Os=class e extends W{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==I.object)return E(r,{code:$.invalid_type,expected:I.object,received:r.parsedType}),Z;let n=this.discriminator,o=r.data[n],i=this.optionsMap.get(o);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(E(r,{code:$.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),Z)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){let o=new Map;for(let i of r){let s=br(i.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let a of s){if(o.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);o.set(a,i)}}return new e({typeName:P.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...B(n)})}};vn=class extends W{_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=(i,s)=>{if(Rs(i)||Rs(s))return Z;let a=ul(i.value,s.value);return a.valid?((As(i)||As(s))&&r.dirty(),{status:r.value,value:a.data}):(E(n,{code:$.invalid_intersection_types}),Z)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};vn.create=(e,t,r)=>new vn({left:e,right:t,typeName:P.ZodIntersection,...B(r)});ir=class e extends W{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==I.array)return E(n,{code:$.invalid_type,expected:I.array,received:n.parsedType}),Z;if(n.data.length<this._def.items.length)return E(n,{code:$.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Z;!this._def.rest&&n.data.length>this._def.items.length&&(E(n,{code:$.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...n.data].map((s,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new zt(n,s,n.path,a)):null}).filter(s=>!!s);return n.common.async?Promise.all(i).then(s=>Ze.mergeArray(r,s)):Ze.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};ir.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ir({items:e,typeName:P.ZodTuple,rest:null,...B(t)})};Ns=class e extends W{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==I.object)return E(n,{code:$.invalid_type,expected:I.object,received:n.parsedType}),Z;let o=[],i=this._def.keyType,s=this._def.valueType;for(let a in n.data)o.push({key:i._parse(new zt(n,a,n.path,a)),value:s._parse(new zt(n,n.data[a],n.path,a)),alwaysSet:a in n.data});return n.common.async?Ze.mergeObjectAsync(r,o):Ze.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof W?new e({keyType:t,valueType:r,typeName:P.ZodRecord,...B(n)}):new e({keyType:Zr.create(),valueType:t,typeName:P.ZodRecord,...B(r)})}},so=class extends W{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==I.map)return E(n,{code:$.invalid_type,expected:I.map,received:n.parsedType}),Z;let o=this._def.keyType,i=this._def.valueType,s=[...n.data.entries()].map(([a,c],u)=>({key:o._parse(new zt(n,a,n.path,[u,"key"])),value:i._parse(new zt(n,c,n.path,[u,"value"]))}));if(n.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of s){let u=await c.key,p=await c.value;if(u.status==="aborted"||p.status==="aborted")return Z;(u.status==="dirty"||p.status==="dirty")&&r.dirty(),a.set(u.value,p.value)}return{status:r.value,value:a}})}else{let a=new Map;for(let c of s){let u=c.key,p=c.value;if(u.status==="aborted"||p.status==="aborted")return Z;(u.status==="dirty"||p.status==="dirty")&&r.dirty(),a.set(u.value,p.value)}return{status:r.value,value:a}}}};so.create=(e,t,r)=>new so({valueType:t,keyType:e,typeName:P.ZodMap,...B(r)});ao=class e extends W{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==I.set)return E(n,{code:$.invalid_type,expected:I.set,received:n.parsedType}),Z;let o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(E(n,{code:$.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(E(n,{code:$.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());let i=this._def.valueType;function s(c){let u=new Set;for(let p of c){if(p.status==="aborted")return Z;p.status==="dirty"&&r.dirty(),u.add(p.value)}return{status:r.value,value:u}}let a=[...n.data.values()].map((c,u)=>i._parse(new zt(n,c,n.path,u)));return n.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(t,r){return new e({...this._def,minSize:{value:t,message:A.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:A.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};ao.create=(e,t)=>new ao({valueType:e,minSize:null,maxSize:null,typeName:P.ZodSet,...B(t)});js=class e extends W{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==I.function)return E(r,{code:$.invalid_type,expected:I.function,received:r.parsedType}),Z;function n(a,c){return ti({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,to(),vr].filter(u=>!!u),issueData:{code:$.invalid_arguments,argumentsError:c}})}function o(a,c){return ti({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,to(),vr].filter(u=>!!u),issueData:{code:$.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof Fr){let a=this;return Ke(async function(...c){let u=new dt([]),p=await a._def.args.parseAsync(c,i).catch(h=>{throw u.addIssue(n(c,h)),u}),l=await Reflect.apply(s,this,p);return await a._def.returns._def.type.parseAsync(l,i).catch(h=>{throw u.addIssue(o(l,h)),u})})}else{let a=this;return Ke(function(...c){let u=a._def.args.safeParse(c,i);if(!u.success)throw new dt([n(c,u.error)]);let p=Reflect.apply(s,this,u.data),l=a._def.returns.safeParse(p,i);if(!l.success)throw new dt([o(p,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:ir.create(t).rest(xr.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new e({args:t||ir.create([]).rest(xr.create()),returns:r||xr.create(),typeName:P.ZodFunction,...B(n)})}},bn=class extends W{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};bn.create=(e,t)=>new bn({getter:e,typeName:P.ZodLazy,...B(t)});xn=class extends W{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return E(r,{received:r.data,code:$.invalid_literal,expected:this._def.value}),Z}return{status:"valid",value:t.data}}get value(){return this._def.value}};xn.create=(e,t)=>new xn({value:e,typeName:P.ZodLiteral,...B(t)});kn=class e extends W{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),n=this._def.values;return E(r,{expected:X.joinValues(n),received:r.parsedType,code:$.invalid_type}),Z}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),n=this._def.values;return E(r,{received:r.data,code:$.invalid_enum_value,options:n}),Z}return Ke(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(n=>!t.includes(n)),{...this._def,...r})}};kn.create=i_;wn=class extends W{_parse(t){let r=X.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==I.string&&n.parsedType!==I.number){let o=X.objectValues(r);return E(n,{expected:X.joinValues(o),received:n.parsedType,code:$.invalid_type}),Z}if(this._cache||(this._cache=new Set(X.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let o=X.objectValues(r);return E(n,{received:n.data,code:$.invalid_enum_value,options:o}),Z}return Ke(t.data)}get enum(){return this._def.values}};wn.create=(e,t)=>new wn({values:e,typeName:P.ZodNativeEnum,...B(t)});Fr=class extends W{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==I.promise&&r.common.async===!1)return E(r,{code:$.invalid_type,expected:I.promise,received:r.parsedType}),Z;let n=r.parsedType===I.promise?r.data:Promise.resolve(r.data);return Ke(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Fr.create=(e,t)=>new Fr({type:e,typeName:P.ZodPromise,...B(t)});Rt=class extends W{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===P.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:n}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:s=>{E(n,s),s.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let s=o.transform(n.data,i);if(n.common.async)return Promise.resolve(s).then(async a=>{if(r.value==="aborted")return Z;let c=await this._def.schema._parseAsync({data:a,path:n.path,parent:n});return c.status==="aborted"?Z:c.status==="dirty"?pn(c.value):r.value==="dirty"?pn(c.value):c});{if(r.value==="aborted")return Z;let a=this._def.schema._parseSync({data:s,path:n.path,parent:n});return a.status==="aborted"?Z:a.status==="dirty"?pn(a.value):r.value==="dirty"?pn(a.value):a}}if(o.type==="refinement"){let s=a=>{let c=o.refinement(a,i);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?Z:(a.status==="dirty"&&r.dirty(),s(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>a.status==="aborted"?Z:(a.status==="dirty"&&r.dirty(),s(a.value).then(()=>({status:r.value,value:a.value}))))}if(o.type==="transform")if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Lr(s))return Z;let a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>Lr(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:r.value,value:a})):Z);X.assertNever(o)}};Rt.create=(e,t,r)=>new Rt({schema:e,typeName:P.ZodEffects,effect:t,...B(r)});Rt.createWithPreprocess=(e,t,r)=>new Rt({schema:t,effect:{type:"preprocess",transform:e},typeName:P.ZodEffects,...B(r)});ft=class extends W{_parse(t){return this._getType(t)===I.undefined?Ke(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};ft.create=(e,t)=>new ft({innerType:e,typeName:P.ZodOptional,...B(t)});sr=class extends W{_parse(t){return this._getType(t)===I.null?Ke(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};sr.create=(e,t)=>new sr({innerType:e,typeName:P.ZodNullable,...B(t)});Sn=class extends W{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return r.parsedType===I.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Sn.create=(e,t)=>new Sn({innerType:e,typeName:P.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...B(t)});$n=class extends W{_parse(t){let{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return ro(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new dt(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new dt(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};$n.create=(e,t)=>new $n({innerType:e,typeName:P.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...B(t)});co=class extends W{_parse(t){if(this._getType(t)!==I.nan){let n=this._getOrReturnCtx(t);return E(n,{code:$.invalid_type,expected:I.nan,received:n.parsedType}),Z}return{status:"valid",value:t.data}}};co.create=e=>new co({typeName:P.ZodNaN,...B(e)});tP=Symbol("zod_brand"),ri=class extends W{_parse(t){let{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},ni=class e extends W{_parse(t){let{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?Z:i.status==="dirty"?(r.dirty(),pn(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{let o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?Z:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(t,r){return new e({in:t,out:r,typeName:P.ZodPipeline})}},Tn=class extends W{_parse(t){let r=this._def.innerType._parse(t),n=o=>(Lr(o)&&(o.value=Object.freeze(o.value)),o);return ro(r)?r.then(o=>n(o)):n(r)}unwrap(){return this._def.innerType}};Tn.create=(e,t)=>new Tn({innerType:e,typeName:P.ZodReadonly,...B(t)});rP={object:ht.lazycreate};(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(P||(P={}));nP=(e,t={message:`Input not instance of ${e.name}`})=>s_(r=>r instanceof e,t),a_=Zr.create,c_=dn.create,oP=co.create,iP=fn.create,u_=hn.create,sP=mn.create,aP=oo.create,cP=gn.create,uP=yn.create,lP=qr.create,pP=xr.create,dP=Bt.create,fP=io.create,hP=kr.create,ll=ht.create,mP=ht.strictCreate,gP=_n.create,yP=Os.create,_P=vn.create,vP=ir.create,bP=Ns.create,xP=so.create,kP=ao.create,wP=js.create,SP=bn.create,$P=xn.create,TP=kn.create,PP=wn.create,CP=Fr.create,EP=Rt.create,IP=ft.create,zP=sr.create,RP=Rt.createWithPreprocess,AP=ni.create,OP=()=>a_().optional(),NP=()=>c_().optional(),jP=()=>u_().optional(),DP={string:(e=>Zr.create({...e,coerce:!0})),number:(e=>dn.create({...e,coerce:!0})),boolean:(e=>hn.create({...e,coerce:!0})),bigint:(e=>fn.create({...e,coerce:!0})),date:(e=>mn.create({...e,coerce:!0}))},MP=Z});var g={};Mr(g,{BRAND:()=>tP,DIRTY:()=>pn,EMPTY_PATH:()=>AT,INVALID:()=>Z,NEVER:()=>MP,OK:()=>Ke,ParseStatus:()=>Ze,Schema:()=>W,ZodAny:()=>qr,ZodArray:()=>kr,ZodBigInt:()=>fn,ZodBoolean:()=>hn,ZodBranded:()=>ri,ZodCatch:()=>$n,ZodDate:()=>mn,ZodDefault:()=>Sn,ZodDiscriminatedUnion:()=>Os,ZodEffects:()=>Rt,ZodEnum:()=>kn,ZodError:()=>dt,ZodFirstPartyTypeKind:()=>P,ZodFunction:()=>js,ZodIntersection:()=>vn,ZodIssueCode:()=>$,ZodLazy:()=>bn,ZodLiteral:()=>xn,ZodMap:()=>so,ZodNaN:()=>co,ZodNativeEnum:()=>wn,ZodNever:()=>Bt,ZodNull:()=>yn,ZodNullable:()=>sr,ZodNumber:()=>dn,ZodObject:()=>ht,ZodOptional:()=>ft,ZodParsedType:()=>I,ZodPipeline:()=>ni,ZodPromise:()=>Fr,ZodReadonly:()=>Tn,ZodRecord:()=>Ns,ZodSchema:()=>W,ZodSet:()=>ao,ZodString:()=>Zr,ZodSymbol:()=>oo,ZodTransformer:()=>Rt,ZodTuple:()=>ir,ZodType:()=>W,ZodUndefined:()=>gn,ZodUnion:()=>_n,ZodUnknown:()=>xr,ZodVoid:()=>io,addIssueToContext:()=>E,any:()=>lP,array:()=>hP,bigint:()=>iP,boolean:()=>u_,coerce:()=>DP,custom:()=>s_,date:()=>sP,datetimeRegex:()=>o_,defaultErrorMap:()=>vr,discriminatedUnion:()=>yP,effect:()=>EP,enum:()=>TP,function:()=>wP,getErrorMap:()=>to,getParsedType:()=>or,instanceof:()=>nP,intersection:()=>_P,isAborted:()=>Rs,isAsync:()=>ro,isDirty:()=>As,isValid:()=>Lr,late:()=>rP,lazy:()=>SP,literal:()=>$P,makeIssue:()=>ti,map:()=>xP,nan:()=>oP,nativeEnum:()=>PP,never:()=>dP,null:()=>uP,nullable:()=>zP,number:()=>c_,object:()=>ll,objectUtil:()=>il,oboolean:()=>jP,onumber:()=>NP,optional:()=>IP,ostring:()=>OP,pipeline:()=>AP,preprocess:()=>RP,promise:()=>CP,quotelessJson:()=>IT,record:()=>bP,set:()=>kP,setErrorMap:()=>RT,strictObject:()=>mP,string:()=>a_,symbol:()=>aP,transformer:()=>EP,tuple:()=>vP,undefined:()=>cP,union:()=>gP,unknown:()=>pP,util:()=>X,void:()=>fP});var Ds=v(()=>{zs();al();Qy();ei();l_();Is()});var oi=v(()=>{Ds()});function k(e,t,r){function n(a,c){var u;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(u=a._zod).traits??(u.traits=new Set),a._zod.traits.add(e),t(a,c);for(let p in s.prototype)p in a||Object.defineProperty(a,p,{value:s.prototype[p].bind(a)});a._zod.constr=s,a._zod.def=c}let o=r?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(a){var c;let u=r?.Parent?new i:this;n(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let p of u._zod.deferred)p();return u}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>r?.Parent&&a instanceof r.Parent?!0:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}function $t(e){return e&&Object.assign(Ms,e),Ms}var ZP,qP,wr,Ms,uo=v(()=>{ZP=Object.freeze({status:"aborted"});qP=Symbol("zod_brand"),wr=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ms={}});var re={};Mr(re,{BIGINT_FORMAT_RANGES:()=>d_,Class:()=>dl,NUMBER_FORMAT_RANGES:()=>vl,aborted:()=>Cn,allowsEval:()=>gl,assert:()=>HP,assertEqual:()=>FP,assertIs:()=>BP,assertNever:()=>VP,assertNotEqual:()=>UP,assignProp:()=>ml,cached:()=>ai,captureStackTrace:()=>Zs,cleanEnum:()=>iC,cleanRegex:()=>ui,clone:()=>Tt,createTransparentProxy:()=>QP,defineLazy:()=>ye,esc:()=>Pn,escapeRegex:()=>Ur,extend:()=>tC,finalizeIssue:()=>Vt,floatSafeRemainder:()=>hl,getElementAtPath:()=>GP,getEnumValues:()=>si,getLengthableOrigin:()=>li,getParsedType:()=>YP,getSizableOrigin:()=>f_,isObject:()=>lo,isPlainObject:()=>po,issue:()=>bl,joinValues:()=>Ls,jsonStringifyReplacer:()=>fl,merge:()=>rC,normalizeParams:()=>q,nullish:()=>ci,numKeys:()=>JP,omit:()=>eC,optionalKeys:()=>_l,partial:()=>nC,pick:()=>XP,prefixIssues:()=>ar,primitiveTypes:()=>p_,promiseAllObject:()=>WP,propertyKeyTypes:()=>yl,randomString:()=>KP,required:()=>oC,stringifyPrimitive:()=>qs,unwrapMessage:()=>ii});function FP(e){return e}function UP(e){return e}function BP(e){}function VP(e){throw new Error}function HP(e){}function si(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function Ls(e,t="|"){return e.map(r=>qs(r)).join(t)}function fl(e,t){return typeof t=="bigint"?t.toString():t}function ai(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function ci(e){return e==null}function ui(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function hl(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}function ye(e,t,r){Object.defineProperty(e,t,{get(){{let o=r();return e[t]=o,o}throw new Error("cached value already set")},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function ml(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function GP(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function WP(e){let t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{let o={};for(let i=0;i<t.length;i++)o[t[i]]=n[i];return o})}function KP(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r}function Pn(e){return JSON.stringify(e)}function lo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function po(e){if(lo(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let r=t.prototype;return!(lo(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function JP(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}function Ur(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Tt(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function q(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function QP(e){let t;return new Proxy({},{get(r,n,o){return t??(t=e()),Reflect.get(t,n,o)},set(r,n,o,i){return t??(t=e()),Reflect.set(t,n,o,i)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,o){return t??(t=e()),Reflect.defineProperty(t,n,o)}})}function qs(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function _l(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function XP(e,t){let r={},n=e._zod.def;for(let o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(r[o]=n.shape[o])}return Tt(e,{...e._zod.def,shape:r,checks:[]})}function eC(e,t){let r={...e._zod.def.shape},n=e._zod.def;for(let o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&delete r[o]}return Tt(e,{...e._zod.def,shape:r,checks:[]})}function tC(e,t){if(!po(t))throw new Error("Invalid input to extend: expected a plain object");let r={...e._zod.def,get shape(){let n={...e._zod.def.shape,...t};return ml(this,"shape",n),n},checks:[]};return Tt(e,r)}function rC(e,t){return Tt(e,{...e._zod.def,get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return ml(this,"shape",r),r},catchall:t._zod.def.catchall,checks:[]})}function nC(e,t,r){let n=t._zod.def.shape,o={...n};if(r)for(let i in r){if(!(i in n))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(o[i]=e?new e({type:"optional",innerType:n[i]}):n[i])}else for(let i in n)o[i]=e?new e({type:"optional",innerType:n[i]}):n[i];return Tt(t,{...t._zod.def,shape:o,checks:[]})}function oC(e,t,r){let n=t._zod.def.shape,o={...n};if(r)for(let i in r){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);r[i]&&(o[i]=new e({type:"nonoptional",innerType:n[i]}))}else for(let i in n)o[i]=new e({type:"nonoptional",innerType:n[i]});return Tt(t,{...t._zod.def,shape:o,checks:[]})}function Cn(e,t=0){for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function ar(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function ii(e){return typeof e=="string"?e:e?.message}function Vt(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let o=ii(e.inst?._zod.def?.error?.(e))??ii(t?.error?.(e))??ii(r.customError?.(e))??ii(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function f_(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function li(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function bl(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function iC(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}var Zs,gl,YP,yl,p_,vl,d_,dl,cr=v(()=>{Zs=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};gl=ai(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});YP=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},yl=new Set(["string","number","symbol"]),p_=new Set(["string","number","bigint","boolean","symbol","undefined"]);vl={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},d_={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};dl=class{constructor(...t){}}});function xl(e,t=r=>r.message){let r={},n=[];for(let o of e.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}function kl(e,t){let r=t||function(i){return i.message},n={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>o({issues:a}));else if(s.code==="invalid_key")o({issues:s.issues});else if(s.code==="invalid_element")o({issues:s.issues});else if(s.path.length===0)n._errors.push(r(s));else{let a=n,c=0;for(;c<s.path.length;){let u=s.path[c];c===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(r(s))):a[u]=a[u]||{_errors:[]},a=a[u],c++}}};return o(e),n}var h_,Fs,pi,wl=v(()=>{uo();cr();h_=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,fl,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Fs=k("$ZodError",h_),pi=k("$ZodError",h_,{Parent:Error})});var Sl,$l,Tl,Pl,Cl,En,El,In,Il=v(()=>{uo();wl();cr();Sl=e=>(t,r,n,o)=>{let i=n?Object.assign(n,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new wr;if(s.issues.length){let a=new(o?.Err??e)(s.issues.map(c=>Vt(c,i,$t())));throw Zs(a,o?.callee),a}return s.value},$l=Sl(pi),Tl=e=>async(t,r,n,o)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(o?.Err??e)(s.issues.map(c=>Vt(c,i,$t())));throw Zs(a,o?.callee),a}return s.value},Pl=Tl(pi),Cl=e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new wr;return i.issues.length?{success:!1,error:new(e??Fs)(i.issues.map(s=>Vt(s,o,$t())))}:{success:!0,data:i.value}},En=Cl(pi),El=e=>async(t,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>Vt(s,o,$t())))}:{success:!0,data:i.value}},In=El(pi)});function S_(){return new RegExp(aC,"u")}function O_(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function N_(e){return new RegExp(`^${O_(e)}$`)}function j_(e){let t=O_({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-]\\d{2}:\\d{2})");let n=`${t}(?:${r.join("|")})`;return new RegExp(`^${R_}T(?:${n})$`)}var m_,g_,y_,__,v_,b_,x_,k_,zl,w_,aC,$_,T_,P_,C_,E_,Rl,I_,z_,R_,A_,D_,M_,L_,Z_,q_,F_,U_,Bs=v(()=>{m_=/^[cC][^\s-]{8,}$/,g_=/^[0-9a-z]+$/,y_=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,__=/^[0-9a-vA-V]{20}$/,v_=/^[A-Za-z0-9]{27}$/,b_=/^[a-zA-Z0-9_-]{21}$/,x_=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,k_=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,zl=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,w_=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,aC="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";$_=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,T_=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,P_=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,C_=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,E_=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Rl=/^[A-Za-z0-9_-]*$/,I_=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,z_=/^\+(?:[0-9]){6,14}[0-9]$/,R_="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",A_=new RegExp(`^${R_}$`);D_=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},M_=/^\d+$/,L_=/^-?\d+(?:\.\d+)?/i,Z_=/true|false/i,q_=/null/i,F_=/^[^A-Z]*$/,U_=/^[^a-z]*$/});var qe,B_,Al,Ol,V_,H_,G_,W_,K_,di,J_,Y_,Q_,X_,ev,tv,rv,Vs=v(()=>{uo();Bs();cr();qe=k("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),B_={number:"number",bigint:"bigint",object:"date"},Al=k("$ZodCheckLessThan",(e,t)=>{qe.init(e,t);let r=B_[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:r,code:"too_big",maximum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ol=k("$ZodCheckGreaterThan",(e,t)=>{qe.init(e,t);let r=B_[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),V_=k("$ZodCheckMultipleOf",(e,t)=>{qe.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):hl(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),H_=k("$ZodCheckNumberFormat",(e,t)=>{qe.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,i]=vl[t.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=t.format,a.minimum=o,a.maximum=i,r&&(a.pattern=M_)}),e._zod.check=s=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:n,format:t.format,code:"invalid_type",input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort});return}}a<o&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inst:e})}}),G_=k("$ZodCheckMaxLength",(e,t)=>{var r;qe.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!ci(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let o=n.value;if(o.length<=t.maximum)return;let s=li(o);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),W_=k("$ZodCheckMinLength",(e,t)=>{var r;qe.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!ci(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let o=n.value;if(o.length>=t.minimum)return;let s=li(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),K_=k("$ZodCheckLengthEquals",(e,t)=>{var r;qe.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!ci(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=n=>{let o=n.value,i=o.length;if(i===t.length)return;let s=li(o),a=i>t.length;n.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),di=k("$ZodCheckStringFormat",(e,t)=>{var r,n;qe.init(e,t),e._zod.onattach.push(o=>{let i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),J_=k("$ZodCheckRegex",(e,t)=>{di.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Y_=k("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=F_),di.init(e,t)}),Q_=k("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=U_),di.init(e,t)}),X_=k("$ZodCheckIncludes",(e,t)=>{qe.init(e,t);let r=Ur(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{let i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),ev=k("$ZodCheckStartsWith",(e,t)=>{qe.init(e,t);let r=new RegExp(`^${Ur(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),tv=k("$ZodCheckEndsWith",(e,t)=>{qe.init(e,t);let r=new RegExp(`.*${Ur(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),rv=k("$ZodCheckOverwrite",(e,t)=>{qe.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}})});var Hs,Nl=v(()=>{Hs=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(`
|
|
3
|
+
`).filter(s=>s),o=Math.min(...n.map(s=>s.length-s.trimStart().length)),i=n.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s)}compile(){let t=Function,r=this?.args,o=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,o.join(`
|
|
4
|
+
`))}}});var ov,jl=v(()=>{ov={major:4,minor:0,patch:0}});function _v(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}function cC(e){if(!Rl.test(e))return!1;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return _v(r)}function uC(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}function iv(e,t,r){e.issues.length&&t.issues.push(...ar(r,e.issues)),t.value[r]=e.value}function Gs(e,t,r){e.issues.length&&t.issues.push(...ar(r,e.issues)),t.value[r]=e.value}function sv(e,t,r,n){e.issues.length?n[r]===void 0?r in n?t.value[r]=void 0:t.value[r]=e.value:t.issues.push(...ar(r,e.issues)):e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}function av(e,t,r,n){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(i=>Vt(i,n,$t())))}),t}function Dl(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(po(e)&&po(t)){let r=Object.keys(t),n=Object.keys(e).filter(i=>r.indexOf(i)!==-1),o={...e,...t};for(let i of n){let s=Dl(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<e.length;n++){let o=e[n],i=t[n],s=Dl(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function cv(e,t,r){if(t.issues.length&&e.issues.push(...t.issues),r.issues.length&&e.issues.push(...r.issues),Cn(e))return e;let n=Dl(t.value,r.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}function uv(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function lv(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function pv(e,t,r){return Cn(e)?e:t.out._zod.run({value:e.value,issues:e.issues},r)}function dv(e){return e.value=Object.freeze(e.value),e}function fv(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(bl(o))}}var fe,fi,_e,Ml,Ll,Zl,ql,Fl,Ul,Bl,Vl,Hl,Gl,Wl,hv,mv,gv,yv,Kl,Jl,Yl,Ql,Xl,ep,tp,rp,Ws,np,op,ip,sp,ap,cp,Ks,Js,up,lp,pp,dp,fp,hp,mp,gp,yp,_p,vp,bp,xp,kp,wp,vv=v(()=>{Vs();uo();Nl();Il();Bs();cr();jl();cr();fe=k("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ov;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let o of n)for(let i of o._zod.onattach)i(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=(i,s,a)=>{let c=Cn(i),u;for(let p of s){if(p._zod.def.when){if(!p._zod.def.when(i))continue}else if(c)continue;let l=i.issues.length,d=p._zod.check(i);if(d instanceof Promise&&a?.async===!1)throw new wr;if(u||d instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await d,i.issues.length!==l&&(c||(c=Cn(i,l)))});else{if(i.issues.length===l)continue;c||(c=Cn(i,l))}}return u?u.then(()=>i):i};e._zod.run=(i,s)=>{let a=e._zod.parse(i,s);if(a instanceof Promise){if(s.async===!1)throw new wr;return a.then(c=>o(c,n,s))}return o(a,n,s)}}e["~standard"]={validate:o=>{try{let i=En(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return In(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}}),fi=k("$ZodString",(e,t)=>{fe.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??D_(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),_e=k("$ZodStringFormat",(e,t)=>{di.init(e,t),fi.init(e,t)}),Ml=k("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=k_),_e.init(e,t)}),Ll=k("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=zl(n))}else t.pattern??(t.pattern=zl());_e.init(e,t)}),Zl=k("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=w_),_e.init(e,t)}),ql=k("$ZodURL",(e,t)=>{_e.init(e,t),e._zod.check=r=>{try{let n=r.value,o=new URL(n),i=o.href;t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:I_.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),!n.endsWith("/")&&i.endsWith("/")?r.value=i.slice(0,-1):r.value=i;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Fl=k("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=S_()),_e.init(e,t)}),Ul=k("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=b_),_e.init(e,t)}),Bl=k("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=m_),_e.init(e,t)}),Vl=k("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=g_),_e.init(e,t)}),Hl=k("$ZodULID",(e,t)=>{t.pattern??(t.pattern=y_),_e.init(e,t)}),Gl=k("$ZodXID",(e,t)=>{t.pattern??(t.pattern=__),_e.init(e,t)}),Wl=k("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=v_),_e.init(e,t)}),hv=k("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=j_(t)),_e.init(e,t)}),mv=k("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=A_),_e.init(e,t)}),gv=k("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=N_(t)),_e.init(e,t)}),yv=k("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=x_),_e.init(e,t)}),Kl=k("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=$_),_e.init(e,t),e._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv4"})}),Jl=k("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=T_),_e.init(e,t),e._zod.onattach.push(r=>{let n=r._zod.bag;n.format="ipv6"}),e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),Yl=k("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=P_),_e.init(e,t)}),Ql=k("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=C_),_e.init(e,t),e._zod.check=r=>{let[n,o]=r.value.split("/");try{if(!o)throw new Error;let i=Number(o);if(`${i}`!==o)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});Xl=k("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=E_),_e.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64"}),e._zod.check=r=>{_v(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});ep=k("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Rl),_e.init(e,t),e._zod.onattach.push(r=>{r._zod.bag.contentEncoding="base64url"}),e._zod.check=r=>{cC(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),tp=k("$ZodE164",(e,t)=>{t.pattern??(t.pattern=z_),_e.init(e,t)});rp=k("$ZodJWT",(e,t)=>{_e.init(e,t),e._zod.check=r=>{uC(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Ws=k("$ZodNumber",(e,t)=>{fe.init(e,t),e._zod.pattern=e._zod.bag.pattern??L_,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),r}}),np=k("$ZodNumber",(e,t)=>{H_.init(e,t),Ws.init(e,t)}),op=k("$ZodBoolean",(e,t)=>{fe.init(e,t),e._zod.pattern=Z_,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),ip=k("$ZodNull",(e,t)=>{fe.init(e,t),e._zod.pattern=q_,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let o=r.value;return o===null||r.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),r}}),sp=k("$ZodUnknown",(e,t)=>{fe.init(e,t),e._zod.parse=r=>r}),ap=k("$ZodNever",(e,t)=>{fe.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});cp=k("$ZodArray",(e,t)=>{fe.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);let i=[];for(let s=0;s<o.length;s++){let a=o[s],c=t.element._zod.run({value:a,issues:[]},n);c instanceof Promise?i.push(c.then(u=>iv(u,r,s))):iv(c,r,s)}return i.length?Promise.all(i).then(()=>r):r}});Ks=k("$ZodObject",(e,t)=>{fe.init(e,t);let r=ai(()=>{let l=Object.keys(t.shape);for(let h of l)if(!(t.shape[h]instanceof fe))throw new Error(`Invalid element at key "${h}": expected a Zod schema`);let d=_l(t.shape);return{shape:t.shape,keys:l,keySet:new Set(l),numKeys:l.length,optionalKeys:new Set(d)}});ye(e._zod,"propValues",()=>{let l=t.shape,d={};for(let h in l){let f=l[h]._zod;if(f.values){d[h]??(d[h]=new Set);for(let m of f.values)d[h].add(m)}}return d});let n=l=>{let d=new Hs(["shape","payload","ctx"]),h=r.value,f=b=>{let T=Pn(b);return`shape[${T}]._zod.run({ value: input[${T}], issues: [] }, ctx)`};d.write("const input = payload.value;");let m=Object.create(null),y=0;for(let b of h.keys)m[b]=`key_${y++}`;d.write("const newResult = {}");for(let b of h.keys)if(h.optionalKeys.has(b)){let T=m[b];d.write(`const ${T} = ${f(b)};`);let S=Pn(b);d.write(`
|
|
5
|
+
if (${T}.issues.length) {
|
|
6
|
+
if (input[${S}] === undefined) {
|
|
7
|
+
if (${S} in input) {
|
|
8
|
+
newResult[${S}] = undefined;
|
|
9
|
+
}
|
|
10
|
+
} else {
|
|
11
|
+
payload.issues = payload.issues.concat(
|
|
12
|
+
${T}.issues.map((iss) => ({
|
|
13
|
+
...iss,
|
|
14
|
+
path: iss.path ? [${S}, ...iss.path] : [${S}],
|
|
15
|
+
}))
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
} else if (${T}.value === undefined) {
|
|
19
|
+
if (${S} in input) newResult[${S}] = undefined;
|
|
20
|
+
} else {
|
|
21
|
+
newResult[${S}] = ${T}.value;
|
|
22
|
+
}
|
|
23
|
+
`)}else{let T=m[b];d.write(`const ${T} = ${f(b)};`),d.write(`
|
|
24
|
+
if (${T}.issues.length) payload.issues = payload.issues.concat(${T}.issues.map(iss => ({
|
|
25
|
+
...iss,
|
|
26
|
+
path: iss.path ? [${Pn(b)}, ...iss.path] : [${Pn(b)}]
|
|
27
|
+
})));`),d.write(`newResult[${Pn(b)}] = ${T}.value`)}d.write("payload.value = newResult;"),d.write("return payload;");let _=d.compile();return(b,T)=>_(l,b,T)},o,i=lo,s=!Ms.jitless,c=s&&gl.value,u=t.catchall,p;e._zod.parse=(l,d)=>{p??(p=r.value);let h=l.value;if(!i(h))return l.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),l;let f=[];if(s&&c&&d?.async===!1&&d.jitless!==!0)o||(o=n(t.shape)),l=o(l,d);else{l.value={};let T=p.shape;for(let S of p.keys){let C=T[S],Q=C._zod.run({value:h[S],issues:[]},d),H=C._zod.optin==="optional"&&C._zod.optout==="optional";Q instanceof Promise?f.push(Q.then(pt=>H?sv(pt,l,S,h):Gs(pt,l,S))):H?sv(Q,l,S,h):Gs(Q,l,S)}}if(!u)return f.length?Promise.all(f).then(()=>l):l;let m=[],y=p.keySet,_=u._zod,b=_.def.type;for(let T of Object.keys(h)){if(y.has(T))continue;if(b==="never"){m.push(T);continue}let S=_.run({value:h[T],issues:[]},d);S instanceof Promise?f.push(S.then(C=>Gs(C,l,T))):Gs(S,l,T)}return m.length&&l.issues.push({code:"unrecognized_keys",keys:m,input:h,inst:e}),f.length?Promise.all(f).then(()=>l):l}});Js=k("$ZodUnion",(e,t)=>{fe.init(e,t),ye(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),ye(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),ye(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),ye(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){let r=t.options.map(n=>n._zod.pattern);return new RegExp(`^(${r.map(n=>ui(n.source)).join("|")})$`)}}),e._zod.parse=(r,n)=>{let o=!1,i=[];for(let s of t.options){let a=s._zod.run({value:r.value,issues:[]},n);if(a instanceof Promise)i.push(a),o=!0;else{if(a.issues.length===0)return a;i.push(a)}}return o?Promise.all(i).then(s=>av(s,r,e,n)):av(i,r,e,n)}}),up=k("$ZodDiscriminatedUnion",(e,t)=>{Js.init(e,t);let r=e._zod.parse;ye(e._zod,"propValues",()=>{let o={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[a,c]of Object.entries(s)){o[a]||(o[a]=new Set);for(let u of c)o[a].add(u)}}return o});let n=ai(()=>{let o=t.options,i=new Map;for(let s of o){let a=s._zod.propValues[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let c of a){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,s)}}return i});e._zod.parse=(o,i)=>{let s=o.value;if(!lo(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;let a=n.value.get(s?.[t.discriminator]);return a?a._zod.run(o,i):t.unionFallback?r(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:s,path:[t.discriminator],inst:e}),o)}}),lp=k("$ZodIntersection",(e,t)=>{fe.init(e,t),e._zod.parse=(r,n)=>{let o=r.value,i=t.left._zod.run({value:o,issues:[]},n),s=t.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,u])=>cv(r,c,u)):cv(r,i,s)}});pp=k("$ZodRecord",(e,t)=>{fe.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!po(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let i=[];if(t.keyType._zod.values){let s=t.keyType._zod.values;r.value={};for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let u=t.valueType._zod.run({value:o[c],issues:[]},n);u instanceof Promise?i.push(u.then(p=>{p.issues.length&&r.issues.push(...ar(c,p.issues)),r.value[c]=p.value})):(u.issues.length&&r.issues.push(...ar(c,u.issues)),r.value[c]=u.value)}let a;for(let c in o)s.has(c)||(a=a??[],a.push(c));a&&a.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:a})}else{r.value={};for(let s of Reflect.ownKeys(o)){if(s==="__proto__")continue;let a=t.keyType._zod.run({value:s,issues:[]},n);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){r.issues.push({origin:"record",code:"invalid_key",issues:a.issues.map(u=>Vt(u,n,$t())),input:s,path:[s],inst:e}),r.value[a.value]=a.value;continue}let c=t.valueType._zod.run({value:o[s],issues:[]},n);c instanceof Promise?i.push(c.then(u=>{u.issues.length&&r.issues.push(...ar(s,u.issues)),r.value[a.value]=u.value})):(c.issues.length&&r.issues.push(...ar(s,c.issues)),r.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>r):r}}),dp=k("$ZodEnum",(e,t)=>{fe.init(e,t);let r=si(t.entries);e._zod.values=new Set(r),e._zod.pattern=new RegExp(`^(${r.filter(n=>yl.has(typeof n)).map(n=>typeof n=="string"?Ur(n):n.toString()).join("|")})$`),e._zod.parse=(n,o)=>{let i=n.value;return e._zod.values.has(i)||n.issues.push({code:"invalid_value",values:r,input:i,inst:e}),n}}),fp=k("$ZodLiteral",(e,t)=>{fe.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?Ur(r):r?r.toString():String(r)).join("|")})$`),e._zod.parse=(r,n)=>{let o=r.value;return e._zod.values.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}}),hp=k("$ZodTransform",(e,t)=>{fe.init(e,t),e._zod.parse=(r,n)=>{let o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(r.value=s,r));if(o instanceof Promise)throw new wr;return r.value=o,r}}),mp=k("$ZodOptional",(e,t)=>{fe.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ye(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ye(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${ui(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>t.innerType._zod.optin==="optional"?t.innerType._zod.run(r,n):r.value===void 0?r:t.innerType._zod.run(r,n)}),gp=k("$ZodNullable",(e,t)=>{fe.init(e,t),ye(e._zod,"optin",()=>t.innerType._zod.optin),ye(e._zod,"optout",()=>t.innerType._zod.optout),ye(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${ui(r.source)}|null)$`):void 0}),ye(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),yp=k("$ZodDefault",(e,t)=>{fe.init(e,t),e._zod.optin="optional",ye(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(r.value===void 0)return r.value=t.defaultValue,r;let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>uv(i,t)):uv(o,t)}});_p=k("$ZodPrefault",(e,t)=>{fe.init(e,t),e._zod.optin="optional",ye(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>(r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),vp=k("$ZodNonOptional",(e,t)=>{fe.init(e,t),ye(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>lv(i,e)):lv(o,e)}});bp=k("$ZodCatch",(e,t)=>{fe.init(e,t),e._zod.optin="optional",ye(e._zod,"optout",()=>t.innerType._zod.optout),ye(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(s=>Vt(s,n,$t()))},input:r.value}),r.issues=[]),r)):(r.value=o.value,o.issues.length&&(r.value=t.catchValue({...r,error:{issues:o.issues.map(i=>Vt(i,n,$t()))},input:r.value}),r.issues=[]),r)}}),xp=k("$ZodPipe",(e,t)=>{fe.init(e,t),ye(e._zod,"values",()=>t.in._zod.values),ye(e._zod,"optin",()=>t.in._zod.optin),ye(e._zod,"optout",()=>t.out._zod.optout),e._zod.parse=(r,n)=>{let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>pv(i,t,n)):pv(o,t,n)}});kp=k("$ZodReadonly",(e,t)=>{fe.init(e,t),ye(e._zod,"propValues",()=>t.innerType._zod.propValues),ye(e._zod,"values",()=>t.innerType._zod.values),ye(e._zod,"optin",()=>t.innerType._zod.optin),ye(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(dv):dv(o)}});wp=k("$ZodCustom",(e,t)=>{qe.init(e,t),fe.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>fv(i,r,n,e));fv(o,r,n,e)}})});function bv(){return{localeError:pC()}}var lC,pC,xv=v(()=>{cr();lC=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},pC=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Invalid input: expected ${n.expected}, received ${lC(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${qs(n.values[0])}`:`Invalid option: expected one of ${Ls(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",i=t(n.origin);return i?`Too big: expected ${n.origin??"value"} to have ${o}${n.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",i=t(n.origin);return i?`Too small: expected ${n.origin} to have ${o}${n.minimum.toString()} ${i.unit}`:`Too small: expected ${n.origin} to be ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${Ls(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}}});var Ys=v(()=>{});function kv(){return new hi}var dC,fC,hi,Br,$p=v(()=>{dC=Symbol("ZodOutput"),fC=Symbol("ZodInput"),hi=class{constructor(){this._map=new Map,this._idmap=new Map}add(t,...r){let n=r[0];if(this._map.set(t,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,t)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};return delete n.id,{...n,...this._map.get(t)}}return this._map.get(t)}has(t){return this._map.has(t)}};Br=kv()});function Tp(e,t){return new e({type:"string",...q(t)})}function Pp(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...q(t)})}function Qs(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...q(t)})}function Cp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...q(t)})}function Ep(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...q(t)})}function Ip(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...q(t)})}function zp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...q(t)})}function Rp(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...q(t)})}function Ap(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...q(t)})}function Op(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...q(t)})}function Np(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...q(t)})}function jp(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...q(t)})}function Dp(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...q(t)})}function Mp(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...q(t)})}function Lp(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...q(t)})}function Zp(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...q(t)})}function qp(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...q(t)})}function Fp(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...q(t)})}function Up(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...q(t)})}function Bp(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...q(t)})}function Vp(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...q(t)})}function Hp(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...q(t)})}function Gp(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...q(t)})}function wv(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...q(t)})}function Sv(e,t){return new e({type:"string",format:"date",check:"string_format",...q(t)})}function $v(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...q(t)})}function Tv(e,t){return new e({type:"string",format:"duration",check:"string_format",...q(t)})}function Wp(e,t){return new e({type:"number",checks:[],...q(t)})}function Kp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...q(t)})}function Jp(e,t){return new e({type:"boolean",...q(t)})}function Yp(e,t){return new e({type:"null",...q(t)})}function Qp(e){return new e({type:"unknown"})}function Xp(e,t){return new e({type:"never",...q(t)})}function Xs(e,t){return new Al({check:"less_than",...q(t),value:e,inclusive:!1})}function mi(e,t){return new Al({check:"less_than",...q(t),value:e,inclusive:!0})}function ea(e,t){return new Ol({check:"greater_than",...q(t),value:e,inclusive:!1})}function gi(e,t){return new Ol({check:"greater_than",...q(t),value:e,inclusive:!0})}function ta(e,t){return new V_({check:"multiple_of",...q(t),value:e})}function ra(e,t){return new G_({check:"max_length",...q(t),maximum:e})}function fo(e,t){return new W_({check:"min_length",...q(t),minimum:e})}function na(e,t){return new K_({check:"length_equals",...q(t),length:e})}function ed(e,t){return new J_({check:"string_format",format:"regex",...q(t),pattern:e})}function td(e){return new Y_({check:"string_format",format:"lowercase",...q(e)})}function rd(e){return new Q_({check:"string_format",format:"uppercase",...q(e)})}function nd(e,t){return new X_({check:"string_format",format:"includes",...q(t),includes:e})}function od(e,t){return new ev({check:"string_format",format:"starts_with",...q(t),prefix:e})}function id(e,t){return new tv({check:"string_format",format:"ends_with",...q(t),suffix:e})}function zn(e){return new rv({check:"overwrite",tx:e})}function sd(e){return zn(t=>t.normalize(e))}function ad(){return zn(e=>e.trim())}function cd(){return zn(e=>e.toLowerCase())}function ud(){return zn(e=>e.toUpperCase())}function Pv(e,t,r){return new e({type:"array",element:t,...q(r)})}function ld(e,t,r){let n=q(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function pd(e,t,r){return new e({type:"custom",check:"custom",fn:t,...q(r)})}var Cv=v(()=>{Vs();cr()});var Ev=v(()=>{});function dd(e,t){if(e instanceof hi){let n=new oa(t),o={};for(let a of e._idmap.entries()){let[c,u]=a;n.process(u)}let i={},s={registry:e,uri:t?.uri,defs:o};for(let a of e._idmap.entries()){let[c,u]=a;i[c]=n.emit(u,{...t,external:s})}if(Object.keys(o).length>0){let a=n.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[a]:o}}return{schemas:i}}let r=new oa(t);return r.process(e),r.emit(e,t)}function Ne(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let o=e._zod.def;switch(o.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return Ne(o.element,r);case"object":{for(let i in o.shape)if(Ne(o.shape[i],r))return!0;return!1}case"union":{for(let i of o.options)if(Ne(i,r))return!0;return!1}case"intersection":return Ne(o.left,r)||Ne(o.right,r);case"tuple":{for(let i of o.items)if(Ne(i,r))return!0;return!!(o.rest&&Ne(o.rest,r))}case"record":return Ne(o.keyType,r)||Ne(o.valueType,r);case"map":return Ne(o.keyType,r)||Ne(o.valueType,r);case"set":return Ne(o.valueType,r);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Ne(o.innerType,r);case"lazy":return Ne(o.getter(),r);case"default":return Ne(o.innerType,r);case"prefault":return Ne(o.innerType,r);case"custom":return!1;case"transform":return!0;case"pipe":return Ne(o.in,r)||Ne(o.out,r);case"success":return!1;case"catch":return!1;default:}throw new Error(`Unknown schema type: ${o.type}`)}var oa,Iv=v(()=>{$p();cr();oa=class{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??Br,this.target=t?.target??"draft-2020-12",this.unrepresentable=t?.unrepresentable??"throw",this.override=t?.override??(()=>{}),this.io=t?.io??"output",this.seen=new Map}process(t,r={path:[],schemaPath:[]}){var n;let o=t._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(t);if(s)return s.count++,r.schemaPath.includes(t)&&(s.cycle=r.path),s.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};this.seen.set(t,a);let c=t._zod.toJSONSchema?.();if(c)a.schema=c;else{let l={...r,schemaPath:[...r.schemaPath,t],path:r.path},d=t._zod.parent;if(d)a.ref=d,this.process(d,l),this.seen.get(d).isParent=!0;else{let h=a.schema;switch(o.type){case"string":{let f=h;f.type="string";let{minimum:m,maximum:y,format:_,patterns:b,contentEncoding:T}=t._zod.bag;if(typeof m=="number"&&(f.minLength=m),typeof y=="number"&&(f.maxLength=y),_&&(f.format=i[_]??_,f.format===""&&delete f.format),T&&(f.contentEncoding=T),b&&b.size>0){let S=[...b];S.length===1?f.pattern=S[0].source:S.length>1&&(a.schema.allOf=[...S.map(C=>({...this.target==="draft-7"?{type:"string"}:{},pattern:C.source}))])}break}case"number":{let f=h,{minimum:m,maximum:y,format:_,multipleOf:b,exclusiveMaximum:T,exclusiveMinimum:S}=t._zod.bag;typeof _=="string"&&_.includes("int")?f.type="integer":f.type="number",typeof S=="number"&&(f.exclusiveMinimum=S),typeof m=="number"&&(f.minimum=m,typeof S=="number"&&(S>=m?delete f.minimum:delete f.exclusiveMinimum)),typeof T=="number"&&(f.exclusiveMaximum=T),typeof y=="number"&&(f.maximum=y,typeof T=="number"&&(T<=y?delete f.maximum:delete f.exclusiveMaximum)),typeof b=="number"&&(f.multipleOf=b);break}case"boolean":{let f=h;f.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{h.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{h.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let f=h,{minimum:m,maximum:y}=t._zod.bag;typeof m=="number"&&(f.minItems=m),typeof y=="number"&&(f.maxItems=y),f.type="array",f.items=this.process(o.element,{...l,path:[...l.path,"items"]});break}case"object":{let f=h;f.type="object",f.properties={};let m=o.shape;for(let b in m)f.properties[b]=this.process(m[b],{...l,path:[...l.path,"properties",b]});let y=new Set(Object.keys(m)),_=new Set([...y].filter(b=>{let T=o.shape[b]._zod;return this.io==="input"?T.optin===void 0:T.optout===void 0}));_.size>0&&(f.required=Array.from(_)),o.catchall?._zod.def.type==="never"?f.additionalProperties=!1:o.catchall?o.catchall&&(f.additionalProperties=this.process(o.catchall,{...l,path:[...l.path,"additionalProperties"]})):this.io==="output"&&(f.additionalProperties=!1);break}case"union":{let f=h;f.anyOf=o.options.map((m,y)=>this.process(m,{...l,path:[...l.path,"anyOf",y]}));break}case"intersection":{let f=h,m=this.process(o.left,{...l,path:[...l.path,"allOf",0]}),y=this.process(o.right,{...l,path:[...l.path,"allOf",1]}),_=T=>"allOf"in T&&Object.keys(T).length===1,b=[..._(m)?m.allOf:[m],..._(y)?y.allOf:[y]];f.allOf=b;break}case"tuple":{let f=h;f.type="array";let m=o.items.map((b,T)=>this.process(b,{...l,path:[...l.path,"prefixItems",T]}));if(this.target==="draft-2020-12"?f.prefixItems=m:f.items=m,o.rest){let b=this.process(o.rest,{...l,path:[...l.path,"items"]});this.target==="draft-2020-12"?f.items=b:f.additionalItems=b}o.rest&&(f.items=this.process(o.rest,{...l,path:[...l.path,"items"]}));let{minimum:y,maximum:_}=t._zod.bag;typeof y=="number"&&(f.minItems=y),typeof _=="number"&&(f.maxItems=_);break}case"record":{let f=h;f.type="object",f.propertyNames=this.process(o.keyType,{...l,path:[...l.path,"propertyNames"]}),f.additionalProperties=this.process(o.valueType,{...l,path:[...l.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{let f=h,m=si(o.entries);m.every(y=>typeof y=="number")&&(f.type="number"),m.every(y=>typeof y=="string")&&(f.type="string"),f.enum=m;break}case"literal":{let f=h,m=[];for(let y of o.values)if(y===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof y=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");m.push(Number(y))}else m.push(y);if(m.length!==0)if(m.length===1){let y=m[0];f.type=y===null?"null":typeof y,f.const=y}else m.every(y=>typeof y=="number")&&(f.type="number"),m.every(y=>typeof y=="string")&&(f.type="string"),m.every(y=>typeof y=="boolean")&&(f.type="string"),m.every(y=>y===null)&&(f.type="null"),f.enum=m;break}case"file":{let f=h,m={type:"string",format:"binary",contentEncoding:"binary"},{minimum:y,maximum:_,mime:b}=t._zod.bag;y!==void 0&&(m.minLength=y),_!==void 0&&(m.maxLength=_),b?b.length===1?(m.contentMediaType=b[0],Object.assign(f,m)):f.anyOf=b.map(T=>({...m,contentMediaType:T})):Object.assign(f,m);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let f=this.process(o.innerType,l);h.anyOf=[f,{type:"null"}];break}case"nonoptional":{this.process(o.innerType,l),a.ref=o.innerType;break}case"success":{let f=h;f.type="boolean";break}case"default":{this.process(o.innerType,l),a.ref=o.innerType,h.default=JSON.parse(JSON.stringify(o.defaultValue));break}case"prefault":{this.process(o.innerType,l),a.ref=o.innerType,this.io==="input"&&(h._prefault=JSON.parse(JSON.stringify(o.defaultValue)));break}case"catch":{this.process(o.innerType,l),a.ref=o.innerType;let f;try{f=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}h.default=f;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let f=h,m=t._zod.pattern;if(!m)throw new Error("Pattern not found in template literal");f.type="string",f.pattern=m.source;break}case"pipe":{let f=this.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;this.process(f,l),a.ref=f;break}case"readonly":{this.process(o.innerType,l),a.ref=o.innerType,h.readOnly=!0;break}case"promise":{this.process(o.innerType,l),a.ref=o.innerType;break}case"optional":{this.process(o.innerType,l),a.ref=o.innerType;break}case"lazy":{let f=t._zod.innerType;this.process(f,l),a.ref=f;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}default:}}}let u=this.metadataRegistry.get(t);return u&&Object.assign(a.schema,u),this.io==="input"&&Ne(t)&&(delete a.schema.examples,delete a.schema.default),this.io==="input"&&a.schema._prefault&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,this.seen.get(t).schema}emit(t,r){let n={cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0},o=this.seen.get(t);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=p=>{let l=this.target==="draft-2020-12"?"$defs":"definitions";if(n.external){let m=n.external.registry.get(p[0])?.id,y=n.external.uri??(b=>b);if(m)return{ref:y(m)};let _=p[1].defId??p[1].schema.id??`schema${this.counter++}`;return p[1].defId=_,{defId:_,ref:`${y("__shared")}#/${l}/${_}`}}if(p[1]===o)return{ref:"#"};let h=`#/${l}/`,f=p[1].schema.id??`__schema${this.counter++}`;return{defId:f,ref:h+f}},s=p=>{if(p[1].schema.$ref)return;let l=p[1],{ref:d,defId:h}=i(p);l.def={...l.schema},h&&(l.defId=h);let f=l.schema;for(let m in f)delete f[m];f.$ref=d};if(n.cycles==="throw")for(let p of this.seen.entries()){let l=p[1];if(l.cycle)throw new Error(`Cycle detected: #/${l.cycle?.join("/")}/<root>
|
|
28
|
+
|
|
29
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let p of this.seen.entries()){let l=p[1];if(t===p[0]){s(p);continue}if(n.external){let h=n.external.registry.get(p[0])?.id;if(t!==p[0]&&h){s(p);continue}}if(this.metadataRegistry.get(p[0])?.id){s(p);continue}if(l.cycle){s(p);continue}if(l.count>1&&n.reused==="ref"){s(p);continue}}let a=(p,l)=>{let d=this.seen.get(p),h=d.def??d.schema,f={...h};if(d.ref===null)return;let m=d.ref;if(d.ref=null,m){a(m,l);let y=this.seen.get(m).schema;y.$ref&&l.target==="draft-7"?(h.allOf=h.allOf??[],h.allOf.push(y)):(Object.assign(h,y),Object.assign(h,f))}d.isParent||this.override({zodSchema:p,jsonSchema:h,path:d.path??[]})};for(let p of[...this.seen.entries()].reverse())a(p[0],{target:this.target});let c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),n.external?.uri){let p=n.external.registry.get(t)?.id;if(!p)throw new Error("Schema is missing an `id` property");c.$id=n.external.uri(p)}Object.assign(c,o.def);let u=n.external?.defs??{};for(let p of this.seen.entries()){let l=p[1];l.def&&l.defId&&(u[l.defId]=l.def)}n.external||Object.keys(u).length>0&&(this.target==="draft-2020-12"?c.$defs=u:c.definitions=u);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}}});var zv=v(()=>{});var rt=v(()=>{uo();Il();wl();vv();Vs();jl();cr();Bs();Ys();$p();Nl();Ev();Cv();Iv();zv()});var fd=v(()=>{rt()});function hd(e,t){let r={type:"object",get shape(){return re.assignProp(this,"shape",{...e}),this.shape},...re.normalizeParams(t)};return new KC(r)}var WC,KC,Rv=v(()=>{rt();rt();fd();WC=k("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");fe.init(e,t),e.def=t,e.parse=(r,n)=>$l(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>En(e,r,n),e.parseAsync=async(r,n)=>Pl(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>In(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),e.clone=(r,n)=>Tt(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e))}),KC=k("ZodMiniObject",(e,t)=>{Ks.init(e,t),WC.init(e,t),re.defineLazy(e,"shape",()=>t.shape)})});var Av=v(()=>{});var Ov=v(()=>{});var Nv=v(()=>{});var jv=v(()=>{rt();fd();Rv();Av();rt();Ys();Ov();Nv()});var Dv=v(()=>{jv()});var md=v(()=>{Dv()});function At(e){return!!e._zod}function An(e){let t=Object.values(e);if(t.length===0)return hd({});let r=t.every(At),n=t.every(o=>!At(o));if(r)return hd(e);if(n)return ll(e);throw new Error("Mixed Zod versions detected in object shape.")}function Vr(e,t){return At(e)?En(e,t):e.safeParse(t)}async function ia(e,t){return At(e)?await In(e,t):await e.safeParseAsync(t)}function Hr(e){if(!e)return;let t;if(At(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function ho(e){if(e){if(typeof e=="object"){let t=e,r=e;if(!t._def&&!r._zod){let n=Object.values(e);if(n.length>0&&n.every(o=>typeof o=="object"&&o!==null&&(o._def!==void 0||o._zod!==void 0||typeof o.parse=="function")))return An(e)}}if(At(e)){let r=e._zod?.def;if(r&&(r.type==="object"||r.shape!==void 0))return e}else if(e.shape!==void 0)return e}}function sa(e){if(e&&typeof e=="object"){if("message"in e&&typeof e.message=="string")return e.message;if("issues"in e&&Array.isArray(e.issues)&&e.issues.length>0){let t=e.issues[0];if(t&&typeof t=="object"&&"message"in t)return String(t.message)}try{return JSON.stringify(e)}catch{return String(e)}}return String(e)}function Lv(e){return e.description}function Zv(e){if(At(e))return e._zod?.def?.type==="optional";let t=e;return typeof e.isOptional=="function"?e.isOptional():t._def?.typeName==="ZodOptional"}function aa(e){if(At(e)){let i=e._zod?.def;if(i){if(i.value!==void 0)return i.value;if(Array.isArray(i.values)&&i.values.length>0)return i.values[0]}}let r=e._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}let n=e.value;if(n!==void 0)return n}var yi=v(()=>{oi();md()});var gd=v(()=>{rt()});var _i={};Mr(_i,{ZodISODate:()=>Fv,ZodISODateTime:()=>qv,ZodISODuration:()=>Bv,ZodISOTime:()=>Uv,date:()=>_d,datetime:()=>yd,duration:()=>bd,time:()=>vd});function yd(e){return wv(qv,e)}function _d(e){return Sv(Fv,e)}function vd(e){return $v(Uv,e)}function bd(e){return Tv(Bv,e)}var qv,Fv,Uv,Bv,xd=v(()=>{rt();kd();qv=k("ZodISODateTime",(e,t)=>{hv.init(e,t),we.init(e,t)});Fv=k("ZodISODate",(e,t)=>{mv.init(e,t),we.init(e,t)});Uv=k("ZodISOTime",(e,t)=>{gv.init(e,t),we.init(e,t)});Bv=k("ZodISODuration",(e,t)=>{yv.init(e,t),we.init(e,t)})});var Vv,Z6,vi,wd=v(()=>{rt();rt();Vv=(e,t)=>{Fs.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>kl(e,r)},flatten:{value:r=>xl(e,r)},addIssue:{value:r=>e.issues.push(r)},addIssues:{value:r=>e.issues.push(...r)},isEmpty:{get(){return e.issues.length===0}}})},Z6=k("ZodError",Vv),vi=k("ZodError",Vv,{Parent:Error})});var Hv,Gv,Wv,Kv,Sd=v(()=>{rt();wd();Hv=Sl(vi),Gv=Tl(vi),Wv=Cl(vi),Kv=El(vi)});function x(e){return Tp(iE,e)}function pe(e){return Wp(eb,e)}function Yv(e){return Kp(wE,e)}function De(e){return Jp(SE,e)}function Pd(e){return Yp($E,e)}function Se(){return Qp(TE)}function CE(e){return Xp(PE,e)}function ne(e,t){return Pv(EE,e,t)}function z(e,t){let r={type:"object",get shape(){return re.assignProp(this,"shape",{...e}),this.shape},...re.normalizeParams(t)};return new tb(r)}function nt(e,t){return new tb({type:"object",get shape(){return re.assignProp(this,"shape",{...e}),this.shape},catchall:Se(),...re.normalizeParams(t)})}function ve(e,t){return new rb({type:"union",options:e,...re.normalizeParams(t)})}function Cd(e,t,r){return new IE({type:"union",options:t,discriminator:e,...re.normalizeParams(r)})}function ua(e,t){return new zE({type:"intersection",left:e,right:t})}function $e(e,t,r){return new RE({type:"record",keyType:e,valueType:t,...re.normalizeParams(r)})}function mt(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new $d({type:"enum",entries:r,...re.normalizeParams(t)})}function N(e,t){return new AE({type:"literal",values:Array.isArray(e)?e:[e],...re.normalizeParams(t)})}function nb(e){return new OE({type:"transform",transform:e})}function Pe(e){return new ob({type:"optional",innerType:e})}function Qv(e){return new NE({type:"nullable",innerType:e})}function DE(e,t){return new jE({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}function LE(e,t){return new ME({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():t}})}function ZE(e,t){return new ib({type:"nonoptional",innerType:e,...re.normalizeParams(t)})}function FE(e,t){return new qE({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function Td(e,t){return new UE({type:"pipe",in:e,out:t})}function VE(e){return new BE({type:"readonly",innerType:e})}function HE(e){let t=new qe({check:"custom"});return t._zod.check=e,t}function ab(e,t){return ld(sb,e??(()=>!0),t)}function GE(e,t={}){return pd(sb,e,t)}function WE(e){let t=HE(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(re.issue(n,r.value,t._zod.def));else{let o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),r.issues.push(re.issue(o))}},e(r.value,r)));return t}function Ed(e,t){return Td(nb(e),t)}var Ce,Xv,iE,we,sE,Jv,ca,aE,cE,uE,lE,pE,dE,fE,hE,mE,gE,yE,_E,vE,bE,xE,kE,eb,wE,SE,$E,TE,PE,EE,tb,rb,IE,zE,RE,$d,AE,OE,ob,NE,jE,ME,ib,qE,UE,BE,sb,kd=v(()=>{rt();rt();gd();xd();Sd();Ce=k("ZodType",(e,t)=>(fe.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),e.clone=(r,n)=>Tt(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.parse=(r,n)=>Hv(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Wv(e,r,n),e.parseAsync=async(r,n)=>Gv(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Kv(e,r,n),e.spa=e.safeParseAsync,e.refine=(r,n)=>e.check(GE(r,n)),e.superRefine=r=>e.check(WE(r)),e.overwrite=r=>e.check(zn(r)),e.optional=()=>Pe(e),e.nullable=()=>Qv(e),e.nullish=()=>Pe(Qv(e)),e.nonoptional=r=>ZE(e,r),e.array=()=>ne(e),e.or=r=>ve([e,r]),e.and=r=>ua(e,r),e.transform=r=>Td(e,nb(r)),e.default=r=>DE(e,r),e.prefault=r=>LE(e,r),e.catch=r=>FE(e,r),e.pipe=r=>Td(e,r),e.readonly=()=>VE(e),e.describe=r=>{let n=e.clone();return Br.add(n,{description:r}),n},Object.defineProperty(e,"description",{get(){return Br.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return Br.get(e);let n=e.clone();return Br.add(n,r[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Xv=k("_ZodString",(e,t)=>{fi.init(e,t),Ce.init(e,t);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...n)=>e.check(ed(...n)),e.includes=(...n)=>e.check(nd(...n)),e.startsWith=(...n)=>e.check(od(...n)),e.endsWith=(...n)=>e.check(id(...n)),e.min=(...n)=>e.check(fo(...n)),e.max=(...n)=>e.check(ra(...n)),e.length=(...n)=>e.check(na(...n)),e.nonempty=(...n)=>e.check(fo(1,...n)),e.lowercase=n=>e.check(td(n)),e.uppercase=n=>e.check(rd(n)),e.trim=()=>e.check(ad()),e.normalize=(...n)=>e.check(sd(...n)),e.toLowerCase=()=>e.check(cd()),e.toUpperCase=()=>e.check(ud())}),iE=k("ZodString",(e,t)=>{fi.init(e,t),Xv.init(e,t),e.email=r=>e.check(Pp(sE,r)),e.url=r=>e.check(Rp(aE,r)),e.jwt=r=>e.check(Gp(kE,r)),e.emoji=r=>e.check(Ap(cE,r)),e.guid=r=>e.check(Qs(Jv,r)),e.uuid=r=>e.check(Cp(ca,r)),e.uuidv4=r=>e.check(Ep(ca,r)),e.uuidv6=r=>e.check(Ip(ca,r)),e.uuidv7=r=>e.check(zp(ca,r)),e.nanoid=r=>e.check(Op(uE,r)),e.guid=r=>e.check(Qs(Jv,r)),e.cuid=r=>e.check(Np(lE,r)),e.cuid2=r=>e.check(jp(pE,r)),e.ulid=r=>e.check(Dp(dE,r)),e.base64=r=>e.check(Bp(vE,r)),e.base64url=r=>e.check(Vp(bE,r)),e.xid=r=>e.check(Mp(fE,r)),e.ksuid=r=>e.check(Lp(hE,r)),e.ipv4=r=>e.check(Zp(mE,r)),e.ipv6=r=>e.check(qp(gE,r)),e.cidrv4=r=>e.check(Fp(yE,r)),e.cidrv6=r=>e.check(Up(_E,r)),e.e164=r=>e.check(Hp(xE,r)),e.datetime=r=>e.check(yd(r)),e.date=r=>e.check(_d(r)),e.time=r=>e.check(vd(r)),e.duration=r=>e.check(bd(r))});we=k("ZodStringFormat",(e,t)=>{_e.init(e,t),Xv.init(e,t)}),sE=k("ZodEmail",(e,t)=>{Zl.init(e,t),we.init(e,t)}),Jv=k("ZodGUID",(e,t)=>{Ml.init(e,t),we.init(e,t)}),ca=k("ZodUUID",(e,t)=>{Ll.init(e,t),we.init(e,t)}),aE=k("ZodURL",(e,t)=>{ql.init(e,t),we.init(e,t)}),cE=k("ZodEmoji",(e,t)=>{Fl.init(e,t),we.init(e,t)}),uE=k("ZodNanoID",(e,t)=>{Ul.init(e,t),we.init(e,t)}),lE=k("ZodCUID",(e,t)=>{Bl.init(e,t),we.init(e,t)}),pE=k("ZodCUID2",(e,t)=>{Vl.init(e,t),we.init(e,t)}),dE=k("ZodULID",(e,t)=>{Hl.init(e,t),we.init(e,t)}),fE=k("ZodXID",(e,t)=>{Gl.init(e,t),we.init(e,t)}),hE=k("ZodKSUID",(e,t)=>{Wl.init(e,t),we.init(e,t)}),mE=k("ZodIPv4",(e,t)=>{Kl.init(e,t),we.init(e,t)}),gE=k("ZodIPv6",(e,t)=>{Jl.init(e,t),we.init(e,t)}),yE=k("ZodCIDRv4",(e,t)=>{Yl.init(e,t),we.init(e,t)}),_E=k("ZodCIDRv6",(e,t)=>{Ql.init(e,t),we.init(e,t)}),vE=k("ZodBase64",(e,t)=>{Xl.init(e,t),we.init(e,t)}),bE=k("ZodBase64URL",(e,t)=>{ep.init(e,t),we.init(e,t)}),xE=k("ZodE164",(e,t)=>{tp.init(e,t),we.init(e,t)}),kE=k("ZodJWT",(e,t)=>{rp.init(e,t),we.init(e,t)}),eb=k("ZodNumber",(e,t)=>{Ws.init(e,t),Ce.init(e,t),e.gt=(n,o)=>e.check(ea(n,o)),e.gte=(n,o)=>e.check(gi(n,o)),e.min=(n,o)=>e.check(gi(n,o)),e.lt=(n,o)=>e.check(Xs(n,o)),e.lte=(n,o)=>e.check(mi(n,o)),e.max=(n,o)=>e.check(mi(n,o)),e.int=n=>e.check(Yv(n)),e.safe=n=>e.check(Yv(n)),e.positive=n=>e.check(ea(0,n)),e.nonnegative=n=>e.check(gi(0,n)),e.negative=n=>e.check(Xs(0,n)),e.nonpositive=n=>e.check(mi(0,n)),e.multipleOf=(n,o)=>e.check(ta(n,o)),e.step=(n,o)=>e.check(ta(n,o)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});wE=k("ZodNumberFormat",(e,t)=>{np.init(e,t),eb.init(e,t)});SE=k("ZodBoolean",(e,t)=>{op.init(e,t),Ce.init(e,t)});$E=k("ZodNull",(e,t)=>{ip.init(e,t),Ce.init(e,t)});TE=k("ZodUnknown",(e,t)=>{sp.init(e,t),Ce.init(e,t)});PE=k("ZodNever",(e,t)=>{ap.init(e,t),Ce.init(e,t)});EE=k("ZodArray",(e,t)=>{cp.init(e,t),Ce.init(e,t),e.element=t.element,e.min=(r,n)=>e.check(fo(r,n)),e.nonempty=r=>e.check(fo(1,r)),e.max=(r,n)=>e.check(ra(r,n)),e.length=(r,n)=>e.check(na(r,n)),e.unwrap=()=>e.element});tb=k("ZodObject",(e,t)=>{Ks.init(e,t),Ce.init(e,t),re.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>mt(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Se()}),e.loose=()=>e.clone({...e._zod.def,catchall:Se()}),e.strict=()=>e.clone({...e._zod.def,catchall:CE()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>re.extend(e,r),e.merge=r=>re.merge(e,r),e.pick=r=>re.pick(e,r),e.omit=r=>re.omit(e,r),e.partial=(...r)=>re.partial(ob,e,r[0]),e.required=(...r)=>re.required(ib,e,r[0])});rb=k("ZodUnion",(e,t)=>{Js.init(e,t),Ce.init(e,t),e.options=t.options});IE=k("ZodDiscriminatedUnion",(e,t)=>{rb.init(e,t),up.init(e,t)});zE=k("ZodIntersection",(e,t)=>{lp.init(e,t),Ce.init(e,t)});RE=k("ZodRecord",(e,t)=>{pp.init(e,t),Ce.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});$d=k("ZodEnum",(e,t)=>{dp.init(e,t),Ce.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{let i={};for(let s of n)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new $d({...t,checks:[],...re.normalizeParams(o),entries:i})},e.exclude=(n,o)=>{let i={...t.entries};for(let s of n)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new $d({...t,checks:[],...re.normalizeParams(o),entries:i})}});AE=k("ZodLiteral",(e,t)=>{fp.init(e,t),Ce.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});OE=k("ZodTransform",(e,t)=>{hp.init(e,t),Ce.init(e,t),e._zod.parse=(r,n)=>{r.addIssue=i=>{if(typeof i=="string")r.issues.push(re.issue(i,r.value,t));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),s.continue??(s.continue=!0),r.issues.push(re.issue(s))}};let o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});ob=k("ZodOptional",(e,t)=>{mp.init(e,t),Ce.init(e,t),e.unwrap=()=>e._zod.def.innerType});NE=k("ZodNullable",(e,t)=>{gp.init(e,t),Ce.init(e,t),e.unwrap=()=>e._zod.def.innerType});jE=k("ZodDefault",(e,t)=>{yp.init(e,t),Ce.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});ME=k("ZodPrefault",(e,t)=>{_p.init(e,t),Ce.init(e,t),e.unwrap=()=>e._zod.def.innerType});ib=k("ZodNonOptional",(e,t)=>{vp.init(e,t),Ce.init(e,t),e.unwrap=()=>e._zod.def.innerType});qE=k("ZodCatch",(e,t)=>{bp.init(e,t),Ce.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});UE=k("ZodPipe",(e,t)=>{xp.init(e,t),Ce.init(e,t),e.in=t.in,e.out=t.out});BE=k("ZodReadonly",(e,t)=>{kp.init(e,t),Ce.init(e,t)});sb=k("ZodCustom",(e,t)=>{wp.init(e,t),Ce.init(e,t)})});var cb=v(()=>{});var ub=v(()=>{});var lb=v(()=>{rt();kd();gd();wd();Sd();cb();rt();xv();Ys();xd();ub();$t(bv())});var pb=v(()=>{lb()});var db=v(()=>{pb()});function Eb(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function Ib(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}var zd,fb,Gr,pa,Fe,hb,mb,r8,YE,QE,Rd,Pt,bi,gb,Ue,Ot,Nt,Be,da,yb,Ad,_b,vb,Od,xi,L,Nd,bb,xb,n8,fa,XE,ha,eI,ki,mo,kb,tI,rI,nI,oI,iI,sI,jd,aI,cI,Dd,ma,uI,lI,ga,pI,wi,Si,dI,$i,go,fI,Ti,ya,_a,va,o8,ba,xa,ka,wb,Sb,$b,Md,Tb,Pi,yo,Pb,hI,wa,mI,Sa,gI,Ld,yI,$a,_I,vI,bI,xI,kI,wI,SI,$I,TI,PI,Ta,CI,EI,Pa,Zd,qd,Fd,II,zI,RI,Ud,AI,OI,NI,jI,DI,Cb,Ca,MI,Ea,i8,LI,_o,ZI,s8,Ci,qI,Bd,FI,UI,BI,VI,HI,GI,WI,la,KI,JI,YI,Vd,Hd,QI,XI,ez,tz,rz,nz,oz,iz,sz,az,cz,uz,lz,pz,dz,fz,hz,mz,Ia,gz,yz,_z,za,vz,bz,xz,Gd,kz,a8,c8,u8,l8,p8,d8,O,Id,Ei=v(()=>{db();zd="2025-11-25",fb=[zd,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Gr="io.modelcontextprotocol/related-task",pa="2.0",Fe=ab(e=>e!==null&&(typeof e=="object"||typeof e=="function")),hb=ve([x(),pe().int()]),mb=x(),r8=nt({ttl:ve([pe(),Pd()]).optional(),pollInterval:pe().optional()}),YE=z({ttl:pe().optional()}),QE=z({taskId:x()}),Rd=nt({progressToken:hb.optional(),[Gr]:QE.optional()}),Pt=z({_meta:Rd.optional()}),bi=Pt.extend({task:YE.optional()}),gb=e=>bi.safeParse(e).success,Ue=z({method:x(),params:Pt.loose().optional()}),Ot=z({_meta:Rd.optional()}),Nt=z({method:x(),params:Ot.loose().optional()}),Be=nt({_meta:Rd.optional()}),da=ve([x(),pe().int()]),yb=z({jsonrpc:N(pa),id:da,...Ue.shape}).strict(),Ad=e=>yb.safeParse(e).success,_b=z({jsonrpc:N(pa),...Nt.shape}).strict(),vb=e=>_b.safeParse(e).success,Od=z({jsonrpc:N(pa),id:da,result:Be}).strict(),xi=e=>Od.safeParse(e).success;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(L||(L={}));Nd=z({jsonrpc:N(pa),id:da.optional(),error:z({code:pe().int(),message:x(),data:Se().optional()})}).strict(),bb=e=>Nd.safeParse(e).success,xb=ve([yb,_b,Od,Nd]),n8=ve([Od,Nd]),fa=Be.strict(),XE=Ot.extend({requestId:da.optional(),reason:x().optional()}),ha=Nt.extend({method:N("notifications/cancelled"),params:XE}),eI=z({src:x(),mimeType:x().optional(),sizes:ne(x()).optional(),theme:mt(["light","dark"]).optional()}),ki=z({icons:ne(eI).optional()}),mo=z({name:x(),title:x().optional()}),kb=mo.extend({...mo.shape,...ki.shape,version:x(),websiteUrl:x().optional(),description:x().optional()}),tI=ua(z({applyDefaults:De().optional()}),$e(x(),Se())),rI=Ed(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,ua(z({form:tI.optional(),url:Fe.optional()}),$e(x(),Se()).optional())),nI=nt({list:Fe.optional(),cancel:Fe.optional(),requests:nt({sampling:nt({createMessage:Fe.optional()}).optional(),elicitation:nt({create:Fe.optional()}).optional()}).optional()}),oI=nt({list:Fe.optional(),cancel:Fe.optional(),requests:nt({tools:nt({call:Fe.optional()}).optional()}).optional()}),iI=z({experimental:$e(x(),Fe).optional(),sampling:z({context:Fe.optional(),tools:Fe.optional()}).optional(),elicitation:rI.optional(),roots:z({listChanged:De().optional()}).optional(),tasks:nI.optional()}),sI=Pt.extend({protocolVersion:x(),capabilities:iI,clientInfo:kb}),jd=Ue.extend({method:N("initialize"),params:sI}),aI=z({experimental:$e(x(),Fe).optional(),logging:Fe.optional(),completions:Fe.optional(),prompts:z({listChanged:De().optional()}).optional(),resources:z({subscribe:De().optional(),listChanged:De().optional()}).optional(),tools:z({listChanged:De().optional()}).optional(),tasks:oI.optional()}),cI=Be.extend({protocolVersion:x(),capabilities:aI,serverInfo:kb,instructions:x().optional()}),Dd=Nt.extend({method:N("notifications/initialized"),params:Ot.optional()}),ma=Ue.extend({method:N("ping"),params:Pt.optional()}),uI=z({progress:pe(),total:Pe(pe()),message:Pe(x())}),lI=z({...Ot.shape,...uI.shape,progressToken:hb}),ga=Nt.extend({method:N("notifications/progress"),params:lI}),pI=Pt.extend({cursor:mb.optional()}),wi=Ue.extend({params:pI.optional()}),Si=Be.extend({nextCursor:mb.optional()}),dI=mt(["working","input_required","completed","failed","cancelled"]),$i=z({taskId:x(),status:dI,ttl:ve([pe(),Pd()]),createdAt:x(),lastUpdatedAt:x(),pollInterval:Pe(pe()),statusMessage:Pe(x())}),go=Be.extend({task:$i}),fI=Ot.merge($i),Ti=Nt.extend({method:N("notifications/tasks/status"),params:fI}),ya=Ue.extend({method:N("tasks/get"),params:Pt.extend({taskId:x()})}),_a=Be.merge($i),va=Ue.extend({method:N("tasks/result"),params:Pt.extend({taskId:x()})}),o8=Be.loose(),ba=wi.extend({method:N("tasks/list")}),xa=Si.extend({tasks:ne($i)}),ka=Ue.extend({method:N("tasks/cancel"),params:Pt.extend({taskId:x()})}),wb=Be.merge($i),Sb=z({uri:x(),mimeType:Pe(x()),_meta:$e(x(),Se()).optional()}),$b=Sb.extend({text:x()}),Md=x().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Tb=Sb.extend({blob:Md}),Pi=mt(["user","assistant"]),yo=z({audience:ne(Pi).optional(),priority:pe().min(0).max(1).optional(),lastModified:_i.datetime({offset:!0}).optional()}),Pb=z({...mo.shape,...ki.shape,uri:x(),description:Pe(x()),mimeType:Pe(x()),annotations:yo.optional(),_meta:Pe(nt({}))}),hI=z({...mo.shape,...ki.shape,uriTemplate:x(),description:Pe(x()),mimeType:Pe(x()),annotations:yo.optional(),_meta:Pe(nt({}))}),wa=wi.extend({method:N("resources/list")}),mI=Si.extend({resources:ne(Pb)}),Sa=wi.extend({method:N("resources/templates/list")}),gI=Si.extend({resourceTemplates:ne(hI)}),Ld=Pt.extend({uri:x()}),yI=Ld,$a=Ue.extend({method:N("resources/read"),params:yI}),_I=Be.extend({contents:ne(ve([$b,Tb]))}),vI=Nt.extend({method:N("notifications/resources/list_changed"),params:Ot.optional()}),bI=Ld,xI=Ue.extend({method:N("resources/subscribe"),params:bI}),kI=Ld,wI=Ue.extend({method:N("resources/unsubscribe"),params:kI}),SI=Ot.extend({uri:x()}),$I=Nt.extend({method:N("notifications/resources/updated"),params:SI}),TI=z({name:x(),description:Pe(x()),required:Pe(De())}),PI=z({...mo.shape,...ki.shape,description:Pe(x()),arguments:Pe(ne(TI)),_meta:Pe(nt({}))}),Ta=wi.extend({method:N("prompts/list")}),CI=Si.extend({prompts:ne(PI)}),EI=Pt.extend({name:x(),arguments:$e(x(),x()).optional()}),Pa=Ue.extend({method:N("prompts/get"),params:EI}),Zd=z({type:N("text"),text:x(),annotations:yo.optional(),_meta:$e(x(),Se()).optional()}),qd=z({type:N("image"),data:Md,mimeType:x(),annotations:yo.optional(),_meta:$e(x(),Se()).optional()}),Fd=z({type:N("audio"),data:Md,mimeType:x(),annotations:yo.optional(),_meta:$e(x(),Se()).optional()}),II=z({type:N("tool_use"),name:x(),id:x(),input:$e(x(),Se()),_meta:$e(x(),Se()).optional()}),zI=z({type:N("resource"),resource:ve([$b,Tb]),annotations:yo.optional(),_meta:$e(x(),Se()).optional()}),RI=Pb.extend({type:N("resource_link")}),Ud=ve([Zd,qd,Fd,RI,zI]),AI=z({role:Pi,content:Ud}),OI=Be.extend({description:x().optional(),messages:ne(AI)}),NI=Nt.extend({method:N("notifications/prompts/list_changed"),params:Ot.optional()}),jI=z({title:x().optional(),readOnlyHint:De().optional(),destructiveHint:De().optional(),idempotentHint:De().optional(),openWorldHint:De().optional()}),DI=z({taskSupport:mt(["required","optional","forbidden"]).optional()}),Cb=z({...mo.shape,...ki.shape,description:x().optional(),inputSchema:z({type:N("object"),properties:$e(x(),Fe).optional(),required:ne(x()).optional()}).catchall(Se()),outputSchema:z({type:N("object"),properties:$e(x(),Fe).optional(),required:ne(x()).optional()}).catchall(Se()).optional(),annotations:jI.optional(),execution:DI.optional(),_meta:$e(x(),Se()).optional()}),Ca=wi.extend({method:N("tools/list")}),MI=Si.extend({tools:ne(Cb)}),Ea=Be.extend({content:ne(Ud).default([]),structuredContent:$e(x(),Se()).optional(),isError:De().optional()}),i8=Ea.or(Be.extend({toolResult:Se()})),LI=bi.extend({name:x(),arguments:$e(x(),Se()).optional()}),_o=Ue.extend({method:N("tools/call"),params:LI}),ZI=Nt.extend({method:N("notifications/tools/list_changed"),params:Ot.optional()}),s8=z({autoRefresh:De().default(!0),debounceMs:pe().int().nonnegative().default(300)}),Ci=mt(["debug","info","notice","warning","error","critical","alert","emergency"]),qI=Pt.extend({level:Ci}),Bd=Ue.extend({method:N("logging/setLevel"),params:qI}),FI=Ot.extend({level:Ci,logger:x().optional(),data:Se()}),UI=Nt.extend({method:N("notifications/message"),params:FI}),BI=z({name:x().optional()}),VI=z({hints:ne(BI).optional(),costPriority:pe().min(0).max(1).optional(),speedPriority:pe().min(0).max(1).optional(),intelligencePriority:pe().min(0).max(1).optional()}),HI=z({mode:mt(["auto","required","none"]).optional()}),GI=z({type:N("tool_result"),toolUseId:x().describe("The unique identifier for the corresponding tool call."),content:ne(Ud).default([]),structuredContent:z({}).loose().optional(),isError:De().optional(),_meta:$e(x(),Se()).optional()}),WI=Cd("type",[Zd,qd,Fd]),la=Cd("type",[Zd,qd,Fd,II,GI]),KI=z({role:Pi,content:ve([la,ne(la)]),_meta:$e(x(),Se()).optional()}),JI=bi.extend({messages:ne(KI),modelPreferences:VI.optional(),systemPrompt:x().optional(),includeContext:mt(["none","thisServer","allServers"]).optional(),temperature:pe().optional(),maxTokens:pe().int(),stopSequences:ne(x()).optional(),metadata:Fe.optional(),tools:ne(Cb).optional(),toolChoice:HI.optional()}),YI=Ue.extend({method:N("sampling/createMessage"),params:JI}),Vd=Be.extend({model:x(),stopReason:Pe(mt(["endTurn","stopSequence","maxTokens"]).or(x())),role:Pi,content:WI}),Hd=Be.extend({model:x(),stopReason:Pe(mt(["endTurn","stopSequence","maxTokens","toolUse"]).or(x())),role:Pi,content:ve([la,ne(la)])}),QI=z({type:N("boolean"),title:x().optional(),description:x().optional(),default:De().optional()}),XI=z({type:N("string"),title:x().optional(),description:x().optional(),minLength:pe().optional(),maxLength:pe().optional(),format:mt(["email","uri","date","date-time"]).optional(),default:x().optional()}),ez=z({type:mt(["number","integer"]),title:x().optional(),description:x().optional(),minimum:pe().optional(),maximum:pe().optional(),default:pe().optional()}),tz=z({type:N("string"),title:x().optional(),description:x().optional(),enum:ne(x()),default:x().optional()}),rz=z({type:N("string"),title:x().optional(),description:x().optional(),oneOf:ne(z({const:x(),title:x()})),default:x().optional()}),nz=z({type:N("string"),title:x().optional(),description:x().optional(),enum:ne(x()),enumNames:ne(x()).optional(),default:x().optional()}),oz=ve([tz,rz]),iz=z({type:N("array"),title:x().optional(),description:x().optional(),minItems:pe().optional(),maxItems:pe().optional(),items:z({type:N("string"),enum:ne(x())}),default:ne(x()).optional()}),sz=z({type:N("array"),title:x().optional(),description:x().optional(),minItems:pe().optional(),maxItems:pe().optional(),items:z({anyOf:ne(z({const:x(),title:x()}))}),default:ne(x()).optional()}),az=ve([iz,sz]),cz=ve([nz,oz,az]),uz=ve([cz,QI,XI,ez]),lz=bi.extend({mode:N("form").optional(),message:x(),requestedSchema:z({type:N("object"),properties:$e(x(),uz),required:ne(x()).optional()})}),pz=bi.extend({mode:N("url"),message:x(),elicitationId:x(),url:x().url()}),dz=ve([lz,pz]),fz=Ue.extend({method:N("elicitation/create"),params:dz}),hz=Ot.extend({elicitationId:x()}),mz=Nt.extend({method:N("notifications/elicitation/complete"),params:hz}),Ia=Be.extend({action:mt(["accept","decline","cancel"]),content:Ed(e=>e===null?void 0:e,$e(x(),ve([x(),pe(),De(),ne(x())])).optional())}),gz=z({type:N("ref/resource"),uri:x()}),yz=z({type:N("ref/prompt"),name:x()}),_z=Pt.extend({ref:ve([yz,gz]),argument:z({name:x(),value:x()}),context:z({arguments:$e(x(),x()).optional()}).optional()}),za=Ue.extend({method:N("completion/complete"),params:_z});vz=Be.extend({completion:nt({values:ne(x()).max(100),total:Pe(pe().int()),hasMore:Pe(De())})}),bz=z({uri:x().startsWith("file://"),name:x().optional(),_meta:$e(x(),Se()).optional()}),xz=Ue.extend({method:N("roots/list"),params:Pt.optional()}),Gd=Be.extend({roots:ne(bz)}),kz=Nt.extend({method:N("notifications/roots/list_changed"),params:Ot.optional()}),a8=ve([ma,jd,za,Bd,Pa,Ta,wa,Sa,$a,xI,wI,_o,Ca,ya,va,ba,ka]),c8=ve([ha,ga,Dd,kz,Ti]),u8=ve([fa,Vd,Hd,Ia,Gd,_a,xa,go]),l8=ve([ma,YI,fz,xz,ya,va,ba,ka]),p8=ve([ha,ga,UI,$I,vI,ZI,NI,Ti,mz]),d8=ve([fa,cI,vz,OI,CI,mI,gI,_I,Ea,MI,_a,xa,go]),O=class e extends Error{constructor(t,r,n){super(`MCP error ${t}: ${r}`),this.code=t,this.data=n,this.name="McpError"}static fromError(t,r,n){if(t===L.UrlElicitationRequired&&n){let o=n;if(o.elicitations)return new Id(o.elicitations,r)}return new e(t,r,n)}},Id=class extends O{constructor(t,r=`URL elicitation${t.length>1?"s":""} required`){super(L.UrlElicitationRequired,r,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}});function Wr(e){return e==="completed"||e==="failed"||e==="cancelled"}var zb=v(()=>{});var Ab,Rb,Ob,Ra=v(()=>{Ab=Symbol("Let zodToJsonSchema decide on which parser to use"),Rb={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},Ob=e=>typeof e=="string"?{...Rb,name:e}:{...Rb,...e}});var Nb,Wd=v(()=>{Ra();Nb=e=>{let t=Ob(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([n,o])=>[o._def,{def:o._def,path:[...t.basePath,t.definitionPath,n],jsonSchema:void 0}]))}}});function Kd(e,t,r,n){n?.errorMessages&&r&&(e.errorMessage={...e.errorMessage,[t]:r})}function oe(e,t,r,n,o){e[t]=r,Kd(e,t,n,o)}var Kr=v(()=>{});var Aa,Oa=v(()=>{Aa=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")}});function Te(e){if(e.target!=="openAi")return{};let t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?Aa(t,e.currentPath):t.join("/")}}var jt=v(()=>{Oa()});function jb(e,t){let r={type:"array"};return e.type?._def&&e.type?._def?.typeName!==P.ZodAny&&(r.items=F(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&oe(r,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&oe(r,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(oe(r,"minItems",e.exactLength.value,e.exactLength.message,t),oe(r,"maxItems",e.exactLength.value,e.exactLength.message,t)),r}var Jd=v(()=>{oi();Kr();Re()});function Db(e,t){let r={type:"integer",format:"int64"};if(!e.checks)return r;for(let n of e.checks)switch(n.kind){case"min":t.target==="jsonSchema7"?n.inclusive?oe(r,"minimum",n.value,n.message,t):oe(r,"exclusiveMinimum",n.value,n.message,t):(n.inclusive||(r.exclusiveMinimum=!0),oe(r,"minimum",n.value,n.message,t));break;case"max":t.target==="jsonSchema7"?n.inclusive?oe(r,"maximum",n.value,n.message,t):oe(r,"exclusiveMaximum",n.value,n.message,t):(n.inclusive||(r.exclusiveMaximum=!0),oe(r,"maximum",n.value,n.message,t));break;case"multipleOf":oe(r,"multipleOf",n.value,n.message,t);break}return r}var Yd=v(()=>{Kr()});function Mb(){return{type:"boolean"}}var Qd=v(()=>{});function Na(e,t){return F(e.type._def,t)}var ja=v(()=>{Re()});var Lb,Xd=v(()=>{Re();Lb=(e,t)=>F(e.innerType._def,t)});function ef(e,t,r){let n=r??t.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((o,i)=>ef(e,t,o))};switch(n){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return wz(e,t)}}var wz,tf=v(()=>{Kr();wz=(e,t)=>{let r={type:"integer",format:"unix-time"};if(t.target==="openApi3")return r;for(let n of e.checks)switch(n.kind){case"min":oe(r,"minimum",n.value,n.message,t);break;case"max":oe(r,"maximum",n.value,n.message,t);break}return r}});function Zb(e,t){return{...F(e.innerType._def,t),default:e.defaultValue()}}var rf=v(()=>{Re()});function qb(e,t){return t.effectStrategy==="input"?F(e.schema._def,t):Te(t)}var nf=v(()=>{Re();jt()});function Fb(e){return{type:"string",enum:Array.from(e.values)}}var of=v(()=>{});function Ub(e,t){let r=[F(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),F(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(i=>!!i),n=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,o=[];return r.forEach(i=>{if(Sz(i))o.push(...i.allOf),i.unevaluatedProperties===void 0&&(n=void 0);else{let s=i;if("additionalProperties"in i&&i.additionalProperties===!1){let{additionalProperties:a,...c}=i;s=c}else n=void 0;o.push(s)}}),o.length?{allOf:o,...n}:void 0}var Sz,sf=v(()=>{Re();Sz=e=>"type"in e&&e.type==="string"?!1:"allOf"in e});function Bb(e,t){let r=typeof e.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(e.value)?"array":"object"}:t.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[e.value]}:{type:r==="bigint"?"integer":r,const:e.value}}var af=v(()=>{});function Da(e,t){let r={type:"string"};if(e.checks)for(let n of e.checks)switch(n.kind){case"min":oe(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,t);break;case"max":oe(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,t);break;case"email":switch(t.emailStrategy){case"format:email":Gt(r,"email",n.message,t);break;case"format:idn-email":Gt(r,"idn-email",n.message,t);break;case"pattern:zod":ot(r,Ht.email,n.message,t);break}break;case"url":Gt(r,"uri",n.message,t);break;case"uuid":Gt(r,"uuid",n.message,t);break;case"regex":ot(r,n.regex,n.message,t);break;case"cuid":ot(r,Ht.cuid,n.message,t);break;case"cuid2":ot(r,Ht.cuid2,n.message,t);break;case"startsWith":ot(r,RegExp(`^${uf(n.value,t)}`),n.message,t);break;case"endsWith":ot(r,RegExp(`${uf(n.value,t)}$`),n.message,t);break;case"datetime":Gt(r,"date-time",n.message,t);break;case"date":Gt(r,"date",n.message,t);break;case"time":Gt(r,"time",n.message,t);break;case"duration":Gt(r,"duration",n.message,t);break;case"length":oe(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,n.message,t),oe(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value,n.message,t);break;case"includes":{ot(r,RegExp(uf(n.value,t)),n.message,t);break}case"ip":{n.version!=="v6"&&Gt(r,"ipv4",n.message,t),n.version!=="v4"&&Gt(r,"ipv6",n.message,t);break}case"base64url":ot(r,Ht.base64url,n.message,t);break;case"jwt":ot(r,Ht.jwt,n.message,t);break;case"cidr":{n.version!=="v6"&&ot(r,Ht.ipv4Cidr,n.message,t),n.version!=="v4"&&ot(r,Ht.ipv6Cidr,n.message,t);break}case"emoji":ot(r,Ht.emoji(),n.message,t);break;case"ulid":{ot(r,Ht.ulid,n.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{Gt(r,"binary",n.message,t);break}case"contentEncoding:base64":{oe(r,"contentEncoding","base64",n.message,t);break}case"pattern:zod":{ot(r,Ht.base64,n.message,t);break}}break}case"nanoid":ot(r,Ht.nanoid,n.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function uf(e,t){return t.patternStrategy==="escape"?Tz(e):e}function Tz(e){let t="";for(let r=0;r<e.length;r++)$z.has(e[r])||(t+="\\"),t+=e[r];return t}function Gt(e,t,r,n){e.format||e.anyOf?.some(o=>o.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&n.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.anyOf.push({format:t,...r&&n.errorMessages&&{errorMessage:{format:r}}})):oe(e,"format",t,r,n)}function ot(e,t,r,n){e.pattern||e.allOf?.some(o=>o.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&n.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.allOf.push({pattern:Vb(t,n),...r&&n.errorMessages&&{errorMessage:{pattern:r}}})):oe(e,"pattern",Vb(t,n),r,n)}function Vb(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},n=r.i?e.source.toLowerCase():e.source,o="",i=!1,s=!1,a=!1;for(let c=0;c<n.length;c++){if(i){o+=n[c],i=!1;continue}if(r.i){if(s){if(n[c].match(/[a-z]/)){a?(o+=n[c],o+=`${n[c-2]}-${n[c]}`.toUpperCase(),a=!1):n[c+1]==="-"&&n[c+2]?.match(/[a-z]/)?(o+=n[c],a=!0):o+=`${n[c]}${n[c].toUpperCase()}`;continue}}else if(n[c].match(/[a-z]/)){o+=`[${n[c]}${n[c].toUpperCase()}]`;continue}}if(r.m){if(n[c]==="^"){o+=`(^|(?<=[\r
|
|
30
|
+
]))`;continue}else if(n[c]==="$"){o+=`($|(?=[\r
|
|
31
|
+
]))`;continue}}if(r.s&&n[c]==="."){o+=s?`${n[c]}\r
|
|
32
|
+
`:`[${n[c]}\r
|
|
33
|
+
]`;continue}o+=n[c],n[c]==="\\"?i=!0:s&&n[c]==="]"?s=!1:!s&&n[c]==="["&&(s=!0)}try{new RegExp(o)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return o}var cf,Ht,$z,Ma=v(()=>{Kr();Ht={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(cf===void 0&&(cf=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),cf),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};$z=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789")});function La(e,t){if(t.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),t.target==="openApi3"&&e.keyType?._def.typeName===P.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((n,o)=>({...n,[o]:F(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",o]})??Te(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};let r={type:"object",additionalProperties:F(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if(t.target==="openApi3")return r;if(e.keyType?._def.typeName===P.ZodString&&e.keyType._def.checks?.length){let{type:n,...o}=Da(e.keyType._def,t);return{...r,propertyNames:o}}else{if(e.keyType?._def.typeName===P.ZodEnum)return{...r,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===P.ZodBranded&&e.keyType._def.type._def.typeName===P.ZodString&&e.keyType._def.type._def.checks?.length){let{type:n,...o}=Na(e.keyType._def,t);return{...r,propertyNames:o}}}return r}var Za=v(()=>{oi();Re();Ma();ja();jt()});function Hb(e,t){if(t.mapStrategy==="record")return La(e,t);let r=F(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||Te(t),n=F(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||Te(t);return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}var lf=v(()=>{Re();Za();jt()});function Gb(e){let t=e.values,n=Object.keys(e.values).filter(i=>typeof t[t[i]]!="number").map(i=>t[i]),o=Array.from(new Set(n.map(i=>typeof i)));return{type:o.length===1?o[0]==="string"?"string":"number":["string","number"],enum:n}}var pf=v(()=>{});function Wb(e){return e.target==="openAi"?void 0:{not:Te({...e,currentPath:[...e.currentPath,"not"]})}}var df=v(()=>{jt()});function Kb(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var ff=v(()=>{});function Yb(e,t){if(t.target==="openApi3")return Jb(e,t);let r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(n=>n._def.typeName in Ii&&(!n._def.checks||!n._def.checks.length))){let n=r.reduce((o,i)=>{let s=Ii[i._def.typeName];return s&&!o.includes(s)?[...o,s]:o},[]);return{type:n.length>1?n:n[0]}}else if(r.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){let n=r.reduce((o,i)=>{let s=typeof i._def.value;switch(s){case"string":case"number":case"boolean":return[...o,s];case"bigint":return[...o,"integer"];case"object":if(i._def.value===null)return[...o,"null"];case"symbol":case"undefined":case"function":default:return o}},[]);if(n.length===r.length){let o=n.filter((i,s,a)=>a.indexOf(i)===s);return{type:o.length>1?o:o[0],enum:r.reduce((i,s)=>i.includes(s._def.value)?i:[...i,s._def.value],[])}}}else if(r.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((n,o)=>[...n,...o._def.values.filter(i=>!n.includes(i))],[])};return Jb(e,t)}var Ii,Jb,qa=v(()=>{Re();Ii={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};Jb=(e,t)=>{let r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((n,o)=>F(n._def,{...t,currentPath:[...t.currentPath,"anyOf",`${o}`]})).filter(n=>!!n&&(!t.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return r.length?{anyOf:r}:void 0}});function Qb(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return t.target==="openApi3"?{type:Ii[e.innerType._def.typeName],nullable:!0}:{type:[Ii[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){let n=F(e.innerType._def,{...t,currentPath:[...t.currentPath]});return n&&"$ref"in n?{allOf:[n],nullable:!0}:n&&{...n,nullable:!0}}let r=F(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}var hf=v(()=>{Re();qa()});function Xb(e,t){let r={type:"number"};if(!e.checks)return r;for(let n of e.checks)switch(n.kind){case"int":r.type="integer",Kd(r,"type",n.message,t);break;case"min":t.target==="jsonSchema7"?n.inclusive?oe(r,"minimum",n.value,n.message,t):oe(r,"exclusiveMinimum",n.value,n.message,t):(n.inclusive||(r.exclusiveMinimum=!0),oe(r,"minimum",n.value,n.message,t));break;case"max":t.target==="jsonSchema7"?n.inclusive?oe(r,"maximum",n.value,n.message,t):oe(r,"exclusiveMaximum",n.value,n.message,t):(n.inclusive||(r.exclusiveMaximum=!0),oe(r,"maximum",n.value,n.message,t));break;case"multipleOf":oe(r,"multipleOf",n.value,n.message,t);break}return r}var mf=v(()=>{Kr()});function ex(e,t){let r=t.target==="openAi",n={type:"object",properties:{}},o=[],i=e.shape();for(let a in i){let c=i[a];if(c===void 0||c._def===void 0)continue;let u=Cz(c);u&&r&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),u=!1);let p=F(c._def,{...t,currentPath:[...t.currentPath,"properties",a],propertyPath:[...t.currentPath,"properties",a]});p!==void 0&&(n.properties[a]=p,u||o.push(a))}o.length&&(n.required=o);let s=Pz(e,t);return s!==void 0&&(n.additionalProperties=s),n}function Pz(e,t){if(e.catchall._def.typeName!=="ZodNever")return F(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function Cz(e){try{return e.isOptional()}catch{return!0}}var gf=v(()=>{Re()});var tx,yf=v(()=>{Re();jt();tx=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return F(e.innerType._def,t);let r=F(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:Te(t)},r]}:Te(t)}});var rx,_f=v(()=>{Re();rx=(e,t)=>{if(t.pipeStrategy==="input")return F(e.in._def,t);if(t.pipeStrategy==="output")return F(e.out._def,t);let r=F(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),n=F(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(o=>o!==void 0)}}});function nx(e,t){return F(e.type._def,t)}var vf=v(()=>{Re()});function ox(e,t){let n={type:"array",uniqueItems:!0,items:F(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&oe(n,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&oe(n,"maxItems",e.maxSize.value,e.maxSize.message,t),n}var bf=v(()=>{Kr();Re()});function ix(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,n)=>F(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:F(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,n)=>F(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}var xf=v(()=>{Re()});function sx(e){return{not:Te(e)}}var kf=v(()=>{jt()});function ax(e){return Te(e)}var wf=v(()=>{jt()});var cx,Sf=v(()=>{Re();cx=(e,t)=>F(e.innerType._def,t)});var ux,$f=v(()=>{oi();jt();Jd();Yd();Qd();ja();Xd();tf();rf();nf();of();sf();af();lf();pf();df();ff();hf();mf();gf();yf();_f();vf();Za();bf();Ma();xf();kf();qa();wf();Sf();ux=(e,t,r)=>{switch(t){case P.ZodString:return Da(e,r);case P.ZodNumber:return Xb(e,r);case P.ZodObject:return ex(e,r);case P.ZodBigInt:return Db(e,r);case P.ZodBoolean:return Mb();case P.ZodDate:return ef(e,r);case P.ZodUndefined:return sx(r);case P.ZodNull:return Kb(r);case P.ZodArray:return jb(e,r);case P.ZodUnion:case P.ZodDiscriminatedUnion:return Yb(e,r);case P.ZodIntersection:return Ub(e,r);case P.ZodTuple:return ix(e,r);case P.ZodRecord:return La(e,r);case P.ZodLiteral:return Bb(e,r);case P.ZodEnum:return Fb(e);case P.ZodNativeEnum:return Gb(e);case P.ZodNullable:return Qb(e,r);case P.ZodOptional:return tx(e,r);case P.ZodMap:return Hb(e,r);case P.ZodSet:return ox(e,r);case P.ZodLazy:return()=>e.getter()._def;case P.ZodPromise:return nx(e,r);case P.ZodNaN:case P.ZodNever:return Wb(r);case P.ZodEffects:return qb(e,r);case P.ZodAny:return Te(r);case P.ZodUnknown:return ax(r);case P.ZodDefault:return Zb(e,r);case P.ZodBranded:return Na(e,r);case P.ZodReadonly:return cx(e,r);case P.ZodCatch:return Lb(e,r);case P.ZodPipeline:return rx(e,r);case P.ZodFunction:case P.ZodVoid:case P.ZodSymbol:return;default:return(n=>{})(t)}}});function F(e,t,r=!1){let n=t.seen.get(e);if(t.override){let a=t.override?.(e,t,n,r);if(a!==Ab)return a}if(n&&!r){let a=Ez(n,t);if(a!==void 0)return a}let o={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,o);let i=ux(e,e.typeName,t),s=typeof i=="function"?F(i(),t):i;if(s&&Iz(e,t,s),t.postProcess){let a=t.postProcess(s,e,t);return o.jsonSchema=s,a}return o.jsonSchema=s,s}var Ez,Iz,Re=v(()=>{Ra();$f();Oa();jt();Ez=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:Aa(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,n)=>t.currentPath[n]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),Te(t)):t.$refStrategy==="seen"?Te(t):void 0}},Iz=(e,t,r)=>(e.description&&(r.description=e.description,t.markdownDescription&&(r.markdownDescription=e.description)),r)});var lx=v(()=>{});var Tf,Pf=v(()=>{Re();Wd();jt();Tf=(e,t)=>{let r=Nb(t),n=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,p])=>({...c,[u]:F(p._def,{...r,currentPath:[...r.basePath,r.definitionPath,u]},!0)??Te(r)}),{}):void 0,o=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,i=F(e._def,o===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,o]},!1)??Te(r),s=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;s!==void 0&&(i.title=s),r.flags.hasReferencedOpenAiAnyType&&(n||(n={}),n[r.openAiAnyTypeName]||(n[r.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:r.$refStrategy==="relative"?"1":[...r.basePath,r.definitionPath,r.openAiAnyTypeName].join("/")}}));let a=o===void 0?n?{...i,[r.definitionPath]:n}:i:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,o].join("/"),[r.definitionPath]:{...n,[o]:i}};return r.target==="jsonSchema7"?a.$schema="http://json-schema.org/draft-07/schema#":(r.target==="jsonSchema2019-09"||r.target==="openAi")&&(a.$schema="https://json-schema.org/draft/2019-09/schema#"),r.target==="openAi"&&("anyOf"in a||"oneOf"in a||"allOf"in a||"type"in a&&Array.isArray(a.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),a}});var px=v(()=>{Ra();Wd();Kr();Oa();Re();lx();jt();Jd();Yd();Qd();ja();Xd();tf();rf();nf();of();sf();af();lf();pf();df();ff();hf();mf();gf();yf();_f();vf();Sf();Za();bf();Ma();xf();kf();qa();wf();$f();Pf();Pf()});function zz(e){return!e||e==="jsonSchema7"||e==="draft-7"?"draft-7":e==="jsonSchema2019-09"||e==="draft-2020-12"?"draft-2020-12":"draft-7"}function Cf(e,t){return At(e)?dd(e,{target:zz(t?.target),io:t?.pipeStrategy??"input"}):Tf(e,{strictUnions:t?.strictUnions??!0,pipeStrategy:t?.pipeStrategy??"input"})}function Ef(e){let r=Hr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let n=aa(r);if(typeof n!="string")throw new Error("Schema method literal must be a string");return n}function If(e,t){let r=Vr(e,t);if(!r.success)throw r.error;return r.data}var zf=v(()=>{md();yi();px()});function dx(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function fx(e,t){let r={...e};for(let n in t){let o=n,i=t[o];if(i===void 0)continue;let s=r[o];dx(s)&&dx(i)?r[o]={...s,...i}:r[o]=i}return r}var Rz,Fa,hx=v(()=>{yi();Ei();zb();zf();Rz=6e4,Fa=class{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(ha,r=>{this._oncancel(r)}),this.setNotificationHandler(ga,r=>{this._onprogress(r)}),this.setRequestHandler(ma,r=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(ya,async(r,n)=>{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new O(L.InvalidParams,"Failed to retrieve task: Task not found");return{...o}}),this.setRequestHandler(va,async(r,n)=>{let o=async()=>{let i=r.params.taskId;if(this._taskMessageQueue){let a;for(;a=await this._taskMessageQueue.dequeue(i,n.sessionId);){if(a.type==="response"||a.type==="error"){let c=a.message,u=c.id,p=this._requestResolvers.get(u);if(p)if(this._requestResolvers.delete(u),a.type==="response")p(c);else{let l=c,d=new O(l.error.code,l.error.message,l.error.data);p(d)}else{let l=a.type==="response"?"Response":"Error";this._onerror(new Error(`${l} handler missing for request ${u}`))}continue}await this._transport?.send(a.message,{relatedRequestId:n.requestId})}}let s=await this._taskStore.getTask(i,n.sessionId);if(!s)throw new O(L.InvalidParams,`Task not found: ${i}`);if(!Wr(s.status))return await this._waitForTaskUpdate(i,n.signal),await o();if(Wr(s.status)){let a=await this._taskStore.getTaskResult(i,n.sessionId);return this._clearTaskQueue(i),{...a,_meta:{...a._meta,[Gr]:{taskId:i}}}}return await o()};return await o()}),this.setRequestHandler(ba,async(r,n)=>{try{let{tasks:o,nextCursor:i}=await this._taskStore.listTasks(r.params?.cursor,n.sessionId);return{tasks:o,nextCursor:i,_meta:{}}}catch(o){throw new O(L.InvalidParams,`Failed to list tasks: ${o instanceof Error?o.message:String(o)}`)}}),this.setRequestHandler(ka,async(r,n)=>{try{let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new O(L.InvalidParams,`Task not found: ${r.params.taskId}`);if(Wr(o.status))throw new O(L.InvalidParams,`Cannot cancel task in terminal status: ${o.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",n.sessionId),this._clearTaskQueue(r.params.taskId);let i=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!i)throw new O(L.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...i}}catch(o){throw o instanceof O?o:new O(L.InvalidRequest,`Failed to cancel task: ${o instanceof Error?o.message:String(o)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,r,n,o,i=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(o,r),startTime:Date.now(),timeout:r,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:o})}_resetTimeout(t){let r=this._timeoutInfo.get(t);if(!r)return!1;let n=Date.now()-r.startTime;if(r.maxTotalTimeout&&n>=r.maxTotalTimeout)throw this._timeoutInfo.delete(t),O.fromError(L.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:n});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(t){let r=this._timeoutInfo.get(t);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(t))}async connect(t){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=t;let r=this.transport?.onclose;this._transport.onclose=()=>{r?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=i=>{n?.(i),this._onerror(i)};let o=this._transport?.onmessage;this._transport.onmessage=(i,s)=>{o?.(i,s),xi(i)||bb(i)?this._onresponse(i):Ad(i)?this._onrequest(i,s):vb(i)?this._onnotification(i):this._onerror(new Error(`Unknown message type: ${JSON.stringify(i)}`))},await this._transport.start()}_onclose(){let t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let n of this._requestHandlerAbortControllers.values())n.abort();this._requestHandlerAbortControllers.clear();let r=O.fromError(L.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let n of t.values())n(r)}_onerror(t){this.onerror?.(t)}_onnotification(t){let r=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(t)).catch(n=>this._onerror(new Error(`Uncaught error in notification handler: ${n}`)))}_onrequest(t,r){let n=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,o=this._transport,i=t.params?._meta?.[Gr]?.taskId;if(n===void 0){let p={jsonrpc:"2.0",id:t.id,error:{code:L.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:p,timestamp:Date.now()},o?.sessionId).catch(l=>this._onerror(new Error(`Failed to enqueue error response: ${l}`))):o?.send(p).catch(l=>this._onerror(new Error(`Failed to send an error response: ${l}`)));return}let s=new AbortController;this._requestHandlerAbortControllers.set(t.id,s);let a=gb(t.params)?t.params.task:void 0,c=this._taskStore?this.requestTaskStore(t,o?.sessionId):void 0,u={signal:s.signal,sessionId:o?.sessionId,_meta:t.params?._meta,sendNotification:async p=>{if(s.signal.aborted)return;let l={relatedRequestId:t.id};i&&(l.relatedTask={taskId:i}),await this.notification(p,l)},sendRequest:async(p,l,d)=>{if(s.signal.aborted)throw new O(L.ConnectionClosed,"Request was cancelled");let h={...d,relatedRequestId:t.id};i&&!h.relatedTask&&(h.relatedTask={taskId:i});let f=h.relatedTask?.taskId??i;return f&&c&&await c.updateTaskStatus(f,"input_required"),await this.request(p,l,h)},authInfo:r?.authInfo,requestId:t.id,requestInfo:r?.requestInfo,taskId:i,taskStore:c,taskRequestedTtl:a?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{a&&this.assertTaskHandlerCapability(t.method)}).then(()=>n(t,u)).then(async p=>{if(s.signal.aborted)return;let l={result:p,jsonrpc:"2.0",id:t.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"response",message:l,timestamp:Date.now()},o?.sessionId):await o?.send(l)},async p=>{if(s.signal.aborted)return;let l={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(p.code)?p.code:L.InternalError,message:p.message??"Internal error",...p.data!==void 0&&{data:p.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"error",message:l,timestamp:Date.now()},o?.sessionId):await o?.send(l)}).catch(p=>this._onerror(new Error(`Failed to send response: ${p}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){let{progressToken:r,...n}=t.params,o=Number(r),i=this._progressHandlers.get(o);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}let s=this._responseHandlers.get(o),a=this._timeoutInfo.get(o);if(a&&s&&a.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(c){this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),s(c);return}i(n)}_onresponse(t){let r=Number(t.id),n=this._requestResolvers.get(r);if(n){if(this._requestResolvers.delete(r),xi(t))n(t);else{let s=new O(t.error.code,t.error.message,t.error.data);n(s)}return}let o=this._responseHandlers.get(r);if(o===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let i=!1;if(xi(t)&&t.result&&typeof t.result=="object"){let s=t.result;if(s.task&&typeof s.task=="object"){let a=s.task;typeof a.taskId=="string"&&(i=!0,this._taskProgressTokens.set(a.taskId,r))}}if(i||this._progressHandlers.delete(r),xi(t))o(t);else{let s=O.fromError(t.error.code,t.error.message,t.error.data);o(s)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,r,n){let{task:o}=n??{};if(!o){try{yield{type:"result",result:await this.request(t,r,n)}}catch(s){yield{type:"error",error:s instanceof O?s:new O(L.InternalError,String(s))}}return}let i;try{let s=await this.request(t,go,n);if(s.task)i=s.task.taskId,yield{type:"taskCreated",task:s.task};else throw new O(L.InternalError,"Task creation did not return a task");for(;;){let a=await this.getTask({taskId:i},n);if(yield{type:"taskStatus",task:a},Wr(a.status)){a.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},r,n)}:a.status==="failed"?yield{type:"error",error:new O(L.InternalError,`Task ${i} failed`)}:a.status==="cancelled"&&(yield{type:"error",error:new O(L.InternalError,`Task ${i} was cancelled`)});return}if(a.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},r,n)};return}let c=a.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(u=>setTimeout(u,c)),n?.signal?.throwIfAborted()}}catch(s){yield{type:"error",error:s instanceof O?s:new O(L.InternalError,String(s))}}}request(t,r,n){let{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s,task:a,relatedTask:c}=n??{};return new Promise((u,p)=>{let l=b=>{p(b)};if(!this._transport){l(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),a&&this.assertTaskCapability(t.method)}catch(b){l(b);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,h={...t,jsonrpc:"2.0",id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),h.params={...t.params,_meta:{...t.params?._meta||{},progressToken:d}}),a&&(h.params={...h.params,task:a}),c&&(h.params={...h.params,_meta:{...h.params?._meta||{},[Gr]:c}});let f=b=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:d,reason:String(b)}},{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s}).catch(S=>this._onerror(new Error(`Failed to send cancellation: ${S}`)));let T=b instanceof O?b:new O(L.RequestTimeout,String(b));p(T)};this._responseHandlers.set(d,b=>{if(!n?.signal?.aborted){if(b instanceof Error)return p(b);try{let T=Vr(r,b.result);T.success?u(T.data):p(T.error)}catch(T){p(T)}}}),n?.signal?.addEventListener("abort",()=>{f(n?.signal?.reason)});let m=n?.timeout??Rz,y=()=>f(O.fromError(L.RequestTimeout,"Request timed out",{timeout:m}));this._setupTimeout(d,m,n?.maxTotalTimeout,y,n?.resetTimeoutOnProgress??!1);let _=c?.taskId;if(_){let b=T=>{let S=this._responseHandlers.get(d);S?S(T):this._onerror(new Error(`Response handler missing for side-channeled request ${d}`))};this._requestResolvers.set(d,b),this._enqueueTaskMessage(_,{type:"request",message:h,timestamp:Date.now()}).catch(T=>{this._cleanupTimeout(d),p(T)})}else this._transport.send(h,{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s}).catch(b=>{this._cleanupTimeout(d),p(b)})})}async getTask(t,r){return this.request({method:"tasks/get",params:t},_a,r)}async getTaskResult(t,r,n){return this.request({method:"tasks/result",params:t},r,n)}async listTasks(t,r){return this.request({method:"tasks/list",params:t},xa,r)}async cancelTask(t,r){return this.request({method:"tasks/cancel",params:t},wb,r)}async notification(t,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);let n=r?.relatedTask?.taskId;if(n){let a={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[Gr]:r.relatedTask}}};await this._enqueueTaskMessage(n,{type:"notification",message:a,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!r?.relatedRequestId&&!r?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let a={...t,jsonrpc:"2.0"};r?.relatedTask&&(a={...a,params:{...a.params,_meta:{...a.params?._meta||{},[Gr]:r.relatedTask}}}),this._transport?.send(a,r).catch(c=>this._onerror(c))});return}let s={...t,jsonrpc:"2.0"};r?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[Gr]:r.relatedTask}}}),await this._transport.send(s,r)}setRequestHandler(t,r){let n=Ef(t);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(o,i)=>{let s=If(t,o);return Promise.resolve(r(s,i))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,r){let n=Ef(t);this._notificationHandlers.set(n,o=>{let i=If(t,o);return Promise.resolve(r(i))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){let r=this._taskProgressTokens.get(t);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,r,n){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let o=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,r,n,o)}async _clearTaskQueue(t,r){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(t,r);for(let o of n)if(o.type==="request"&&Ad(o.message)){let i=o.message.id,s=this._requestResolvers.get(i);s?(s(new O(L.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(i)):this._onerror(new Error(`Resolver missing for request ${i} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,r){let n=this._options?.defaultTaskPollInterval??1e3;try{let o=await this._taskStore?.getTask(t);o?.pollInterval&&(n=o.pollInterval)}catch{}return new Promise((o,i)=>{if(r.aborted){i(new O(L.InvalidRequest,"Request cancelled"));return}let s=setTimeout(o,n);r.addEventListener("abort",()=>{clearTimeout(s),i(new O(L.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,r){let n=this._taskStore;if(!n)throw new Error("No task store configured");return{createTask:async o=>{if(!t)throw new Error("No request provided");return await n.createTask(o,t.id,{method:t.method,params:t.params},r)},getTask:async o=>{let i=await n.getTask(o,r);if(!i)throw new O(L.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(o,i,s)=>{await n.storeTaskResult(o,i,s,r);let a=await n.getTask(o,r);if(a){let c=Ti.parse({method:"notifications/tasks/status",params:a});await this.notification(c),Wr(a.status)&&this._cleanupTaskProgressHandler(o)}},getTaskResult:o=>n.getTaskResult(o,r),updateTaskStatus:async(o,i,s)=>{let a=await n.getTask(o,r);if(!a)throw new O(L.InvalidParams,`Task "${o}" not found - it may have been cleaned up`);if(Wr(a.status))throw new O(L.InvalidParams,`Cannot update task "${o}" from terminal status "${a.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(o,i,s,r);let c=await n.getTask(o,r);if(c){let u=Ti.parse({method:"notifications/tasks/status",params:c});await this.notification(u),Wr(c.status)&&this._cleanupTaskProgressHandler(o)}},listTasks:o=>n.listTasks(o,r)}}}});var Ai=w(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.regexpCode=ce.getEsmExportName=ce.getProperty=ce.safeStringify=ce.stringify=ce.strConcat=ce.addCodeArg=ce.str=ce._=ce.nil=ce._Code=ce.Name=ce.IDENTIFIER=ce._CodeOrName=void 0;var zi=class{};ce._CodeOrName=zi;ce.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var On=class extends zi{constructor(t){if(super(),!ce.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ce.Name=On;var Dt=class extends zi{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,n)=>(n instanceof On&&(r[n.str]=(r[n.str]||0)+1),r),{})}};ce._Code=Dt;ce.nil=new Dt("");function mx(e,...t){let r=[e[0]],n=0;for(;n<t.length;)Af(r,t[n]),r.push(e[++n]);return new Dt(r)}ce._=mx;var Rf=new Dt("+");function gx(e,...t){let r=[Ri(e[0])],n=0;for(;n<t.length;)r.push(Rf),Af(r,t[n]),r.push(Rf,Ri(e[++n]));return Az(r),new Dt(r)}ce.str=gx;function Af(e,t){t instanceof Dt?e.push(...t._items):t instanceof On?e.push(t):e.push(jz(t))}ce.addCodeArg=Af;function Az(e){let t=1;for(;t<e.length-1;){if(e[t]===Rf){let r=Oz(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function Oz(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof On||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof On))return`"${e}${t.slice(1)}`}function Nz(e,t){return t.emptyStr()?e:e.emptyStr()?t:gx`${e}${t}`}ce.strConcat=Nz;function jz(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Ri(Array.isArray(e)?e.join(","):e)}function Dz(e){return new Dt(Ri(e))}ce.stringify=Dz;function Ri(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ce.safeStringify=Ri;function Mz(e){return typeof e=="string"&&ce.IDENTIFIER.test(e)?new Dt(`.${e}`):mx`[${e}]`}ce.getProperty=Mz;function Lz(e){if(typeof e=="string"&&ce.IDENTIFIER.test(e))return new Dt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ce.getEsmExportName=Lz;function Zz(e){return new Dt(e.toString())}ce.regexpCode=Zz});var jf=w(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.ValueScope=yt.ValueScopeName=yt.Scope=yt.varKinds=yt.UsedValueState=void 0;var gt=Ai(),Of=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},Ua;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(Ua||(yt.UsedValueState=Ua={}));yt.varKinds={const:new gt.Name("const"),let:new gt.Name("let"),var:new gt.Name("var")};var Ba=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof gt.Name?t:this.name(t)}name(t){return new gt.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};yt.Scope=Ba;var Va=class extends gt.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:n}){this.value=t,this.scopePath=(0,gt._)`.${new gt.Name(r)}[${n}]`}};yt.ValueScopeName=Va;var qz=(0,gt._)`\n`,Nf=class extends Ba{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?qz:gt.nil}}get(){return this._scope}name(t){return new Va(t,this._newName(t))}value(t,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(t),{prefix:i}=o,s=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[i];if(a){let p=a.get(s);if(p)return p}else a=this._values[i]=new Map;a.set(s,o);let c=this._scope[i]||(this._scope[i]=[]),u=c.length;return c[u]=r.ref,o.setValue(r,{property:i,itemIndex:u}),o}getValue(t,r){let n=this._values[t];if(n)return n.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,gt._)`${t}${n.scopePath}`})}scopeCode(t=this._values,r,n){return this._reduceValues(t,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},r,n)}_reduceValues(t,r,n={},o){let i=gt.nil;for(let s in t){let a=t[s];if(!a)continue;let c=n[s]=n[s]||new Map;a.forEach(u=>{if(c.has(u))return;c.set(u,Ua.Started);let p=r(u);if(p){let l=this.opts.es5?yt.varKinds.var:yt.varKinds.const;i=(0,gt._)`${i}${l} ${u} = ${p};${this.opts._n}`}else if(p=o?.(u))i=(0,gt._)`${i}${p}${this.opts._n}`;else throw new Of(u);c.set(u,Ua.Completed)})}return i}};yt.ValueScope=Nf});var K=w(J=>{"use strict";Object.defineProperty(J,"__esModule",{value:!0});J.or=J.and=J.not=J.CodeGen=J.operators=J.varKinds=J.ValueScopeName=J.ValueScope=J.Scope=J.Name=J.regexpCode=J.stringify=J.getProperty=J.nil=J.strConcat=J.str=J._=void 0;var ie=Ai(),Wt=jf(),Jr=Ai();Object.defineProperty(J,"_",{enumerable:!0,get:function(){return Jr._}});Object.defineProperty(J,"str",{enumerable:!0,get:function(){return Jr.str}});Object.defineProperty(J,"strConcat",{enumerable:!0,get:function(){return Jr.strConcat}});Object.defineProperty(J,"nil",{enumerable:!0,get:function(){return Jr.nil}});Object.defineProperty(J,"getProperty",{enumerable:!0,get:function(){return Jr.getProperty}});Object.defineProperty(J,"stringify",{enumerable:!0,get:function(){return Jr.stringify}});Object.defineProperty(J,"regexpCode",{enumerable:!0,get:function(){return Jr.regexpCode}});Object.defineProperty(J,"Name",{enumerable:!0,get:function(){return Jr.Name}});var Ka=jf();Object.defineProperty(J,"Scope",{enumerable:!0,get:function(){return Ka.Scope}});Object.defineProperty(J,"ValueScope",{enumerable:!0,get:function(){return Ka.ValueScope}});Object.defineProperty(J,"ValueScopeName",{enumerable:!0,get:function(){return Ka.ValueScopeName}});Object.defineProperty(J,"varKinds",{enumerable:!0,get:function(){return Ka.varKinds}});J.operators={GT:new ie._Code(">"),GTE:new ie._Code(">="),LT:new ie._Code("<"),LTE:new ie._Code("<="),EQ:new ie._Code("==="),NEQ:new ie._Code("!=="),NOT:new ie._Code("!"),OR:new ie._Code("||"),AND:new ie._Code("&&"),ADD:new ie._Code("+")};var Sr=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},Df=class extends Sr{constructor(t,r,n){super(),this.varKind=t,this.name=r,this.rhs=n}render({es5:t,_n:r}){let n=t?Wt.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${o};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=bo(this.rhs,t,r)),this}get names(){return this.rhs instanceof ie._CodeOrName?this.rhs.names:{}}},Ha=class extends Sr{constructor(t,r,n){super(),this.lhs=t,this.rhs=r,this.sideEffects=n}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof ie.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=bo(this.rhs,t,r),this}get names(){let t=this.lhs instanceof ie.Name?{}:{...this.lhs.names};return Wa(t,this.rhs)}},Mf=class extends Ha{constructor(t,r,n,o){super(t,n,o),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},Lf=class extends Sr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},Zf=class extends Sr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},qf=class extends Sr{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},Ff=class extends Sr{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=bo(this.code,t,r),this}get names(){return this.code instanceof ie._CodeOrName?this.code.names:{}}},Oi=class extends Sr{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,n)=>r+n.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let n=t[r].optimizeNodes();Array.isArray(n)?t.splice(r,1,...n):n?t[r]=n:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:n}=this,o=n.length;for(;o--;){let i=n[o];i.optimizeNames(t,r)||(Fz(t,i.names),n.splice(o,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>Dn(t,r.names),{})}},$r=class extends Oi{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},Uf=class extends Oi{},vo=class extends $r{};vo.kind="else";var Nn=class e extends $r{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new vo(n):n}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(yx(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=bo(this.condition,t,r),this}get names(){let t=super.names;return Wa(t,this.condition),this.else&&Dn(t,this.else.names),t}};Nn.kind="if";var jn=class extends $r{};jn.kind="for";var Bf=class extends jn{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=bo(this.iteration,t,r),this}get names(){return Dn(super.names,this.iteration.names)}},Vf=class extends jn{constructor(t,r,n,o){super(),this.varKind=t,this.name=r,this.from=n,this.to=o}render(t){let r=t.es5?Wt.varKinds.var:this.varKind,{name:n,from:o,to:i}=this;return`for(${r} ${n}=${o}; ${n}<${i}; ${n}++)`+super.render(t)}get names(){let t=Wa(super.names,this.from);return Wa(t,this.to)}},Ga=class extends jn{constructor(t,r,n,o){super(),this.loop=t,this.varKind=r,this.name=n,this.iterable=o}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=bo(this.iterable,t,r),this}get names(){return Dn(super.names,this.iterable.names)}},Ni=class extends $r{constructor(t,r,n){super(),this.name=t,this.args=r,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};Ni.kind="func";var ji=class extends Oi{render(t){return"return "+super.render(t)}};ji.kind="return";var Hf=class extends $r{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var n,o;return super.optimizeNames(t,r),(n=this.catch)===null||n===void 0||n.optimizeNames(t,r),(o=this.finally)===null||o===void 0||o.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&Dn(t,this.catch.names),this.finally&&Dn(t,this.finally.names),t}},Di=class extends $r{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};Di.kind="catch";var Mi=class extends $r{render(t){return"finally"+super.render(t)}};Mi.kind="finally";var Gf=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
34
|
+
`:""},this._extScope=t,this._scope=new Wt.Scope({parent:t}),this._nodes=[new Uf]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,r){let n=this._extScope.value(t,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,n,o){let i=this._scope.toName(r);return n!==void 0&&o&&(this._constants[i.str]=n),this._leafNode(new Df(t,i,n)),i}const(t,r,n){return this._def(Wt.varKinds.const,t,r,n)}let(t,r,n){return this._def(Wt.varKinds.let,t,r,n)}var(t,r,n){return this._def(Wt.varKinds.var,t,r,n)}assign(t,r,n){return this._leafNode(new Ha(t,r,n))}add(t,r){return this._leafNode(new Mf(t,J.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==ie.nil&&this._leafNode(new Ff(t)),this}object(...t){let r=["{"];for(let[n,o]of t)r.length>1&&r.push(","),r.push(n),(n!==o||this.opts.es5)&&(r.push(":"),(0,ie.addCodeArg)(r,o));return r.push("}"),new ie._Code(r)}if(t,r,n){if(this._blockNode(new Nn(t)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new Nn(t))}else(){return this._elseNode(new vo)}endIf(){return this._endBlockNode(Nn,vo)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new Bf(t),r)}forRange(t,r,n,o,i=this.opts.es5?Wt.varKinds.var:Wt.varKinds.let){let s=this._scope.toName(t);return this._for(new Vf(i,s,r,n),()=>o(s))}forOf(t,r,n,o=Wt.varKinds.const){let i=this._scope.toName(t);if(this.opts.es5){let s=r instanceof ie.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,ie._)`${s}.length`,a=>{this.var(i,(0,ie._)`${s}[${a}]`),n(i)})}return this._for(new Ga("of",o,i,r),()=>n(i))}forIn(t,r,n,o=this.opts.es5?Wt.varKinds.var:Wt.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,ie._)`Object.keys(${r})`,n);let i=this._scope.toName(t);return this._for(new Ga("in",o,i,r),()=>n(i))}endFor(){return this._endBlockNode(jn)}label(t){return this._leafNode(new Lf(t))}break(t){return this._leafNode(new Zf(t))}return(t){let r=new ji;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(ji)}try(t,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new Hf;if(this._blockNode(o),this.code(t),r){let i=this.name("e");this._currNode=o.catch=new Di(i),r(i)}return n&&(this._currNode=o.finally=new Mi,this.code(n)),this._endBlockNode(Di,Mi)}throw(t){return this._leafNode(new qf(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||t!==void 0&&n!==t)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=ie.nil,n,o){return this._blockNode(new Ni(t,r,n)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(Ni)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,r){let n=this._currNode;if(n instanceof t||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof Nn))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};J.CodeGen=Gf;function Dn(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function Wa(e,t){return t instanceof ie._CodeOrName?Dn(e,t.names):e}function bo(e,t,r){if(e instanceof ie.Name)return n(e);if(!o(e))return e;return new ie._Code(e._items.reduce((i,s)=>(s instanceof ie.Name&&(s=n(s)),s instanceof ie._Code?i.push(...s._items):i.push(s),i),[]));function n(i){let s=r[i.str];return s===void 0||t[i.str]!==1?i:(delete t[i.str],s)}function o(i){return i instanceof ie._Code&&i._items.some(s=>s instanceof ie.Name&&t[s.str]===1&&r[s.str]!==void 0)}}function Fz(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function yx(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,ie._)`!${Wf(e)}`}J.not=yx;var Uz=_x(J.operators.AND);function Bz(...e){return e.reduce(Uz)}J.and=Bz;var Vz=_x(J.operators.OR);function Hz(...e){return e.reduce(Vz)}J.or=Hz;function _x(e){return(t,r)=>t===ie.nil?r:r===ie.nil?t:(0,ie._)`${Wf(t)} ${e} ${Wf(r)}`}function Wf(e){return e instanceof ie.Name?e:(0,ie._)`(${e})`}});var ue=w(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.checkStrictMode=Y.getErrorPath=Y.Type=Y.useFunc=Y.setEvaluated=Y.evaluatedPropsToName=Y.mergeEvaluated=Y.eachItem=Y.unescapeJsonPointer=Y.escapeJsonPointer=Y.escapeFragment=Y.unescapeFragment=Y.schemaRefOrVal=Y.schemaHasRulesButRef=Y.schemaHasRules=Y.checkUnknownRules=Y.alwaysValidSchema=Y.toHash=void 0;var ge=K(),Gz=Ai();function Wz(e){let t={};for(let r of e)t[r]=!0;return t}Y.toHash=Wz;function Kz(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(xx(e,t),!kx(t,e.self.RULES.all))}Y.alwaysValidSchema=Kz;function xx(e,t=e.schema){let{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;let o=n.RULES.keywords;for(let i in t)o[i]||$x(e,`unknown keyword: "${i}"`)}Y.checkUnknownRules=xx;function kx(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}Y.schemaHasRules=kx;function Jz(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}Y.schemaHasRulesButRef=Jz;function Yz({topSchemaRef:e,schemaPath:t},r,n,o){if(!o){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,ge._)`${r}`}return(0,ge._)`${e}${t}${(0,ge.getProperty)(n)}`}Y.schemaRefOrVal=Yz;function Qz(e){return wx(decodeURIComponent(e))}Y.unescapeFragment=Qz;function Xz(e){return encodeURIComponent(Jf(e))}Y.escapeFragment=Xz;function Jf(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}Y.escapeJsonPointer=Jf;function wx(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Y.unescapeJsonPointer=wx;function eR(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}Y.eachItem=eR;function vx({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(o,i,s,a)=>{let c=s===void 0?i:s instanceof ge.Name?(i instanceof ge.Name?e(o,i,s):t(o,i,s),s):i instanceof ge.Name?(t(o,s,i),i):r(i,s);return a===ge.Name&&!(c instanceof ge.Name)?n(o,c):c}}Y.mergeEvaluated={props:vx({mergeNames:(e,t,r)=>e.if((0,ge._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,ge._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,ge._)`${r} || {}`).code((0,ge._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,ge._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,ge._)`${r} || {}`),Yf(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:Sx}),items:vx({mergeNames:(e,t,r)=>e.if((0,ge._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,ge._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,ge._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,ge._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function Sx(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,ge._)`{}`);return t!==void 0&&Yf(e,r,t),r}Y.evaluatedPropsToName=Sx;function Yf(e,t,r){Object.keys(r).forEach(n=>e.assign((0,ge._)`${t}${(0,ge.getProperty)(n)}`,!0))}Y.setEvaluated=Yf;var bx={};function tR(e,t){return e.scopeValue("func",{ref:t,code:bx[t.code]||(bx[t.code]=new Gz._Code(t.code))})}Y.useFunc=tR;var Kf;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(Kf||(Y.Type=Kf={}));function rR(e,t,r){if(e instanceof ge.Name){let n=t===Kf.Num;return r?n?(0,ge._)`"[" + ${e} + "]"`:(0,ge._)`"['" + ${e} + "']"`:n?(0,ge._)`"/" + ${e}`:(0,ge._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,ge.getProperty)(e).toString():"/"+Jf(e)}Y.getErrorPath=rR;function $x(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}Y.checkStrictMode=$x});var Tr=w(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var Je=K(),nR={data:new Je.Name("data"),valCxt:new Je.Name("valCxt"),instancePath:new Je.Name("instancePath"),parentData:new Je.Name("parentData"),parentDataProperty:new Je.Name("parentDataProperty"),rootData:new Je.Name("rootData"),dynamicAnchors:new Je.Name("dynamicAnchors"),vErrors:new Je.Name("vErrors"),errors:new Je.Name("errors"),this:new Je.Name("this"),self:new Je.Name("self"),scope:new Je.Name("scope"),json:new Je.Name("json"),jsonPos:new Je.Name("jsonPos"),jsonLen:new Je.Name("jsonLen"),jsonPart:new Je.Name("jsonPart")};Qf.default=nR});var Li=w(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.extendErrors=Ye.resetErrorsCount=Ye.reportExtraError=Ye.reportError=Ye.keyword$DataError=Ye.keywordError=void 0;var se=K(),Ja=ue(),it=Tr();Ye.keywordError={message:({keyword:e})=>(0,se.str)`must pass "${e}" keyword validation`};Ye.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,se.str)`"${e}" keyword must be ${t} ($data)`:(0,se.str)`"${e}" keyword is invalid ($data)`};function oR(e,t=Ye.keywordError,r,n){let{it:o}=e,{gen:i,compositeRule:s,allErrors:a}=o,c=Cx(e,t,r);n??(s||a)?Tx(i,c):Px(o,(0,se._)`[${c}]`)}Ye.reportError=oR;function iR(e,t=Ye.keywordError,r){let{it:n}=e,{gen:o,compositeRule:i,allErrors:s}=n,a=Cx(e,t,r);Tx(o,a),i||s||Px(n,it.default.vErrors)}Ye.reportExtraError=iR;function sR(e,t){e.assign(it.default.errors,t),e.if((0,se._)`${it.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,se._)`${it.default.vErrors}.length`,t),()=>e.assign(it.default.vErrors,null)))}Ye.resetErrorsCount=sR;function aR({gen:e,keyword:t,schemaValue:r,data:n,errsCount:o,it:i}){if(o===void 0)throw new Error("ajv implementation error");let s=e.name("err");e.forRange("i",o,it.default.errors,a=>{e.const(s,(0,se._)`${it.default.vErrors}[${a}]`),e.if((0,se._)`${s}.instancePath === undefined`,()=>e.assign((0,se._)`${s}.instancePath`,(0,se.strConcat)(it.default.instancePath,i.errorPath))),e.assign((0,se._)`${s}.schemaPath`,(0,se.str)`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign((0,se._)`${s}.schema`,r),e.assign((0,se._)`${s}.data`,n))})}Ye.extendErrors=aR;function Tx(e,t){let r=e.const("err",t);e.if((0,se._)`${it.default.vErrors} === null`,()=>e.assign(it.default.vErrors,(0,se._)`[${r}]`),(0,se._)`${it.default.vErrors}.push(${r})`),e.code((0,se._)`${it.default.errors}++`)}function Px(e,t){let{gen:r,validateName:n,schemaEnv:o}=e;o.$async?r.throw((0,se._)`new ${e.ValidationError}(${t})`):(r.assign((0,se._)`${n}.errors`,t),r.return(!1))}var Mn={keyword:new se.Name("keyword"),schemaPath:new se.Name("schemaPath"),params:new se.Name("params"),propertyName:new se.Name("propertyName"),message:new se.Name("message"),schema:new se.Name("schema"),parentSchema:new se.Name("parentSchema")};function Cx(e,t,r){let{createErrors:n}=e.it;return n===!1?(0,se._)`{}`:cR(e,t,r)}function cR(e,t,r={}){let{gen:n,it:o}=e,i=[uR(o,r),lR(e,r)];return pR(e,t,i),n.object(...i)}function uR({errorPath:e},{instancePath:t}){let r=t?(0,se.str)`${e}${(0,Ja.getErrorPath)(t,Ja.Type.Str)}`:e;return[it.default.instancePath,(0,se.strConcat)(it.default.instancePath,r)]}function lR({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:n}){let o=n?t:(0,se.str)`${t}/${e}`;return r&&(o=(0,se.str)`${o}${(0,Ja.getErrorPath)(r,Ja.Type.Str)}`),[Mn.schemaPath,o]}function pR(e,{params:t,message:r},n){let{keyword:o,data:i,schemaValue:s,it:a}=e,{opts:c,propertyName:u,topSchemaRef:p,schemaPath:l}=a;n.push([Mn.keyword,o],[Mn.params,typeof t=="function"?t(e):t||(0,se._)`{}`]),c.messages&&n.push([Mn.message,typeof r=="function"?r(e):r]),c.verbose&&n.push([Mn.schema,s],[Mn.parentSchema,(0,se._)`${p}${l}`],[it.default.data,i]),u&&n.push([Mn.propertyName,u])}});var Ix=w(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.boolOrEmptySchema=xo.topBoolOrEmptySchema=void 0;var dR=Li(),fR=K(),hR=Tr(),mR={message:"boolean schema is false"};function gR(e){let{gen:t,schema:r,validateName:n}=e;r===!1?Ex(e,!1):typeof r=="object"&&r.$async===!0?t.return(hR.default.data):(t.assign((0,fR._)`${n}.errors`,null),t.return(!0))}xo.topBoolOrEmptySchema=gR;function yR(e,t){let{gen:r,schema:n}=e;n===!1?(r.var(t,!1),Ex(e)):r.var(t,!0)}xo.boolOrEmptySchema=yR;function Ex(e,t){let{gen:r,data:n}=e,o={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,dR.reportError)(o,mR,void 0,t)}});var Xf=w(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.getRules=ko.isJSONType=void 0;var _R=["string","number","integer","boolean","null","object","array"],vR=new Set(_R);function bR(e){return typeof e=="string"&&vR.has(e)}ko.isJSONType=bR;function xR(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}ko.getRules=xR});var eh=w(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.shouldUseRule=Yr.shouldUseGroup=Yr.schemaHasRulesForType=void 0;function kR({schema:e,self:t},r){let n=t.RULES.types[r];return n&&n!==!0&&zx(e,n)}Yr.schemaHasRulesForType=kR;function zx(e,t){return t.rules.some(r=>Rx(e,r))}Yr.shouldUseGroup=zx;function Rx(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}Yr.shouldUseRule=Rx});var Zi=w(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.reportTypeError=Qe.checkDataTypes=Qe.checkDataType=Qe.coerceAndCheckDataType=Qe.getJSONTypes=Qe.getSchemaTypes=Qe.DataType=void 0;var wR=Xf(),SR=eh(),$R=Li(),G=K(),Ax=ue(),wo;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(wo||(Qe.DataType=wo={}));function TR(e){let t=Ox(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}Qe.getSchemaTypes=TR;function Ox(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(wR.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}Qe.getJSONTypes=Ox;function PR(e,t){let{gen:r,data:n,opts:o}=e,i=CR(t,o.coerceTypes),s=t.length>0&&!(i.length===0&&t.length===1&&(0,SR.schemaHasRulesForType)(e,t[0]));if(s){let a=rh(t,n,o.strictNumbers,wo.Wrong);r.if(a,()=>{i.length?ER(e,t,i):nh(e)})}return s}Qe.coerceAndCheckDataType=PR;var Nx=new Set(["string","number","integer","boolean","null"]);function CR(e,t){return t?e.filter(r=>Nx.has(r)||t==="array"&&r==="array"):[]}function ER(e,t,r){let{gen:n,data:o,opts:i}=e,s=n.let("dataType",(0,G._)`typeof ${o}`),a=n.let("coerced",(0,G._)`undefined`);i.coerceTypes==="array"&&n.if((0,G._)`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>n.assign(o,(0,G._)`${o}[0]`).assign(s,(0,G._)`typeof ${o}`).if(rh(t,o,i.strictNumbers),()=>n.assign(a,o))),n.if((0,G._)`${a} !== undefined`);for(let u of r)(Nx.has(u)||u==="array"&&i.coerceTypes==="array")&&c(u);n.else(),nh(e),n.endIf(),n.if((0,G._)`${a} !== undefined`,()=>{n.assign(o,a),IR(e,a)});function c(u){switch(u){case"string":n.elseIf((0,G._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,G._)`"" + ${o}`).elseIf((0,G._)`${o} === null`).assign(a,(0,G._)`""`);return;case"number":n.elseIf((0,G._)`${s} == "boolean" || ${o} === null
|
|
35
|
+
|| (${s} == "string" && ${o} && ${o} == +${o})`).assign(a,(0,G._)`+${o}`);return;case"integer":n.elseIf((0,G._)`${s} === "boolean" || ${o} === null
|
|
36
|
+
|| (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(a,(0,G._)`+${o}`);return;case"boolean":n.elseIf((0,G._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(a,!1).elseIf((0,G._)`${o} === "true" || ${o} === 1`).assign(a,!0);return;case"null":n.elseIf((0,G._)`${o} === "" || ${o} === 0 || ${o} === false`),n.assign(a,null);return;case"array":n.elseIf((0,G._)`${s} === "string" || ${s} === "number"
|
|
37
|
+
|| ${s} === "boolean" || ${o} === null`).assign(a,(0,G._)`[${o}]`)}}}function IR({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,G._)`${t} !== undefined`,()=>e.assign((0,G._)`${t}[${r}]`,n))}function th(e,t,r,n=wo.Correct){let o=n===wo.Correct?G.operators.EQ:G.operators.NEQ,i;switch(e){case"null":return(0,G._)`${t} ${o} null`;case"array":i=(0,G._)`Array.isArray(${t})`;break;case"object":i=(0,G._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=s((0,G._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=s();break;default:return(0,G._)`typeof ${t} ${o} ${e}`}return n===wo.Correct?i:(0,G.not)(i);function s(a=G.nil){return(0,G.and)((0,G._)`typeof ${t} == "number"`,a,r?(0,G._)`isFinite(${t})`:G.nil)}}Qe.checkDataType=th;function rh(e,t,r,n){if(e.length===1)return th(e[0],t,r,n);let o,i=(0,Ax.toHash)(e);if(i.array&&i.object){let s=(0,G._)`typeof ${t} != "object"`;o=i.null?s:(0,G._)`!${t} || ${s}`,delete i.null,delete i.array,delete i.object}else o=G.nil;i.number&&delete i.integer;for(let s in i)o=(0,G.and)(o,th(s,t,r,n));return o}Qe.checkDataTypes=rh;var zR={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,G._)`{type: ${e}}`:(0,G._)`{type: ${t}}`};function nh(e){let t=RR(e);(0,$R.reportError)(t,zR)}Qe.reportTypeError=nh;function RR(e){let{gen:t,data:r,schema:n}=e,o=(0,Ax.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}});var Dx=w(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.assignDefaults=void 0;var So=K(),AR=ue();function OR(e,t){let{properties:r,items:n}=e.schema;if(t==="object"&&r)for(let o in r)jx(e,o,r[o].default);else t==="array"&&Array.isArray(n)&&n.forEach((o,i)=>jx(e,i,o.default))}Ya.assignDefaults=OR;function jx(e,t,r){let{gen:n,compositeRule:o,data:i,opts:s}=e;if(r===void 0)return;let a=(0,So._)`${i}${(0,So.getProperty)(t)}`;if(o){(0,AR.checkStrictMode)(e,`default is ignored for: ${a}`);return}let c=(0,So._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,So._)`${c} || ${a} === null || ${a} === ""`),n.if(c,(0,So._)`${a} = ${(0,So.stringify)(r)}`)}});var Mt=w(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.validateUnion=he.validateArray=he.usePattern=he.callValidateCode=he.schemaProperties=he.allSchemaProperties=he.noPropertyInData=he.propertyInData=he.isOwnProperty=he.hasPropFunc=he.reportMissingProp=he.checkMissingProp=he.checkReportMissingProp=void 0;var be=K(),oh=ue(),Qr=Tr(),NR=ue();function jR(e,t){let{gen:r,data:n,it:o}=e;r.if(sh(r,n,t,o.opts.ownProperties),()=>{e.setParams({missingProperty:(0,be._)`${t}`},!0),e.error()})}he.checkReportMissingProp=jR;function DR({gen:e,data:t,it:{opts:r}},n,o){return(0,be.or)(...n.map(i=>(0,be.and)(sh(e,t,i,r.ownProperties),(0,be._)`${o} = ${i}`)))}he.checkMissingProp=DR;function MR(e,t){e.setParams({missingProperty:t},!0),e.error()}he.reportMissingProp=MR;function Mx(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,be._)`Object.prototype.hasOwnProperty`})}he.hasPropFunc=Mx;function ih(e,t,r){return(0,be._)`${Mx(e)}.call(${t}, ${r})`}he.isOwnProperty=ih;function LR(e,t,r,n){let o=(0,be._)`${t}${(0,be.getProperty)(r)} !== undefined`;return n?(0,be._)`${o} && ${ih(e,t,r)}`:o}he.propertyInData=LR;function sh(e,t,r,n){let o=(0,be._)`${t}${(0,be.getProperty)(r)} === undefined`;return n?(0,be.or)(o,(0,be.not)(ih(e,t,r))):o}he.noPropertyInData=sh;function Lx(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}he.allSchemaProperties=Lx;function ZR(e,t){return Lx(t).filter(r=>!(0,oh.alwaysValidSchema)(e,t[r]))}he.schemaProperties=ZR;function qR({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:o,errorPath:i},it:s},a,c,u){let p=u?(0,be._)`${e}, ${t}, ${n}${o}`:t,l=[[Qr.default.instancePath,(0,be.strConcat)(Qr.default.instancePath,i)],[Qr.default.parentData,s.parentData],[Qr.default.parentDataProperty,s.parentDataProperty],[Qr.default.rootData,Qr.default.rootData]];s.opts.dynamicRef&&l.push([Qr.default.dynamicAnchors,Qr.default.dynamicAnchors]);let d=(0,be._)`${p}, ${r.object(...l)}`;return c!==be.nil?(0,be._)`${a}.call(${c}, ${d})`:(0,be._)`${a}(${d})`}he.callValidateCode=qR;var FR=(0,be._)`new RegExp`;function UR({gen:e,it:{opts:t}},r){let n=t.unicodeRegExp?"u":"",{regExp:o}=t.code,i=o(r,n);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,be._)`${o.code==="new RegExp"?FR:(0,NR.useFunc)(e,o)}(${r}, ${n})`})}he.usePattern=UR;function BR(e){let{gen:t,data:r,keyword:n,it:o}=e,i=t.name("valid");if(o.allErrors){let a=t.let("valid",!0);return s(()=>t.assign(a,!1)),a}return t.var(i,!0),s(()=>t.break()),i;function s(a){let c=t.const("len",(0,be._)`${r}.length`);t.forRange("i",0,c,u=>{e.subschema({keyword:n,dataProp:u,dataPropType:oh.Type.Num},i),t.if((0,be.not)(i),a)})}}he.validateArray=BR;function VR(e){let{gen:t,schema:r,keyword:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,oh.alwaysValidSchema)(o,c))&&!o.opts.unevaluated)return;let s=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((c,u)=>{let p=e.subschema({keyword:n,schemaProp:u,compositeRule:!0},a);t.assign(s,(0,be._)`${s} || ${a}`),e.mergeValidEvaluated(p,a)||t.if((0,be.not)(s))})),e.result(s,()=>e.reset(),()=>e.error(!0))}he.validateUnion=VR});var Fx=w(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.validateKeywordUsage=ur.validSchemaType=ur.funcKeywordCode=ur.macroKeywordCode=void 0;var st=K(),Ln=Tr(),HR=Mt(),GR=Li();function WR(e,t){let{gen:r,keyword:n,schema:o,parentSchema:i,it:s}=e,a=t.macro.call(s.self,o,i,s),c=qx(r,n,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let u=r.name("valid");e.subschema({schema:a,schemaPath:st.nil,errSchemaPath:`${s.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}ur.macroKeywordCode=WR;function KR(e,t){var r;let{gen:n,keyword:o,schema:i,parentSchema:s,$data:a,it:c}=e;YR(c,t);let u=!a&&t.compile?t.compile.call(c.self,i,s,c):t.validate,p=qx(n,o,u),l=n.let("valid");e.block$data(l,d),e.ok((r=t.valid)!==null&&r!==void 0?r:l);function d(){if(t.errors===!1)m(),t.modifying&&Zx(e),y(()=>e.error());else{let _=t.async?h():f();t.modifying&&Zx(e),y(()=>JR(e,_))}}function h(){let _=n.let("ruleErrs",null);return n.try(()=>m((0,st._)`await `),b=>n.assign(l,!1).if((0,st._)`${b} instanceof ${c.ValidationError}`,()=>n.assign(_,(0,st._)`${b}.errors`),()=>n.throw(b))),_}function f(){let _=(0,st._)`${p}.errors`;return n.assign(_,null),m(st.nil),_}function m(_=t.async?(0,st._)`await `:st.nil){let b=c.opts.passContext?Ln.default.this:Ln.default.self,T=!("compile"in t&&!a||t.schema===!1);n.assign(l,(0,st._)`${_}${(0,HR.callValidateCode)(e,p,b,T)}`,t.modifying)}function y(_){var b;n.if((0,st.not)((b=t.valid)!==null&&b!==void 0?b:l),_)}}ur.funcKeywordCode=KR;function Zx(e){let{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,st._)`${n.parentData}[${n.parentDataProperty}]`))}function JR(e,t){let{gen:r}=e;r.if((0,st._)`Array.isArray(${t})`,()=>{r.assign(Ln.default.vErrors,(0,st._)`${Ln.default.vErrors} === null ? ${t} : ${Ln.default.vErrors}.concat(${t})`).assign(Ln.default.errors,(0,st._)`${Ln.default.vErrors}.length`),(0,GR.extendErrors)(e)},()=>e.error())}function YR({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function qx(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,st.stringify)(r)})}function QR(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}ur.validSchemaType=QR;function XR({schema:e,opts:t,self:r,errSchemaPath:n},o,i){if(Array.isArray(o.keyword)?!o.keyword.includes(i):o.keyword!==i)throw new Error("ajv implementation error");let s=o.dependencies;if(s?.some(a=>!Object.prototype.hasOwnProperty.call(e,a)))throw new Error(`parent schema must have dependencies of ${i}: ${s.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[i])){let c=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}ur.validateKeywordUsage=XR});var Bx=w(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.extendSubschemaMode=Xr.extendSubschemaData=Xr.getSubschema=void 0;var lr=K(),Ux=ue();function eA(e,{keyword:t,schemaProp:r,schema:n,schemaPath:o,errSchemaPath:i,topSchemaRef:s}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,lr._)`${e.schemaPath}${(0,lr.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,lr._)`${e.schemaPath}${(0,lr.getProperty)(t)}${(0,lr.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Ux.escapeFragment)(r)}`}}if(n!==void 0){if(o===void 0||i===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:o,topSchemaRef:s,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}Xr.getSubschema=eA;function tA(e,t,{dataProp:r,dataPropType:n,data:o,dataTypes:i,propertyName:s}){if(o!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=t;if(r!==void 0){let{errorPath:u,dataPathArr:p,opts:l}=t,d=a.let("data",(0,lr._)`${t.data}${(0,lr.getProperty)(r)}`,!0);c(d),e.errorPath=(0,lr.str)`${u}${(0,Ux.getErrorPath)(r,n,l.jsPropertySyntax)}`,e.parentDataProperty=(0,lr._)`${r}`,e.dataPathArr=[...p,e.parentDataProperty]}if(o!==void 0){let u=o instanceof lr.Name?o:a.let("data",o,!0);c(u),s!==void 0&&(e.propertyName=s)}i&&(e.dataTypes=i);function c(u){e.data=u,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,u]}}Xr.extendSubschemaData=tA;function rA(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:i}){n!==void 0&&(e.compositeRule=n),o!==void 0&&(e.createErrors=o),i!==void 0&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}Xr.extendSubschemaMode=rA});var ah=w((CF,Vx)=>{"use strict";Vx.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;o--!==0;){var s=i[o];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}});var Gx=w((EF,Hx)=>{"use strict";var en=Hx.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},o=r.post||function(){};Qa(t,n,o,e,"",e)};en.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};en.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};en.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};en.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Qa(e,t,r,n,o,i,s,a,c,u){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,o,i,s,a,c,u);for(var p in n){var l=n[p];if(Array.isArray(l)){if(p in en.arrayKeywords)for(var d=0;d<l.length;d++)Qa(e,t,r,l[d],o+"/"+p+"/"+d,i,o,p,n,d)}else if(p in en.propsKeywords){if(l&&typeof l=="object")for(var h in l)Qa(e,t,r,l[h],o+"/"+p+"/"+nA(h),i,o,p,n,h)}else(p in en.keywords||e.allKeys&&!(p in en.skipKeywords))&&Qa(e,t,r,l,o+"/"+p,i,o,p,n)}r(n,o,i,s,a,c,u)}}function nA(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var qi=w(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});_t.getSchemaRefs=_t.resolveUrl=_t.normalizeId=_t._getFullPath=_t.getFullPath=_t.inlineRef=void 0;var oA=ue(),iA=ah(),sA=Gx(),aA=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function cA(e,t=!0){return typeof e=="boolean"?!0:t===!0?!ch(e):t?Wx(e)<=t:!1}_t.inlineRef=cA;var uA=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function ch(e){for(let t in e){if(uA.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(ch)||typeof r=="object"&&ch(r))return!0}return!1}function Wx(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!aA.has(r)&&(typeof e[r]=="object"&&(0,oA.eachItem)(e[r],n=>t+=Wx(n)),t===1/0))return 1/0}return t}function Kx(e,t="",r){r!==!1&&(t=$o(t));let n=e.parse(t);return Jx(e,n)}_t.getFullPath=Kx;function Jx(e,t){return e.serialize(t).split("#")[0]+"#"}_t._getFullPath=Jx;var lA=/#\/?$/;function $o(e){return e?e.replace(lA,""):""}_t.normalizeId=$o;function pA(e,t,r){return r=$o(r),e.resolve(t,r)}_t.resolveUrl=pA;var dA=/^[a-z_][-a-z0-9._]*$/i;function fA(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,o=$o(e[r]||t),i={"":o},s=Kx(n,o,!1),a={},c=new Set;return sA(e,{allKeys:!0},(l,d,h,f)=>{if(f===void 0)return;let m=s+d,y=i[f];typeof l[r]=="string"&&(y=_.call(this,l[r])),b.call(this,l.$anchor),b.call(this,l.$dynamicAnchor),i[d]=y;function _(T){let S=this.opts.uriResolver.resolve;if(T=$o(y?S(y,T):T),c.has(T))throw p(T);c.add(T);let C=this.refs[T];return typeof C=="string"&&(C=this.refs[C]),typeof C=="object"?u(l,C.schema,T):T!==$o(m)&&(T[0]==="#"?(u(l,a[T],T),a[T]=l):this.refs[T]=m),T}function b(T){if(typeof T=="string"){if(!dA.test(T))throw new Error(`invalid anchor "${T}"`);_.call(this,`#${T}`)}}}),a;function u(l,d,h){if(d!==void 0&&!iA(l,d))throw p(h)}function p(l){return new Error(`reference "${l}" resolves to more than one schema`)}}_t.getSchemaRefs=fA});var Bi=w(tn=>{"use strict";Object.defineProperty(tn,"__esModule",{value:!0});tn.getData=tn.KeywordCxt=tn.validateFunctionCode=void 0;var t0=Ix(),Yx=Zi(),lh=eh(),Xa=Zi(),hA=Dx(),Ui=Fx(),uh=Bx(),j=K(),U=Tr(),mA=qi(),Pr=ue(),Fi=Li();function gA(e){if(o0(e)&&(i0(e),n0(e))){vA(e);return}r0(e,()=>(0,t0.topBoolOrEmptySchema)(e))}tn.validateFunctionCode=gA;function r0({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},i){o.code.es5?e.func(t,(0,j._)`${U.default.data}, ${U.default.valCxt}`,n.$async,()=>{e.code((0,j._)`"use strict"; ${Qx(r,o)}`),_A(e,o),e.code(i)}):e.func(t,(0,j._)`${U.default.data}, ${yA(o)}`,n.$async,()=>e.code(Qx(r,o)).code(i))}function yA(e){return(0,j._)`{${U.default.instancePath}="", ${U.default.parentData}, ${U.default.parentDataProperty}, ${U.default.rootData}=${U.default.data}${e.dynamicRef?(0,j._)`, ${U.default.dynamicAnchors}={}`:j.nil}}={}`}function _A(e,t){e.if(U.default.valCxt,()=>{e.var(U.default.instancePath,(0,j._)`${U.default.valCxt}.${U.default.instancePath}`),e.var(U.default.parentData,(0,j._)`${U.default.valCxt}.${U.default.parentData}`),e.var(U.default.parentDataProperty,(0,j._)`${U.default.valCxt}.${U.default.parentDataProperty}`),e.var(U.default.rootData,(0,j._)`${U.default.valCxt}.${U.default.rootData}`),t.dynamicRef&&e.var(U.default.dynamicAnchors,(0,j._)`${U.default.valCxt}.${U.default.dynamicAnchors}`)},()=>{e.var(U.default.instancePath,(0,j._)`""`),e.var(U.default.parentData,(0,j._)`undefined`),e.var(U.default.parentDataProperty,(0,j._)`undefined`),e.var(U.default.rootData,U.default.data),t.dynamicRef&&e.var(U.default.dynamicAnchors,(0,j._)`{}`)})}function vA(e){let{schema:t,opts:r,gen:n}=e;r0(e,()=>{r.$comment&&t.$comment&&a0(e),SA(e),n.let(U.default.vErrors,null),n.let(U.default.errors,0),r.unevaluated&&bA(e),s0(e),PA(e)})}function bA(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,j._)`${r}.evaluated`),t.if((0,j._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,j._)`${e.evaluated}.props`,(0,j._)`undefined`)),t.if((0,j._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,j._)`${e.evaluated}.items`,(0,j._)`undefined`))}function Qx(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,j._)`/*# sourceURL=${r} */`:j.nil}function xA(e,t){if(o0(e)&&(i0(e),n0(e))){kA(e,t);return}(0,t0.boolOrEmptySchema)(e,t)}function n0({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function o0(e){return typeof e.schema!="boolean"}function kA(e,t){let{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&a0(e),$A(e),TA(e);let i=n.const("_errs",U.default.errors);s0(e,i),n.var(t,(0,j._)`${i} === ${U.default.errors}`)}function i0(e){(0,Pr.checkUnknownRules)(e),wA(e)}function s0(e,t){if(e.opts.jtd)return Xx(e,[],!1,t);let r=(0,Yx.getSchemaTypes)(e.schema),n=(0,Yx.coerceAndCheckDataType)(e,r);Xx(e,r,!n,t)}function wA(e){let{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,Pr.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function SA(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Pr.checkStrictMode)(e,"default is ignored in the schema root")}function $A(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,mA.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function TA(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function a0({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){let i=r.$comment;if(o.$comment===!0)e.code((0,j._)`${U.default.self}.logger.log(${i})`);else if(typeof o.$comment=="function"){let s=(0,j.str)`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,j._)`${U.default.self}.opts.$comment(${i}, ${s}, ${a}.schema)`)}}function PA(e){let{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:i}=e;r.$async?t.if((0,j._)`${U.default.errors} === 0`,()=>t.return(U.default.data),()=>t.throw((0,j._)`new ${o}(${U.default.vErrors})`)):(t.assign((0,j._)`${n}.errors`,U.default.vErrors),i.unevaluated&&CA(e),t.return((0,j._)`${U.default.errors} === 0`))}function CA({gen:e,evaluated:t,props:r,items:n}){r instanceof j.Name&&e.assign((0,j._)`${t}.props`,r),n instanceof j.Name&&e.assign((0,j._)`${t}.items`,n)}function Xx(e,t,r,n){let{gen:o,schema:i,data:s,allErrors:a,opts:c,self:u}=e,{RULES:p}=u;if(i.$ref&&(c.ignoreKeywordsWithRef||!(0,Pr.schemaHasRulesButRef)(i,p))){o.block(()=>u0(e,"$ref",p.all.$ref.definition));return}c.jtd||EA(e,t),o.block(()=>{for(let d of p.rules)l(d);l(p.post)});function l(d){(0,lh.shouldUseGroup)(i,d)&&(d.type?(o.if((0,Xa.checkDataType)(d.type,s,c.strictNumbers)),e0(e,d),t.length===1&&t[0]===d.type&&r&&(o.else(),(0,Xa.reportTypeError)(e)),o.endIf()):e0(e,d),a||o.if((0,j._)`${U.default.errors} === ${n||0}`))}}function e0(e,t){let{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&(0,hA.assignDefaults)(e,t.type),r.block(()=>{for(let i of t.rules)(0,lh.shouldUseRule)(n,i)&&u0(e,i.keyword,i.definition,t.type)})}function EA(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(IA(e,t),e.opts.allowUnionTypes||zA(e,t),RA(e,e.dataTypes))}function IA(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{c0(e.dataTypes,r)||ph(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),OA(e,t)}}function zA(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&ph(e,"use allowUnionTypes to allow union type keyword")}function RA(e,t){let r=e.self.RULES.all;for(let n in r){let o=r[n];if(typeof o=="object"&&(0,lh.shouldUseRule)(e.schema,o)){let{type:i}=o.definition;i.length&&!i.some(s=>AA(t,s))&&ph(e,`missing type "${i.join(",")}" for keyword "${n}"`)}}}function AA(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function c0(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function OA(e,t){let r=[];for(let n of e.dataTypes)c0(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function ph(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,Pr.checkStrictMode)(e,t,e.opts.strictTypes)}var ec=class{constructor(t,r,n){if((0,Ui.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Pr.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",l0(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Ui.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",U.default.errors))}result(t,r,n){this.failResult((0,j.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,j.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:r}=this;this.fail((0,j._)`${r} !== undefined && (${(0,j.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Fi.reportExtraError:Fi.reportError)(this,this.def.error,r)}$dataError(){(0,Fi.reportError)(this,this.def.$dataError||Fi.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Fi.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=j.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=j.nil,r=j.nil){if(!this.$data)return;let{gen:n,schemaCode:o,schemaType:i,def:s}=this;n.if((0,j.or)((0,j._)`${o} === undefined`,r)),t!==j.nil&&n.assign(t,!0),(i.length||s.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==j.nil&&n.assign(t,!1)),n.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:n,def:o,it:i}=this;return(0,j.or)(s(),a());function s(){if(n.length){if(!(r instanceof j.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,j._)`${(0,Xa.checkDataTypes)(c,r,i.opts.strictNumbers,Xa.DataType.Wrong)}`}return j.nil}function a(){if(o.validateSchema){let c=t.scopeValue("validate$data",{ref:o.validateSchema});return(0,j._)`!${c}(${r})`}return j.nil}}subschema(t,r){let n=(0,uh.getSubschema)(this.it,t);(0,uh.extendSubschemaData)(n,this.it,t),(0,uh.extendSubschemaMode)(n,t);let o={...this.it,...n,items:void 0,props:void 0};return xA(o,r),o}mergeEvaluated(t,r){let{it:n,gen:o}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=Pr.mergeEvaluated.props(o,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=Pr.mergeEvaluated.items(o,t.items,n.items,r)))}mergeValidEvaluated(t,r){let{it:n,gen:o}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return o.if(r,()=>this.mergeEvaluated(t,j.Name)),!0}};tn.KeywordCxt=ec;function u0(e,t,r,n){let o=new ec(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,Ui.funcKeywordCode)(o,r):"macro"in r?(0,Ui.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,Ui.funcKeywordCode)(o,r)}var NA=/^\/(?:[^~]|~0|~1)*$/,jA=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function l0(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,i;if(e==="")return U.default.rootData;if(e[0]==="/"){if(!NA.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,i=U.default.rootData}else{let u=jA.exec(e);if(!u)throw new Error(`Invalid JSON-pointer: ${e}`);let p=+u[1];if(o=u[2],o==="#"){if(p>=t)throw new Error(c("property/index",p));return n[t-p]}if(p>t)throw new Error(c("data",p));if(i=r[t-p],!o)return i}let s=i,a=o.split("/");for(let u of a)u&&(i=(0,j._)`${i}${(0,j.getProperty)((0,Pr.unescapeJsonPointer)(u))}`,s=(0,j._)`${s} && ${i}`);return s;function c(u,p){return`Cannot access ${u} ${p} levels up, current level is ${t}`}}tn.getData=l0});var tc=w(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:!0});var dh=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};fh.default=dh});var Vi=w(gh=>{"use strict";Object.defineProperty(gh,"__esModule",{value:!0});var hh=qi(),mh=class extends Error{constructor(t,r,n,o){super(o||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,hh.resolveUrl)(t,r,n),this.missingSchema=(0,hh.normalizeId)((0,hh.getFullPath)(t,this.missingRef))}};gh.default=mh});var nc=w(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.resolveSchema=Lt.getCompilingSchema=Lt.resolveRef=Lt.compileSchema=Lt.SchemaEnv=void 0;var Kt=K(),DA=tc(),Zn=Tr(),Jt=qi(),p0=ue(),MA=Bi(),To=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,Jt.normalizeId)(n?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n?.$async,this.refs={}}};Lt.SchemaEnv=To;function _h(e){let t=d0.call(this,e);if(t)return t;let r=(0,Jt.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:o}=this.opts.code,{ownProperties:i}=this.opts,s=new Kt.CodeGen(this.scope,{es5:n,lines:o,ownProperties:i}),a;e.$async&&(a=s.scopeValue("Error",{ref:DA.default,code:(0,Kt._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");e.validateName=c;let u={gen:s,allErrors:this.opts.allErrors,data:Zn.default.data,parentData:Zn.default.parentData,parentDataProperty:Zn.default.parentDataProperty,dataNames:[Zn.default.data],dataPathArr:[Kt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Kt.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Kt.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Kt._)`""`,opts:this.opts,self:this},p;try{this._compilations.add(e),(0,MA.validateFunctionCode)(u),s.optimize(this.opts.code.optimize);let l=s.toString();p=`${s.scopeRefs(Zn.default.scope)}return ${l}`,this.opts.code.process&&(p=this.opts.code.process(p,e));let h=new Function(`${Zn.default.self}`,`${Zn.default.scope}`,p)(this,this.scope.get());if(this.scope.value(c,{ref:h}),h.errors=null,h.schema=e.schema,h.schemaEnv=e,e.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:c,validateCode:l,scopeValues:s._values}),this.opts.unevaluated){let{props:f,items:m}=u;h.evaluated={props:f instanceof Kt.Name?void 0:f,items:m instanceof Kt.Name?void 0:m,dynamicProps:f instanceof Kt.Name,dynamicItems:m instanceof Kt.Name},h.source&&(h.source.evaluated=(0,Kt.stringify)(h.evaluated))}return e.validate=h,e}catch(l){throw delete e.validate,delete e.validateName,p&&this.logger.error("Error compiling schema, function code:",p),l}finally{this._compilations.delete(e)}}Lt.compileSchema=_h;function LA(e,t,r){var n;r=(0,Jt.resolveUrl)(this.opts.uriResolver,t,r);let o=e.refs[r];if(o)return o;let i=FA.call(this,e,r);if(i===void 0){let s=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;s&&(i=new To({schema:s,schemaId:a,root:e,baseId:t}))}if(i!==void 0)return e.refs[r]=ZA.call(this,i)}Lt.resolveRef=LA;function ZA(e){return(0,Jt.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:_h.call(this,e)}function d0(e){for(let t of this._compilations)if(qA(t,e))return t}Lt.getCompilingSchema=d0;function qA(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function FA(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||rc.call(this,e,t)}function rc(e,t){let r=this.opts.uriResolver.parse(t),n=(0,Jt._getFullPath)(this.opts.uriResolver,r),o=(0,Jt.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return yh.call(this,r,e);let i=(0,Jt.normalizeId)(n),s=this.refs[i]||this.schemas[i];if(typeof s=="string"){let a=rc.call(this,e,s);return typeof a?.schema!="object"?void 0:yh.call(this,r,a)}if(typeof s?.schema=="object"){if(s.validate||_h.call(this,s),i===(0,Jt.normalizeId)(t)){let{schema:a}=s,{schemaId:c}=this.opts,u=a[c];return u&&(o=(0,Jt.resolveUrl)(this.opts.uriResolver,o,u)),new To({schema:a,schemaId:c,root:e,baseId:o})}return yh.call(this,r,s)}}Lt.resolveSchema=rc;var UA=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function yh(e,{baseId:t,schema:r,root:n}){var o;if(((o=e.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(let a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,p0.unescapeFragment)(a)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!UA.has(a)&&u&&(t=(0,Jt.resolveUrl)(this.opts.uriResolver,t,u))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,p0.schemaHasRulesButRef)(r,this.RULES)){let a=(0,Jt.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=rc.call(this,n,a)}let{schemaId:s}=this.opts;if(i=i||new To({schema:r,schemaId:s,root:n,baseId:t}),i.schema!==i.root.schema)return i}});var f0=w((NF,BA)=>{BA.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var bh=w((jF,y0)=>{"use strict";var VA=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),m0=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function vh(e){let t="",r=0,n=0;for(n=0;n<e.length;n++)if(r=e[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n];break}for(n+=1;n<e.length;n++){if(r=e[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[n]}return t}var HA=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function h0(e){return e.length=0,!0}function GA(e,t,r){if(e.length){let n=vh(e);if(n!=="")t.push(n);else return r.error=!0,!1;e.length=0}return!0}function WA(e){let t=0,r={error:!1,address:"",zone:""},n=[],o=[],i=!1,s=!1,a=GA;for(let c=0;c<e.length;c++){let u=e[c];if(!(u==="["||u==="]"))if(u===":"){if(i===!0&&(s=!0),!a(o,n,r))break;if(++t>7){r.error=!0;break}c>0&&e[c-1]===":"&&(i=!0),n.push(":");continue}else if(u==="%"){if(!a(o,n,r))break;a=h0}else{o.push(u);continue}}return o.length&&(a===h0?r.zone=o.join(""):s?n.push(o.join("")):n.push(vh(o))),r.address=n.join(""),r}function g0(e){if(KA(e,":")<2)return{host:e,isIPV6:!1};let t=WA(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,n=t.address;return t.zone&&(r+="%"+t.zone,n+="%25"+t.zone),{host:r,isIPV6:!0,escapedHost:n}}}function KA(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]===t&&r++;return r}function JA(e){let t=e,r=[],n=-1,o=0;for(;o=t.length;){if(o===1){if(t===".")break;if(t==="/"){r.push("/");break}else{r.push(t);break}}else if(o===2){if(t[0]==="."){if(t[1]===".")break;if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&(t[1]==="."||t[1]==="/")){r.push("/");break}}else if(o===3&&t==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."&&t[3]==="/"){t=t.slice(3),r.length!==0&&r.pop();continue}}if((n=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,n)),t=t.slice(n)}return r.join("")}function YA(e,t){let r=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=r(e.scheme)),e.userinfo!==void 0&&(e.userinfo=r(e.userinfo)),e.host!==void 0&&(e.host=r(e.host)),e.path!==void 0&&(e.path=r(e.path)),e.query!==void 0&&(e.query=r(e.query)),e.fragment!==void 0&&(e.fragment=r(e.fragment)),e}function QA(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host);if(!m0(r)){let n=g0(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=e.host}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}y0.exports={nonSimpleDomain:HA,recomposeAuthority:QA,normalizeComponentEncoding:YA,removeDotSegments:JA,isIPv4:m0,isUUID:VA,normalizeIPv6:g0,stringArrayToHexStripped:vh}});var k0=w((DF,x0)=>{"use strict";var{isUUID:XA}=bh(),eO=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,tO=["http","https","ws","wss","urn","urn:uuid"];function rO(e){return tO.indexOf(e)!==-1}function xh(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S"):!1}function _0(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function v0(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function nO(e){return e.secure=xh(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function oO(e){if((e.port===(xh(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function iO(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(eO);if(r){let n=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let o=`${n}:${t.nid||e.nid}`,i=kh(o);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function sO(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),o=`${r}:${t.nid||n}`,i=kh(o);i&&(e=i.serialize(e,t));let s=e,a=e.nss;return s.path=`${n||t.nid}:${a}`,t.skipEscape=!0,s}function aO(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!XA(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function cO(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var b0={scheme:"http",domainHost:!0,parse:_0,serialize:v0},uO={scheme:"https",domainHost:b0.domainHost,parse:_0,serialize:v0},oc={scheme:"ws",domainHost:!0,parse:nO,serialize:oO},lO={scheme:"wss",domainHost:oc.domainHost,parse:oc.parse,serialize:oc.serialize},pO={scheme:"urn",parse:iO,serialize:sO,skipNormalize:!0},dO={scheme:"urn:uuid",parse:aO,serialize:cO,skipNormalize:!0},ic={http:b0,https:uO,ws:oc,wss:lO,urn:pO,"urn:uuid":dO};Object.setPrototypeOf(ic,null);function kh(e){return e&&(ic[e]||ic[e.toLowerCase()])||void 0}x0.exports={wsIsSecure:xh,SCHEMES:ic,isValidSchemeName:rO,getSchemeHandler:kh}});var $0=w((MF,ac)=>{"use strict";var{normalizeIPv6:fO,removeDotSegments:Hi,recomposeAuthority:hO,normalizeComponentEncoding:sc,isIPv4:mO,nonSimpleDomain:gO}=bh(),{SCHEMES:yO,getSchemeHandler:w0}=k0();function _O(e,t){return typeof e=="string"?e=pr(Cr(e,t),t):typeof e=="object"&&(e=Cr(pr(e,t),t)),e}function vO(e,t,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},o=S0(Cr(e,n),Cr(t,n),n,!0);return n.skipEscape=!0,pr(o,n)}function S0(e,t,r,n){let o={};return n||(e=Cr(pr(e,r),r),t=Cr(pr(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(o.scheme=t.scheme,o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=Hi(t.path||""),o.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(o.userinfo=t.userinfo,o.host=t.host,o.port=t.port,o.path=Hi(t.path||""),o.query=t.query):(t.path?(t.path[0]==="/"?o.path=Hi(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?o.path="/"+t.path:e.path?o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:o.path=t.path,o.path=Hi(o.path)),o.query=t.query):(o.path=e.path,t.query!==void 0?o.query=t.query:o.query=e.query),o.userinfo=e.userinfo,o.host=e.host,o.port=e.port),o.scheme=e.scheme),o.fragment=t.fragment,o}function bO(e,t,r){return typeof e=="string"?(e=unescape(e),e=pr(sc(Cr(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=pr(sc(e,!0),{...r,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=pr(sc(Cr(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=pr(sc(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function pr(e,t){let r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),o=[],i=w0(n.scheme||r.scheme);i&&i.serialize&&i.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&o.push(r.scheme,":");let s=hO(r);if(s!==void 0&&(n.reference!=="suffix"&&o.push("//"),o.push(s),r.path&&r.path[0]!=="/"&&o.push("/")),r.path!==void 0){let a=r.path;!n.absolutePath&&(!i||!i.absolutePath)&&(a=Hi(a)),s===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),o.push(a)}return r.query!==void 0&&o.push("?",r.query),r.fragment!==void 0&&o.push("#",r.fragment),o.join("")}var xO=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Cr(e,t){let r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=!1;r.reference==="suffix"&&(r.scheme?e=r.scheme+":"+e:e="//"+e);let i=e.match(xO);if(i){if(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5]),n.host)if(mO(n.host)===!1){let c=fO(n.host);n.host=c.host.toLowerCase(),o=c.isIPV6}else o=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let s=w0(r.scheme||n.scheme);if(!r.unicodeSupport&&(!s||!s.unicodeSupport)&&n.host&&(r.domainHost||s&&s.domainHost)&&o===!1&&gO(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(a){n.error=n.error||"Host's domain name can not be converted to ASCII: "+a}(!s||s&&!s.skipNormalize)&&(e.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=unescape(n.host))),n.path&&(n.path=escape(unescape(n.path))),n.fragment&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),s&&s.parse&&s.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var wh={SCHEMES:yO,normalize:_O,resolve:vO,resolveComponent:S0,equal:bO,serialize:pr,parse:Cr};ac.exports=wh;ac.exports.default=wh;ac.exports.fastUri=wh});var P0=w(Sh=>{"use strict";Object.defineProperty(Sh,"__esModule",{value:!0});var T0=$0();T0.code='require("ajv/dist/runtime/uri").default';Sh.default=T0});var N0=w(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.CodeGen=Ve.Name=Ve.nil=Ve.stringify=Ve.str=Ve._=Ve.KeywordCxt=void 0;var kO=Bi();Object.defineProperty(Ve,"KeywordCxt",{enumerable:!0,get:function(){return kO.KeywordCxt}});var Po=K();Object.defineProperty(Ve,"_",{enumerable:!0,get:function(){return Po._}});Object.defineProperty(Ve,"str",{enumerable:!0,get:function(){return Po.str}});Object.defineProperty(Ve,"stringify",{enumerable:!0,get:function(){return Po.stringify}});Object.defineProperty(Ve,"nil",{enumerable:!0,get:function(){return Po.nil}});Object.defineProperty(Ve,"Name",{enumerable:!0,get:function(){return Po.Name}});Object.defineProperty(Ve,"CodeGen",{enumerable:!0,get:function(){return Po.CodeGen}});var wO=tc(),R0=Vi(),SO=Xf(),Gi=nc(),$O=K(),Wi=qi(),cc=Zi(),Th=ue(),C0=f0(),TO=P0(),A0=(e,t)=>new RegExp(e,t);A0.code="new RegExp";var PO=["removeAdditional","useDefaults","coerceTypes"],CO=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),EO={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},IO={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},E0=200;function zO(e){var t,r,n,o,i,s,a,c,u,p,l,d,h,f,m,y,_,b,T,S,C,Q,H,pt,Le;let ze=e.strict,Dr=(t=e.code)===null||t===void 0?void 0:t.optimize,It=Dr===!0||Dr===void 0?1:Dr||0,Xo=(n=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:A0,eo=(o=e.uriResolver)!==null&&o!==void 0?o:TO.default;return{strictSchema:(s=(i=e.strictSchema)!==null&&i!==void 0?i:ze)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=e.strictNumbers)!==null&&a!==void 0?a:ze)!==null&&c!==void 0?c:!0,strictTypes:(p=(u=e.strictTypes)!==null&&u!==void 0?u:ze)!==null&&p!==void 0?p:"log",strictTuples:(d=(l=e.strictTuples)!==null&&l!==void 0?l:ze)!==null&&d!==void 0?d:"log",strictRequired:(f=(h=e.strictRequired)!==null&&h!==void 0?h:ze)!==null&&f!==void 0?f:!1,code:e.code?{...e.code,optimize:It,regExp:Xo}:{optimize:It,regExp:Xo},loopRequired:(m=e.loopRequired)!==null&&m!==void 0?m:E0,loopEnum:(y=e.loopEnum)!==null&&y!==void 0?y:E0,meta:(_=e.meta)!==null&&_!==void 0?_:!0,messages:(b=e.messages)!==null&&b!==void 0?b:!0,inlineRefs:(T=e.inlineRefs)!==null&&T!==void 0?T:!0,schemaId:(S=e.schemaId)!==null&&S!==void 0?S:"$id",addUsedSchema:(C=e.addUsedSchema)!==null&&C!==void 0?C:!0,validateSchema:(Q=e.validateSchema)!==null&&Q!==void 0?Q:!0,validateFormats:(H=e.validateFormats)!==null&&H!==void 0?H:!0,unicodeRegExp:(pt=e.unicodeRegExp)!==null&&pt!==void 0?pt:!0,int32range:(Le=e.int32range)!==null&&Le!==void 0?Le:!0,uriResolver:eo}}var Ki=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...zO(t)};let{es5:r,lines:n}=this.opts.code;this.scope=new $O.ValueScope({scope:{},prefixes:CO,es5:r,lines:n}),this.logger=DO(t.logger);let o=t.validateFormats;t.validateFormats=!1,this.RULES=(0,SO.getRules)(),I0.call(this,EO,t,"NOT SUPPORTED"),I0.call(this,IO,t,"DEPRECATED","warn"),this._metaOpts=NO.call(this),t.formats&&AO.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&OO.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),RO.call(this),t.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:n}=this.opts,o=C0;n==="id"&&(o={...C0},o.id=o.$id,delete o.$id),r&&t&&this.addMetaSchema(o,o[n],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){let n;if(typeof t=="string"){if(n=this.getSchema(t),!n)throw new Error(`no schema with key or ref "${t}"`)}else n=this.compile(t);let o=n(r);return"$async"in n||(this.errors=n.errors),o}compile(t,r){let n=this._addSchema(t,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return o.call(this,t,r);async function o(p,l){await i.call(this,p.$schema);let d=this._addSchema(p,l);return d.validate||s.call(this,d)}async function i(p){p&&!this.getSchema(p)&&await o.call(this,{$ref:p},!0)}async function s(p){try{return this._compileSchemaEnv(p)}catch(l){if(!(l instanceof R0.default))throw l;return a.call(this,l),await c.call(this,l.missingSchema),s.call(this,p)}}function a({missingSchema:p,missingRef:l}){if(this.refs[p])throw new Error(`AnySchema ${p} is loaded but ${l} cannot be resolved`)}async function c(p){let l=await u.call(this,p);this.refs[p]||await i.call(this,l.$schema),this.refs[p]||this.addSchema(l,p,r)}async function u(p){let l=this._loading[p];if(l)return l;try{return await(this._loading[p]=n(p))}finally{delete this._loading[p]}}}addSchema(t,r,n,o=this.opts.validateSchema){if(Array.isArray(t)){for(let s of t)this.addSchema(s,void 0,n,o);return this}let i;if(typeof t=="object"){let{schemaId:s}=this.opts;if(i=t[s],i!==void 0&&typeof i!="string")throw new Error(`schema ${s} must be string`)}return r=(0,Wi.normalizeId)(r||i),this._checkUnique(r),this.schemas[r]=this._addSchema(t,n,r,o,!0),this}addMetaSchema(t,r,n=this.opts.validateSchema){return this.addSchema(t,r,!0,n),this}validateSchema(t,r){if(typeof t=="boolean")return!0;let n;if(n=t.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let o=this.validate(n,t);if(!o&&r){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return o}getSchema(t){let r;for(;typeof(r=z0.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:n}=this.opts,o=new Gi.SchemaEnv({schema:{},schemaId:n});if(r=Gi.resolveSchema.call(this,o,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let r=z0.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let n=t[this.opts.schemaId];return n&&(n=(0,Wi.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let n;if(typeof t=="string")n=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof t=="object"&&r===void 0){if(r=t,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(LO.call(this,n,r),!r)return(0,Th.eachItem)(n,i=>$h.call(this,i)),this;qO.call(this,r);let o={...r,type:(0,cc.getJSONTypes)(r.type),schemaType:(0,cc.getJSONTypes)(r.schemaType)};return(0,Th.eachItem)(n,o.type.length===0?i=>$h.call(this,i,o):i=>o.type.forEach(s=>$h.call(this,i,o,s))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let n of r.rules){let o=n.rules.findIndex(i=>i.keyword===t);o>=0&&n.rules.splice(o,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!t||t.length===0?"No errors":t.map(o=>`${n}${o.instancePath} ${o.message}`).reduce((o,i)=>o+r+i)}$dataMetaSchema(t,r){let n=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let o of r){let i=o.split("/").slice(1),s=t;for(let a of i)s=s[a];for(let a in n){let c=n[a];if(typeof c!="object")continue;let{$data:u}=c.definition,p=s[a];u&&p&&(s[a]=O0(p))}}return t}_removeAllSchemas(t,r){for(let n in t){let o=t[n];(!r||r.test(n))&&(typeof o=="string"?delete t[n]:o&&!o.meta&&(this._cache.delete(o.schema),delete t[n]))}}_addSchema(t,r,n,o=this.opts.validateSchema,i=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof t=="object")s=t[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;n=(0,Wi.normalizeId)(s||n);let u=Wi.getSchemaRefs.call(this,t,n);return c=new Gi.SchemaEnv({schema:t,schemaId:a,meta:r,baseId:n,localRefs:u}),this._cache.set(c.schema,c),i&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),o&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):Gi.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{Gi.compileSchema.call(this,t)}finally{this.opts=r}}};Ki.ValidationError=wO.default;Ki.MissingRefError=R0.default;Ve.default=Ki;function I0(e,t,r,n="error"){for(let o in e){let i=o;i in t&&this.logger[n](`${r}: option ${o}. ${e[i]}`)}}function z0(e){return e=(0,Wi.normalizeId)(e),this.schemas[e]||this.refs[e]}function RO(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function AO(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function OO(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function NO(){let e={...this.opts};for(let t of PO)delete e[t];return e}var jO={log(){},warn(){},error(){}};function DO(e){if(e===!1)return jO;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var MO=/^[a-z_$][a-z0-9_$:-]*$/i;function LO(e,t){let{RULES:r}=this;if((0,Th.eachItem)(e,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!MO.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function $h(e,t,r){var n;let o=t?.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,s=o?i.post:i.rules.find(({type:c})=>c===r);if(s||(s={type:r,rules:[]},i.rules.push(s)),i.keywords[e]=!0,!t)return;let a={keyword:e,definition:{...t,type:(0,cc.getJSONTypes)(t.type),schemaType:(0,cc.getJSONTypes)(t.schemaType)}};t.before?ZO.call(this,s,a,t.before):s.rules.push(a),i.all[e]=a,(n=t.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function ZO(e,t,r){let n=e.rules.findIndex(o=>o.keyword===r);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function qO(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=O0(t)),e.validateSchema=this.compile(t,!0))}var FO={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function O0(e){return{anyOf:[e,FO]}}});var j0=w(Ph=>{"use strict";Object.defineProperty(Ph,"__esModule",{value:!0});var UO={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Ph.default=UO});var Z0=w(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.callRef=qn.getValidate=void 0;var BO=Vi(),D0=Mt(),vt=K(),Co=Tr(),M0=nc(),uc=ue(),VO={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:n}=e,{baseId:o,schemaEnv:i,validateName:s,opts:a,self:c}=n,{root:u}=i;if((r==="#"||r==="#/")&&o===u.baseId)return l();let p=M0.resolveRef.call(c,u,o,r);if(p===void 0)throw new BO.default(n.opts.uriResolver,o,r);if(p instanceof M0.SchemaEnv)return d(p);return h(p);function l(){if(i===u)return lc(e,s,i,i.$async);let f=t.scopeValue("root",{ref:u});return lc(e,(0,vt._)`${f}.validate`,u,u.$async)}function d(f){let m=L0(e,f);lc(e,m,f,f.$async)}function h(f){let m=t.scopeValue("schema",a.code.source===!0?{ref:f,code:(0,vt.stringify)(f)}:{ref:f}),y=t.name("valid"),_=e.subschema({schema:f,dataTypes:[],schemaPath:vt.nil,topSchemaRef:m,errSchemaPath:r},y);e.mergeEvaluated(_),e.ok(y)}}};function L0(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,vt._)`${r.scopeValue("wrapper",{ref:t})}.validate`}qn.getValidate=L0;function lc(e,t,r,n){let{gen:o,it:i}=e,{allErrors:s,schemaEnv:a,opts:c}=i,u=c.passContext?Co.default.this:vt.nil;n?p():l();function p(){if(!a.$async)throw new Error("async schema referenced by sync schema");let f=o.let("valid");o.try(()=>{o.code((0,vt._)`await ${(0,D0.callValidateCode)(e,t,u)}`),h(t),s||o.assign(f,!0)},m=>{o.if((0,vt._)`!(${m} instanceof ${i.ValidationError})`,()=>o.throw(m)),d(m),s||o.assign(f,!1)}),e.ok(f)}function l(){e.result((0,D0.callValidateCode)(e,t,u),()=>h(t),()=>d(t))}function d(f){let m=(0,vt._)`${f}.errors`;o.assign(Co.default.vErrors,(0,vt._)`${Co.default.vErrors} === null ? ${m} : ${Co.default.vErrors}.concat(${m})`),o.assign(Co.default.errors,(0,vt._)`${Co.default.vErrors}.length`)}function h(f){var m;if(!i.opts.unevaluated)return;let y=(m=r?.validate)===null||m===void 0?void 0:m.evaluated;if(i.props!==!0)if(y&&!y.dynamicProps)y.props!==void 0&&(i.props=uc.mergeEvaluated.props(o,y.props,i.props));else{let _=o.var("props",(0,vt._)`${f}.evaluated.props`);i.props=uc.mergeEvaluated.props(o,_,i.props,vt.Name)}if(i.items!==!0)if(y&&!y.dynamicItems)y.items!==void 0&&(i.items=uc.mergeEvaluated.items(o,y.items,i.items));else{let _=o.var("items",(0,vt._)`${f}.evaluated.items`);i.items=uc.mergeEvaluated.items(o,_,i.items,vt.Name)}}}qn.callRef=lc;qn.default=VO});var q0=w(Ch=>{"use strict";Object.defineProperty(Ch,"__esModule",{value:!0});var HO=j0(),GO=Z0(),WO=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",HO.default,GO.default];Ch.default=WO});var F0=w(Eh=>{"use strict";Object.defineProperty(Eh,"__esModule",{value:!0});var pc=K(),rn=pc.operators,dc={maximum:{okStr:"<=",ok:rn.LTE,fail:rn.GT},minimum:{okStr:">=",ok:rn.GTE,fail:rn.LT},exclusiveMaximum:{okStr:"<",ok:rn.LT,fail:rn.GTE},exclusiveMinimum:{okStr:">",ok:rn.GT,fail:rn.LTE}},KO={message:({keyword:e,schemaCode:t})=>(0,pc.str)`must be ${dc[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,pc._)`{comparison: ${dc[e].okStr}, limit: ${t}}`},JO={keyword:Object.keys(dc),type:"number",schemaType:"number",$data:!0,error:KO,code(e){let{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,pc._)`${r} ${dc[t].fail} ${n} || isNaN(${r})`)}};Eh.default=JO});var U0=w(Ih=>{"use strict";Object.defineProperty(Ih,"__esModule",{value:!0});var Ji=K(),YO={message:({schemaCode:e})=>(0,Ji.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Ji._)`{multipleOf: ${e}}`},QO={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:YO,code(e){let{gen:t,data:r,schemaCode:n,it:o}=e,i=o.opts.multipleOfPrecision,s=t.let("res"),a=i?(0,Ji._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${i}`:(0,Ji._)`${s} !== parseInt(${s})`;e.fail$data((0,Ji._)`(${n} === 0 || (${s} = ${r}/${n}, ${a}))`)}};Ih.default=QO});var V0=w(zh=>{"use strict";Object.defineProperty(zh,"__esModule",{value:!0});function B0(e){let t=e.length,r=0,n=0,o;for(;n<t;)r++,o=e.charCodeAt(n++),o>=55296&&o<=56319&&n<t&&(o=e.charCodeAt(n),(o&64512)===56320&&n++);return r}zh.default=B0;B0.code='require("ajv/dist/runtime/ucs2length").default'});var H0=w(Rh=>{"use strict";Object.defineProperty(Rh,"__esModule",{value:!0});var Fn=K(),XO=ue(),e4=V0(),t4={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,Fn.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,Fn._)`{limit: ${e}}`},r4={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:t4,code(e){let{keyword:t,data:r,schemaCode:n,it:o}=e,i=t==="maxLength"?Fn.operators.GT:Fn.operators.LT,s=o.opts.unicode===!1?(0,Fn._)`${r}.length`:(0,Fn._)`${(0,XO.useFunc)(e.gen,e4.default)}(${r})`;e.fail$data((0,Fn._)`${s} ${i} ${n}`)}};Rh.default=r4});var G0=w(Ah=>{"use strict";Object.defineProperty(Ah,"__esModule",{value:!0});var n4=Mt(),fc=K(),o4={message:({schemaCode:e})=>(0,fc.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,fc._)`{pattern: ${e}}`},i4={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:o4,code(e){let{data:t,$data:r,schema:n,schemaCode:o,it:i}=e,s=i.opts.unicodeRegExp?"u":"",a=r?(0,fc._)`(new RegExp(${o}, ${s}))`:(0,n4.usePattern)(e,n);e.fail$data((0,fc._)`!${a}.test(${t})`)}};Ah.default=i4});var W0=w(Oh=>{"use strict";Object.defineProperty(Oh,"__esModule",{value:!0});var Yi=K(),s4={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,Yi.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Yi._)`{limit: ${e}}`},a4={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:s4,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxProperties"?Yi.operators.GT:Yi.operators.LT;e.fail$data((0,Yi._)`Object.keys(${r}).length ${o} ${n}`)}};Oh.default=a4});var K0=w(Nh=>{"use strict";Object.defineProperty(Nh,"__esModule",{value:!0});var Qi=Mt(),Xi=K(),c4=ue(),u4={message:({params:{missingProperty:e}})=>(0,Xi.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Xi._)`{missingProperty: ${e}}`},l4={keyword:"required",type:"object",schemaType:"array",$data:!0,error:u4,code(e){let{gen:t,schema:r,schemaCode:n,data:o,$data:i,it:s}=e,{opts:a}=s;if(!i&&r.length===0)return;let c=r.length>=a.loopRequired;if(s.allErrors?u():p(),a.strictRequired){let h=e.parentSchema.properties,{definedProperties:f}=e.it;for(let m of r)if(h?.[m]===void 0&&!f.has(m)){let y=s.schemaEnv.baseId+s.errSchemaPath,_=`required property "${m}" is not defined at "${y}" (strictRequired)`;(0,c4.checkStrictMode)(s,_,s.opts.strictRequired)}}function u(){if(c||i)e.block$data(Xi.nil,l);else for(let h of r)(0,Qi.checkReportMissingProp)(e,h)}function p(){let h=t.let("missing");if(c||i){let f=t.let("valid",!0);e.block$data(f,()=>d(h,f)),e.ok(f)}else t.if((0,Qi.checkMissingProp)(e,r,h)),(0,Qi.reportMissingProp)(e,h),t.else()}function l(){t.forOf("prop",n,h=>{e.setParams({missingProperty:h}),t.if((0,Qi.noPropertyInData)(t,o,h,a.ownProperties),()=>e.error())})}function d(h,f){e.setParams({missingProperty:h}),t.forOf(h,n,()=>{t.assign(f,(0,Qi.propertyInData)(t,o,h,a.ownProperties)),t.if((0,Xi.not)(f),()=>{e.error(),t.break()})},Xi.nil)}}};Nh.default=l4});var J0=w(jh=>{"use strict";Object.defineProperty(jh,"__esModule",{value:!0});var es=K(),p4={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,es.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,es._)`{limit: ${e}}`},d4={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:p4,code(e){let{keyword:t,data:r,schemaCode:n}=e,o=t==="maxItems"?es.operators.GT:es.operators.LT;e.fail$data((0,es._)`${r}.length ${o} ${n}`)}};jh.default=d4});var hc=w(Dh=>{"use strict";Object.defineProperty(Dh,"__esModule",{value:!0});var Y0=ah();Y0.code='require("ajv/dist/runtime/equal").default';Dh.default=Y0});var Q0=w(Lh=>{"use strict";Object.defineProperty(Lh,"__esModule",{value:!0});var Mh=Zi(),He=K(),f4=ue(),h4=hc(),m4={message:({params:{i:e,j:t}})=>(0,He.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,He._)`{i: ${e}, j: ${t}}`},g4={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:m4,code(e){let{gen:t,data:r,$data:n,schema:o,parentSchema:i,schemaCode:s,it:a}=e;if(!n&&!o)return;let c=t.let("valid"),u=i.items?(0,Mh.getSchemaTypes)(i.items):[];e.block$data(c,p,(0,He._)`${s} === false`),e.ok(c);function p(){let f=t.let("i",(0,He._)`${r}.length`),m=t.let("j");e.setParams({i:f,j:m}),t.assign(c,!0),t.if((0,He._)`${f} > 1`,()=>(l()?d:h)(f,m))}function l(){return u.length>0&&!u.some(f=>f==="object"||f==="array")}function d(f,m){let y=t.name("item"),_=(0,Mh.checkDataTypes)(u,y,a.opts.strictNumbers,Mh.DataType.Wrong),b=t.const("indices",(0,He._)`{}`);t.for((0,He._)`;${f}--;`,()=>{t.let(y,(0,He._)`${r}[${f}]`),t.if(_,(0,He._)`continue`),u.length>1&&t.if((0,He._)`typeof ${y} == "string"`,(0,He._)`${y} += "_"`),t.if((0,He._)`typeof ${b}[${y}] == "number"`,()=>{t.assign(m,(0,He._)`${b}[${y}]`),e.error(),t.assign(c,!1).break()}).code((0,He._)`${b}[${y}] = ${f}`)})}function h(f,m){let y=(0,f4.useFunc)(t,h4.default),_=t.name("outer");t.label(_).for((0,He._)`;${f}--;`,()=>t.for((0,He._)`${m} = ${f}; ${m}--;`,()=>t.if((0,He._)`${y}(${r}[${f}], ${r}[${m}])`,()=>{e.error(),t.assign(c,!1).break(_)})))}}};Lh.default=g4});var X0=w(qh=>{"use strict";Object.defineProperty(qh,"__esModule",{value:!0});var Zh=K(),y4=ue(),_4=hc(),v4={message:"must be equal to constant",params:({schemaCode:e})=>(0,Zh._)`{allowedValue: ${e}}`},b4={keyword:"const",$data:!0,error:v4,code(e){let{gen:t,data:r,$data:n,schemaCode:o,schema:i}=e;n||i&&typeof i=="object"?e.fail$data((0,Zh._)`!${(0,y4.useFunc)(t,_4.default)}(${r}, ${o})`):e.fail((0,Zh._)`${i} !== ${r}`)}};qh.default=b4});var ek=w(Fh=>{"use strict";Object.defineProperty(Fh,"__esModule",{value:!0});var ts=K(),x4=ue(),k4=hc(),w4={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,ts._)`{allowedValues: ${e}}`},S4={keyword:"enum",schemaType:"array",$data:!0,error:w4,code(e){let{gen:t,data:r,$data:n,schema:o,schemaCode:i,it:s}=e;if(!n&&o.length===0)throw new Error("enum must have non-empty array");let a=o.length>=s.opts.loopEnum,c,u=()=>c??(c=(0,x4.useFunc)(t,k4.default)),p;if(a||n)p=t.let("valid"),e.block$data(p,l);else{if(!Array.isArray(o))throw new Error("ajv implementation error");let h=t.const("vSchema",i);p=(0,ts.or)(...o.map((f,m)=>d(h,m)))}e.pass(p);function l(){t.assign(p,!1),t.forOf("v",i,h=>t.if((0,ts._)`${u()}(${r}, ${h})`,()=>t.assign(p,!0).break()))}function d(h,f){let m=o[f];return typeof m=="object"&&m!==null?(0,ts._)`${u()}(${r}, ${h}[${f}])`:(0,ts._)`${r} === ${m}`}}};Fh.default=S4});var tk=w(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});var $4=F0(),T4=U0(),P4=H0(),C4=G0(),E4=W0(),I4=K0(),z4=J0(),R4=Q0(),A4=X0(),O4=ek(),N4=[$4.default,T4.default,P4.default,C4.default,E4.default,I4.default,z4.default,R4.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},A4.default,O4.default];Uh.default=N4});var Vh=w(rs=>{"use strict";Object.defineProperty(rs,"__esModule",{value:!0});rs.validateAdditionalItems=void 0;var Un=K(),Bh=ue(),j4={message:({params:{len:e}})=>(0,Un.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Un._)`{limit: ${e}}`},D4={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:j4,code(e){let{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,Bh.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}rk(e,n)}};function rk(e,t){let{gen:r,schema:n,data:o,keyword:i,it:s}=e;s.items=!0;let a=r.const("len",(0,Un._)`${o}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,Un._)`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,Bh.alwaysValidSchema)(s,n)){let u=r.var("valid",(0,Un._)`${a} <= ${t.length}`);r.if((0,Un.not)(u),()=>c(u)),e.ok(u)}function c(u){r.forRange("i",t.length,a,p=>{e.subschema({keyword:i,dataProp:p,dataPropType:Bh.Type.Num},u),s.allErrors||r.if((0,Un.not)(u),()=>r.break())})}}rs.validateAdditionalItems=rk;rs.default=D4});var Hh=w(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.validateTuple=void 0;var nk=K(),mc=ue(),M4=Mt(),L4={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return ok(e,"additionalItems",t);r.items=!0,!(0,mc.alwaysValidSchema)(r,t)&&e.ok((0,M4.validateArray)(e))}};function ok(e,t,r=e.schema){let{gen:n,parentSchema:o,data:i,keyword:s,it:a}=e;p(o),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=mc.mergeEvaluated.items(n,r.length,a.items));let c=n.name("valid"),u=n.const("len",(0,nk._)`${i}.length`);r.forEach((l,d)=>{(0,mc.alwaysValidSchema)(a,l)||(n.if((0,nk._)`${u} > ${d}`,()=>e.subschema({keyword:s,schemaProp:d,dataProp:d},c)),e.ok(c))});function p(l){let{opts:d,errSchemaPath:h}=a,f=r.length,m=f===l.minItems&&(f===l.maxItems||l[t]===!1);if(d.strictTuples&&!m){let y=`"${s}" is ${f}-tuple, but minItems or maxItems/${t} are not specified or different at path "${h}"`;(0,mc.checkStrictMode)(a,y,d.strictTuples)}}}ns.validateTuple=ok;ns.default=L4});var ik=w(Gh=>{"use strict";Object.defineProperty(Gh,"__esModule",{value:!0});var Z4=Hh(),q4={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,Z4.validateTuple)(e,"items")};Gh.default=q4});var ak=w(Wh=>{"use strict";Object.defineProperty(Wh,"__esModule",{value:!0});var sk=K(),F4=ue(),U4=Mt(),B4=Vh(),V4={message:({params:{len:e}})=>(0,sk.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,sk._)`{limit: ${e}}`},H4={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:V4,code(e){let{schema:t,parentSchema:r,it:n}=e,{prefixItems:o}=r;n.items=!0,!(0,F4.alwaysValidSchema)(n,t)&&(o?(0,B4.validateAdditionalItems)(e,o):e.ok((0,U4.validateArray)(e)))}};Wh.default=H4});var ck=w(Kh=>{"use strict";Object.defineProperty(Kh,"__esModule",{value:!0});var Zt=K(),gc=ue(),G4={message:({params:{min:e,max:t}})=>t===void 0?(0,Zt.str)`must contain at least ${e} valid item(s)`:(0,Zt.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Zt._)`{minContains: ${e}}`:(0,Zt._)`{minContains: ${e}, maxContains: ${t}}`},W4={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:G4,code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:i}=e,s,a,{minContains:c,maxContains:u}=n;i.opts.next?(s=c===void 0?1:c,a=u):s=1;let p=t.const("len",(0,Zt._)`${o}.length`);if(e.setParams({min:s,max:a}),a===void 0&&s===0){(0,gc.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,gc.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,gc.alwaysValidSchema)(i,r)){let m=(0,Zt._)`${p} >= ${s}`;a!==void 0&&(m=(0,Zt._)`${m} && ${p} <= ${a}`),e.pass(m);return}i.items=!0;let l=t.name("valid");a===void 0&&s===1?h(l,()=>t.if(l,()=>t.break())):s===0?(t.let(l,!0),a!==void 0&&t.if((0,Zt._)`${o}.length > 0`,d)):(t.let(l,!1),d()),e.result(l,()=>e.reset());function d(){let m=t.name("_valid"),y=t.let("count",0);h(m,()=>t.if(m,()=>f(y)))}function h(m,y){t.forRange("i",0,p,_=>{e.subschema({keyword:"contains",dataProp:_,dataPropType:gc.Type.Num,compositeRule:!0},m),y()})}function f(m){t.code((0,Zt._)`${m}++`),a===void 0?t.if((0,Zt._)`${m} >= ${s}`,()=>t.assign(l,!0).break()):(t.if((0,Zt._)`${m} > ${a}`,()=>t.assign(l,!1).break()),s===1?t.assign(l,!0):t.if((0,Zt._)`${m} >= ${s}`,()=>t.assign(l,!0)))}}};Kh.default=W4});var pk=w(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.validateSchemaDeps=dr.validatePropertyDeps=dr.error=void 0;var Jh=K(),K4=ue(),os=Mt();dr.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let n=t===1?"property":"properties";return(0,Jh.str)`must have ${n} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:n}})=>(0,Jh._)`{property: ${e},
|
|
38
|
+
missingProperty: ${n},
|
|
39
|
+
depsCount: ${t},
|
|
40
|
+
deps: ${r}}`};var J4={keyword:"dependencies",type:"object",schemaType:"object",error:dr.error,code(e){let[t,r]=Y4(e);uk(e,t),lk(e,r)}};function Y4({schema:e}){let t={},r={};for(let n in e){if(n==="__proto__")continue;let o=Array.isArray(e[n])?t:r;o[n]=e[n]}return[t,r]}function uk(e,t=e.schema){let{gen:r,data:n,it:o}=e;if(Object.keys(t).length===0)return;let i=r.let("missing");for(let s in t){let a=t[s];if(a.length===0)continue;let c=(0,os.propertyInData)(r,n,s,o.opts.ownProperties);e.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),o.allErrors?r.if(c,()=>{for(let u of a)(0,os.checkReportMissingProp)(e,u)}):(r.if((0,Jh._)`${c} && (${(0,os.checkMissingProp)(e,a,i)})`),(0,os.reportMissingProp)(e,i),r.else())}}dr.validatePropertyDeps=uk;function lk(e,t=e.schema){let{gen:r,data:n,keyword:o,it:i}=e,s=r.name("valid");for(let a in t)(0,K4.alwaysValidSchema)(i,t[a])||(r.if((0,os.propertyInData)(r,n,a,i.opts.ownProperties),()=>{let c=e.subschema({keyword:o,schemaProp:a},s);e.mergeValidEvaluated(c,s)},()=>r.var(s,!0)),e.ok(s))}dr.validateSchemaDeps=lk;dr.default=J4});var fk=w(Yh=>{"use strict";Object.defineProperty(Yh,"__esModule",{value:!0});var dk=K(),Q4=ue(),X4={message:"property name must be valid",params:({params:e})=>(0,dk._)`{propertyName: ${e.propertyName}}`},eN={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:X4,code(e){let{gen:t,schema:r,data:n,it:o}=e;if((0,Q4.alwaysValidSchema)(o,r))return;let i=t.name("valid");t.forIn("key",n,s=>{e.setParams({propertyName:s}),e.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),t.if((0,dk.not)(i),()=>{e.error(!0),o.allErrors||t.break()})}),e.ok(i)}};Yh.default=eN});var Xh=w(Qh=>{"use strict";Object.defineProperty(Qh,"__esModule",{value:!0});var yc=Mt(),Yt=K(),tN=Tr(),_c=ue(),rN={message:"must NOT have additional properties",params:({params:e})=>(0,Yt._)`{additionalProperty: ${e.additionalProperty}}`},nN={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:rN,code(e){let{gen:t,schema:r,parentSchema:n,data:o,errsCount:i,it:s}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,_c.alwaysValidSchema)(s,r))return;let u=(0,yc.allSchemaProperties)(n.properties),p=(0,yc.allSchemaProperties)(n.patternProperties);l(),e.ok((0,Yt._)`${i} === ${tN.default.errors}`);function l(){t.forIn("key",o,y=>{!u.length&&!p.length?f(y):t.if(d(y),()=>f(y))})}function d(y){let _;if(u.length>8){let b=(0,_c.schemaRefOrVal)(s,n.properties,"properties");_=(0,yc.isOwnProperty)(t,b,y)}else u.length?_=(0,Yt.or)(...u.map(b=>(0,Yt._)`${y} === ${b}`)):_=Yt.nil;return p.length&&(_=(0,Yt.or)(_,...p.map(b=>(0,Yt._)`${(0,yc.usePattern)(e,b)}.test(${y})`))),(0,Yt.not)(_)}function h(y){t.code((0,Yt._)`delete ${o}[${y}]`)}function f(y){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){h(y);return}if(r===!1){e.setParams({additionalProperty:y}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,_c.alwaysValidSchema)(s,r)){let _=t.name("valid");c.removeAdditional==="failing"?(m(y,_,!1),t.if((0,Yt.not)(_),()=>{e.reset(),h(y)})):(m(y,_),a||t.if((0,Yt.not)(_),()=>t.break()))}}function m(y,_,b){let T={keyword:"additionalProperties",dataProp:y,dataPropType:_c.Type.Str};b===!1&&Object.assign(T,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(T,_)}}};Qh.default=nN});var gk=w(tm=>{"use strict";Object.defineProperty(tm,"__esModule",{value:!0});var oN=Bi(),hk=Mt(),em=ue(),mk=Xh(),iN={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:n,data:o,it:i}=e;i.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&mk.default.code(new oN.KeywordCxt(i,mk.default,"additionalProperties"));let s=(0,hk.allSchemaProperties)(r);for(let l of s)i.definedProperties.add(l);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=em.mergeEvaluated.props(t,(0,em.toHash)(s),i.props));let a=s.filter(l=>!(0,em.alwaysValidSchema)(i,r[l]));if(a.length===0)return;let c=t.name("valid");for(let l of a)u(l)?p(l):(t.if((0,hk.propertyInData)(t,o,l,i.opts.ownProperties)),p(l),i.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(l),e.ok(c);function u(l){return i.opts.useDefaults&&!i.compositeRule&&r[l].default!==void 0}function p(l){e.subschema({keyword:"properties",schemaProp:l,dataProp:l},c)}}};tm.default=iN});var bk=w(rm=>{"use strict";Object.defineProperty(rm,"__esModule",{value:!0});var yk=Mt(),vc=K(),_k=ue(),vk=ue(),sN={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:n,parentSchema:o,it:i}=e,{opts:s}=i,a=(0,yk.allSchemaProperties)(r),c=a.filter(m=>(0,_k.alwaysValidSchema)(i,r[m]));if(a.length===0||c.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;let u=s.strictSchema&&!s.allowMatchingProperties&&o.properties,p=t.name("valid");i.props!==!0&&!(i.props instanceof vc.Name)&&(i.props=(0,vk.evaluatedPropsToName)(t,i.props));let{props:l}=i;d();function d(){for(let m of a)u&&h(m),i.allErrors?f(m):(t.var(p,!0),f(m),t.if(p))}function h(m){for(let y in u)new RegExp(m).test(y)&&(0,_k.checkStrictMode)(i,`property ${y} matches pattern ${m} (use allowMatchingProperties)`)}function f(m){t.forIn("key",n,y=>{t.if((0,vc._)`${(0,yk.usePattern)(e,m)}.test(${y})`,()=>{let _=c.includes(m);_||e.subschema({keyword:"patternProperties",schemaProp:m,dataProp:y,dataPropType:vk.Type.Str},p),i.opts.unevaluated&&l!==!0?t.assign((0,vc._)`${l}[${y}]`,!0):!_&&!i.allErrors&&t.if((0,vc.not)(p),()=>t.break())})})}}};rm.default=sN});var xk=w(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});var aN=ue(),cN={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:n}=e;if((0,aN.alwaysValidSchema)(n,r)){e.fail();return}let o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};nm.default=cN});var kk=w(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});var uN=Mt(),lN={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:uN.validateUnion,error:{message:"must match a schema in anyOf"}};om.default=lN});var wk=w(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});var bc=K(),pN=ue(),dN={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,bc._)`{passingSchemas: ${e.passing}}`},fN={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:dN,code(e){let{gen:t,schema:r,parentSchema:n,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(o.opts.discriminator&&n.discriminator)return;let i=r,s=t.let("valid",!1),a=t.let("passing",null),c=t.name("_valid");e.setParams({passing:a}),t.block(u),e.result(s,()=>e.reset(),()=>e.error(!0));function u(){i.forEach((p,l)=>{let d;(0,pN.alwaysValidSchema)(o,p)?t.var(c,!0):d=e.subschema({keyword:"oneOf",schemaProp:l,compositeRule:!0},c),l>0&&t.if((0,bc._)`${c} && ${s}`).assign(s,!1).assign(a,(0,bc._)`[${a}, ${l}]`).else(),t.if(c,()=>{t.assign(s,!0),t.assign(a,l),d&&e.mergeEvaluated(d,bc.Name)})})}}};im.default=fN});var Sk=w(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});var hN=ue(),mN={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let o=t.name("valid");r.forEach((i,s)=>{if((0,hN.alwaysValidSchema)(n,i))return;let a=e.subschema({keyword:"allOf",schemaProp:s},o);e.ok(o),e.mergeEvaluated(a)})}};sm.default=mN});var Pk=w(am=>{"use strict";Object.defineProperty(am,"__esModule",{value:!0});var xc=K(),Tk=ue(),gN={message:({params:e})=>(0,xc.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,xc._)`{failingKeyword: ${e.ifClause}}`},yN={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:gN,code(e){let{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,Tk.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let o=$k(n,"then"),i=$k(n,"else");if(!o&&!i)return;let s=t.let("valid",!0),a=t.name("_valid");if(c(),e.reset(),o&&i){let p=t.let("ifClause");e.setParams({ifClause:p}),t.if(a,u("then",p),u("else",p))}else o?t.if(a,u("then")):t.if((0,xc.not)(a),u("else"));e.pass(s,()=>e.error(!0));function c(){let p=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(p)}function u(p,l){return()=>{let d=e.subschema({keyword:p},a);t.assign(s,a),e.mergeValidEvaluated(d,s),l?t.assign(l,(0,xc._)`${p}`):e.setParams({ifClause:p})}}}};function $k(e,t){let r=e.schema[t];return r!==void 0&&!(0,Tk.alwaysValidSchema)(e,r)}am.default=yN});var Ck=w(cm=>{"use strict";Object.defineProperty(cm,"__esModule",{value:!0});var _N=ue(),vN={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,_N.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};cm.default=vN});var Ek=w(um=>{"use strict";Object.defineProperty(um,"__esModule",{value:!0});var bN=Vh(),xN=ik(),kN=Hh(),wN=ak(),SN=ck(),$N=pk(),TN=fk(),PN=Xh(),CN=gk(),EN=bk(),IN=xk(),zN=kk(),RN=wk(),AN=Sk(),ON=Pk(),NN=Ck();function jN(e=!1){let t=[IN.default,zN.default,RN.default,AN.default,ON.default,NN.default,TN.default,PN.default,$N.default,CN.default,EN.default];return e?t.push(xN.default,wN.default):t.push(bN.default,kN.default),t.push(SN.default),t}um.default=jN});var Ik=w(lm=>{"use strict";Object.defineProperty(lm,"__esModule",{value:!0});var Ie=K(),DN={message:({schemaCode:e})=>(0,Ie.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Ie._)`{format: ${e}}`},MN={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:DN,code(e,t){let{gen:r,data:n,$data:o,schema:i,schemaCode:s,it:a}=e,{opts:c,errSchemaPath:u,schemaEnv:p,self:l}=a;if(!c.validateFormats)return;o?d():h();function d(){let f=r.scopeValue("formats",{ref:l.formats,code:c.code.formats}),m=r.const("fDef",(0,Ie._)`${f}[${s}]`),y=r.let("fType"),_=r.let("format");r.if((0,Ie._)`typeof ${m} == "object" && !(${m} instanceof RegExp)`,()=>r.assign(y,(0,Ie._)`${m}.type || "string"`).assign(_,(0,Ie._)`${m}.validate`),()=>r.assign(y,(0,Ie._)`"string"`).assign(_,m)),e.fail$data((0,Ie.or)(b(),T()));function b(){return c.strictSchema===!1?Ie.nil:(0,Ie._)`${s} && !${_}`}function T(){let S=p.$async?(0,Ie._)`(${m}.async ? await ${_}(${n}) : ${_}(${n}))`:(0,Ie._)`${_}(${n})`,C=(0,Ie._)`(typeof ${_} == "function" ? ${S} : ${_}.test(${n}))`;return(0,Ie._)`${_} && ${_} !== true && ${y} === ${t} && !${C}`}}function h(){let f=l.formats[i];if(!f){b();return}if(f===!0)return;let[m,y,_]=T(f);m===t&&e.pass(S());function b(){if(c.strictSchema===!1){l.logger.warn(C());return}throw new Error(C());function C(){return`unknown format "${i}" ignored in schema at path "${u}"`}}function T(C){let Q=C instanceof RegExp?(0,Ie.regexpCode)(C):c.code.formats?(0,Ie._)`${c.code.formats}${(0,Ie.getProperty)(i)}`:void 0,H=r.scopeValue("formats",{key:i,ref:C,code:Q});return typeof C=="object"&&!(C instanceof RegExp)?[C.type||"string",C.validate,(0,Ie._)`${H}.validate`]:["string",C,H]}function S(){if(typeof f=="object"&&!(f instanceof RegExp)&&f.async){if(!p.$async)throw new Error("async format in sync schema");return(0,Ie._)`await ${_}(${n})`}return typeof y=="function"?(0,Ie._)`${_}(${n})`:(0,Ie._)`${_}.test(${n})`}}}};lm.default=MN});var zk=w(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});var LN=Ik(),ZN=[LN.default];pm.default=ZN});var Rk=w(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});Eo.contentVocabulary=Eo.metadataVocabulary=void 0;Eo.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Eo.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Ok=w(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});var qN=q0(),FN=tk(),UN=Ek(),BN=zk(),Ak=Rk(),VN=[qN.default,FN.default,(0,UN.default)(),BN.default,Ak.metadataVocabulary,Ak.contentVocabulary];dm.default=VN});var jk=w(kc=>{"use strict";Object.defineProperty(kc,"__esModule",{value:!0});kc.DiscrError=void 0;var Nk;(function(e){e.Tag="tag",e.Mapping="mapping"})(Nk||(kc.DiscrError=Nk={}))});var Mk=w(hm=>{"use strict";Object.defineProperty(hm,"__esModule",{value:!0});var Io=K(),fm=jk(),Dk=nc(),HN=Vi(),GN=ue(),WN={message:({params:{discrError:e,tagName:t}})=>e===fm.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Io._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},KN={keyword:"discriminator",type:"object",schemaType:"object",error:WN,code(e){let{gen:t,data:r,schema:n,parentSchema:o,it:i}=e,{oneOf:s}=o;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),u=t.const("tag",(0,Io._)`${r}${(0,Io.getProperty)(a)}`);t.if((0,Io._)`typeof ${u} == "string"`,()=>p(),()=>e.error(!1,{discrError:fm.DiscrError.Tag,tag:u,tagName:a})),e.ok(c);function p(){let h=d();t.if(!1);for(let f in h)t.elseIf((0,Io._)`${u} === ${f}`),t.assign(c,l(h[f]));t.else(),e.error(!1,{discrError:fm.DiscrError.Mapping,tag:u,tagName:a}),t.endIf()}function l(h){let f=t.name("valid"),m=e.subschema({keyword:"oneOf",schemaProp:h},f);return e.mergeEvaluated(m,Io.Name),f}function d(){var h;let f={},m=_(o),y=!0;for(let S=0;S<s.length;S++){let C=s[S];if(C?.$ref&&!(0,GN.schemaHasRulesButRef)(C,i.self.RULES)){let H=C.$ref;if(C=Dk.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,H),C instanceof Dk.SchemaEnv&&(C=C.schema),C===void 0)throw new HN.default(i.opts.uriResolver,i.baseId,H)}let Q=(h=C?.properties)===null||h===void 0?void 0:h[a];if(typeof Q!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);y=y&&(m||_(C)),b(Q,S)}if(!y)throw new Error(`discriminator: "${a}" must be required`);return f;function _({required:S}){return Array.isArray(S)&&S.includes(a)}function b(S,C){if(S.const)T(S.const,C);else if(S.enum)for(let Q of S.enum)T(Q,C);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function T(S,C){if(typeof S!="string"||S in f)throw new Error(`discriminator: "${a}" values must be unique strings`);f[S]=C}}}};hm.default=KN});var Lk=w((TU,JN)=>{JN.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var gm=w((xe,mm)=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.MissingRefError=xe.ValidationError=xe.CodeGen=xe.Name=xe.nil=xe.stringify=xe.str=xe._=xe.KeywordCxt=xe.Ajv=void 0;var YN=N0(),QN=Ok(),XN=Mk(),Zk=Lk(),ej=["/properties"],wc="http://json-schema.org/draft-07/schema",zo=class extends YN.default{_addVocabularies(){super._addVocabularies(),QN.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(XN.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(Zk,ej):Zk;this.addMetaSchema(t,wc,!1),this.refs["http://json-schema.org/schema"]=wc}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(wc)?wc:void 0)}};xe.Ajv=zo;mm.exports=xe=zo;mm.exports.Ajv=zo;Object.defineProperty(xe,"__esModule",{value:!0});xe.default=zo;var tj=Bi();Object.defineProperty(xe,"KeywordCxt",{enumerable:!0,get:function(){return tj.KeywordCxt}});var Ro=K();Object.defineProperty(xe,"_",{enumerable:!0,get:function(){return Ro._}});Object.defineProperty(xe,"str",{enumerable:!0,get:function(){return Ro.str}});Object.defineProperty(xe,"stringify",{enumerable:!0,get:function(){return Ro.stringify}});Object.defineProperty(xe,"nil",{enumerable:!0,get:function(){return Ro.nil}});Object.defineProperty(xe,"Name",{enumerable:!0,get:function(){return Ro.Name}});Object.defineProperty(xe,"CodeGen",{enumerable:!0,get:function(){return Ro.CodeGen}});var rj=tc();Object.defineProperty(xe,"ValidationError",{enumerable:!0,get:function(){return rj.default}});var nj=Vi();Object.defineProperty(xe,"MissingRefError",{enumerable:!0,get:function(){return nj.default}})});var Wk=w(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.formatNames=hr.fastFormats=hr.fullFormats=void 0;function fr(e,t){return{validate:e,compare:t}}hr.fullFormats={date:fr(Bk,bm),time:fr(_m(!0),xm),"date-time":fr(qk(!0),Hk),"iso-time":fr(_m(),Vk),"iso-date-time":fr(qk(),Gk),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:uj,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:gj,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:lj,int32:{type:"number",validate:fj},int64:{type:"number",validate:hj},float:{type:"number",validate:Uk},double:{type:"number",validate:Uk},password:!0,binary:!0};hr.fastFormats={...hr.fullFormats,date:fr(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,bm),time:fr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,xm),"date-time":fr(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Hk),"iso-time":fr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Vk),"iso-date-time":fr(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Gk),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};hr.formatNames=Object.keys(hr.fullFormats);function oj(e){return e%4===0&&(e%100!==0||e%400===0)}var ij=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,sj=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Bk(e){let t=ij.exec(e);if(!t)return!1;let r=+t[1],n=+t[2],o=+t[3];return n>=1&&n<=12&&o>=1&&o<=(n===2&&oj(r)?29:sj[n])}function bm(e,t){if(e&&t)return e>t?1:e<t?-1:0}var ym=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function _m(e){return function(r){let n=ym.exec(r);if(!n)return!1;let o=+n[1],i=+n[2],s=+n[3],a=n[4],c=n[5]==="-"?-1:1,u=+(n[6]||0),p=+(n[7]||0);if(u>23||p>59||e&&!a)return!1;if(o<=23&&i<=59&&s<60)return!0;let l=i-p*c,d=o-u*c-(l<0?1:0);return(d===23||d===-1)&&(l===59||l===-1)&&s<61}}function xm(e,t){if(!(e&&t))return;let r=new Date("2020-01-01T"+e).valueOf(),n=new Date("2020-01-01T"+t).valueOf();if(r&&n)return r-n}function Vk(e,t){if(!(e&&t))return;let r=ym.exec(e),n=ym.exec(t);if(r&&n)return e=r[1]+r[2]+r[3],t=n[1]+n[2]+n[3],e>t?1:e<t?-1:0}var vm=/t|\s/i;function qk(e){let t=_m(e);return function(n){let o=n.split(vm);return o.length===2&&Bk(o[0])&&t(o[1])}}function Hk(e,t){if(!(e&&t))return;let r=new Date(e).valueOf(),n=new Date(t).valueOf();if(r&&n)return r-n}function Gk(e,t){if(!(e&&t))return;let[r,n]=e.split(vm),[o,i]=t.split(vm),s=bm(r,o);if(s!==void 0)return s||xm(n,i)}var aj=/\/|:/,cj=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function uj(e){return aj.test(e)&&cj.test(e)}var Fk=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function lj(e){return Fk.lastIndex=0,Fk.test(e)}var pj=-(2**31),dj=2**31-1;function fj(e){return Number.isInteger(e)&&e<=dj&&e>=pj}function hj(e){return Number.isInteger(e)}function Uk(){return!0}var mj=/[^\\]\\Z/;function gj(e){if(mj.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var Kk=w(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});Ao.formatLimitDefinition=void 0;var yj=gm(),Qt=K(),nn=Qt.operators,Sc={formatMaximum:{okStr:"<=",ok:nn.LTE,fail:nn.GT},formatMinimum:{okStr:">=",ok:nn.GTE,fail:nn.LT},formatExclusiveMaximum:{okStr:"<",ok:nn.LT,fail:nn.GTE},formatExclusiveMinimum:{okStr:">",ok:nn.GT,fail:nn.LTE}},_j={message:({keyword:e,schemaCode:t})=>(0,Qt.str)`should be ${Sc[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Qt._)`{comparison: ${Sc[e].okStr}, limit: ${t}}`};Ao.formatLimitDefinition={keyword:Object.keys(Sc),type:"string",schemaType:"string",$data:!0,error:_j,code(e){let{gen:t,data:r,schemaCode:n,keyword:o,it:i}=e,{opts:s,self:a}=i;if(!s.validateFormats)return;let c=new yj.KeywordCxt(i,a.RULES.all.format.definition,"format");c.$data?u():p();function u(){let d=t.scopeValue("formats",{ref:a.formats,code:s.code.formats}),h=t.const("fmt",(0,Qt._)`${d}[${c.schemaCode}]`);e.fail$data((0,Qt.or)((0,Qt._)`typeof ${h} != "object"`,(0,Qt._)`${h} instanceof RegExp`,(0,Qt._)`typeof ${h}.compare != "function"`,l(h)))}function p(){let d=c.schema,h=a.formats[d];if(!h||h===!0)return;if(typeof h!="object"||h instanceof RegExp||typeof h.compare!="function")throw new Error(`"${o}": format "${d}" does not define "compare" function`);let f=t.scopeValue("formats",{key:d,ref:h,code:s.code.formats?(0,Qt._)`${s.code.formats}${(0,Qt.getProperty)(d)}`:void 0});e.fail$data(l(f))}function l(d){return(0,Qt._)`${d}.compare(${r}, ${n}) ${Sc[o].fail} 0`}},dependencies:["format"]};var vj=e=>(e.addKeyword(Ao.formatLimitDefinition),e);Ao.default=vj});var Xk=w((is,Qk)=>{"use strict";Object.defineProperty(is,"__esModule",{value:!0});var Oo=Wk(),bj=Kk(),km=K(),Jk=new km.Name("fullFormats"),xj=new km.Name("fastFormats"),wm=(e,t={keywords:!0})=>{if(Array.isArray(t))return Yk(e,t,Oo.fullFormats,Jk),e;let[r,n]=t.mode==="fast"?[Oo.fastFormats,xj]:[Oo.fullFormats,Jk],o=t.formats||Oo.formatNames;return Yk(e,o,r,n),t.keywords&&(0,bj.default)(e),e};wm.get=(e,t="full")=>{let n=(t==="fast"?Oo.fastFormats:Oo.fullFormats)[e];if(!n)throw new Error(`Unknown format "${e}"`);return n};function Yk(e,t,r,n){var o,i;(o=(i=e.opts.code).formats)!==null&&o!==void 0||(i.formats=(0,km._)`require("ajv-formats/dist/formats").${n}`);for(let s of t)e.addFormat(s,r[s])}Qk.exports=is=wm;Object.defineProperty(is,"__esModule",{value:!0});is.default=wm});function kj(){let e=new ew.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,tw.default)(e),e}var ew,tw,$c,rw=v(()=>{ew=St(gm(),1),tw=St(Xk(),1);$c=class{constructor(t){this._ajv=t??kj()}getValidator(t){let r="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return n=>r(n)?{valid:!0,data:n,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}}});var Tc,nw=v(()=>{Tc=class{constructor(t){this._server=t}requestStream(t,r,n){return this._server.requestStream(t,r,n)}async getTask(t,r){return this._server.getTask({taskId:t},r)}async getTaskResult(t,r,n){return this._server.getTaskResult({taskId:t},r,n)}async listTasks(t,r){return this._server.listTasks(t?{cursor:t}:void 0,r)}async cancelTask(t,r){return this._server.cancelTask({taskId:t},r)}}});function ow(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${r} does not support task creation for tools/call (required for ${t})`);break;default:break}}function iw(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${r} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${r} does not support task creation for elicitation/create (required for ${t})`);break;default:break}}var sw=v(()=>{});var Pc,aw=v(()=>{hx();Ei();rw();yi();nw();sw();Pc=class extends Fa{constructor(t,r){super(r),this._serverInfo=t,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(Ci.options.map((n,o)=>[n,o])),this.isMessageIgnored=(n,o)=>{let i=this._loggingLevels.get(o);return i?this.LOG_LEVEL_SEVERITY.get(n)<this.LOG_LEVEL_SEVERITY.get(i):!1},this._capabilities=r?.capabilities??{},this._instructions=r?.instructions,this._jsonSchemaValidator=r?.jsonSchemaValidator??new $c,this.setRequestHandler(jd,n=>this._oninitialize(n)),this.setNotificationHandler(Dd,()=>this.oninitialized?.()),this._capabilities.logging&&this.setRequestHandler(Bd,async(n,o)=>{let i=o.sessionId||o.requestInfo?.headers["mcp-session-id"]||void 0,{level:s}=n.params,a=Ci.safeParse(s);return a.success&&this._loggingLevels.set(i,a.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new Tc(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=fx(this._capabilities,t)}setRequestHandler(t,r){let o=Hr(t)?.method;if(!o)throw new Error("Schema is missing a method literal");let i;if(At(o)){let a=o;i=a._zod?.def?.value??a.value}else{let a=o;i=a._def?.value??a.value}if(typeof i!="string")throw new Error("Schema method literal must be a string");if(i==="tools/call"){let a=async(c,u)=>{let p=Vr(_o,c);if(!p.success){let f=p.error instanceof Error?p.error.message:String(p.error);throw new O(L.InvalidParams,`Invalid tools/call request: ${f}`)}let{params:l}=p.data,d=await Promise.resolve(r(c,u));if(l.task){let f=Vr(go,d);if(!f.success){let m=f.error instanceof Error?f.error.message:String(f.error);throw new O(L.InvalidParams,`Invalid task creation result: ${m}`)}return f.data}let h=Vr(Ea,d);if(!h.success){let f=h.error instanceof Error?h.error.message:String(h.error);throw new O(L.InvalidParams,`Invalid tools/call result: ${f}`)}return h.data};return super.setRequestHandler(t,a)}return super.setRequestHandler(t,r)}assertCapabilityForMethod(t){switch(t){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new Error(`Client does not support sampling (required for ${t})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new Error(`Client does not support elicitation (required for ${t})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new Error(`Client does not support listing roots (required for ${t})`);break;case"ping":break}}assertNotificationCapability(t){switch(t){case"notifications/message":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new Error(`Server does not support notifying about resources (required for ${t})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new Error(`Server does not support notifying of tool list changes (required for ${t})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new Error(`Server does not support notifying of prompt list changes (required for ${t})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new Error(`Client does not support URL elicitation (required for ${t})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(t){if(this._capabilities)switch(t){case"completion/complete":if(!this._capabilities.completions)throw new Error(`Server does not support completions (required for ${t})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new Error(`Server does not support prompts (required for ${t})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new Error(`Server does not support resources (required for ${t})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new Error(`Server does not support tools (required for ${t})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Server does not support tasks capability (required for ${t})`);break;case"ping":case"initialize":break}}assertTaskCapability(t){iw(this._clientCapabilities?.tasks?.requests,t,"Client")}assertTaskHandlerCapability(t){this._capabilities&&ow(this._capabilities.tasks?.requests,t,"Server")}async _oninitialize(t){let r=t.params.protocolVersion;return this._clientCapabilities=t.params.capabilities,this._clientVersion=t.params.clientInfo,{protocolVersion:fb.includes(r)?r:zd,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},fa)}async createMessage(t,r){if((t.tools||t.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new Error("Client does not support sampling tools capability.");if(t.messages.length>0){let n=t.messages[t.messages.length-1],o=Array.isArray(n.content)?n.content:[n.content],i=o.some(u=>u.type==="tool_result"),s=t.messages.length>1?t.messages[t.messages.length-2]:void 0,a=s?Array.isArray(s.content)?s.content:[s.content]:[],c=a.some(u=>u.type==="tool_use");if(i){if(o.some(u=>u.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!c)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(c){let u=new Set(a.filter(l=>l.type==="tool_use").map(l=>l.id)),p=new Set(o.filter(l=>l.type==="tool_result").map(l=>l.toolUseId));if(u.size!==p.size||![...u].every(l=>p.has(l)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return t.tools?this.request({method:"sampling/createMessage",params:t},Hd,r):this.request({method:"sampling/createMessage",params:t},Vd,r)}async elicitInput(t,r){switch(t.mode??"form"){case"url":{if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support url elicitation.");let o=t;return this.request({method:"elicitation/create",params:o},Ia,r)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw new Error("Client does not support form elicitation.");let o=t.mode==="form"?t:{...t,mode:"form"},i=await this.request({method:"elicitation/create",params:o},Ia,r);if(i.action==="accept"&&i.content&&o.requestedSchema)try{let a=this._jsonSchemaValidator.getValidator(o.requestedSchema)(i.content);if(!a.valid)throw new O(L.InvalidParams,`Elicitation response content does not match requested schema: ${a.errorMessage}`)}catch(s){throw s instanceof O?s:new O(L.InternalError,`Error validating elicitation response: ${s instanceof Error?s.message:String(s)}`)}return i}}}createElicitationCompletionNotifier(t,r){if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:t}},r)}async listRoots(t,r){return this.request({method:"roots/list",params:t},Gd,r)}async sendLoggingMessage(t,r){if(this._capabilities.logging&&!this.isMessageIgnored(t.level,r))return this.notification({method:"notifications/message",params:t})}async sendResourceUpdated(t){return this.notification({method:"notifications/resources/updated",params:t})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}}});function Sm(e){return!!e&&typeof e=="object"&&uw in e}function lw(e){return e[uw]?.complete}var uw,cw,pw=v(()=>{uw=Symbol.for("mcp.completable");(function(e){e.Completable="McpCompletable"})(cw||(cw={}))});var Cc,dw=v(()=>{Cc=class e{static isTemplate(t){return/\{[^}\s]+\}/.test(t)}static validateLength(t,r,n){if(t.length>r)throw new Error(`${n} exceeds maximum length of ${r} characters (got ${t.length})`)}get variableNames(){return this.parts.flatMap(t=>typeof t=="string"?[]:t.names)}constructor(t){e.validateLength(t,1e6,"Template"),this.template=t,this.parts=this.parse(t)}toString(){return this.template}parse(t){let r=[],n="",o=0,i=0;for(;o<t.length;)if(t[o]==="{"){n&&(r.push(n),n="");let s=t.indexOf("}",o);if(s===-1)throw new Error("Unclosed template expression");if(i++,i>1e4)throw new Error("Template contains too many expressions (max 10000)");let a=t.slice(o+1,s),c=this.getOperator(a),u=a.includes("*"),p=this.getNames(a),l=p[0];for(let d of p)e.validateLength(d,1e6,"Variable name");r.push({name:l,operator:c,names:p,exploded:u}),o=s+1}else n+=t[o],o++;return n&&r.push(n),r}getOperator(t){return["+","#",".","/","?","&"].find(n=>t.startsWith(n))||""}getNames(t){let r=this.getOperator(t);return t.slice(r.length).split(",").map(n=>n.replace("*","").trim()).filter(n=>n.length>0)}encodeValue(t,r){return e.validateLength(t,1e6,"Variable value"),r==="+"||r==="#"?encodeURI(t):encodeURIComponent(t)}expandPart(t,r){if(t.operator==="?"||t.operator==="&"){let s=t.names.map(c=>{let u=r[c];if(u===void 0)return"";let p=Array.isArray(u)?u.map(l=>this.encodeValue(l,t.operator)).join(","):this.encodeValue(u.toString(),t.operator);return`${c}=${p}`}).filter(c=>c.length>0);return s.length===0?"":(t.operator==="?"?"?":"&")+s.join("&")}if(t.names.length>1){let s=t.names.map(a=>r[a]).filter(a=>a!==void 0);return s.length===0?"":s.map(a=>Array.isArray(a)?a[0]:a).join(",")}let n=r[t.name];if(n===void 0)return"";let i=(Array.isArray(n)?n:[n]).map(s=>this.encodeValue(s,t.operator));switch(t.operator){case"":return i.join(",");case"+":return i.join(",");case"#":return"#"+i.join(",");case".":return"."+i.join(".");case"/":return"/"+i.join("/");default:return i.join(",")}}expand(t){let r="",n=!1;for(let o of this.parts){if(typeof o=="string"){r+=o;continue}let i=this.expandPart(o,t);i&&((o.operator==="?"||o.operator==="&")&&n?r+=i.replace("?","&"):r+=i,(o.operator==="?"||o.operator==="&")&&(n=!0))}return r}escapeRegExp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}partToRegExp(t){let r=[];for(let i of t.names)e.validateLength(i,1e6,"Variable name");if(t.operator==="?"||t.operator==="&"){for(let i=0;i<t.names.length;i++){let s=t.names[i],a=i===0?"\\"+t.operator:"&";r.push({pattern:a+this.escapeRegExp(s)+"=([^&]+)",name:s})}return r}let n,o=t.name;switch(t.operator){case"":n=t.exploded?"([^/,]+(?:,[^/,]+)*)":"([^/,]+)";break;case"+":case"#":n="(.+)";break;case".":n="\\.([^/,]+)";break;case"/":n="/"+(t.exploded?"([^/,]+(?:,[^/,]+)*)":"([^/,]+)");break;default:n="([^/]+)"}return r.push({pattern:n,name:o}),r}match(t){e.validateLength(t,1e6,"URI");let r="^",n=[];for(let a of this.parts)if(typeof a=="string")r+=this.escapeRegExp(a);else{let c=this.partToRegExp(a);for(let{pattern:u,name:p}of c)r+=u,n.push({name:p,exploded:a.exploded})}r+="$",e.validateLength(r,1e6,"Generated regex pattern");let o=new RegExp(r),i=t.match(o);if(!i)return null;let s={};for(let a=0;a<n.length;a++){let{name:c,exploded:u}=n[a],p=i[a+1],l=c.replace("*","");u&&p.includes(",")?s[l]=p.split(","):s[l]=p}return s}}});function Sj(e){let t=[];if(e.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(e.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${e.length})`]};if(e.includes(" ")&&t.push("Tool name contains spaces, which may cause parsing issues"),e.includes(",")&&t.push("Tool name contains commas, which may cause parsing issues"),(e.startsWith("-")||e.endsWith("-"))&&t.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(e.startsWith(".")||e.endsWith("."))&&t.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!wj.test(e)){let r=e.split("").filter(n=>!/[A-Za-z0-9._-]/.test(n)).filter((n,o,i)=>i.indexOf(n)===o);return t.push(`Tool name contains invalid characters: ${r.map(n=>`"${n}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}function $j(e,t){if(t.length>0){console.warn(`Tool name validation warning for "${e}":`);for(let r of t)console.warn(` - ${r}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}function $m(e){let t=Sj(e);return $j(e,t.warnings),t.isValid}var wj,fw=v(()=>{wj=/^[A-Za-z0-9._-]{1,128}$/});var Ec,hw=v(()=>{Ec=class{constructor(t){this._mcpServer=t}registerToolTask(t,r,n){let o={taskSupport:"required",...r.execution};if(o.taskSupport==="forbidden")throw new Error(`Cannot register task-based tool '${t}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool(t,r.title,r.description,r.inputSchema,r.outputSchema,r.annotations,o,r._meta,n)}}});var le=v(()=>{Ds();Ds()});function yw(e){return e!==null&&typeof e=="object"&&"parse"in e&&typeof e.parse=="function"&&"safeParse"in e&&typeof e.safeParse=="function"}function Pj(e){return"_def"in e||"_zod"in e||yw(e)}function Tm(e){return typeof e!="object"||e===null||Pj(e)?!1:Object.keys(e).length===0?!0:Object.values(e).some(yw)}function mw(e){if(e)return Tm(e)?An(e):e}function Cj(e){let t=Hr(e);return t?Object.entries(t).map(([r,n])=>{let o=Lv(n),i=Zv(n);return{name:r,description:o,required:!i}}):[]}function on(e){let r=Hr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let n=aa(r);if(typeof n=="string")return n;throw new Error("Schema method literal must be a string")}function gw(e){return{completion:{values:e.slice(0,100),total:e.length,hasMore:e.length>100}}}var Ic,as,Tj,ss,_w=v(()=>{aw();yi();zf();Ei();pw();dw();fw();hw();le();Ic=class{constructor(t,r){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new Pc(t,r)}get experimental(){return this._experimental||(this._experimental={tasks:new Ec(this)}),this._experimental}async connect(t){return await this.server.connect(t)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(on(Ca)),this.server.assertCanSetRequestHandler(on(_o)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(Ca,()=>({tools:Object.entries(this._registeredTools).filter(([,t])=>t.enabled).map(([t,r])=>{let n={name:t,title:r.title,description:r.description,inputSchema:(()=>{let o=ho(r.inputSchema);return o?Cf(o,{strictUnions:!0,pipeStrategy:"input"}):Tj})(),annotations:r.annotations,execution:r.execution,_meta:r._meta};if(r.outputSchema){let o=ho(r.outputSchema);o&&(n.outputSchema=Cf(o,{strictUnions:!0,pipeStrategy:"output"}))}return n})})),this.server.setRequestHandler(_o,async(t,r)=>{try{let n=this._registeredTools[t.params.name];if(!n)throw new O(L.InvalidParams,`Tool ${t.params.name} not found`);if(!n.enabled)throw new O(L.InvalidParams,`Tool ${t.params.name} disabled`);let o=!!t.params.task,i=n.execution?.taskSupport,s="createTask"in n.handler;if((i==="required"||i==="optional")&&!s)throw new O(L.InternalError,`Tool ${t.params.name} has taskSupport '${i}' but was not registered with registerToolTask`);if(i==="required"&&!o)throw new O(L.MethodNotFound,`Tool ${t.params.name} requires task augmentation (taskSupport: 'required')`);if(i==="optional"&&!o&&s)return await this.handleAutomaticTaskPolling(n,t,r);let a=await this.validateToolInput(n,t.params.arguments,t.params.name),c=await this.executeToolHandler(n,a,r);return o||await this.validateToolOutput(n,c,t.params.name),c}catch(n){if(n instanceof O&&n.code===L.UrlElicitationRequired)throw n;return this.createToolError(n instanceof Error?n.message:String(n))}}),this._toolHandlersInitialized=!0)}createToolError(t){return{content:[{type:"text",text:t}],isError:!0}}async validateToolInput(t,r,n){if(!t.inputSchema)return;let i=ho(t.inputSchema)??t.inputSchema,s=await ia(i,r);if(!s.success){let a="error"in s?s.error:"Unknown error",c=sa(a);throw new O(L.InvalidParams,`Input validation error: Invalid arguments for tool ${n}: ${c}`)}return s.data}async validateToolOutput(t,r,n){if(!t.outputSchema||!("content"in r)||r.isError)return;if(!r.structuredContent)throw new O(L.InvalidParams,`Output validation error: Tool ${n} has an output schema but no structured content was provided`);let o=ho(t.outputSchema),i=await ia(o,r.structuredContent);if(!i.success){let s="error"in i?i.error:"Unknown error",a=sa(s);throw new O(L.InvalidParams,`Output validation error: Invalid structured content for tool ${n}: ${a}`)}}async executeToolHandler(t,r,n){let o=t.handler;if("createTask"in o){if(!n.taskStore)throw new Error("No task store provided.");let s={...n,taskStore:n.taskStore};if(t.inputSchema){let a=o;return await Promise.resolve(a.createTask(r,s))}else{let a=o;return await Promise.resolve(a.createTask(s))}}if(t.inputSchema){let s=o;return await Promise.resolve(s(r,n))}else{let s=o;return await Promise.resolve(s(n))}}async handleAutomaticTaskPolling(t,r,n){if(!n.taskStore)throw new Error("No task store provided for task-capable tool.");let o=await this.validateToolInput(t,r.params.arguments,r.params.name),i=t.handler,s={...n,taskStore:n.taskStore},a=o?await Promise.resolve(i.createTask(o,s)):await Promise.resolve(i.createTask(s)),c=a.task.taskId,u=a.task,p=u.pollInterval??5e3;for(;u.status!=="completed"&&u.status!=="failed"&&u.status!=="cancelled";){await new Promise(d=>setTimeout(d,p));let l=await n.taskStore.getTask(c);if(!l)throw new O(L.InternalError,`Task ${c} not found during polling`);u=l}return await n.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(on(za)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(za,async t=>{switch(t.params.ref.type){case"ref/prompt":return Eb(t),this.handlePromptCompletion(t,t.params.ref);case"ref/resource":return Ib(t),this.handleResourceCompletion(t,t.params.ref);default:throw new O(L.InvalidParams,`Invalid completion reference: ${t.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(t,r){let n=this._registeredPrompts[r.name];if(!n)throw new O(L.InvalidParams,`Prompt ${r.name} not found`);if(!n.enabled)throw new O(L.InvalidParams,`Prompt ${r.name} disabled`);if(!n.argsSchema)return ss;let i=Hr(n.argsSchema)?.[t.params.argument.name];if(!Sm(i))return ss;let s=lw(i);if(!s)return ss;let a=await s(t.params.argument.value,t.params.context);return gw(a)}async handleResourceCompletion(t,r){let n=Object.values(this._registeredResourceTemplates).find(s=>s.resourceTemplate.uriTemplate.toString()===r.uri);if(!n){if(this._registeredResources[r.uri])return ss;throw new O(L.InvalidParams,`Resource template ${t.params.ref.uri} not found`)}let o=n.resourceTemplate.completeCallback(t.params.argument.name);if(!o)return ss;let i=await o(t.params.argument.value,t.params.context);return gw(i)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(on(wa)),this.server.assertCanSetRequestHandler(on(Sa)),this.server.assertCanSetRequestHandler(on($a)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(wa,async(t,r)=>{let n=Object.entries(this._registeredResources).filter(([i,s])=>s.enabled).map(([i,s])=>({uri:i,name:s.name,...s.metadata})),o=[];for(let i of Object.values(this._registeredResourceTemplates)){if(!i.resourceTemplate.listCallback)continue;let s=await i.resourceTemplate.listCallback(r);for(let a of s.resources)o.push({...i.metadata,...a})}return{resources:[...n,...o]}}),this.server.setRequestHandler(Sa,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([r,n])=>({name:r,uriTemplate:n.resourceTemplate.uriTemplate.toString(),...n.metadata}))})),this.server.setRequestHandler($a,async(t,r)=>{let n=new URL(t.params.uri),o=this._registeredResources[n.toString()];if(o){if(!o.enabled)throw new O(L.InvalidParams,`Resource ${n} disabled`);return o.readCallback(n,r)}for(let i of Object.values(this._registeredResourceTemplates)){let s=i.resourceTemplate.uriTemplate.match(n.toString());if(s)return i.readCallback(n,s,r)}throw new O(L.InvalidParams,`Resource ${n} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(on(Ta)),this.server.assertCanSetRequestHandler(on(Pa)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(Ta,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,t])=>t.enabled).map(([t,r])=>({name:t,title:r.title,description:r.description,arguments:r.argsSchema?Cj(r.argsSchema):void 0}))})),this.server.setRequestHandler(Pa,async(t,r)=>{let n=this._registeredPrompts[t.params.name];if(!n)throw new O(L.InvalidParams,`Prompt ${t.params.name} not found`);if(!n.enabled)throw new O(L.InvalidParams,`Prompt ${t.params.name} disabled`);if(n.argsSchema){let o=ho(n.argsSchema),i=await ia(o,t.params.arguments);if(!i.success){let c="error"in i?i.error:"Unknown error",u=sa(c);throw new O(L.InvalidParams,`Invalid arguments for prompt ${t.params.name}: ${u}`)}let s=i.data,a=n.callback;return await Promise.resolve(a(s,r))}else{let o=n.callback;return await Promise.resolve(o(r))}}),this._promptHandlersInitialized=!0)}resource(t,r,...n){let o;typeof n[0]=="object"&&(o=n.shift());let i=n[0];if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);let s=this._createRegisteredResource(t,void 0,r,o,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);let s=this._createRegisteredResourceTemplate(t,void 0,r,o,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}}registerResource(t,r,n,o){if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);let i=this._createRegisteredResource(t,n.title,r,n,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);let i=this._createRegisteredResourceTemplate(t,n.title,r,n,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}}_createRegisteredResource(t,r,n,o,i){let s={name:t,title:r,metadata:o,readCallback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({uri:null}),update:a=>{typeof a.uri<"u"&&a.uri!==n&&(delete this._registeredResources[n],a.uri&&(this._registeredResources[a.uri]=s)),typeof a.name<"u"&&(s.name=a.name),typeof a.title<"u"&&(s.title=a.title),typeof a.metadata<"u"&&(s.metadata=a.metadata),typeof a.callback<"u"&&(s.readCallback=a.callback),typeof a.enabled<"u"&&(s.enabled=a.enabled),this.sendResourceListChanged()}};return this._registeredResources[n]=s,s}_createRegisteredResourceTemplate(t,r,n,o,i){let s={resourceTemplate:n,title:r,metadata:o,readCallback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({name:null}),update:u=>{typeof u.name<"u"&&u.name!==t&&(delete this._registeredResourceTemplates[t],u.name&&(this._registeredResourceTemplates[u.name]=s)),typeof u.title<"u"&&(s.title=u.title),typeof u.template<"u"&&(s.resourceTemplate=u.template),typeof u.metadata<"u"&&(s.metadata=u.metadata),typeof u.callback<"u"&&(s.readCallback=u.callback),typeof u.enabled<"u"&&(s.enabled=u.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[t]=s;let a=n.uriTemplate.variableNames;return Array.isArray(a)&&a.some(u=>!!n.completeCallback(u))&&this.setCompletionRequestHandler(),s}_createRegisteredPrompt(t,r,n,o,i){let s={title:r,description:n,argsSchema:o===void 0?void 0:An(o),callback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({name:null}),update:a=>{typeof a.name<"u"&&a.name!==t&&(delete this._registeredPrompts[t],a.name&&(this._registeredPrompts[a.name]=s)),typeof a.title<"u"&&(s.title=a.title),typeof a.description<"u"&&(s.description=a.description),typeof a.argsSchema<"u"&&(s.argsSchema=An(a.argsSchema)),typeof a.callback<"u"&&(s.callback=a.callback),typeof a.enabled<"u"&&(s.enabled=a.enabled),this.sendPromptListChanged()}};return this._registeredPrompts[t]=s,o&&Object.values(o).some(c=>{let u=c instanceof ft?c._def?.innerType:c;return Sm(u)})&&this.setCompletionRequestHandler(),s}_createRegisteredTool(t,r,n,o,i,s,a,c,u){$m(t);let p={title:r,description:n,inputSchema:mw(o),outputSchema:mw(i),annotations:s,execution:a,_meta:c,handler:u,enabled:!0,disable:()=>p.update({enabled:!1}),enable:()=>p.update({enabled:!0}),remove:()=>p.update({name:null}),update:l=>{typeof l.name<"u"&&l.name!==t&&(typeof l.name=="string"&&$m(l.name),delete this._registeredTools[t],l.name&&(this._registeredTools[l.name]=p)),typeof l.title<"u"&&(p.title=l.title),typeof l.description<"u"&&(p.description=l.description),typeof l.paramsSchema<"u"&&(p.inputSchema=An(l.paramsSchema)),typeof l.outputSchema<"u"&&(p.outputSchema=An(l.outputSchema)),typeof l.callback<"u"&&(p.handler=l.callback),typeof l.annotations<"u"&&(p.annotations=l.annotations),typeof l._meta<"u"&&(p._meta=l._meta),typeof l.enabled<"u"&&(p.enabled=l.enabled),this.sendToolListChanged()}};return this._registeredTools[t]=p,this.setToolRequestHandlers(),this.sendToolListChanged(),p}tool(t,...r){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let n,o,i,s;if(typeof r[0]=="string"&&(n=r.shift()),r.length>1){let c=r[0];Tm(c)?(o=r.shift(),r.length>1&&typeof r[0]=="object"&&r[0]!==null&&!Tm(r[0])&&(s=r.shift())):typeof c=="object"&&c!==null&&(s=r.shift())}let a=r[0];return this._createRegisteredTool(t,void 0,n,o,i,s,{taskSupport:"forbidden"},void 0,a)}registerTool(t,r,n){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let{title:o,description:i,inputSchema:s,outputSchema:a,annotations:c,_meta:u}=r;return this._createRegisteredTool(t,o,i,s,a,c,{taskSupport:"forbidden"},u,n)}prompt(t,...r){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let n;typeof r[0]=="string"&&(n=r.shift());let o;r.length>1&&(o=r.shift());let i=r[0],s=this._createRegisteredPrompt(t,void 0,n,o,i);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),s}registerPrompt(t,r,n){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let{title:o,description:i,argsSchema:s}=r,a=this._createRegisteredPrompt(t,o,i,s,n);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),a}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(t,r){return this.server.sendLoggingMessage(t,r)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}},as=class{constructor(t,r){this._callbacks=r,this._uriTemplate=typeof t=="string"?new Cc(t):t}get uriTemplate(){return this._uriTemplate}get listCallback(){return this._callbacks.list}completeCallback(t){return this._callbacks.complete?.[t]}},Tj={type:"object",properties:{}};ss={completion:{values:[],hasMore:!1}}});function Ej(e){return xb.parse(JSON.parse(e))}function vw(e){return JSON.stringify(e)+`
|
|
41
|
+
`}var zc,bw=v(()=>{Ei();zc=class{append(t){this._buffer=this._buffer?Buffer.concat([this._buffer,t]):t}readMessage(){if(!this._buffer)return null;let t=this._buffer.indexOf(`
|
|
42
|
+
`);if(t===-1)return null;let r=this._buffer.toString("utf8",0,t).replace(/\r$/,"");return this._buffer=this._buffer.subarray(t+1),Ej(r)}clear(){this._buffer=void 0}}});var Pm,Rc,xw=v(()=>{Pm=St(require("node:process"),1);bw();Rc=class{constructor(t=Pm.default.stdin,r=Pm.default.stdout){this._stdin=t,this._stdout=r,this._readBuffer=new zc,this._started=!1,this._ondata=n=>{this._readBuffer.append(n),this.processReadBuffer()},this._onerror=n=>{this.onerror?.(n)}}async start(){if(this._started)throw new Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror)}processReadBuffer(){for(;;)try{let t=this._readBuffer.readMessage();if(t===null)break;this.onmessage?.(t)}catch(t){this.onerror?.(t)}}async close(){this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0&&this._stdin.pause(),this._readBuffer.clear(),this.onclose?.()}send(t){return new Promise(r=>{let n=vw(t);this._stdout.write(n)?r():this._stdout.once("drain",r)})}}});function Dw(e){return typeof e>"u"||e===null}function Ij(e){return typeof e=="object"&&e!==null}function zj(e){return Array.isArray(e)?e:Dw(e)?[]:[e]}function Rj(e,t){var r,n,o,i;if(t)for(i=Object.keys(t),r=0,n=i.length;r<n;r+=1)o=i[r],e[o]=t[o];return e}function Aj(e,t){var r="",n;for(n=0;n<t;n+=1)r+=e;return r}function Oj(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}function Mw(e,t){var r="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
43
|
+
|
|
44
|
+
`+e.mark.snippet),n+" "+r):n}function us(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Mw(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}function Cm(e,t,r,n,o){var i="",s="",a=Math.floor(o/2)-1;return n-t>a&&(i=" ... ",t=n-a+i.length),r-n>a&&(s=" ...",r=n+a-s.length),{str:i+e.slice(t,r).replace(/\t/g,"\u2192")+s,pos:n-t+i.length}}function Em(e,t){return je.repeat(" ",t-e.length)+e}function qj(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],o=[],i,s=-1;i=r.exec(e.buffer);)o.push(i.index),n.push(i.index+i[0].length),e.position<=i.index&&s<0&&(s=n.length-2);s<0&&(s=n.length-1);var a="",c,u,p=Math.min(e.line+t.linesAfter,o.length).toString().length,l=t.maxLength-(t.indent+p+3);for(c=1;c<=t.linesBefore&&!(s-c<0);c++)u=Cm(e.buffer,n[s-c],o[s-c],e.position-(n[s]-n[s-c]),l),a=je.repeat(" ",t.indent)+Em((e.line-c+1).toString(),p)+" | "+u.str+`
|
|
45
|
+
`+a;for(u=Cm(e.buffer,n[s],o[s],e.position,l),a+=je.repeat(" ",t.indent)+Em((e.line+1).toString(),p)+" | "+u.str+`
|
|
46
|
+
`,a+=je.repeat("-",t.indent+p+3+u.pos)+`^
|
|
47
|
+
`,c=1;c<=t.linesAfter&&!(s+c>=o.length);c++)u=Cm(e.buffer,n[s+c],o[s+c],e.position-(n[s]-n[s+c]),l),a+=je.repeat(" ",t.indent)+Em((e.line+c+1).toString(),p)+" | "+u.str+`
|
|
48
|
+
`;return a.replace(/\n$/,"")}function Vj(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})}),t}function Hj(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Uj.indexOf(r)===-1)throw new at('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Vj(t.styleAliases||null),Bj.indexOf(this.kind)===-1)throw new at('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}function kw(e,t){var r=[];return e[t].forEach(function(n){var o=r.length;r.forEach(function(i,s){i.tag===n.tag&&i.kind===n.kind&&i.multi===n.multi&&(o=s)}),r[o]=n}),r}function Gj(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function n(o){o.multi?(e.multi[o.kind].push(o),e.multi.fallback.push(o)):e[o.kind][o.tag]=e.fallback[o.tag]=o}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(n);return e}function zm(e){return this.extend(e)}function Wj(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function Kj(){return null}function Jj(e){return e===null}function Yj(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function Qj(e){return e==="true"||e==="True"||e==="TRUE"}function Xj(e){return Object.prototype.toString.call(e)==="[object Boolean]"}function eD(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function tD(e){return 48<=e&&e<=55}function rD(e){return 48<=e&&e<=57}function nD(e){if(e===null)return!1;var t=e.length,r=0,n=!1,o;if(!t)return!1;if(o=e[r],(o==="-"||o==="+")&&(o=e[++r]),o==="0"){if(r+1===t)return!0;if(o=e[++r],o==="b"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(o!=="0"&&o!=="1")return!1;n=!0}return n&&o!=="_"}if(o==="x"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!eD(e.charCodeAt(r)))return!1;n=!0}return n&&o!=="_"}if(o==="o"){for(r++;r<t;r++)if(o=e[r],o!=="_"){if(!tD(e.charCodeAt(r)))return!1;n=!0}return n&&o!=="_"}}if(o==="_")return!1;for(;r<t;r++)if(o=e[r],o!=="_"){if(!rD(e.charCodeAt(r)))return!1;n=!0}return!(!n||o==="_")}function oD(e){var t=e,r=1,n;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),n=t[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),t=t.slice(1),n=t[0]),t==="0")return 0;if(n==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function iD(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!je.isNegativeZero(e)}function aD(e){return!(e===null||!sD.test(e)||e[e.length-1]==="_")}function cD(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}function lD(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(je.isNegativeZero(e))return"-0.0";return r=e.toString(10),uD.test(r)?r.replace("e",".e"):r}function pD(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||je.isNegativeZero(e))}function dD(e){return e===null?!1:Jw.exec(e)!==null||Yw.exec(e)!==null}function fD(e){var t,r,n,o,i,s,a,c=0,u=null,p,l,d;if(t=Jw.exec(e),t===null&&(t=Yw.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,o=+t[3],!t[4])return new Date(Date.UTC(r,n,o));if(i=+t[4],s=+t[5],a=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(p=+t[10],l=+(t[11]||0),u=(p*60+l)*6e4,t[9]==="-"&&(u=-u)),d=new Date(Date.UTC(r,n,o,i,s,a,c)),u&&d.setTime(d.getTime()-u),d}function hD(e){return e.toISOString()}function mD(e){return e==="<<"||e===null}function gD(e){if(e===null)return!1;var t,r,n=0,o=e.length,i=jm;for(r=0;r<o;r++)if(t=i.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;n+=6}return n%8===0}function yD(e){var t,r,n=e.replace(/[\r\n=]/g,""),o=n.length,i=jm,s=0,a=[];for(t=0;t<o;t++)t%4===0&&t&&(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)),s=s<<6|i.indexOf(n.charAt(t));return r=o%4*6,r===0?(a.push(s>>16&255),a.push(s>>8&255),a.push(s&255)):r===18?(a.push(s>>10&255),a.push(s>>2&255)):r===12&&a.push(s>>4&255),new Uint8Array(a)}function _D(e){var t="",r=0,n,o,i=e.length,s=jm;for(n=0;n<i;n++)n%3===0&&n&&(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[n];return o=i%3,o===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):o===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):o===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}function vD(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}function kD(e){if(e===null)return!0;var t=[],r,n,o,i,s,a=e;for(r=0,n=a.length;r<n;r+=1){if(o=a[r],s=!1,xD.call(o)!=="[object Object]")return!1;for(i in o)if(bD.call(o,i))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(i)===-1)t.push(i);else return!1}return!0}function wD(e){return e!==null?e:[]}function $D(e){if(e===null)return!0;var t,r,n,o,i,s=e;for(i=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(n=s[t],SD.call(n)!=="[object Object]"||(o=Object.keys(n),o.length!==1))return!1;i[t]=[o[0],n[o[0]]]}return!0}function TD(e){if(e===null)return[];var t,r,n,o,i,s=e;for(i=new Array(s.length),t=0,r=s.length;t<r;t+=1)n=s[t],o=Object.keys(n),i[t]=[o[0],n[o[0]]];return i}function CD(e){if(e===null)return!0;var t,r=e;for(t in r)if(PD.call(r,t)&&r[t]!==null)return!1;return!0}function ED(e){return e!==null?e:{}}function Sw(e){return Object.prototype.toString.call(e)}function mr(e){return e===10||e===13}function Vn(e){return e===9||e===32}function bt(e){return e===9||e===32||e===10||e===13}function jo(e){return e===44||e===91||e===93||e===123||e===125}function OD(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function ND(e){return e===120?2:e===117?4:e===85?8:0}function jD(e){return 48<=e&&e<=57?e-48:-1}function $w(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
49
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function DD(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function cS(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}function MD(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Dm,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function pS(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=Fj(r),new at(t,r)}function D(e,t){throw pS(e,t)}function Nc(e,t){e.onWarning&&e.onWarning.call(null,pS(e,t))}function sn(e,t,r,n){var o,i,s,a;if(t<r){if(a=e.input.slice(t,r),n)for(o=0,i=a.length;o<i;o+=1)s=a.charCodeAt(o),s===9||32<=s&&s<=1114111||D(e,"expected valid JSON character");else zD.test(a)&&D(e,"the stream contains non-printable characters");e.result+=a}}function Pw(e,t,r,n){var o,i,s,a;for(je.isObject(r)||D(e,"cannot merge mappings; the provided source object is unacceptable"),o=Object.keys(r),s=0,a=o.length;s<a;s+=1)i=o[s],an.call(t,i)||(cS(t,i,r[i]),n[i]=!0)}function Do(e,t,r,n,o,i,s,a,c){var u,p;if(Array.isArray(o))for(o=Array.prototype.slice.call(o),u=0,p=o.length;u<p;u+=1)Array.isArray(o[u])&&D(e,"nested arrays are not supported inside keys"),typeof o=="object"&&Sw(o[u])==="[object Object]"&&(o[u]="[object Object]");if(typeof o=="object"&&Sw(o)==="[object Object]"&&(o="[object Object]"),o=String(o),t===null&&(t={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(i))for(u=0,p=i.length;u<p;u+=1)Pw(e,t,i[u],r);else Pw(e,t,i,r);else!e.json&&!an.call(r,o)&&an.call(t,o)&&(e.line=s||e.line,e.lineStart=a||e.lineStart,e.position=c||e.position,D(e,"duplicated mapping key")),cS(t,o,i),delete r[o];return t}function Mm(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):D(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Ae(e,t,r){for(var n=0,o=e.input.charCodeAt(e.position);o!==0;){for(;Vn(o);)o===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),o=e.input.charCodeAt(++e.position);if(t&&o===35)do o=e.input.charCodeAt(++e.position);while(o!==10&&o!==13&&o!==0);if(mr(o))for(Mm(e),o=e.input.charCodeAt(e.position),n++,e.lineIndent=0;o===32;)e.lineIndent++,o=e.input.charCodeAt(++e.position);else break}return r!==-1&&n!==0&&e.lineIndent<r&&Nc(e,"deficient indentation"),n}function Mc(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||bt(r)))}function Lm(e,t){t===1?e.result+=" ":t>1&&(e.result+=je.repeat(`
|
|
50
|
+
`,t-1))}function LD(e,t,r){var n,o,i,s,a,c,u,p,l=e.kind,d=e.result,h;if(h=e.input.charCodeAt(e.position),bt(h)||jo(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(o=e.input.charCodeAt(e.position+1),bt(o)||r&&jo(o)))return!1;for(e.kind="scalar",e.result="",i=s=e.position,a=!1;h!==0;){if(h===58){if(o=e.input.charCodeAt(e.position+1),bt(o)||r&&jo(o))break}else if(h===35){if(n=e.input.charCodeAt(e.position-1),bt(n))break}else{if(e.position===e.lineStart&&Mc(e)||r&&jo(h))break;if(mr(h))if(c=e.line,u=e.lineStart,p=e.lineIndent,Ae(e,!1,-1),e.lineIndent>=t){a=!0,h=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=c,e.lineStart=u,e.lineIndent=p;break}}a&&(sn(e,i,s,!1),Lm(e,e.line-c),i=s=e.position,a=!1),Vn(h)||(s=e.position+1),h=e.input.charCodeAt(++e.position)}return sn(e,i,s,!1),e.result?!0:(e.kind=l,e.result=d,!1)}function ZD(e,t){var r,n,o;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=o=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(sn(e,n,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)n=e.position,e.position++,o=e.position;else return!0;else mr(r)?(sn(e,n,o,!0),Lm(e,Ae(e,!1,t)),n=o=e.position):e.position===e.lineStart&&Mc(e)?D(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);D(e,"unexpected end of the stream within a single quoted scalar")}function qD(e,t){var r,n,o,i,s,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return sn(e,r,e.position,!0),e.position++,!0;if(a===92){if(sn(e,r,e.position,!0),a=e.input.charCodeAt(++e.position),mr(a))Ae(e,!1,t);else if(a<256&&uS[a])e.result+=lS[a],e.position++;else if((s=ND(a))>0){for(o=s,i=0;o>0;o--)a=e.input.charCodeAt(++e.position),(s=OD(a))>=0?i=(i<<4)+s:D(e,"expected hexadecimal character");e.result+=DD(i),e.position++}else D(e,"unknown escape sequence");r=n=e.position}else mr(a)?(sn(e,r,n,!0),Lm(e,Ae(e,!1,t)),r=n=e.position):e.position===e.lineStart&&Mc(e)?D(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}D(e,"unexpected end of the stream within a double quoted scalar")}function FD(e,t){var r=!0,n,o,i,s=e.tag,a,c=e.anchor,u,p,l,d,h,f=Object.create(null),m,y,_,b;if(b=e.input.charCodeAt(e.position),b===91)p=93,h=!1,a=[];else if(b===123)p=125,h=!0,a={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),b=e.input.charCodeAt(++e.position);b!==0;){if(Ae(e,!0,t),b=e.input.charCodeAt(e.position),b===p)return e.position++,e.tag=s,e.anchor=c,e.kind=h?"mapping":"sequence",e.result=a,!0;r?b===44&&D(e,"expected the node content, but found ','"):D(e,"missed comma between flow collection entries"),y=m=_=null,l=d=!1,b===63&&(u=e.input.charCodeAt(e.position+1),bt(u)&&(l=d=!0,e.position++,Ae(e,!0,t))),n=e.line,o=e.lineStart,i=e.position,Mo(e,t,Ac,!1,!0),y=e.tag,m=e.result,Ae(e,!0,t),b=e.input.charCodeAt(e.position),(d||e.line===n)&&b===58&&(l=!0,b=e.input.charCodeAt(++e.position),Ae(e,!0,t),Mo(e,t,Ac,!1,!0),_=e.result),h?Do(e,a,f,y,m,_,n,o,i):l?a.push(Do(e,null,f,y,m,_,n,o,i)):a.push(m),Ae(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}D(e,"unexpected end of the stream within a flow collection")}function UD(e,t){var r,n,o=Im,i=!1,s=!1,a=t,c=0,u=!1,p,l;if(l=e.input.charCodeAt(e.position),l===124)n=!1;else if(l===62)n=!0;else return!1;for(e.kind="scalar",e.result="";l!==0;)if(l=e.input.charCodeAt(++e.position),l===43||l===45)Im===o?o=l===43?ww:ID:D(e,"repeat of a chomping mode identifier");else if((p=jD(l))>=0)p===0?D(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?D(e,"repeat of an indentation width identifier"):(a=t+p-1,s=!0);else break;if(Vn(l)){do l=e.input.charCodeAt(++e.position);while(Vn(l));if(l===35)do l=e.input.charCodeAt(++e.position);while(!mr(l)&&l!==0)}for(;l!==0;){for(Mm(e),e.lineIndent=0,l=e.input.charCodeAt(e.position);(!s||e.lineIndent<a)&&l===32;)e.lineIndent++,l=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>a&&(a=e.lineIndent),mr(l)){c++;continue}if(e.lineIndent<a){o===ww?e.result+=je.repeat(`
|
|
51
|
+
`,i?1+c:c):o===Im&&i&&(e.result+=`
|
|
52
|
+
`);break}for(n?Vn(l)?(u=!0,e.result+=je.repeat(`
|
|
53
|
+
`,i?1+c:c)):u?(u=!1,e.result+=je.repeat(`
|
|
54
|
+
`,c+1)):c===0?i&&(e.result+=" "):e.result+=je.repeat(`
|
|
55
|
+
`,c):e.result+=je.repeat(`
|
|
56
|
+
`,i?1+c:c),i=!0,s=!0,c=0,r=e.position;!mr(l)&&l!==0;)l=e.input.charCodeAt(++e.position);sn(e,r,e.position,!1)}return!0}function Cw(e,t){var r,n=e.tag,o=e.anchor,i=[],s,a=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=i),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,D(e,"tab characters must not be used in indentation")),!(c!==45||(s=e.input.charCodeAt(e.position+1),!bt(s))));){if(a=!0,e.position++,Ae(e,!0,-1)&&e.lineIndent<=t){i.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,Mo(e,t,iS,!1,!0),i.push(e.result),Ae(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)D(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return a?(e.tag=n,e.anchor=o,e.kind="sequence",e.result=i,!0):!1}function BD(e,t,r){var n,o,i,s,a,c,u=e.tag,p=e.anchor,l={},d=Object.create(null),h=null,f=null,m=null,y=!1,_=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,D(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),i=e.line,(b===63||b===58)&&bt(n))b===63?(y&&(Do(e,l,d,h,f,null,s,a,c),h=f=m=null),_=!0,y=!0,o=!0):y?(y=!1,o=!0):D(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=n;else{if(s=e.line,a=e.lineStart,c=e.position,!Mo(e,r,oS,!1,!0))break;if(e.line===i){for(b=e.input.charCodeAt(e.position);Vn(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),bt(b)||D(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Do(e,l,d,h,f,null,s,a,c),h=f=m=null),_=!0,y=!1,o=!1,h=e.tag,f=e.result;else if(_)D(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=u,e.anchor=p,!0}else if(_)D(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=u,e.anchor=p,!0}if((e.line===i||e.lineIndent>t)&&(y&&(s=e.line,a=e.lineStart,c=e.position),Mo(e,t,Oc,!0,o)&&(y?f=e.result:m=e.result),y||(Do(e,l,d,h,f,m,s,a,c),h=f=m=null),Ae(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===i||e.lineIndent>t)&&b!==0)D(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Do(e,l,d,h,f,null,s,a,c),_&&(e.tag=u,e.anchor=p,e.kind="mapping",e.result=l),_}function VD(e){var t,r=!1,n=!1,o,i,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&D(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(r=!0,s=e.input.charCodeAt(++e.position)):s===33?(n=!0,o="!!",s=e.input.charCodeAt(++e.position)):o="!",t=e.position,r){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(i=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):D(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!bt(s);)s===33&&(n?D(e,"tag suffix cannot contain exclamation marks"):(o=e.input.slice(t-1,e.position+1),sS.test(o)||D(e,"named tag handle cannot contain such characters"),n=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),AD.test(i)&&D(e,"tag suffix cannot contain flow indicator characters")}i&&!aS.test(i)&&D(e,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch{D(e,"tag name is malformed: "+i)}return r?e.tag=i:an.call(e.tagMap,o)?e.tag=e.tagMap[o]+i:o==="!"?e.tag="!"+i:o==="!!"?e.tag="tag:yaml.org,2002:"+i:D(e,'undeclared tag handle "'+o+'"'),!0}function HD(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&D(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!bt(r)&&!jo(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&D(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function GD(e){var t,r,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!bt(n)&&!jo(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&D(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),an.call(e.anchorMap,r)||D(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Ae(e,!0,-1),!0}function Mo(e,t,r,n,o){var i,s,a,c=1,u=!1,p=!1,l,d,h,f,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,i=s=a=Oc===r||iS===r,n&&Ae(e,!0,-1)&&(u=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;VD(e)||HD(e);)Ae(e,!0,-1)?(u=!0,a=i,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):a=!1;if(a&&(a=u||o),(c===1||Oc===r)&&(Ac===r||oS===r?m=t:m=t+1,y=e.position-e.lineStart,c===1?a&&(Cw(e,y)||BD(e,y,m))||FD(e,m)?p=!0:(s&&UD(e,m)||ZD(e,m)||qD(e,m)?p=!0:GD(e)?(p=!0,(e.tag!==null||e.anchor!==null)&&D(e,"alias node should not have any properties")):LD(e,m,Ac===r)&&(p=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(p=a&&Cw(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&D(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),l=0,d=e.implicitTypes.length;l<d;l+=1)if(f=e.implicitTypes[l],f.resolve(e.result)){e.result=f.construct(e.result),e.tag=f.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(an.call(e.typeMap[e.kind||"fallback"],e.tag))f=e.typeMap[e.kind||"fallback"][e.tag];else for(f=null,h=e.typeMap.multi[e.kind||"fallback"],l=0,d=h.length;l<d;l+=1)if(e.tag.slice(0,h[l].tag.length)===h[l].tag){f=h[l];break}f||D(e,"unknown tag !<"+e.tag+">"),e.result!==null&&f.kind!==e.kind&&D(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):D(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||p}function WD(e){var t=e.position,r,n,o,i=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(s=e.input.charCodeAt(e.position))!==0&&(Ae(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(i=!0,s=e.input.charCodeAt(++e.position),r=e.position;s!==0&&!bt(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(r,e.position),o=[],n.length<1&&D(e,"directive name must not be less than one character in length");s!==0;){for(;Vn(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!mr(s));break}if(mr(s))break;for(r=e.position;s!==0&&!bt(s);)s=e.input.charCodeAt(++e.position);o.push(e.input.slice(r,e.position))}s!==0&&Mm(e),an.call(Tw,n)?Tw[n](e,n,o):Nc(e,'unknown document directive "'+n+'"')}if(Ae(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Ae(e,!0,-1)):i&&D(e,"directives end mark is expected"),Mo(e,e.lineIndent-1,Oc,!1,!0),Ae(e,!0,-1),e.checkLineBreaks&&RD.test(e.input.slice(t,e.position))&&Nc(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Mc(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Ae(e,!0,-1));return}if(e.position<e.length-1)D(e,"end of the stream or a document separator is expected");else return}function dS(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
57
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new MD(e,t),n=e.indexOf("\0");for(n!==-1&&(r.position=n,D(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)WD(r);return r.documents}function KD(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var n=dS(e,r);if(typeof t!="function")return n;for(var o=0,i=n.length;o<i;o+=1)t(n[o])}function JD(e,t){var r=dS(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new at("expected a single document in the stream, but found more")}}function y3(e,t){var r,n,o,i,s,a,c;if(t===null)return{};for(r={},n=Object.keys(t),o=0,i=n.length;o<i;o+=1)s=n[o],a=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),c=e.compiledTypeMap.fallback[s],c&&mS.call(c.styleAliases,a)&&(a=c.styleAliases[a]),r[s]=a;return r}function _3(e){var t,r,n;if(t=e.toString(16).toUpperCase(),e<=255)r="x",n=2;else if(e<=65535)r="u",n=4;else if(e<=4294967295)r="U",n=8;else throw new at("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+je.repeat("0",n-t.length)+t}function b3(e){this.schema=e.schema||Dm,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=je.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=y3(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?ps:v3,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Ew(e,t){for(var r=je.repeat(" ",t),n=0,o=-1,i="",s,a=e.length;n<a;)o=e.indexOf(`
|
|
58
|
+
`,n),o===-1?(s=e.slice(n),n=a):(s=e.slice(n,o+1),n=o+1),s.length&&s!==`
|
|
59
|
+
`&&(i+=r),i+=s;return i}function Am(e,t){return`
|
|
60
|
+
`+je.repeat(" ",e.indent*t)}function x3(e,t){var r,n,o;for(r=0,n=e.implicitTypes.length;r<n;r+=1)if(o=e.implicitTypes[r],o.resolve(t))return!0;return!1}function Dc(e){return e===t3||e===XD}function ds(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Zm||65536<=e&&e<=1114111}function Iw(e){return ds(e)&&e!==Zm&&e!==e3&&e!==ls}function zw(e,t,r){var n=Iw(e),o=n&&!Dc(e);return(r?n:n&&e!==gS&&e!==yS&&e!==_S&&e!==vS&&e!==bS)&&e!==Rm&&!(t===jc&&!o)||Iw(t)&&!Dc(t)&&e===Rm||t===jc&&o}function k3(e){return ds(e)&&e!==Zm&&!Dc(e)&&e!==c3&&e!==p3&&e!==jc&&e!==gS&&e!==yS&&e!==_S&&e!==vS&&e!==bS&&e!==Rm&&e!==i3&&e!==a3&&e!==r3&&e!==h3&&e!==u3&&e!==l3&&e!==s3&&e!==n3&&e!==o3&&e!==d3&&e!==f3}function w3(e){return!Dc(e)&&e!==jc}function cs(e,t){var r=e.charCodeAt(t),n;return r>=55296&&r<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function xS(e){var t=/^\n* /;return t.test(e)}function S3(e,t,r,n,o,i,s,a){var c,u=0,p=null,l=!1,d=!1,h=n!==-1,f=-1,m=k3(cs(e,0))&&w3(cs(e,e.length-1));if(t||s)for(c=0;c<e.length;u>=65536?c+=2:c++){if(u=cs(e,c),!ds(u))return No;m=m&&zw(u,p,a),p=u}else{for(c=0;c<e.length;u>=65536?c+=2:c++){if(u=cs(e,c),u===ls)l=!0,h&&(d=d||c-f-1>n&&e[f+1]!==" ",f=c);else if(!ds(u))return No;m=m&&zw(u,p,a),p=u}d=d||h&&c-f-1>n&&e[f+1]!==" "}return!l&&!d?m&&!s&&!o(e)?kS:i===ps?No:Om:r>9&&xS(e)?No:s?i===ps?No:Om:d?SS:wS}function $3(e,t,r,n,o){e.dump=(function(){if(t.length===0)return e.quotingType===ps?'""':"''";if(!e.noCompatMode&&(m3.indexOf(t)!==-1||g3.test(t)))return e.quotingType===ps?'"'+t+'"':"'"+t+"'";var i=e.indent*Math.max(1,r),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),a=n||e.flowLevel>-1&&r>=e.flowLevel;function c(u){return x3(e,u)}switch(S3(t,a,e.indent,s,c,e.quotingType,e.forceQuotes&&!n,o)){case kS:return t;case Om:return"'"+t.replace(/'/g,"''")+"'";case wS:return"|"+Rw(t,e.indent)+Aw(Ew(t,i));case SS:return">"+Rw(t,e.indent)+Aw(Ew(T3(t,s),i));case No:return'"'+P3(t)+'"';default:throw new at("impossible error: invalid scalar style")}})()}function Rw(e,t){var r=xS(e)?String(t):"",n=e[e.length-1]===`
|
|
61
|
+
`,o=n&&(e[e.length-2]===`
|
|
62
|
+
`||e===`
|
|
63
|
+
`),i=o?"+":n?"":"-";return r+i+`
|
|
64
|
+
`}function Aw(e){return e[e.length-1]===`
|
|
65
|
+
`?e.slice(0,-1):e}function T3(e,t){for(var r=/(\n+)([^\n]*)/g,n=(function(){var u=e.indexOf(`
|
|
66
|
+
`);return u=u!==-1?u:e.length,r.lastIndex=u,Ow(e.slice(0,u),t)})(),o=e[0]===`
|
|
67
|
+
`||e[0]===" ",i,s;s=r.exec(e);){var a=s[1],c=s[2];i=c[0]===" ",n+=a+(!o&&!i&&c!==""?`
|
|
68
|
+
`:"")+Ow(c,t),o=i}return n}function Ow(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,n,o=0,i,s=0,a=0,c="";n=r.exec(e);)a=n.index,a-o>t&&(i=s>o?s:a,c+=`
|
|
69
|
+
`+e.slice(o,i),o=i+1),s=a;return c+=`
|
|
70
|
+
`,e.length-o>t&&s>o?c+=e.slice(o,s)+`
|
|
71
|
+
`+e.slice(s+1):c+=e.slice(o),c.slice(1)}function P3(e){for(var t="",r=0,n,o=0;o<e.length;r>=65536?o+=2:o++)r=cs(e,o),n=Xe[r],!n&&ds(r)?(t+=e[o],r>=65536&&(t+=e[o+1])):t+=n||_3(r);return t}function C3(e,t,r){var n="",o=e.tag,i,s,a;for(i=0,s=r.length;i<s;i+=1)a=r[i],e.replacer&&(a=e.replacer.call(r,String(i),a)),(Er(e,t,a,!1,!1)||typeof a>"u"&&Er(e,t,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=o,e.dump="["+n+"]"}function Nw(e,t,r,n){var o="",i=e.tag,s,a,c;for(s=0,a=r.length;s<a;s+=1)c=r[s],e.replacer&&(c=e.replacer.call(r,String(s),c)),(Er(e,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&Er(e,t+1,null,!0,!0,!1,!0))&&((!n||o!=="")&&(o+=Am(e,t)),e.dump&&ls===e.dump.charCodeAt(0)?o+="-":o+="- ",o+=e.dump);e.tag=i,e.dump=o||"[]"}function E3(e,t,r){var n="",o=e.tag,i=Object.keys(r),s,a,c,u,p;for(s=0,a=i.length;s<a;s+=1)p="",n!==""&&(p+=", "),e.condenseFlow&&(p+='"'),c=i[s],u=r[c],e.replacer&&(u=e.replacer.call(r,c,u)),Er(e,t,c,!1,!1)&&(e.dump.length>1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Er(e,t,u,!1,!1)&&(p+=e.dump,n+=p));e.tag=o,e.dump="{"+n+"}"}function I3(e,t,r,n){var o="",i=e.tag,s=Object.keys(r),a,c,u,p,l,d;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new at("sortKeys must be a boolean or a function");for(a=0,c=s.length;a<c;a+=1)d="",(!n||o!=="")&&(d+=Am(e,t)),u=s[a],p=r[u],e.replacer&&(p=e.replacer.call(r,u,p)),Er(e,t+1,u,!0,!0,!0)&&(l=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,l&&(e.dump&&ls===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,l&&(d+=Am(e,t)),Er(e,t+1,p,!0,l)&&(e.dump&&ls===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,o+=d));e.tag=i,e.dump=o||"{}"}function jw(e,t,r){var n,o,i,s,a,c;for(o=r?e.explicitTypes:e.implicitTypes,i=0,s=o.length;i<s;i+=1)if(a=o[i],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof t=="object"&&t instanceof a.instanceOf)&&(!a.predicate||a.predicate(t))){if(r?a.multi&&a.representName?e.tag=a.representName(t):e.tag=a.tag:e.tag="?",a.represent){if(c=e.styleMap[a.tag]||a.defaultStyle,hS.call(a.represent)==="[object Function]")n=a.represent(t,c);else if(mS.call(a.represent,c))n=a.represent[c](t,c);else throw new at("!<"+a.tag+'> tag resolver accepts not "'+c+'" style');e.dump=n}return!0}return!1}function Er(e,t,r,n,o,i,s){e.tag=null,e.dump=r,jw(e,r,!1)||jw(e,r,!0);var a=hS.call(e.dump),c=n,u;n&&(n=e.flowLevel<0||e.flowLevel>t);var p=a==="[object Object]"||a==="[object Array]",l,d;if(p&&(l=e.duplicates.indexOf(r),d=l!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(o=!1),d&&e.usedDuplicates[l])e.dump="*ref_"+l;else{if(p&&d&&!e.usedDuplicates[l]&&(e.usedDuplicates[l]=!0),a==="[object Object]")n&&Object.keys(e.dump).length!==0?(I3(e,t,e.dump,o),d&&(e.dump="&ref_"+l+e.dump)):(E3(e,t,e.dump),d&&(e.dump="&ref_"+l+" "+e.dump));else if(a==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?Nw(e,t-1,e.dump,o):Nw(e,t,e.dump,o),d&&(e.dump="&ref_"+l+e.dump)):(C3(e,t,e.dump),d&&(e.dump="&ref_"+l+" "+e.dump));else if(a==="[object String]")e.tag!=="?"&&$3(e,e.dump,t,i,c);else{if(a==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new at("unacceptable kind of an object to dump "+a)}e.tag!==null&&e.tag!=="?"&&(u=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",e.dump=u+" "+e.dump)}return!0}function z3(e,t){var r=[],n=[],o,i;for(Nm(e,r,n),o=0,i=n.length;o<i;o+=1)t.duplicates.push(r[n[o]]);t.usedDuplicates=new Array(i)}function Nm(e,t,r){var n,o,i;if(e!==null&&typeof e=="object")if(o=t.indexOf(e),o!==-1)r.indexOf(o)===-1&&r.push(o);else if(t.push(e),Array.isArray(e))for(o=0,i=e.length;o<i;o+=1)Nm(e[o],t,r);else for(n=Object.keys(e),o=0,i=n.length;o<i;o+=1)Nm(e[n[o]],t,r)}function R3(e,t){t=t||{};var r=new b3(t);r.noRefs||z3(e,r);var n=e;return r.replacer&&(n=r.replacer.call({"":n},"",n)),Er(r,0,n,!0,!0)?r.dump+`
|
|
72
|
+
`:""}function qm(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var Nj,jj,Dj,Mj,Lj,Zj,je,at,Fj,Uj,Bj,Ge,Lw,Zw,qw,Fw,Uw,Bw,Vw,Hw,sD,uD,Gw,Ww,Kw,Jw,Yw,Qw,Xw,jm,eS,bD,xD,tS,SD,rS,PD,nS,Dm,an,Ac,oS,iS,Oc,Im,ID,ww,zD,RD,AD,sS,aS,uS,lS,Bn,Tw,YD,QD,fS,hS,mS,Zm,XD,ls,e3,t3,r3,n3,Rm,o3,i3,s3,a3,gS,c3,jc,u3,l3,p3,d3,yS,_S,f3,vS,h3,bS,Xe,m3,g3,v3,ps,kS,Om,wS,SS,No,A3,O3,N3,j3,D3,M3,L3,Z3,q3,F3,U3,B3,V3,H3,G3,W3,Fm,$S=v(()=>{Nj=Dw,jj=Ij,Dj=zj,Mj=Aj,Lj=Oj,Zj=Rj,je={isNothing:Nj,isObject:jj,toArray:Dj,repeat:Mj,isNegativeZero:Lj,extend:Zj};us.prototype=Object.create(Error.prototype);us.prototype.constructor=us;us.prototype.toString=function(t){return this.name+": "+Mw(this,t)};at=us;Fj=qj,Uj=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Bj=["scalar","sequence","mapping"];Ge=Hj;zm.prototype.extend=function(t){var r=[],n=[];if(t instanceof Ge)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new at("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(i){if(!(i instanceof Ge))throw new at("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(i.loadKind&&i.loadKind!=="scalar")throw new at("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(i.multi)throw new at("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(i){if(!(i instanceof Ge))throw new at("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(zm.prototype);return o.implicit=(this.implicit||[]).concat(r),o.explicit=(this.explicit||[]).concat(n),o.compiledImplicit=kw(o,"implicit"),o.compiledExplicit=kw(o,"explicit"),o.compiledTypeMap=Gj(o.compiledImplicit,o.compiledExplicit),o};Lw=zm,Zw=new Ge("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),qw=new Ge("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Fw=new Ge("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Uw=new Lw({explicit:[Zw,qw,Fw]});Bw=new Ge("tag:yaml.org,2002:null",{kind:"scalar",resolve:Wj,construct:Kj,predicate:Jj,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});Vw=new Ge("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Yj,construct:Qj,predicate:Xj,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});Hw=new Ge("tag:yaml.org,2002:int",{kind:"scalar",resolve:nD,construct:oD,predicate:iD,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),sD=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");uD=/^[-+]?[0-9]+e/;Gw=new Ge("tag:yaml.org,2002:float",{kind:"scalar",resolve:aD,construct:cD,predicate:pD,represent:lD,defaultStyle:"lowercase"}),Ww=Uw.extend({implicit:[Bw,Vw,Hw,Gw]}),Kw=Ww,Jw=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Yw=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");Qw=new Ge("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:dD,construct:fD,instanceOf:Date,represent:hD});Xw=new Ge("tag:yaml.org,2002:merge",{kind:"scalar",resolve:mD}),jm=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
73
|
+
\r`;eS=new Ge("tag:yaml.org,2002:binary",{kind:"scalar",resolve:gD,construct:yD,predicate:vD,represent:_D}),bD=Object.prototype.hasOwnProperty,xD=Object.prototype.toString;tS=new Ge("tag:yaml.org,2002:omap",{kind:"sequence",resolve:kD,construct:wD}),SD=Object.prototype.toString;rS=new Ge("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:$D,construct:TD}),PD=Object.prototype.hasOwnProperty;nS=new Ge("tag:yaml.org,2002:set",{kind:"mapping",resolve:CD,construct:ED}),Dm=Kw.extend({implicit:[Qw,Xw],explicit:[eS,tS,rS,nS]}),an=Object.prototype.hasOwnProperty,Ac=1,oS=2,iS=3,Oc=4,Im=1,ID=2,ww=3,zD=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,RD=/[\x85\u2028\u2029]/,AD=/[,\[\]\{\}]/,sS=/^(?:!|!!|![a-z\-]+!)$/i,aS=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;uS=new Array(256),lS=new Array(256);for(Bn=0;Bn<256;Bn++)uS[Bn]=$w(Bn)?1:0,lS[Bn]=$w(Bn);Tw={YAML:function(t,r,n){var o,i,s;t.version!==null&&D(t,"duplication of %YAML directive"),n.length!==1&&D(t,"YAML directive accepts exactly one argument"),o=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),o===null&&D(t,"ill-formed argument of the YAML directive"),i=parseInt(o[1],10),s=parseInt(o[2],10),i!==1&&D(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&Nc(t,"unsupported YAML version of the document")},TAG:function(t,r,n){var o,i;n.length!==2&&D(t,"TAG directive accepts exactly two arguments"),o=n[0],i=n[1],sS.test(o)||D(t,"ill-formed tag handle (first argument) of the TAG directive"),an.call(t.tagMap,o)&&D(t,'there is a previously declared suffix for "'+o+'" tag handle'),aS.test(i)||D(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch{D(t,"tag prefix is malformed: "+i)}t.tagMap[o]=i}};YD=KD,QD=JD,fS={loadAll:YD,load:QD},hS=Object.prototype.toString,mS=Object.prototype.hasOwnProperty,Zm=65279,XD=9,ls=10,e3=13,t3=32,r3=33,n3=34,Rm=35,o3=37,i3=38,s3=39,a3=42,gS=44,c3=45,jc=58,u3=61,l3=62,p3=63,d3=64,yS=91,_S=93,f3=96,vS=123,h3=124,bS=125,Xe={};Xe[0]="\\0";Xe[7]="\\a";Xe[8]="\\b";Xe[9]="\\t";Xe[10]="\\n";Xe[11]="\\v";Xe[12]="\\f";Xe[13]="\\r";Xe[27]="\\e";Xe[34]='\\"';Xe[92]="\\\\";Xe[133]="\\N";Xe[160]="\\_";Xe[8232]="\\L";Xe[8233]="\\P";m3=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],g3=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;v3=1,ps=2;kS=1,Om=2,wS=3,SS=4,No=5;A3=R3,O3={dump:A3};N3=Ge,j3=Lw,D3=Uw,M3=Ww,L3=Kw,Z3=Dm,q3=fS.load,F3=fS.loadAll,U3=O3.dump,B3=at,V3={binary:eS,float:Gw,map:Fw,null:Bw,pairs:rS,set:nS,timestamp:Qw,bool:Vw,int:Hw,merge:Xw,omap:tS,seq:qw,str:Zw},H3=qm("safeLoad","load"),G3=qm("safeLoadAll","loadAll"),W3=qm("safeDump","dump"),Fm={Type:N3,Schema:j3,FAILSAFE_SCHEMA:D3,JSON_SCHEMA:M3,CORE_SCHEMA:L3,DEFAULT_SCHEMA:Z3,load:q3,loadAll:F3,dump:U3,YAMLException:B3,types:V3,safeLoad:H3,safeLoadAll:G3,safeDump:W3}});var K3,J3,Y3,Q3,X3,eM,TS,PS,CS=v(()=>{"use strict";le();K3=g.object({id:g.string(),label:g.string(),name:g.string(),mindset_template:g.string().optional()}),J3=g.object({name:g.string(),root_dir:g.string().default("frontend"),build_command:g.string(),package_manager:g.string().default("pnpm"),mindset_template:g.string().optional()}),Y3=g.object({name:g.string(),root_dir:g.string().default("backend"),architecture:g.string(),dependency_direction:g.string(),package_manager:g.string().default("uv"),mindset_template:g.string().optional()}),Q3=g.object({frontend:g.string().optional(),backend:g.string().optional(),preflight_command:g.string().default("pnpm preflight"),summary:g.string().default("format/lint/typecheck/build")}),X3=g.object({name:g.string(),description:g.string(),runtime:g.enum(["python","node","unknown"]).default("unknown"),setup_hint:g.string().optional(),enabled:g.boolean().default(!0)}),eM=g.object({id:g.string(),label:g.string(),category:g.enum(["frontend","backend","testing","infra","devtool","monitoring"]),description:g.string(),url:g.string().optional(),guidance:g.string().optional()}),TS=g.object({name:g.string(),description:g.string().optional(),stacks:g.array(K3),frontend:J3.optional(),backend:Y3.optional(),quality_gate:Q3.optional(),vendor:g.array(X3).optional(),tools:g.array(eM).optional()}),PS=g.object({license_key:g.string(),stack_profile:g.string().optional(),components:g.array(g.string()).optional(),language:g.string().default("en"),registry_url:g.string().default("https://godd-registry.up.railway.app")}).refine(e=>e.stack_profile!==void 0||e.components!==void 0&&e.components.length>0,{message:"Either 'stack_profile' or 'components' must be provided"})});function ES(e){let t=[e,process.env.GODD_CONFIG,(0,fs.join)(process.cwd(),"config.yaml"),(0,fs.join)(process.env.HOME??process.env.USERPROFILE??"",".godd","config.yaml")].filter(r=>r!==void 0&&r!=="");for(let r of t)if((0,Lo.existsSync)(r)){let n=(0,Lo.readFileSync)(r,"utf-8"),o=Fm.load(n);return PS.parse(o)}throw new Error("config.yaml \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002GODD_CONFIG \u74B0\u5883\u5909\u6570\u307E\u305F\u306F\u30AB\u30EC\u30F3\u30C8\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B config.yaml \u3092\u914D\u7F6E\u3057\u3066\u304F\u3060\u3055\u3044\u3002")}function tM(e){let t=Fm.load(e);return TS.parse(t)}function Um(e,t){let r=t??(0,fs.join)(process.cwd(),"stacks"),n=(0,fs.join)(r,`${e}.yaml`);if(!(0,Lo.existsSync)(n))throw new Error(`\u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB '${e}' \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${n}`);let o=(0,Lo.readFileSync)(n,"utf-8");return tM(o)}var Lo,fs,IS=v(()=>{"use strict";Lo=require("node:fs"),fs=require("node:path");$S();CS()});var ct=w(Ct=>{"use strict";Ct.__esModule=!0;Ct.extend=zS;Ct.indexOf=sM;Ct.escapeExpression=aM;Ct.isEmpty=cM;Ct.createFrame=uM;Ct.blockParams=lM;Ct.appendContextPath=pM;var rM={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},nM=/[&<>"'`=]/g,oM=/[&<>"'`=]/;function iM(e){return rM[e]}function zS(e){for(var t=1;t<arguments.length;t++)for(var r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&(e[r]=arguments[t][r]);return e}var Vm=Object.prototype.toString;Ct.toString=Vm;var Bm=function(t){return typeof t=="function"};Bm(/x/)&&(Ct.isFunction=Bm=function(e){return typeof e=="function"&&Vm.call(e)==="[object Function]"});Ct.isFunction=Bm;var RS=Array.isArray||function(e){return e&&typeof e=="object"?Vm.call(e)==="[object Array]":!1};Ct.isArray=RS;function sM(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function aM(e){if(typeof e!="string"){if(e&&e.toHTML)return e.toHTML();if(e==null)return"";if(!e)return e+"";e=""+e}return oM.test(e)?e.replace(nM,iM):e}function cM(e){return!e&&e!==0?!0:!!(RS(e)&&e.length===0)}function uM(e){var t=zS({},e);return t._parent=e,t}function lM(e,t){return e.path=t,e}function pM(e,t){return(e?e+".":"")+t}});var qt=w((Lc,AS)=>{"use strict";Lc.__esModule=!0;var Hm=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Gm(e,t){var r=t&&t.loc,n=void 0,o=void 0,i=void 0,s=void 0;r&&(n=r.start.line,o=r.end.line,i=r.start.column,s=r.end.column,e+=" - "+n+":"+i);for(var a=Error.prototype.constructor.call(this,e),c=0;c<Hm.length;c++)this[Hm[c]]=a[Hm[c]];Error.captureStackTrace&&Error.captureStackTrace(this,Gm);try{r&&(this.lineNumber=n,this.endLineNumber=o,Object.defineProperty?(Object.defineProperty(this,"column",{value:i,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:s,enumerable:!0})):(this.column=i,this.endColumn=s))}catch{}}Gm.prototype=new Error;Lc.default=Gm;AS.exports=Lc.default});var NS=w((Zc,OS)=>{"use strict";Zc.__esModule=!0;var Wm=ct();Zc.default=function(e){e.registerHelper("blockHelperMissing",function(t,r){var n=r.inverse,o=r.fn;if(t===!0)return o(this);if(t===!1||t==null)return n(this);if(Wm.isArray(t))return t.length>0?(r.ids&&(r.ids=[r.name]),e.helpers.each(t,r)):n(this);if(r.data&&r.ids){var i=Wm.createFrame(r.data);i.contextPath=Wm.appendContextPath(r.data.contextPath,r.name),r={data:i}}return o(t,r)})};OS.exports=Zc.default});var DS=w((qc,jS)=>{"use strict";qc.__esModule=!0;function dM(e){return e&&e.__esModule?e:{default:e}}var hs=ct(),fM=qt(),hM=dM(fM);qc.default=function(e){e.registerHelper("each",function(t,r){if(!r)throw new hM.default("Must pass iterator to #each");var n=r.fn,o=r.inverse,i=0,s="",a=void 0,c=void 0;r.data&&r.ids&&(c=hs.appendContextPath(r.data.contextPath,r.ids[0])+"."),hs.isFunction(t)&&(t=t.call(this)),r.data&&(a=hs.createFrame(r.data));function u(f,m,y){a&&(a.key=f,a.index=m,a.first=m===0,a.last=!!y,c&&(a.contextPath=c+f)),s=s+n(t[f],{data:a,blockParams:hs.blockParams([t[f],f],[c+f,null])})}if(t&&typeof t=="object")if(hs.isArray(t))for(var p=t.length;i<p;i++)i in t&&u(i,i,i===t.length-1);else if(typeof Symbol=="function"&&t[Symbol.iterator]){for(var l=[],d=t[Symbol.iterator](),h=d.next();!h.done;h=d.next())l.push(h.value);t=l;for(var p=t.length;i<p;i++)u(i,i,i===t.length-1)}else(function(){var f=void 0;Object.keys(t).forEach(function(m){f!==void 0&&u(f,i-1),f=m,i++}),f!==void 0&&u(f,i-1,!0)})();return i===0&&(s=o(this)),s})};jS.exports=qc.default});var LS=w((Fc,MS)=>{"use strict";Fc.__esModule=!0;function mM(e){return e&&e.__esModule?e:{default:e}}var gM=qt(),yM=mM(gM);Fc.default=function(e){e.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new yM.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};MS.exports=Fc.default});var US=w((Uc,FS)=>{"use strict";Uc.__esModule=!0;function _M(e){return e&&e.__esModule?e:{default:e}}var ZS=ct(),vM=qt(),qS=_M(vM);Uc.default=function(e){e.registerHelper("if",function(t,r){if(arguments.length!=2)throw new qS.default("#if requires exactly one argument");return ZS.isFunction(t)&&(t=t.call(this)),!r.hash.includeZero&&!t||ZS.isEmpty(t)?r.inverse(this):r.fn(this)}),e.registerHelper("unless",function(t,r){if(arguments.length!=2)throw new qS.default("#unless requires exactly one argument");return e.helpers.if.call(this,t,{fn:r.inverse,inverse:r.fn,hash:r.hash})})};FS.exports=Uc.default});var VS=w((Bc,BS)=>{"use strict";Bc.__esModule=!0;Bc.default=function(e){e.registerHelper("log",function(){for(var t=[void 0],r=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)t.push(arguments[n]);var o=1;r.hash.level!=null?o=r.hash.level:r.data&&r.data.level!=null&&(o=r.data.level),t[0]=o,e.log.apply(e,t)})};BS.exports=Bc.default});var GS=w((Vc,HS)=>{"use strict";Vc.__esModule=!0;Vc.default=function(e){e.registerHelper("lookup",function(t,r,n){return t&&n.lookupProperty(t,r)})};HS.exports=Vc.default});var KS=w((Hc,WS)=>{"use strict";Hc.__esModule=!0;function bM(e){return e&&e.__esModule?e:{default:e}}var ms=ct(),xM=qt(),kM=bM(xM);Hc.default=function(e){e.registerHelper("with",function(t,r){if(arguments.length!=2)throw new kM.default("#with requires exactly one argument");ms.isFunction(t)&&(t=t.call(this));var n=r.fn;if(ms.isEmpty(t))return r.inverse(this);var o=r.data;return r.data&&r.ids&&(o=ms.createFrame(r.data),o.contextPath=ms.appendContextPath(r.data.contextPath,r.ids[0])),n(t,{data:o,blockParams:ms.blockParams([t],[o&&o.contextPath])})})};WS.exports=Hc.default});var Km=w(Gc=>{"use strict";Gc.__esModule=!0;Gc.registerDefaultHelpers=DM;Gc.moveHelperToHooks=MM;function Hn(e){return e&&e.__esModule?e:{default:e}}var wM=NS(),SM=Hn(wM),$M=DS(),TM=Hn($M),PM=LS(),CM=Hn(PM),EM=US(),IM=Hn(EM),zM=VS(),RM=Hn(zM),AM=GS(),OM=Hn(AM),NM=KS(),jM=Hn(NM);function DM(e){SM.default(e),TM.default(e),CM.default(e),IM.default(e),RM.default(e),OM.default(e),jM.default(e)}function MM(e,t,r){e.helpers[t]&&(e.hooks[t]=e.helpers[t],r||delete e.helpers[t])}});var YS=w((Wc,JS)=>{"use strict";Wc.__esModule=!0;var LM=ct();Wc.default=function(e){e.registerDecorator("inline",function(t,r,n,o){var i=t;return r.partials||(r.partials={},i=function(s,a){var c=n.partials;n.partials=LM.extend({},c,r.partials);var u=t(s,a);return n.partials=c,u}),r.partials[o.args[0]]=o.fn,i})};JS.exports=Wc.default});var QS=w(Jm=>{"use strict";Jm.__esModule=!0;Jm.registerDefaultDecorators=UM;function ZM(e){return e&&e.__esModule?e:{default:e}}var qM=YS(),FM=ZM(qM);function UM(e){FM.default(e)}});var Ym=w((Kc,XS)=>{"use strict";Kc.__esModule=!0;var BM=ct(),Zo={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(t){if(typeof t=="string"){var r=BM.indexOf(Zo.methodMap,t.toLowerCase());r>=0?t=r:t=parseInt(t,10)}return t},log:function(t){if(t=Zo.lookupLevel(t),typeof console<"u"&&Zo.lookupLevel(Zo.level)<=t){var r=Zo.methodMap[t];console[r]||(r="log");for(var n=arguments.length,o=Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];console[r].apply(console,o)}}};Kc.default=Zo;XS.exports=Kc.default});var e1=w(Qm=>{"use strict";Qm.__esModule=!0;Qm.createNewLookupObject=HM;var VM=ct();function HM(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return VM.extend.apply(void 0,[Object.create(null)].concat(t))}});var Xm=w(gs=>{"use strict";gs.__esModule=!0;gs.createProtoAccessControl=JM;gs.resultIsAllowed=YM;gs.resetLoggedProperties=XM;function GM(e){return e&&e.__esModule?e:{default:e}}var t1=e1(),WM=Ym(),KM=GM(WM),Jc=Object.create(null);function JM(e){var t=Object.create(null);t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1;var r=Object.create(null);return r.__proto__=!1,{properties:{whitelist:t1.createNewLookupObject(r,e.allowedProtoProperties),defaultValue:e.allowProtoPropertiesByDefault},methods:{whitelist:t1.createNewLookupObject(t,e.allowedProtoMethods),defaultValue:e.allowProtoMethodsByDefault}}}function YM(e,t,r){return r1(typeof e=="function"?t.methods:t.properties,r)}function r1(e,t){return e.whitelist[t]!==void 0?e.whitelist[t]===!0:e.defaultValue!==void 0?e.defaultValue:(QM(t),!1)}function QM(e){Jc[e]!==!0&&(Jc[e]=!0,KM.default.log("error",'Handlebars: Access has been denied to resolve the property "'+e+`" because it is not an "own property" of its parent.
|
|
74
|
+
You can add a runtime option to disable the check or this warning:
|
|
75
|
+
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function XM(){Object.keys(Jc).forEach(function(e){delete Jc[e]})}});var Qc=w(gr=>{"use strict";gr.__esModule=!0;gr.HandlebarsEnvironment=rg;function n1(e){return e&&e.__esModule?e:{default:e}}var Gn=ct(),eL=qt(),eg=n1(eL),tL=Km(),rL=QS(),nL=Ym(),Yc=n1(nL),oL=Xm(),iL="4.7.8";gr.VERSION=iL;var sL=8;gr.COMPILER_REVISION=sL;var aL=7;gr.LAST_COMPATIBLE_COMPILER_REVISION=aL;var cL={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};gr.REVISION_CHANGES=cL;var tg="[object Object]";function rg(e,t,r){this.helpers=e||{},this.partials=t||{},this.decorators=r||{},tL.registerDefaultHelpers(this),rL.registerDefaultDecorators(this)}rg.prototype={constructor:rg,logger:Yc.default,log:Yc.default.log,registerHelper:function(t,r){if(Gn.toString.call(t)===tg){if(r)throw new eg.default("Arg not supported with multiple helpers");Gn.extend(this.helpers,t)}else this.helpers[t]=r},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,r){if(Gn.toString.call(t)===tg)Gn.extend(this.partials,t);else{if(typeof r>"u")throw new eg.default('Attempting to register a partial called "'+t+'" as undefined');this.partials[t]=r}},unregisterPartial:function(t){delete this.partials[t]},registerDecorator:function(t,r){if(Gn.toString.call(t)===tg){if(r)throw new eg.default("Arg not supported with multiple decorators");Gn.extend(this.decorators,t)}else this.decorators[t]=r},unregisterDecorator:function(t){delete this.decorators[t]},resetLoggedPropertyAccesses:function(){oL.resetLoggedProperties()}};var uL=Yc.default.log;gr.log=uL;gr.createFrame=Gn.createFrame;gr.logger=Yc.default});var i1=w((Xc,o1)=>{"use strict";Xc.__esModule=!0;function ng(e){this.string=e}ng.prototype.toString=ng.prototype.toHTML=function(){return""+this.string};Xc.default=ng;o1.exports=Xc.default});var s1=w(og=>{"use strict";og.__esModule=!0;og.wrapHelper=lL;function lL(e,t){if(typeof e!="function")return e;var r=function(){var o=arguments[arguments.length-1];return arguments[arguments.length-1]=t(o),e.apply(this,arguments)};return r}});var p1=w(cn=>{"use strict";cn.__esModule=!0;cn.checkRevision=gL;cn.template=yL;cn.wrapProgram=eu;cn.resolvePartial=_L;cn.invokePartial=vL;cn.noop=u1;function pL(e){return e&&e.__esModule?e:{default:e}}function dL(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}var fL=ct(),Ir=dL(fL),hL=qt(),zr=pL(hL),Rr=Qc(),a1=Km(),mL=s1(),c1=Xm();function gL(e){var t=e&&e[0]||1,r=Rr.COMPILER_REVISION;if(!(t>=Rr.LAST_COMPATIBLE_COMPILER_REVISION&&t<=Rr.COMPILER_REVISION))if(t<Rr.LAST_COMPATIBLE_COMPILER_REVISION){var n=Rr.REVISION_CHANGES[r],o=Rr.REVISION_CHANGES[t];throw new zr.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+o+").")}else throw new zr.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+e[1]+").")}function yL(e,t){if(!t)throw new zr.default("No environment passed to template");if(!e||!e.main)throw new zr.default("Unknown template object: "+typeof e);e.main.decorator=e.main_d,t.VM.checkRevision(e.compiler);var r=e.compiler&&e.compiler[0]===7;function n(s,a,c){c.hash&&(a=Ir.extend({},a,c.hash),c.ids&&(c.ids[0]=!0)),s=t.VM.resolvePartial.call(this,s,a,c);var u=Ir.extend({},c,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),p=t.VM.invokePartial.call(this,s,a,u);if(p==null&&t.compile&&(c.partials[c.name]=t.compile(s,e.compilerOptions,t),p=c.partials[c.name](a,u)),p!=null){if(c.indent){for(var l=p.split(`
|
|
76
|
+
`),d=0,h=l.length;d<h&&!(!l[d]&&d+1===h);d++)l[d]=c.indent+l[d];p=l.join(`
|
|
77
|
+
`)}return p}else throw new zr.default("The partial "+c.name+" could not be compiled when running in runtime-only mode")}var o={strict:function(a,c,u){if(!a||!(c in a))throw new zr.default('"'+c+'" not defined in '+a,{loc:u});return o.lookupProperty(a,c)},lookupProperty:function(a,c){var u=a[c];if(u==null||Object.prototype.hasOwnProperty.call(a,c)||c1.resultIsAllowed(u,o.protoAccessControl,c))return u},lookup:function(a,c){for(var u=a.length,p=0;p<u;p++){var l=a[p]&&o.lookupProperty(a[p],c);if(l!=null)return a[p][c]}},lambda:function(a,c){return typeof a=="function"?a.call(c):a},escapeExpression:Ir.escapeExpression,invokePartial:n,fn:function(a){var c=e[a];return c.decorator=e[a+"_d"],c},programs:[],program:function(a,c,u,p,l){var d=this.programs[a],h=this.fn(a);return c||l||p||u?d=eu(this,a,h,c,u,p,l):d||(d=this.programs[a]=eu(this,a,h)),d},data:function(a,c){for(;a&&c--;)a=a._parent;return a},mergeIfNeeded:function(a,c){var u=a||c;return a&&c&&a!==c&&(u=Ir.extend({},c,a)),u},nullContext:Object.seal({}),noop:t.VM.noop,compilerInfo:e.compiler};function i(s){var a=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],c=a.data;i._setup(a),!a.partial&&e.useData&&(c=bL(s,c));var u=void 0,p=e.useBlockParams?[]:void 0;e.useDepths&&(a.depths?u=s!=a.depths[0]?[s].concat(a.depths):a.depths:u=[s]);function l(d){return""+e.main(o,d,o.helpers,o.partials,c,p,u)}return l=l1(e.main,l,o,a.depths||[],c,p),l(s,a)}return i.isTop=!0,i._setup=function(s){if(s.partial)o.protoAccessControl=s.protoAccessControl,o.helpers=s.helpers,o.partials=s.partials,o.decorators=s.decorators,o.hooks=s.hooks;else{var a=Ir.extend({},t.helpers,s.helpers);xL(a,o),o.helpers=a,e.usePartial&&(o.partials=o.mergeIfNeeded(s.partials,t.partials)),(e.usePartial||e.useDecorators)&&(o.decorators=Ir.extend({},t.decorators,s.decorators)),o.hooks={},o.protoAccessControl=c1.createProtoAccessControl(s);var c=s.allowCallsToHelperMissing||r;a1.moveHelperToHooks(o,"helperMissing",c),a1.moveHelperToHooks(o,"blockHelperMissing",c)}},i._child=function(s,a,c,u){if(e.useBlockParams&&!c)throw new zr.default("must pass block params");if(e.useDepths&&!u)throw new zr.default("must pass parent depths");return eu(o,s,e[s],a,0,c,u)},i}function eu(e,t,r,n,o,i,s){function a(c){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],p=s;return s&&c!=s[0]&&!(c===e.nullContext&&s[0]===null)&&(p=[c].concat(s)),r(e,c,e.helpers,e.partials,u.data||n,i&&[u.blockParams].concat(i),p)}return a=l1(r,a,e,s,n,i),a.program=t,a.depth=s?s.length:0,a.blockParams=o||0,a}function _L(e,t,r){return e?!e.call&&!r.name&&(r.name=e,e=r.partials[e]):r.name==="@partial-block"?e=r.data["partial-block"]:e=r.partials[r.name],e}function vL(e,t,r){var n=r.data&&r.data["partial-block"];r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var o=void 0;if(r.fn&&r.fn!==u1&&(function(){r.data=Rr.createFrame(r.data);var i=r.fn;o=r.data["partial-block"]=function(a){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return c.data=Rr.createFrame(c.data),c.data["partial-block"]=n,i(a,c)},i.partials&&(r.partials=Ir.extend({},r.partials,i.partials))})(),e===void 0&&o&&(e=o),e===void 0)throw new zr.default("The partial "+r.name+" could not be found");if(e instanceof Function)return e(t,r)}function u1(){return""}function bL(e,t){return(!t||!("root"in t))&&(t=t?Rr.createFrame(t):{},t.root=e),t}function l1(e,t,r,n,o,i){if(e.decorator){var s={};t=e.decorator(t,s,r,n&&n[0],o,i,n),Ir.extend(t,s)}return t}function xL(e,t){Object.keys(e).forEach(function(r){var n=e[r];e[r]=kL(n,t)})}function kL(e,t){var r=t.lookupProperty;return mL.wrapHelper(e,function(n){return Ir.extend({lookupProperty:r},n)})}});var ig=w((tu,d1)=>{"use strict";tu.__esModule=!0;tu.default=function(e){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var t=globalThis.Handlebars;e.noConflict=function(){return globalThis.Handlebars===e&&(globalThis.Handlebars=t),e}};d1.exports=tu.default});var y1=w((ru,g1)=>{"use strict";ru.__esModule=!0;function ag(e){return e&&e.__esModule?e:{default:e}}function cg(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}var wL=Qc(),f1=cg(wL),SL=i1(),$L=ag(SL),TL=qt(),PL=ag(TL),CL=ct(),sg=cg(CL),EL=p1(),h1=cg(EL),IL=ig(),zL=ag(IL);function m1(){var e=new f1.HandlebarsEnvironment;return sg.extend(e,f1),e.SafeString=$L.default,e.Exception=PL.default,e.Utils=sg,e.escapeExpression=sg.escapeExpression,e.VM=h1,e.template=function(t){return h1.template(t,e)},e}var ys=m1();ys.create=m1;zL.default(ys);ys.default=ys;ru.default=ys;g1.exports=ru.default});var ug=w((nu,v1)=>{"use strict";nu.__esModule=!0;var _1={helpers:{helperExpression:function(t){return t.type==="SubExpression"||(t.type==="MustacheStatement"||t.type==="BlockStatement")&&!!(t.params&&t.params.length||t.hash)},scopedId:function(t){return/^\.|this\b/.test(t.original)},simpleId:function(t){return t.parts.length===1&&!_1.helpers.scopedId(t)&&!t.depth}}};nu.default=_1;v1.exports=nu.default});var x1=w((ou,b1)=>{"use strict";ou.__esModule=!0;var RL=(function(){var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(o,i,s,a,c,u,p){var l=u.length-1;switch(c){case 1:return u[l-1];case 2:this.$=a.prepareProgram(u[l]);break;case 3:this.$=u[l];break;case 4:this.$=u[l];break;case 5:this.$=u[l];break;case 6:this.$=u[l];break;case 7:this.$=u[l];break;case 8:this.$=u[l];break;case 9:this.$={type:"CommentStatement",value:a.stripComment(u[l]),strip:a.stripFlags(u[l],u[l]),loc:a.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:u[l],value:u[l],loc:a.locInfo(this._$)};break;case 11:this.$=a.prepareRawBlock(u[l-2],u[l-1],u[l],this._$);break;case 12:this.$={path:u[l-3],params:u[l-2],hash:u[l-1]};break;case 13:this.$=a.prepareBlock(u[l-3],u[l-2],u[l-1],u[l],!1,this._$);break;case 14:this.$=a.prepareBlock(u[l-3],u[l-2],u[l-1],u[l],!0,this._$);break;case 15:this.$={open:u[l-5],path:u[l-4],params:u[l-3],hash:u[l-2],blockParams:u[l-1],strip:a.stripFlags(u[l-5],u[l])};break;case 16:this.$={path:u[l-4],params:u[l-3],hash:u[l-2],blockParams:u[l-1],strip:a.stripFlags(u[l-5],u[l])};break;case 17:this.$={path:u[l-4],params:u[l-3],hash:u[l-2],blockParams:u[l-1],strip:a.stripFlags(u[l-5],u[l])};break;case 18:this.$={strip:a.stripFlags(u[l-1],u[l-1]),program:u[l]};break;case 19:var d=a.prepareBlock(u[l-2],u[l-1],u[l],u[l],!1,this._$),h=a.prepareProgram([d],u[l-1].loc);h.chained=!0,this.$={strip:u[l-2].strip,program:h,chain:!0};break;case 20:this.$=u[l];break;case 21:this.$={path:u[l-1],strip:a.stripFlags(u[l-2],u[l])};break;case 22:this.$=a.prepareMustache(u[l-3],u[l-2],u[l-1],u[l-4],a.stripFlags(u[l-4],u[l]),this._$);break;case 23:this.$=a.prepareMustache(u[l-3],u[l-2],u[l-1],u[l-4],a.stripFlags(u[l-4],u[l]),this._$);break;case 24:this.$={type:"PartialStatement",name:u[l-3],params:u[l-2],hash:u[l-1],indent:"",strip:a.stripFlags(u[l-4],u[l]),loc:a.locInfo(this._$)};break;case 25:this.$=a.preparePartialBlock(u[l-2],u[l-1],u[l],this._$);break;case 26:this.$={path:u[l-3],params:u[l-2],hash:u[l-1],strip:a.stripFlags(u[l-4],u[l])};break;case 27:this.$=u[l];break;case 28:this.$=u[l];break;case 29:this.$={type:"SubExpression",path:u[l-3],params:u[l-2],hash:u[l-1],loc:a.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:u[l],loc:a.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:a.id(u[l-2]),value:u[l],loc:a.locInfo(this._$)};break;case 32:this.$=a.id(u[l-1]);break;case 33:this.$=u[l];break;case 34:this.$=u[l];break;case 35:this.$={type:"StringLiteral",value:u[l],original:u[l],loc:a.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(u[l]),original:Number(u[l]),loc:a.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:u[l]==="true",original:u[l]==="true",loc:a.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:a.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:a.locInfo(this._$)};break;case 40:this.$=u[l];break;case 41:this.$=u[l];break;case 42:this.$=a.preparePath(!0,u[l],this._$);break;case 43:this.$=a.preparePath(!1,u[l],this._$);break;case 44:u[l-2].push({part:a.id(u[l]),original:u[l],separator:u[l-1]}),this.$=u[l-2];break;case 45:this.$=[{part:a.id(u[l]),original:u[l]}];break;case 46:this.$=[];break;case 47:u[l-1].push(u[l]);break;case 48:this.$=[];break;case 49:u[l-1].push(u[l]);break;case 50:this.$=[];break;case 51:u[l-1].push(u[l]);break;case 58:this.$=[];break;case 59:u[l-1].push(u[l]);break;case 64:this.$=[];break;case 65:u[l-1].push(u[l]);break;case 70:this.$=[];break;case 71:u[l-1].push(u[l]);break;case 78:this.$=[];break;case 79:u[l-1].push(u[l]);break;case 82:this.$=[];break;case 83:u[l-1].push(u[l]);break;case 86:this.$=[];break;case 87:u[l-1].push(u[l]);break;case 90:this.$=[];break;case 91:u[l-1].push(u[l]);break;case 94:this.$=[];break;case 95:u[l-1].push(u[l]);break;case 98:this.$=[u[l]];break;case 99:u[l-1].push(u[l]);break;case 100:this.$=[u[l]];break;case 101:u[l-1].push(u[l]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(o,i){throw new Error(o)},parse:function(o){var i=this,s=[0],a=[null],c=[],u=this.table,p="",l=0,d=0,h=0,f=2,m=1;this.lexer.setInput(o),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var y=this.lexer.yylloc;c.push(y);var _=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function b(nr){s.length=s.length-2*nr,a.length=a.length-nr,c.length=c.length-nr}function T(){var nr;return nr=i.lexer.lex()||1,typeof nr!="number"&&(nr=i.symbols_[nr]||nr),nr}for(var S,C,Q,H,pt,Le,ze={},Dr,It,Xo,eo;;){if(Q=s[s.length-1],this.defaultActions[Q]?H=this.defaultActions[Q]:((S===null||typeof S>"u")&&(S=T()),H=u[Q]&&u[Q][S]),typeof H>"u"||!H.length||!H[0]){var nl="";if(!h){eo=[];for(Dr in u[Q])this.terminals_[Dr]&&Dr>2&&eo.push("'"+this.terminals_[Dr]+"'");this.lexer.showPosition?nl="Parse error on line "+(l+1)+`:
|
|
78
|
+
`+this.lexer.showPosition()+`
|
|
79
|
+
Expecting `+eo.join(", ")+", got '"+(this.terminals_[S]||S)+"'":nl="Parse error on line "+(l+1)+": Unexpected "+(S==1?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(nl,{text:this.lexer.match,token:this.terminals_[S]||S,line:this.lexer.yylineno,loc:y,expected:eo})}}if(H[0]instanceof Array&&H.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+S);switch(H[0]){case 1:s.push(S),a.push(this.lexer.yytext),c.push(this.lexer.yylloc),s.push(H[1]),S=null,C?(S=C,C=null):(d=this.lexer.yyleng,p=this.lexer.yytext,l=this.lexer.yylineno,y=this.lexer.yylloc,h>0&&h--);break;case 2:if(It=this.productions_[H[1]][1],ze.$=a[a.length-It],ze._$={first_line:c[c.length-(It||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(It||1)].first_column,last_column:c[c.length-1].last_column},_&&(ze._$.range=[c[c.length-(It||1)].range[0],c[c.length-1].range[1]]),Le=this.performAction.call(ze,p,d,l,this.yy,H[1],a,c),typeof Le<"u")return Le;It&&(s=s.slice(0,-1*It*2),a=a.slice(0,-1*It),c=c.slice(0,-1*It)),s.push(this.productions_[H[1]][0]),a.push(ze.$),c.push(ze._$),Xo=u[s[s.length-2]][s[s.length-1]],s.push(Xo);break;case 3:return!0}}return!0}},t=(function(){var n={EOF:1,parseError:function(i,s){if(this.yy.parser)this.yy.parser.parseError(i,s);else throw new Error(i)},setInput:function(i){return this._input=i,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var s=i.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var s=i.length,a=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s-1),this.offset-=s;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===c.length?this.yylloc.first_column:0)+c[c.length-a.length].length-a[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-s]),this},more:function(){return this._more=!0,this},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),s=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
|
80
|
+
`+s+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,s,a,c,u,p;this._more||(this.yytext="",this.match="");for(var l=this._currentRules(),d=0;d<l.length&&(a=this._input.match(this.rules[l[d]]),!(a&&(!s||a[0].length>s[0].length)&&(s=a,c=d,!this.options.flex)));d++);return s?(p=s[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],i=this.performAction.call(this,this.yy,this,l[c],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
81
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var i=this.next();return typeof i<"u"?i:this.lex()},begin:function(i){this.conditionStack.push(i)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(i){this.begin(i)}};return n.options={},n.performAction=function(i,s,a,c){function u(l,d){return s.yytext=s.yytext.substring(l,s.yyleng-d+l)}var p=c;switch(a){case 0:if(s.yytext.slice(-2)==="\\\\"?(u(0,1),this.begin("mu")):s.yytext.slice(-1)==="\\"?(u(0,1),this.begin("emu")):this.begin("mu"),s.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(u(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(s.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return s.yytext=u(1,2).replace(/\\"/g,'"'),80;break;case 32:return s.yytext=u(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return s.yytext=s.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},n.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n})();e.lexer=t;function r(){this.yy={}}return r.prototype=e,e.Parser=r,new r})();ou.default=RL;b1.exports=ou.default});var cu=w((au,S1)=>{"use strict";au.__esModule=!0;function AL(e){return e&&e.__esModule?e:{default:e}}var OL=qt(),lg=AL(OL);function iu(){this.parents=[]}iu.prototype={constructor:iu,mutating:!1,acceptKey:function(t,r){var n=this.accept(t[r]);if(this.mutating){if(n&&!iu.prototype[n.type])throw new lg.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+t.type);t[r]=n}},acceptRequired:function(t,r){if(this.acceptKey(t,r),!t[r])throw new lg.default(t.type+" requires "+r)},acceptArray:function(t){for(var r=0,n=t.length;r<n;r++)this.acceptKey(t,r),t[r]||(t.splice(r,1),r--,n--)},accept:function(t){if(t){if(!this[t.type])throw new lg.default("Unknown type: "+t.type,t);this.current&&this.parents.unshift(this.current),this.current=t;var r=this[t.type](t);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return t}},Program:function(t){this.acceptArray(t.body)},MustacheStatement:su,Decorator:su,BlockStatement:k1,DecoratorBlock:k1,PartialStatement:w1,PartialBlockStatement:function(t){w1.call(this,t),this.acceptKey(t,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:su,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(t){this.acceptArray(t.pairs)},HashPair:function(t){this.acceptRequired(t,"value")}};function su(e){this.acceptRequired(e,"path"),this.acceptArray(e.params),this.acceptKey(e,"hash")}function k1(e){su.call(this,e),this.acceptKey(e,"program"),this.acceptKey(e,"inverse")}function w1(e){this.acceptRequired(e,"name"),this.acceptArray(e.params),this.acceptKey(e,"hash")}au.default=iu;S1.exports=au.default});var T1=w((uu,$1)=>{"use strict";uu.__esModule=!0;function NL(e){return e&&e.__esModule?e:{default:e}}var jL=cu(),DL=NL(jL);function yr(){var e=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=e}yr.prototype=new DL.default;yr.prototype.Program=function(e){var t=!this.options.ignoreStandalone,r=!this.isRootSeen;this.isRootSeen=!0;for(var n=e.body,o=0,i=n.length;o<i;o++){var s=n[o],a=this.accept(s);if(a){var c=pg(n,o,r),u=dg(n,o,r),p=a.openStandalone&&c,l=a.closeStandalone&&u,d=a.inlineStandalone&&c&&u;a.close&&Wn(n,o,!0),a.open&&un(n,o,!0),t&&d&&(Wn(n,o),un(n,o)&&s.type==="PartialStatement"&&(s.indent=/([ \t]+$)/.exec(n[o-1].original)[1])),t&&p&&(Wn((s.program||s.inverse).body),un(n,o)),t&&l&&(Wn(n,o),un((s.inverse||s.program).body))}}return e};yr.prototype.BlockStatement=yr.prototype.DecoratorBlock=yr.prototype.PartialBlockStatement=function(e){this.accept(e.program),this.accept(e.inverse);var t=e.program||e.inverse,r=e.program&&e.inverse,n=r,o=r;if(r&&r.chained)for(n=r.body[0].program;o.chained;)o=o.body[o.body.length-1].program;var i={open:e.openStrip.open,close:e.closeStrip.close,openStandalone:dg(t.body),closeStandalone:pg((n||t).body)};if(e.openStrip.close&&Wn(t.body,null,!0),r){var s=e.inverseStrip;s.open&&un(t.body,null,!0),s.close&&Wn(n.body,null,!0),e.closeStrip.open&&un(o.body,null,!0),!this.options.ignoreStandalone&&pg(t.body)&&dg(n.body)&&(un(t.body),Wn(n.body))}else e.closeStrip.open&&un(t.body,null,!0);return i};yr.prototype.Decorator=yr.prototype.MustacheStatement=function(e){return e.strip};yr.prototype.PartialStatement=yr.prototype.CommentStatement=function(e){var t=e.strip||{};return{inlineStandalone:!0,open:t.open,close:t.close}};function pg(e,t,r){t===void 0&&(t=e.length);var n=e[t-1],o=e[t-2];if(!n)return r;if(n.type==="ContentStatement")return(o||!r?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(n.original)}function dg(e,t,r){t===void 0&&(t=-1);var n=e[t+1],o=e[t+2];if(!n)return r;if(n.type==="ContentStatement")return(o||!r?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(n.original)}function Wn(e,t,r){var n=e[t==null?0:t+1];if(!(!n||n.type!=="ContentStatement"||!r&&n.rightStripped)){var o=n.value;n.value=n.value.replace(r?/^\s+/:/^[ \t]*\r?\n?/,""),n.rightStripped=n.value!==o}}function un(e,t,r){var n=e[t==null?e.length-1:t-1];if(!(!n||n.type!=="ContentStatement"||!r&&n.leftStripped)){var o=n.value;return n.value=n.value.replace(r?/\s+$/:/[ \t]+$/,""),n.leftStripped=n.value!==o,n.leftStripped}}uu.default=yr;$1.exports=uu.default});var P1=w(Ft=>{"use strict";Ft.__esModule=!0;Ft.SourceLocation=ZL;Ft.id=qL;Ft.stripFlags=FL;Ft.stripComment=UL;Ft.preparePath=BL;Ft.prepareMustache=VL;Ft.prepareRawBlock=HL;Ft.prepareBlock=GL;Ft.prepareProgram=WL;Ft.preparePartialBlock=KL;function ML(e){return e&&e.__esModule?e:{default:e}}var LL=qt(),fg=ML(LL);function hg(e,t){if(t=t.path?t.path.original:t,e.path.original!==t){var r={loc:e.path.loc};throw new fg.default(e.path.original+" doesn't match "+t,r)}}function ZL(e,t){this.source=e,this.start={line:t.first_line,column:t.first_column},this.end={line:t.last_line,column:t.last_column}}function qL(e){return/^\[.*\]$/.test(e)?e.substring(1,e.length-1):e}function FL(e,t){return{open:e.charAt(2)==="~",close:t.charAt(t.length-3)==="~"}}function UL(e){return e.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function BL(e,t,r){r=this.locInfo(r);for(var n=e?"@":"",o=[],i=0,s=0,a=t.length;s<a;s++){var c=t[s].part,u=t[s].original!==c;if(n+=(t[s].separator||"")+c,!u&&(c===".."||c==="."||c==="this")){if(o.length>0)throw new fg.default("Invalid path: "+n,{loc:r});c===".."&&i++}else o.push(c)}return{type:"PathExpression",data:e,depth:i,parts:o,original:n,loc:r}}function VL(e,t,r,n,o,i){var s=n.charAt(3)||n.charAt(2),a=s!=="{"&&s!=="&",c=/\*/.test(n);return{type:c?"Decorator":"MustacheStatement",path:e,params:t,hash:r,escaped:a,strip:o,loc:this.locInfo(i)}}function HL(e,t,r,n){hg(e,r),n=this.locInfo(n);var o={type:"Program",body:t,strip:{},loc:n};return{type:"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:o,openStrip:{},inverseStrip:{},closeStrip:{},loc:n}}function GL(e,t,r,n,o,i){n&&n.path&&hg(e,n);var s=/\*/.test(e.open);t.blockParams=e.blockParams;var a=void 0,c=void 0;if(r){if(s)throw new fg.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=n.strip),c=r.strip,a=r.program}return o&&(o=a,a=t,t=o),{type:s?"DecoratorBlock":"BlockStatement",path:e.path,params:e.params,hash:e.hash,program:t,inverse:a,openStrip:e.strip,inverseStrip:c,closeStrip:n&&n.strip,loc:this.locInfo(i)}}function WL(e,t){if(!t&&e.length){var r=e[0].loc,n=e[e.length-1].loc;r&&n&&(t={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:n.end.line,column:n.end.column}})}return{type:"Program",body:e,strip:{},loc:t}}function KL(e,t,r,n){return hg(e,r),{type:"PartialBlockStatement",name:e.path,params:e.params,hash:e.hash,program:t,openStrip:e.strip,closeStrip:r&&r.strip,loc:this.locInfo(n)}}});var I1=w(_s=>{"use strict";_s.__esModule=!0;_s.parseWithoutProcessing=E1;_s.parse=n9;function JL(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function C1(e){return e&&e.__esModule?e:{default:e}}var YL=x1(),mg=C1(YL),QL=T1(),XL=C1(QL),e9=P1(),t9=JL(e9),r9=ct();_s.parser=mg.default;var lu={};r9.extend(lu,t9);function E1(e,t){if(e.type==="Program")return e;mg.default.yy=lu,lu.locInfo=function(n){return new lu.SourceLocation(t&&t.srcName,n)};var r=mg.default.parse(e);return r}function n9(e,t){var r=E1(e,t),n=new XL.default(t);return n.accept(r)}});var O1=w(ks=>{"use strict";ks.__esModule=!0;ks.Compiler=gg;ks.precompile=a9;ks.compile=c9;function R1(e){return e&&e.__esModule?e:{default:e}}var o9=qt(),bs=R1(o9),xs=ct(),i9=ug(),vs=R1(i9),s9=[].slice;function gg(){}gg.prototype={compiler:gg,equals:function(t){var r=this.opcodes.length;if(t.opcodes.length!==r)return!1;for(var n=0;n<r;n++){var o=this.opcodes[n],i=t.opcodes[n];if(o.opcode!==i.opcode||!A1(o.args,i.args))return!1}r=this.children.length;for(var n=0;n<r;n++)if(!this.children[n].equals(t.children[n]))return!1;return!0},guid:0,compile:function(t,r){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=r,this.stringParams=r.stringParams,this.trackIds=r.trackIds,r.blockParams=r.blockParams||[],r.knownHelpers=xs.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},r.knownHelpers),this.accept(t)},compileProgram:function(t){var r=new this.compiler,n=r.compile(t,this.options),o=this.guid++;return this.usePartial=this.usePartial||n.usePartial,this.children[o]=n,this.useDepths=this.useDepths||n.useDepths,o},accept:function(t){if(!this[t.type])throw new bs.default("Unknown type: "+t.type,t);this.sourceNode.unshift(t);var r=this[t.type](t);return this.sourceNode.shift(),r},Program:function(t){this.options.blockParams.unshift(t.blockParams);for(var r=t.body,n=r.length,o=0;o<n;o++)this.accept(r[o]);return this.options.blockParams.shift(),this.isSimple=n===1,this.blockParams=t.blockParams?t.blockParams.length:0,this},BlockStatement:function(t){z1(t);var r=t.program,n=t.inverse;r=r&&this.compileProgram(r),n=n&&this.compileProgram(n);var o=this.classifySexpr(t);o==="helper"?this.helperSexpr(t,r,n):o==="simple"?(this.simpleSexpr(t),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("blockValue",t.path.original)):(this.ambiguousSexpr(t,r,n),this.opcode("pushProgram",r),this.opcode("pushProgram",n),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(t){var r=t.program&&this.compileProgram(t.program),n=this.setupFullMustacheParams(t,r,void 0),o=t.path;this.useDecorators=!0,this.opcode("registerDecorator",n.length,o.original)},PartialStatement:function(t){this.usePartial=!0;var r=t.program;r&&(r=this.compileProgram(t.program));var n=t.params;if(n.length>1)throw new bs.default("Unsupported number of partial arguments: "+n.length,t);n.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):n.push({type:"PathExpression",parts:[],depth:0}));var o=t.name.original,i=t.name.type==="SubExpression";i&&this.accept(t.name),this.setupFullMustacheParams(t,r,void 0,!0);var s=t.indent||"";this.options.preventIndent&&s&&(this.opcode("appendContent",s),s=""),this.opcode("invokePartial",i,o,s),this.opcode("append")},PartialBlockStatement:function(t){this.PartialStatement(t)},MustacheStatement:function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(t){this.DecoratorBlock(t)},ContentStatement:function(t){t.value&&this.opcode("appendContent",t.value)},CommentStatement:function(){},SubExpression:function(t){z1(t);var r=this.classifySexpr(t);r==="simple"?this.simpleSexpr(t):r==="helper"?this.helperSexpr(t):this.ambiguousSexpr(t)},ambiguousSexpr:function(t,r,n){var o=t.path,i=o.parts[0],s=r!=null||n!=null;this.opcode("getContext",o.depth),this.opcode("pushProgram",r),this.opcode("pushProgram",n),o.strict=!0,this.accept(o),this.opcode("invokeAmbiguous",i,s)},simpleSexpr:function(t){var r=t.path;r.strict=!0,this.accept(r),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,r,n){var o=this.setupFullMustacheParams(t,r,n),i=t.path,s=i.parts[0];if(this.options.knownHelpers[s])this.opcode("invokeKnownHelper",o.length,s);else{if(this.options.knownHelpersOnly)throw new bs.default("You specified knownHelpersOnly, but used the unknown helper "+s,t);i.strict=!0,i.falsy=!0,this.accept(i),this.opcode("invokeHelper",o.length,i.original,vs.default.helpers.simpleId(i))}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var r=t.parts[0],n=vs.default.helpers.scopedId(t),o=!t.depth&&!n&&this.blockParamIndex(r);o?this.opcode("lookupBlockParam",o,t.parts):r?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts,t.strict)):this.opcode("lookupOnContext",t.parts,t.falsy,t.strict,n):this.opcode("pushContext")},StringLiteral:function(t){this.opcode("pushString",t.value)},NumberLiteral:function(t){this.opcode("pushLiteral",t.value)},BooleanLiteral:function(t){this.opcode("pushLiteral",t.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(t){var r=t.pairs,n=0,o=r.length;for(this.opcode("pushHash");n<o;n++)this.pushParam(r[n].value);for(;n--;)this.opcode("assignToHash",r[n].key);this.opcode("popHash")},opcode:function(t){this.opcodes.push({opcode:t,args:s9.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(t){t&&(this.useDepths=!0)},classifySexpr:function(t){var r=vs.default.helpers.simpleId(t.path),n=r&&!!this.blockParamIndex(t.path.parts[0]),o=!n&&vs.default.helpers.helperExpression(t),i=!n&&(o||r);if(i&&!o){var s=t.path.parts[0],a=this.options;a.knownHelpers[s]?o=!0:a.knownHelpersOnly&&(i=!1)}return o?"helper":i?"ambiguous":"simple"},pushParams:function(t){for(var r=0,n=t.length;r<n;r++)this.pushParam(t[r])},pushParam:function(t){var r=t.value!=null?t.value:t.original||"";if(this.stringParams)r.replace&&(r=r.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),t.depth&&this.addDepth(t.depth),this.opcode("getContext",t.depth||0),this.opcode("pushStringParam",r,t.type),t.type==="SubExpression"&&this.accept(t);else{if(this.trackIds){var n=void 0;if(t.parts&&!vs.default.helpers.scopedId(t)&&!t.depth&&(n=this.blockParamIndex(t.parts[0])),n){var o=t.parts.slice(1).join(".");this.opcode("pushId","BlockParam",n,o)}else r=t.original||r,r.replace&&(r=r.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",t.type,r)}this.accept(t)}},setupFullMustacheParams:function(t,r,n,o){var i=t.params;return this.pushParams(i),this.opcode("pushProgram",r),this.opcode("pushProgram",n),t.hash?this.accept(t.hash):this.opcode("emptyHash",o),i},blockParamIndex:function(t){for(var r=0,n=this.options.blockParams.length;r<n;r++){var o=this.options.blockParams[r],i=o&&xs.indexOf(o,t);if(o&&i>=0)return[r,i]}}};function a9(e,t,r){if(e==null||typeof e!="string"&&e.type!=="Program")throw new bs.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+e);t=t||{},"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var n=r.parse(e,t),o=new r.Compiler().compile(n,t);return new r.JavaScriptCompiler().compile(o,t)}function c9(e,t,r){if(t===void 0&&(t={}),e==null||typeof e!="string"&&e.type!=="Program")throw new bs.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+e);t=xs.extend({},t),"data"in t||(t.data=!0),t.compat&&(t.useDepths=!0);var n=void 0;function o(){var s=r.parse(e,t),a=new r.Compiler().compile(s,t),c=new r.JavaScriptCompiler().compile(a,t,void 0,!0);return r.template(c)}function i(s,a){return n||(n=o()),n.call(this,s,a)}return i._setup=function(s){return n||(n=o()),n._setup(s)},i._child=function(s,a,c,u){return n||(n=o()),n._child(s,a,c,u)},i}function A1(e,t){if(e===t)return!0;if(xs.isArray(e)&&xs.isArray(t)&&e.length===t.length){for(var r=0;r<e.length;r++)if(!A1(e[r],t[r]))return!1;return!0}}function z1(e){if(!e.path.parts){var t=e.path;e.path={type:"PathExpression",data:!1,depth:0,parts:[t.original+""],original:t.original+"",loc:t.loc}}}});var j1=w(yg=>{var N1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");yg.encode=function(e){if(0<=e&&e<N1.length)return N1[e];throw new TypeError("Must be between 0 and 63: "+e)};yg.decode=function(e){var t=65,r=90,n=97,o=122,i=48,s=57,a=43,c=47,u=26,p=52;return t<=e&&e<=r?e-t:n<=e&&e<=o?e-n+u:i<=e&&e<=s?e-i+p:e==a?62:e==c?63:-1}});var bg=w(vg=>{var D1=j1(),_g=5,M1=1<<_g,L1=M1-1,Z1=M1;function u9(e){return e<0?(-e<<1)+1:(e<<1)+0}function l9(e){var t=(e&1)===1,r=e>>1;return t?-r:r}vg.encode=function(t){var r="",n,o=u9(t);do n=o&L1,o>>>=_g,o>0&&(n|=Z1),r+=D1.encode(n);while(o>0);return r};vg.decode=function(t,r,n){var o=t.length,i=0,s=0,a,c;do{if(r>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(c=D1.decode(t.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));a=!!(c&Z1),c&=L1,i=i+(c<<s),s+=_g}while(a);n.value=l9(i),n.rest=r}});var Uo=w(et=>{function p9(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}et.getArg=p9;var q1=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,d9=/^data:.+\,.+$/;function ws(e){var t=e.match(q1);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}et.urlParse=ws;function qo(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}et.urlGenerate=qo;function xg(e){var t=e,r=ws(e);if(r){if(!r.path)return e;t=r.path}for(var n=et.isAbsolute(t),o=t.split(/\/+/),i,s=0,a=o.length-1;a>=0;a--)i=o[a],i==="."?o.splice(a,1):i===".."?s++:s>0&&(i===""?(o.splice(a+1,s),s=0):(o.splice(a,2),s--));return t=o.join("/"),t===""&&(t=n?"/":"."),r?(r.path=t,qo(r)):t}et.normalize=xg;function F1(e,t){e===""&&(e="."),t===""&&(t=".");var r=ws(t),n=ws(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),qo(r);if(r||t.match(d9))return t;if(n&&!n.host&&!n.path)return n.host=t,qo(n);var o=t.charAt(0)==="/"?t:xg(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=o,qo(n)):o}et.join=F1;et.isAbsolute=function(e){return e.charAt(0)==="/"||q1.test(e)};function f9(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;t.indexOf(e+"/")!==0;){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/)))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}et.relative=f9;var U1=(function(){var e=Object.create(null);return!("__proto__"in e)})();function B1(e){return e}function h9(e){return V1(e)?"$"+e:e}et.toSetString=U1?B1:h9;function m9(e){return V1(e)?e.slice(1):e}et.fromSetString=U1?B1:m9;function V1(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}function g9(e,t,r){var n=Fo(e.source,t.source);return n!==0||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:Fo(e.name,t.name)}et.compareByOriginalPositions=g9;function y9(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=Fo(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:Fo(e.name,t.name)}et.compareByGeneratedPositionsDeflated=y9;function Fo(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function _9(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=Fo(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:Fo(e.name,t.name)}et.compareByGeneratedPositionsInflated=_9;function v9(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}et.parseSourceMapInput=v9;function b9(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=ws(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var o=n.path.lastIndexOf("/");o>=0&&(n.path=n.path.substring(0,o+1))}t=F1(qo(n),t)}return xg(t)}et.computeSourceURL=b9});var Sg=w(H1=>{var kg=Uo(),wg=Object.prototype.hasOwnProperty,Kn=typeof Map<"u";function Ar(){this._array=[],this._set=Kn?new Map:Object.create(null)}Ar.fromArray=function(t,r){for(var n=new Ar,o=0,i=t.length;o<i;o++)n.add(t[o],r);return n};Ar.prototype.size=function(){return Kn?this._set.size:Object.getOwnPropertyNames(this._set).length};Ar.prototype.add=function(t,r){var n=Kn?t:kg.toSetString(t),o=Kn?this.has(t):wg.call(this._set,n),i=this._array.length;(!o||r)&&this._array.push(t),o||(Kn?this._set.set(t,i):this._set[n]=i)};Ar.prototype.has=function(t){if(Kn)return this._set.has(t);var r=kg.toSetString(t);return wg.call(this._set,r)};Ar.prototype.indexOf=function(t){if(Kn){var r=this._set.get(t);if(r>=0)return r}else{var n=kg.toSetString(t);if(wg.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')};Ar.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)};Ar.prototype.toArray=function(){return this._array.slice()};H1.ArraySet=Ar});var K1=w(W1=>{var G1=Uo();function x9(e,t){var r=e.generatedLine,n=t.generatedLine,o=e.generatedColumn,i=t.generatedColumn;return n>r||n==r&&i>=o||G1.compareByGeneratedPositionsInflated(e,t)<=0}function pu(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}pu.prototype.unsortedForEach=function(t,r){this._array.forEach(t,r)};pu.prototype.add=function(t){x9(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))};pu.prototype.toArray=function(){return this._sorted||(this._array.sort(G1.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};W1.MappingList=pu});var $g=w(J1=>{var Ss=bg(),Oe=Uo(),du=Sg().ArraySet,k9=K1().MappingList;function Ut(e){e||(e={}),this._file=Oe.getArg(e,"file",null),this._sourceRoot=Oe.getArg(e,"sourceRoot",null),this._skipValidation=Oe.getArg(e,"skipValidation",!1),this._sources=new du,this._names=new du,this._mappings=new k9,this._sourcesContents=null}Ut.prototype._version=3;Ut.fromSourceMap=function(t){var r=t.sourceRoot,n=new Ut({file:t.file,sourceRoot:r});return t.eachMapping(function(o){var i={generated:{line:o.generatedLine,column:o.generatedColumn}};o.source!=null&&(i.source=o.source,r!=null&&(i.source=Oe.relative(r,i.source)),i.original={line:o.originalLine,column:o.originalColumn},o.name!=null&&(i.name=o.name)),n.addMapping(i)}),t.sources.forEach(function(o){var i=o;r!==null&&(i=Oe.relative(r,o)),n._sources.has(i)||n._sources.add(i);var s=t.sourceContentFor(o);s!=null&&n.setSourceContent(o,s)}),n};Ut.prototype.addMapping=function(t){var r=Oe.getArg(t,"generated"),n=Oe.getArg(t,"original",null),o=Oe.getArg(t,"source",null),i=Oe.getArg(t,"name",null);this._skipValidation||this._validateMapping(r,n,o,i),o!=null&&(o=String(o),this._sources.has(o)||this._sources.add(o)),i!=null&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:o,name:i})};Ut.prototype.setSourceContent=function(t,r){var n=t;this._sourceRoot!=null&&(n=Oe.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Oe.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Oe.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Ut.prototype.applySourceMap=function(t,r,n){var o=r;if(r==null){if(t.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);o=t.file}var i=this._sourceRoot;i!=null&&(o=Oe.relative(i,o));var s=new du,a=new du;this._mappings.unsortedForEach(function(c){if(c.source===o&&c.originalLine!=null){var u=t.originalPositionFor({line:c.originalLine,column:c.originalColumn});u.source!=null&&(c.source=u.source,n!=null&&(c.source=Oe.join(n,c.source)),i!=null&&(c.source=Oe.relative(i,c.source)),c.originalLine=u.line,c.originalColumn=u.column,u.name!=null&&(c.name=u.name))}var p=c.source;p!=null&&!s.has(p)&&s.add(p);var l=c.name;l!=null&&!a.has(l)&&a.add(l)},this),this._sources=s,this._names=a,t.sources.forEach(function(c){var u=t.sourceContentFor(c);u!=null&&(n!=null&&(c=Oe.join(n,c)),i!=null&&(c=Oe.relative(i,c)),this.setSourceContent(c,u))},this)};Ut.prototype._validateMapping=function(t,r,n,o){if(r&&typeof r.line!="number"&&typeof r.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!r&&!n&&!o)){if(t&&"line"in t&&"column"in t&&r&&"line"in r&&"column"in r&&t.line>0&&t.column>=0&&r.line>0&&r.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:o}))}};Ut.prototype._serializeMappings=function(){for(var t=0,r=1,n=0,o=0,i=0,s=0,a="",c,u,p,l,d=this._mappings.toArray(),h=0,f=d.length;h<f;h++){if(u=d[h],c="",u.generatedLine!==r)for(t=0;u.generatedLine!==r;)c+=";",r++;else if(h>0){if(!Oe.compareByGeneratedPositionsInflated(u,d[h-1]))continue;c+=","}c+=Ss.encode(u.generatedColumn-t),t=u.generatedColumn,u.source!=null&&(l=this._sources.indexOf(u.source),c+=Ss.encode(l-s),s=l,c+=Ss.encode(u.originalLine-1-o),o=u.originalLine-1,c+=Ss.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(p=this._names.indexOf(u.name),c+=Ss.encode(p-i),i=p)),a+=c}return a};Ut.prototype._generateSourcesContent=function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Oe.relative(r,n));var o=Oe.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,o)?this._sourcesContents[o]:null},this)};Ut.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t};Ut.prototype.toString=function(){return JSON.stringify(this.toJSON())};J1.SourceMapGenerator=Ut});var Y1=w(Jn=>{Jn.GREATEST_LOWER_BOUND=1;Jn.LEAST_UPPER_BOUND=2;function Tg(e,t,r,n,o,i){var s=Math.floor((t-e)/2)+e,a=o(r,n[s],!0);return a===0?s:a>0?t-s>1?Tg(s,t,r,n,o,i):i==Jn.LEAST_UPPER_BOUND?t<n.length?t:-1:s:s-e>1?Tg(e,s,r,n,o,i):i==Jn.LEAST_UPPER_BOUND?s:e<0?-1:e}Jn.search=function(t,r,n,o){if(r.length===0)return-1;var i=Tg(-1,r.length,t,r,n,o||Jn.GREATEST_LOWER_BOUND);if(i<0)return-1;for(;i-1>=0&&n(r[i],r[i-1],!0)===0;)--i;return i}});var X1=w(Q1=>{function Pg(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function w9(e,t){return Math.round(e+Math.random()*(t-e))}function Cg(e,t,r,n){if(r<n){var o=w9(r,n),i=r-1;Pg(e,o,n);for(var s=e[n],a=r;a<n;a++)t(e[a],s)<=0&&(i+=1,Pg(e,i,a));Pg(e,i+1,a);var c=i+1;Cg(e,t,r,c-1),Cg(e,t,c+1,n)}}Q1.quickSort=function(e,t){Cg(e,t,0,e.length-1)}});var t2=w(fu=>{var R=Uo(),Eg=Y1(),Bo=Sg().ArraySet,S9=bg(),$s=X1().quickSort;function ke(e,t){var r=e;return typeof e=="string"&&(r=R.parseSourceMapInput(e)),r.sections!=null?new Xt(r,t):new We(r,t)}ke.fromSourceMap=function(e,t){return We.fromSourceMap(e,t)};ke.prototype._version=3;ke.prototype.__generatedMappings=null;Object.defineProperty(ke.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});ke.prototype.__originalMappings=null;Object.defineProperty(ke.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});ke.prototype._charIsMappingSeparator=function(t,r){var n=t.charAt(r);return n===";"||n===","};ke.prototype._parseMappings=function(t,r){throw new Error("Subclasses must implement _parseMappings")};ke.GENERATED_ORDER=1;ke.ORIGINAL_ORDER=2;ke.GREATEST_LOWER_BOUND=1;ke.LEAST_UPPER_BOUND=2;ke.prototype.eachMapping=function(t,r,n){var o=r||null,i=n||ke.GENERATED_ORDER,s;switch(i){case ke.GENERATED_ORDER:s=this._generatedMappings;break;case ke.ORIGINAL_ORDER:s=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var a=this.sourceRoot;s.map(function(c){var u=c.source===null?null:this._sources.at(c.source);return u=R.computeSourceURL(a,u,this._sourceMapURL),{source:u,generatedLine:c.generatedLine,generatedColumn:c.generatedColumn,originalLine:c.originalLine,originalColumn:c.originalColumn,name:c.name===null?null:this._names.at(c.name)}},this).forEach(t,o)};ke.prototype.allGeneratedPositionsFor=function(t){var r=R.getArg(t,"line"),n={source:R.getArg(t,"source"),originalLine:r,originalColumn:R.getArg(t,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var o=[],i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",R.compareByOriginalPositions,Eg.LEAST_UPPER_BOUND);if(i>=0){var s=this._originalMappings[i];if(t.column===void 0)for(var a=s.originalLine;s&&s.originalLine===a;)o.push({line:R.getArg(s,"generatedLine",null),column:R.getArg(s,"generatedColumn",null),lastColumn:R.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var c=s.originalColumn;s&&s.originalLine===r&&s.originalColumn==c;)o.push({line:R.getArg(s,"generatedLine",null),column:R.getArg(s,"generatedColumn",null),lastColumn:R.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return o};fu.SourceMapConsumer=ke;function We(e,t){var r=e;typeof e=="string"&&(r=R.parseSourceMapInput(e));var n=R.getArg(r,"version"),o=R.getArg(r,"sources"),i=R.getArg(r,"names",[]),s=R.getArg(r,"sourceRoot",null),a=R.getArg(r,"sourcesContent",null),c=R.getArg(r,"mappings"),u=R.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);s&&(s=R.normalize(s)),o=o.map(String).map(R.normalize).map(function(p){return s&&R.isAbsolute(s)&&R.isAbsolute(p)?R.relative(s,p):p}),this._names=Bo.fromArray(i.map(String),!0),this._sources=Bo.fromArray(o,!0),this._absoluteSources=this._sources.toArray().map(function(p){return R.computeSourceURL(s,p,t)}),this.sourceRoot=s,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=t,this.file=u}We.prototype=Object.create(ke.prototype);We.prototype.consumer=ke;We.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null&&(t=R.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1};We.fromSourceMap=function(t,r){var n=Object.create(We.prototype),o=n._names=Bo.fromArray(t._names.toArray(),!0),i=n._sources=Bo.fromArray(t._sources.toArray(),!0);n.sourceRoot=t._sourceRoot,n.sourcesContent=t._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=t._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(h){return R.computeSourceURL(n.sourceRoot,h,r)});for(var s=t._mappings.toArray().slice(),a=n.__generatedMappings=[],c=n.__originalMappings=[],u=0,p=s.length;u<p;u++){var l=s[u],d=new e2;d.generatedLine=l.generatedLine,d.generatedColumn=l.generatedColumn,l.source&&(d.source=i.indexOf(l.source),d.originalLine=l.originalLine,d.originalColumn=l.originalColumn,l.name&&(d.name=o.indexOf(l.name)),c.push(d)),a.push(d)}return $s(n.__originalMappings,R.compareByOriginalPositions),n};We.prototype._version=3;Object.defineProperty(We.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function e2(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}We.prototype._parseMappings=function(t,r){for(var n=1,o=0,i=0,s=0,a=0,c=0,u=t.length,p=0,l={},d={},h=[],f=[],m,y,_,b,T;p<u;)if(t.charAt(p)===";")n++,p++,o=0;else if(t.charAt(p)===",")p++;else{for(m=new e2,m.generatedLine=n,b=p;b<u&&!this._charIsMappingSeparator(t,b);b++);if(y=t.slice(p,b),_=l[y],_)p+=y.length;else{for(_=[];p<b;)S9.decode(t,p,d),T=d.value,p=d.rest,_.push(T);if(_.length===2)throw new Error("Found a source, but no line and column");if(_.length===3)throw new Error("Found a source and line, but no column");l[y]=_}m.generatedColumn=o+_[0],o=m.generatedColumn,_.length>1&&(m.source=a+_[1],a+=_[1],m.originalLine=i+_[2],i=m.originalLine,m.originalLine+=1,m.originalColumn=s+_[3],s=m.originalColumn,_.length>4&&(m.name=c+_[4],c+=_[4])),f.push(m),typeof m.originalLine=="number"&&h.push(m)}$s(f,R.compareByGeneratedPositionsDeflated),this.__generatedMappings=f,$s(h,R.compareByOriginalPositions),this.__originalMappings=h};We.prototype._findMapping=function(t,r,n,o,i,s){if(t[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[n]);if(t[o]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[o]);return Eg.search(t,r,i,s)};We.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var r=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var n=this._generatedMappings[t+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};We.prototype.originalPositionFor=function(t){var r={generatedLine:R.getArg(t,"line"),generatedColumn:R.getArg(t,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",R.compareByGeneratedPositionsDeflated,R.getArg(t,"bias",ke.GREATEST_LOWER_BOUND));if(n>=0){var o=this._generatedMappings[n];if(o.generatedLine===r.generatedLine){var i=R.getArg(o,"source",null);i!==null&&(i=this._sources.at(i),i=R.computeSourceURL(this.sourceRoot,i,this._sourceMapURL));var s=R.getArg(o,"name",null);return s!==null&&(s=this._names.at(s)),{source:i,line:R.getArg(o,"originalLine",null),column:R.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}};We.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null}):!1};We.prototype.sourceContentFor=function(t,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(t);if(n>=0)return this.sourcesContent[n];var o=t;this.sourceRoot!=null&&(o=R.relative(this.sourceRoot,o));var i;if(this.sourceRoot!=null&&(i=R.urlParse(this.sourceRoot))){var s=o.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!i.path||i.path=="/")&&this._sources.has("/"+o))return this.sourcesContent[this._sources.indexOf("/"+o)]}if(r)return null;throw new Error('"'+o+'" is not in the SourceMap.')};We.prototype.generatedPositionFor=function(t){var r=R.getArg(t,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:R.getArg(t,"line"),originalColumn:R.getArg(t,"column")},o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",R.compareByOriginalPositions,R.getArg(t,"bias",ke.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===n.source)return{line:R.getArg(i,"generatedLine",null),column:R.getArg(i,"generatedColumn",null),lastColumn:R.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};fu.BasicSourceMapConsumer=We;function Xt(e,t){var r=e;typeof e=="string"&&(r=R.parseSourceMapInput(e));var n=R.getArg(r,"version"),o=R.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new Bo,this._names=new Bo;var i={line:-1,column:0};this._sections=o.map(function(s){if(s.url)throw new Error("Support for url field in sections not implemented.");var a=R.getArg(s,"offset"),c=R.getArg(a,"line"),u=R.getArg(a,"column");if(c<i.line||c===i.line&&u<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=a,{generatedOffset:{generatedLine:c+1,generatedColumn:u+1},consumer:new ke(R.getArg(s,"map"),t)}})}Xt.prototype=Object.create(ke.prototype);Xt.prototype.constructor=ke;Xt.prototype._version=3;Object.defineProperty(Xt.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}});Xt.prototype.originalPositionFor=function(t){var r={generatedLine:R.getArg(t,"line"),generatedColumn:R.getArg(t,"column")},n=Eg.search(r,this._sections,function(i,s){var a=i.generatedLine-s.generatedOffset.generatedLine;return a||i.generatedColumn-s.generatedOffset.generatedColumn}),o=this._sections[n];return o?o.consumer.originalPositionFor({line:r.generatedLine-(o.generatedOffset.generatedLine-1),column:r.generatedColumn-(o.generatedOffset.generatedLine===r.generatedLine?o.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}};Xt.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})};Xt.prototype.sourceContentFor=function(t,r){for(var n=0;n<this._sections.length;n++){var o=this._sections[n],i=o.consumer.sourceContentFor(t,!0);if(i)return i}if(r)return null;throw new Error('"'+t+'" is not in the SourceMap.')};Xt.prototype.generatedPositionFor=function(t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(R.getArg(t,"source"))!==-1){var o=n.consumer.generatedPositionFor(t);if(o){var i={line:o.line+(n.generatedOffset.generatedLine-1),column:o.column+(n.generatedOffset.generatedLine===o.line?n.generatedOffset.generatedColumn-1:0)};return i}}}return{line:null,column:null}};Xt.prototype._parseMappings=function(t,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var o=this._sections[n],i=o.consumer._generatedMappings,s=0;s<i.length;s++){var a=i[s],c=o.consumer._sources.at(a.source);c=R.computeSourceURL(o.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c);var u=null;a.name&&(u=o.consumer._names.at(a.name),this._names.add(u),u=this._names.indexOf(u));var p={source:c,generatedLine:a.generatedLine+(o.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(o.generatedOffset.generatedLine===a.generatedLine?o.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:u};this.__generatedMappings.push(p),typeof p.originalLine=="number"&&this.__originalMappings.push(p)}$s(this.__generatedMappings,R.compareByGeneratedPositionsDeflated),$s(this.__originalMappings,R.compareByOriginalPositions)};fu.IndexedSourceMapConsumer=Xt});var n2=w(r2=>{var $9=$g().SourceMapGenerator,hu=Uo(),T9=/(\r?\n)/,P9=10,Vo="$$$isSourceNode$$$";function Et(e,t,r,n,o){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=r??null,this.name=o??null,this[Vo]=!0,n!=null&&this.add(n)}Et.fromStringWithSourceMap=function(t,r,n){var o=new Et,i=t.split(T9),s=0,a=function(){var d=f(),h=f()||"";return d+h;function f(){return s<i.length?i[s++]:void 0}},c=1,u=0,p=null;return r.eachMapping(function(d){if(p!==null)if(c<d.generatedLine)l(p,a()),c++,u=0;else{var h=i[s]||"",f=h.substr(0,d.generatedColumn-u);i[s]=h.substr(d.generatedColumn-u),u=d.generatedColumn,l(p,f),p=d;return}for(;c<d.generatedLine;)o.add(a()),c++;if(u<d.generatedColumn){var h=i[s]||"";o.add(h.substr(0,d.generatedColumn)),i[s]=h.substr(d.generatedColumn),u=d.generatedColumn}p=d},this),s<i.length&&(p&&l(p,a()),o.add(i.splice(s).join(""))),r.sources.forEach(function(d){var h=r.sourceContentFor(d);h!=null&&(n!=null&&(d=hu.join(n,d)),o.setSourceContent(d,h))}),o;function l(d,h){if(d===null||d.source===void 0)o.add(h);else{var f=n?hu.join(n,d.source):d.source;o.add(new Et(d.originalLine,d.originalColumn,f,h,d.name))}}};Et.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(r){this.add(r)},this);else if(t[Vo]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};Et.prototype.prepend=function(t){if(Array.isArray(t))for(var r=t.length-1;r>=0;r--)this.prepend(t[r]);else if(t[Vo]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};Et.prototype.walk=function(t){for(var r,n=0,o=this.children.length;n<o;n++)r=this.children[n],r[Vo]?r.walk(t):r!==""&&t(r,{source:this.source,line:this.line,column:this.column,name:this.name})};Et.prototype.join=function(t){var r,n,o=this.children.length;if(o>0){for(r=[],n=0;n<o-1;n++)r.push(this.children[n]),r.push(t);r.push(this.children[n]),this.children=r}return this};Et.prototype.replaceRight=function(t,r){var n=this.children[this.children.length-1];return n[Vo]?n.replaceRight(t,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(t,r):this.children.push("".replace(t,r)),this};Et.prototype.setSourceContent=function(t,r){this.sourceContents[hu.toSetString(t)]=r};Et.prototype.walkSourceContents=function(t){for(var r=0,n=this.children.length;r<n;r++)this.children[r][Vo]&&this.children[r].walkSourceContents(t);for(var o=Object.keys(this.sourceContents),r=0,n=o.length;r<n;r++)t(hu.fromSetString(o[r]),this.sourceContents[o[r]])};Et.prototype.toString=function(){var t="";return this.walk(function(r){t+=r}),t};Et.prototype.toStringWithSourceMap=function(t){var r={code:"",line:1,column:0},n=new $9(t),o=!1,i=null,s=null,a=null,c=null;return this.walk(function(u,p){r.code+=u,p.source!==null&&p.line!==null&&p.column!==null?((i!==p.source||s!==p.line||a!==p.column||c!==p.name)&&n.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:r.line,column:r.column},name:p.name}),i=p.source,s=p.line,a=p.column,c=p.name,o=!0):o&&(n.addMapping({generated:{line:r.line,column:r.column}}),i=null,o=!1);for(var l=0,d=u.length;l<d;l++)u.charCodeAt(l)===P9?(r.line++,r.column=0,l+1===d?(i=null,o=!1):o&&n.addMapping({source:p.source,original:{line:p.line,column:p.column},generated:{line:r.line,column:r.column},name:p.name})):r.column++}),this.walkSourceContents(function(u,p){n.setSourceContent(u,p)}),{code:r.code,map:n}};r2.SourceNode=Et});var o2=w(mu=>{mu.SourceMapGenerator=$g().SourceMapGenerator;mu.SourceMapConsumer=t2().SourceMapConsumer;mu.SourceNode=n2().SourceNode});var c2=w((gu,a2)=>{"use strict";gu.__esModule=!0;var zg=ct(),Yn=void 0;try{(typeof define!="function"||!define.amd)&&(i2=o2(),Yn=i2.SourceNode)}catch{}var i2;Yn||(Yn=function(e,t,r,n){this.src="",n&&this.add(n)},Yn.prototype={add:function(t){zg.isArray(t)&&(t=t.join("")),this.src+=t},prepend:function(t){zg.isArray(t)&&(t=t.join("")),this.src=t+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function Ig(e,t,r){if(zg.isArray(e)){for(var n=[],o=0,i=e.length;o<i;o++)n.push(t.wrap(e[o],r));return n}else if(typeof e=="boolean"||typeof e=="number")return e+"";return e}function s2(e){this.srcFile=e,this.source=[]}s2.prototype={isEmpty:function(){return!this.source.length},prepend:function(t,r){this.source.unshift(this.wrap(t,r))},push:function(t,r){this.source.push(this.wrap(t,r))},merge:function(){var t=this.empty();return this.each(function(r){t.add([" ",r,`
|
|
82
|
+
`])}),t},each:function(t){for(var r=0,n=this.source.length;r<n;r++)t(this.source[r])},empty:function(){var t=this.currentLocation||{start:{}};return new Yn(t.start.line,t.start.column,this.srcFile)},wrap:function(t){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return t instanceof Yn?t:(t=Ig(t,this,r),new Yn(r.start.line,r.start.column,this.srcFile,t))},functionCall:function(t,r,n){return n=this.generateList(n),this.wrap([t,r?"."+r+"(":"(",n,")"])},quotedString:function(t){return'"'+(t+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(t){var r=this,n=[];Object.keys(t).forEach(function(i){var s=Ig(t[i],r);s!=="undefined"&&n.push([r.quotedString(i),":",s])});var o=this.generateList(n);return o.prepend("{"),o.add("}"),o},generateList:function(t){for(var r=this.empty(),n=0,o=t.length;n<o;n++)n&&r.add(","),r.add(Ig(t[n],this));return r},generateArray:function(t){var r=this.generateList(t);return r.prepend("["),r.add("]"),r}};gu.default=s2;a2.exports=gu.default});var f2=w((yu,d2)=>{"use strict";yu.__esModule=!0;function p2(e){return e&&e.__esModule?e:{default:e}}var u2=Qc(),C9=qt(),Rg=p2(C9),E9=ct(),I9=c2(),l2=p2(I9);function Ho(e){this.value=e}function Go(){}Go.prototype={nameLookup:function(t,r){return this.internalNameLookup(t,r)},depthedLookup:function(t){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(t),")"]},compilerInfo:function(){var t=u2.COMPILER_REVISION,r=u2.REVISION_CHANGES[t];return[t,r]},appendToBuffer:function(t,r,n){return E9.isArray(t)||(t=[t]),t=this.source.wrap(t,r),this.environment.isSimple?["return ",t,";"]:n?["buffer += ",t,";"]:(t.appendToBuffer=!0,t)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(t,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",t,",",JSON.stringify(r),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(t,r,n,o){this.environment=t,this.options=r,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!o,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(t,r),this.useDepths=this.useDepths||t.useDepths||t.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||t.useBlockParams;var i=t.opcodes,s=void 0,a=void 0,c=void 0,u=void 0;for(c=0,u=i.length;c<u;c++)s=i[c],this.source.currentLocation=s.loc,a=a||s.loc,this[s.opcode].apply(this,s.args);if(this.source.currentLocation=a,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new Rg.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
|
|
83
|
+
`]),this.decorators.push("return fn;"),o?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
|
|
84
|
+
`),this.decorators.push(`}
|
|
85
|
+
`),this.decorators=this.decorators.merge()));var p=this.createFunctionContext(o);if(this.isChild)return p;var l={compiler:this.compilerInfo(),main:p};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var d=this.context,h=d.programs,f=d.decorators;for(c=0,u=h.length;c<u;c++)h[c]&&(l[c]=h[c],f[c]&&(l[c+"_d"]=f[c],l.useDecorators=!0));return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),o?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),r.srcName?(l=l.toStringWithSourceMap({file:r.destName}),l.map=l.map&&l.map.toString()):l=l.toString()),l},preamble:function(){this.lastContext=0,this.source=new l2.default(this.options.srcName),this.decorators=new l2.default(this.options.srcName)},createFunctionContext:function(t){var r=this,n="",o=this.stackVars.concat(this.registers.list);o.length>0&&(n+=", "+o.join(", "));var i=0;Object.keys(this.aliases).forEach(function(c){var u=r.aliases[c];u.children&&u.referenceCount>1&&(n+=", alias"+ ++i+"="+c,u.children[0]="alias"+i)}),this.lookupPropertyFunctionIsUsed&&(n+=", "+this.lookupPropertyFunctionVarDeclaration());var s=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&s.push("blockParams"),this.useDepths&&s.push("depths");var a=this.mergeSource(n);return t?(s.push(a),Function.apply(this,s)):this.source.wrap(["function(",s.join(","),`) {
|
|
86
|
+
`,a,"}"])},mergeSource:function(t){var r=this.environment.isSimple,n=!this.forceBuffer,o=void 0,i=void 0,s=void 0,a=void 0;return this.source.each(function(c){c.appendToBuffer?(s?c.prepend(" + "):s=c,a=c):(s&&(i?s.prepend("buffer += "):o=!0,a.add(";"),s=a=void 0),i=!0,r||(n=!1))}),n?s?(s.prepend("return "),a.add(";")):i||this.source.push('return "";'):(t+=", buffer = "+(o?"":this.initializeBuffer()),s?(s.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;")),t&&this.source.prepend("var "+t.substring(2)+(o?"":`;
|
|
87
|
+
`)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
|
|
88
|
+
lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
89
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
90
|
+
return parent[propertyName];
|
|
91
|
+
}
|
|
92
|
+
return undefined
|
|
93
|
+
}
|
|
94
|
+
`.trim()},blockValue:function(t){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(t,0,n);var o=this.popStack();n.splice(1,0,o),this.push(this.source.functionCall(r,"call",n))},ambiguousBlockValue:function(){var t=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs("",0,r,!0),this.flushInline();var n=this.topStack();r.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(t,"call",r),"}"])},appendContent:function(t){this.pendingContent?t=this.pendingContent+t:this.pendingLocation=this.source.currentLocation,this.pendingContent=t},append:function(){if(this.isInline())this.replaceStack(function(r){return[" != null ? ",r,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(t){this.lastContext=t},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(t,r,n,o){var i=0;!o&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(t[i++])):this.pushContext(),this.resolvePath("context",t,i,r,n)},lookupBlockParam:function(t,r){this.useBlockParams=!0,this.push(["blockParams[",t[0],"][",t[1],"]"]),this.resolvePath("context",r,1)},lookupData:function(t,r,n){t?this.pushStackLiteral("container.data(data, "+t+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,n)},resolvePath:function(t,r,n,o,i){var s=this;if(this.options.strict||this.options.assumeObjects){this.push(z9(this.options.strict&&i,this,r,n,t));return}for(var a=r.length;n<a;n++)this.replaceStack(function(c){var u=s.nameLookup(c,r[n],t);return o?[" && ",u]:[" != null ? ",u," : ",c]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(t,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof t=="string"?this.pushString(t):this.pushStackLiteral(t))},emptyHash:function(t){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(t?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var t=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(t.ids)),this.stringParams&&(this.push(this.objectLiteral(t.contexts)),this.push(this.objectLiteral(t.types))),this.push(this.objectLiteral(t.values))},pushString:function(t){this.pushStackLiteral(this.quotedString(t))},pushLiteral:function(t){this.pushStackLiteral(t)},pushProgram:function(t){t!=null?this.pushStackLiteral(this.programExpression(t)):this.pushStackLiteral(null)},registerDecorator:function(t,r){var n=this.nameLookup("decorators",r,"decorator"),o=this.setupHelperArgs(r,t);this.decorators.push(["fn = ",this.decorators.functionCall(n,"",["fn","props","container",o])," || fn;"])},invokeHelper:function(t,r,n){var o=this.popStack(),i=this.setupHelper(t,r),s=[];n&&s.push(i.name),s.push(o),this.options.strict||s.push(this.aliasable("container.hooks.helperMissing"));var a=["(",this.itemsSeparatedBy(s,"||"),")"],c=this.source.functionCall(a,"call",i.callParams);this.push(c)},itemsSeparatedBy:function(t,r){var n=[];n.push(t[0]);for(var o=1;o<t.length;o++)n.push(r,t[o]);return n},invokeKnownHelper:function(t,r){var n=this.setupHelper(t,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},invokeAmbiguous:function(t,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var o=this.setupHelper(0,t,r),i=this.lastHelper=this.nameLookup("helpers",t,"helper"),s=["(","(helper = ",i," || ",n,")"];this.options.strict||(s[0]="(helper = ",s.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",s,o.paramsInit?["),(",o.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",o.callParams)," : helper))"])},invokePartial:function(t,r,n){var o=[],i=this.setupParams(r,1,o);t&&(r=this.popStack(),delete i.name),n&&(i.indent=JSON.stringify(n)),i.helpers="helpers",i.partials="partials",i.decorators="container.decorators",t?o.unshift(r):o.unshift(this.nameLookup("partials",r,"partial")),this.options.compat&&(i.depths="depths"),i=this.objectLiteral(i),o.push(i),this.push(this.source.functionCall("container.invokePartial","",o))},assignToHash:function(t){var r=this.popStack(),n=void 0,o=void 0,i=void 0;this.trackIds&&(i=this.popStack()),this.stringParams&&(o=this.popStack(),n=this.popStack());var s=this.hash;n&&(s.contexts[t]=n),o&&(s.types[t]=o),i&&(s.ids[t]=i),s.values[t]=r},pushId:function(t,r,n){t==="BlockParam"?this.pushStackLiteral("blockParams["+r[0]+"].path["+r[1]+"]"+(n?" + "+JSON.stringify("."+n):"")):t==="PathExpression"?this.pushString(r):t==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:Go,compileChildren:function(t,r){for(var n=t.children,o=void 0,i=void 0,s=0,a=n.length;s<a;s++){o=n[s],i=new this.compiler;var c=this.matchExistingProgram(o);if(c==null){this.context.programs.push("");var u=this.context.programs.length;o.index=u,o.name="program"+u,this.context.programs[u]=i.compile(o,r,this.context,!this.precompile),this.context.decorators[u]=i.decorators,this.context.environments[u]=o,this.useDepths=this.useDepths||i.useDepths,this.useBlockParams=this.useBlockParams||i.useBlockParams,o.useDepths=this.useDepths,o.useBlockParams=this.useBlockParams}else o.index=c.index,o.name="program"+c.index,this.useDepths=this.useDepths||c.useDepths,this.useBlockParams=this.useBlockParams||c.useBlockParams}},matchExistingProgram:function(t){for(var r=0,n=this.context.environments.length;r<n;r++){var o=this.context.environments[r];if(o&&o.equals(t))return o}},programExpression:function(t){var r=this.environment.children[t],n=[r.index,"data",r.blockParams];return(this.useBlockParams||this.useDepths)&&n.push("blockParams"),this.useDepths&&n.push("depths"),"container.program("+n.join(", ")+")"},useRegister:function(t){this.registers[t]||(this.registers[t]=!0,this.registers.list.push(t))},push:function(t){return t instanceof Ho||(t=this.source.wrap(t)),this.inlineStack.push(t),t},pushStackLiteral:function(t){this.push(new Ho(t))},pushSource:function(t){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),t&&this.source.push(t)},replaceStack:function(t){var r=["("],n=void 0,o=void 0,i=void 0;if(!this.isInline())throw new Rg.default("replaceStack on non-inline");var s=this.popStack(!0);if(s instanceof Ho)n=[s.value],r=["(",n],i=!0;else{o=!0;var a=this.incrStack();r=["((",this.push(a)," = ",s,")"],n=this.topStack()}var c=t.call(this,n);i||this.popStack(),o&&this.stackSlot--,this.push(r.concat(c,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var t=this.inlineStack;this.inlineStack=[];for(var r=0,n=t.length;r<n;r++){var o=t[r];if(o instanceof Ho)this.compileStack.push(o);else{var i=this.incrStack();this.pushSource([i," = ",o,";"]),this.compileStack.push(i)}}},isInline:function(){return this.inlineStack.length},popStack:function(t){var r=this.isInline(),n=(r?this.inlineStack:this.compileStack).pop();if(!t&&n instanceof Ho)return n.value;if(!r){if(!this.stackSlot)throw new Rg.default("Invalid stack pop");this.stackSlot--}return n},topStack:function(){var t=this.isInline()?this.inlineStack:this.compileStack,r=t[t.length-1];return r instanceof Ho?r.value:r},contextName:function(t){return this.useDepths&&t?"depths["+t+"]":"depth"+t},quotedString:function(t){return this.source.quotedString(t)},objectLiteral:function(t){return this.source.objectLiteral(t)},aliasable:function(t){var r=this.aliases[t];return r?(r.referenceCount++,r):(r=this.aliases[t]=this.source.wrap(t),r.aliasable=!0,r.referenceCount=1,r)},setupHelper:function(t,r,n){var o=[],i=this.setupHelperArgs(r,t,o,n),s=this.nameLookup("helpers",r,"helper"),a=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:o,paramsInit:i,name:s,callParams:[a].concat(o)}},setupParams:function(t,r,n){var o={},i=[],s=[],a=[],c=!n,u=void 0;c&&(n=[]),o.name=this.quotedString(t),o.hash=this.popStack(),this.trackIds&&(o.hashIds=this.popStack()),this.stringParams&&(o.hashTypes=this.popStack(),o.hashContexts=this.popStack());var p=this.popStack(),l=this.popStack();(l||p)&&(o.fn=l||"container.noop",o.inverse=p||"container.noop");for(var d=r;d--;)u=this.popStack(),n[d]=u,this.trackIds&&(a[d]=this.popStack()),this.stringParams&&(s[d]=this.popStack(),i[d]=this.popStack());return c&&(o.args=this.source.generateArray(n)),this.trackIds&&(o.ids=this.source.generateArray(a)),this.stringParams&&(o.types=this.source.generateArray(s),o.contexts=this.source.generateArray(i)),this.options.data&&(o.data="data"),this.useBlockParams&&(o.blockParams="blockParams"),o},setupHelperArgs:function(t,r,n,o){var i=this.setupParams(t,r,n);return i.loc=JSON.stringify(this.source.currentLocation),i=this.objectLiteral(i),o?(this.useRegister("options"),n.push("options"),["options=",i]):n?(n.push(i),""):i}};(function(){for(var e="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),t=Go.RESERVED_WORDS={},r=0,n=e.length;r<n;r++)t[e[r]]=!0})();Go.isValidJavaScriptVariableName=function(e){return!Go.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(e)};function z9(e,t,r,n,o){var i=t.popStack(),s=r.length;for(e&&s--;n<s;n++)i=t.nameLookup(i,r[n],o);return e?[t.aliasable("container.strict"),"(",i,", ",t.quotedString(r[n]),", ",JSON.stringify(t.source.currentLocation)," )"]:i}yu.default=Go;d2.exports=yu.default});var g2=w((_u,m2)=>{"use strict";_u.__esModule=!0;function Ts(e){return e&&e.__esModule?e:{default:e}}var R9=y1(),A9=Ts(R9),O9=ug(),N9=Ts(O9),Ag=I1(),Og=O1(),j9=f2(),D9=Ts(j9),M9=cu(),L9=Ts(M9),Z9=ig(),q9=Ts(Z9),F9=A9.default.create;function h2(){var e=F9();return e.compile=function(t,r){return Og.compile(t,r,e)},e.precompile=function(t,r){return Og.precompile(t,r,e)},e.AST=N9.default,e.Compiler=Og.Compiler,e.JavaScriptCompiler=D9.default,e.Parser=Ag.parser,e.parse=Ag.parse,e.parseWithoutProcessing=Ag.parseWithoutProcessing,e}var Wo=h2();Wo.create=h2;q9.default(Wo);Wo.Visitor=L9.default;Wo.default=Wo;_u.default=Wo;m2.exports=_u.default});var y2=w(vu=>{"use strict";vu.__esModule=!0;vu.print=H9;vu.PrintVisitor=Ee;function U9(e){return e&&e.__esModule?e:{default:e}}var B9=cu(),V9=U9(B9);function H9(e){return new Ee().accept(e)}function Ee(){this.padding=0}Ee.prototype=new V9.default;Ee.prototype.pad=function(e){for(var t="",r=0,n=this.padding;r<n;r++)t+=" ";return t+=e+`
|
|
95
|
+
`,t};Ee.prototype.Program=function(e){var t="",r=e.body,n=void 0,o=void 0;if(e.blockParams){var i="BLOCK PARAMS: [";for(n=0,o=e.blockParams.length;n<o;n++)i+=" "+e.blockParams[n];i+=" ]",t+=this.pad(i)}for(n=0,o=r.length;n<o;n++)t+=this.accept(r[n]);return this.padding--,t};Ee.prototype.MustacheStatement=function(e){return this.pad("{{ "+this.SubExpression(e)+" }}")};Ee.prototype.Decorator=function(e){return this.pad("{{ DIRECTIVE "+this.SubExpression(e)+" }}")};Ee.prototype.BlockStatement=Ee.prototype.DecoratorBlock=function(e){var t="";return t+=this.pad((e.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,t+=this.pad(this.SubExpression(e)),e.program&&(t+=this.pad("PROGRAM:"),this.padding++,t+=this.accept(e.program),this.padding--),e.inverse&&(e.program&&this.padding++,t+=this.pad("{{^}}"),this.padding++,t+=this.accept(e.inverse),this.padding--,e.program&&this.padding--),this.padding--,t};Ee.prototype.PartialStatement=function(e){var t="PARTIAL:"+e.name.original;return e.params[0]&&(t+=" "+this.accept(e.params[0])),e.hash&&(t+=" "+this.accept(e.hash)),this.pad("{{> "+t+" }}")};Ee.prototype.PartialBlockStatement=function(e){var t="PARTIAL BLOCK:"+e.name.original;return e.params[0]&&(t+=" "+this.accept(e.params[0])),e.hash&&(t+=" "+this.accept(e.hash)),t+=" "+this.pad("PROGRAM:"),this.padding++,t+=this.accept(e.program),this.padding--,this.pad("{{> "+t+" }}")};Ee.prototype.ContentStatement=function(e){return this.pad("CONTENT[ '"+e.value+"' ]")};Ee.prototype.CommentStatement=function(e){return this.pad("{{! '"+e.value+"' }}")};Ee.prototype.SubExpression=function(e){for(var t=e.params,r=[],n=void 0,o=0,i=t.length;o<i;o++)r.push(this.accept(t[o]));return t="["+r.join(", ")+"]",n=e.hash?" "+this.accept(e.hash):"",this.accept(e.path)+" "+t+n};Ee.prototype.PathExpression=function(e){var t=e.parts.join("/");return(e.data?"@":"")+"PATH:"+t};Ee.prototype.StringLiteral=function(e){return'"'+e.value+'"'};Ee.prototype.NumberLiteral=function(e){return"NUMBER{"+e.value+"}"};Ee.prototype.BooleanLiteral=function(e){return"BOOLEAN{"+e.value+"}"};Ee.prototype.UndefinedLiteral=function(){return"UNDEFINED"};Ee.prototype.NullLiteral=function(){return"NULL"};Ee.prototype.Hash=function(e){for(var t=e.pairs,r=[],n=0,o=t.length;n<o;n++)r.push(this.accept(t[n]));return"HASH{"+r.join(", ")+"}"};Ee.prototype.HashPair=function(e){return e.key+"="+this.accept(e.value)}});var Ng=w((OB,b2)=>{var bu=g2().default,v2=y2();bu.PrintVisitor=v2.PrintVisitor;bu.print=v2.print;b2.exports=bu;function _2(e,t){var r=require("fs"),n=r.readFileSync(t,"utf8");e.exports=bu.compile(n)}typeof require<"u"&&require.extensions&&(require.extensions[".handlebars"]=_2,require.extensions[".hbs"]=_2)});function Ps(e,t){xu.default.registerPartial(e,t)}function Or(e,t){G9.set(e,t),jg.set(e,xu.default.compile(t))}function W9(e,t){return{profile_name:e.name,stacks:e.stacks,frontend:e.frontend?{...e.frontend,mindset:""}:void 0,backend:e.backend?{...e.backend,mindset:""}:void 0,quality_gate:e.quality_gate,tools:e.tools??[],vendor:e.vendor??[],...t}}function x2(e,t){let r=jg.get(`mindset:${e}`);return r?r(t):`[Mindset '${e}' not found]`}function k2(e,t,r){let n=jg.get(`prompt:${e}`);if(!n)throw new Error(`Prompt template '${e}' not found`);let o=W9(t,r);if(t.frontend?.mindset_template){let i=x2(t.frontend.mindset_template,o);o.frontend.mindset=i}if(t.backend?.mindset_template){let i=x2(t.backend.mindset_template,o);o.backend.mindset=i}return n(o)}var xu,jg,G9,ku=v(()=>{"use strict";xu=St(Ng(),1);xu.default.registerHelper("eq",function(e,t){return e===t});jg=new Map,G9=new Map});function Dg(e){let t=(0,xt.join)(e,"partials");if((0,ut.existsSync)(t)){for(let i of(0,ut.readdirSync)(t))if(i.endsWith(".hbs")){let s=(0,xt.basename)(i,".hbs"),a=(0,ut.readFileSync)((0,xt.join)(t,i),"utf-8");Ps(s,a)}}let r=(0,xt.join)(e,"prompts");if((0,ut.existsSync)(r)){for(let i of(0,ut.readdirSync)(r))if(i.endsWith(".hbs")){let s=(0,xt.basename)(i,".hbs"),a=(0,ut.readFileSync)((0,xt.join)(r,i),"utf-8");Or(`prompt:${s}`,a)}}let n=(0,xt.join)(e,"mindsets");if((0,ut.existsSync)(n)){for(let i of(0,ut.readdirSync)(n))if(i.endsWith(".hbs")){let s=(0,xt.basename)(i,".hbs"),a=(0,ut.readFileSync)((0,xt.join)(n,i),"utf-8");Or(`mindset:${s}`,a)}}let o=(0,xt.join)(e,"agents");if((0,ut.existsSync)(o)){for(let i of(0,ut.readdirSync)(o))if(i.endsWith(".hbs")){let s=(0,xt.basename)(i,".hbs"),a=(0,ut.readFileSync)((0,xt.join)(o,i),"utf-8");Or(`agent:${s}`,a)}}}async function K9(e,t){let{pbkdf2:r}=await import("node:crypto");return new Promise((n,o)=>{r(e,t,1e5,32,"sha256",(i,s)=>{i?o(i):n(s)})})}async function J9(e,t){let r=JSON.parse(e);if(r.version!==1)throw new Error(`\u672A\u5BFE\u5FDC\u306E\u30D0\u30F3\u30C9\u30EB\u30D0\u30FC\u30B8\u30E7\u30F3: ${r.version}`);let n=Buffer.from(r.salt,"hex"),o=Buffer.from(r.iv,"hex"),i=Buffer.from(r.tag,"hex"),s=Buffer.from(r.data,"base64"),a=await K9(t,n),c=(0,w2.createDecipheriv)("aes-256-gcm",a,o);c.setAuthTag(i);let u=Buffer.concat([c.update(s),c.final()]);for(let[p,l]of Object.entries(r.templates)){let d=u.subarray(l.offset,l.offset+l.length).toString("utf-8");l.type==="partial"?Ps(p,d):Or(`${l.type}:${p}`,d)}}async function S2(e){return!1}var ut,xt,w2,$2=v(()=>{"use strict";ut=require("node:fs"),xt=require("node:path"),w2=require("node:crypto");ku()});function Y9(){let e=`${(0,P2.hostname)()}-${process.env.USERNAME??process.env.USER??"unknown"}`;return(0,T2.createHash)("sha256").update(e).digest("hex").slice(0,32)}async function C2(e){let t=`${e.registry_url}/v1/auth/validate`,r=Y9(),n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({license_key:e.license_key,machine_id:r})});if(!n.ok)throw new Error(`Registry API auth failed: ${n.status} ${n.statusText}`);return await n.json()}async function E2(e,t){let r=e.components??[];if(r.length===0)return null;let n=new URLSearchParams({components:r.join(","),language:e.language}),o=`${e.registry_url}/v1/bundle?${n.toString()}`,i={Authorization:`Bearer ${e.license_key}`};t&&(i["If-None-Match"]=`"${t}"`);let s=await fetch(o,{headers:i});if(s.status===304)return null;if(!s.ok){let u=await s.text();throw new Error(`Registry API bundle fetch failed: ${s.status} - ${u}`)}let a=await s.json(),c=s.headers.get("ETag")?.replace(/"/g,"")??"";return{bundle:a,etag:c}}async function I2(e,t){let{pbkdf2:r}=await import("node:crypto"),{createDecipheriv:n}=await import("node:crypto"),o=Buffer.from(e.salt,"hex"),i=Buffer.from(e.iv,"hex"),s=Buffer.from(e.tag,"hex"),a=Buffer.from(e.data,"base64"),c=await new Promise((l,d)=>{r(t,o,1e5,32,"sha256",(h,f)=>{h?d(h):l(f)})}),u=n("aes-256-gcm",c,i);u.setAuthTag(s);let p=Buffer.concat([u.update(a),u.final()]);return JSON.parse(p.toString("utf-8"))}var T2,P2,z2=v(()=>{"use strict";T2=require("node:crypto"),P2=require("node:os")});function Mg(){let e=process.env.HOME??process.env.USERPROFILE??"",t=(0,Qn.join)(e,".godd","cache");return(0,kt.existsSync)(t)||(0,kt.mkdirSync)(t,{recursive:!0}),t}function Lg(e,t){let r=`${e.sort().join(",")}_${t}`;return(0,er.createHash)("sha256").update(r).digest("hex").slice(0,16)}function R2(e,t){return new Promise((r,n)=>{(0,er.pbkdf2)(e,t,5e4,32,"sha256",(o,i)=>{o?n(o):r(i)})})}async function X9(e,t){let r=(0,er.randomBytes)(32),n=await R2(t,r),o=(0,er.randomBytes)(12),i=(0,er.createCipheriv)("aes-256-gcm",n,o),s=Buffer.concat([i.update(e),i.final()]),a=i.getAuthTag();return Buffer.concat([r,o,a,s])}async function eZ(e,t){let r=e.subarray(0,32),n=e.subarray(32,44),o=e.subarray(44,60),i=e.subarray(60),s=await R2(t,r),a=(0,er.createDecipheriv)("aes-256-gcm",s,n);return a.setAuthTag(o),Buffer.concat([a.update(i),a.final()])}async function A2(e,t,r,n,o){let i=Mg(),s=Lg(r,n),a=await X9(Buffer.from(e,"utf-8"),o);(0,kt.writeFileSync)((0,Qn.join)(i,`bundle-${s}.enc`),a);let c={etag:t,timestamp:Date.now(),components:r,language:n,profileHash:s};(0,kt.writeFileSync)((0,Qn.join)(i,"meta.json"),JSON.stringify(c,null,2))}async function O2(e,t,r){let n=Mg(),o=(0,Qn.join)(n,"meta.json");if(!(0,kt.existsSync)(o))return null;let i;try{i=JSON.parse((0,kt.readFileSync)(o,"utf-8"))}catch{return null}let s=Lg(e,t);if(i.profileHash!==s)return null;let a=(0,Qn.join)(n,`bundle-${s}.enc`);if(!(0,kt.existsSync)(a))return null;try{let c=(0,kt.readFileSync)(a);return{data:(await eZ(c,r)).toString("utf-8"),etag:i.etag,isExpired:Date.now()-i.timestamp>Q9}}catch{return null}}function N2(e,t){let r=Mg(),n=(0,Qn.join)(r,"meta.json");if((0,kt.existsSync)(n))try{let o=JSON.parse((0,kt.readFileSync)(n,"utf-8")),i=Lg(e,t);return o.profileHash!==i?void 0:o.etag}catch{return}}var er,kt,Qn,Q9,j2=v(()=>{"use strict";er=require("node:crypto"),kt=require("node:fs"),Qn=require("node:path"),Q9=600*60*1e3});function Cs(e){for(let[t,r]of Object.entries(e.partials))Ps(t,r);for(let[t,r]of Object.entries(e.prompts))Or(`prompt:${t}`,r);for(let[t,r]of Object.entries(e.agents))Or(`agent:${t}`,r);for(let[t,r]of Object.entries(e.mindsets))Or(`mindset:${t}`,r)}var D2=v(()=>{"use strict";ku()});function Ko(e){try{return(0,ee.existsSync)(e)?JSON.parse((0,ee.readFileSync)(e,"utf-8")):null}catch{return null}}function Nr(e,t=4096){try{return(0,ee.existsSync)(e)?(0,ee.readFileSync)(e).subarray(0,t).toString("utf-8"):""}catch{return""}}function rZ(e){let t=(0,V.join)(e,"vendor");if(!(0,ee.existsSync)(t))return[];let r=[];try{for(let n of(0,ee.readdirSync)(t)){let o=(0,V.join)(t,n);if(!(0,ee.statSync)(o).isDirectory())continue;let i=tZ[n];if(i)r.push({name:n,path:o,description:i.description,runtime:i.runtime,setupHint:i.setupHint});else{let s=(0,ee.existsSync)((0,V.join)(o,"pyproject.toml")),a=(0,ee.existsSync)((0,V.join)(o,"package.json")),c=s?"python":a?"node":"unknown";r.push({name:n,path:o,description:`vendor/${n}`,runtime:c,setupHint:c==="python"?"uv sync":"pnpm install"})}}}catch{}return r}function nZ(e){let t=[],r=(0,V.join)(e,"backend","pyproject.toml"),n=(0,V.join)(e,"backend","requirements.txt");if((0,ee.existsSync)(r)){let y=Nr(r);y.includes("fastapi")&&t.push({id:"fastapi",label:"FastAPI",evidence:"backend/pyproject.toml \u306B fastapi \u3092\u691C\u51FA"}),y.includes("django")&&t.push({id:"django",label:"Django",evidence:"backend/pyproject.toml \u306B django \u3092\u691C\u51FA"})}else(0,ee.existsSync)(n)&&Nr(n).includes("fastapi")&&t.push({id:"fastapi",label:"FastAPI",evidence:"backend/requirements.txt \u306B fastapi \u3092\u691C\u51FA"});let o=Ko((0,V.join)(e,"frontend","package.json")),i=Ko((0,V.join)(e,"package.json")),s=Ko((0,V.join)(e,"src","package.json"));for(let[y,_]of[["frontend/package.json",o],["package.json",i],["src/package.json",s]]){if(!_)continue;let b={..._.dependencies,..._.devDependencies};b.react&&t.push({id:"react",label:"React",evidence:`${y} \u306B react \u3092\u691C\u51FA`}),b.next&&t.push({id:"nextjs",label:"Next.js",evidence:`${y} \u306B next \u3092\u691C\u51FA`}),b.vue&&t.push({id:"vue",label:"Vue.js",evidence:`${y} \u306B vue \u3092\u691C\u51FA`}),b.svelte&&t.push({id:"svelte",label:"Svelte",evidence:`${y} \u306B svelte \u3092\u691C\u51FA`}),b.electron&&t.push({id:"electron",label:"Electron",evidence:`${y} \u306B electron \u3092\u691C\u51FA`})}let a=(0,V.join)(e,"pubspec.yaml");if((0,ee.existsSync)(a)){let y=Nr(a);t.push({id:"dart",label:"Dart",evidence:"pubspec.yaml \u3092\u691C\u51FA"}),y.includes("flutter")&&t.push({id:"flutter",label:"Flutter",evidence:"pubspec.yaml \u306B flutter \u3092\u691C\u51FA"})}let c=(0,ee.existsSync)((0,V.join)(e,"Package.swift")),u=(0,V.join)(e,"ios"),p=(0,ee.existsSync)(u)&&(()=>{try{return(0,ee.readdirSync)(u).some(y=>y.endsWith(".xcodeproj")||y.endsWith(".xcworkspace"))}catch{return!1}})();(c||p)&&t.push({id:"swift",label:"Swift",evidence:c?"Package.swift \u3092\u691C\u51FA":"ios/*.xcodeproj \u3092\u691C\u51FA"});let l=(0,ee.existsSync)((0,V.join)(e,"build.gradle.kts")),d=(0,ee.existsSync)((0,V.join)(e,"build.gradle")),h=(0,V.join)(e,"android"),f=(0,ee.existsSync)((0,V.join)(h,"build.gradle.kts"))||(0,ee.existsSync)((0,V.join)(h,"build.gradle"));(l||d||f)&&t.push({id:"kotlin",label:"Kotlin",evidence:l?"build.gradle.kts \u3092\u691C\u51FA":d?"build.gradle \u3092\u691C\u51FA":"android/build.gradle \u3092\u691C\u51FA"});let m=Nr((0,V.join)(e,"docker-compose.yml"));return m&&m.includes("postgres")&&t.push({id:"postgres",label:"Postgres",evidence:"docker-compose.yml \u306B postgres \u3092\u691C\u51FA"}),((0,ee.existsSync)((0,V.join)(e,"prisma","schema.prisma"))||(0,ee.existsSync)((0,V.join)(e,"backend","prisma","schema.prisma")))&&t.push({id:"prisma",label:"Prisma",evidence:"prisma/schema.prisma \u3092\u691C\u51FA"}),t}function iZ(e){let t={},r=new Map,n=[(0,V.join)(e,"package.json"),(0,V.join)(e,"frontend","package.json"),(0,V.join)(e,"src","package.json")];for(let o of n){let i=Ko(o);if(!i)continue;let s=o.replace(e,"").replace(/^[\\/]/,""),a=i.dependencies,c=i.devDependencies;for(let[u,p]of Object.entries({...a,...c}))t[u]=p,r.set(u,s)}return{deps:t,sources:r}}function sZ(e){let t=new Set,r="";for(let n of[(0,V.join)(e,"backend"),e]){let o=(0,V.join)(n,"pyproject.toml");if((0,ee.existsSync)(o)){let a=Nr(o,16384).matchAll(/["']([a-zA-Z][\w.-]*)(?:\[.*?\])?(?:>=|<=|==|~=|!=|<|>)?/g);for(let c of a)t.add(c[1].toLowerCase().replace(/-/g,"-"));r=o.replace(e,"").replace(/^[\\/]/,"");break}let i=(0,V.join)(n,"requirements.txt");if((0,ee.existsSync)(i)){let s=Nr(i,16384);for(let a of s.split(`
|
|
96
|
+
`)){let c=a.trim();if(!c||c.startsWith("#"))continue;let u=c.match(/^([a-zA-Z][\w.-]*)/);u&&t.add(u[1].toLowerCase().replace(/-/g,"-"))}r=i.replace(e,"").replace(/^[\\/]/,"");break}}return{deps:t,source:r}}function aZ(e){let t=[],r=new Set,{deps:n,sources:o}=iZ(e),{deps:i,source:s}=sZ(e),a="";for(let c of["docker-compose.yml","docker-compose.yaml","compose.yml","compose.yaml"]){let u=Nr((0,V.join)(e,c));if(u){a=u;break}}for(let c of oZ)if(!r.has(c.id)){if(c.npmPackage&&c.npmPackage in n){let u=o.get(c.npmPackage)??"package.json";r.add(c.id),t.push({id:c.id,label:c.label,category:c.category,description:c.description,evidence:`${u} \u306B ${c.npmPackage} \u3092\u691C\u51FA`,version:n[c.npmPackage],url:c.url});continue}if(c.pyPackage&&i.has(c.pyPackage.toLowerCase().replace(/-/g,"-"))){r.add(c.id),t.push({id:c.id,label:c.label,category:c.category,description:c.description,evidence:`${s} \u306B ${c.pyPackage} \u3092\u691C\u51FA`,url:c.url});continue}if(c.configFiles){for(let u of c.configFiles)if((0,ee.existsSync)((0,V.join)(e,u))){r.add(c.id),t.push({id:c.id,label:c.label,category:c.category,description:c.description,evidence:`${u} \u3092\u691C\u51FA`,url:c.url});break}if(r.has(c.id))continue}c.dockerPattern&&a.includes(c.dockerPattern)&&(r.add(c.id),t.push({id:c.id,label:c.label,category:c.category,description:c.description,evidence:`docker-compose.yml \u306B ${c.dockerPattern} \u3092\u691C\u51FA`,url:c.url}))}return t}function cZ(e){let t=Nr((0,V.join)(e,"docker-compose.yml"));if(!t)return[];let r=[],n=/^\s{2}(\w[\w-]*):\s*$/gm,o;for(;(o=n.exec(t))!==null;)r.push(o[1]);return r}function uZ(e){let t=(0,V.join)(e,"docs"),r=(0,ee.existsSync)((0,V.join)(e,"godd-mcp-server","notes-app","package.json")),n=(0,ee.existsSync)((0,V.join)(e,"godd-mcp-server","notes-api","pyproject.toml"));if(!(0,ee.existsSync)(t))return{exists:!1,sections:[],files:[],has_notes_app:r,has_notes_api:n};let o=[],i=[];function s(a,c){try{for(let u of(0,ee.readdirSync)(a)){if(u.startsWith("."))continue;let p=(0,V.join)(a,u),l=c?`${c}/${u}`:u;(0,ee.statSync)(p).isDirectory()?(c||o.push(u),s(p,l)):i.push(l)}}catch{}}return s(t,""),{exists:!0,sections:o,files:i,has_notes_app:r,has_notes_api:n}}function M2(e){let t=Ko((0,V.join)(e,"package.json"))?.name||(0,V.basename)(e),r=[];try{for(let u of(0,ee.readdirSync)(e)){if(u.startsWith(".")||u==="node_modules")continue;let p=(0,V.join)(e,u);(0,ee.statSync)(p).isDirectory()&&r.push(u)}}catch{}let o=["package.json","pyproject.toml","docker-compose.yml","docker-compose.yaml","Dockerfile","tsconfig.json",".env.example","env.example","AGENTS.md","README.md","Makefile",".mise.toml","turbo.json","pnpm-workspace.yaml"].filter(u=>(0,ee.existsSync)((0,V.join)(e,u))),s=Ko((0,V.join)(e,"package.json"))?.scripts??{},a=[];try{for(let u of(0,ee.readdirSync)(e))(u.match(/^env.*\.example$/)||u.match(/^\.env.*\.example$/))&&a.push(u)}catch{}let c=Nr((0,V.join)(e,"README.md"),500);return{root:e,name:t,detected_stacks:nZ(e),detected_tools:aZ(e),vendor_items:rZ(e),key_files:o,directories:r,scripts:s,docker_services:cZ(e),env_templates:a,readme_excerpt:c,question_list_path:(0,V.join)(e,"docs","003_requirements","questions.csv"),docs_structure:uZ(e)}}var ee,V,tZ,oZ,L2=v(()=>{"use strict";ee=require("node:fs"),V=require("node:path");tZ={"browser-use":{description:"Python AI \u30D6\u30E9\u30A6\u30B6\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8 \u2014 Web\u30D6\u30E9\u30A6\u30B6\u3092\u81EA\u52D5\u64CD\u4F5C",runtime:"python",setupHint:"uv sync && uv run browser-use install"},"android-use":{description:"Python Android AI \u30A8\u30FC\u30B8\u30A7\u30F3\u30C8 \u2014 Android\u7AEF\u672B\u3092ADB\u3067\u81EA\u52D5\u64CD\u4F5C",runtime:"python",setupHint:"python -m venv .venv && pip install -r requirements.txt"},"react-grab":{description:"Node.js React \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30B3\u30D4\u30FC\u30C4\u30FC\u30EB \u2014 React\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u30C4\u30EA\u30FC\u3092\u62BD\u51FA",runtime:"node",setupHint:"pnpm install && pnpm build"}};oZ=[{id:"orval",label:"Orval",category:"frontend",description:"OpenAPI \u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u30B3\u30FC\u30C9\u81EA\u52D5\u751F\u6210",url:"https://github.com/orval-labs/orval",npmPackage:"orval",configFiles:["orval.config.ts","orval.config.js","orval.config.cjs"]},{id:"tanstack-query",label:"TanStack Query",category:"frontend",description:"\u975E\u540C\u671F\u30C7\u30FC\u30BF\u30D5\u30A7\u30C3\u30C1\u30F3\u30B0/\u30AD\u30E3\u30C3\u30B7\u30E5\u7BA1\u7406",url:"https://github.com/TanStack/query",npmPackage:"@tanstack/react-query"},{id:"vite",label:"Vite",category:"frontend",description:"\u9AD8\u901F\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9\u30D3\u30EB\u30C9\u30C4\u30FC\u30EB",url:"https://vitejs.dev/",npmPackage:"vite",configFiles:["vite.config.ts","vite.config.js","vite.config.mts"]},{id:"biome",label:"Biome",category:"devtool",description:"\u9AD8\u901F Linter / Formatter\uFF08Rust\u88FD\uFF09",url:"https://biomejs.dev/",npmPackage:"@biomejs/biome",configFiles:["biome.json","biome.jsonc"]},{id:"storybook",label:"Storybook",category:"frontend",description:"UI\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u958B\u767A/\u30AB\u30BF\u30ED\u30B0\u30C4\u30FC\u30EB",url:"https://storybook.js.org/",npmPackage:"storybook",configFiles:[".storybook/main.ts",".storybook/main.js"]},{id:"ruff",label:"Ruff",category:"devtool",description:"\u8D85\u9AD8\u901F Python Linter / Formatter\uFF08Rust\u88FD\uFF09",url:"https://docs.astral.sh/ruff/",pyPackage:"ruff",configFiles:["ruff.toml",".ruff.toml"]},{id:"uv",label:"uv",category:"devtool",description:"\u9AD8\u901F Python \u30D1\u30C3\u30B1\u30FC\u30B8\u30DE\u30CD\u30FC\u30B8\u30E3\uFF08Rust\u88FD\uFF09",url:"https://docs.astral.sh/uv/",configFiles:["uv.lock"]},{id:"sqlmodel",label:"SQLModel",category:"backend",description:"SQLAlchemy + Pydantic \u30D9\u30FC\u30B9\u306E Python ORM",url:"https://sqlmodel.tiangolo.com/",pyPackage:"sqlmodel"},{id:"alembic",label:"Alembic",category:"backend",description:"SQLAlchemy \u30D9\u30FC\u30B9\u306E DB \u30DE\u30A4\u30B0\u30EC\u30FC\u30B7\u30E7\u30F3\u30C4\u30FC\u30EB",url:"https://alembic.sqlalchemy.org/",pyPackage:"alembic",configFiles:["alembic.ini","backend/alembic.ini"]},{id:"fastapi-users",label:"FastAPI Users",category:"backend",description:"FastAPI \u5411\u3051\u8A8D\u8A3C/\u30E6\u30FC\u30B6\u30FC\u7BA1\u7406\u30E9\u30A4\u30D6\u30E9\u30EA",url:"https://fastapi-users.github.io/fastapi-users/",pyPackage:"fastapi-users"},{id:"pytest",label:"Pytest",category:"testing",description:"Python \u30C6\u30B9\u30C8\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF",url:"https://docs.pytest.org/",pyPackage:"pytest",configFiles:["pytest.ini","pyproject.toml"]},{id:"httpx",label:"HTTPX",category:"testing",description:"Python \u975E\u540C\u671F HTTP \u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\uFF08\u30C6\u30B9\u30C8\u7528\uFF09",url:"https://www.python-httpx.org/",pyPackage:"httpx"},{id:"playwright",label:"Playwright",category:"testing",description:"\u30AF\u30ED\u30B9\u30D6\u30E9\u30A6\u30B6 E2E \u30C6\u30B9\u30C8\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF",url:"https://playwright.dev/",npmPackage:"@playwright/test",pyPackage:"playwright",configFiles:["playwright.config.ts","playwright.config.js"]},{id:"docker-compose",label:"Docker Compose",category:"infra",description:"\u30DE\u30EB\u30C1\u30B3\u30F3\u30C6\u30CA\u30AA\u30FC\u30B1\u30B9\u30C8\u30EC\u30FC\u30B7\u30E7\u30F3",url:"https://docs.docker.com/compose/",configFiles:["docker-compose.yml","docker-compose.yaml","compose.yml","compose.yaml"]},{id:"caddy",label:"Caddy",category:"infra",description:"\u81EA\u52D5 HTTPS \u5BFE\u5FDC\u30EA\u30D0\u30FC\u30B9\u30D7\u30ED\u30AD\u30B7",url:"https://caddyserver.com/",configFiles:["Caddyfile"],dockerPattern:"caddy"},{id:"traefik",label:"Traefik",category:"infra",description:"\u30AF\u30E9\u30A6\u30C9\u30CD\u30A4\u30C6\u30A3\u30D6 \u30EA\u30D0\u30FC\u30B9\u30D7\u30ED\u30AD\u30B7 / \u30ED\u30FC\u30C9\u30D0\u30E9\u30F3\u30B5",url:"https://traefik.io/",configFiles:["traefik.yml","traefik.toml"],dockerPattern:"traefik"},{id:"flutter",label:"Flutter",category:"frontend",description:"\u30AF\u30ED\u30B9\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0 UI \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF\uFF08Dart\uFF09",url:"https://flutter.dev/",configFiles:["pubspec.yaml"]},{id:"cocoapods",label:"CocoaPods",category:"devtool",description:"iOS / macOS \u4F9D\u5B58\u7BA1\u7406\u30C4\u30FC\u30EB",url:"https://cocoapods.org/",configFiles:["Podfile","ios/Podfile"]},{id:"gradle",label:"Gradle",category:"devtool",description:"Android / JVM \u30D3\u30EB\u30C9\u30C4\u30FC\u30EB",url:"https://gradle.org/",configFiles:["build.gradle.kts","build.gradle","android/build.gradle.kts","android/build.gradle"]},{id:"swiftpm",label:"Swift Package Manager",category:"devtool",description:"Swift \u30D1\u30C3\u30B1\u30FC\u30B8\u7BA1\u7406\u30FB\u30D3\u30EB\u30C9\u30C4\u30FC\u30EB",url:"https://www.swift.org/package-manager/",configFiles:["Package.swift"]},{id:"sentry",label:"Sentry",category:"monitoring",description:"\u30A8\u30E9\u30FC\u8FFD\u8DE1 / \u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u76E3\u8996",url:"https://sentry.io/",npmPackage:"@sentry/react",pyPackage:"sentry-sdk",configFiles:["sentry.properties"]}]});function lZ(e,t){let r=t??process.env.GODD_PROJECT_ROOT??process.cwd();if(e.projectContext?.root===r)return e.projectContext;let n=M2(r);return e.projectContext=n,n}function M(e,t,r,n,o){let i=lZ(e,n),s=e.config.language??"en",a=k2(t,e.profile,{project:i,language:s,...o});return`${s!=="en"?`> **Output Language**: Respond entirely in ${s}.
|
|
97
|
+
|
|
98
|
+
`:""}${a}
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
${r}`}var de=v(()=>{"use strict";ku();L2()});function Z2(e,t){let r=[`## \u4F9D\u983C
|
|
103
|
+
${t.task??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.completion_criteria&&r.push(`## \u5B8C\u4E86\u6761\u4EF6
|
|
104
|
+
${t.completion_criteria}`),t.slug&&r.push(`## Slug
|
|
105
|
+
${t.slug}`),t.constraints&&r.push(`## \u5236\u7D04
|
|
106
|
+
${t.constraints}`),t.context&&r.push(`## \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8
|
|
107
|
+
${t.context}`),M(e,"dev",r.join(`
|
|
108
|
+
|
|
109
|
+
`),t.project_root)}var Zg,qg,wu,q2=v(()=>{"use strict";le();de();Zg="godd_dev",qg="\u958B\u767A\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u652F\u63F4\u3002\u81EA\u7136\u8A00\u8A9E\u306E\u4F9D\u983C\u304B\u3089\u3001Spec\u78BA\u8A8D\u30FB\u5F71\u97FF\u8ABF\u67FB\u30FB\u5B9F\u88C5\u30FB\u54C1\u8CEA\u30B2\u30FC\u30C8\u30FBPR\u672C\u6587\u751F\u6210\u307E\u3067\u3092\u4E00\u8CAB\u3057\u3066\u884C\u3044\u307E\u3059\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u30D6\u30E9\u30F3\u30C1\u4E0A\u3067\u547C\u3073\u51FA\u3055\u308C\u305F\u5834\u5408\u306F feat/<slug>-<YYYYMMDD> \u30D6\u30E9\u30F3\u30C1\u3092\u81EA\u52D5\u4F5C\u6210\u3057\u3001\u5B8C\u4E86\u5F8C\u306F\u5909\u66F4\u3092\u8CAC\u52D9\u5225\u306B\u5206\u5272\u30B3\u30DF\u30C3\u30C8\u3057\u307E\u3059\u3002",wu=g.object({task:g.string().optional().describe("\u5B9F\u88C5\u3057\u305F\u3044\u5185\u5BB9\uFF08\u81EA\u7136\u8A00\u8A9E\u3067\u8A18\u8FF0\uFF09"),context:g.string().optional().describe("\u95A2\u9023\u3059\u308B\u30B3\u30FC\u30C9\u3084\u4ED5\u69D8\u306E\u60C5\u5831\uFF08\u4EFB\u610F\uFF09"),completion_criteria:g.string().optional().describe("\u5B8C\u4E86\u6761\u4EF6\uFF08\u6E2C\u5B9A\u53EF\u80FD\u306B\uFF09"),slug:g.string().optional().describe("\u30C1\u30B1\u30C3\u30C8/\u77ED\u3044\u8B58\u5225\u5B50"),constraints:g.string().optional().describe("\u5236\u7D04\u4E8B\u9805"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function F2(e,t){let r=[`## \u30C1\u30A7\u30C3\u30AF\u5BFE\u8C61
|
|
110
|
+
${t.target??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.check_type&&r.push(`## \u30C1\u30A7\u30C3\u30AF\u7A2E\u5225
|
|
111
|
+
${t.check_type}`),M(e,"check",r.join(`
|
|
112
|
+
|
|
113
|
+
`),t.project_root)}var Fg,Ug,Su,U2=v(()=>{"use strict";le();de();Fg="godd_check",Ug="\u54C1\u8CEA\u30C1\u30A7\u30C3\u30AF\u3002\u5BFE\u8C61\u3092\u53D7\u3051\u53D6\u308A\u3001Spec\u6574\u5408\u30FB\u5F71\u97FF\u7BC4\u56F2\u30FB\u30C6\u30B9\u30C8\u8A08\u753B\u30FB\u4E92\u63DB\u6027\u30FB\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u306E\u89B3\u70B9\u304B\u3089\u63D0\u51FA\u524D\u30C1\u30A7\u30C3\u30AF\u3092\u884C\u3044\u307E\u3059\u3002",Su=g.object({target:g.string().optional().describe("\u30C1\u30A7\u30C3\u30AF\u5BFE\u8C61\uFF08\u5909\u66F4\u5185\u5BB9\u306E\u8AAC\u660E\u3001\u5DEE\u5206\u3001\u30D5\u30A1\u30A4\u30EB\u30EA\u30B9\u30C8\u7B49\uFF09"),check_type:g.string().optional().describe("\u30C1\u30A7\u30C3\u30AF\u7A2E\u5225\uFF08\u4F8B: pre-submit, spec, security, full\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function B2(e,t){let r=[];return t.context&&r.push(`## \u80CC\u666F
|
|
114
|
+
${t.context}`),t.review_scope&&r.push(`## \u30EC\u30D3\u30E5\u30FC\u7BC4\u56F2
|
|
115
|
+
${t.review_scope}`),t.severity_threshold&&r.push(`## \u6700\u4F4E\u91CD\u5927\u5EA6\u30D5\u30A3\u30EB\u30BF
|
|
116
|
+
${t.severity_threshold} \u4EE5\u4E0A\u306E\u307F\u51FA\u529B`),t.focus_areas&&r.push(`## \u91CD\u70B9\u30EC\u30D3\u30E5\u30FC\u9818\u57DF
|
|
117
|
+
${t.focus_areas}`),t.file_path&&r.push(`## \u30D5\u30A1\u30A4\u30EB: ${t.file_path}`),t.code&&r.push(`## \u30B3\u30FC\u30C9
|
|
118
|
+
\`\`\`
|
|
119
|
+
${t.code}
|
|
120
|
+
\`\`\``),M(e,"review",r.join(`
|
|
121
|
+
|
|
122
|
+
`),t.project_root)}var Bg,Vg,$u,V2=v(()=>{"use strict";le();de();Bg="godd_review",Vg="CTO \u30EC\u30D9\u30EB\u306E\u30B3\u30FC\u30C9\u30EC\u30D3\u30E5\u30FC\u3002\u30B3\u30FC\u30C9\u306E\u5DEE\u5206\u3092\u53D7\u3051\u53D6\u308A\u3001\u8A2D\u8A08\u30FB\u578B\u5B89\u5168\u30FB\u30C6\u30B9\u30C8\u30FB\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30FB\u904B\u7528\u30FB\u30D3\u30B8\u30CD\u30B9\u30A4\u30F3\u30D1\u30AF\u30C8\u306E\u89B3\u70B9\u304B\u3089\u30D5\u30A3\u30FC\u30C9\u30D0\u30C3\u30AF\u3092\u63D0\u4F9B\u3057\u307E\u3059\u3002\u91CD\u5927\u5EA6\uFF08Critical/Major/Minor/Suggestion\uFF09\u4ED8\u304D\u306E\u69CB\u9020\u5316\u30EC\u30D3\u30E5\u30FC\u7D50\u679C\u3092\u51FA\u529B\u3057\u307E\u3059\u3002",$u=g.object({code:g.string().optional().describe("\u30EC\u30D3\u30E5\u30FC\u5BFE\u8C61\u306E\u30B3\u30FC\u30C9\uFF08\u5DEE\u5206\u307E\u305F\u306F\u30D5\u30A1\u30A4\u30EB\u5185\u5BB9\uFF09"),file_path:g.string().optional().describe("\u30D5\u30A1\u30A4\u30EB\u30D1\u30B9"),context:g.string().optional().describe("\u5909\u66F4\u306E\u80CC\u666F\u30FB\u76EE\u7684"),review_scope:g.enum(["file","pr","directory"]).optional().describe("\u30EC\u30D3\u30E5\u30FC\u7BC4\u56F2\uFF08file: \u5358\u4E00\u30D5\u30A1\u30A4\u30EB\u3001pr: PR \u5168\u4F53\u5DEE\u5206\u3001directory: \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\uFF09"),severity_threshold:g.enum(["critical","major","minor","suggestion"]).optional().describe("\u51FA\u529B\u3059\u308B\u6700\u4F4E\u91CD\u5927\u5EA6\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8: suggestion = \u5168\u4EF6\u51FA\u529B\uFF09"),focus_areas:g.string().optional().describe("\u91CD\u70B9\u30EC\u30D3\u30E5\u30FC\u9818\u57DF\uFF08\u30AB\u30F3\u30DE\u533A\u5207\u308A: architecture, security, performance, testing \u7B49\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function H2(e,t){let r=[`## \u5909\u66F4\u5185\u5BB9
|
|
123
|
+
${t.changes??"(git diff \u304B\u3089\u81EA\u52D5\u53D6\u5F97)"}`];return t.context&&r.push(`## \u80CC\u666F
|
|
124
|
+
${t.context}`),M(e,"commit",r.join(`
|
|
125
|
+
|
|
126
|
+
`),t.project_root,{auto_confirm:t.auto_confirm??!1})}var Hg,Gg,Tu,G2=v(()=>{"use strict";le();de();Hg="godd_commit",Gg="\u8CAC\u52D9\u5358\u4F4D\u30B3\u30DF\u30C3\u30C8\u3002\u5909\u66F4\u5185\u5BB9\u3092\u9069\u5207\u306A\u7C92\u5EA6\uFF081\u30B3\u30DF\u30C3\u30C8=1\u8CAC\u52D9\uFF09\u3067\u5206\u5272\u3057\u3001\u30EB\u30FC\u30EB\u306B\u5247\u3063\u305F\u30B3\u30DF\u30C3\u30C8\u30E1\u30C3\u30BB\u30FC\u30B8\u3068\u5171\u306B\u30B3\u30DF\u30C3\u30C8\u3092\u5B9F\u884C\u3057\u307E\u3059\u3002",Tu=g.object({changes:g.string().optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08diff \u307E\u305F\u306F\u30D5\u30A1\u30A4\u30EB\u30EA\u30B9\u30C8\uFF09"),context:g.string().optional().describe("\u5909\u66F4\u306E\u80CC\u666F\u30FB\u76EE\u7684"),auto_confirm:g.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068\u30B3\u30DF\u30C3\u30C8\u8A08\u753B\u306E\u30E6\u30FC\u30B6\u30FC\u627F\u8A8D\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u5373\u5EA7\u306B\u5B9F\u884C\u3059\u308B"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function W2(e,t){let r=[`## \u8981\u6C42
|
|
127
|
+
${t.requirements??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.spec_types?.length&&r.push(`## \u5FC5\u8981\u306ASpec\u306E\u7A2E\u985E
|
|
128
|
+
${t.spec_types.join(", ")}`),t.context&&r.push(`## \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8
|
|
129
|
+
${t.context}`),M(e,"spec",r.join(`
|
|
130
|
+
|
|
131
|
+
`),t.project_root)}var Wg,Kg,Pu,K2=v(()=>{"use strict";le();de();Wg="godd_spec",Kg="\u8981\u6C42\u2192\u4ED5\u69D8\u5909\u63DB\u3002\u8981\u6C42\u3092\u53D7\u3051\u53D6\u308A\u3001\u5B9F\u88C5\u53EF\u80FD\u306A\u7C92\u5EA6\u306ESpec\uFF08API/UI/DB/Feature/Usecase\uFF09\u306B\u5909\u63DB\u3057\u307E\u3059\u3002",Pu=g.object({requirements:g.string().optional().describe("\u8981\u6C42\u5185\u5BB9\uFF08\u81EA\u7136\u8A00\u8A9E\uFF09"),spec_types:g.array(g.enum(["api","ui","db","feature","usecase","error_codes"])).optional().describe("\u5FC5\u8981\u306ASpec\u306E\u7A2E\u985E\uFF08\u672A\u6307\u5B9A\u306A\u3089\u81EA\u52D5\u5224\u5B9A\uFF09"),context:g.string().optional().describe("\u65E2\u5B58\u306E\u4ED5\u69D8\u3084\u5236\u7D04"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function J2(e,t){let r=[`## \u5909\u66F4\u6982\u8981
|
|
132
|
+
${t.change_summary??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,`## \u5BFE\u8C61\u30E2\u30B8\u30E5\u30FC\u30EB
|
|
133
|
+
${t.target_modules??"(\u81EA\u52D5\u691C\u51FA)"}`];return t.breaking_changes!==void 0&&r.push(`## \u7834\u58CA\u7684\u5909\u66F4
|
|
134
|
+
${t.breaking_changes?"\u3042\u308A":"\u306A\u3057"}`),M(e,"impact-analysis",r.join(`
|
|
135
|
+
|
|
136
|
+
`),t.project_root)}var Jg,Yg,Cu,Y2=v(()=>{"use strict";le();de();Jg="godd_impact",Yg="\u5F71\u97FF\u5206\u6790\u3002\u5909\u66F4\u5185\u5BB9\u306E\u5F71\u97FF\u7BC4\u56F2\u3092\u6D17\u3044\u51FA\u3057\u3001\u629C\u3051\u6F0F\u308C\u3092\u9632\u304E\u307E\u3059\u3002",Cu=g.object({change_summary:g.string().optional().describe("\u5909\u66F4\u6982\u8981\uFF08\u4F55\u3092/\u306A\u305C\uFF09"),target_modules:g.string().optional().describe("\u5BFE\u8C61\u30E2\u30B8\u30E5\u30FC\u30EB"),breaking_changes:g.boolean().optional().describe("\u7834\u58CA\u7684\u5909\u66F4\u306E\u6709\u7121"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function Q2(e,t){let r=[`## \u5909\u66F4\u5185\u5BB9
|
|
137
|
+
${t.changes??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.failure_points&&r.push(`## \u5931\u6557\u30DD\u30A4\u30F3\u30C8
|
|
138
|
+
${t.failure_points}`),M(e,"test-plan",r.join(`
|
|
139
|
+
|
|
140
|
+
`),t.project_root)}var Qg,Xg,Eu,X2=v(()=>{"use strict";le();de();Qg="godd_test_plan",Xg="\u30C6\u30B9\u30C8\u8A08\u753B\u4F5C\u6210\u3002\u5909\u66F4\u5185\u5BB9\u306B\u57FA\u3065\u304D\u3001unit/integration/e2e\u306E\u5FC5\u8981\u6027\u3068\u5177\u4F53\u7684\u306A\u30C6\u30B9\u30C8\u9805\u76EE\u3092\u7B56\u5B9A\u3057\u307E\u3059\u3002",Eu=g.object({changes:g.string().optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08Spec/\u5B9F\u88C5\u5DEE\u5206\uFF09"),failure_points:g.string().optional().describe("\u5931\u6557\u3057\u3046\u308B\u30DD\u30A4\u30F3\u30C8\uFF08\u5883\u754C\u5024/\u7570\u5E38\u7CFB\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function e$(e,t){let r=[`## \u5909\u66F4\u5185\u5BB9
|
|
141
|
+
${t.changes??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.doc_type&&r.push(`## \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u7A2E\u5225
|
|
142
|
+
${t.doc_type}`),M(e,"auto-documentation",r.join(`
|
|
143
|
+
|
|
144
|
+
`),t.project_root)}var ey,ty,Iu,t$=v(()=>{"use strict";le();de();ey="godd_documentation",ty="\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u66F4\u65B0\u652F\u63F4\u3002\u5909\u66F4\u5185\u5BB9\u304B\u3089\u5FC5\u8981\u306A\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u66F4\u65B0\uFF08Spec/README/\u8A2D\u5B9A\u8AAC\u660E/\u6280\u8853\u30B9\u30BF\u30C3\u30AF\uFF09\u3092\u6D17\u3044\u51FA\u3057\u3001\u5DEE\u5206\u6848\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002",Iu=g.object({changes:g.string().optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08\u5BFE\u8C61\u30D5\u30A1\u30A4\u30EB/\u6319\u52D5\u5DEE\u5206\uFF09"),doc_type:g.string().optional().describe("\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u7A2E\u5225\uFF08\u4F8B: spec, readme, config, tech-stack\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function r$(e,t){let r=[`## \u80CC\u666F
|
|
145
|
+
${t.background??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,`## \u5909\u66F4\u5185\u5BB9
|
|
146
|
+
${t.changes??"(git diff \u304B\u3089\u81EA\u52D5\u53D6\u5F97)"}`];return t.scope&&r.push(`## \u5F71\u97FF\u7BC4\u56F2
|
|
147
|
+
${t.scope}`),t.breaking_changes&&r.push(`## \u4E92\u63DB\u6027/\u79FB\u884C
|
|
148
|
+
${t.breaking_changes}`),t.verification&&r.push(`## \u52D5\u4F5C\u78BA\u8A8D
|
|
149
|
+
${t.verification}`),M(e,"pr-analyze",r.join(`
|
|
150
|
+
|
|
151
|
+
`),t.project_root)}var ry,ny,zu,n$=v(()=>{"use strict";le();de();ry="godd_pr_analyze",ny="PR\u5206\u6790\u3002PR\u306E\u5DEE\u5206\u3092\u8AAD\u307F\u3001\u30EC\u30D3\u30E5\u30FC\u89B3\u70B9\u30FB\u30EA\u30B9\u30AF\u30FB\u8FFD\u52A0\u3067\u5FC5\u8981\u306A\u60C5\u5831\u3092\u6574\u7406\u3057\u307E\u3059\u3002",zu=g.object({background:g.string().optional().describe("\u5909\u66F4\u306E\u80CC\u666F/\u76EE\u7684"),changes:g.string().optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08\u30D5\u30A1\u30A4\u30EB/\u6A5F\u80FD\u5358\u4F4D\uFF09"),scope:g.string().optional().describe("\u5F71\u97FF\u7BC4\u56F2"),breaking_changes:g.string().optional().describe("\u4E92\u63DB\u6027/\u79FB\u884C\u306E\u6709\u7121"),verification:g.string().optional().describe("\u52D5\u4F5C\u78BA\u8A8D\uFF08\u30B3\u30DE\u30F3\u30C9/\u624B\u52D5\u624B\u9806\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function o$(e,t){if(t.mode==="generate-config"){let n=["## GoDD MCP Config \u81EA\u52D5\u751F\u6210\u30E2\u30FC\u30C9","","\u4EE5\u4E0B\u306E\u60C5\u5831\u3092\u3082\u3068\u306B `config.yaml` \u3068 `.cursor/mcp.json` \u3092\u751F\u6210\u3057\u3066\u304F\u3060\u3055\u3044\u3002",""];if(t.components&&t.components.length>0){n.push("### \u9078\u629E\u3055\u308C\u305F\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8"),n.push("```yaml"),n.push("components:");for(let o of t.components)n.push(` - ${o}`);n.push("```")}else n.push("### \u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u672A\u6307\u5B9A"),n.push("\u30E6\u30FC\u30B6\u30FC\u306B\u4F7F\u7528\u3059\u308B\u6280\u8853\u30B9\u30BF\u30C3\u30AF\u3092\u8CEA\u554F\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),n.push(`
|
|
152
|
+
**\u5229\u7528\u53EF\u80FD\u306A\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8**: ${pZ}`);t.license_key?n.push(`
|
|
153
|
+
### \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC: \`${t.license_key}\``):n.push(`
|
|
154
|
+
### \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u304C\u672A\u6307\u5B9A\u3067\u3059\u3002\u30E6\u30FC\u30B6\u30FC\u306B\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002`),n.push(`
|
|
155
|
+
### \u8A00\u8A9E: ${t.language??"ja"}`),n.push(`
|
|
156
|
+
### \u751F\u6210\u3059\u308B\u30D5\u30A1\u30A4\u30EB`),n.push("1. **config.yaml** \u2014 \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u306B\u914D\u7F6E"),n.push("```yaml"),n.push(`license_key: "${t.license_key??"YOUR_LICENSE_KEY"}"`),n.push("components:");for(let o of t.components??["fastapi","react","postgresql"])n.push(` - ${o}`);return n.push(`language: "${t.language??"ja"}"`),n.push("```"),n.push(""),n.push("2. **`.cursor/mcp.json`** \u2014 Cursor IDE \u7528 MCP \u767B\u9332"),n.push("```json"),n.push(JSON.stringify({mcpServers:{godd:{command:"node",args:["path/to/godd-mcp-server/dist/index.js"],env:{GODD_CONFIG:"./config.yaml"}}}},null,2)),n.push("```"),n.join(`
|
|
157
|
+
`)}let r=[`## \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u30E2\u30FC\u30C9: ${t.mode??"full"}`];return t.license_key&&r.push(`## \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC
|
|
158
|
+
\`${t.license_key}\``),t.stack_profile&&r.push(`## \u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB
|
|
159
|
+
${t.stack_profile}`),t.components&&t.components.length>0&&r.push(`## \u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8
|
|
160
|
+
${t.components.join(", ")}`),t.environment&&r.push(`## \u74B0\u5883\u60C5\u5831
|
|
161
|
+
${t.environment}`),t.issues&&r.push(`## \u554F\u984C
|
|
162
|
+
${t.issues}`),M(e,"setup",r.join(`
|
|
163
|
+
|
|
164
|
+
`),t.project_root)}var oy,iy,Ru,pZ,i$=v(()=>{"use strict";le();de();oy="godd_setup",iy="\u74B0\u5883\u69CB\u7BC9\u652F\u63F4\u3002GoDD MCP \u306E config.yaml / .cursor/mcp.json \u751F\u6210\u3001\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E .env \u4F5C\u6210\u3001\u4F9D\u5B58\u5C0E\u5165\u3001Docker \u8D77\u52D5\u307E\u3067\u4E00\u62EC\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3057\u307E\u3059\u3002components \u3092\u6307\u5B9A\u3059\u308B\u3068 config.yaml \u3092\u81EA\u52D5\u751F\u6210\u3067\u304D\u307E\u3059\u3002",Ru=g.object({mode:g.enum(["full","godd-only","project-only","generate-config"]).optional().default("full").describe("\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u7BC4\u56F2: full=GoDD+\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5168\u4F53, godd-only=GoDD MCP \u8A2D\u5B9A\u306E\u307F, project-only=\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u74B0\u5883\u306E\u307F, generate-config=config.yaml \u81EA\u52D5\u751F\u6210"),environment:g.string().optional().describe("\u74B0\u5883\u60C5\u5831\uFF08OS\u3001\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u6E08\u307F\u30C4\u30FC\u30EB\u7B49\uFF09"),license_key:g.string().optional().describe("GoDD \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\uFF08config.yaml \u306B\u66F8\u304D\u8FBC\u3080\uFF09"),stack_profile:g.string().optional().describe("\u30B9\u30BF\u30C3\u30AF\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u540D\uFF08\u4F8B: fastapi-react\uFF09"),components:g.array(g.string()).optional().describe('\u6280\u8853\u30B9\u30BF\u30C3\u30AF\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u540D\u306E\u914D\u5217\uFF08\u4F8B: ["fastapi", "react", "postgresql"]\uFF09\u3002generate-config \u30E2\u30FC\u30C9\u3067\u4F7F\u7528\u3002'),language:g.string().optional().describe("\u30DE\u30A4\u30F3\u30C9\u30BB\u30C3\u30C8\u8A00\u8A9E\uFF08\u4F8B: ja, en\uFF09"),issues:g.string().optional().describe("\u56F0\u3063\u3066\u3044\u308B\u3053\u3068\uFF08\u30A8\u30E9\u30FC\u30E1\u30C3\u30BB\u30FC\u30B8\u7B49\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")}),pZ=["python, typescript, javascript, go, php, ruby, c, html, css","react, nextjs, vue, angular, svelte, vite, tailwind, sass, electron","fastapi, django, flask, express, fastify, nestjs, gin, echo, fiber, laravel, symfony, wordpress, rails, sinatra, koa","node, agent-stdio","postgresql, mysql, mongodb, redis","sqlalchemy, celery","docker, terraform","ddd-clean-architecture"].join(", ")});function s$(e,t){let r=[`## \u5909\u66F4\u70B9
|
|
165
|
+
${t.changes??"(git log \u304B\u3089\u81EA\u52D5\u53D6\u5F97)"}`];return t.compatibility&&r.push(`## \u4E92\u63DB\u6027/\u79FB\u884C
|
|
166
|
+
${t.compatibility}`),t.known_issues&&r.push(`## \u65E2\u77E5\u306E\u554F\u984C
|
|
167
|
+
${t.known_issues}`),M(e,"release-notes",r.join(`
|
|
168
|
+
|
|
169
|
+
`),t.project_root)}var sy,ay,Au,a$=v(()=>{"use strict";le();de();sy="godd_release_notes",ay="\u30EA\u30EA\u30FC\u30B9\u30CE\u30FC\u30C8\u4F5C\u6210\u3002\u5909\u66F4\u70B9\u30FB\u4E92\u63DB\u6027\u30FB\u65E2\u77E5\u306E\u554F\u984C\u3092\u307E\u3068\u3081\u305F\u30EA\u30EA\u30FC\u30B9\u30CE\u30FC\u30C8\u3092\u751F\u6210\u3057\u307E\u3059\u3002",Au=g.object({changes:g.string().optional().describe("\u5909\u66F4\u70B9\uFF08\u8FFD\u52A0/\u5909\u66F4/\u4FEE\u6B63\uFF09"),compatibility:g.string().optional().describe("\u4E92\u63DB\u6027/\u79FB\u884C\u306E\u6709\u7121"),known_issues:g.string().optional().describe("\u65E2\u77E5\u306E\u554F\u984C"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function c$(e,t){let r=[`## Decision
|
|
170
|
+
${t.decision??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,`## Context
|
|
171
|
+
${t.context??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.options&&r.push(`## Options
|
|
172
|
+
${t.options}`),M(e,"adr",r.join(`
|
|
173
|
+
|
|
174
|
+
`),t.project_root)}var cy,uy,Ou,u$=v(()=>{"use strict";le();de();cy="godd_adr",uy="ADR\uFF08Architecture Decision Record\uFF09\u4F5C\u6210\u3002\u8A2D\u8A08\u5224\u65AD\u3092\u30C8\u30EC\u30FC\u30C9\u30AA\u30D5\u30FB\u30ED\u30FC\u30EB\u30D0\u30C3\u30AF\u542B\u3081\u3066\u8A18\u9332\u3057\u307E\u3059\u3002",Ou=g.object({decision:g.string().optional().describe("\u4F55\u3092\u6C7A\u3081\u308B\u304B\uFF08Decision\uFF09"),context:g.string().optional().describe("\u80CC\u666F\uFF08Context\uFF09"),options:g.string().optional().describe("\u4EE3\u66FF\u6848\uFF08Options\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function l$(e,t){return M(e,"sync","",t.project_root)}var ly,py,Nu,p$=v(()=>{"use strict";le();de();ly="godd_sync",py="\u30C7\u30D5\u30A9\u30EB\u30C8\u30D6\u30E9\u30F3\u30C1\u540C\u671F\u3002\u73FE\u5728\u306E\u4F5C\u696D\u30D6\u30E9\u30F3\u30C1\u306B main \u306E\u6700\u65B0\u5909\u66F4\u3092\u53D6\u308A\u8FBC\u307F\u3001\u30DE\u30FC\u30B8\u30B3\u30F3\u30D5\u30EA\u30AF\u30C8\u304C\u767A\u751F\u3057\u305F\u5834\u5408\u306F SSOT \u6E96\u62E0\u5074\u3092\u512A\u5148\u3057\u3066\u89E3\u6D88\u3057\u307E\u3059\u3002",Nu=g.object({project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function d$(e,t){let r=[`## \u30D6\u30E9\u30F3\u30C1\u540D
|
|
175
|
+
${t.branch_name??"(\u30BF\u30B9\u30AF\u5185\u5BB9\u304B\u3089\u81EA\u52D5\u751F\u6210)"}`];return t.base_branch&&r.push(`## \u8D77\u70B9\u30D6\u30E9\u30F3\u30C1
|
|
176
|
+
${t.base_branch}`),M(e,"new-branch",r.join(`
|
|
177
|
+
|
|
178
|
+
`),t.project_root)}var dy,fy,ju,f$=v(()=>{"use strict";le();de();dy="godd_new_branch",fy="\u65B0\u30D6\u30E9\u30F3\u30C1\u4F5C\u6210\u3002\u4F5C\u696D\u4E2D\u306E\u5909\u66F4\u3092\u5B89\u5168\u306B\u9000\u907F\u3057\u3001\u6700\u65B0\u306E main \u304B\u3089\u65B0\u3057\u3044\u30D6\u30E9\u30F3\u30C1\u3092\u4F5C\u6210\u3057\u3066\u9000\u907F\u3057\u305F\u5909\u66F4\u3092\u5FA9\u5143\u3057\u307E\u3059\u3002",ju=g.object({branch_name:g.string().optional().describe("\u4F5C\u6210\u3059\u308B\u30D6\u30E9\u30F3\u30C1\u540D\uFF08\u4F8B: feat/add-auth\uFF09"),base_branch:g.string().optional().describe("\u8D77\u70B9\u30D6\u30E9\u30F3\u30C1\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8: origin/main\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function h$(e,t){let r=[`## \u30D6\u30E9\u30F3\u30C1\u540D
|
|
179
|
+
${t.branch_name??"(\u30BF\u30B9\u30AF\u5185\u5BB9\u304B\u3089\u81EA\u52D5\u751F\u6210)"}`];return t.purpose&&r.push(`## \u76EE\u7684
|
|
180
|
+
${t.purpose}`),M(e,"git-workflow",r.join(`
|
|
181
|
+
|
|
182
|
+
`),t.project_root,{auto_confirm:t.auto_confirm??!1})}var hy,my,Du,m$=v(()=>{"use strict";le();de();hy="godd_git_workflow",my="Git \u4E00\u9023\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3002\u30C7\u30D5\u30A9\u30EB\u30C8\u30D6\u30E9\u30F3\u30C1\u540C\u671F \u2192 \u65B0\u30D6\u30E9\u30F3\u30C1\u4F5C\u6210 \u2192 \u9069\u5207\u306A\u7C92\u5EA6\u3067\u30B3\u30DF\u30C3\u30C8\u3092\u4E00\u62EC\u5B9F\u884C\u3057\u307E\u3059\u3002",Du=g.object({branch_name:g.string().optional().describe("\u4F5C\u6210\u3059\u308B\u30D6\u30E9\u30F3\u30C1\u540D\uFF08\u4F8B: feat/add-auth\uFF09"),purpose:g.string().optional().describe("\u30D6\u30E9\u30F3\u30C1\u306E\u76EE\u7684\uFF08\u30B3\u30DF\u30C3\u30C8\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u7CBE\u5EA6\u5411\u4E0A\u306B\u4F7F\u7528\uFF09"),auto_confirm:g.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068\u5168 Phase \u306E\u30E6\u30FC\u30B6\u30FC\u78BA\u8A8D\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u4E00\u6C17\u901A\u8CAB\u3067\u5B9F\u884C\u3059\u308B"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function g$(e,t){return M(e,"push","",t.project_root)}var gy,yy,Mu,y$=v(()=>{"use strict";le();de();gy="godd_push",yy="\u63D0\u51FA\u524D\u30C1\u30A7\u30C3\u30AF\u3002push/PR\u63D0\u51FA\u524D\u306B\u5FC5\u8981\u306A\u78BA\u8A8D\u4E8B\u9805\uFF08\u54C1\u8CEA\u30B2\u30FC\u30C8\u30FBSpec\u6574\u5408\u30FB\u6A5F\u5BC6\u60C5\u5831\u30C1\u30A7\u30C3\u30AF\u7B49\uFF09\u3092\u6F0F\u308C\u306A\u304F\u6574\u7406\u3057\u307E\u3059\u3002",Mu=g.object({project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function _$(e,t){return M(e,"push-execute","",t.project_root,{auto_confirm:t.auto_confirm??!1})}var _y,vy,Lu,v$=v(()=>{"use strict";le();de();_y="godd_push_execute",vy="\u30EA\u30E2\u30FC\u30C8\u30D7\u30C3\u30B7\u30E5\u5B9F\u884C\u3002\u63D0\u51FA\u524D\u30C1\u30A7\u30C3\u30AF\uFF08\u54C1\u8CEA\u30B2\u30FC\u30C8\u30FBSpec\u6574\u5408\u30FB\u6A5F\u5BC6\u60C5\u5831\u30C1\u30A7\u30C3\u30AF\uFF09\u3092\u884C\u3044\u3001\u901A\u904E\u5F8C\u306B git push \u3092\u5B9F\u884C\u3057\u307E\u3059\u3002",Lu=g.object({auto_confirm:g.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068\u63D0\u51FA\u524D\u30C1\u30A7\u30C3\u30AF\u901A\u904E\u5F8C\u306E\u30E6\u30FC\u30B6\u30FC\u78BA\u8A8D\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u5373\u5EA7\u306B push \u3059\u308B"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function b$(e,t){let r=[];return t.title&&r.push(`## PR\u30BF\u30A4\u30C8\u30EB
|
|
183
|
+
${t.title}`),t.base_branch&&r.push(`## \u30DE\u30FC\u30B8\u5148\u30D6\u30E9\u30F3\u30C1
|
|
184
|
+
${t.base_branch}`),t.context&&r.push(`## \u80CC\u666F
|
|
185
|
+
${t.context}`),M(e,"pr-create",r.join(`
|
|
186
|
+
|
|
187
|
+
`),t.project_root,{auto_confirm:t.auto_confirm??!1,draft:t.draft??!1})}var by,xy,Zu,x$=v(()=>{"use strict";le();de();by="godd_pr_create",xy="PR\u4F5C\u6210\u3002\u5909\u66F4\u5185\u5BB9\u3092\u5206\u6790\u3057\u3001PR\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306B\u6E96\u62E0\u3057\u305F\u672C\u6587\u3092\u751F\u6210\u3057\u3066GitHub\u4E0A\u306BPR\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002",Zu=g.object({title:g.string().optional().describe("PR\u30BF\u30A4\u30C8\u30EB\uFF08\u672A\u6307\u5B9A\u306E\u5834\u5408\u306F\u30D6\u30E9\u30F3\u30C1\u540D\u30FB\u5909\u66F4\u5185\u5BB9\u304B\u3089\u81EA\u52D5\u751F\u6210\uFF09"),base_branch:g.string().optional().describe("\u30DE\u30FC\u30B8\u5148\u30D6\u30E9\u30F3\u30C1\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8: main\uFF09"),context:g.string().optional().describe("\u5909\u66F4\u306E\u80CC\u666F\u30FB\u76EE\u7684\uFF08PR\u672C\u6587\u306E\u7CBE\u5EA6\u5411\u4E0A\u306B\u4F7F\u7528\uFF09"),draft:g.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068 Draft PR \u3068\u3057\u3066\u4F5C\u6210\u3059\u308B"),auto_confirm:g.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068PR\u672C\u6587\u306E\u30E6\u30FC\u30B6\u30FC\u78BA\u8A8D\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u5373\u5EA7\u306B\u4F5C\u6210\u3059\u308B"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function k$(e,t){let r=[];return t.title&&r.push(`## PR\u30BF\u30A4\u30C8\u30EB
|
|
188
|
+
${t.title}`),t.base_branch&&r.push(`## \u30DE\u30FC\u30B8\u5148\u30D6\u30E9\u30F3\u30C1
|
|
189
|
+
${t.base_branch}`),t.context&&r.push(`## \u80CC\u666F
|
|
190
|
+
${t.context}`),M(e,"submit",r.join(`
|
|
191
|
+
|
|
192
|
+
`),t.project_root,{auto_confirm:t.auto_confirm??!1,draft:t.draft??!1})}var ky,wy,qu,w$=v(()=>{"use strict";le();de();ky="godd_submit",wy="\u63D0\u51FA\u4E00\u62EC\u5B9F\u884C\u3002\u63D0\u51FA\u524D\u30C1\u30A7\u30C3\u30AF \u2192 git push \u2192 PR\u4F5C\u6210\u3092\u4E00\u9023\u306E\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3068\u3057\u3066\u5B9F\u884C\u3057\u307E\u3059\u3002",qu=g.object({title:g.string().optional().describe("PR\u30BF\u30A4\u30C8\u30EB\uFF08\u672A\u6307\u5B9A\u306E\u5834\u5408\u306F\u30D6\u30E9\u30F3\u30C1\u540D\u30FB\u5909\u66F4\u5185\u5BB9\u304B\u3089\u81EA\u52D5\u751F\u6210\uFF09"),base_branch:g.string().optional().describe("\u30DE\u30FC\u30B8\u5148\u30D6\u30E9\u30F3\u30C1\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8: main\uFF09"),context:g.string().optional().describe("\u5909\u66F4\u306E\u80CC\u666F\u30FB\u76EE\u7684\uFF08PR\u672C\u6587\u306E\u7CBE\u5EA6\u5411\u4E0A\u306B\u4F7F\u7528\uFF09"),draft:g.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068 Draft PR \u3068\u3057\u3066\u4F5C\u6210\u3059\u308B"),auto_confirm:g.boolean().optional().default(!1).describe("true \u306B\u3059\u308B\u3068\u5168\u30B9\u30C6\u30C3\u30D7\u306E\u30E6\u30FC\u30B6\u30FC\u78BA\u8A8D\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u4E00\u6C17\u901A\u8CAB\u3067\u5B9F\u884C\u3059\u308B"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function S$(e,t){return M(e,"agent-dev-workflow","",t.project_root)}var Sy,$y,Fu,$$=v(()=>{"use strict";le();de();Sy="godd_dev_workflow",$y="\u958B\u767A\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u5168\u4F53\u7BA1\u7406\u3002\u30BF\u30FC\u30DF\u30CA\u30EB\u4E0D\u8981\u3067\u74B0\u5883\u69CB\u7BC9\u2192\u5B9F\u88C5\u2192\u30C6\u30B9\u30C8\u2192\u30B3\u30DF\u30C3\u30C8\u2192push\u2192PR\u4F5C\u6210\u307E\u3067\u4E00\u8CAB\u3057\u3066\u5B9F\u884C\u3057\u307E\u3059\u3002",Fu=g.object({project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function T$(e,t){let r=[`## \u5831\u544A\u5BFE\u8C61
|
|
193
|
+
${t.target??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.report_type&&r.push(`## \u5831\u544A\u30BF\u30A4\u30D7
|
|
194
|
+
${t.report_type}`),M(e,"analyze-report",r.join(`
|
|
195
|
+
|
|
196
|
+
`),t.project_root)}var Ty,Py,Uu,P$=v(()=>{"use strict";le();de();Ty="godd_report",Py="\u5B8C\u4E86\u5831\u544A\u751F\u6210\u3002\u30BF\u30B9\u30AF\u5B8C\u4E86\u6642\u306E\u5909\u66F4\u6982\u8981\u30FB\u5F71\u97FF\u7BC4\u56F2\u30FB\u691C\u8A3C\u7D50\u679C\u30FB\u6B8B\u30EA\u30B9\u30AF\u3092\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306B\u6CBF\u3063\u3066\u6574\u7406\u3057\u307E\u3059\u3002",Uu=g.object({target:g.string().optional().describe("\u5831\u544A\u5BFE\u8C61\uFF08\u5909\u66F4\u5185\u5BB9\u306E\u6982\u8981\u307E\u305F\u306F\u30BF\u30B9\u30AF\u540D\uFF09"),report_type:g.string().optional().describe("\u5831\u544A\u30BF\u30A4\u30D7\uFF08\u4F8B: task-completion, incident, investigation\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function C$(e,t){return M(e,"requirements-to-business-flow",`## \u8981\u6C42
|
|
197
|
+
${t.requirements??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,t.project_root)}var Cy,Ey,Bu,E$=v(()=>{"use strict";le();de();Cy="godd_req_to_flow",Ey="\u8981\u6C42\u2192\u30D3\u30B8\u30CD\u30B9\u30D5\u30ED\u30FC\u5909\u63DB\u3002\u81EA\u7136\u8A00\u8A9E\u306E\u8981\u6C42\u304B\u3089As-Is/To-Be\u30D5\u30ED\u30FC\u3068\u30E6\u30FC\u30B9\u30B1\u30FC\u30B9\u3092\u751F\u6210\u3057\u307E\u3059\u3002",Bu=g.object({requirements:g.string().optional().describe("\u8981\u6C42\u5185\u5BB9\uFF08\u81EA\u7136\u8A00\u8A9E\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function I$(e,t){return M(e,"requirements-to-tickets",`## \u8981\u6C42
|
|
198
|
+
${t.requirements??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,t.project_root)}var Iy,zy,Vu,z$=v(()=>{"use strict";le();de();Iy="godd_req_to_tickets",zy="\u8981\u6C42\u2192\u30C1\u30B1\u30C3\u30C8\u5206\u89E3\u3002\u8981\u6C42\u3092\u5B9F\u88C5\u30BF\u30B9\u30AF\uFF08\u30C1\u30B1\u30C3\u30C8\uFF09\u306B\u5206\u89E3\u3057\u3001\u4F9D\u5B58\u95A2\u4FC2\u3068\u691C\u8A3C\u65B9\u6CD5\u3092\u542B\u3081\u3066\u4E00\u89A7\u5316\u3057\u307E\u3059\u3002",Vu=g.object({requirements:g.string().optional().describe("\u8981\u6C42\u5185\u5BB9\uFF08\u81EA\u7136\u8A00\u8A9E\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function R$(e,t){return M(e,"specification-to-tickets",`## \u5BFE\u8C61Spec
|
|
199
|
+
${t.specification??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`,t.project_root)}var Ry,Ay,Hu,A$=v(()=>{"use strict";le();de();Ry="godd_spec_to_tickets",Ay="\u4ED5\u69D8\u2192\u30C1\u30B1\u30C3\u30C8\u5909\u63DB\u3002Spec\uFF08docs/009_spec/\uFF09\u304B\u3089\u5B9F\u88C5\u53EF\u80FD\u306A\u30BF\u30B9\u30AF\u30EA\u30B9\u30C8\u3092\u751F\u6210\u3057\u3001\u5F71\u97FF\u30EC\u30A4\u30E4\u30FC\u30FB\u30C6\u30B9\u30C8\u89B3\u70B9\u30FB\u30EA\u30B9\u30AF\u3092\u4ED8\u4E0E\u3057\u307E\u3059\u3002",Hu=g.object({specification:g.string().optional().describe("\u5BFE\u8C61Spec\uFF08API/UI/DB/Feature/Usecase/Error Codes\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function O$(e,t){return M(e,"install",`## \u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5BFE\u8C61
|
|
200
|
+
${t.target}`,t.project_root)}var Oy,Ny,Gu,N$=v(()=>{"use strict";le();de();Oy="godd_install",Ny="\u30C4\u30FC\u30EB/MCP\u30B5\u30FC\u30D0\u30FC\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3002\u6307\u5B9A\u3055\u308C\u305F\u30C4\u30FC\u30EB\u306E\u74B0\u5883\u306B\u9069\u3057\u305F\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u624B\u9806\u30FB\u8A2D\u5B9A\u30FB\u758E\u901A\u78BA\u8A8D\u3092\u6848\u5185\u3057\u307E\u3059\u3002",Gu=g.object({target:g.string().describe("\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5BFE\u8C61\u306E\u30C4\u30FC\u30EB/MCP\u540D\uFF08\u4F8B: context7, chrome-devtools-mcp, markitdown-mcp, mcp-ocr, serena, vibe-odf-read-mcp\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function j$(e,t){let r=[`## \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u540D
|
|
201
|
+
${t.project_name??"(\u81EA\u52D5\u691C\u51FA)"}`];return t.roles?.length&&r.push(`## \u30ED\u30FC\u30EB
|
|
202
|
+
${t.roles.map(n=>`- ${n}`).join(`
|
|
203
|
+
`)}`),t.screens?.length&&r.push(`## \u753B\u9762ID
|
|
204
|
+
${t.screens.map(n=>`- ${n}`).join(`
|
|
205
|
+
`)}`),M(e,"docs-init",r.join(`
|
|
206
|
+
|
|
207
|
+
`),t.project_root)}var jy,Dy,Wu,D$=v(()=>{"use strict";le();de();jy="godd_docs_init",Dy="\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306B docs/ \u30D5\u30A9\u30EB\u30C0\u69CB\u9020\u3092\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u304B\u3089\u751F\u6210\u3057\u307E\u3059\u3002ripla Notes \u3067\u95B2\u89A7\u30FB\u7DE8\u96C6\u53EF\u80FD\u306A MD/CSV/drawio \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u521D\u671F\u69CB\u9020\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002",Wu=g.object({project_name:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u540D"),roles:g.array(g.string()).optional().describe("\u30ED\u30FC\u30EB\u540D\u4E00\u89A7\uFF08\u4F8B: \u7BA1\u7406\u8005, \u904B\u55B6\u8005, \u5229\u7528\u8005\uFF09"),screens:g.array(g.string()).optional().describe("\u753B\u9762ID\u4E00\u89A7\uFF08\u4F8B: SC-OP-01, SC-US-01\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function M$(e,t){let r=[`## \u5909\u66F4\u5185\u5BB9
|
|
208
|
+
${t.changes??"(Chat \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304B\u3089\u5224\u65AD)"}`];return t.target_sections?.length&&r.push(`## \u66F4\u65B0\u5BFE\u8C61\u30BB\u30AF\u30B7\u30E7\u30F3
|
|
209
|
+
${t.target_sections.map(n=>`- ${n}`).join(`
|
|
210
|
+
`)}`),M(e,"docs-update",r.join(`
|
|
211
|
+
|
|
212
|
+
`),t.project_root)}var My,Ly,Ku,L$=v(()=>{"use strict";le();de();My="godd_docs_update",Ly="\u30B3\u30FC\u30C9\u5909\u66F4\u5F8C\u306B docs/ \u5185\u306E\u95A2\u9023\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\uFF08MD/CSV\uFF09\u3092\u540C\u671F\u30FB\u66F4\u65B0\u3057\u307E\u3059\u3002\u5909\u66F4\u5185\u5BB9\u304B\u3089\u5F71\u97FF\u3059\u308B\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u7279\u5B9A\u3057\u3001\u66F4\u65B0\u5DEE\u5206\u3092\u63D0\u6848\u3057\u307E\u3059\u3002",Ku=g.object({changes:g.string().optional().describe("\u5909\u66F4\u5185\u5BB9\uFF08\u30B3\u30FC\u30C9\u5909\u66F4\u306E\u6982\u8981\uFF09"),target_sections:g.array(g.string()).optional().describe("\u66F4\u65B0\u5BFE\u8C61\u30BB\u30AF\u30B7\u30E7\u30F3\uFF08\u4F8B: 001_project, 003_requirements\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function Z$(e,t){let r=[];return t.deploy_target&&r.push(`## \u30C7\u30D7\u30ED\u30A4\u5148
|
|
213
|
+
${t.deploy_target}`),t.github_repo&&r.push(`## \u5BFE\u8C61\u30EA\u30DD\u30B8\u30C8\u30EA
|
|
214
|
+
${t.github_repo}`),M(e,"notes-deploy",r.join(`
|
|
215
|
+
|
|
216
|
+
`)||"\u30C7\u30D7\u30ED\u30A4\u624B\u9806\u3092\u6848\u5185\u3057\u3066\u304F\u3060\u3055\u3044\u3002",t.project_root)}var Zy,qy,Ju,q$=v(()=>{"use strict";le();de();Zy="godd_notes_deploy",qy="notes-app (React) / notes-api (FastAPI) \u306E\u30C7\u30D7\u30ED\u30A4\u6848\u5185\u3092\u751F\u6210\u3057\u307E\u3059\u3002Docker Compose\u3001\u30AF\u30E9\u30A6\u30C9\u3001\u307E\u305F\u306F\u624B\u52D5\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u306E\u624B\u9806\u3092\u63D0\u4F9B\u3057\u307E\u3059\u3002",Ju=g.object({deploy_target:g.string().optional().describe("\u30C7\u30D7\u30ED\u30A4\u5148\uFF08docker, cloud, manual \u306E\u3044\u305A\u308C\u304B\uFF09"),github_repo:g.string().optional().describe("\u5BFE\u8C61 GitHub \u30EA\u30DD\u30B8\u30C8\u30EA\uFF08owner/repo \u5F62\u5F0F\uFF09"),project_root:g.string().optional().describe("\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30EB\u30FC\u30C8\u30D1\u30B9\uFF08\u81EA\u52D5\u691C\u51FA\u7528\uFF09")})});function U$(e){Fy=e}function F$(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");return Buffer.from(t,"base64")}function dZ(e){let t=e.split(".");if(t.length!==2)throw new tr("\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u306E\u5F62\u5F0F\u304C\u4E0D\u6B63\u3067\u3059");let[r,n]=t;if(Fy){let a=(0,Yu.createPublicKey)(Fy),c=F$(n);if(!(0,Yu.verify)(null,Buffer.from(r),a,c))throw new tr("\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u306E\u7F72\u540D\u304C\u7121\u52B9\u3067\u3059")}let o=F$(r).toString("utf-8"),i;try{i=JSON.parse(o)}catch{throw new tr("\u30E9\u30A4\u30BB\u30F3\u30B9\u30E1\u30BF\u30C7\u30FC\u30BF\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F")}if(i.v!==1)throw new tr(`\u672A\u5BFE\u5FDC\u306E\u30E9\u30A4\u30BB\u30F3\u30B9\u30D0\u30FC\u30B8\u30E7\u30F3: ${i.v}`);let s=new Date(i.exp);if(isNaN(s.getTime()))throw new tr("\u30E9\u30A4\u30BB\u30F3\u30B9\u306E\u6709\u52B9\u671F\u9650\u304C\u4E0D\u6B63\u3067\u3059");if(s<new Date)throw new tr(`\u30E9\u30A4\u30BB\u30F3\u30B9\u306E\u6709\u52B9\u671F\u9650\u304C\u5207\u308C\u3066\u3044\u307E\u3059\uFF08${i.exp}\uFF09`);return i}function B$(e,t){let r=dZ(e);if(r.stack&&r.stack!==t)throw new tr(`\u3053\u306E\u30E9\u30A4\u30BB\u30F3\u30B9\u306F\u30B9\u30BF\u30C3\u30AF '${r.stack}' \u5C02\u7528\u3067\u3059\uFF08\u8981\u6C42: '${t}'\uFF09`);return r}var Yu,Fy,tr,V$=v(()=>{"use strict";Yu=require("node:crypto"),Fy="";tr=class extends Error{constructor(t){super(t),this.name="LicenseError"}}});var G$={};Mr(G$,{startServer:()=>H$});async function fZ(e){let t=e.components??[];if(t.length===0)return null;let r=await O2(t,e.language,e.license_key);if(r&&!r.isExpired){console.error("[GoDD] \u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3092\u30AD\u30E3\u30C3\u30B7\u30E5\u304B\u3089\u30ED\u30FC\u30C9\u3057\u307E\u3057\u305F");let n=JSON.parse(r.data);return Cs(n),n}try{let n=N2(t,e.language),o=await E2(e,n);if(o===null&&r){console.error("[GoDD] \u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306F\u30AD\u30E3\u30C3\u30B7\u30E5\u3068\u540C\u4E00\u3067\u3059\uFF08304\uFF09");let i=JSON.parse(r.data);return Cs(i),i}if(o){let i=await I2(o.bundle,e.license_key);Cs(i);let s=JSON.stringify(i);return await A2(s,o.etag,t,e.language,e.license_key),console.error("[GoDD] \u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3092 Registry API \u304B\u3089\u30D5\u30A7\u30C3\u30C1\u3057\u307E\u3057\u305F"),i}}catch(n){console.error(`[GoDD] Registry API \u3078\u306E\u63A5\u7D9A\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${n instanceof Error?n.message:String(n)}`)}if(r){console.error("[GoDD] \u8B66\u544A: \u671F\u9650\u5207\u308C\u30AD\u30E3\u30C3\u30B7\u30E5\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059\uFF08Registry API \u5230\u9054\u4E0D\u80FD\uFF09");let n=JSON.parse(r.data);return Cs(n),n}return null}async function H$(){let e=ES(),t=e.components&&e.components.length>0,r;if(t){try{let u=await C2(e);u.valid||(console.error(`\u30E9\u30A4\u30BB\u30F3\u30B9\u30A8\u30E9\u30FC: ${u.error??"\u4E0D\u660E\u306A\u30A8\u30E9\u30FC"}`),process.exit(1))}catch(u){console.error(`[GoDD] Registry \u30E9\u30A4\u30BB\u30F3\u30B9\u691C\u8A3C\u5931\u6557\u3002\u30ED\u30FC\u30AB\u30EB\u691C\u8A3C\u306B\u30D5\u30A9\u30FC\u30EB\u30D0\u30C3\u30AF: ${u instanceof Error?u.message:String(u)}`)}let c=await fZ(e);if(c)r={name:`registry:${e.components.join("+")}`,stacks:e.components.map(u=>({id:u,label:u,name:u})),quality_gate:c.quality_gate?{frontend:c.quality_gate.frontend,backend:c.quality_gate.backend,preflight_command:c.quality_gate.preflight??"pnpm preflight",summary:"format/lint/typecheck/build"}:void 0,tools:c.tools?.map(u=>({id:u.id,label:u.label,category:u.category,description:u.description,guidance:u.guidance}))};else{console.error("[GoDD] Registry/\u30AD\u30E3\u30C3\u30B7\u30E5\u5229\u7528\u4E0D\u53EF\u3002\u30ED\u30FC\u30AB\u30EB\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306B\u30D5\u30A9\u30FC\u30EB\u30D0\u30C3\u30AF"),Dg((0,jr.join)(Xn,"..","templates"));let u=e.stack_profile??"fastapi-react";r=Um(u,(0,jr.join)(Xn,"..","stacks"))}}else{let c=(0,jr.join)(Xn,"..",".keys","public.pem");(0,Qu.existsSync)(c)&&U$((0,Qu.readFileSync)(c,"utf-8"));try{B$(e.license_key,e.stack_profile??"fastapi-react")}catch(p){p instanceof tr&&(console.error(`\u30E9\u30A4\u30BB\u30F3\u30B9\u30A8\u30E9\u30FC: ${p.message}`),process.exit(1))}r=Um(e.stack_profile??"fastapi-react",(0,jr.join)(Xn,"..","stacks")),await S2(e.license_key)||Dg((0,jr.join)(Xn,"..","templates"))}let n={profile:r,config:e},o=new Ic({name:"godd-mcp-server",version:"0.1.0"});o.tool(Zg,qg,wu.shape,c=>({content:[{type:"text",text:Z2(n,wu.parse(c))}]})),o.tool(Fg,Ug,Su.shape,c=>({content:[{type:"text",text:F2(n,Su.parse(c))}]})),o.tool(Bg,Vg,$u.shape,c=>({content:[{type:"text",text:B2(n,$u.parse(c))}]})),o.tool(Hg,Gg,Tu.shape,c=>({content:[{type:"text",text:H2(n,Tu.parse(c))}]})),o.tool(Wg,Kg,Pu.shape,c=>({content:[{type:"text",text:W2(n,Pu.parse(c))}]})),o.tool(Jg,Yg,Cu.shape,c=>({content:[{type:"text",text:J2(n,Cu.parse(c))}]})),o.tool(Qg,Xg,Eu.shape,c=>({content:[{type:"text",text:Q2(n,Eu.parse(c))}]})),o.tool(ey,ty,Iu.shape,c=>({content:[{type:"text",text:e$(n,Iu.parse(c))}]})),o.tool(ry,ny,zu.shape,c=>({content:[{type:"text",text:r$(n,zu.parse(c))}]})),o.tool(oy,iy,Ru.shape,c=>({content:[{type:"text",text:o$(n,Ru.parse(c))}]})),o.tool(sy,ay,Au.shape,c=>({content:[{type:"text",text:s$(n,Au.parse(c))}]})),o.tool(cy,uy,Ou.shape,c=>({content:[{type:"text",text:c$(n,Ou.parse(c))}]})),o.tool(ly,py,Nu.shape,c=>({content:[{type:"text",text:l$(n,Nu.parse(c))}]})),o.tool(dy,fy,ju.shape,c=>({content:[{type:"text",text:d$(n,ju.parse(c))}]})),o.tool(hy,my,Du.shape,c=>({content:[{type:"text",text:h$(n,Du.parse(c))}]})),o.tool(gy,yy,Mu.shape,c=>({content:[{type:"text",text:g$(n,Mu.parse(c))}]})),o.tool(_y,vy,Lu.shape,c=>({content:[{type:"text",text:_$(n,Lu.parse(c))}]})),o.tool(by,xy,Zu.shape,c=>({content:[{type:"text",text:b$(n,Zu.parse(c))}]})),o.tool(ky,wy,qu.shape,c=>({content:[{type:"text",text:k$(n,qu.parse(c))}]})),o.tool(Sy,$y,Fu.shape,c=>({content:[{type:"text",text:S$(n,Fu.parse(c))}]})),o.tool(Ty,Py,Uu.shape,c=>({content:[{type:"text",text:T$(n,Uu.parse(c))}]})),o.tool(Cy,Ey,Bu.shape,c=>({content:[{type:"text",text:C$(n,Bu.parse(c))}]})),o.tool(Iy,zy,Vu.shape,c=>({content:[{type:"text",text:I$(n,Vu.parse(c))}]})),o.tool(Ry,Ay,Hu.shape,c=>({content:[{type:"text",text:R$(n,Hu.parse(c))}]})),o.tool(Oy,Ny,Gu.shape,c=>({content:[{type:"text",text:O$(n,Gu.parse(c))}]})),o.tool(jy,Dy,Wu.shape,c=>({content:[{type:"text",text:j$(n,Wu.parse(c))}]})),o.tool(My,Ly,Ku.shape,c=>({content:[{type:"text",text:M$(n,Ku.parse(c))}]})),o.tool(Zy,qy,Ju.shape,c=>({content:[{type:"text",text:Z$(n,Ju.parse(c))}]}));let i=r?.tools??[];i.length>0&&o.resource("ecosystem-tool",new as("godd://tools/{toolId}",{list:async()=>({resources:i.map(c=>({uri:`godd://tools/${c.id}`,name:c.label,description:c.description,mimeType:"text/plain"}))})}),async(c,{toolId:u})=>{let p=i.find(d=>d.id===String(u));if(!p)return{contents:[{uri:c.href,text:"Tool not found"}]};let l=[`# ${p.label}`,"",`- **\u30AB\u30C6\u30B4\u30EA**: ${p.category}`,`- **\u8AAC\u660E**: ${p.description}`];return p.guidance&&l.push("","## \u5229\u7528\u30AC\u30A4\u30C0\u30F3\u30B9","",p.guidance),"url"in p&&p.url&&l.push("",`- **\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8**: ${p.url}`),{contents:[{uri:c.href,text:l.join(`
|
|
217
|
+
`),mimeType:"text/plain"}]}});let s=[{name:Zg,description:qg,params:Object.keys(wu.shape)},{name:Fg,description:Ug,params:Object.keys(Su.shape)},{name:Bg,description:Vg,params:Object.keys($u.shape)},{name:Hg,description:Gg,params:Object.keys(Tu.shape)},{name:Wg,description:Kg,params:Object.keys(Pu.shape)},{name:Jg,description:Yg,params:Object.keys(Cu.shape)},{name:Qg,description:Xg,params:Object.keys(Eu.shape)},{name:ey,description:ty,params:Object.keys(Iu.shape)},{name:ry,description:ny,params:Object.keys(zu.shape)},{name:oy,description:iy,params:Object.keys(Ru.shape)},{name:sy,description:ay,params:Object.keys(Au.shape)},{name:cy,description:uy,params:Object.keys(Ou.shape)},{name:ly,description:py,params:Object.keys(Nu.shape)},{name:dy,description:fy,params:Object.keys(ju.shape)},{name:hy,description:my,params:Object.keys(Du.shape)},{name:gy,description:yy,params:Object.keys(Mu.shape)},{name:_y,description:vy,params:Object.keys(Lu.shape)},{name:by,description:xy,params:Object.keys(Zu.shape)},{name:ky,description:wy,params:Object.keys(qu.shape)},{name:Sy,description:$y,params:Object.keys(Fu.shape)},{name:Ty,description:Py,params:Object.keys(Uu.shape)},{name:Cy,description:Ey,params:Object.keys(Bu.shape)},{name:Iy,description:zy,params:Object.keys(Vu.shape)},{name:Ry,description:Ay,params:Object.keys(Hu.shape)},{name:Oy,description:Ny,params:Object.keys(Gu.shape)},{name:jy,description:Dy,params:Object.keys(Wu.shape)},{name:My,description:Ly,params:Object.keys(Ku.shape)},{name:Zy,description:qy,params:Object.keys(Ju.shape)}];o.resource("mcp-tool",new as("godd://mcp-tools/{toolName}",{list:async()=>({resources:s.map(c=>({uri:`godd://mcp-tools/${c.name}`,name:c.name,description:c.description,mimeType:"text/plain"}))})}),async(c,{toolName:u})=>{let p=s.find(d=>d.name===String(u));if(!p)return{contents:[{uri:c.href,text:"Tool not found"}]};let l=[`# ${p.name}`,"",p.description,"","## \u30D1\u30E9\u30E1\u30FC\u30BF","",...p.params.map(d=>`- \`${d}\``)];return{contents:[{uri:c.href,text:l.join(`
|
|
218
|
+
`),mimeType:"text/plain"}]}});let a=new Rc;await o.connect(a)}var jr,Uy,Qu,W$,Xn,hZ,K$=v(()=>{"use strict";_w();xw();IS();$2();z2();j2();D2();q2();U2();V2();G2();K2();Y2();X2();t$();n$();i$();a$();u$();p$();f$();m$();y$();v$();x$();w$();$$();P$();E$();z$();A$();N$();D$();L$();q$();V$();jr=require("node:path"),Uy=require("node:url"),Qu=require("node:fs"),W$={};try{Xn=(0,jr.dirname)((0,Uy.fileURLToPath)(W$.url))}catch{Xn=(0,jr.dirname)(process.execPath)}hZ=(()=>{try{let e=(0,Uy.fileURLToPath)(W$.url);return process.argv[1]===e}catch{return!process.env.__GODD_CLI__}})();hZ&&H$().catch(e=>{console.error("GoDD MCP Server \u8D77\u52D5\u30A8\u30E9\u30FC:",e),process.exit(1)})});var rT={};Mr(rT,{runInit:()=>tT});function Jo(e){return new Promise(t=>{eT.question(e,r=>t(r.trim()))})}function mZ(e){let t=new Map;for(let n of e){let o=_Z[n.name]??n.category,i=t.get(o)??[];i.push(n),t.set(o,i)}return["language","frontend-ui","frontend-css","frontend-build","frontend","backend-api","backend-orm","backend-task","backend","runtime","database","infra","architecture"].filter(n=>t.has(n)).map(n=>({category:n,components:t.get(n)}))}function vZ(e,t){let r=yZ[e];return r===void 0||r.length===0?!0:r.some(n=>t.has(n))}function bZ(){return!!process.pkg}async function xZ(e,t){try{let r=await fetch(`${e}/v1/components`,{headers:{Authorization:`Bearer ${t}`}});return r.ok?await r.json():null}catch{return null}}function kZ(e,t,r,n){return["# GoDD MCP Server Configuration","# Generated by godd-init","",`license_key: "${e}"`,"","# \u6280\u8853\u30B9\u30BF\u30C3\u30AF\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8","components:",...t.map(i=>` - ${i}`),"",`language: "${r}"`,"","# Registry API URL (default: production endpoint)",`# registry_url: "${n}"`,""].join(`
|
|
219
|
+
`)}function Y$(e){if(bZ())return{command:"godd",args:["server"],env:{GODD_CONFIG:e}};let t;try{t=(0,By.fileURLToPath)(nT.url)}catch{t=__filename}let r=(0,wt.dirname)(t),n=t.includes("src")?(0,wt.resolve)(r,"..","..","dist","godd.js"):(0,wt.resolve)(r,"godd.js");return{command:process.execPath,args:[n,"server"],env:{GODD_CONFIG:e}}}async function tT(){console.log(""),console.log("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"),console.log("\u2551 GoDD MCP Server \u2014 \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7 \u2551"),console.log("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.log("");let e=await Jo("\u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044: ");e||(console.error("\u30A8\u30E9\u30FC: \u30E9\u30A4\u30BB\u30F3\u30B9\u30AD\u30FC\u306F\u5FC5\u9808\u3067\u3059\u3002"),process.exit(1));let r=await Jo("\u4F7F\u7528\u8A00\u8A9E\u3092\u9078\u629E [ja/en/zh/ru/kz/tr] (default: ja): ")||"ja",o=await Jo("Registry API URL (default: http://localhost:8100): ")||"http://localhost:8100";console.log(`
|
|
220
|
+
\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u53D6\u5F97\u4E2D...`);let i=await xZ(o,e)??J$;console.log(i===J$?" Registry API \u306B\u63A5\u7D9A\u3067\u304D\u306A\u3044\u305F\u3081\u3001\u30D3\u30EB\u30C8\u30A4\u30F3\u30EA\u30B9\u30C8\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002":` ${i.length} \u4EF6\u306E\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u53D6\u5F97\u3057\u307E\u3057\u305F\u3002`);let s=mZ(i),a=new Set,c=new Set;function u(S){return s.find(C=>C.category===S)}async function p(S,C){let Q=gZ[S.category]??S.category,H=C?S.components.filter(Le=>vZ(Le.name,c)):S.components;if(H.length===0){console.log(` \u3010${Q}\u3011 \u2014 \u5BFE\u5FDC\u3059\u308B\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306F\u3042\u308A\u307E\u305B\u3093\uFF08\u30B9\u30AD\u30C3\u30D7\uFF09`);return}console.log(`
|
|
221
|
+
\u3010${Q}\u3011`),H.forEach((Le,ze)=>{console.log(` ${String(ze+1).padStart(2)}. ${Le.label.padEnd(25)} ${Le.description}`)});let pt=await Jo(" \u9078\u629E (\u4F8B: 1,3): ");if(pt.toLowerCase()==="all")for(let Le of H)a.add(Le.name);else if(pt){let Le=pt.split(",").map(ze=>parseInt(ze.trim(),10));for(let ze of Le)ze>=1&&ze<=H.length&&a.add(H[ze-1].name)}}let l=[{step:1,title:"\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E",categories:["language"]},{step:2,title:"\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF / \u30E9\u30A4\u30D6\u30E9\u30EA",categories:["frontend-ui","backend-api","frontend","backend"]},{step:3,title:"\u95A2\u9023\u30C4\u30FC\u30EB\uFF08CSS / \u30D3\u30EB\u30C9 / ORM / \u30BF\u30B9\u30AF\u30AD\u30E5\u30FC / \u30E9\u30F3\u30BF\u30A4\u30E0\uFF09",categories:["frontend-css","frontend-build","backend-orm","backend-task","runtime"]},{step:4,title:"\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9",categories:["database"]},{step:5,title:"\u30A4\u30F3\u30D5\u30E9",categories:["infra"]}],d=l.length;console.log(`
|
|
222
|
+
\u2501\u2501\u2501 \u6280\u8853\u30B9\u30BF\u30C3\u30AF\u9078\u629E\uFF08${d} \u30B9\u30C6\u30C3\u30D7 + \u81EA\u52D5\u8A2D\u5B9A\uFF09\u2501\u2501\u2501`),console.log(`\u8907\u6570\u9078\u629E: "1,3,5" / \u5168\u9078\u629E: "all" / \u30B9\u30AD\u30C3\u30D7: Enter
|
|
223
|
+
`);for(let S of l){console.log(`
|
|
224
|
+
\u2554\u2500 Step ${S.step}/${d}: ${S.title}`);for(let C of S.categories){let Q=u(C);Q&&await p(Q,S.step!==1)}if(S.step===1){let C=u("language");if(C)for(let Q of C.components)a.has(Q.name)&&c.add(Q.name);c.size===0&&(console.error(`
|
|
225
|
+
\u30A8\u30E9\u30FC: \u4F7F\u7528\u3059\u308B\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E\u30921\u3064\u4EE5\u4E0A\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044\u3002`),process.exit(1)),console.log(`
|
|
226
|
+
\u2192 \u9078\u629E\u8A00\u8A9E: ${[...c].join(", ")}`),console.log(" \u4EE5\u964D\u306F\u9078\u629E\u3055\u308C\u305F\u8A00\u8A9E\u306B\u5BFE\u5FDC\u3059\u308B\u6280\u8853\u306E\u307F\u8868\u793A\u3057\u307E\u3059\u3002")}console.log(`\u255A\u2500 Step ${S.step} \u5B8C\u4E86`)}let h=u("architecture");if(h){for(let C of h.components)a.add(C.name);let S=h.components.map(C=>C.label).join(", ");console.log(`
|
|
227
|
+
\u2714 \u8A2D\u8A08\u30D1\u30BF\u30FC\u30F3\u3092\u81EA\u52D5\u8A2D\u5B9A\u3057\u307E\u3057\u305F: ${S}`)}a.size===0&&(console.error(`
|
|
228
|
+
\u30A8\u30E9\u30FC: \u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C1\u3064\u3082\u9078\u629E\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002`),process.exit(1)),console.log(`
|
|
229
|
+
\u2501\u2501\u2501 \u9078\u629E\u3055\u308C\u305F\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8 (${a.size} \u4EF6) \u2501\u2501\u2501`);for(let S of a){let C=i.find(Q=>Q.name===S);console.log(` \u2713 ${C?.label??S}`)}let f=process.cwd(),m=(0,wt.join)(f,"config.yaml"),_=await Jo(`
|
|
230
|
+
config.yaml \u306E\u4FDD\u5B58\u5148 (default: ${m}): `)||m,b=kZ(e,[...a],r,o);if((0,_r.writeFileSync)(_,b,"utf-8"),console.log(`
|
|
231
|
+
\u2713 config.yaml \u3092\u751F\u6210\u3057\u307E\u3057\u305F: ${_}`),(await Jo(".cursor/mcp.json \u3092\u751F\u6210\u3057\u307E\u3059\u304B\uFF1F [Y/n]: ")).toLowerCase()!=="n"){let S=(0,wt.join)(f,".cursor"),C=(0,wt.resolve)((0,wt.join)(S,"mcp.json")),Q=(0,wt.resolve)((0,wt.join)((0,X$.homedir)(),".cursor","mcp.json"));if(C===Q){let H={godd:Y$((0,wt.resolve)(_))};console.log(`
|
|
232
|
+
\u26A0 \u30E6\u30FC\u30B6\u30FC\u30B0\u30ED\u30FC\u30D0\u30EB\u306E MCP \u8A2D\u5B9A\u3092\u4E0A\u66F8\u304D\u3057\u306A\u3044\u305F\u3081\u3001\u30D5\u30A1\u30A4\u30EB\u306B\u306F\u66F8\u304D\u8FBC\u307F\u307E\u305B\u3093\u3002`),console.log(` \u4EE5\u4E0B\u306E\u30D6\u30ED\u30C3\u30AF\u3092\u624B\u52D5\u3067 ${Q} \u306E mcpServers \u306B\u8FFD\u8A18\u3057\u3066\u304F\u3060\u3055\u3044:
|
|
233
|
+
`),console.log(JSON.stringify(H,null,2)),console.log("")}else{(0,_r.existsSync)(S)||(0,_r.mkdirSync)(S,{recursive:!0});let H={mcpServers:{}};if((0,_r.existsSync)(C))try{H={...JSON.parse((0,_r.readFileSync)(C,"utf-8"))},(typeof H.mcpServers!="object"||H.mcpServers===null)&&(H.mcpServers={})}catch{}let pt={...H.mcpServers};pt.godd=Y$((0,wt.resolve)(_)),H.mcpServers=pt,(0,_r.writeFileSync)(C,JSON.stringify(H,null,2),"utf-8"),console.log(`\u2713 .cursor/mcp.json \u3092\u751F\u6210\u3057\u307E\u3057\u305F: ${C}`)}}console.log(`
|
|
234
|
+
\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557`),console.log("\u2551 \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u5B8C\u4E86\uFF01 \u2551"),console.log("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.log(""),console.log("\u6B21\u306E\u30B9\u30C6\u30C3\u30D7:"),console.log(" 1. Cursor IDE \u3092\u518D\u8D77\u52D5\u3057\u3066\u304F\u3060\u3055\u3044"),console.log(" 2. \u30C1\u30E3\u30C3\u30C8\u3067 GoDD MCP \u30C4\u30FC\u30EB\u304C\u4F7F\u3048\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3059"),console.log(" - godd_dev: \u958B\u767A\u652F\u63F4"),console.log(" - godd_check: \u30B3\u30FC\u30C9\u30C1\u30A7\u30C3\u30AF"),console.log(" - godd_review: \u30B3\u30FC\u30C9\u30EC\u30D3\u30E5\u30FC"),console.log(" - godd_setup: \u74B0\u5883\u69CB\u7BC9\u652F\u63F4"),console.log(" \u4ED6 12 \u30C4\u30FC\u30EB"),console.log(""),eT.close()}var Q$,_r,wt,By,X$,nT,J$,eT,gZ,yZ,_Z,wZ,oT=v(()=>{"use strict";Q$=St(require("node:readline"),1),_r=require("node:fs"),wt=require("node:path"),By=require("node:url"),X$=require("node:os"),nT={},J$=[{id:"",name:"python",category:"language",label:"Python",description:"\u6C4E\u7528\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E"},{id:"",name:"typescript",category:"language",label:"TypeScript",description:"\u578B\u5B89\u5168\u306A JavaScript \u30B9\u30FC\u30D1\u30FC\u30BB\u30C3\u30C8"},{id:"",name:"javascript",category:"language",label:"JavaScript",description:"\u52D5\u7684\u30B9\u30AF\u30EA\u30D7\u30C8\u8A00\u8A9E (ES2024+)"},{id:"",name:"go",category:"language",label:"Go",description:"\u9759\u7684\u578B\u4ED8\u3051\u30B3\u30F3\u30D1\u30A4\u30EB\u8A00\u8A9E"},{id:"",name:"php",category:"language",label:"PHP",description:"\u6C4E\u7528\u30B9\u30AF\u30EA\u30D7\u30C8\u8A00\u8A9E"},{id:"",name:"ruby",category:"language",label:"Ruby",description:"\u52D5\u7684\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u6307\u5411\u8A00\u8A9E"},{id:"",name:"c",category:"language",label:"C",description:"\u30B7\u30B9\u30C6\u30E0\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u8A00\u8A9E"},{id:"",name:"html",category:"language",label:"HTML",description:"HyperText Markup Language"},{id:"",name:"css",category:"language",label:"CSS",description:"Cascading Style Sheets"},{id:"",name:"react",category:"frontend",label:"React",description:"React UI \u30E9\u30A4\u30D6\u30E9\u30EA"},{id:"",name:"nextjs",category:"frontend",label:"Next.js",description:"React \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF (SSR/SSG/ISR)"},{id:"",name:"vue",category:"frontend",label:"Vue.js",description:"\u30D7\u30ED\u30B0\u30EC\u30C3\u30B7\u30D6 JavaScript \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"angular",category:"frontend",label:"Angular",description:"TypeScript \u30D9\u30FC\u30B9 Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"svelte",category:"frontend",label:"Svelte",description:"\u30B3\u30F3\u30D1\u30A4\u30EB\u6642 UI \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"vite",category:"frontend",label:"Vite",description:"\u9AD8\u901F\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9\u30D3\u30EB\u30C9\u30C4\u30FC\u30EB"},{id:"",name:"tailwind",category:"frontend",label:"Tailwind CSS",description:"\u30E6\u30FC\u30C6\u30A3\u30EA\u30C6\u30A3\u30D5\u30A1\u30FC\u30B9\u30C8 CSS"},{id:"",name:"sass",category:"frontend",label:"Sass",description:"CSS \u30D7\u30EA\u30D7\u30ED\u30BB\u30C3\u30B5"},{id:"",name:"electron",category:"frontend",label:"Electron",description:"\u30C7\u30B9\u30AF\u30C8\u30C3\u30D7\u30A2\u30D7\u30EA\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"fastapi",category:"backend",label:"FastAPI",description:"\u9AD8\u901F Python Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"django",category:"backend",label:"Django",description:"Python Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF (batteries included)"},{id:"",name:"flask",category:"backend",label:"Flask",description:"Python \u30DE\u30A4\u30AF\u30ED Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"express",category:"backend",label:"Express",description:"\u6700\u5C0F\u9650\u306E Node.js Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"fastify",category:"backend",label:"Fastify",description:"\u9AD8\u901F Node.js Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"nestjs",category:"backend",label:"NestJS",description:"\u30D7\u30ED\u30B0\u30EC\u30C3\u30B7\u30D6 Node.js \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"gin",category:"backend",label:"Gin",description:"Go HTTP Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"echo",category:"backend",label:"Echo",description:"\u9AD8\u6027\u80FD Go Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"fiber",category:"backend",label:"Fiber",description:"Express \u98A8 Go Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"laravel",category:"backend",label:"Laravel",description:"PHP Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"symfony",category:"backend",label:"Symfony",description:"PHP \u30A8\u30F3\u30BF\u30FC\u30D7\u30E9\u30A4\u30BA\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"wordpress",category:"backend",label:"WordPress",description:"PHP CMS \u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0"},{id:"",name:"rails",category:"backend",label:"Ruby on Rails",description:"Ruby Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF (MVC)"},{id:"",name:"sinatra",category:"backend",label:"Sinatra",description:"Ruby \u30DE\u30A4\u30AF\u30ED Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"koa",category:"backend",label:"Koa",description:"\u6B21\u4E16\u4EE3 Node.js Web \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF"},{id:"",name:"node",category:"runtime",label:"Node.js",description:"JavaScript \u30E9\u30F3\u30BF\u30A4\u30E0"},{id:"",name:"agent-stdio",category:"runtime",label:"Agent Stdio",description:"MCP Agent stdio \u5B9F\u884C\u30E9\u30F3\u30BF\u30A4\u30E0"},{id:"",name:"postgresql",category:"database",label:"PostgreSQL",description:"\u30AA\u30FC\u30D7\u30F3\u30BD\u30FC\u30B9 RDB"},{id:"",name:"mysql",category:"database",label:"MySQL",description:"\u30AA\u30FC\u30D7\u30F3\u30BD\u30FC\u30B9 RDB"},{id:"",name:"mongodb",category:"database",label:"MongoDB",description:"\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u6307\u5411 NoSQL DB"},{id:"",name:"redis",category:"database",label:"Redis",description:"\u30A4\u30F3\u30E1\u30E2\u30EA KVS / \u30AD\u30E3\u30C3\u30B7\u30E5"},{id:"",name:"sqlalchemy",category:"backend",label:"SQLAlchemy",description:"Python SQL \u30C4\u30FC\u30EB\u30AD\u30C3\u30C8 + ORM"},{id:"",name:"celery",category:"backend",label:"Celery",description:"\u5206\u6563\u30BF\u30B9\u30AF\u30AD\u30E5\u30FC"},{id:"",name:"docker",category:"infra",label:"Docker",description:"\u30B3\u30F3\u30C6\u30CA\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0"},{id:"",name:"terraform",category:"infra",label:"Terraform",description:"IaC \u30C4\u30FC\u30EB (HashiCorp)"},{id:"",name:"ddd-clean-architecture",category:"architecture",label:"DDD / Clean Architecture",description:"\u30C9\u30E1\u30A4\u30F3\u99C6\u52D5\u8A2D\u8A08 + Clean Architecture"}],eT=Q$.createInterface({input:process.stdin,output:process.stdout});gZ={language:"\u8A00\u8A9E","frontend-ui":"\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9 \u2014 UI \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF","frontend-css":"\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9 \u2014 CSS","frontend-build":"\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9 \u2014 \u30D3\u30EB\u30C9\u30C4\u30FC\u30EB",frontend:"\u30D5\u30ED\u30F3\u30C8\u30A8\u30F3\u30C9 \u2014 \u305D\u306E\u4ED6","backend-api":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9 \u2014 API \u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF","backend-orm":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9 \u2014 ORM / DB \u30C4\u30FC\u30EB","backend-task":"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9 \u2014 \u30BF\u30B9\u30AF\u30AD\u30E5\u30FC",backend:"\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9 \u2014 \u305D\u306E\u4ED6",runtime:"\u30E9\u30F3\u30BF\u30A4\u30E0",database:"\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9",infra:"\u30A4\u30F3\u30D5\u30E9",architecture:"\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3"},yZ={fastapi:["python"],django:["python"],flask:["python"],sqlalchemy:["python"],celery:["python"],express:["typescript","javascript"],fastify:["typescript","javascript"],nestjs:["typescript","javascript"],koa:["typescript","javascript"],gin:["go"],echo:["go"],fiber:["go"],laravel:["php"],symfony:["php"],wordpress:["php"],rails:["ruby"],sinatra:["ruby"],react:["typescript","javascript"],nextjs:["typescript","javascript"],vue:["typescript","javascript"],angular:["typescript","javascript"],svelte:["typescript","javascript"],vite:["typescript","javascript"],electron:["typescript","javascript"],tailwind:[],sass:[],node:["typescript","javascript"],"agent-stdio":[]},_Z={react:"frontend-ui",nextjs:"frontend-ui",vue:"frontend-ui",angular:"frontend-ui",svelte:"frontend-ui",electron:"frontend-ui",tailwind:"frontend-css",sass:"frontend-css",vite:"frontend-build",fastapi:"backend-api",django:"backend-api",flask:"backend-api",express:"backend-api",fastify:"backend-api",nestjs:"backend-api",gin:"backend-api",echo:"backend-api",fiber:"backend-api",laravel:"backend-api",symfony:"backend-api",wordpress:"backend-api",rails:"backend-api",sinatra:"backend-api",koa:"backend-api",sqlalchemy:"backend-orm",celery:"backend-task"};wZ=(()=>{try{let e=(0,By.fileURLToPath)(nT.url);return process.argv[1]===e}catch{return!process.env.__GODD_CLI__}})();wZ&&tT().catch(e=>{console.error("\u30A8\u30E9\u30FC:",e),process.exit(1)})});var cT={};Mr(cT,{runInstall:()=>CZ});function SZ(){if(process.platform==="win32"){let e=process.env.LOCALAPPDATA??(0,ln.join)((0,Xu.homedir)(),"AppData","Local");return(0,ln.join)(e,"GoDD")}return(0,ln.join)((0,Xu.homedir)(),".godd","bin")}function $Z(){return process.platform==="win32"?"godd.exe":"godd"}function aT(e){let t=process.env.PATH??"",r=process.platform==="win32"?";":":";return t.split(r).map(o=>o.replace(/[\\/]+$/,"").toLowerCase()).includes(e.replace(/[\\/]+$/,"").toLowerCase())}function TZ(e){if(aT(e)){console.log(" PATH: \u65E2\u306B\u767B\u9332\u6E08\u307F\u3067\u3059\u3002");return}try{let t=["$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')","if ($currentPath -and $currentPath.Length -gt 0) {",` $newPath = $currentPath + ';' + '${e.replace(/'/g,"''")}'`,"} else {",` $newPath = '${e.replace(/'/g,"''")}'`,"}","[Environment]::SetEnvironmentVariable('PATH', $newPath, 'User')"].join("; ");(0,iT.execSync)(`powershell -NoProfile -Command "${t}"`,{stdio:"pipe"}),console.log(" PATH: \u30E6\u30FC\u30B6\u30FC\u74B0\u5883\u5909\u6570\u306B\u8FFD\u52A0\u3057\u307E\u3057\u305F\u3002")}catch{console.error(` PATH: \u81EA\u52D5\u767B\u9332\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u4EE5\u4E0B\u3092\u624B\u52D5\u3067 PATH \u306B\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044:
|
|
235
|
+
${e}`)}}function PZ(e){if(aT(e)){console.log(" PATH: \u65E2\u306B\u767B\u9332\u6E08\u307F\u3067\u3059\u3002");return}let t=`
|
|
236
|
+
# GoDD CLI
|
|
237
|
+
export PATH="${e}:$PATH"
|
|
238
|
+
`,r=(0,Xu.homedir)(),n=[],o=(0,ln.join)(r,".zshrc"),i=(0,ln.join)(r,".bashrc"),s=(0,ln.join)(r,".bash_profile");if((0,rr.existsSync)(o)&&n.push(o),(0,rr.existsSync)(i)?n.push(i):(0,rr.existsSync)(s)&&n.push(s),n.length===0){let a=process.platform==="darwin"?o:i;n.push(a)}for(let a of n){try{if((0,el.readFileSync)(a,"utf-8").includes(e)){console.log(` PATH: ${a} \u306B\u65E2\u306B\u767B\u9332\u6E08\u307F\u3067\u3059\u3002`);continue}}catch{}(0,el.appendFileSync)(a,t,"utf-8"),console.log(` PATH: ${a} \u306B\u8FFD\u52A0\u3057\u307E\u3057\u305F\u3002`)}}async function CZ(){console.log(""),console.log("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"),console.log("\u2551 GoDD CLI \u2014 \u30A4\u30F3\u30B9\u30C8\u30FC\u30EB \u2551"),console.log("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.log("");let e=SZ(),t=$Z(),r=(0,ln.join)(e,t),n=process.execPath;console.log(`\u30BD\u30FC\u30B9: ${n}`),console.log(`\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5148: ${r}`),console.log(""),(0,rr.existsSync)(e)||((0,rr.mkdirSync)(e,{recursive:!0}),console.log(`\u2713 \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u4F5C\u6210\u3057\u307E\u3057\u305F: ${e}`));let o=n.replace(/\\/g,"/").toLowerCase(),i=r.replace(/\\/g,"/").toLowerCase();if(o===i?console.log("\u2713 \u65E2\u306B\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5148\u304B\u3089\u5B9F\u884C\u3055\u308C\u3066\u3044\u307E\u3059\uFF08\u30B3\u30D4\u30FC\u3092\u30B9\u30AD\u30C3\u30D7\uFF09\u3002"):((0,rr.copyFileSync)(n,r),console.log("\u2713 \u30D0\u30A4\u30CA\u30EA\u3092\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F\u3002"),process.platform!=="win32"&&(0,rr.chmodSync)(r,493)),console.log(""),process.platform==="win32"?TZ(e):PZ(e),console.log(""),console.log("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557"),console.log("\u2551 \u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u5B8C\u4E86\uFF01 \u2551"),console.log("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D"),console.log(""),console.log("\u6B21\u306E\u30B9\u30C6\u30C3\u30D7:"),console.log(" 1. \u30BF\u30FC\u30DF\u30CA\u30EB\u3092\u518D\u8D77\u52D5\u3057\u3066\u304F\u3060\u3055\u3044\uFF08PATH \u3092\u53CD\u6620\u3059\u308B\u305F\u3081\uFF09"),console.log(" 2. \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067 godd init \u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044"),console.log(""),console.log("\u4F7F\u3044\u65B9:"),console.log(" godd init \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7"),console.log(" godd server MCP \u30B5\u30FC\u30D0\u30FC\u8D77\u52D5\uFF08Cursor \u304C\u81EA\u52D5\u5B9F\u884C\uFF09"),console.log(" godd version \u30D0\u30FC\u30B8\u30E7\u30F3\u8868\u793A"),console.log(" godd help \u30D8\u30EB\u30D7\u8868\u793A"),console.log(""),process.platform==="win32"&&!process.env.TERM&&!process.env.CI){let s=sT.createInterface({input:process.stdin,output:process.stdout});await new Promise(a=>{s.question("Enter \u30AD\u30FC\u3092\u62BC\u3057\u3066\u9589\u3058\u307E\u3059...",()=>{s.close(),a()})})}}var rr,ln,Xu,iT,el,sT,uT=v(()=>{"use strict";rr=require("node:fs"),ln=require("node:path"),Xu=require("node:os"),iT=require("node:child_process"),el=require("node:fs"),sT=St(require("node:readline"),1)});var dT={};Mr(dT,{PROVIDER_LABELS:()=>Hy,runNotesInfra:()=>VZ});function EZ(){return lT.createInterface({input:process.stdin,output:process.stdout})}function te(e,t){return new Promise(r=>{e.question(t,n=>r(n.trim()))})}function IZ(){try{return(0,ae.dirname)((0,pT.fileURLToPath)(HZ.url))}catch{return(0,ae.dirname)(process.execPath)}}function zZ(e){let t=IZ(),r=(0,ae.resolve)(t,".."),n=(0,ae.join)(r,"templates","terraform",e),o=(0,ae.join)(r,"templates","github-actions",e);return(0,me.existsSync)(n)&&(0,me.existsSync)(o)?{terraformDir:n,ghaDir:o}:null}function RZ(e){let t=(0,ae.join)(e,Gy);if(!(0,me.existsSync)(t))return null;try{return JSON.parse((0,me.readFileSync)(t,"utf-8"))}catch{return null}}function AZ(e){let t=(0,ae.join)(e.outputDir,Gy),r={...e};(0,me.writeFileSync)(t,JSON.stringify(r,null,2)+`
|
|
239
|
+
`)}async function OZ(e,t){console.log(`
|
|
240
|
+
--- \u30AF\u30E9\u30A6\u30C9\u30D7\u30ED\u30D0\u30A4\u30C0\u9078\u629E ---`);let r=Object.entries(Hy);for(let s=0;s<r.length;s++){let[a,c]=r[s],u=a===(t??"aws");console.log(` ${s+1}. ${c}${u?" [\u30C7\u30D5\u30A9\u30EB\u30C8]":""}`)}let n=r.findIndex(([s])=>s===(t??"aws"))+1,o=await te(e,`
|
|
241
|
+
\u9078\u629E [${n}]: `)||String(n),i=parseInt(o,10)-1;return(i<0||i>=r.length)&&(console.error("\u30A8\u30E9\u30FC: \u7121\u52B9\u306A\u9078\u629E\u3067\u3059\u3002"),process.exit(1)),r[i][0]}async function NZ(e,t){console.log(`
|
|
242
|
+
--- AWS \u30A2\u30AB\u30A6\u30F3\u30C8\u8A2D\u5B9A ---`);let r=await te(e,`AWS \u30A2\u30AB\u30A6\u30F3\u30C8 ID${t.accountId?` [${t.accountId}]`:""}: `)||t.accountId||"";(!r||!/^\d{12}$/.test(r))&&(console.error("\u30A8\u30E9\u30FC: 12\u6841\u306E AWS \u30A2\u30AB\u30A6\u30F3\u30C8 ID \u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1));let n=await te(e,`AWS \u30EA\u30FC\u30B8\u30E7\u30F3 [${t.region??"ap-northeast-1"}]: `)||t.region||"ap-northeast-1",o=await te(e,`\u74B0\u5883\u540D (dev/staging/prod) [${t.env??"dev"}]: `)||t.env||"dev";console.log(`
|
|
243
|
+
--- GitHub \u30EA\u30DD\u30B8\u30C8\u30EA ---`);let i=await te(e,`GitHub Owner${t.githubOwner?` [${t.githubOwner}]`:""}: `)||t.githubOwner||"",s=await te(e,`GitHub Repo${t.githubRepo?` [${t.githubRepo}]`:""}: `)||t.githubRepo||"";(!i||!s)&&(console.error("\u30A8\u30E9\u30FC: GitHub Owner \u3068 Repo \u306F\u5FC5\u9808\u3067\u3059\u3002"),process.exit(1)),console.log(`
|
|
244
|
+
--- \u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u8A2D\u5B9A ---`);let a=await te(e,`VPC CIDR [${t.vpcCidr??"10.2.0.0/16"}]: `)||t.vpcCidr||"10.2.0.0/16";console.log(`
|
|
245
|
+
--- \u30EA\u30BD\u30FC\u30B9\u30B5\u30A4\u30BA ---`);let c=await te(e,`RDS \u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u30AF\u30E9\u30B9 [${t.rdsInstanceClass??"db.t4g.micro"}]: `)||t.rdsInstanceClass||"db.t4g.micro",u=await te(e,`ECS CPU (vCPU \u5358\u4F4D) [${t.ecsCpu??256}]: `)||String(t.ecsCpu??256),p=await te(e,`ECS \u30E1\u30E2\u30EA (MB) [${t.ecsMemory??512}]: `)||String(t.ecsMemory??512);console.log(`
|
|
246
|
+
--- \u51FA\u529B\u5148 ---`);let l=await te(e,`\u51FA\u529B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA [${t.outputDir??"."}]: `)||t.outputDir||".";return{provider:"aws",accountId:r,region:n,env:o,githubOwner:i,githubRepo:s,vpcCidr:a,rdsInstanceClass:c,ecsCpu:parseInt(u,10),ecsMemory:parseInt(p,10),outputDir:(0,ae.resolve)(l)}}async function jZ(e,t){console.log(`
|
|
247
|
+
--- GCP \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u8A2D\u5B9A ---`);let r=await te(e,`GCP \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8 ID${t.projectId?` [${t.projectId}]`:""}: `)||t.projectId||"";r||(console.error("\u30A8\u30E9\u30FC: GCP \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8 ID \u306F\u5FC5\u9808\u3067\u3059\u3002"),process.exit(1));let n=await te(e,`GCP \u30EA\u30FC\u30B8\u30E7\u30F3 [${t.region??"asia-northeast1"}]: `)||t.region||"asia-northeast1",o=await te(e,`\u74B0\u5883\u540D (dev/staging/prod) [${t.env??"dev"}]: `)||t.env||"dev";console.log(`
|
|
248
|
+
--- GitHub \u30EA\u30DD\u30B8\u30C8\u30EA ---`);let i=await te(e,`GitHub Owner${t.githubOwner?` [${t.githubOwner}]`:""}: `)||t.githubOwner||"",s=await te(e,`GitHub Repo${t.githubRepo?` [${t.githubRepo}]`:""}: `)||t.githubRepo||"";(!i||!s)&&(console.error("\u30A8\u30E9\u30FC: GitHub Owner \u3068 Repo \u306F\u5FC5\u9808\u3067\u3059\u3002"),process.exit(1)),console.log(`
|
|
249
|
+
--- \u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u8A2D\u5B9A ---`);let a=await te(e,`VPC CIDR [${t.vpcCidr??"10.0.0.0/16"}]: `)||t.vpcCidr||"10.0.0.0/16";console.log(`
|
|
250
|
+
--- \u30EA\u30BD\u30FC\u30B9\u30B5\u30A4\u30BA ---`);let c=await te(e,`Cloud SQL \u30C6\u30A3\u30A2 [${t.dbTier??"db-f1-micro"}]: `)||t.dbTier||"db-f1-micro",u=await te(e,`Cloud Run CPU [${t.cpuLimit??"1"}]: `)||t.cpuLimit||"1",p=await te(e,`Cloud Run \u30E1\u30E2\u30EA [${t.memoryLimit??"512Mi"}]: `)||t.memoryLimit||"512Mi";console.log(`
|
|
251
|
+
--- \u51FA\u529B\u5148 ---`);let l=await te(e,`\u51FA\u529B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA [${t.outputDir??"."}]: `)||t.outputDir||".";return{provider:"gcp",projectId:r,region:n,env:o,githubOwner:i,githubRepo:s,vpcCidr:a,dbTier:c,cpuLimit:u,memoryLimit:p,outputDir:(0,ae.resolve)(l)}}async function DZ(e,t){console.log(`
|
|
252
|
+
--- Azure \u30B5\u30D6\u30B9\u30AF\u30EA\u30D7\u30B7\u30E7\u30F3\u8A2D\u5B9A ---`);let r=await te(e,`Azure Subscription ID${t.subscriptionId?` [${t.subscriptionId}]`:""}: `)||t.subscriptionId||"";r||(console.error("\u30A8\u30E9\u30FC: Azure Subscription ID \u306F\u5FC5\u9808\u3067\u3059\u3002"),process.exit(1));let n=await te(e,`Azure \u30EA\u30FC\u30B8\u30E7\u30F3 [${t.region??"japaneast"}]: `)||t.region||"japaneast",o=await te(e,`\u74B0\u5883\u540D (dev/staging/prod) [${t.env??"dev"}]: `)||t.env||"dev";console.log(`
|
|
253
|
+
--- GitHub \u30EA\u30DD\u30B8\u30C8\u30EA ---`);let i=await te(e,`GitHub Owner${t.githubOwner?` [${t.githubOwner}]`:""}: `)||t.githubOwner||"",s=await te(e,`GitHub Repo${t.githubRepo?` [${t.githubRepo}]`:""}: `)||t.githubRepo||"";(!i||!s)&&(console.error("\u30A8\u30E9\u30FC: GitHub Owner \u3068 Repo \u306F\u5FC5\u9808\u3067\u3059\u3002"),process.exit(1)),console.log(`
|
|
254
|
+
--- \u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u8A2D\u5B9A ---`);let a=await te(e,`VNet CIDR [${t.vpcCidr??"10.0.0.0/16"}]: `)||t.vpcCidr||"10.0.0.0/16";console.log(`
|
|
255
|
+
--- \u30EA\u30BD\u30FC\u30B9\u30B5\u30A4\u30BA ---`);let c=await te(e,`PostgreSQL SKU [${t.dbSku??"B_Standard_B1ms"}]: `)||t.dbSku||"B_Standard_B1ms",u=await te(e,`Container App CPU [${t.cpuLimit??.25}]: `)||String(t.cpuLimit??.25),p=await te(e,`Container App \u30E1\u30E2\u30EA [${t.memoryLimit??"0.5Gi"}]: `)||t.memoryLimit||"0.5Gi";console.log(`
|
|
256
|
+
--- \u51FA\u529B\u5148 ---`);let l=await te(e,`\u51FA\u529B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA [${t.outputDir??"."}]: `)||t.outputDir||".";return{provider:"azure",subscriptionId:r,region:n,env:o,githubOwner:i,githubRepo:s,vpcCidr:a,dbSku:c,cpuLimit:parseFloat(u),memoryLimit:p,outputDir:(0,ae.resolve)(l)}}async function MZ(e,t){console.log(`
|
|
257
|
+
--- Vercel + Railway \u8A2D\u5B9A ---`);let r=await te(e,`\u74B0\u5883\u540D (dev/staging/prod) [${t.env??"dev"}]: `)||t.env||"dev";console.log(`
|
|
258
|
+
--- GitHub \u30EA\u30DD\u30B8\u30C8\u30EA ---`);let n=await te(e,`GitHub Owner${t.githubOwner?` [${t.githubOwner}]`:""}: `)||t.githubOwner||"",o=await te(e,`GitHub Repo${t.githubRepo?` [${t.githubRepo}]`:""}: `)||t.githubRepo||"";(!n||!o)&&(console.error("\u30A8\u30E9\u30FC: GitHub Owner \u3068 Repo \u306F\u5FC5\u9808\u3067\u3059\u3002"),process.exit(1)),console.log(`
|
|
259
|
+
--- Railway \u8A2D\u5B9A ---`);let i=await te(e,`Railway API URL${t.railwayApiUrl?` [${t.railwayApiUrl}]`:""}: `)||t.railwayApiUrl||"";i||console.log(" \u203B Railway \u30C7\u30D7\u30ED\u30A4\u5F8C\u306B URL \u304C\u767A\u884C\u3055\u308C\u307E\u3059\u3002\u5F8C\u304B\u3089 .godd-notes-infra.json \u3067\u8A2D\u5B9A\u53EF\u80FD\u3067\u3059\u3002"),console.log(`
|
|
260
|
+
--- \u51FA\u529B\u5148 ---`);let s=await te(e,`\u51FA\u529B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA [${t.outputDir??"."}]: `)||t.outputDir||".";return{provider:"vercel-railway",env:r,githubOwner:n,githubRepo:o,railwayApiUrl:i||"https://your-api.up.railway.app",outputDir:(0,ae.resolve)(s)}}async function LZ(e){console.log(`
|
|
261
|
+
\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
|
|
262
|
+
\u2551 ripla Notes \u30A4\u30F3\u30D5\u30E9\u69CB\u7BC9\u30A6\u30A3\u30B6\u30FC\u30C9 \u2551
|
|
263
|
+
\u2551 Terraform + GitHub Actions \u81EA\u52D5\u751F\u6210 \u2551
|
|
264
|
+
\u2551 \u2551
|
|
265
|
+
\u2551 \u5BFE\u5FDC\u30D7\u30ED\u30D0\u30A4\u30C0: \u2551
|
|
266
|
+
\u2551 AWS / GCP / Azure / Vercel\xD7Railway \u2551
|
|
267
|
+
\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
268
|
+
`);let t=RZ(process.cwd());switch(await OZ(e,t?.provider)){case"aws":return NZ(e,t??{});case"gcp":return jZ(e,t??{});case"azure":return DZ(e,t??{});case"vercel-railway":return MZ(e,t??{})}}function Yo(e,t){let r=(0,me.readFileSync)(e,"utf-8");return Vy.default.compile(r,{noEscape:!0})(t)}function ZZ(e){switch(console.log(`
|
|
269
|
+
--- \u8A2D\u5B9A\u306E\u78BA\u8A8D ---`),console.log(` \u30D7\u30ED\u30D0\u30A4\u30C0: ${Hy[e.provider]}`),console.log(` \u74B0\u5883: ${e.env}`),console.log(` GitHub: ${e.githubOwner}/${e.githubRepo}`),e.provider){case"aws":console.log(` AWS \u30A2\u30AB\u30A6\u30F3\u30C8: ${e.accountId}`),console.log(` \u30EA\u30FC\u30B8\u30E7\u30F3: ${e.region}`),console.log(` VPC CIDR: ${e.vpcCidr}`),console.log(` RDS: ${e.rdsInstanceClass}`),console.log(` ECS: ${e.ecsCpu} CPU / ${e.ecsMemory} MB`);break;case"gcp":console.log(` \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8: ${e.projectId}`),console.log(` \u30EA\u30FC\u30B8\u30E7\u30F3: ${e.region}`),console.log(` Cloud SQL: ${e.dbTier}`),console.log(` Cloud Run: ${e.cpuLimit} CPU / ${e.memoryLimit}`);break;case"azure":console.log(` Subscription: ${e.subscriptionId}`),console.log(` \u30EA\u30FC\u30B8\u30E7\u30F3: ${e.region}`),console.log(` PostgreSQL: ${e.dbSku}`),console.log(` Container App: ${e.cpuLimit} CPU / ${e.memoryLimit}`);break;case"vercel-railway":console.log(` Railway API: ${e.railwayApiUrl}`);break}console.log(` \u51FA\u529B\u5148: ${e.outputDir}`)}function qZ(e){let t=zZ(e.provider);t||(console.error(`\u30A8\u30E9\u30FC: ${e.provider} \u306E\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002`),process.exit(1));let{terraformDir:r,ghaDir:n}=t,o=e;e.provider==="aws"?FZ(r,n,e,o):UZ(r,n,e,o),AZ(e),console.log(`
|
|
270
|
+
\u2713 \u8A2D\u5B9A\u3092 ${(0,ae.join)(e.outputDir,Gy)} \u306B\u4FDD\u5B58\u3057\u307E\u3057\u305F`)}function FZ(e,t,r,n){let o=(0,ae.join)(r.outputDir,"terraform","godd-notes",r.env),i=(0,ae.join)(r.outputDir,"terraform","godd-notes",`${r.env}-iam`),s=(0,ae.join)(r.outputDir,".github","workflows");(0,me.mkdirSync)(o,{recursive:!0}),(0,me.mkdirSync)(i,{recursive:!0}),(0,me.mkdirSync)(s,{recursive:!0});let a=(0,me.readdirSync)(e).filter(m=>m.endsWith(".tf.hbs")),c=["iam.tf.hbs"],u=a.filter(m=>!c.includes(m));console.log(`
|
|
271
|
+
[1/3] Terraform \u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210: ${o}`);for(let m of u){let y=m.replace(".hbs",""),_=Yo((0,ae.join)(e,m),n);(0,me.writeFileSync)((0,ae.join)(o,y),_),console.log(` \u2713 ${y}`)}console.log(`
|
|
272
|
+
[2/3] IAM Terraform \u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210: ${i}`);for(let m of c){let y=m.replace(".hbs",""),_=Yo((0,ae.join)(e,m),n);(0,me.writeFileSync)((0,ae.join)(i,y),_),console.log(` \u2713 ${y}`)}let p=Yo((0,ae.join)(e,"provider.tf.hbs"),n);(0,me.writeFileSync)((0,ae.join)(i,"provider.tf"),p),console.log(" \u2713 provider.tf");let l=(0,me.readFileSync)((0,ae.join)(e,"backend.tf.hbs"),"utf-8"),h=Vy.default.compile(l,{noEscape:!0})({...n,env:`${r.env}-iam`});(0,me.writeFileSync)((0,ae.join)(i,"backend.tf"),h),console.log(" \u2713 backend.tf"),console.log(`
|
|
273
|
+
[3/3] GitHub Actions \u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3092\u751F\u6210: ${s}`);let f=(0,me.readdirSync)(t).filter(m=>m.endsWith(".yml.hbs"));for(let m of f){let y=m.replace(".hbs",""),_=Yo((0,ae.join)(t,m),n);(0,me.writeFileSync)((0,ae.join)(s,y),_),console.log(` \u2713 ${y}`)}}function UZ(e,t,r,n){let o=(0,ae.join)(r.outputDir,"terraform","godd-notes",r.env),i=(0,ae.join)(r.outputDir,".github","workflows");(0,me.mkdirSync)(o,{recursive:!0}),(0,me.mkdirSync)(i,{recursive:!0});let s=(0,me.readdirSync)(e).filter(c=>c.endsWith(".tf.hbs"));console.log(`
|
|
274
|
+
[1/2] Terraform \u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210: ${o}`);for(let c of s){let u=c.replace(".hbs",""),p=Yo((0,ae.join)(e,c),n);(0,me.writeFileSync)((0,ae.join)(o,u),p),console.log(` \u2713 ${u}`)}console.log(`
|
|
275
|
+
[2/2] GitHub Actions \u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u3092\u751F\u6210: ${i}`);let a=(0,me.readdirSync)(t).filter(c=>c.endsWith(".yml.hbs"));for(let c of a){let u=c.replace(".hbs",""),p=Yo((0,ae.join)(t,c),n);(0,me.writeFileSync)((0,ae.join)(i,u),p),console.log(` \u2713 ${u}`)}}function BZ(e){switch(e.provider){case"aws":console.log(`
|
|
276
|
+
\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
|
|
277
|
+
\u2551 AWS \u30A4\u30F3\u30D5\u30E9\u30D5\u30A1\u30A4\u30EB\u751F\u6210\u5B8C\u4E86 \u2551
|
|
278
|
+
\u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563
|
|
279
|
+
\u2551 \u2551
|
|
280
|
+
\u2551 \u6B21\u306E\u30B9\u30C6\u30C3\u30D7: \u2551
|
|
281
|
+
\u2551 \u2551
|
|
282
|
+
\u2551 1. Terraform state \u7528 S3 \u3092\u4F5C\u6210 \u2551
|
|
283
|
+
\u2551 scripts/terraform-backend-setup.sh \u2551
|
|
284
|
+
\u2551 \u2551
|
|
285
|
+
\u2551 2. IAM / OIDC \u3092\u9069\u7528 \u2551
|
|
286
|
+
\u2551 cd terraform/godd-notes/${e.env}-iam \u2551
|
|
287
|
+
\u2551 terraform init && terraform apply \u2551
|
|
288
|
+
\u2551 \u2551
|
|
289
|
+
\u2551 3. \u30E1\u30A4\u30F3\u30A4\u30F3\u30D5\u30E9\u3092\u9069\u7528 \u2551
|
|
290
|
+
\u2551 cd terraform/godd-notes/${e.env} \u2551
|
|
291
|
+
\u2551 terraform init && terraform apply \u2551
|
|
292
|
+
\u2551 \u2551
|
|
293
|
+
\u2551 4. Secrets Manager \u306B\u5024\u3092\u6295\u5165 \u2551
|
|
294
|
+
\u2551 - jwt-secret \u2551
|
|
295
|
+
\u2551 - admin-credentials \u2551
|
|
296
|
+
\u2551 - github-token (\u4EFB\u610F) \u2551
|
|
297
|
+
\u2551 \u2551
|
|
298
|
+
\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
299
|
+
`);break;case"gcp":console.log(`
|
|
300
|
+
\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
|
|
301
|
+
\u2551 GCP \u30A4\u30F3\u30D5\u30E9\u30D5\u30A1\u30A4\u30EB\u751F\u6210\u5B8C\u4E86 \u2551
|
|
302
|
+
\u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563
|
|
303
|
+
\u2551 \u2551
|
|
304
|
+
\u2551 \u6B21\u306E\u30B9\u30C6\u30C3\u30D7: \u2551
|
|
305
|
+
\u2551 \u2551
|
|
306
|
+
\u2551 1. GCS \u30D0\u30B1\u30C3\u30C8\u3092\u4F5C\u6210 (tfstate \u7528) \u2551
|
|
307
|
+
\u2551 gsutil mb gs://godd-ripla-notes-tfstate-* \u2551
|
|
308
|
+
\u2551 \u2551
|
|
309
|
+
\u2551 2. Terraform \u3092\u9069\u7528 \u2551
|
|
310
|
+
\u2551 cd terraform/godd-notes/${e.env} \u2551
|
|
311
|
+
\u2551 terraform init && terraform apply \u2551
|
|
312
|
+
\u2551 \u2551
|
|
313
|
+
\u2551 3. GitHub Secrets \u306B\u8A2D\u5B9A \u2551
|
|
314
|
+
\u2551 - GCP_WORKLOAD_IDENTITY_PROVIDER \u2551
|
|
315
|
+
\u2551 - GCP_SERVICE_ACCOUNT \u2551
|
|
316
|
+
\u2551 \u2551
|
|
317
|
+
\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
318
|
+
`);break;case"azure":console.log(`
|
|
319
|
+
\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
|
|
320
|
+
\u2551 Azure \u30A4\u30F3\u30D5\u30E9\u30D5\u30A1\u30A4\u30EB\u751F\u6210\u5B8C\u4E86 \u2551
|
|
321
|
+
\u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563
|
|
322
|
+
\u2551 \u2551
|
|
323
|
+
\u2551 \u6B21\u306E\u30B9\u30C6\u30C3\u30D7: \u2551
|
|
324
|
+
\u2551 \u2551
|
|
325
|
+
\u2551 1. tfstate \u7528 Storage Account \u3092\u4F5C\u6210 \u2551
|
|
326
|
+
\u2551 az storage account create ... \u2551
|
|
327
|
+
\u2551 \u2551
|
|
328
|
+
\u2551 2. Terraform \u3092\u9069\u7528 \u2551
|
|
329
|
+
\u2551 cd terraform/godd-notes/${e.env} \u2551
|
|
330
|
+
\u2551 terraform init && terraform apply \u2551
|
|
331
|
+
\u2551 \u2551
|
|
332
|
+
\u2551 3. GitHub Secrets \u306B\u8A2D\u5B9A \u2551
|
|
333
|
+
\u2551 - AZURE_CLIENT_ID \u2551
|
|
334
|
+
\u2551 - AZURE_TENANT_ID \u2551
|
|
335
|
+
\u2551 \u2551
|
|
336
|
+
\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
337
|
+
`);break;case"vercel-railway":console.log(`
|
|
338
|
+
\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
|
|
339
|
+
\u2551 Vercel \xD7 Railway \u30D5\u30A1\u30A4\u30EB\u751F\u6210\u5B8C\u4E86 \u2551
|
|
340
|
+
\u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563
|
|
341
|
+
\u2551 \u2551
|
|
342
|
+
\u2551 \u6B21\u306E\u30B9\u30C6\u30C3\u30D7: \u2551
|
|
343
|
+
\u2551 \u2551
|
|
344
|
+
\u2551 1. Railway \u3067\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u4F5C\u6210 \u2551
|
|
345
|
+
\u2551 railway init \u2551
|
|
346
|
+
\u2551 railway add --database postgresql \u2551
|
|
347
|
+
\u2551 \u2551
|
|
348
|
+
\u2551 2. Vercel \u3067\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u9023\u643A \u2551
|
|
349
|
+
\u2551 vercel link \u2551
|
|
350
|
+
\u2551 \u2551
|
|
351
|
+
\u2551 3. GitHub Secrets \u306B\u8A2D\u5B9A \u2551
|
|
352
|
+
\u2551 - RAILWAY_TOKEN \u2551
|
|
353
|
+
\u2551 - VERCEL_TOKEN \u2551
|
|
354
|
+
\u2551 - VERCEL_ORG_ID \u2551
|
|
355
|
+
\u2551 - VERCEL_PROJECT_ID \u2551
|
|
356
|
+
\u2551 \u2551
|
|
357
|
+
\u2551 4. (\u4EFB\u610F) Terraform \u3067\u7BA1\u7406\u3059\u308B\u5834\u5408 \u2551
|
|
358
|
+
\u2551 cd terraform/godd-notes/${e.env} \u2551
|
|
359
|
+
\u2551 terraform init && terraform apply \u2551
|
|
360
|
+
\u2551 \u2551
|
|
361
|
+
\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
362
|
+
`);break}}async function VZ(e){if(e.includes("--help")||e.includes("-h")){console.log(`
|
|
363
|
+
GoDD Notes Infra \u2014 \u30DE\u30EB\u30C1\u30AF\u30E9\u30A6\u30C9 \u30A4\u30F3\u30D5\u30E9\u81EA\u52D5\u751F\u6210
|
|
364
|
+
|
|
365
|
+
Usage: godd notes infra [options]
|
|
366
|
+
|
|
367
|
+
\u5BFE\u5FDC\u30D7\u30ED\u30D0\u30A4\u30C0:
|
|
368
|
+
AWS ECS Fargate + S3/CloudFront + RDS PostgreSQL
|
|
369
|
+
GCP Cloud Run + GCS + Cloud SQL
|
|
370
|
+
Azure Container Apps + Blob Storage + PostgreSQL
|
|
371
|
+
Vercel\xD7Railway PaaS \u69CB\u6210\uFF08\u30D5\u30ED\u30F3\u30C8: Vercel / \u30D0\u30C3\u30AF\u30A8\u30F3\u30C9: Railway\uFF09
|
|
372
|
+
|
|
373
|
+
\u8A2D\u5B9A\u306E\u6C38\u7D9A\u5316:
|
|
374
|
+
\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u30EB\u30FC\u30C8\u306B .godd-notes-infra.json \u304C\u4FDD\u5B58\u3055\u308C\u3001
|
|
375
|
+
\u6B21\u56DE\u5B9F\u884C\u6642\u306B\u30C7\u30D5\u30A9\u30EB\u30C8\u5024\u3068\u3057\u3066\u518D\u5229\u7528\u3055\u308C\u307E\u3059\u3002
|
|
376
|
+
|
|
377
|
+
Options:
|
|
378
|
+
--help, -h \u3053\u306E\u30D8\u30EB\u30D7\u3092\u8868\u793A
|
|
379
|
+
`);return}let t=EZ();try{let r=await LZ(t);if(ZZ(r),(await te(t,`
|
|
380
|
+
\u3053\u306E\u8A2D\u5B9A\u3067\u751F\u6210\u3057\u307E\u3059\u304B\uFF1F [Y/n]: `)).toLowerCase()==="n"){console.log("\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u307E\u3057\u305F\u3002");return}qZ(r),BZ(r)}finally{t.close()}}var lT,me,ae,pT,Vy,HZ,Hy,Gy,fT=v(()=>{"use strict";lT=St(require("node:readline"),1),me=require("node:fs"),ae=require("node:path"),pT=require("node:url"),Vy=St(Ng(),1),HZ={},Hy={aws:"AWS (ECS Fargate + S3/CloudFront + RDS)",gcp:"GCP (Cloud Run + GCS + Cloud SQL)",azure:"Azure (Container Apps + Blob Storage + PostgreSQL)","vercel-railway":"Vercel \xD7 Railway (PaaS)"};Gy=".godd-notes-infra.json"});var vT={};Mr(vT,{checkDocker:()=>yT,generateEnvFile:()=>_T,generateSecret:()=>tl,runNotes:()=>t5});function GZ(){return hT.createInterface({input:process.stdin,output:process.stdout})}function lt(e,t){return new Promise(r=>{e.question(t,n=>r(n.trim()))})}function tl(e=48){return mT.randomBytes(e).toString("base64url").slice(0,e)}function yT(){try{return(0,Qo.execSync)("docker --version",{stdio:"ignore"}),(0,Qo.execSync)("docker compose version",{stdio:"ignore"}),!0}catch{return!1}}function WZ(){try{return(0,tt.dirname)((0,gT.fileURLToPath)(r5.url))}catch{return(0,tt.dirname)(process.execPath)}}function KZ(){let e=WZ(),t=(0,tt.resolve)(e,".."),r=(0,tt.join)(t,"notes-api"),n=(0,tt.join)(t,"notes-app"),o=(0,tt.join)(t,"templates","notes-compose.yml");return(0,Me.existsSync)(r)&&(0,Me.existsSync)(n)&&(0,Me.existsSync)(o)?{apiDir:r,appDir:n,composeTemplate:o}:null}function Ky(e,t){(0,Me.mkdirSync)(t,{recursive:!0});for(let r of(0,Me.readdirSync)(e)){if(JZ.has(r)||r.endsWith(".pyc")||r.endsWith(".tsbuildinfo"))continue;let n=(0,tt.join)(e,r),o=(0,tt.join)(t,r);(0,Me.statSync)(n).isDirectory()?Ky(n,o):(0,Me.copyFileSync)(n,o)}}function YZ(e,t){return new Promise(r=>{(0,Qo.spawn)("docker",["compose",...t],{cwd:e,stdio:"inherit",shell:!0}).on("close",o=>r(o??1))})}async function QZ(e,t=12e4){let r=Date.now(),n=3e3;for(;Date.now()-r<t;)try{return(0,Qo.execSync)(`node -e "const http=require('http');const r=http.get('${e}',{timeout:3000},res=>{process.exit(res.statusCode===200?0:1)});r.on('error',()=>process.exit(1))"`,{stdio:"ignore",timeout:5e3}),!0}catch{await new Promise(o=>setTimeout(o,n))}return!1}async function XZ(e){console.log(`
|
|
381
|
+
\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
|
|
382
|
+
\u2551 ripla Notes \u30C7\u30D7\u30ED\u30A4\u30A6\u30A3\u30B6\u30FC\u30C9 \u2551
|
|
383
|
+
\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
384
|
+
`);let t=await lt(e,"\u30C7\u30D7\u30ED\u30A4\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA [./ripla-notes]: ")||"./ripla-notes";console.log(`
|
|
385
|
+
--- PostgreSQL \u8A2D\u5B9A ---`);let r=await lt(e,"DB \u30E6\u30FC\u30B6\u30FC [app_user]: ")||"app_user",n=await lt(e,"DB \u30D1\u30B9\u30EF\u30FC\u30C9 [\u81EA\u52D5\u751F\u6210]: ")||tl(24),o=await lt(e,"DB \u540D [ripla_notes]: ")||"ripla_notes",i=await lt(e,"PostgreSQL \u30DD\u30FC\u30C8 [5432]: ")||"5432";console.log(`
|
|
386
|
+
--- \u30DD\u30FC\u30C8\u8A2D\u5B9A ---`);let s=await lt(e,"Notes API \u30DD\u30FC\u30C8 [3100]: ")||"3100",a=await lt(e,"Notes App \u30DD\u30FC\u30C8 [5175]: ")||"5175";console.log(`
|
|
387
|
+
--- GitHub \u9023\u643A ---`);let c=await lt(e,"GitHub Token (ghp_xxx): "),u=await lt(e,"GitHub Owner (\u7D44\u7E54 or \u30E6\u30FC\u30B6\u30FC\u540D): "),p=await lt(e,"GitHub Repo (\u30EA\u30DD\u30B8\u30C8\u30EA\u540D): "),l=await lt(e,"GitHub Branch [main]: ")||"main";console.log(`
|
|
388
|
+
--- \u30BB\u30AD\u30E5\u30EA\u30C6\u30A3 ---`);let d=await lt(e,"JWT \u30B7\u30FC\u30AF\u30EC\u30C3\u30C8 [\u81EA\u52D5\u751F\u6210]: ")||tl(48);console.log(`
|
|
389
|
+
--- \u7BA1\u7406\u8005\u30A2\u30AB\u30A6\u30F3\u30C8 ---`);let h=await lt(e,"\u7BA1\u7406\u8005\u30E6\u30FC\u30B6\u30FC\u540D [admin]: ")||"admin",f=await lt(e,"\u7BA1\u7406\u8005\u30D1\u30B9\u30EF\u30FC\u30C9: ")||tl(16);return{deployDir:(0,tt.resolve)(t),postgresUser:r,postgresPassword:n,postgresDb:o,postgresPort:i,notesApiPort:s,notesAppPort:a,githubToken:c,githubOwner:u,githubRepo:p,githubBranch:l,jwtSecret:d,adminUsername:h,adminPassword:f}}function _T(e){return["# ripla Notes \u74B0\u5883\u5909\u6570\uFF08\u81EA\u52D5\u751F\u6210\uFF09",`POSTGRES_USER=${e.postgresUser}`,`POSTGRES_PASSWORD=${e.postgresPassword}`,`POSTGRES_DB=${e.postgresDb}`,`POSTGRES_PORT=${e.postgresPort}`,`NOTES_API_PORT=${e.notesApiPort}`,`NOTES_APP_PORT=${e.notesAppPort}`,`GITHUB_TOKEN=${e.githubToken}`,`GITHUB_OWNER=${e.githubOwner}`,`GITHUB_REPO=${e.githubRepo}`,`GITHUB_BRANCH=${e.githubBranch}`,`JWT_SECRET=${e.jwtSecret}`,`NOTES_ADMIN_USERNAME=${e.adminUsername}`,`NOTES_ADMIN_PASSWORD=${e.adminPassword}`,""].join(`
|
|
390
|
+
`)}async function e5(e){let t=KZ();t||(console.error("\u30A8\u30E9\u30FC: notes-api / notes-app \u306E\u30BD\u30FC\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002"),console.error("npm \u30D1\u30C3\u30B1\u30FC\u30B8\u304C\u6B63\u3057\u304F\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u3066\u3044\u308B\u304B\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1));let{apiDir:r,appDir:n,composeTemplate:o}=t;console.log(`
|
|
391
|
+
[1/5] \u30C7\u30D7\u30ED\u30A4\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u6E96\u5099: ${e.deployDir}`),(0,Me.mkdirSync)(e.deployDir,{recursive:!0}),console.log("[2/5] notes-api \u3092\u30B3\u30D4\u30FC..."),Ky(r,(0,tt.join)(e.deployDir,"notes-api")),console.log("[3/5] notes-app \u3092\u30B3\u30D4\u30FC..."),Ky(n,(0,tt.join)(e.deployDir,"notes-app")),console.log("[4/5] docker-compose.yml \u3068 .env \u3092\u751F\u6210...");let i=(0,Me.readFileSync)(o,"utf-8");(0,Me.writeFileSync)((0,tt.join)(e.deployDir,"docker-compose.yml"),i),(0,Me.writeFileSync)((0,tt.join)(e.deployDir,".env"),_T(e)),console.log("[5/5] Docker Compose \u3067\u30B5\u30FC\u30D3\u30B9\u3092\u8D77\u52D5..."),await YZ(e.deployDir,["up","-d","--build"])!==0&&(console.error(`
|
|
392
|
+
\u30A8\u30E9\u30FC: docker compose up \u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002`),console.error(`\u30ED\u30B0\u3092\u78BA\u8A8D: cd ${e.deployDir} && docker compose logs`),process.exit(1)),console.log(`
|
|
393
|
+
\u30D8\u30EB\u30B9\u30C1\u30A7\u30C3\u30AF\u5F85\u6A5F\u4E2D...`);let a=`http://localhost:${e.notesApiPort}/api/health`;await QZ(a)||(console.warn(`
|
|
394
|
+
\u8B66\u544A: \u30D8\u30EB\u30B9\u30C1\u30A7\u30C3\u30AF\u304C\u30BF\u30A4\u30E0\u30A2\u30A6\u30C8\u3057\u307E\u3057\u305F\u3002`),console.warn("\u30B5\u30FC\u30D3\u30B9\u306E\u8D77\u52D5\u306B\u6642\u9593\u304C\u304B\u304B\u3063\u3066\u3044\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002"),console.warn(`\u624B\u52D5\u3067\u78BA\u8A8D: curl ${a}`));let u=`http://localhost:${e.notesAppPort}`,p=`http://localhost:${e.notesApiPort}`;console.log(`
|
|
395
|
+
\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
|
|
396
|
+
\u2551 ripla Notes \u30C7\u30D7\u30ED\u30A4\u5B8C\u4E86 \u2551
|
|
397
|
+
\u2560\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2563
|
|
398
|
+
\u2551 \u2551
|
|
399
|
+
\u2551 Notes App: ${u.padEnd(35)}\u2551
|
|
400
|
+
\u2551 Notes API: ${p.padEnd(35)}\u2551
|
|
401
|
+
\u2551 API Docs: ${(p+"/docs").padEnd(35)}\u2551
|
|
402
|
+
\u2551 \u2551
|
|
403
|
+
\u2551 \u30C7\u30D7\u30ED\u30A4\u5148: ${e.deployDir.slice(0,33).padEnd(35)}\u2551
|
|
404
|
+
\u2551 \u2551
|
|
405
|
+
\u2551 \u7BA1\u7406\u8005: \u2551
|
|
406
|
+
\u2551 \u30E6\u30FC\u30B6\u30FC\u540D: ${e.adminUsername.padEnd(33)}\u2551
|
|
407
|
+
\u2551 \u30D1\u30B9\u30EF\u30FC\u30C9: ${e.adminPassword.padEnd(33)}\u2551
|
|
408
|
+
\u2551 \u2551
|
|
409
|
+
\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
410
|
+
|
|
411
|
+
\u64CD\u4F5C\u30B3\u30DE\u30F3\u30C9:
|
|
412
|
+
cd ${e.deployDir}
|
|
413
|
+
docker compose logs -f # \u30ED\u30B0\u8868\u793A
|
|
414
|
+
docker compose stop # \u505C\u6B62
|
|
415
|
+
docker compose start # \u518D\u958B
|
|
416
|
+
docker compose down -v # \u5B8C\u5168\u524A\u9664
|
|
417
|
+
`)}function Wy(){console.log(`
|
|
418
|
+
GoDD Notes \u2014 ripla Notes \u30C7\u30D7\u30ED\u30A4\u7BA1\u7406
|
|
419
|
+
|
|
420
|
+
Usage: godd notes <command>
|
|
421
|
+
|
|
422
|
+
Commands:
|
|
423
|
+
deploy ripla Notes \u3092 Docker Compose \u3067\u30C7\u30D7\u30ED\u30A4\uFF08\u5BFE\u8A71\u30A6\u30A3\u30B6\u30FC\u30C9\uFF09
|
|
424
|
+
infra \u30AF\u30E9\u30A6\u30C9\u30A4\u30F3\u30D5\u30E9\u3092 Terraform + GitHub Actions \u3067\u69CB\u7BC9
|
|
425
|
+
|
|
426
|
+
\u5BFE\u5FDC\u30D7\u30ED\u30D0\u30A4\u30C0 (infra):
|
|
427
|
+
AWS ECS Fargate + S3/CloudFront + RDS [\u30C7\u30D5\u30A9\u30EB\u30C8]
|
|
428
|
+
GCP Cloud Run + GCS + Cloud SQL
|
|
429
|
+
Azure Container Apps + Blob Storage + PostgreSQL
|
|
430
|
+
Vercel\xD7Railway PaaS \u69CB\u6210\uFF08\u30D5\u30ED\u30F3\u30C8: Vercel / API: Railway\uFF09
|
|
431
|
+
|
|
432
|
+
Examples:
|
|
433
|
+
godd notes deploy Docker Compose \u3067 Notes \u74B0\u5883\u3092\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7 & \u8D77\u52D5
|
|
434
|
+
godd notes infra \u5BFE\u8A71\u5F62\u5F0F\u3067\u30D7\u30ED\u30D0\u30A4\u30C0\u9078\u629E \u2192 Terraform + CI/CD \u30D5\u30A1\u30A4\u30EB\u751F\u6210
|
|
435
|
+
|
|
436
|
+
\u8A2D\u5B9A\u306E\u6C38\u7D9A\u5316:
|
|
437
|
+
infra \u30B3\u30DE\u30F3\u30C9\u306F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3054\u3068\u306B .godd-notes-infra.json \u3092\u4FDD\u5B58\u3057\u3001
|
|
438
|
+
\u6B21\u56DE\u5B9F\u884C\u6642\u306B\u30C7\u30D5\u30A9\u30EB\u30C8\u5024\u3068\u3057\u3066\u518D\u5229\u7528\u3057\u307E\u3059\u3002
|
|
439
|
+
`)}async function t5(e){let t=e[0]??"deploy";switch(t){case"deploy":{if(e.includes("--help")||e.includes("-h")){Wy();return}yT()||(console.error("\u30A8\u30E9\u30FC: Docker \u304A\u3088\u3073 Docker Compose \u304C\u5FC5\u8981\u3067\u3059\u3002"),console.error("https://docs.docker.com/get-docker/ \u304B\u3089\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u3066\u304F\u3060\u3055\u3044\u3002"),process.exit(1));let r=GZ();try{let n=await XZ(r);if(console.log(`
|
|
440
|
+
--- \u30C7\u30D7\u30ED\u30A4\u8A2D\u5B9A\u306E\u78BA\u8A8D ---`),console.log(` \u30C7\u30D7\u30ED\u30A4\u5148: ${n.deployDir}`),console.log(` DB: ${n.postgresUser}@localhost:${n.postgresPort}/${n.postgresDb}`),console.log(` API \u30DD\u30FC\u30C8: ${n.notesApiPort}`),console.log(` App \u30DD\u30FC\u30C8: ${n.notesAppPort}`),console.log(` GitHub: ${n.githubOwner}/${n.githubRepo} (${n.githubBranch})`),console.log(` \u7BA1\u7406\u8005: ${n.adminUsername}`),(await lt(r,`
|
|
441
|
+
\u3053\u306E\u8A2D\u5B9A\u3067\u30C7\u30D7\u30ED\u30A4\u3057\u307E\u3059\u304B\uFF1F [Y/n]: `)).toLowerCase()==="n"){console.log("\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u307E\u3057\u305F\u3002");return}await e5(n)}finally{r.close()}break}case"infra":{let{runNotesInfra:r}=await Promise.resolve().then(()=>(fT(),dT));await r(e.slice(1));break}case"help":case"--help":case"-h":Wy();break;default:console.error(`\u4E0D\u660E\u306A\u30B5\u30D6\u30B3\u30DE\u30F3\u30C9: ${t}`),Wy(),process.exit(1)}}var hT,mT,Me,tt,Qo,gT,r5,JZ,bT=v(()=>{"use strict";hT=St(require("node:readline"),1),mT=St(require("node:crypto"),1),Me=require("node:fs"),tt=require("node:path"),Qo=require("node:child_process"),gT=require("node:url"),r5={};JZ=new Set([".venv","__pycache__",".pytest_cache",".ruff_cache","node_modules",".git",".env","dist"])});var kT=require("node:fs"),Es=require("node:path"),Jy=require("node:os");process.env.__GODD_CLI__="1";var wT="0.1.0";function n5(){let e=process.platform==="win32"?"godd.exe":"godd",t=process.platform==="win32"?(0,Es.join)(process.env.LOCALAPPDATA??(0,Es.join)((0,Jy.homedir)(),"AppData","Local"),"GoDD"):(0,Es.join)((0,Jy.homedir)(),".godd","bin");return(0,kT.existsSync)((0,Es.join)(t,e))}var o5={i:"install",s:"server",n:"notes",v:"version",h:"help"};function i5(){return n5()?"help":"install"}var rl=process.argv[2],s5=rl?o5[rl]??rl:i5();function xT(){console.log(`
|
|
442
|
+
GoDD CLI v${wT}
|
|
443
|
+
|
|
444
|
+
Usage: godd <command>
|
|
445
|
+
|
|
446
|
+
Commands:
|
|
447
|
+
server, s MCP \u30B5\u30FC\u30D0\u30FC\u3092\u8D77\u52D5\uFF08Cursor IDE \u304C\u81EA\u52D5\u547C\u3073\u51FA\u3057\uFF09
|
|
448
|
+
init \u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\uFF08config.yaml + .cursor/mcp.json \u751F\u6210\uFF09
|
|
449
|
+
install, i godd \u3092 PATH \u306B\u767B\u9332\uFF08\u521D\u56DE\u306E\u307F\uFF09
|
|
450
|
+
notes, n ripla Notes \u306E\u30C7\u30D7\u30ED\u30A4\u7BA1\u7406
|
|
451
|
+
version, v \u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u8868\u793A
|
|
452
|
+
help, h \u3053\u306E\u30D8\u30EB\u30D7\u3092\u8868\u793A
|
|
453
|
+
|
|
454
|
+
Examples:
|
|
455
|
+
godd install GoDD CLI \u3092\u30B7\u30B9\u30C6\u30E0\u306B\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB
|
|
456
|
+
godd init \u73FE\u5728\u306E\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3092\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7
|
|
457
|
+
godd notes deploy ripla Notes \u3092 Docker Compose \u3067\u30C7\u30D7\u30ED\u30A4
|
|
458
|
+
godd notes infra \u30AF\u30E9\u30A6\u30C9\u30A4\u30F3\u30D5\u30E9\u3092\u5BFE\u8A71\u5F62\u5F0F\u3067\u69CB\u7BC9 (AWS/GCP/Azure/Vercel\xD7Railway)
|
|
459
|
+
godd version \u30D0\u30FC\u30B8\u30E7\u30F3\u78BA\u8A8D
|
|
460
|
+
`)}async function a5(){switch(s5){case"server":{let{startServer:e}=await Promise.resolve().then(()=>(K$(),G$));await e();break}case"init":{let{runInit:e}=await Promise.resolve().then(()=>(oT(),rT));await e();break}case"install":{let{runInstall:e}=await Promise.resolve().then(()=>(uT(),cT));await e();break}case"notes":{let{runNotes:e}=await Promise.resolve().then(()=>(bT(),vT));await e(process.argv.slice(3));break}case"version":console.log(`GoDD CLI v${wT}`);break;case"help":xT();break;default:console.error(`\u4E0D\u660E\u306A\u30B3\u30DE\u30F3\u30C9: ${rl}`),xT(),process.exit(1)}}a5().catch(e=>{console.error("GoDD CLI \u30A8\u30E9\u30FC:",e),process.exit(1)});
|
|
461
|
+
/*! Bundled license information:
|
|
462
|
+
|
|
463
|
+
js-yaml/dist/js-yaml.mjs:
|
|
464
|
+
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
465
|
+
*/
|