@wp-playground/client 0.9.27 → 0.9.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/index.cjs +36 -29
  2. package/index.d.ts +2 -1
  3. package/index.js +2594 -2520
  4. package/package.json +8 -8
package/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const et=function(){var r;return typeof process<"u"&&((r=process.release)==null?void 0:r.name)==="node"?"NODE":typeof window<"u"?"WEB":typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?"WORKER":"NODE"}();if(et==="NODE"){let r=function(n){return new Promise(function(p,l){n.onload=n.onerror=function(i){n.onload=n.onerror=null,i.type==="load"?p(n.result):l(new Error("Failed to read the blob/file"))}})},t=function(){const n=new Uint8Array([1,2,3,4]),l=new File([n],"test").stream();try{return l.getReader({mode:"byob"}),!0}catch{return!1}};if(typeof File>"u"){class n extends Blob{constructor(l,i,e){super(l);let u;e!=null&&e.lastModified&&(u=new Date),(!u||isNaN(u.getFullYear()))&&(u=new Date),this.lastModifiedDate=u,this.lastModified=u.getMilliseconds(),this.name=i||""}}global.File=n}typeof Blob.prototype.arrayBuffer>"u"&&(Blob.prototype.arrayBuffer=function(){const p=new FileReader;return p.readAsArrayBuffer(this),r(p)}),typeof Blob.prototype.text>"u"&&(Blob.prototype.text=function(){const p=new FileReader;return p.readAsText(this),r(p)}),(typeof Blob.prototype.stream>"u"||!t())&&(Blob.prototype.stream=function(){let n=0;const p=this;return new ReadableStream({type:"bytes",autoAllocateChunkSize:512*1024,async pull(l){const i=l.byobRequest.view,u=await p.slice(n,n+i.byteLength).arrayBuffer(),h=new Uint8Array(u);new Uint8Array(i.buffer).set(h);const b=h.byteLength;l.byobRequest.respond(b),n+=b,n>=p.size&&l.close()}})})}if(et==="NODE"&&typeof CustomEvent>"u"){class r extends Event{constructor(n,p={}){super(n,p),this.detail=p.detail}initCustomEvent(){}}globalThis.CustomEvent=r}const qr=["db.php","plugins/akismet","plugins/hello.php","plugins/wordpress-importer","mu-plugins/sqlite-database-integration","mu-plugins/playground-includes","mu-plugins/0-playground.php","mu-plugins/0-sqlite.php","themes/twentytwenty","themes/twentytwentyone","themes/twentytwentytwo","themes/twentytwentythree","themes/twentytwentyfour","themes/twentytwentyfive","themes/twentytwentysix"],rt=Symbol("SleepFinished");function Yt(r){return new Promise(t=>{setTimeout(()=>t(rt),r)})}class Zt extends Error{constructor(){super("Acquiring lock timed out")}}class Qt{constructor({concurrency:t,timeout:n}){this._running=0,this.concurrency=t,this.timeout=n,this.queue=[]}get remaining(){return this.concurrency-this.running}get running(){return this._running}async acquire(){for(;;)if(this._running>=this.concurrency){const t=new Promise(n=>{this.queue.push(n)});this.timeout!==void 0?await Promise.race([t,Yt(this.timeout)]).then(n=>{if(n===rt)throw new Zt}):await t}else{this._running++;let t=!1;return()=>{t||(t=!0,this._running--,this.queue.length>0&&this.queue.shift()())}}}async run(t){const n=await this.acquire();try{return await t()}finally{n()}}}function ie(...r){function t(i){return i.substring(i.length-1)==="/"}let n=r.join("/");const p=n[0]==="/",l=t(n);return n=st(n),!n&&!p&&(n="."),n&&l&&!t(n)&&(n+="/"),n}function tt(r){if(r==="/")return"/";r=st(r);const t=r.lastIndexOf("/");return t===-1?"":t===0?"/":r.substr(0,t)}function st(r){const t=r[0]==="/";return r=Jt(r.split("/").filter(n=>!!n),!t).join("/"),(t?"/":"")+r.replace(/\/$/,"")}function Jt(r,t){let n=0;for(let p=r.length-1;p>=0;p--){const l=r[p];l==="."?r.splice(p,1):l===".."?(r.splice(p,1),n++):n&&(r.splice(p,1),n--)}if(t)for(;n;n--)r.unshift("..");return r}function it(r=36,t="!@#$%^&*()_+=-[]/.,<>?"){const n="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"+t;let p="";for(let l=r;l>0;--l)p+=n[Math.floor(Math.random()*n.length)];return p}function Kt(){return it(36,"-_")}function se(r){return`json_decode(base64_decode('${Xt(JSON.stringify(r))}'), true)`}function We(r){const t={};for(const n in r)t[n]=se(r[n]);return t}function Xt(r){return es(new TextEncoder().encode(r))}function es(r){const t=String.fromCodePoint(...r);return btoa(t)}const rs="playground-log",Mr=(r,...t)=>{ae.dispatchEvent(new CustomEvent(rs,{detail:{log:r,args:t}}))},ts=(r,...t)=>{switch(typeof r.message=="string"?r.message=Tr(r.message):r.message.message&&typeof r.message.message=="string"&&(r.message.message=Tr(r.message.message)),r.severity){case"Debug":console.debug(r.message,...t);break;case"Info":console.info(r.message,...t);break;case"Warn":console.warn(r.message,...t);break;case"Error":console.error(r.message,...t);break;case"Fatal":console.error(r.message,...t);break;default:console.log(r.message,...t)}},ss=r=>r instanceof Error?[r.message,r.stack].join(`
2
- `):JSON.stringify(r,null,2),nt=[],Br=r=>{nt.push(r)},$r=r=>{if(r.raw===!0)Br(r.message);else{const t=os(typeof r.message=="object"?ss(r.message):r.message,r.severity??"Info",r.prefix??"JavaScript");Br(t)}};class is extends EventTarget{constructor(t=[]){super(),this.handlers=t,this.fatalErrorEvent="playground-fatal-error"}getLogs(){return this.handlers.includes($r)?[...nt]:(this.error(`Logs aren't stored because the logToMemory handler isn't registered.
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Xr=function(){var r;return typeof process<"u"&&((r=process.release)==null?void 0:r.name)==="node"?"NODE":typeof window<"u"?"WEB":typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?"WORKER":"NODE"}();if(Xr==="NODE"){let r=function(n){return new Promise(function(p,l){n.onload=n.onerror=function(i){n.onload=n.onerror=null,i.type==="load"?p(n.result):l(new Error("Failed to read the blob/file"))}})},t=function(){const n=new Uint8Array([1,2,3,4]),l=new File([n],"test").stream();try{return l.getReader({mode:"byob"}),!0}catch{return!1}};if(typeof File>"u"){class n extends Blob{constructor(l,i,e){super(l);let f;e!=null&&e.lastModified&&(f=new Date),(!f||isNaN(f.getFullYear()))&&(f=new Date),this.lastModifiedDate=f,this.lastModified=f.getMilliseconds(),this.name=i||""}}global.File=n}typeof Blob.prototype.arrayBuffer>"u"&&(Blob.prototype.arrayBuffer=function(){const p=new FileReader;return p.readAsArrayBuffer(this),r(p)}),typeof Blob.prototype.text>"u"&&(Blob.prototype.text=function(){const p=new FileReader;return p.readAsText(this),r(p)}),(typeof Blob.prototype.stream>"u"||!t())&&(Blob.prototype.stream=function(){let n=0;const p=this;return new ReadableStream({type:"bytes",autoAllocateChunkSize:512*1024,async pull(l){const i=l.byobRequest.view,f=await p.slice(n,n+i.byteLength).arrayBuffer(),h=new Uint8Array(f);new Uint8Array(i.buffer).set(h);const b=h.byteLength;l.byobRequest.respond(b),n+=b,n>=p.size&&l.close()}})})}if(Xr==="NODE"&&typeof CustomEvent>"u"){class r extends Event{constructor(n,p={}){super(n,p),this.detail=p.detail}initCustomEvent(){}}globalThis.CustomEvent=r}const Ar=["db.php","plugins/akismet","plugins/hello.php","plugins/wordpress-importer","mu-plugins/sqlite-database-integration","mu-plugins/playground-includes","mu-plugins/0-playground.php","mu-plugins/0-sqlite.php","themes/twentytwenty","themes/twentytwentyone","themes/twentytwentytwo","themes/twentytwentythree","themes/twentytwentyfour","themes/twentytwentyfive","themes/twentytwentysix"],et=Symbol("SleepFinished");function Gt(r){return new Promise(t=>{setTimeout(()=>t(et),r)})}class Yt extends Error{constructor(){super("Acquiring lock timed out")}}class Zt{constructor({concurrency:t,timeout:n}){this._running=0,this.concurrency=t,this.timeout=n,this.queue=[]}get remaining(){return this.concurrency-this.running}get running(){return this._running}async acquire(){for(;;)if(this._running>=this.concurrency){const t=new Promise(n=>{this.queue.push(n)});this.timeout!==void 0?await Promise.race([t,Gt(this.timeout)]).then(n=>{if(n===et)throw new Yt}):await t}else{this._running++;let t=!1;return()=>{t||(t=!0,this._running--,this.queue.length>0&&this.queue.shift()())}}}async run(t){const n=await this.acquire();try{return await t()}finally{n()}}}function ie(...r){function t(i){return i.substring(i.length-1)==="/"}let n=r.join("/");const p=n[0]==="/",l=t(n);return n=tt(n),!n&&!p&&(n="."),n&&l&&!t(n)&&(n+="/"),n}function rt(r){if(r==="/")return"/";r=tt(r);const t=r.lastIndexOf("/");return t===-1?"":t===0?"/":r.substr(0,t)}function tt(r){const t=r[0]==="/";return r=Qt(r.split("/").filter(n=>!!n),!t).join("/"),(t?"/":"")+r.replace(/\/$/,"")}function Qt(r,t){let n=0;for(let p=r.length-1;p>=0;p--){const l=r[p];l==="."?r.splice(p,1):l===".."?(r.splice(p,1),n++):n&&(r.splice(p,1),n--)}if(t)for(;n;n--)r.unshift("..");return r}function st(r=36,t="!@#$%^&*()_+=-[]/.,<>?"){const n="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"+t;let p="";for(let l=r;l>0;--l)p+=n[Math.floor(Math.random()*n.length)];return p}function Jt(){return st(36,"-_")}function se(r){return`json_decode(base64_decode('${Kt(JSON.stringify(r))}'), true)`}function We(r){const t={};for(const n in r)t[n]=se(r[n]);return t}function Kt(r){return Xt(new TextEncoder().encode(r))}function Xt(r){const t=String.fromCodePoint(...r);return btoa(t)}const es="playground-log",Dr=(r,...t)=>{ae.dispatchEvent(new CustomEvent(es,{detail:{log:r,args:t}}))},rs=(r,...t)=>{switch(typeof r.message=="string"?r.message=$r(r.message):r.message.message&&typeof r.message.message=="string"&&(r.message.message=$r(r.message.message)),r.severity){case"Debug":console.debug(r.message,...t);break;case"Info":console.info(r.message,...t);break;case"Warn":console.warn(r.message,...t);break;case"Error":console.error(r.message,...t);break;case"Fatal":console.error(r.message,...t);break;default:console.log(r.message,...t)}},ts=r=>r instanceof Error?[r.message,r.stack].join(`
2
+ `):JSON.stringify(r,null,2),it=[],Mr=r=>{it.push(r)},Er=r=>{if(r.raw===!0)Mr(r.message);else{const t=ns(typeof r.message=="object"?ts(r.message):r.message,r.severity??"Info",r.prefix??"JavaScript");Mr(t)}};class ss extends EventTarget{constructor(t=[]){super(),this.handlers=t,this.fatalErrorEvent="playground-fatal-error"}getLogs(){return this.handlers.includes(Er)?[...it]:(this.error(`Logs aren't stored because the logToMemory handler isn't registered.
3
3
  If you're using a custom logger instance, make sure to register logToMemory handler.
4
- `),[])}logMessage(t,...n){for(const p of this.handlers)p(t,...n)}log(t,...n){this.logMessage({message:t,severity:void 0,prefix:"JavaScript",raw:!1},...n)}debug(t,...n){this.logMessage({message:t,severity:"Debug",prefix:"JavaScript",raw:!1},...n)}info(t,...n){this.logMessage({message:t,severity:"Info",prefix:"JavaScript",raw:!1},...n)}warn(t,...n){this.logMessage({message:t,severity:"Warn",prefix:"JavaScript",raw:!1},...n)}error(t,...n){this.logMessage({message:t,severity:"Error",prefix:"JavaScript",raw:!1},...n)}}const ns=()=>{try{if(process.env.NODE_ENV==="test")return[$r,Mr]}catch{}return[$r,ts,Mr]},ae=new is(ns()),Tr=r=>r.replace(/\t/g,""),os=(r,t,n)=>{const p=new Date,l=new Intl.DateTimeFormat("en-GB",{year:"numeric",month:"short",day:"2-digit",timeZone:"UTC"}).format(p).replace(/ /g,"-"),i=new Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZone:"UTC",timeZoneName:"short"}).format(p),e=l+" "+i;return r=Tr(r),`[${e}] ${n} ${t}: ${r}`};let wr=0;const Ur="/wordpress/wp-content/debug.log",as=async r=>await r.fileExists(Ur)?await r.readFileAsText(Ur):"",ps=(r,t)=>{t.addEventListener("request.end",async()=>{const n=await as(t);if(n.length>wr){const p=n.substring(wr);r.logMessage({message:p,raw:!0}),wr=n.length}}),t.addEventListener("request.error",n=>{n=n,n.error&&(r.logMessage({message:`${n.error.message} ${n.error.stack}`,severity:"Fatal",prefix:n.source==="request"?"PHP":"WASM Crash"}),r.dispatchEvent(new CustomEvent(r.fatalErrorEvent,{detail:{logs:r.getLogs(),source:n.source}})))})},dr=async(r,{pluginPath:t,pluginName:n},p)=>{p==null||p.tracker.setCaption(`Activating ${n||t}`);const l=await r.documentRoot,i=await r.run({code:`<?php
4
+ `),[])}logMessage(t,...n){for(const p of this.handlers)p(t,...n)}log(t,...n){this.logMessage({message:t,severity:void 0,prefix:"JavaScript",raw:!1},...n)}debug(t,...n){this.logMessage({message:t,severity:"Debug",prefix:"JavaScript",raw:!1},...n)}info(t,...n){this.logMessage({message:t,severity:"Info",prefix:"JavaScript",raw:!1},...n)}warn(t,...n){this.logMessage({message:t,severity:"Warn",prefix:"JavaScript",raw:!1},...n)}error(t,...n){this.logMessage({message:t,severity:"Error",prefix:"JavaScript",raw:!1},...n)}}const is=()=>{try{if(process.env.NODE_ENV==="test")return[Er,Dr]}catch{}return[Er,rs,Dr]},ae=new ss(is()),$r=r=>r.replace(/\t/g,""),ns=(r,t,n)=>{const p=new Date,l=new Intl.DateTimeFormat("en-GB",{year:"numeric",month:"short",day:"2-digit",timeZone:"UTC"}).format(p).replace(/ /g,"-"),i=new Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZone:"UTC",timeZoneName:"short"}).format(p),e=l+" "+i;return r=$r(r),`[${e}] ${n} ${t}: ${r}`};let wr=0;const Br="/wordpress/wp-content/debug.log",os=async r=>await r.fileExists(Br)?await r.readFileAsText(Br):"",as=(r,t)=>{t.addEventListener("request.end",async()=>{const n=await os(t);if(n.length>wr){const p=n.substring(wr);r.logMessage({message:p,raw:!0}),wr=n.length}}),t.addEventListener("request.error",n=>{n=n,n.error&&(r.logMessage({message:`${n.error.message} ${n.error.stack}`,severity:"Fatal",prefix:n.source==="request"?"PHP":"WASM Crash"}),r.dispatchEvent(new CustomEvent(r.fatalErrorEvent,{detail:{logs:r.getLogs(),source:n.source}})))})},dr=async(r,{pluginPath:t,pluginName:n},p)=>{p==null||p.tracker.setCaption(`Activating ${n||t}`);const l=await r.documentRoot,i=await r.run({code:`<?php
5
5
  define( 'WP_ADMIN', true );
6
6
  require_once( ${se(l)}. "/wp-load.php" );
7
7
  require_once( ${se(l)}. "/wp-admin/includes/plugin.php" );
@@ -33,7 +33,7 @@
33
33
  }
34
34
 
35
35
  throw new Exception( 'Unable to activate plugin' );
36
- `});if(i.text!=="Plugin activated successfully")throw ae.debug(i),new Error(`Plugin ${t} could not be activated – WordPress exited with no error. Sometimes, when $_SERVER or site options are not configured correctly, WordPress exits early with a 301 redirect. Inspect the "debug" logs in the console for more details`)},Rr=async(r,{themeFolderName:t},n)=>{n==null||n.tracker.setCaption(`Activating ${t}`);const p=await r.documentRoot,l=`${p}/wp-content/themes/${t}`;if(!await r.fileExists(l))throw new Error(`
36
+ `});if(i.text!=="Plugin activated successfully")throw ae.debug(i),new Error(`Plugin ${t} could not be activated – WordPress exited with no error. Sometimes, when $_SERVER or site options are not configured correctly, WordPress exits early with a 301 redirect. Inspect the "debug" logs in the console for more details`)},qr=async(r,{themeFolderName:t},n)=>{n==null||n.tracker.setCaption(`Activating ${t}`);const p=await r.documentRoot,l=`${p}/wp-content/themes/${t}`;if(!await r.fileExists(l))throw new Error(`
37
37
  Couldn't activate theme ${t}.
38
38
  Theme not found at the provided theme path: ${l}.
39
39
  Check the theme path to ensure it's correct.
@@ -52,7 +52,7 @@
52
52
  throw new Exception( 'Theme ' . getenv('themeFolderName') . ' could not be activated.' );
53
53
  }
54
54
  die('Theme activated successfully');
55
- `,env:{docroot:p,themeFolderName:t}});if(i.text!=="Theme activated successfully")throw ae.debug(i),new Error(`Theme ${t} could not be activated – WordPress exited with no error. Sometimes, when $_SERVER or site options are not configured correctly, WordPress exits early with a 301 redirect. Inspect the "debug" logs in the console for more details`)},ot=async(r,{code:t})=>await r.run({code:t}),at=async(r,{options:t})=>await r.run(t),Sr=async(r,{path:t})=>{await r.unlink(t)},pt=async(r,{sql:t},n)=>{n==null||n.tracker.setCaption("Executing SQL Queries");const p=`/tmp/${Kt()}.sql`;await r.writeFile(p,new Uint8Array(await t.arrayBuffer()));const l=await r.documentRoot,i=We({docroot:l,sqlFilename:p}),e=await r.run({code:`<?php
55
+ `,env:{docroot:p,themeFolderName:t}});if(i.text!=="Theme activated successfully")throw ae.debug(i),new Error(`Theme ${t} could not be activated – WordPress exited with no error. Sometimes, when $_SERVER or site options are not configured correctly, WordPress exits early with a 301 redirect. Inspect the "debug" logs in the console for more details`)},nt=async(r,{code:t})=>await r.run({code:t}),ot=async(r,{options:t})=>await r.run(t),Rr=async(r,{path:t})=>{await r.unlink(t)},at=async(r,{sql:t},n)=>{n==null||n.tracker.setCaption("Executing SQL Queries");const p=`/tmp/${Jt()}.sql`;await r.writeFile(p,new Uint8Array(await t.arrayBuffer()));const l=await r.documentRoot,i=We({docroot:l,sqlFilename:p}),e=await r.run({code:`<?php
56
56
  require_once ${i.docroot} . '/wp-load.php';
57
57
 
58
58
  $handle = fopen(${i.sqlFilename}, 'r');
@@ -71,7 +71,7 @@
71
71
  $wpdb->query($buffer);
72
72
  $buffer = '';
73
73
  }
74
- `});return await Sr(r,{path:p}),e},nr=async(r,{request:t})=>{ae.warn('Deprecated: The Blueprint step "request" is deprecated and will be removed in a future release.');const n=await r.request(t);if(n.httpStatusCode>399||n.httpStatusCode<200)throw ae.warn("WordPress response was",{response:n}),new Error(`Request failed with status ${n.httpStatusCode}`);return n},ls=`<?php
74
+ `});return await Rr(r,{path:p}),e},nr=async(r,{request:t})=>{ae.warn('Deprecated: The Blueprint step "request" is deprecated and will be removed in a future release.');const n=await r.request(t);if(n.httpStatusCode>399||n.httpStatusCode<200)throw ae.warn("WordPress response was",{response:n}),new Error(`Request failed with status ${n.httpStatusCode}`);return n},ps=`<?php
75
75
 
76
76
  /**
77
77
  * Rewrites the wp-config.php file to ensure specific constants are defined
@@ -402,25 +402,25 @@ function skip_whitespace($tokens) {
402
402
  }
403
403
  return $output;
404
404
  }
405
- `,Ie=async(r,{consts:t,method:n="define-before-run"})=>{switch(n){case"define-before-run":await fs(r,t);break;case"rewrite-wp-config":{const p=await r.documentRoot,l=ie(p,"/wp-config.php"),i=await r.readFileAsText(l),e=await us(r,i,t);await r.writeFile(l,e);break}default:throw new Error(`Invalid method: ${n}`)}};async function fs(r,t){for(const n in t)await r.defineConstant(n,t[n])}async function us(r,t,n){await r.writeFile("/tmp/code.php",t);const p=We({consts:n});return await r.run({code:`${ls}
405
+ `,Ie=async(r,{consts:t,method:n="define-before-run"})=>{switch(n){case"define-before-run":await ls(r,t);break;case"rewrite-wp-config":{const p=await r.documentRoot,l=ie(p,"/wp-config.php"),i=await r.readFileAsText(l),e=await fs(r,i,t);await r.writeFile(l,e);break}default:throw new Error(`Invalid method: ${n}`)}};async function ls(r,t){for(const n in t)await r.defineConstant(n,t[n])}async function fs(r,t,n){await r.writeFile("/tmp/code.php",t);const p=We({consts:n});return await r.run({code:`${ps}
406
406
  $wp_config_path = '/tmp/code.php';
407
407
  $wp_config = file_get_contents($wp_config_path);
408
408
  $new_wp_config = rewrite_wp_config_to_define_constants($wp_config, ${p.consts});
409
409
  file_put_contents($wp_config_path, $new_wp_config);
410
- `}),await r.readFileAsText("/tmp/code.php")}const or=async(r,{username:t="admin",password:n="password"}={},p)=>{var i,e,u;p==null||p.tracker.setCaption((p==null?void 0:p.initialCaption)||"Logging in"),await r.request({url:"/wp-login.php"});const l=await r.request({url:"/wp-login.php",method:"POST",body:{log:t,pwd:n,rememberme:"forever"}});if(!((u=(e=(i=l.headers)==null?void 0:i.location)==null?void 0:e[0])!=null&&u.includes("/wp-admin/")))throw ae.warn("WordPress response was",{response:l,text:l.text}),new Error(`Failed to log in as ${t} with password ${n}`)},Lr=async(r,{options:t})=>{const n=await r.documentRoot;await r.run({code:`<?php
410
+ `}),await r.readFileAsText("/tmp/code.php")}const or=async(r,{username:t="admin",password:n="password"}={},p)=>{var i,e,f;p==null||p.tracker.setCaption((p==null?void 0:p.initialCaption)||"Logging in"),await r.request({url:"/wp-login.php"});const l=await r.request({url:"/wp-login.php",method:"POST",body:{log:t,pwd:n,rememberme:"forever"}});if(!((f=(e=(i=l.headers)==null?void 0:i.location)==null?void 0:e[0])!=null&&f.includes("/wp-admin/")))throw ae.warn("WordPress response was",{response:l,text:l.text}),new Error(`Failed to log in as ${t} with password ${n}`)},Sr=async(r,{options:t})=>{const n=await r.documentRoot;await r.run({code:`<?php
411
411
  include ${se(n)} . '/wp-load.php';
412
412
  $site_options = ${se(t)};
413
413
  foreach($site_options as $name => $value) {
414
414
  update_option($name, $value);
415
415
  }
416
416
  echo "Success";
417
- `})},lt=async(r,{meta:t,userId:n})=>{const p=await r.documentRoot;await r.run({code:`<?php
417
+ `})},pt=async(r,{meta:t,userId:n})=>{const p=await r.documentRoot;await r.run({code:`<?php
418
418
  include ${se(p)} . '/wp-load.php';
419
419
  $meta = ${se(t)};
420
420
  foreach($meta as $name => $value) {
421
421
  update_user_meta(${se(n)}, $name, $value);
422
422
  }
423
- `})};function ft(r){return r.pathname.startsWith("/scope:")}function ds(r){return ft(r)?r.pathname.split("/")[1].split(":")[1]:null}const ut=async r=>{var E;await Ie(r,{consts:{WP_ALLOW_MULTISITE:1}});const t=new URL(await r.absoluteUrl);if(t.port!==""){let S=`The current host is ${t.host}, but WordPress multisites do not support custom ports.`;throw t.hostname==="localhost"&&(S+=" For development, you can set up a playground.test domain using the instructions at https://wordpress.github.io/wordpress-playground/contributing/code."),new Error(S)}const n=t.pathname.replace(/\/$/,"")+"/",p=`${t.protocol}//${t.hostname}${n}`;await Lr(r,{options:{siteurl:p,home:p}}),await or(r,{});const l=await r.documentRoot,e=(await r.run({code:`<?php
423
+ `})};function lt(r){return r.pathname.startsWith("/scope:")}function us(r){return lt(r)?r.pathname.split("/")[1].split(":")[1]:null}const ft=async r=>{var k;await Ie(r,{consts:{WP_ALLOW_MULTISITE:1}});const t=new URL(await r.absoluteUrl);if(t.port!==""){let x=`The current host is ${t.host}, but WordPress multisites do not support custom ports.`;throw t.hostname==="localhost"&&(x+=" For development, you can set up a playground.test domain using the instructions at https://wordpress.github.io/wordpress-playground/contributing/code."),new Error(x)}const n=t.pathname.replace(/\/$/,"")+"/",p=`${t.protocol}//${t.hostname}${n}`;await Sr(r,{options:{siteurl:p,home:p}}),await or(r,{});const l=await r.documentRoot,e=(await r.run({code:`<?php
424
424
  define( 'WP_ADMIN', true );
425
425
  require_once(${se(l)} . "/wp-load.php");
426
426
 
@@ -452,9 +452,9 @@ foreach($plugins as $plugin_path) {
452
452
  }
453
453
  }
454
454
  echo json_encode($deactivated_plugins);
455
- `})).json,h=(E=(await nr(r,{request:{url:"/wp-admin/network.php"}})).text.match(/name="_wpnonce"\s+value="([^"]+)"/))==null?void 0:E[1],b=await nr(r,{request:{url:"/wp-admin/network.php",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:cs({_wpnonce:h,_wp_http_referer:n+"wp-admin/network.php",sitename:"My WordPress Website Sites",email:"admin@localhost.com",submit:"Install"})}});if(b.httpStatusCode!==200)throw ae.warn("WordPress response was",{response:b,text:b.text,headers:b.headers}),new Error(`Failed to enable multisite. Response code was ${b.httpStatusCode}`);await Ie(r,{consts:{MULTISITE:!0,SUBDOMAIN_INSTALL:!1,SITE_ID_CURRENT_SITE:1,BLOG_ID_CURRENT_SITE:1,DOMAIN_CURRENT_SITE:t.hostname,PATH_CURRENT_SITE:n}});const k=new URL(await r.absoluteUrl),y=ft(k)?"scope:"+ds(k):null;await r.writeFile("/internal/shared/preload/sunrise.php",`<?php
456
- $_SERVER['HTTP_HOST'] = ${se(k.hostname)};
457
- $folder = ${se(y)};
455
+ `})).json,h=(k=(await nr(r,{request:{url:"/wp-admin/network.php"}})).text.match(/name="_wpnonce"\s+value="([^"]+)"/))==null?void 0:k[1],b=await nr(r,{request:{url:"/wp-admin/network.php",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:ds({_wpnonce:h,_wp_http_referer:n+"wp-admin/network.php",sitename:"My WordPress Website Sites",email:"admin@localhost.com",submit:"Install"})}});if(b.httpStatusCode!==200)throw ae.warn("WordPress response was",{response:b,text:b.text,headers:b.headers}),new Error(`Failed to enable multisite. Response code was ${b.httpStatusCode}`);await Ie(r,{consts:{MULTISITE:!0,SUBDOMAIN_INSTALL:!1,SITE_ID_CURRENT_SITE:1,BLOG_ID_CURRENT_SITE:1,DOMAIN_CURRENT_SITE:t.hostname,PATH_CURRENT_SITE:n}});const _=new URL(await r.absoluteUrl),m=lt(_)?"scope:"+us(_):null;await r.writeFile("/internal/shared/preload/sunrise.php",`<?php
456
+ $_SERVER['HTTP_HOST'] = ${se(_.hostname)};
457
+ $folder = ${se(m)};
458
458
  if ($folder && strpos($_SERVER['REQUEST_URI'],"/$folder") === false) {
459
459
  $_SERVER['REQUEST_URI'] = "/$folder/" . ltrim($_SERVER['REQUEST_URI'], '/');
460
460
  }
@@ -462,7 +462,7 @@ echo json_encode($deactivated_plugins);
462
462
  if ( !defined( 'BLOG_ID_CURRENT_SITE' ) ) {
463
463
  define( 'BLOG_ID_CURRENT_SITE', 1 );
464
464
  }
465
- `),await or(r,{});for(const S of e)await dr(r,{pluginPath:S})};function cs(r){return Object.keys(r).map(t=>encodeURIComponent(t)+"="+encodeURIComponent(r[t])).join("&")}const dt=async(r,{fromPath:t,toPath:n})=>{await r.writeFile(n,await r.readFileAsBuffer(t))},ct=async(r,{fromPath:t,toPath:n})=>{await r.mv(t,n)},mt=async(r,{path:t})=>{await r.mkdir(t)},yt=async(r,{path:t})=>{await r.rmdir(t)},xr=async(r,{path:t,data:n})=>{n instanceof File&&(n=new Uint8Array(await n.arrayBuffer())),t.startsWith("/wordpress/wp-content/mu-plugins")&&!await r.fileExists("/wordpress/wp-content/mu-plugins")&&await r.mkdir("/wordpress/wp-content/mu-plugins"),await r.writeFile(t,n)},Nr=async(r,{siteUrl:t})=>{await Ie(r,{consts:{WP_HOME:t,WP_SITEURL:t}})},ht=async(r,{file:t},n)=>{var l;(l=n==null?void 0:n.tracker)==null||l.setCaption("Importing content"),await xr(r,{path:"/tmp/import.wxr",data:t});const p=await r.documentRoot;await r.run({code:`<?php
465
+ `),await or(r,{});for(const x of e)await dr(r,{pluginPath:x})};function ds(r){return Object.keys(r).map(t=>encodeURIComponent(t)+"="+encodeURIComponent(r[t])).join("&")}const ut=async(r,{fromPath:t,toPath:n})=>{await r.writeFile(n,await r.readFileAsBuffer(t))},dt=async(r,{fromPath:t,toPath:n})=>{await r.mv(t,n)},ct=async(r,{path:t})=>{await r.mkdir(t)},mt=async(r,{path:t})=>{await r.rmdir(t)},Lr=async(r,{path:t,data:n})=>{n instanceof File&&(n=new Uint8Array(await n.arrayBuffer())),t.startsWith("/wordpress/wp-content/mu-plugins")&&!await r.fileExists("/wordpress/wp-content/mu-plugins")&&await r.mkdir("/wordpress/wp-content/mu-plugins"),await r.writeFile(t,n)},xr=async(r,{siteUrl:t})=>{await Ie(r,{consts:{WP_HOME:t,WP_SITEURL:t}})},yt=async(r,{file:t},n)=>{var l;(l=n==null?void 0:n.tracker)==null||l.setCaption("Importing content"),await Lr(r,{path:"/tmp/import.wxr",data:t});const p=await r.documentRoot;await r.run({code:`<?php
466
466
  require ${se(p)} . '/wp-load.php';
467
467
  require ${se(p)} . '/wp-admin/includes/admin.php';
468
468
 
@@ -482,7 +482,7 @@ echo json_encode($deactivated_plugins);
482
482
  });
483
483
 
484
484
  $result = $importer->import( '/tmp/import.wxr' );
485
- `})},Fr=async(r,{themeSlug:t=""},n)=>{var l;(l=n==null?void 0:n.tracker)==null||l.setCaption("Importing theme starter content");const p=await r.documentRoot;await r.run({code:`<?php
485
+ `})},Nr=async(r,{themeSlug:t=""},n)=>{var l;(l=n==null?void 0:n.tracker)==null||l.setCaption("Importing theme starter content");const p=await r.documentRoot;await r.run({code:`<?php
486
486
 
487
487
  /**
488
488
  * Ensure that the customizer loads as an admin user.
@@ -529,7 +529,7 @@ echo json_encode($deactivated_plugins);
529
529
 
530
530
  // Publish the changeset, which publishes the starter content.
531
531
  wp_publish_post( $wp_customize->changeset_post_id() );
532
- `})},vr="/tmp/file.zip",gt=async(r,t,n,p=!0)=>{if(t instanceof File){const i=t;t=vr,await r.writeFile(t,new Uint8Array(await i.arrayBuffer()))}const l=We({zipPath:t,extractToPath:n,overwriteFiles:p});await r.run({code:`<?php
532
+ `})},vr="/tmp/file.zip",ht=async(r,t,n,p=!0)=>{if(t instanceof File){const i=t;t=vr,await r.writeFile(t,new Uint8Array(await i.arrayBuffer()))}const l=We({zipPath:t,extractToPath:n,overwriteFiles:p});await r.run({code:`<?php
533
533
  function unzip($zipPath, $extractTo, $overwriteFiles = true)
534
534
  {
535
535
  if (!is_dir($extractTo)) {
@@ -555,10 +555,10 @@ echo json_encode($deactivated_plugins);
555
555
  }
556
556
  }
557
557
  unzip(${l.zipPath}, ${l.extractToPath}, ${l.overwriteFiles});
558
- `}),await r.fileExists(vr)&&await r.unlink(vr)},cr=async(r,{zipFile:t,zipPath:n,extractToPath:p})=>{if(n)ae.warn('The "zipPath" option of the unzip() Blueprint step is deprecated and will be removed. Use "zipFile" instead.');else if(!t)throw new Error("Either zipPath or zipFile must be provided");await gt(r,t||n,p)},bt=async(r,{wordPressFilesZip:t,pathInZip:n=""})=>{const p=await r.documentRoot;let l=ie("/tmp","import");await r.mkdir(l),await cr(r,{zipFile:t,extractToPath:l}),l=ie(l,n);const i=ie(l,"wp-content"),e=ie(p,"wp-content");for(const k of qr){const y=ie(i,k);await zr(r,y);const E=ie(e,k);await r.fileExists(E)&&(await r.mkdir(tt(y)),await r.mv(E,y))}const u=ie(l,"wp-content","database");await r.fileExists(u)||await r.mv(ie(p,"wp-content","database"),u);const h=await r.listFiles(l);for(const k of h)await zr(r,ie(p,k)),await r.mv(ie(l,k),ie(p,k));await r.rmdir(l),await Nr(r,{siteUrl:await r.absoluteUrl});const b=se(ie(p,"wp-admin","upgrade.php"));await r.run({code:`<?php
558
+ `}),await r.fileExists(vr)&&await r.unlink(vr)},cr=async(r,{zipFile:t,zipPath:n,extractToPath:p})=>{if(n)ae.warn('The "zipPath" option of the unzip() Blueprint step is deprecated and will be removed. Use "zipFile" instead.');else if(!t)throw new Error("Either zipPath or zipFile must be provided");await ht(r,t||n,p)},gt=async(r,{wordPressFilesZip:t,pathInZip:n=""})=>{const p=await r.documentRoot;let l=ie("/tmp","import");await r.mkdir(l),await cr(r,{zipFile:t,extractToPath:l}),l=ie(l,n);const i=ie(l,"wp-content"),e=ie(p,"wp-content");for(const _ of Ar){const m=ie(i,_);await Ur(r,m);const k=ie(e,_);await r.fileExists(k)&&(await r.mkdir(rt(m)),await r.mv(k,m))}const f=ie(l,"wp-content","database");await r.fileExists(f)||await r.mv(ie(p,"wp-content","database"),f);const h=await r.listFiles(l);for(const _ of h)await Ur(r,ie(p,_)),await r.mv(ie(l,_),ie(p,_));await r.rmdir(l),await xr(r,{siteUrl:await r.absoluteUrl});const b=se(ie(p,"wp-admin","upgrade.php"));await r.run({code:`<?php
559
559
  $_GET['step'] = 'upgrade_db';
560
560
  require ${b};
561
- `})};async function zr(r,t){await r.fileExists(t)&&(await r.isDir(t)?await r.rmdir(t):await r.unlink(t))}async function wt(r){const t=await r.request({url:"/wp-admin/export.php?download=true&content=all"});return new File([t.bytes],"export.xml")}async function vt(r,{targetPath:t,zipFile:n,ifAlreadyInstalled:p="overwrite"}){const i=n.name.replace(/\.zip$/,""),e=ie(await r.documentRoot,"wp-content"),u=ie(e,it()),h=ie(u,"assets",i);await r.fileExists(h)&&await r.rmdir(u,{recursive:!0}),await r.mkdir(u);try{await cr(r,{zipFile:n,extractToPath:h});let b=await r.listFiles(h,{prependPath:!0});b=b.filter(I=>!I.endsWith("/__MACOSX"));const k=b.length===1&&await r.isDir(b[0]);let y,E="";k?(E=b[0],y=b[0].split("/").pop()):(E=h,y=i);const S=`${t}/${y}`;if(await r.fileExists(S)){if(!await r.isDir(S))throw new Error(`Cannot install asset ${y} to ${S} because a file with the same name already exists. Note it's a file, not a directory! Is this by mistake?`);if(p==="overwrite")await r.rmdir(S,{recursive:!0});else{if(p==="skip")return{assetFolderPath:S,assetFolderName:y};throw new Error(`Cannot install asset ${y} to ${t} because it already exists and the ifAlreadyInstalled option was set to ${p}`)}}return await r.mv(E,S),{assetFolderPath:S,assetFolderName:y}}finally{await r.rmdir(u,{recursive:!0})}}function mr(r){const t=r.split(".").shift().replace(/-/g," ");return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}const Pt=async(r,{pluginZipFile:t,ifAlreadyInstalled:n,options:p={}},l)=>{const i=t.name.split("/").pop()||"plugin.zip",e=mr(i);l==null||l.tracker.setCaption(`Installing the ${e} plugin`);const{assetFolderPath:u}=await vt(r,{ifAlreadyInstalled:n,zipFile:t,targetPath:`${await r.documentRoot}/wp-content/plugins`});("activate"in p?p.activate:!0)&&await dr(r,{pluginPath:u,pluginName:e},l)},_t=async(r,{themeZipFile:t,ifAlreadyInstalled:n,options:p={}},l)=>{const i=mr(t.name);l==null||l.tracker.setCaption(`Installing the ${i} theme`);const{assetFolderName:e}=await vt(r,{ifAlreadyInstalled:n,zipFile:t,targetPath:`${await r.documentRoot}/wp-content/themes`});("activate"in p?p.activate:!0)&&await Rr(r,{themeFolderName:e},l),("importStarterContent"in p?p.importStarterContent:!1)&&await Fr(r,{themeSlug:e},l)},kt=async(r,t,n)=>{var l;(l=n==null?void 0:n.tracker)==null||l.setCaption("Resetting WordPress data");const p=await r.documentRoot;await r.run({env:{DOCROOT:p},code:`<?php
561
+ `})};async function Ur(r,t){await r.fileExists(t)&&(await r.isDir(t)?await r.rmdir(t):await r.unlink(t))}async function bt(r){const t=await r.request({url:"/wp-admin/export.php?download=true&content=all"});return new File([t.bytes],"export.xml")}async function wt(r,{targetPath:t,zipFile:n,ifAlreadyInstalled:p="overwrite"}){const i=n.name.replace(/\.zip$/,""),e=ie(await r.documentRoot,"wp-content"),f=ie(e,st()),h=ie(f,"assets",i);await r.fileExists(h)&&await r.rmdir(f,{recursive:!0}),await r.mkdir(f);try{await cr(r,{zipFile:n,extractToPath:h});let b=await r.listFiles(h,{prependPath:!0});b=b.filter(D=>!D.endsWith("/__MACOSX"));const _=b.length===1&&await r.isDir(b[0]);let m,k="";_?(k=b[0],m=b[0].split("/").pop()):(k=h,m=i);const x=`${t}/${m}`;if(await r.fileExists(x)){if(!await r.isDir(x))throw new Error(`Cannot install asset ${m} to ${x} because a file with the same name already exists. Note it's a file, not a directory! Is this by mistake?`);if(p==="overwrite")await r.rmdir(x,{recursive:!0});else{if(p==="skip")return{assetFolderPath:x,assetFolderName:m};throw new Error(`Cannot install asset ${m} to ${t} because it already exists and the ifAlreadyInstalled option was set to ${p}`)}}return await r.mv(k,x),{assetFolderPath:x,assetFolderName:m}}finally{await r.rmdir(f,{recursive:!0})}}function mr(r){const t=r.split(".").shift().replace(/-/g," ");return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}const vt=async(r,{pluginZipFile:t,ifAlreadyInstalled:n,options:p={}},l)=>{const i=t.name.split("/").pop()||"plugin.zip",e=mr(i);l==null||l.tracker.setCaption(`Installing the ${e} plugin`);const{assetFolderPath:f}=await wt(r,{ifAlreadyInstalled:n,zipFile:t,targetPath:`${await r.documentRoot}/wp-content/plugins`});("activate"in p?p.activate:!0)&&await dr(r,{pluginPath:f,pluginName:e},l)},Pt=async(r,{themeZipFile:t,ifAlreadyInstalled:n,options:p={}},l)=>{const i=mr(t.name);l==null||l.tracker.setCaption(`Installing the ${i} theme`);const{assetFolderName:e}=await wt(r,{ifAlreadyInstalled:n,zipFile:t,targetPath:`${await r.documentRoot}/wp-content/themes`});("activate"in p?p.activate:!0)&&await qr(r,{themeFolderName:e},l),("importStarterContent"in p?p.importStarterContent:!1)&&await Nr(r,{themeSlug:e},l)},_t=async(r,t,n)=>{var l;(l=n==null?void 0:n.tracker)==null||l.setCaption("Resetting WordPress data");const p=await r.documentRoot;await r.run({env:{DOCROOT:p},code:`<?php
562
562
  require getenv('DOCROOT') . '/wp-load.php';
563
563
 
564
564
  $GLOBALS['@pdo']->query('DELETE FROM wp_posts WHERE id > 0');
@@ -572,11 +572,11 @@ echo json_encode($deactivated_plugins);
572
572
 
573
573
  $GLOBALS['@pdo']->query('DELETE FROM wp_commentmeta');
574
574
  $GLOBALS['@pdo']->query("UPDATE SQLITE_SEQUENCE SET SEQ=0 WHERE NAME='wp_commentmeta'");
575
- `})},Ot=async(r,{options:t})=>{await r.request({url:"/wp-admin/install.php?step=2",method:"POST",body:{language:"en",prefix:"wp_",weblog_title:"My WordPress Website",user_name:t.adminPassword||"admin",admin_password:t.adminPassword||"password",admin_password2:t.adminPassword||"password",Submit:"Install WordPress",pw_weak:"1",admin_email:"admin@localhost.com"}})},Et=async(r,{selfContained:t=!1}={})=>{const n="/tmp/wordpress-playground.zip",p=await r.documentRoot,l=ie(p,"wp-content");let i=qr;t&&(i=i.filter(h=>!h.startsWith("themes/twenty")).filter(h=>h!=="mu-plugins/sqlite-database-integration"));const e=We({zipPath:n,wpContentPath:l,documentRoot:p,exceptPaths:i.map(h=>ie(p,"wp-content",h)),additionalPaths:t?{[ie(p,"wp-config.php")]:"wp-config.php"}:{}});await ys(r,`zipDir(${e.wpContentPath}, ${e.zipPath}, array(
575
+ `})},kt=async(r,{options:t})=>{await r.request({url:"/wp-admin/install.php?step=2",method:"POST",body:{language:"en",prefix:"wp_",weblog_title:"My WordPress Website",user_name:t.adminPassword||"admin",admin_password:t.adminPassword||"password",admin_password2:t.adminPassword||"password",Submit:"Install WordPress",pw_weak:"1",admin_email:"admin@localhost.com"}})},Ot=async(r,{selfContained:t=!1}={})=>{const n="/tmp/wordpress-playground.zip",p=await r.documentRoot,l=ie(p,"wp-content");let i=Ar;t&&(i=i.filter(h=>!h.startsWith("themes/twenty")).filter(h=>h!=="mu-plugins/sqlite-database-integration"));const e=We({zipPath:n,wpContentPath:l,documentRoot:p,exceptPaths:i.map(h=>ie(p,"wp-content",h)),additionalPaths:t?{[ie(p,"wp-config.php")]:"wp-config.php"}:{}});await ms(r,`zipDir(${e.wpContentPath}, ${e.zipPath}, array(
576
576
  'exclude_paths' => ${e.exceptPaths},
577
577
  'zip_root' => ${e.documentRoot},
578
578
  'additional_paths' => ${e.additionalPaths}
579
- ));`);const u=await r.readFileAsBuffer(n);return r.unlink(n),u},ms=`<?php
579
+ ));`);const f=await r.readFileAsBuffer(n);return r.unlink(n),f},cs=`<?php
580
580
 
581
581
  function zipDir($root, $output, $options = array())
582
582
  {
@@ -635,7 +635,14 @@ function join_paths()
635
635
 
636
636
  return preg_replace('#/+#', '/', join('/', $paths));
637
637
  }
638
- `;async function ys(r,t){return await r.run({code:ms+t})}const $t=async(r,{command:t,wpCliPath:n="/tmp/wp-cli.phar"})=>{if(!await r.fileExists(n))throw new Error(`wp-cli.phar not found at ${n}`);let p;if(typeof t=="string"?(t=t.trim(),p=hs(t)):p=t,p.shift()!=="wp")throw new Error('The first argument must be "wp".');await r.writeFile("/tmp/stdout",""),await r.writeFile("/tmp/stderr",""),await r.writeFile("/wordpress/run-cli.php",`<?php
638
+ `;async function ms(r,t){return await r.run({code:cs+t})}const Et=async(r,{command:t,wpCliPath:n="/tmp/wp-cli.phar"})=>{if(!await r.fileExists(n))throw new Error(`wp-cli.phar not found at ${n}.
639
+ You can enable wp-cli support by adding "wp-cli" to the list of extra libraries in your blueprint as follows:
640
+ {
641
+ "extraLibraries": [ "wp-cli" ]
642
+ }
643
+
644
+ Read more about it in the documentation.
645
+ https://wordpress.github.io/wordpress-playground/blueprints-api/data-format#extra-libraries`);let p;if(typeof t=="string"?(t=t.trim(),p=ys(t)):p=t,p.shift()!=="wp")throw new Error('The first argument must be "wp".');await r.writeFile("/tmp/stdout",""),await r.writeFile("/tmp/stderr",""),await r.writeFile("/wordpress/run-cli.php",`<?php
639
646
  // Set up the environment to emulate a shell script
640
647
  // call.
641
648
 
@@ -657,10 +664,10 @@ function join_paths()
657
664
  define('STDERR', fopen('php://stderr', 'wb'));
658
665
 
659
666
  require( ${se(n)} );
660
- `);const i=await r.run({scriptPath:"/wordpress/run-cli.php"});if(i.errors)throw new Error(i.errors);return i};function hs(r){let p=0,l="";const i=[];let e="";for(let u=0;u<r.length;u++){const h=r[u];p===0?h==='"'||h==="'"?(p=1,l=h):h.match(/\s/)?(e&&i.push(e),e=""):e+=h:p===1&&(h==="\\"?(u++,e+=r[u]):h===l?(p=0,l=""):e+=h)}return e&&i.push(e),i}const Tt=async(r,{language:t},n)=>{n==null||n.tracker.setCaption((n==null?void 0:n.initialCaption)||"Translating"),await r.defineConstant("WPLANG",t);const p=await r.documentRoot,i=[{url:`https://downloads.wordpress.org/translation/core/${(await r.run({code:`<?php
667
+ `);const i=await r.run({scriptPath:"/wordpress/run-cli.php"});if(i.errors)throw new Error(i.errors);return i};function ys(r){let p=0,l="";const i=[];let e="";for(let f=0;f<r.length;f++){const h=r[f];p===0?h==='"'||h==="'"?(p=1,l=h):h.match(/\s/)?(e&&i.push(e),e=""):e+=h:p===1&&(h==="\\"?(f++,e+=r[f]):h===l?(p=0,l=""):e+=h)}return e&&i.push(e),i}const $t=async(r,{language:t},n)=>{n==null||n.tracker.setCaption((n==null?void 0:n.initialCaption)||"Translating"),await r.defineConstant("WPLANG",t);const p=await r.documentRoot,i=[{url:`https://downloads.wordpress.org/translation/core/${(await r.run({code:`<?php
661
668
  require '${p}/wp-includes/version.php';
662
669
  echo $wp_version;
663
- `})).text}/${t}.zip`,type:"core"}],u=(await r.run({code:`<?php
670
+ `})).text}/${t}.zip`,type:"core"}],f=(await r.run({code:`<?php
664
671
  require_once('${p}/wp-load.php');
665
672
  require_once('${p}/wp-admin/includes/plugin.php');
666
673
  echo json_encode(
@@ -680,7 +687,7 @@ function join_paths()
680
687
  )
681
688
  )
682
689
  )
683
- );`})).json;for(const{slug:k,version:y}of u)i.push({url:`https://downloads.wordpress.org/translation/plugin/${k}/${y}/${t}.zip`,type:"plugin"});const b=(await r.run({code:`<?php
690
+ );`})).json;for(const{slug:_,version:m}of f)i.push({url:`https://downloads.wordpress.org/translation/plugin/${_}/${m}/${t}.zip`,type:"plugin"});const b=(await r.run({code:`<?php
684
691
  require_once('${p}/wp-load.php');
685
692
  require_once('${p}/wp-admin/includes/theme.php');
686
693
  echo json_encode(
@@ -695,9 +702,9 @@ function join_paths()
695
702
  wp_get_themes()
696
703
  )
697
704
  )
698
- );`})).json;for(const{slug:k,version:y}of b)i.push({url:`https://downloads.wordpress.org/translation/theme/${k}/${y}/${t}.zip`,type:"theme"});await r.isDir(`${p}/wp-content/languages/plugins`)||await r.mkdir(`${p}/wp-content/languages/plugins`),await r.isDir(`${p}/wp-content/languages/themes`)||await r.mkdir(`${p}/wp-content/languages/themes`);for(const{url:k,type:y}of i)try{const E=await fetch(k);if(!E.ok)throw new Error(`Failed to download translations for ${y}: ${E.statusText}`);let S=`${p}/wp-content/languages`;y==="plugin"?S+="/plugins":y==="theme"&&(S+="/themes"),await gt(r,new File([await E.blob()],`${t}-${y}.zip`),S)}catch(E){if(y==="core")throw new Error(`Failed to download translations for WordPress. Please check if the language code ${t} is correct. You can find all available languages and translations on https://translate.wordpress.org/.`);ae.warn(`Error downloading translations for ${y}: ${E}`)}},gs=Object.freeze(Object.defineProperty({__proto__:null,activatePlugin:dr,activateTheme:Rr,cp:dt,defineSiteUrl:Nr,defineWpConfigConsts:Ie,enableMultisite:ut,exportWXR:wt,importThemeStarterContent:Fr,importWordPressFiles:bt,importWxr:ht,installPlugin:Pt,installTheme:_t,login:or,mkdir:mt,mv:ct,request:nr,resetData:kt,rm:Sr,rmdir:yt,runPHP:ot,runPHPWithOptions:at,runSql:pt,runWpInstallationWizard:Ot,setSiteLanguage:Tt,setSiteOptions:Lr,unzip:cr,updateUserMeta:lt,wpCLI:$t,writeFile:xr,zipWpContent:Et},Symbol.toStringTag,{value:"Module"})),bs=5*1024*1024;function ws(r,t){const n=r.headers.get("content-length")||"",p=parseInt(n,10)||bs;function l(i,e){t(new CustomEvent("progress",{detail:{loaded:i,total:e}}))}return new Response(new ReadableStream({async start(i){if(!r.body){i.close();return}const e=r.body.getReader();let u=0;for(;;)try{const{done:h,value:b}=await e.read();if(b&&(u+=b.byteLength),h){l(u,u),i.close();break}else l(u,p),i.enqueue(b)}catch(h){ae.error({e:h}),i.error(h);break}}}),{status:r.status,statusText:r.statusText,headers:r.headers})}const Pr=1e-5;class yr extends EventTarget{constructor({weight:t=1,caption:n="",fillTime:p=4}={}){super(),this._selfWeight=1,this._selfDone=!1,this._selfProgress=0,this._selfCaption="",this._isFilling=!1,this._subTrackers=[],this._weight=t,this._selfCaption=n,this._fillTime=p}stage(t,n=""){if(t||(t=this._selfWeight),this._selfWeight-t<-Pr)throw new Error(`Cannot add a stage with weight ${t} as the total weight of registered stages would exceed 1.`);this._selfWeight-=t;const p=new yr({caption:n,weight:t,fillTime:this._fillTime});return this._subTrackers.push(p),p.addEventListener("progress",()=>this.notifyProgress()),p.addEventListener("done",()=>{this.done&&this.notifyDone()}),p}fillSlowly({stopBeforeFinishing:t=!0}={}){if(this._isFilling)return;this._isFilling=!0;const n=100,p=this._fillTime/n;this._fillInterval=setInterval(()=>{this.set(this._selfProgress+1),t&&this._selfProgress>=99&&clearInterval(this._fillInterval)},p)}set(t){this._selfProgress=Math.min(t,100),this.notifyProgress(),this._selfProgress+Pr>=100&&this.finish()}finish(){this._fillInterval&&clearInterval(this._fillInterval),this._selfDone=!0,this._selfProgress=100,this._isFilling=!1,this._fillInterval=void 0,this.notifyProgress(),this.notifyDone()}get caption(){for(let t=this._subTrackers.length-1;t>=0;t--)if(!this._subTrackers[t].done){const n=this._subTrackers[t].caption;if(n)return n}return this._selfCaption}setCaption(t){this._selfCaption=t,this.notifyProgress()}get done(){return this.progress+Pr>=100}get progress(){if(this._selfDone)return 100;const t=this._subTrackers.reduce((n,p)=>n+p.progress*p.weight,this._selfProgress*this._selfWeight);return Math.round(t*1e4)/1e4}get weight(){return this._weight}get observer(){return this._progressObserver||(this._progressObserver=t=>{this.set(t)}),this._progressObserver}get loadingListener(){return this._loadingListener||(this._loadingListener=t=>{this.set(t.detail.loaded/t.detail.total*100)}),this._loadingListener}pipe(t){t.setProgress({progress:this.progress,caption:this.caption}),this.addEventListener("progress",n=>{t.setProgress({progress:n.detail.progress,caption:n.detail.caption})}),this.addEventListener("done",()=>{t.setLoaded()})}addEventListener(t,n){super.addEventListener(t,n)}removeEventListener(t,n){super.removeEventListener(t,n)}notifyProgress(){const t=this;this.dispatchEvent(new CustomEvent("progress",{detail:{get progress(){return t.progress},get caption(){return t.caption}}}))}notifyDone(){this.dispatchEvent(new CustomEvent("done"))}}const ar={0:"No error occurred. System call completed successfully.",1:"Argument list too long.",2:"Permission denied.",3:"Address in use.",4:"Address not available.",5:"Address family not supported.",6:"Resource unavailable, or operation would block.",7:"Connection already in progress.",8:"Bad file descriptor.",9:"Bad message.",10:"Device or resource busy.",11:"Operation canceled.",12:"No child processes.",13:"Connection aborted.",14:"Connection refused.",15:"Connection reset.",16:"Resource deadlock would occur.",17:"Destination address required.",18:"Mathematics argument out of domain of function.",19:"Reserved.",20:"File exists.",21:"Bad address.",22:"File too large.",23:"Host is unreachable.",24:"Identifier removed.",25:"Illegal byte sequence.",26:"Operation in progress.",27:"Interrupted function.",28:"Invalid argument.",29:"I/O error.",30:"Socket is connected.",31:"There is a directory under that path.",32:"Too many levels of symbolic links.",33:"File descriptor value too large.",34:"Too many links.",35:"Message too large.",36:"Reserved.",37:"Filename too long.",38:"Network is down.",39:"Connection aborted by network.",40:"Network unreachable.",41:"Too many files open in system.",42:"No buffer space available.",43:"No such device.",44:"There is no such file or directory OR the parent directory does not exist.",45:"Executable file format error.",46:"No locks available.",47:"Reserved.",48:"Not enough space.",49:"No message of the desired type.",50:"Protocol not available.",51:"No space left on device.",52:"Function not supported.",53:"The socket is not connected.",54:"Not a directory or a symbolic link to a directory.",55:"Directory not empty.",56:"State not recoverable.",57:"Not a socket.",58:"Not supported, or operation not supported on socket.",59:"Inappropriate I/O control operation.",60:"No such device or address.",61:"Value too large to be stored in data type.",62:"Previous owner died.",63:"Operation not permitted.",64:"Broken pipe.",65:"Protocol error.",66:"Protocol not supported.",67:"Protocol wrong type for socket.",68:"Result too large.",69:"Read-only file system.",70:"Invalid seek.",71:"No such process.",72:"Reserved.",73:"Connection timed out.",74:"Text file busy.",75:"Cross-device link.",76:"Extension: Capabilities insufficient."};function vs(r){const t=typeof r=="object"?r==null?void 0:r.errno:null;if(t in ar)return ar[t]}function _e(r=""){return function(n,p,l){const i=l.value;l.value=function(...e){try{return i.apply(this,e)}catch(u){const h=typeof u=="object"?u==null?void 0:u.errno:null;if(h in ar){const b=ar[h],k=typeof e[1]=="string"?e[1]:null,y=k!==null?r.replaceAll("{path}",k):r;throw new Error(`${y}: ${b}`,{cause:u})}throw u}}}}var Ps=Object.defineProperty,_s=Object.getOwnPropertyDescriptor,ke=(r,t,n,p)=>{for(var l=p>1?void 0:p?_s(t,n):t,i=r.length-1,e;i>=0;i--)(e=r[i])&&(l=(p?e(t,n,l):e(l))||l);return p&&l&&Ps(t,n,l),l};const Oe=class me{static readFileAsText(t,n){return new TextDecoder().decode(me.readFileAsBuffer(t,n))}static readFileAsBuffer(t,n){return t.readFile(n)}static writeFile(t,n,p){t.writeFile(n,p)}static unlink(t,n){t.unlink(n)}static mv(t,n,p){try{const l=t.lookupPath(n).node.mount,i=me.fileExists(t,p)?t.lookupPath(p).node.mount:t.lookupPath(tt(p)).node.mount;l.mountpoint!==i.mountpoint?(me.copyRecursive(t,n,p),me.rmdir(t,n,{recursive:!0})):t.rename(n,p)}catch(l){const i=vs(l);throw i?new Error(`Could not move ${n} to ${p}: ${i}`,{cause:l}):l}}static rmdir(t,n,p={recursive:!0}){p!=null&&p.recursive&&me.listFiles(t,n).forEach(l=>{const i=`${n}/${l}`;me.isDir(t,i)?me.rmdir(t,i,p):me.unlink(t,i)}),t.rmdir(n)}static listFiles(t,n,p={prependPath:!1}){if(!me.fileExists(t,n))return[];try{const l=t.readdir(n).filter(i=>i!=="."&&i!=="..");if(p.prependPath){const i=n.replace(/\/$/,"");return l.map(e=>`${i}/${e}`)}return l}catch(l){return ae.error(l,{path:n}),[]}}static isDir(t,n){return me.fileExists(t,n)?t.isDir(t.lookupPath(n).node.mode):!1}static isFile(t,n){return me.fileExists(t,n)?t.isFile(t.lookupPath(n).node.mode):!1}static fileExists(t,n){try{return t.lookupPath(n),!0}catch{return!1}}static mkdir(t,n){t.mkdirTree(n)}static copyRecursive(t,n,p){const l=t.lookupPath(n).node;if(t.isDir(l.mode)){t.mkdirTree(p);const i=t.readdir(n).filter(e=>e!=="."&&e!=="..");for(const e of i)me.copyRecursive(t,ie(n,e),ie(p,e))}else t.writeFile(p,t.readFile(n))}};ke([_e('Could not read "{path}"')],Oe,"readFileAsText",1);ke([_e('Could not read "{path}"')],Oe,"readFileAsBuffer",1);ke([_e('Could not write to "{path}"')],Oe,"writeFile",1);ke([_e('Could not unlink "{path}"')],Oe,"unlink",1);ke([_e('Could not remove directory "{path}"')],Oe,"rmdir",1);ke([_e('Could not list files in "{path}"')],Oe,"listFiles",1);ke([_e('Could not stat "{path}"')],Oe,"isDir",1);ke([_e('Could not stat "{path}"')],Oe,"fileExists",1);ke([_e('Could not create directory "{path}"')],Oe,"mkdir",1);ke([_e('Could not copy files from "{path}"')],Oe,"copyRecursive",1);const ks={500:"Internal Server Error",502:"Bad Gateway",404:"Not Found",403:"Forbidden",401:"Unauthorized",400:"Bad Request",301:"Moved Permanently",302:"Found",307:"Temporary Redirect",308:"Permanent Redirect",204:"No Content",201:"Created",200:"OK"};class pr{constructor(t,n,p,l="",i=0){this.httpStatusCode=t,this.headers=n,this.bytes=p,this.exitCode=i,this.errors=l}static forHttpCode(t,n=""){return new pr(t,{},new TextEncoder().encode(n||ks[t]||""))}static fromRawData(t){return new pr(t.httpStatusCode,t.headers,t.bytes,t.errors,t.exitCode)}toRawData(){return{headers:this.headers,bytes:this.bytes,errors:this.errors,exitCode:this.exitCode,httpStatusCode:this.httpStatusCode}}get json(){return JSON.parse(this.text)}get text(){return new TextDecoder().decode(this.bytes)}}(function(){var r;return typeof process<"u"&&((r=process.release)==null?void 0:r.name)==="node"?"NODE":typeof window<"u"?"WEB":typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?"WORKER":"NODE"})();const Vr="/internal/shared/php.ini",{hasOwnProperty:_r}=Object.prototype,jr=(r,t={})=>{typeof t=="string"&&(t={section:t}),t.align=t.align===!0,t.newline=t.newline===!0,t.sort=t.sort===!0,t.whitespace=t.whitespace===!0||t.align===!0,t.platform=t.platform||typeof process<"u"&&process.platform,t.bracketedArray=t.bracketedArray!==!1;const n=t.platform==="win32"?`\r
705
+ );`})).json;for(const{slug:_,version:m}of b)i.push({url:`https://downloads.wordpress.org/translation/theme/${_}/${m}/${t}.zip`,type:"theme"});await r.isDir(`${p}/wp-content/languages/plugins`)||await r.mkdir(`${p}/wp-content/languages/plugins`),await r.isDir(`${p}/wp-content/languages/themes`)||await r.mkdir(`${p}/wp-content/languages/themes`);for(const{url:_,type:m}of i)try{const k=await fetch(_);if(!k.ok)throw new Error(`Failed to download translations for ${m}: ${k.statusText}`);let x=`${p}/wp-content/languages`;m==="plugin"?x+="/plugins":m==="theme"&&(x+="/themes"),await ht(r,new File([await k.blob()],`${t}-${m}.zip`),x)}catch(k){if(m==="core")throw new Error(`Failed to download translations for WordPress. Please check if the language code ${t} is correct. You can find all available languages and translations on https://translate.wordpress.org/.`);ae.warn(`Error downloading translations for ${m}: ${k}`)}},hs=Object.freeze(Object.defineProperty({__proto__:null,activatePlugin:dr,activateTheme:qr,cp:ut,defineSiteUrl:xr,defineWpConfigConsts:Ie,enableMultisite:ft,exportWXR:bt,importThemeStarterContent:Nr,importWordPressFiles:gt,importWxr:yt,installPlugin:vt,installTheme:Pt,login:or,mkdir:ct,mv:dt,request:nr,resetData:_t,rm:Rr,rmdir:mt,runPHP:nt,runPHPWithOptions:ot,runSql:at,runWpInstallationWizard:kt,setSiteLanguage:$t,setSiteOptions:Sr,unzip:cr,updateUserMeta:pt,wpCLI:Et,writeFile:Lr,zipWpContent:Ot},Symbol.toStringTag,{value:"Module"})),gs=5*1024*1024;function bs(r,t){const n=r.headers.get("content-length")||"",p=parseInt(n,10)||gs;function l(i,e){t(new CustomEvent("progress",{detail:{loaded:i,total:e}}))}return new Response(new ReadableStream({async start(i){if(!r.body){i.close();return}const e=r.body.getReader();let f=0;for(;;)try{const{done:h,value:b}=await e.read();if(b&&(f+=b.byteLength),h){l(f,f),i.close();break}else l(f,p),i.enqueue(b)}catch(h){ae.error({e:h}),i.error(h);break}}}),{status:r.status,statusText:r.statusText,headers:r.headers})}const Pr=1e-5;class yr extends EventTarget{constructor({weight:t=1,caption:n="",fillTime:p=4}={}){super(),this._selfWeight=1,this._selfDone=!1,this._selfProgress=0,this._selfCaption="",this._isFilling=!1,this._subTrackers=[],this._weight=t,this._selfCaption=n,this._fillTime=p}stage(t,n=""){if(t||(t=this._selfWeight),this._selfWeight-t<-Pr)throw new Error(`Cannot add a stage with weight ${t} as the total weight of registered stages would exceed 1.`);this._selfWeight-=t;const p=new yr({caption:n,weight:t,fillTime:this._fillTime});return this._subTrackers.push(p),p.addEventListener("progress",()=>this.notifyProgress()),p.addEventListener("done",()=>{this.done&&this.notifyDone()}),p}fillSlowly({stopBeforeFinishing:t=!0}={}){if(this._isFilling)return;this._isFilling=!0;const n=100,p=this._fillTime/n;this._fillInterval=setInterval(()=>{this.set(this._selfProgress+1),t&&this._selfProgress>=99&&clearInterval(this._fillInterval)},p)}set(t){this._selfProgress=Math.min(t,100),this.notifyProgress(),this._selfProgress+Pr>=100&&this.finish()}finish(){this._fillInterval&&clearInterval(this._fillInterval),this._selfDone=!0,this._selfProgress=100,this._isFilling=!1,this._fillInterval=void 0,this.notifyProgress(),this.notifyDone()}get caption(){for(let t=this._subTrackers.length-1;t>=0;t--)if(!this._subTrackers[t].done){const n=this._subTrackers[t].caption;if(n)return n}return this._selfCaption}setCaption(t){this._selfCaption=t,this.notifyProgress()}get done(){return this.progress+Pr>=100}get progress(){if(this._selfDone)return 100;const t=this._subTrackers.reduce((n,p)=>n+p.progress*p.weight,this._selfProgress*this._selfWeight);return Math.round(t*1e4)/1e4}get weight(){return this._weight}get observer(){return this._progressObserver||(this._progressObserver=t=>{this.set(t)}),this._progressObserver}get loadingListener(){return this._loadingListener||(this._loadingListener=t=>{this.set(t.detail.loaded/t.detail.total*100)}),this._loadingListener}pipe(t){t.setProgress({progress:this.progress,caption:this.caption}),this.addEventListener("progress",n=>{t.setProgress({progress:n.detail.progress,caption:n.detail.caption})}),this.addEventListener("done",()=>{t.setLoaded()})}addEventListener(t,n){super.addEventListener(t,n)}removeEventListener(t,n){super.removeEventListener(t,n)}notifyProgress(){const t=this;this.dispatchEvent(new CustomEvent("progress",{detail:{get progress(){return t.progress},get caption(){return t.caption}}}))}notifyDone(){this.dispatchEvent(new CustomEvent("done"))}}const ar={0:"No error occurred. System call completed successfully.",1:"Argument list too long.",2:"Permission denied.",3:"Address in use.",4:"Address not available.",5:"Address family not supported.",6:"Resource unavailable, or operation would block.",7:"Connection already in progress.",8:"Bad file descriptor.",9:"Bad message.",10:"Device or resource busy.",11:"Operation canceled.",12:"No child processes.",13:"Connection aborted.",14:"Connection refused.",15:"Connection reset.",16:"Resource deadlock would occur.",17:"Destination address required.",18:"Mathematics argument out of domain of function.",19:"Reserved.",20:"File exists.",21:"Bad address.",22:"File too large.",23:"Host is unreachable.",24:"Identifier removed.",25:"Illegal byte sequence.",26:"Operation in progress.",27:"Interrupted function.",28:"Invalid argument.",29:"I/O error.",30:"Socket is connected.",31:"There is a directory under that path.",32:"Too many levels of symbolic links.",33:"File descriptor value too large.",34:"Too many links.",35:"Message too large.",36:"Reserved.",37:"Filename too long.",38:"Network is down.",39:"Connection aborted by network.",40:"Network unreachable.",41:"Too many files open in system.",42:"No buffer space available.",43:"No such device.",44:"There is no such file or directory OR the parent directory does not exist.",45:"Executable file format error.",46:"No locks available.",47:"Reserved.",48:"Not enough space.",49:"No message of the desired type.",50:"Protocol not available.",51:"No space left on device.",52:"Function not supported.",53:"The socket is not connected.",54:"Not a directory or a symbolic link to a directory.",55:"Directory not empty.",56:"State not recoverable.",57:"Not a socket.",58:"Not supported, or operation not supported on socket.",59:"Inappropriate I/O control operation.",60:"No such device or address.",61:"Value too large to be stored in data type.",62:"Previous owner died.",63:"Operation not permitted.",64:"Broken pipe.",65:"Protocol error.",66:"Protocol not supported.",67:"Protocol wrong type for socket.",68:"Result too large.",69:"Read-only file system.",70:"Invalid seek.",71:"No such process.",72:"Reserved.",73:"Connection timed out.",74:"Text file busy.",75:"Cross-device link.",76:"Extension: Capabilities insufficient."};function ws(r){const t=typeof r=="object"?r==null?void 0:r.errno:null;if(t in ar)return ar[t]}function _e(r=""){return function(n,p,l){const i=l.value;l.value=function(...e){try{return i.apply(this,e)}catch(f){const h=typeof f=="object"?f==null?void 0:f.errno:null;if(h in ar){const b=ar[h],_=typeof e[1]=="string"?e[1]:null,m=_!==null?r.replaceAll("{path}",_):r;throw new Error(`${m}: ${b}`,{cause:f})}throw f}}}}var vs=Object.defineProperty,Ps=Object.getOwnPropertyDescriptor,ke=(r,t,n,p)=>{for(var l=p>1?void 0:p?Ps(t,n):t,i=r.length-1,e;i>=0;i--)(e=r[i])&&(l=(p?e(t,n,l):e(l))||l);return p&&l&&vs(t,n,l),l};const Oe=class me{static readFileAsText(t,n){return new TextDecoder().decode(me.readFileAsBuffer(t,n))}static readFileAsBuffer(t,n){return t.readFile(n)}static writeFile(t,n,p){t.writeFile(n,p)}static unlink(t,n){t.unlink(n)}static mv(t,n,p){try{const l=t.lookupPath(n).node.mount,i=me.fileExists(t,p)?t.lookupPath(p).node.mount:t.lookupPath(rt(p)).node.mount;l.mountpoint!==i.mountpoint?(me.copyRecursive(t,n,p),me.rmdir(t,n,{recursive:!0})):t.rename(n,p)}catch(l){const i=ws(l);throw i?new Error(`Could not move ${n} to ${p}: ${i}`,{cause:l}):l}}static rmdir(t,n,p={recursive:!0}){p!=null&&p.recursive&&me.listFiles(t,n).forEach(l=>{const i=`${n}/${l}`;me.isDir(t,i)?me.rmdir(t,i,p):me.unlink(t,i)}),t.rmdir(n)}static listFiles(t,n,p={prependPath:!1}){if(!me.fileExists(t,n))return[];try{const l=t.readdir(n).filter(i=>i!=="."&&i!=="..");if(p.prependPath){const i=n.replace(/\/$/,"");return l.map(e=>`${i}/${e}`)}return l}catch(l){return ae.error(l,{path:n}),[]}}static isDir(t,n){return me.fileExists(t,n)?t.isDir(t.lookupPath(n).node.mode):!1}static isFile(t,n){return me.fileExists(t,n)?t.isFile(t.lookupPath(n).node.mode):!1}static fileExists(t,n){try{return t.lookupPath(n),!0}catch{return!1}}static mkdir(t,n){t.mkdirTree(n)}static copyRecursive(t,n,p){const l=t.lookupPath(n).node;if(t.isDir(l.mode)){t.mkdirTree(p);const i=t.readdir(n).filter(e=>e!=="."&&e!=="..");for(const e of i)me.copyRecursive(t,ie(n,e),ie(p,e))}else t.writeFile(p,t.readFile(n))}};ke([_e('Could not read "{path}"')],Oe,"readFileAsText",1);ke([_e('Could not read "{path}"')],Oe,"readFileAsBuffer",1);ke([_e('Could not write to "{path}"')],Oe,"writeFile",1);ke([_e('Could not unlink "{path}"')],Oe,"unlink",1);ke([_e('Could not remove directory "{path}"')],Oe,"rmdir",1);ke([_e('Could not list files in "{path}"')],Oe,"listFiles",1);ke([_e('Could not stat "{path}"')],Oe,"isDir",1);ke([_e('Could not stat "{path}"')],Oe,"fileExists",1);ke([_e('Could not create directory "{path}"')],Oe,"mkdir",1);ke([_e('Could not copy files from "{path}"')],Oe,"copyRecursive",1);const _s={500:"Internal Server Error",502:"Bad Gateway",404:"Not Found",403:"Forbidden",401:"Unauthorized",400:"Bad Request",301:"Moved Permanently",302:"Found",307:"Temporary Redirect",308:"Permanent Redirect",204:"No Content",201:"Created",200:"OK"};class pr{constructor(t,n,p,l="",i=0){this.httpStatusCode=t,this.headers=n,this.bytes=p,this.exitCode=i,this.errors=l}static forHttpCode(t,n=""){return new pr(t,{},new TextEncoder().encode(n||_s[t]||""))}static fromRawData(t){return new pr(t.httpStatusCode,t.headers,t.bytes,t.errors,t.exitCode)}toRawData(){return{headers:this.headers,bytes:this.bytes,errors:this.errors,exitCode:this.exitCode,httpStatusCode:this.httpStatusCode}}get json(){return JSON.parse(this.text)}get text(){return new TextDecoder().decode(this.bytes)}}(function(){var r;return typeof process<"u"&&((r=process.release)==null?void 0:r.name)==="node"?"NODE":typeof window<"u"?"WEB":typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?"WORKER":"NODE"})();const zr="/internal/shared/php.ini",{hasOwnProperty:_r}=Object.prototype,Tr=(r,t={})=>{typeof t=="string"&&(t={section:t}),t.align=t.align===!0,t.newline=t.newline===!0,t.sort=t.sort===!0,t.whitespace=t.whitespace===!0||t.align===!0,t.platform=t.platform||typeof process<"u"&&process.platform,t.bracketedArray=t.bracketedArray!==!1;const n=t.platform==="win32"?`\r
699
706
  `:`
700
- `,p=t.whitespace?" = ":"=",l=[],i=t.sort?Object.keys(r).sort():Object.keys(r);let e=0;t.align&&(e=Ee(i.filter(b=>r[b]===null||Array.isArray(r[b])||typeof r[b]!="object").map(b=>Array.isArray(r[b])?`${b}[]`:b).concat([""]).reduce((b,k)=>Ee(b).length>=Ee(k).length?b:k)).length);let u="";const h=t.bracketedArray?"[]":"";for(const b of i){const k=r[b];if(k&&Array.isArray(k))for(const y of k)u+=Ee(`${b}${h}`).padEnd(e," ")+p+Ee(y)+n;else k&&typeof k=="object"?l.push(b):u+=Ee(b).padEnd(e," ")+p+Ee(k)+n}t.section&&u.length&&(u="["+Ee(t.section)+"]"+(t.newline?n+n:n)+u);for(const b of l){const k=jt(b,".").join("\\."),y=(t.section?t.section+".":"")+k,E=jr(r[b],{...t,section:y});u.length&&E.length&&(u+=n),u+=E}return u};function jt(r,t){var n=0,p=0,l=0,i=[];do if(l=r.indexOf(t,n),l!==-1){if(n=l+t.length,l>0&&r[l-1]==="\\")continue;i.push(r.slice(p,l)),p=l+t.length}while(l!==-1);return i.push(r.slice(p)),i}const Hr=(r,t={})=>{t.bracketedArray=t.bracketedArray!==!1;const n=Object.create(null);let p=n,l=null;const i=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,e=r.split(/[\r\n]+/g),u={};for(const b of e){if(!b||b.match(/^\s*[;#]/)||b.match(/^\s*$/))continue;const k=b.match(i);if(!k)continue;if(k[1]!==void 0){if(l=rr(k[1]),l==="__proto__"){p=Object.create(null);continue}p=n[l]=n[l]||Object.create(null);continue}const y=rr(k[2]);let E;t.bracketedArray?E=y.length>2&&y.slice(-2)==="[]":(u[y]=((u==null?void 0:u[y])||0)+1,E=u[y]>1);const S=E?y.slice(0,-2):y;if(S==="__proto__")continue;const I=k[3]?rr(k[4]):!0,_=I==="true"||I==="false"||I==="null"?JSON.parse(I):I;E&&(_r.call(p,S)?Array.isArray(p[S])||(p[S]=[p[S]]):p[S]=[]),Array.isArray(p[S])?p[S].push(_):p[S]=_}const h=[];for(const b of Object.keys(n)){if(!_r.call(n,b)||typeof n[b]!="object"||Array.isArray(n[b]))continue;const k=jt(b,".");p=n;const y=k.pop(),E=y.replace(/\\\./g,".");for(const S of k)S!=="__proto__"&&((!_r.call(p,S)||typeof p[S]!="object")&&(p[S]=Object.create(null)),p=p[S]);p===n&&E===y||(p[E]=n[b],h.push(b))}for(const b of h)delete n[b];return n},At=r=>r.startsWith('"')&&r.endsWith('"')||r.startsWith("'")&&r.endsWith("'"),Ee=r=>typeof r!="string"||r.match(/[=\r\n]/)||r.match(/^\[/)||r.length>1&&At(r)||r!==r.trim()?JSON.stringify(r):r.split(";").join("\\;").split("#").join("\\#"),rr=r=>{if(r=(r||"").trim(),At(r)){r.charAt(0)==="'"&&(r=r.slice(1,-1));try{r=JSON.parse(r)}catch{}}else{let t=!1,n="";for(let p=0,l=r.length;p<l;p++){const i=r.charAt(p);if(t)"\\;#".indexOf(i)!==-1?n+=i:n+="\\"+i,t=!1;else{if(";#".indexOf(i)!==-1)break;i==="\\"?t=!0:n+=i}}return t&&(n+="\\"),n.trim()}return r};var Gr={parse:Hr,decode:Hr,stringify:jr,encode:jr,safe:Ee,unsafe:rr};async function Os(r,t){const n=Gr.parse(await r.readFileAsText(Vr));for(const[p,l]of Object.entries(t))l==null?delete n[p]:n[p]=l;await r.writeFile(Vr,Gr.stringify(n))}ReadableStream.prototype[Symbol.asyncIterator]||(ReadableStream.prototype[Symbol.asyncIterator]=async function*(){const r=this.getReader();try{for(;;){const{done:t,value:n}=await r.read();if(t)return;yield n}}finally{r.releaseLock()}},ReadableStream.prototype.iterate=ReadableStream.prototype[Symbol.asyncIterator]);const hr=["8.3","8.2","8.1","8.0","7.4","7.3","7.2","7.1","7.0"],qt=hr[0],Es=hr,Rt=["iconv","mbstring","xml-bundle","gd"],Yr={"kitchen-sink":Rt,light:[]},$s=["vfs","literal","wordpress.org/themes","wordpress.org/plugins","url"];function Ts(r){return r&&typeof r=="object"&&typeof r.resource=="string"&&$s.includes(r.resource)}class Se{static create(t,{semaphore:n,progress:p}){let l;switch(t.resource){case"vfs":l=new js(t,p);break;case"literal":l=new As(t,p);break;case"wordpress.org/themes":l=new Ss(t,p);break;case"wordpress.org/plugins":l=new Ls(t,p);break;case"url":l=new Rs(t,p);break;default:throw new Error(`Invalid resource: ${t}`)}return l=new xs(l),n&&(l=new Ns(l,n)),l}setPlayground(t){this.playground=t}get isAsync(){return!1}}class js extends Se{constructor(t,n){super(),this.resource=t,this.progress=n}async resolve(){var n;const t=await this.playground.readFileAsBuffer(this.resource.path);return(n=this.progress)==null||n.set(100),new File([t],this.name)}get name(){return this.resource.path.split("/").pop()||""}}class As extends Se{constructor(t,n){super(),this.resource=t,this.progress=n}async resolve(){var t;return(t=this.progress)==null||t.set(100),new File([this.resource.contents],this.resource.name)}get name(){return this.resource.name}}class Cr extends Se{constructor(t){super(),this.progress=t}async resolve(){var n,p;(n=this.progress)==null||n.setCaption(this.caption);const t=this.getURL();try{let l=await fetch(t);if(!l.ok)throw new Error(`Could not download "${t}"`);if(l=await ws(l,((p=this.progress)==null?void 0:p.loadingListener)??qs),l.status!==200)throw new Error(`Could not download "${t}"`);return new File([await l.blob()],this.name)}catch(l){throw new Error(`Could not download "${t}".
707
+ `,p=t.whitespace?" = ":"=",l=[],i=t.sort?Object.keys(r).sort():Object.keys(r);let e=0;t.align&&(e=Ee(i.filter(b=>r[b]===null||Array.isArray(r[b])||typeof r[b]!="object").map(b=>Array.isArray(r[b])?`${b}[]`:b).concat([""]).reduce((b,_)=>Ee(b).length>=Ee(_).length?b:_)).length);let f="";const h=t.bracketedArray?"[]":"";for(const b of i){const _=r[b];if(_&&Array.isArray(_))for(const m of _)f+=Ee(`${b}${h}`).padEnd(e," ")+p+Ee(m)+n;else _&&typeof _=="object"?l.push(b):f+=Ee(b).padEnd(e," ")+p+Ee(_)+n}t.section&&f.length&&(f="["+Ee(t.section)+"]"+(t.newline?n+n:n)+f);for(const b of l){const _=Tt(b,".").join("\\."),m=(t.section?t.section+".":"")+_,k=Tr(r[b],{...t,section:m});f.length&&k.length&&(f+=n),f+=k}return f};function Tt(r,t){var n=0,p=0,l=0,i=[];do if(l=r.indexOf(t,n),l!==-1){if(n=l+t.length,l>0&&r[l-1]==="\\")continue;i.push(r.slice(p,l)),p=l+t.length}while(l!==-1);return i.push(r.slice(p)),i}const Vr=(r,t={})=>{t.bracketedArray=t.bracketedArray!==!1;const n=Object.create(null);let p=n,l=null;const i=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,e=r.split(/[\r\n]+/g),f={};for(const b of e){if(!b||b.match(/^\s*[;#]/)||b.match(/^\s*$/))continue;const _=b.match(i);if(!_)continue;if(_[1]!==void 0){if(l=rr(_[1]),l==="__proto__"){p=Object.create(null);continue}p=n[l]=n[l]||Object.create(null);continue}const m=rr(_[2]);let k;t.bracketedArray?k=m.length>2&&m.slice(-2)==="[]":(f[m]=((f==null?void 0:f[m])||0)+1,k=f[m]>1);const x=k?m.slice(0,-2):m;if(x==="__proto__")continue;const D=_[3]?rr(_[4]):!0,v=D==="true"||D==="false"||D==="null"?JSON.parse(D):D;k&&(_r.call(p,x)?Array.isArray(p[x])||(p[x]=[p[x]]):p[x]=[]),Array.isArray(p[x])?p[x].push(v):p[x]=v}const h=[];for(const b of Object.keys(n)){if(!_r.call(n,b)||typeof n[b]!="object"||Array.isArray(n[b]))continue;const _=Tt(b,".");p=n;const m=_.pop(),k=m.replace(/\\\./g,".");for(const x of _)x!=="__proto__"&&((!_r.call(p,x)||typeof p[x]!="object")&&(p[x]=Object.create(null)),p=p[x]);p===n&&k===m||(p[k]=n[b],h.push(b))}for(const b of h)delete n[b];return n},jt=r=>r.startsWith('"')&&r.endsWith('"')||r.startsWith("'")&&r.endsWith("'"),Ee=r=>typeof r!="string"||r.match(/[=\r\n]/)||r.match(/^\[/)||r.length>1&&jt(r)||r!==r.trim()?JSON.stringify(r):r.split(";").join("\\;").split("#").join("\\#"),rr=r=>{if(r=(r||"").trim(),jt(r)){r.charAt(0)==="'"&&(r=r.slice(1,-1));try{r=JSON.parse(r)}catch{}}else{let t=!1,n="";for(let p=0,l=r.length;p<l;p++){const i=r.charAt(p);if(t)"\\;#".indexOf(i)!==-1?n+=i:n+="\\"+i,t=!1;else{if(";#".indexOf(i)!==-1)break;i==="\\"?t=!0:n+=i}}return t&&(n+="\\"),n.trim()}return r};var Hr={parse:Vr,decode:Vr,stringify:Tr,encode:Tr,safe:Ee,unsafe:rr};async function ks(r,t){const n=Hr.parse(await r.readFileAsText(zr));for(const[p,l]of Object.entries(t))l==null?delete n[p]:n[p]=l;await r.writeFile(zr,Hr.stringify(n))}ReadableStream.prototype[Symbol.asyncIterator]||(ReadableStream.prototype[Symbol.asyncIterator]=async function*(){const r=this.getReader();try{for(;;){const{done:t,value:n}=await r.read();if(t)return;yield n}}finally{r.releaseLock()}},ReadableStream.prototype.iterate=ReadableStream.prototype[Symbol.asyncIterator]);const hr=["8.3","8.2","8.1","8.0","7.4","7.3","7.2","7.1","7.0"],At=hr[0],Os=hr,qt=["iconv","mbstring","xml-bundle","gd"],Gr={"kitchen-sink":qt,light:[]},Es=["vfs","literal","wordpress.org/themes","wordpress.org/plugins","url"];function $s(r){return r&&typeof r=="object"&&typeof r.resource=="string"&&Es.includes(r.resource)}class Se{static create(t,{semaphore:n,progress:p}){let l;switch(t.resource){case"vfs":l=new Ts(t,p);break;case"literal":l=new js(t,p);break;case"wordpress.org/themes":l=new Rs(t,p);break;case"wordpress.org/plugins":l=new Ss(t,p);break;case"url":l=new qs(t,p);break;default:throw new Error(`Invalid resource: ${t}`)}return l=new Ls(l),n&&(l=new xs(l,n)),l}setPlayground(t){this.playground=t}get isAsync(){return!1}}class Ts extends Se{constructor(t,n){super(),this.resource=t,this.progress=n}async resolve(){var n;const t=await this.playground.readFileAsBuffer(this.resource.path);return(n=this.progress)==null||n.set(100),new File([t],this.name)}get name(){return this.resource.path.split("/").pop()||""}}class js extends Se{constructor(t,n){super(),this.resource=t,this.progress=n}async resolve(){var t;return(t=this.progress)==null||t.set(100),new File([this.resource.contents],this.resource.name)}get name(){return this.resource.name}}class Fr extends Se{constructor(t){super(),this.progress=t}async resolve(){var n,p;(n=this.progress)==null||n.setCaption(this.caption);const t=this.getURL();try{let l=await fetch(t);if(!l.ok)throw new Error(`Could not download "${t}"`);if(l=await bs(l,((p=this.progress)==null?void 0:p.loadingListener)??As),l.status!==200)throw new Error(`Could not download "${t}"`);return new File([await l.blob()],this.name)}catch(l){throw new Error(`Could not download "${t}".
701
708
  Check if the URL is correct and the server is reachable.
702
709
  If it is reachable, the server might be blocking the request.
703
710
  Check the browser console and network tabs for more information.
@@ -721,14 +728,14 @@ function join_paths()
721
728
  https://raw.githubusercontent.com/username/repository/branch/filename
722
729
 
723
730
  Error:
724
- ${l}`)}}get caption(){return`Downloading ${this.name}`}get name(){try{return new URL(this.getURL(),"http://example.com").pathname.split("/").pop()}catch{return this.getURL()}}get isAsync(){return!0}}const qs=()=>{};class Rs extends Cr{constructor(t,n){super(n),this.resource=t}getURL(){return this.resource.url}get caption(){return this.resource.caption??super.caption}}class Ss extends Cr{constructor(t,n){super(n),this.resource=t}get name(){return mr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/theme/${St(this.resource.slug)}`}}class Ls extends Cr{constructor(t,n){super(n),this.resource=t}get name(){return mr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/plugin/${St(this.resource.slug)}`}}function St(r){return!r||r.endsWith(".zip")?r:r+".latest-stable.zip"}class Lt extends Se{constructor(t){super(),this.resource=t}async resolve(){return this.resource.resolve()}async setPlayground(t){return this.resource.setPlayground(t)}get progress(){return this.resource.progress}set progress(t){this.resource.progress=t}get name(){return this.resource.name}get isAsync(){return this.resource.isAsync}}class xs extends Lt{async resolve(){return this.promise||(this.promise=super.resolve()),this.promise}}class Ns extends Lt{constructor(t,n){super(t),this.semaphore=n}async resolve(){return this.isAsync?this.semaphore.run(()=>super.resolve()):super.resolve()}}const Fs={type:"object",properties:{landingPage:{type:"string",description:"The URL to navigate to after the blueprint has been run."},description:{type:"string",description:"Optional description. It doesn't do anything but is exposed as a courtesy to developers who may want to document which blueprint file does what.",deprecated:"Use meta.description instead."},meta:{type:"object",properties:{title:{type:"string",description:"A clear and concise name for your Blueprint."},description:{type:"string",description:"A brief explanation of what your Blueprint offers."},author:{type:"string",description:"A GitHub username of the author of this Blueprint."},categories:{type:"array",items:{type:"string"},description:"Relevant categories to help users find your Blueprint in the future Blueprints section on WordPress.org."}},required:["title","author"],additionalProperties:!1,description:"Optional metadata. Used by the Blueprints gallery at https://github.com/WordPress/blueprints"},preferredVersions:{type:"object",properties:{php:{anyOf:[{$ref:"#/definitions/SupportedPHPVersion"},{type:"string",const:"latest"}],description:"The preferred PHP version to use. If not specified, the latest supported version will be used"},wp:{type:"string",description:"The preferred WordPress version to use. If not specified, the latest supported version will be used"}},required:["php","wp"],additionalProperties:!1,description:"The preferred PHP and WordPress versions to use."},features:{type:"object",properties:{networking:{type:"boolean",description:"Should boot with support for network request via wp_safe_remote_get?"}},additionalProperties:!1},constants:{type:"object",additionalProperties:{type:"string"},description:"PHP Constants to define on every request"},plugins:{type:"array",items:{anyOf:[{type:"string"},{$ref:"#/definitions/FileReference"}]},description:"WordPress plugins to install and activate"},siteOptions:{type:"object",additionalProperties:{type:"string"},properties:{blogname:{type:"string",description:"The site title"}},description:"WordPress site options to define"},login:{anyOf:[{type:"boolean"},{type:"object",properties:{username:{type:"string"},password:{type:"string"}},required:["username","password"],additionalProperties:!1}],description:"User to log in as. If true, logs the user in as admin/password."},phpExtensionBundles:{type:"array",items:{$ref:"#/definitions/SupportedPHPExtensionBundle"},description:"The PHP extensions to use."},steps:{type:"array",items:{anyOf:[{$ref:"#/definitions/StepDefinition"},{type:"string"},{not:{}},{type:"boolean",const:!1},{type:"null"}]},description:"The steps to run after every other operation in this Blueprint was executed."},$schema:{type:"string"}},additionalProperties:!1},Cs={type:"string",enum:["8.3","8.2","8.1","8.0","7.4","7.3","7.2","7.1","7.0"]},Is={type:"string",enum:["kitchen-sink","light"]},xt=Object.prototype.hasOwnProperty;function ee(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let i=null,e=0;const u=e;let h=!1;const b=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let W;if(r.resource===void 0&&(W="resource")||r.path===void 0&&(W="path")){const J={instancePath:t,schemaPath:"#/definitions/VFSReference/required",keyword:"required",params:{missingProperty:W},message:"must have required property '"+W+"'"};i===null?i=[J]:i.push(J),e++}else{const J=e;for(const m in r)if(!(m==="resource"||m==="path")){const R={instancePath:t,schemaPath:"#/definitions/VFSReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};i===null?i=[R]:i.push(R),e++;break}if(J===e){if(r.resource!==void 0){let m=r.resource;const R=e;if(typeof m!="string"){const V={instancePath:t+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[V]:i.push(V),e++}if(m!=="vfs"){const V={instancePath:t+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/const",keyword:"const",params:{allowedValue:"vfs"},message:"must be equal to constant"};i===null?i=[V]:i.push(V),e++}var y=R===e}else var y=!0;if(y)if(r.path!==void 0){const m=e;if(typeof r.path!="string"){const V={instancePath:t+"/path",schemaPath:"#/definitions/VFSReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[V]:i.push(V),e++}var y=m===e}else var y=!0}}}else{const W={instancePath:t,schemaPath:"#/definitions/VFSReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[W]:i.push(W),e++}var E=b===e;if(h=h||E,!h){const W=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let R;if(r.resource===void 0&&(R="resource")||r.name===void 0&&(R="name")||r.contents===void 0&&(R="contents")){const V={instancePath:t,schemaPath:"#/definitions/LiteralReference/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"};i===null?i=[V]:i.push(V),e++}else{const V=e;for(const g in r)if(!(g==="resource"||g==="name"||g==="contents")){const O={instancePath:t,schemaPath:"#/definitions/LiteralReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};i===null?i=[O]:i.push(O),e++;break}if(V===e){if(r.resource!==void 0){let g=r.resource;const O=e;if(typeof g!="string"){const w={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[w]:i.push(w),e++}if(g!=="literal"){const w={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/const",keyword:"const",params:{allowedValue:"literal"},message:"must be equal to constant"};i===null?i=[w]:i.push(w),e++}var S=O===e}else var S=!0;if(S){if(r.name!==void 0){const g=e;if(typeof r.name!="string"){const w={instancePath:t+"/name",schemaPath:"#/definitions/LiteralReference/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[w]:i.push(w),e++}var S=g===e}else var S=!0;if(S)if(r.contents!==void 0){let g=r.contents;const O=e,w=e;let $=!1;const v=e;if(typeof g!="string"){const N={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[N]:i.push(N),e++}var I=v===e;if($=$||I,!$){const N=e;if(e===N)if(g&&typeof g=="object"&&!Array.isArray(g)){let j;if(g.BYTES_PER_ELEMENT===void 0&&(j="BYTES_PER_ELEMENT")||g.buffer===void 0&&(j="buffer")||g.byteLength===void 0&&(j="byteLength")||g.byteOffset===void 0&&(j="byteOffset")||g.length===void 0&&(j="length")){const M={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/required",keyword:"required",params:{missingProperty:j},message:"must have required property '"+j+"'"};i===null?i=[M]:i.push(M),e++}else{const M=e;for(const q in g)if(!(q==="BYTES_PER_ELEMENT"||q==="buffer"||q==="byteLength"||q==="byteOffset"||q==="length")){let H=g[q];const te=e;if(!(typeof H=="number"&&isFinite(H))){const Z={instancePath:t+"/contents/"+q.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Z]:i.push(Z),e++}var _=te===e;if(!_)break}if(M===e){if(g.BYTES_PER_ELEMENT!==void 0){let q=g.BYTES_PER_ELEMENT;const H=e;if(!(typeof q=="number"&&isFinite(q))){const te={instancePath:t+"/contents/BYTES_PER_ELEMENT",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[te]:i.push(te),e++}var D=H===e}else var D=!0;if(D){if(g.buffer!==void 0){let q=g.buffer;const H=e;if(e===H)if(q&&typeof q=="object"&&!Array.isArray(q)){let Z;if(q.byteLength===void 0&&(Z="byteLength")){const C={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:Z},message:"must have required property '"+Z+"'"};i===null?i=[C]:i.push(C),e++}else{const C=e;for(const U in q)if(U!=="byteLength"){const z={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:U},message:"must NOT have additional properties"};i===null?i=[z]:i.push(z),e++;break}if(C===e&&q.byteLength!==void 0){let U=q.byteLength;if(!(typeof U=="number"&&isFinite(U))){const z={instancePath:t+"/contents/buffer/byteLength",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[z]:i.push(z),e++}}}}else{const Z={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[Z]:i.push(Z),e++}var D=H===e}else var D=!0;if(D){if(g.byteLength!==void 0){let q=g.byteLength;const H=e;if(!(typeof q=="number"&&isFinite(q))){const Z={instancePath:t+"/contents/byteLength",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Z]:i.push(Z),e++}var D=H===e}else var D=!0;if(D){if(g.byteOffset!==void 0){let q=g.byteOffset;const H=e;if(!(typeof q=="number"&&isFinite(q))){const Z={instancePath:t+"/contents/byteOffset",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Z]:i.push(Z),e++}var D=H===e}else var D=!0;if(D)if(g.length!==void 0){let q=g.length;const H=e;if(!(typeof q=="number"&&isFinite(q))){const Z={instancePath:t+"/contents/length",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Z]:i.push(Z),e++}var D=H===e}else var D=!0}}}}}}else{const j={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[j]:i.push(j),e++}var I=N===e;$=$||I}if($)e=w,i!==null&&(w?i.length=w:i=null);else{const N={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};i===null?i=[N]:i.push(N),e++}var S=O===e}else var S=!0}}}}else{const R={instancePath:t,schemaPath:"#/definitions/LiteralReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[R]:i.push(R),e++}var E=W===e;if(h=h||E,!h){const R=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let O;if(r.resource===void 0&&(O="resource")||r.slug===void 0&&(O="slug")){const w={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/required",keyword:"required",params:{missingProperty:O},message:"must have required property '"+O+"'"};i===null?i=[w]:i.push(w),e++}else{const w=e;for(const $ in r)if(!($==="resource"||$==="slug")){const v={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};i===null?i=[v]:i.push(v),e++;break}if(w===e){if(r.resource!==void 0){let $=r.resource;const v=e;if(typeof $!="string"){const c={instancePath:t+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[c]:i.push(c),e++}if($!=="wordpress.org/themes"){const c={instancePath:t+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/const",keyword:"const",params:{allowedValue:"wordpress.org/themes"},message:"must be equal to constant"};i===null?i=[c]:i.push(c),e++}var X=v===e}else var X=!0;if(X)if(r.slug!==void 0){const $=e;if(typeof r.slug!="string"){const c={instancePath:t+"/slug",schemaPath:"#/definitions/CoreThemeReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[c]:i.push(c),e++}var X=$===e}else var X=!0}}}else{const O={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[O]:i.push(O),e++}var E=R===e;if(h=h||E,!h){const O=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let v;if(r.resource===void 0&&(v="resource")||r.slug===void 0&&(v="slug")){const c={instancePath:t,schemaPath:"#/definitions/CorePluginReference/required",keyword:"required",params:{missingProperty:v},message:"must have required property '"+v+"'"};i===null?i=[c]:i.push(c),e++}else{const c=e;for(const N in r)if(!(N==="resource"||N==="slug")){const L={instancePath:t,schemaPath:"#/definitions/CorePluginReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:N},message:"must NOT have additional properties"};i===null?i=[L]:i.push(L),e++;break}if(c===e){if(r.resource!==void 0){let N=r.resource;const L=e;if(typeof N!="string"){const j={instancePath:t+"/resource",schemaPath:"#/definitions/CorePluginReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[j]:i.push(j),e++}if(N!=="wordpress.org/plugins"){const j={instancePath:t+"/resource",schemaPath:"#/definitions/CorePluginReference/properties/resource/const",keyword:"const",params:{allowedValue:"wordpress.org/plugins"},message:"must be equal to constant"};i===null?i=[j]:i.push(j),e++}var x=L===e}else var x=!0;if(x)if(r.slug!==void 0){const N=e;if(typeof r.slug!="string"){const j={instancePath:t+"/slug",schemaPath:"#/definitions/CorePluginReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[j]:i.push(j),e++}var x=N===e}else var x=!0}}}else{const v={instancePath:t,schemaPath:"#/definitions/CorePluginReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[v]:i.push(v),e++}var E=O===e;if(h=h||E,!h){const v=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let L;if(r.resource===void 0&&(L="resource")||r.url===void 0&&(L="url")){const j={instancePath:t,schemaPath:"#/definitions/UrlReference/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"};i===null?i=[j]:i.push(j),e++}else{const j=e;for(const M in r)if(!(M==="resource"||M==="url"||M==="caption")){const q={instancePath:t,schemaPath:"#/definitions/UrlReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:M},message:"must NOT have additional properties"};i===null?i=[q]:i.push(q),e++;break}if(j===e){if(r.resource!==void 0){let M=r.resource;const q=e;if(typeof M!="string"){const H={instancePath:t+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[H]:i.push(H),e++}if(M!=="url"){const H={instancePath:t+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};i===null?i=[H]:i.push(H),e++}var P=q===e}else var P=!0;if(P){if(r.url!==void 0){const M=e;if(typeof r.url!="string"){const H={instancePath:t+"/url",schemaPath:"#/definitions/UrlReference/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[H]:i.push(H),e++}var P=M===e}else var P=!0;if(P)if(r.caption!==void 0){const M=e;if(typeof r.caption!="string"){const H={instancePath:t+"/caption",schemaPath:"#/definitions/UrlReference/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[H]:i.push(H),e++}var P=M===e}else var P=!0}}}}else{const L={instancePath:t,schemaPath:"#/definitions/UrlReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[L]:i.push(L),e++}var E=v===e;h=h||E}}}}if(h)e=u,i!==null&&(u?i.length=u:i=null);else{const W={instancePath:t,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[W]:i.push(W),e++,ee.errors=i,!1}return ee.errors=i,e===0}const kr={type:"object",discriminator:{propertyName:"step"},required:["step"],oneOf:[{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"activatePlugin"},pluginPath:{type:"string",description:"Path to the plugin directory as absolute path (/wordpress/wp-content/plugins/plugin-name); or the plugin entry file relative to the plugins directory (plugin-name/plugin-name.php)."},pluginName:{type:"string",description:"Optional. Plugin name to display in the progress bar."}},required:["pluginPath","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"activateTheme"},themeFolderName:{type:"string",description:"The name of the theme folder inside wp-content/themes/"}},required:["step","themeFolderName"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"cp"},fromPath:{type:"string",description:"Source path"},toPath:{type:"string",description:"Target path"}},required:["fromPath","step","toPath"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"defineWpConfigConsts"},consts:{type:"object",additionalProperties:{},description:"The constants to define"},method:{type:"string",enum:["rewrite-wp-config","define-before-run"],description:`The method of defining the constants in wp-config.php. Possible values are:
731
+ ${l}`)}}get caption(){return`Downloading ${this.name}`}get name(){try{return new URL(this.getURL(),"http://example.com").pathname.split("/").pop()}catch{return this.getURL()}}get isAsync(){return!0}}const As=()=>{};class qs extends Fr{constructor(t,n){super(n),this.resource=t}getURL(){return this.resource.url}get caption(){return this.resource.caption??super.caption}}class Rs extends Fr{constructor(t,n){super(n),this.resource=t}get name(){return mr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/theme/${Rt(this.resource.slug)}`}}class Ss extends Fr{constructor(t,n){super(n),this.resource=t}get name(){return mr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/plugin/${Rt(this.resource.slug)}`}}function Rt(r){return!r||r.endsWith(".zip")?r:r+".latest-stable.zip"}class St extends Se{constructor(t){super(),this.resource=t}async resolve(){return this.resource.resolve()}async setPlayground(t){return this.resource.setPlayground(t)}get progress(){return this.resource.progress}set progress(t){this.resource.progress=t}get name(){return this.resource.name}get isAsync(){return this.resource.isAsync}}class Ls extends St{async resolve(){return this.promise||(this.promise=super.resolve()),this.promise}}class xs extends St{constructor(t,n){super(t),this.semaphore=n}async resolve(){return this.isAsync?this.semaphore.run(()=>super.resolve()):super.resolve()}}const Ns={type:"object",properties:{landingPage:{type:"string",description:"The URL to navigate to after the blueprint has been run."},description:{type:"string",description:"Optional description. It doesn't do anything but is exposed as a courtesy to developers who may want to document which blueprint file does what.",deprecated:"Use meta.description instead."},meta:{type:"object",properties:{title:{type:"string",description:"A clear and concise name for your Blueprint."},description:{type:"string",description:"A brief explanation of what your Blueprint offers."},author:{type:"string",description:"A GitHub username of the author of this Blueprint."},categories:{type:"array",items:{type:"string"},description:"Relevant categories to help users find your Blueprint in the future Blueprints section on WordPress.org."}},required:["title","author"],additionalProperties:!1,description:"Optional metadata. Used by the Blueprints gallery at https://github.com/WordPress/blueprints"},preferredVersions:{type:"object",properties:{php:{anyOf:[{$ref:"#/definitions/SupportedPHPVersion"},{type:"string",const:"latest"}],description:"The preferred PHP version to use. If not specified, the latest supported version will be used"},wp:{type:"string",description:"The preferred WordPress version to use. If not specified, the latest supported version will be used"}},required:["php","wp"],additionalProperties:!1,description:"The preferred PHP and WordPress versions to use."},features:{type:"object",properties:{networking:{type:"boolean",description:"Should boot with support for network request via wp_safe_remote_get?"}},additionalProperties:!1},extraLibraries:{type:"array",items:{$ref:"#/definitions/ExtraLibrary"},description:"Extra libraries to preload into the Playground instance."},constants:{type:"object",additionalProperties:{type:"string"},description:"PHP Constants to define on every request"},plugins:{type:"array",items:{anyOf:[{type:"string"},{$ref:"#/definitions/FileReference"}]},description:"WordPress plugins to install and activate"},siteOptions:{type:"object",additionalProperties:{type:"string"},properties:{blogname:{type:"string",description:"The site title"}},description:"WordPress site options to define"},login:{anyOf:[{type:"boolean"},{type:"object",properties:{username:{type:"string"},password:{type:"string"}},required:["username","password"],additionalProperties:!1}],description:"User to log in as. If true, logs the user in as admin/password."},phpExtensionBundles:{type:"array",items:{$ref:"#/definitions/SupportedPHPExtensionBundle"},description:"The PHP extensions to use."},steps:{type:"array",items:{anyOf:[{$ref:"#/definitions/StepDefinition"},{type:"string"},{not:{}},{type:"boolean",const:!1},{type:"null"}]},description:"The steps to run after every other operation in this Blueprint was executed."},$schema:{type:"string"}},additionalProperties:!1},Fs={type:"string",enum:["8.3","8.2","8.1","8.0","7.4","7.3","7.2","7.1","7.0"]},Cs={type:"string",enum:["kitchen-sink","light"]},Lt=Object.prototype.hasOwnProperty;function re(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let i=null,e=0;const f=e;let h=!1;const b=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let L;if(r.resource===void 0&&(L="resource")||r.path===void 0&&(L="path")){const I={instancePath:t,schemaPath:"#/definitions/VFSReference/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"};i===null?i=[I]:i.push(I),e++}else{const I=e;for(const z in r)if(!(z==="resource"||z==="path")){const c={instancePath:t,schemaPath:"#/definitions/VFSReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:z},message:"must NOT have additional properties"};i===null?i=[c]:i.push(c),e++;break}if(I===e){if(r.resource!==void 0){let z=r.resource;const c=e;if(typeof z!="string"){const A={instancePath:t+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[A]:i.push(A),e++}if(z!=="vfs"){const A={instancePath:t+"/resource",schemaPath:"#/definitions/VFSReference/properties/resource/const",keyword:"const",params:{allowedValue:"vfs"},message:"must be equal to constant"};i===null?i=[A]:i.push(A),e++}var m=c===e}else var m=!0;if(m)if(r.path!==void 0){const z=e;if(typeof r.path!="string"){const A={instancePath:t+"/path",schemaPath:"#/definitions/VFSReference/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[A]:i.push(A),e++}var m=z===e}else var m=!0}}}else{const L={instancePath:t,schemaPath:"#/definitions/VFSReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[L]:i.push(L),e++}var k=b===e;if(h=h||k,!h){const L=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let c;if(r.resource===void 0&&(c="resource")||r.name===void 0&&(c="name")||r.contents===void 0&&(c="contents")){const A={instancePath:t,schemaPath:"#/definitions/LiteralReference/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"};i===null?i=[A]:i.push(A),e++}else{const A=e;for(const $ in r)if(!($==="resource"||$==="name"||$==="contents")){const T={instancePath:t,schemaPath:"#/definitions/LiteralReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};i===null?i=[T]:i.push(T),e++;break}if(A===e){if(r.resource!==void 0){let $=r.resource;const T=e;if(typeof $!="string"){const P={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[P]:i.push(P),e++}if($!=="literal"){const P={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/const",keyword:"const",params:{allowedValue:"literal"},message:"must be equal to constant"};i===null?i=[P]:i.push(P),e++}var x=T===e}else var x=!0;if(x){if(r.name!==void 0){const $=e;if(typeof r.name!="string"){const P={instancePath:t+"/name",schemaPath:"#/definitions/LiteralReference/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[P]:i.push(P),e++}var x=$===e}else var x=!0;if(x)if(r.contents!==void 0){let $=r.contents;const T=e,P=e;let y=!1;const g=e;if(typeof $!="string"){const O={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[O]:i.push(O),e++}var D=g===e;if(y=y||D,!y){const O=e;if(e===O)if($&&typeof $=="object"&&!Array.isArray($)){let q;if($.BYTES_PER_ELEMENT===void 0&&(q="BYTES_PER_ELEMENT")||$.buffer===void 0&&(q="buffer")||$.byteLength===void 0&&(q="byteLength")||$.byteOffset===void 0&&(q="byteOffset")||$.length===void 0&&(q="length")){const W={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/required",keyword:"required",params:{missingProperty:q},message:"must have required property '"+q+"'"};i===null?i=[W]:i.push(W),e++}else{const W=e;for(const R in $)if(!(R==="BYTES_PER_ELEMENT"||R==="buffer"||R==="byteLength"||R==="byteOffset"||R==="length")){let V=$[R];const ee=e;if(!(typeof V=="number"&&isFinite(V))){const J={instancePath:t+"/contents/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[J]:i.push(J),e++}var v=ee===e;if(!v)break}if(W===e){if($.BYTES_PER_ELEMENT!==void 0){let R=$.BYTES_PER_ELEMENT;const V=e;if(!(typeof R=="number"&&isFinite(R))){const ee={instancePath:t+"/contents/BYTES_PER_ELEMENT",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[ee]:i.push(ee),e++}var U=V===e}else var U=!0;if(U){if($.buffer!==void 0){let R=$.buffer;const V=e;if(e===V)if(R&&typeof R=="object"&&!Array.isArray(R)){let J;if(R.byteLength===void 0&&(J="byteLength")){const C={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:J},message:"must have required property '"+J+"'"};i===null?i=[C]:i.push(C),e++}else{const C=e;for(const Q in R)if(Q!=="byteLength"){const M={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:Q},message:"must NOT have additional properties"};i===null?i=[M]:i.push(M),e++;break}if(C===e&&R.byteLength!==void 0){let Q=R.byteLength;if(!(typeof Q=="number"&&isFinite(Q))){const M={instancePath:t+"/contents/buffer/byteLength",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[M]:i.push(M),e++}}}}else{const J={instancePath:t+"/contents/buffer",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[J]:i.push(J),e++}var U=V===e}else var U=!0;if(U){if($.byteLength!==void 0){let R=$.byteLength;const V=e;if(!(typeof R=="number"&&isFinite(R))){const J={instancePath:t+"/contents/byteLength",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[J]:i.push(J),e++}var U=V===e}else var U=!0;if(U){if($.byteOffset!==void 0){let R=$.byteOffset;const V=e;if(!(typeof R=="number"&&isFinite(R))){const J={instancePath:t+"/contents/byteOffset",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[J]:i.push(J),e++}var U=V===e}else var U=!0;if(U)if($.length!==void 0){let R=$.length;const V=e;if(!(typeof R=="number"&&isFinite(R))){const J={instancePath:t+"/contents/length",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[J]:i.push(J),e++}var U=V===e}else var U=!0}}}}}}else{const q={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[q]:i.push(q),e++}var D=O===e;y=y||D}if(y)e=P,i!==null&&(P?i.length=P:i=null);else{const O={instancePath:t+"/contents",schemaPath:"#/definitions/LiteralReference/properties/contents/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};i===null?i=[O]:i.push(O),e++}var x=T===e}else var x=!0}}}}else{const c={instancePath:t,schemaPath:"#/definitions/LiteralReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[c]:i.push(c),e++}var k=L===e;if(h=h||k,!h){const c=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let T;if(r.resource===void 0&&(T="resource")||r.slug===void 0&&(T="slug")){const P={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/required",keyword:"required",params:{missingProperty:T},message:"must have required property '"+T+"'"};i===null?i=[P]:i.push(P),e++}else{const P=e;for(const y in r)if(!(y==="resource"||y==="slug")){const g={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"};i===null?i=[g]:i.push(g),e++;break}if(P===e){if(r.resource!==void 0){let y=r.resource;const g=e;if(typeof y!="string"){const w={instancePath:t+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[w]:i.push(w),e++}if(y!=="wordpress.org/themes"){const w={instancePath:t+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/const",keyword:"const",params:{allowedValue:"wordpress.org/themes"},message:"must be equal to constant"};i===null?i=[w]:i.push(w),e++}var te=g===e}else var te=!0;if(te)if(r.slug!==void 0){const y=e;if(typeof r.slug!="string"){const w={instancePath:t+"/slug",schemaPath:"#/definitions/CoreThemeReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[w]:i.push(w),e++}var te=y===e}else var te=!0}}}else{const T={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[T]:i.push(T),e++}var k=c===e;if(h=h||k,!h){const T=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let g;if(r.resource===void 0&&(g="resource")||r.slug===void 0&&(g="slug")){const w={instancePath:t,schemaPath:"#/definitions/CorePluginReference/required",keyword:"required",params:{missingProperty:g},message:"must have required property '"+g+"'"};i===null?i=[w]:i.push(w),e++}else{const w=e;for(const O in r)if(!(O==="resource"||O==="slug")){const N={instancePath:t,schemaPath:"#/definitions/CorePluginReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:O},message:"must NOT have additional properties"};i===null?i=[N]:i.push(N),e++;break}if(w===e){if(r.resource!==void 0){let O=r.resource;const N=e;if(typeof O!="string"){const q={instancePath:t+"/resource",schemaPath:"#/definitions/CorePluginReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[q]:i.push(q),e++}if(O!=="wordpress.org/plugins"){const q={instancePath:t+"/resource",schemaPath:"#/definitions/CorePluginReference/properties/resource/const",keyword:"const",params:{allowedValue:"wordpress.org/plugins"},message:"must be equal to constant"};i===null?i=[q]:i.push(q),e++}var H=N===e}else var H=!0;if(H)if(r.slug!==void 0){const O=e;if(typeof r.slug!="string"){const q={instancePath:t+"/slug",schemaPath:"#/definitions/CorePluginReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[q]:i.push(q),e++}var H=O===e}else var H=!0}}}else{const g={instancePath:t,schemaPath:"#/definitions/CorePluginReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[g]:i.push(g),e++}var k=T===e;if(h=h||k,!h){const g=e;if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let N;if(r.resource===void 0&&(N="resource")||r.url===void 0&&(N="url")){const q={instancePath:t,schemaPath:"#/definitions/UrlReference/required",keyword:"required",params:{missingProperty:N},message:"must have required property '"+N+"'"};i===null?i=[q]:i.push(q),e++}else{const q=e;for(const W in r)if(!(W==="resource"||W==="url"||W==="caption")){const R={instancePath:t,schemaPath:"#/definitions/UrlReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:W},message:"must NOT have additional properties"};i===null?i=[R]:i.push(R),e++;break}if(q===e){if(r.resource!==void 0){let W=r.resource;const R=e;if(typeof W!="string"){const V={instancePath:t+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[V]:i.push(V),e++}if(W!=="url"){const V={instancePath:t+"/resource",schemaPath:"#/definitions/UrlReference/properties/resource/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};i===null?i=[V]:i.push(V),e++}var E=R===e}else var E=!0;if(E){if(r.url!==void 0){const W=e;if(typeof r.url!="string"){const V={instancePath:t+"/url",schemaPath:"#/definitions/UrlReference/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[V]:i.push(V),e++}var E=W===e}else var E=!0;if(E)if(r.caption!==void 0){const W=e;if(typeof r.caption!="string"){const V={instancePath:t+"/caption",schemaPath:"#/definitions/UrlReference/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[V]:i.push(V),e++}var E=W===e}else var E=!0}}}}else{const N={instancePath:t,schemaPath:"#/definitions/UrlReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[N]:i.push(N),e++}var k=g===e;h=h||k}}}}if(h)e=f,i!==null&&(f?i.length=f:i=null);else{const L={instancePath:t,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[L]:i.push(L),e++,re.errors=i,!1}return re.errors=i,e===0}const kr={type:"object",discriminator:{propertyName:"step"},required:["step"],oneOf:[{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"activatePlugin"},pluginPath:{type:"string",description:"Path to the plugin directory as absolute path (/wordpress/wp-content/plugins/plugin-name); or the plugin entry file relative to the plugins directory (plugin-name/plugin-name.php)."},pluginName:{type:"string",description:"Optional. Plugin name to display in the progress bar."}},required:["pluginPath","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"activateTheme"},themeFolderName:{type:"string",description:"The name of the theme folder inside wp-content/themes/"}},required:["step","themeFolderName"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"cp"},fromPath:{type:"string",description:"Source path"},toPath:{type:"string",description:"Target path"}},required:["fromPath","step","toPath"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"defineWpConfigConsts"},consts:{type:"object",additionalProperties:{},description:"The constants to define"},method:{type:"string",enum:["rewrite-wp-config","define-before-run"],description:`The method of defining the constants in wp-config.php. Possible values are:
725
732
 
726
733
  - rewrite-wp-config: Default. Rewrites the wp-config.php file to explicitly call define() with the requested name and value. This method alters the file on the disk, but it doesn't conflict with existing define() calls in wp-config.php.
727
734
 
728
735
  - define-before-run: Defines the constant before running the requested script. It doesn't alter any files on the disk, but constants defined this way may conflict with existing define() calls in wp-config.php.`},virtualize:{type:"boolean",deprecated:`This option is noop and will be removed in a future version.
729
736
  This option is only kept in here to avoid breaking Blueprint schema validation
730
- for existing apps using this option.`}},required:["consts","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"defineSiteUrl"},siteUrl:{type:"string",description:"The URL"}},required:["siteUrl","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"enableMultisite"}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"importWxr"},file:{$ref:"#/definitions/FileReference",description:"The file to import"}},required:["file","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"importThemeStarterContent",description:"The step identifier."},themeSlug:{type:"string",description:"The name of the theme to import content from."}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"importWordPressFiles"},wordPressFilesZip:{$ref:"#/definitions/FileReference",description:"The zip file containing the top-level WordPress files and directories."},pathInZip:{type:"string",description:"The path inside the zip file where the WordPress files are."}},required:["step","wordPressFilesZip"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},ifAlreadyInstalled:{type:"string",enum:["overwrite","skip","error"],description:"What to do if the asset already exists."},step:{type:"string",const:"installPlugin",description:"The step identifier."},pluginZipFile:{$ref:"#/definitions/FileReference",description:"The plugin zip file to install."},options:{$ref:"#/definitions/InstallPluginOptions",description:"Optional installation options."}},required:["pluginZipFile","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},ifAlreadyInstalled:{type:"string",enum:["overwrite","skip","error"],description:"What to do if the asset already exists."},step:{type:"string",const:"installTheme",description:"The step identifier."},themeZipFile:{$ref:"#/definitions/FileReference",description:"The theme zip file to install."},options:{type:"object",properties:{activate:{type:"boolean",description:"Whether to activate the theme after installing it."},importStarterContent:{type:"boolean",description:"Whether to import the theme's starter content after installing it."}},additionalProperties:!1,description:"Optional installation options."}},required:["step","themeZipFile"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"login"},username:{type:"string",description:"The user to log in as. Defaults to 'admin'."},password:{type:"string",description:"The password to log in with. Defaults to 'password'."}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"mkdir"},path:{type:"string",description:"The path of the directory you want to create"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"mv"},fromPath:{type:"string",description:"Source path"},toPath:{type:"string",description:"Target path"}},required:["fromPath","step","toPath"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"resetData"}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"request"},request:{$ref:"#/definitions/PHPRequest",description:"Request details (See /wordpress-playground/api/universal/interface/PHPRequest)"}},required:["request","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"rm"},path:{type:"string",description:"The path to remove"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"rmdir"},path:{type:"string",description:"The path to remove"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runPHP",description:"The step identifier."},code:{type:"string",description:"The PHP code to run."}},required:["code","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runPHPWithOptions"},options:{$ref:"#/definitions/PHPRunOptions",description:"Run options (See /wordpress-playground/api/universal/interface/PHPRunOptions/))"}},required:["options","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runWpInstallationWizard"},options:{$ref:"#/definitions/WordPressInstallationOptions"}},required:["options","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runSql",description:"The step identifier."},sql:{$ref:"#/definitions/FileReference",description:"The SQL to run. Each non-empty line must contain a valid SQL query."}},required:["sql","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"setSiteOptions",description:'The name of the step. Must be "setSiteOptions".'},options:{type:"object",additionalProperties:{},description:"The options to set on the site."}},required:["options","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"unzip"},zipFile:{$ref:"#/definitions/FileReference",description:"The zip file to extract"},zipPath:{type:"string",description:"The path of the zip file to extract",deprecated:"Use zipFile instead."},extractToPath:{type:"string",description:"The path to extract the zip file to"}},required:["extractToPath","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"updateUserMeta"},meta:{type:"object",additionalProperties:{},description:'An object of user meta values to set, e.g. { "first_name": "John" }'},userId:{type:"number",description:"User ID"}},required:["meta","step","userId"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"writeFile"},path:{type:"string",description:"The path of the file to write to"},data:{anyOf:[{$ref:"#/definitions/FileReference"},{type:"string"},{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}}],description:"The data to write"}},required:["data","path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"wp-cli",description:"The step identifier."},command:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"The WP CLI command to run."},wpCliPath:{type:"string",description:"wp-cli.phar path"}},required:["command","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"setSiteLanguage"},language:{type:"string",description:"The language to set, e.g. 'en_US'"}},required:["language","step"]}]},Nt={type:"string",enum:["GET","POST","HEAD","OPTIONS","PATCH","PUT","DELETE"]};function ye(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let i=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let X;if(r.url===void 0&&(X="url"))return ye.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:X},message:"must have required property '"+X+"'"}],!1;{const x=e;for(const P in r)if(!(P==="method"||P==="url"||P==="headers"||P==="body"))return ye.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"}],!1;if(x===e){if(r.method!==void 0){let P=r.method;const W=e;if(typeof P!="string")return ye.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(P==="GET"||P==="POST"||P==="HEAD"||P==="OPTIONS"||P==="PATCH"||P==="PUT"||P==="DELETE"))return ye.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:Nt.enum},message:"must be equal to one of the allowed values"}],!1;var u=W===e}else var u=!0;if(u){if(r.url!==void 0){const P=e;if(typeof r.url!="string")return ye.errors=[{instancePath:t+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=P===e}else var u=!0;if(u){if(r.headers!==void 0){let P=r.headers;const W=e;if(e===e)if(P&&typeof P=="object"&&!Array.isArray(P))for(const R in P){const V=e;if(typeof P[R]!="string")return ye.errors=[{instancePath:t+"/headers/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=V===e;if(!h)break}else return ye.errors=[{instancePath:t+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var u=W===e}else var u=!0;if(u)if(r.body!==void 0){let P=r.body;const W=e,J=e;let m=!1;const R=e;if(typeof P!="string"){const g={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[g]:i.push(g),e++}var b=R===e;if(m=m||b,!m){const g=e;if(e===g)if(P&&typeof P=="object"&&!Array.isArray(P)){let w;if(P.BYTES_PER_ELEMENT===void 0&&(w="BYTES_PER_ELEMENT")||P.buffer===void 0&&(w="buffer")||P.byteLength===void 0&&(w="byteLength")||P.byteOffset===void 0&&(w="byteOffset")||P.length===void 0&&(w="length")){const $={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:w},message:"must have required property '"+w+"'"};i===null?i=[$]:i.push($),e++}else{const $=e;for(const v in P)if(!(v==="BYTES_PER_ELEMENT"||v==="buffer"||v==="byteLength"||v==="byteOffset"||v==="length")){let c=P[v];const N=e;if(!(typeof c=="number"&&isFinite(c))){const L={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[L]:i.push(L),e++}var k=N===e;if(!k)break}if($===e){if(P.BYTES_PER_ELEMENT!==void 0){let v=P.BYTES_PER_ELEMENT;const c=e;if(!(typeof v=="number"&&isFinite(v))){const N={instancePath:t+"/body/BYTES_PER_ELEMENT",schemaPath:"#/properties/body/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[N]:i.push(N),e++}var y=c===e}else var y=!0;if(y){if(P.buffer!==void 0){let v=P.buffer;const c=e;if(e===c)if(v&&typeof v=="object"&&!Array.isArray(v)){let L;if(v.byteLength===void 0&&(L="byteLength")){const j={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:L},message:"must have required property '"+L+"'"};i===null?i=[j]:i.push(j),e++}else{const j=e;for(const M in v)if(M!=="byteLength"){const q={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:M},message:"must NOT have additional properties"};i===null?i=[q]:i.push(q),e++;break}if(j===e&&v.byteLength!==void 0){let M=v.byteLength;if(!(typeof M=="number"&&isFinite(M))){const q={instancePath:t+"/body/buffer/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[q]:i.push(q),e++}}}}else{const L={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[L]:i.push(L),e++}var y=c===e}else var y=!0;if(y){if(P.byteLength!==void 0){let v=P.byteLength;const c=e;if(!(typeof v=="number"&&isFinite(v))){const L={instancePath:t+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[L]:i.push(L),e++}var y=c===e}else var y=!0;if(y){if(P.byteOffset!==void 0){let v=P.byteOffset;const c=e;if(!(typeof v=="number"&&isFinite(v))){const L={instancePath:t+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[L]:i.push(L),e++}var y=c===e}else var y=!0;if(y)if(P.length!==void 0){let v=P.length;const c=e;if(!(typeof v=="number"&&isFinite(v))){const L={instancePath:t+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[L]:i.push(L),e++}var y=c===e}else var y=!0}}}}}}else{const w={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[w]:i.push(w),e++}var b=g===e;if(m=m||b,!m){const w=e;if(e===w)if(P&&typeof P=="object"&&!Array.isArray(P))for(const v in P){let c=P[v];const N=e,L=e;let j=!1;const M=e;if(typeof c!="string"){const q={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[q]:i.push(q),e++}var E=M===e;if(j=j||E,!j){const q=e;if(e===q)if(c&&typeof c=="object"&&!Array.isArray(c)){let te;if(c.BYTES_PER_ELEMENT===void 0&&(te="BYTES_PER_ELEMENT")||c.buffer===void 0&&(te="buffer")||c.byteLength===void 0&&(te="byteLength")||c.byteOffset===void 0&&(te="byteOffset")||c.length===void 0&&(te="length")){const Z={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/required",keyword:"required",params:{missingProperty:te},message:"must have required property '"+te+"'"};i===null?i=[Z]:i.push(Z),e++}else{const Z=e;for(const C in c)if(!(C==="BYTES_PER_ELEMENT"||C==="buffer"||C==="byteLength"||C==="byteOffset"||C==="length")){let U=c[C];const z=e;if(!(typeof U=="number"&&isFinite(U))){const G={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1")+"/"+C.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[G]:i.push(G),e++}var S=z===e;if(!S)break}if(Z===e){if(c.BYTES_PER_ELEMENT!==void 0){let C=c.BYTES_PER_ELEMENT;const U=e;if(!(typeof C=="number"&&isFinite(C))){const z={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1")+"/BYTES_PER_ELEMENT",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[z]:i.push(z),e++}var I=U===e}else var I=!0;if(I){if(c.buffer!==void 0){let C=c.buffer;const U=e;if(e===U)if(C&&typeof C=="object"&&!Array.isArray(C)){let G;if(C.byteLength===void 0&&(G="byteLength")){const re={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:G},message:"must have required property '"+G+"'"};i===null?i=[re]:i.push(re),e++}else{const re=e;for(const pe in C)if(pe!=="byteLength"){const le={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:pe},message:"must NOT have additional properties"};i===null?i=[le]:i.push(le),e++;break}if(re===e&&C.byteLength!==void 0){let pe=C.byteLength;if(!(typeof pe=="number"&&isFinite(pe))){const le={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer/byteLength",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[le]:i.push(le),e++}}}}else{const G={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[G]:i.push(G),e++}var I=U===e}else var I=!0;if(I){if(c.byteLength!==void 0){let C=c.byteLength;const U=e;if(!(typeof C=="number"&&isFinite(C))){const G={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1")+"/byteLength",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[G]:i.push(G),e++}var I=U===e}else var I=!0;if(I){if(c.byteOffset!==void 0){let C=c.byteOffset;const U=e;if(!(typeof C=="number"&&isFinite(C))){const G={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1")+"/byteOffset",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[G]:i.push(G),e++}var I=U===e}else var I=!0;if(I)if(c.length!==void 0){let C=c.length;const U=e;if(!(typeof C=="number"&&isFinite(C))){const G={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1")+"/length",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[G]:i.push(G),e++}var I=U===e}else var I=!0}}}}}}else{const te={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[te]:i.push(te),e++}var E=q===e;if(j=j||E,!j){const te=e;if(e===te)if(c&&typeof c=="object"&&!Array.isArray(c)){let C;if(c.lastModified===void 0&&(C="lastModified")||c.name===void 0&&(C="name")||c.size===void 0&&(C="size")||c.type===void 0&&(C="type")||c.webkitRelativePath===void 0&&(C="webkitRelativePath")){const U={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/required",keyword:"required",params:{missingProperty:C},message:"must have required property '"+C+"'"};i===null?i=[U]:i.push(U),e++}else{const U=e;for(const z in c)if(!(z==="size"||z==="type"||z==="lastModified"||z==="name"||z==="webkitRelativePath")){const G={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:z},message:"must NOT have additional properties"};i===null?i=[G]:i.push(G),e++;break}if(U===e){if(c.size!==void 0){let z=c.size;const G=e;if(!(typeof z=="number"&&isFinite(z))){const re={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1")+"/size",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[re]:i.push(re),e++}var _=G===e}else var _=!0;if(_){if(c.type!==void 0){const z=e;if(typeof c.type!="string"){const re={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1")+"/type",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[re]:i.push(re),e++}var _=z===e}else var _=!0;if(_){if(c.lastModified!==void 0){let z=c.lastModified;const G=e;if(!(typeof z=="number"&&isFinite(z))){const pe={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1")+"/lastModified",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/lastModified/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[pe]:i.push(pe),e++}var _=G===e}else var _=!0;if(_){if(c.name!==void 0){const z=e;if(typeof c.name!="string"){const re={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1")+"/name",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[re]:i.push(re),e++}var _=z===e}else var _=!0;if(_)if(c.webkitRelativePath!==void 0){const z=e;if(typeof c.webkitRelativePath!="string"){const re={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1")+"/webkitRelativePath",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/webkitRelativePath/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[re]:i.push(re),e++}var _=z===e}else var _=!0}}}}}}else{const C={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[C]:i.push(C),e++}var E=te===e;j=j||E}}if(j)e=L,i!==null&&(L?i.length=L:i=null);else{const q={instancePath:t+"/body/"+v.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};i===null?i=[q]:i.push(q),e++}var D=N===e;if(!D)break}else{const v={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[v]:i.push(v),e++}var b=w===e;m=m||b}}if(m)e=J,i!==null&&(J?i.length=J:i=null);else{const g={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[g]:i.push(g),e++,ye.errors=i,!1}var u=W===e}else var u=!0}}}}}else return ye.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return ye.errors=i,e===0}const Ws={type:"object",properties:{relativeUri:{type:"string",description:"Request path following the domain:port part."},scriptPath:{type:"string",description:"Path of the .php file to execute."},protocol:{type:"string",description:"Request protocol."},method:{$ref:"#/definitions/HTTPMethod",description:"Request method. Default: `GET`."},headers:{$ref:"#/definitions/PHPRequestHeaders",description:"Request headers."},body:{anyOf:[{type:"string"},{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}}],description:"Request body."},env:{type:"object",additionalProperties:{type:"string"},description:"Environment variables to set for this run."},$_SERVER:{type:"object",additionalProperties:{type:"string"},description:"$_SERVER entries to set for this run."},code:{type:"string",description:"The code snippet to eval instead of a php file."}},additionalProperties:!1};function ne(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let i=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){const I=e;for(const _ in r)if(!xt.call(Ws.properties,_))return ne.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:_},message:"must NOT have additional properties"}],!1;if(I===e){if(r.relativeUri!==void 0){const _=e;if(typeof r.relativeUri!="string")return ne.errors=[{instancePath:t+"/relativeUri",schemaPath:"#/properties/relativeUri/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=_===e}else var u=!0;if(u){if(r.scriptPath!==void 0){const _=e;if(typeof r.scriptPath!="string")return ne.errors=[{instancePath:t+"/scriptPath",schemaPath:"#/properties/scriptPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=_===e}else var u=!0;if(u){if(r.protocol!==void 0){const _=e;if(typeof r.protocol!="string")return ne.errors=[{instancePath:t+"/protocol",schemaPath:"#/properties/protocol/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=_===e}else var u=!0;if(u){if(r.method!==void 0){let _=r.method;const D=e;if(typeof _!="string")return ne.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(_==="GET"||_==="POST"||_==="HEAD"||_==="OPTIONS"||_==="PATCH"||_==="PUT"||_==="DELETE"))return ne.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:Nt.enum},message:"must be equal to one of the allowed values"}],!1;var u=D===e}else var u=!0;if(u){if(r.headers!==void 0){let _=r.headers;const D=e;if(e===e)if(_&&typeof _=="object"&&!Array.isArray(_))for(const P in _){const W=e;if(typeof _[P]!="string")return ne.errors=[{instancePath:t+"/headers/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=W===e;if(!h)break}else return ne.errors=[{instancePath:t+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var u=D===e}else var u=!0;if(u){if(r.body!==void 0){let _=r.body;const D=e,X=e;let x=!1;const P=e;if(typeof _!="string"){const J={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[J]:i.push(J),e++}var b=P===e;if(x=x||b,!x){const J=e;if(e===J)if(_&&typeof _=="object"&&!Array.isArray(_)){let R;if(_.BYTES_PER_ELEMENT===void 0&&(R="BYTES_PER_ELEMENT")||_.buffer===void 0&&(R="buffer")||_.byteLength===void 0&&(R="byteLength")||_.byteOffset===void 0&&(R="byteOffset")||_.length===void 0&&(R="length")){const V={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:R},message:"must have required property '"+R+"'"};i===null?i=[V]:i.push(V),e++}else{const V=e;for(const g in _)if(!(g==="BYTES_PER_ELEMENT"||g==="buffer"||g==="byteLength"||g==="byteOffset"||g==="length")){let O=_[g];const w=e;if(!(typeof O=="number"&&isFinite(O))){const $={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[$]:i.push($),e++}var k=w===e;if(!k)break}if(V===e){if(_.BYTES_PER_ELEMENT!==void 0){let g=_.BYTES_PER_ELEMENT;const O=e;if(!(typeof g=="number"&&isFinite(g))){const w={instancePath:t+"/body/BYTES_PER_ELEMENT",schemaPath:"#/properties/body/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[w]:i.push(w),e++}var y=O===e}else var y=!0;if(y){if(_.buffer!==void 0){let g=_.buffer;const O=e;if(e===O)if(g&&typeof g=="object"&&!Array.isArray(g)){let $;if(g.byteLength===void 0&&($="byteLength")){const v={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:$},message:"must have required property '"+$+"'"};i===null?i=[v]:i.push(v),e++}else{const v=e;for(const c in g)if(c!=="byteLength"){const N={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:c},message:"must NOT have additional properties"};i===null?i=[N]:i.push(N),e++;break}if(v===e&&g.byteLength!==void 0){let c=g.byteLength;if(!(typeof c=="number"&&isFinite(c))){const N={instancePath:t+"/body/buffer/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[N]:i.push(N),e++}}}}else{const $={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[$]:i.push($),e++}var y=O===e}else var y=!0;if(y){if(_.byteLength!==void 0){let g=_.byteLength;const O=e;if(!(typeof g=="number"&&isFinite(g))){const $={instancePath:t+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[$]:i.push($),e++}var y=O===e}else var y=!0;if(y){if(_.byteOffset!==void 0){let g=_.byteOffset;const O=e;if(!(typeof g=="number"&&isFinite(g))){const $={instancePath:t+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[$]:i.push($),e++}var y=O===e}else var y=!0;if(y)if(_.length!==void 0){let g=_.length;const O=e;if(!(typeof g=="number"&&isFinite(g))){const $={instancePath:t+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[$]:i.push($),e++}var y=O===e}else var y=!0}}}}}}else{const R={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[R]:i.push(R),e++}var b=J===e;x=x||b}if(x)e=X,i!==null&&(X?i.length=X:i=null);else{const J={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[J]:i.push(J),e++,ne.errors=i,!1}var u=D===e}else var u=!0;if(u){if(r.env!==void 0){let _=r.env;const D=e;if(e===D)if(_&&typeof _=="object"&&!Array.isArray(_))for(const x in _){const P=e;if(typeof _[x]!="string")return ne.errors=[{instancePath:t+"/env/"+x.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/env/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var E=P===e;if(!E)break}else return ne.errors=[{instancePath:t+"/env",schemaPath:"#/properties/env/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var u=D===e}else var u=!0;if(u){if(r.$_SERVER!==void 0){let _=r.$_SERVER;const D=e;if(e===D)if(_&&typeof _=="object"&&!Array.isArray(_))for(const x in _){const P=e;if(typeof _[x]!="string")return ne.errors=[{instancePath:t+"/$_SERVER/"+x.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/%24_SERVER/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var S=P===e;if(!S)break}else return ne.errors=[{instancePath:t+"/$_SERVER",schemaPath:"#/properties/%24_SERVER/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var u=D===e}else var u=!0;if(u)if(r.code!==void 0){const _=e;if(typeof r.code!="string")return ne.errors=[{instancePath:t+"/code",schemaPath:"#/properties/code/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=_===e}else var u=!0}}}}}}}}}else return ne.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return ne.errors=i,e===0}function o(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let i=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let br;if(r.step===void 0&&(br="step"))return o.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:br},message:"must have required property '"+br+"'"}],!1;{const Y=r.step;if(typeof Y=="string")if(Y==="activatePlugin"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.pluginPath===void 0&&(d="pluginPath")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="pluginPath"||s==="pluginName"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/0/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/0/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var u=T===e}else var u=!0;if(u)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/0/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=a===e}else var u=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/0/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var h=f===e}else var h=!0;if(h){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/0/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="activatePlugin")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/0/properties/step/const",keyword:"const",params:{allowedValue:"activatePlugin"},message:"must be equal to constant"}],!1;var h=f===e}else var h=!0;if(h){if(r.pluginPath!==void 0){const s=e;if(typeof r.pluginPath!="string")return o.errors=[{instancePath:t+"/pluginPath",schemaPath:"#/oneOf/0/properties/pluginPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=s===e}else var h=!0;if(h)if(r.pluginName!==void 0){const s=e;if(typeof r.pluginName!="string")return o.errors=[{instancePath:t+"/pluginName",schemaPath:"#/oneOf/0/properties/pluginName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=s===e}else var h=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="activateTheme"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step")||r.themeFolderName===void 0&&(d="themeFolderName"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="themeFolderName"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/1/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/1/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var b=T===e}else var b=!0;if(b)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/1/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var b=a===e}else var b=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/1/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var k=f===e}else var k=!0;if(k){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/1/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="activateTheme")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/1/properties/step/const",keyword:"const",params:{allowedValue:"activateTheme"},message:"must be equal to constant"}],!1;var k=f===e}else var k=!0;if(k)if(r.themeFolderName!==void 0){const s=e;if(typeof r.themeFolderName!="string")return o.errors=[{instancePath:t+"/themeFolderName",schemaPath:"#/oneOf/1/properties/themeFolderName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var k=s===e}else var k=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="cp"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.fromPath===void 0&&(d="fromPath")||r.step===void 0&&(d="step")||r.toPath===void 0&&(d="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="fromPath"||s==="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/2/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/2/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var y=T===e}else var y=!0;if(y)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/2/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=a===e}else var y=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/2/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var E=f===e}else var E=!0;if(E){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/2/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="cp")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/2/properties/step/const",keyword:"const",params:{allowedValue:"cp"},message:"must be equal to constant"}],!1;var E=f===e}else var E=!0;if(E){if(r.fromPath!==void 0){const s=e;if(typeof r.fromPath!="string")return o.errors=[{instancePath:t+"/fromPath",schemaPath:"#/oneOf/2/properties/fromPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var E=s===e}else var E=!0;if(E)if(r.toPath!==void 0){const s=e;if(typeof r.toPath!="string")return o.errors=[{instancePath:t+"/toPath",schemaPath:"#/oneOf/2/properties/toPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var E=s===e}else var E=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="defineWpConfigConsts"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.consts===void 0&&(d="consts")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="consts"||s==="method"||s==="virtualize"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/3/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/3/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var S=T===e}else var S=!0;if(S)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/3/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var S=a===e}else var S=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/3/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var I=f===e}else var I=!0;if(I){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/3/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="defineWpConfigConsts")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/3/properties/step/const",keyword:"const",params:{allowedValue:"defineWpConfigConsts"},message:"must be equal to constant"}],!1;var I=f===e}else var I=!0;if(I){if(r.consts!==void 0){let s=r.consts;const f=e;if(e===f&&!(s&&typeof s=="object"&&!Array.isArray(s)))return o.errors=[{instancePath:t+"/consts",schemaPath:"#/oneOf/3/properties/consts/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var I=f===e}else var I=!0;if(I){if(r.method!==void 0){let s=r.method;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/method",schemaPath:"#/oneOf/3/properties/method/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(s==="rewrite-wp-config"||s==="define-before-run"))return o.errors=[{instancePath:t+"/method",schemaPath:"#/oneOf/3/properties/method/enum",keyword:"enum",params:{allowedValues:kr.oneOf[3].properties.method.enum},message:"must be equal to one of the allowed values"}],!1;var I=f===e}else var I=!0;if(I)if(r.virtualize!==void 0){const s=e;if(typeof r.virtualize!="boolean")return o.errors=[{instancePath:t+"/virtualize",schemaPath:"#/oneOf/3/properties/virtualize/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var I=s===e}else var I=!0}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="defineSiteUrl"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.siteUrl===void 0&&(d="siteUrl")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/4/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="siteUrl"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/4/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/4/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/4/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var _=T===e}else var _=!0;if(_)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/4/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var _=a===e}else var _=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/4/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var D=f===e}else var D=!0;if(D){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/4/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="defineSiteUrl")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/4/properties/step/const",keyword:"const",params:{allowedValue:"defineSiteUrl"},message:"must be equal to constant"}],!1;var D=f===e}else var D=!0;if(D)if(r.siteUrl!==void 0){const s=e;if(typeof r.siteUrl!="string")return o.errors=[{instancePath:t+"/siteUrl",schemaPath:"#/oneOf/4/properties/siteUrl/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var D=s===e}else var D=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/4/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="enableMultisite"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/5/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/5/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var X=T===e}else var X=!0;if(X)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/5/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var X=a===e}else var X=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/5/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var x=f===e}else var x=!0;if(x)if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/5/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="enableMultisite")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/5/properties/step/const",keyword:"const",params:{allowedValue:"enableMultisite"},message:"must be equal to constant"}],!1;var x=f===e}else var x=!0}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="importWxr"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.file===void 0&&(d="file")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="file"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/6/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/6/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var P=T===e}else var P=!0;if(P)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/6/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var P=a===e}else var P=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/6/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var W=f===e}else var W=!0;if(W){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/6/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="importWxr")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/6/properties/step/const",keyword:"const",params:{allowedValue:"importWxr"},message:"must be equal to constant"}],!1;var W=f===e}else var W=!0;if(W)if(r.file!==void 0){const s=e;ee(r.file,{instancePath:t+"/file",parentData:r,parentDataProperty:"file",rootData:l})||(i=i===null?ee.errors:i.concat(ee.errors),e=i.length);var W=s===e}else var W=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="importThemeStarterContent"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="themeSlug"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/7/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/7/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var J=T===e}else var J=!0;if(J)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/7/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var J=a===e}else var J=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/7/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var m=f===e}else var m=!0;if(m){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/7/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="importThemeStarterContent")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/7/properties/step/const",keyword:"const",params:{allowedValue:"importThemeStarterContent"},message:"must be equal to constant"}],!1;var m=f===e}else var m=!0;if(m)if(r.themeSlug!==void 0){const s=e;if(typeof r.themeSlug!="string")return o.errors=[{instancePath:t+"/themeSlug",schemaPath:"#/oneOf/7/properties/themeSlug/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var m=s===e}else var m=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="importWordPressFiles"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step")||r.wordPressFilesZip===void 0&&(d="wordPressFilesZip"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="wordPressFilesZip"||s==="pathInZip"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/8/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/8/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var R=T===e}else var R=!0;if(R)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/8/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var R=a===e}else var R=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/8/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var V=f===e}else var V=!0;if(V){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/8/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="importWordPressFiles")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/8/properties/step/const",keyword:"const",params:{allowedValue:"importWordPressFiles"},message:"must be equal to constant"}],!1;var V=f===e}else var V=!0;if(V){if(r.wordPressFilesZip!==void 0){const s=e;ee(r.wordPressFilesZip,{instancePath:t+"/wordPressFilesZip",parentData:r,parentDataProperty:"wordPressFilesZip",rootData:l})||(i=i===null?ee.errors:i.concat(ee.errors),e=i.length);var V=s===e}else var V=!0;if(V)if(r.pathInZip!==void 0){const s=e;if(typeof r.pathInZip!="string")return o.errors=[{instancePath:t+"/pathInZip",schemaPath:"#/oneOf/8/properties/pathInZip/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var V=s===e}else var V=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="installPlugin"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.pluginZipFile===void 0&&(d="pluginZipFile")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/9/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="ifAlreadyInstalled"||s==="step"||s==="pluginZipFile"||s==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/9/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/9/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/9/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var g=T===e}else var g=!0;if(g)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/9/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var g=a===e}else var g=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/9/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var O=f===e}else var O=!0;if(O){if(r.ifAlreadyInstalled!==void 0){let s=r.ifAlreadyInstalled;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/9/properties/ifAlreadyInstalled/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(s==="overwrite"||s==="skip"||s==="error"))return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/9/properties/ifAlreadyInstalled/enum",keyword:"enum",params:{allowedValues:kr.oneOf[9].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var O=f===e}else var O=!0;if(O){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/9/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="installPlugin")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/9/properties/step/const",keyword:"const",params:{allowedValue:"installPlugin"},message:"must be equal to constant"}],!1;var O=f===e}else var O=!0;if(O){if(r.pluginZipFile!==void 0){const s=e;ee(r.pluginZipFile,{instancePath:t+"/pluginZipFile",parentData:r,parentDataProperty:"pluginZipFile",rootData:l})||(i=i===null?ee.errors:i.concat(ee.errors),e=i.length);var O=s===e}else var O=!0;if(O)if(r.options!==void 0){let s=r.options;const f=e;if(e===e)if(s&&typeof s=="object"&&!Array.isArray(s)){const T=e;for(const ve in s)if(ve!=="activate")return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallPluginOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ve},message:"must NOT have additional properties"}],!1;if(T===e&&s.activate!==void 0&&typeof s.activate!="boolean")return o.errors=[{instancePath:t+"/options/activate",schemaPath:"#/definitions/InstallPluginOptions/properties/activate/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallPluginOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var O=f===e}else var O=!0}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/9/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="installTheme"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step")||r.themeZipFile===void 0&&(d="themeZipFile"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="ifAlreadyInstalled"||s==="step"||s==="themeZipFile"||s==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/10/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/10/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var w=T===e}else var w=!0;if(w)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/10/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var w=a===e}else var w=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/10/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var $=f===e}else var $=!0;if($){if(r.ifAlreadyInstalled!==void 0){let s=r.ifAlreadyInstalled;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/10/properties/ifAlreadyInstalled/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(s==="overwrite"||s==="skip"||s==="error"))return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/10/properties/ifAlreadyInstalled/enum",keyword:"enum",params:{allowedValues:kr.oneOf[10].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var $=f===e}else var $=!0;if($){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/10/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="installTheme")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/10/properties/step/const",keyword:"const",params:{allowedValue:"installTheme"},message:"must be equal to constant"}],!1;var $=f===e}else var $=!0;if($){if(r.themeZipFile!==void 0){const s=e;ee(r.themeZipFile,{instancePath:t+"/themeZipFile",parentData:r,parentDataProperty:"themeZipFile",rootData:l})||(i=i===null?ee.errors:i.concat(ee.errors),e=i.length);var $=s===e}else var $=!0;if($)if(r.options!==void 0){let s=r.options;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const a=e;for(const T in s)if(!(T==="activate"||T==="importStarterContent"))return o.errors=[{instancePath:t+"/options",schemaPath:"#/oneOf/10/properties/options/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:T},message:"must NOT have additional properties"}],!1;if(a===e){if(s.activate!==void 0){const T=e;if(typeof s.activate!="boolean")return o.errors=[{instancePath:t+"/options/activate",schemaPath:"#/oneOf/10/properties/options/properties/activate/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var v=T===e}else var v=!0;if(v)if(s.importStarterContent!==void 0){const T=e;if(typeof s.importStarterContent!="boolean")return o.errors=[{instancePath:t+"/options/importStarterContent",schemaPath:"#/oneOf/10/properties/options/properties/importStarterContent/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var v=T===e}else var v=!0}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/oneOf/10/properties/options/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var $=f===e}else var $=!0}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="login"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/11/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="username"||s==="password"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/11/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/11/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/11/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var c=T===e}else var c=!0;if(c)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/11/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var c=a===e}else var c=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/11/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var N=f===e}else var N=!0;if(N){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/11/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="login")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/11/properties/step/const",keyword:"const",params:{allowedValue:"login"},message:"must be equal to constant"}],!1;var N=f===e}else var N=!0;if(N){if(r.username!==void 0){const s=e;if(typeof r.username!="string")return o.errors=[{instancePath:t+"/username",schemaPath:"#/oneOf/11/properties/username/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var N=s===e}else var N=!0;if(N)if(r.password!==void 0){const s=e;if(typeof r.password!="string")return o.errors=[{instancePath:t+"/password",schemaPath:"#/oneOf/11/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var N=s===e}else var N=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/11/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="mkdir"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.path===void 0&&(d="path")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="path"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/12/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/12/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var L=T===e}else var L=!0;if(L)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/12/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var L=a===e}else var L=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/12/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var j=f===e}else var j=!0;if(j){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/12/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="mkdir")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/12/properties/step/const",keyword:"const",params:{allowedValue:"mkdir"},message:"must be equal to constant"}],!1;var j=f===e}else var j=!0;if(j)if(r.path!==void 0){const s=e;if(typeof r.path!="string")return o.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/12/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var j=s===e}else var j=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="mv"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.fromPath===void 0&&(d="fromPath")||r.step===void 0&&(d="step")||r.toPath===void 0&&(d="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/13/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="fromPath"||s==="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/13/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/13/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/13/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var M=T===e}else var M=!0;if(M)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/13/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var M=a===e}else var M=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/13/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var q=f===e}else var q=!0;if(q){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/13/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="mv")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/13/properties/step/const",keyword:"const",params:{allowedValue:"mv"},message:"must be equal to constant"}],!1;var q=f===e}else var q=!0;if(q){if(r.fromPath!==void 0){const s=e;if(typeof r.fromPath!="string")return o.errors=[{instancePath:t+"/fromPath",schemaPath:"#/oneOf/13/properties/fromPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var q=s===e}else var q=!0;if(q)if(r.toPath!==void 0){const s=e;if(typeof r.toPath!="string")return o.errors=[{instancePath:t+"/toPath",schemaPath:"#/oneOf/13/properties/toPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var q=s===e}else var q=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/13/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="resetData"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/14/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/14/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var H=T===e}else var H=!0;if(H)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/14/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var H=a===e}else var H=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/14/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var te=f===e}else var te=!0;if(te)if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/14/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="resetData")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/14/properties/step/const",keyword:"const",params:{allowedValue:"resetData"},message:"must be equal to constant"}],!1;var te=f===e}else var te=!0}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="request"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.request===void 0&&(d="request")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="request"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/15/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/15/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Z=T===e}else var Z=!0;if(Z)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/15/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Z=a===e}else var Z=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/15/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var C=f===e}else var C=!0;if(C){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/15/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="request")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/15/properties/step/const",keyword:"const",params:{allowedValue:"request"},message:"must be equal to constant"}],!1;var C=f===e}else var C=!0;if(C)if(r.request!==void 0){const s=e;ye(r.request,{instancePath:t+"/request",parentData:r,parentDataProperty:"request",rootData:l})||(i=i===null?ye.errors:i.concat(ye.errors),e=i.length);var C=s===e}else var C=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="rm"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.path===void 0&&(d="path")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="path"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/16/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/16/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var U=T===e}else var U=!0;if(U)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/16/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var U=a===e}else var U=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/16/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var z=f===e}else var z=!0;if(z){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/16/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="rm")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/16/properties/step/const",keyword:"const",params:{allowedValue:"rm"},message:"must be equal to constant"}],!1;var z=f===e}else var z=!0;if(z)if(r.path!==void 0){const s=e;if(typeof r.path!="string")return o.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/16/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var z=s===e}else var z=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="rmdir"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.path===void 0&&(d="path")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/17/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="path"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/17/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/17/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/17/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var G=T===e}else var G=!0;if(G)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/17/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var G=a===e}else var G=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/17/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var re=f===e}else var re=!0;if(re){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/17/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="rmdir")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/17/properties/step/const",keyword:"const",params:{allowedValue:"rmdir"},message:"must be equal to constant"}],!1;var re=f===e}else var re=!0;if(re)if(r.path!==void 0){const s=e;if(typeof r.path!="string")return o.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/17/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var re=s===e}else var re=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/17/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="runPHP"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.code===void 0&&(d="code")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/18/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="code"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/18/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/18/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/18/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var pe=T===e}else var pe=!0;if(pe)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/18/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var pe=a===e}else var pe=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/18/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var le=f===e}else var le=!0;if(le){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/18/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="runPHP")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/18/properties/step/const",keyword:"const",params:{allowedValue:"runPHP"},message:"must be equal to constant"}],!1;var le=f===e}else var le=!0;if(le)if(r.code!==void 0){const s=e;if(typeof r.code!="string")return o.errors=[{instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var le=s===e}else var le=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/18/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="runPHPWithOptions"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.options===void 0&&(d="options")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/19/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/19/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/19/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/19/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var De=T===e}else var De=!0;if(De)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/19/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var De=a===e}else var De=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/19/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var $e=f===e}else var $e=!0;if($e){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/19/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="runPHPWithOptions")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/19/properties/step/const",keyword:"const",params:{allowedValue:"runPHPWithOptions"},message:"must be equal to constant"}],!1;var $e=f===e}else var $e=!0;if($e)if(r.options!==void 0){const s=e;ne(r.options,{instancePath:t+"/options",parentData:r,parentDataProperty:"options",rootData:l})||(i=i===null?ne.errors:i.concat(ne.errors),e=i.length);var $e=s===e}else var $e=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/19/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="runWpInstallationWizard"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.options===void 0&&(d="options")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/20/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/20/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/20/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/20/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Me=T===e}else var Me=!0;if(Me)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/20/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Me=a===e}else var Me=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/20/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Te=f===e}else var Te=!0;if(Te){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/20/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="runWpInstallationWizard")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/20/properties/step/const",keyword:"const",params:{allowedValue:"runWpInstallationWizard"},message:"must be equal to constant"}],!1;var Te=f===e}else var Te=!0;if(Te)if(r.options!==void 0){let s=r.options;const f=e;if(e===e)if(s&&typeof s=="object"&&!Array.isArray(s)){const T=e;for(const ve in s)if(!(ve==="adminUsername"||ve==="adminPassword"))return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ve},message:"must NOT have additional properties"}],!1;if(T===e){if(s.adminUsername!==void 0){const ve=e;if(typeof s.adminUsername!="string")return o.errors=[{instancePath:t+"/options/adminUsername",schemaPath:"#/definitions/WordPressInstallationOptions/properties/adminUsername/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Be=ve===e}else var Be=!0;if(Be)if(s.adminPassword!==void 0){const ve=e;if(typeof s.adminPassword!="string")return o.errors=[{instancePath:t+"/options/adminPassword",schemaPath:"#/definitions/WordPressInstallationOptions/properties/adminPassword/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Be=ve===e}else var Be=!0}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Te=f===e}else var Te=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/20/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="runSql"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.sql===void 0&&(d="sql")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/21/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="sql"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/21/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/21/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/21/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ue=T===e}else var Ue=!0;if(Ue)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/21/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ue=a===e}else var Ue=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/21/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var je=f===e}else var je=!0;if(je){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/21/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="runSql")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/21/properties/step/const",keyword:"const",params:{allowedValue:"runSql"},message:"must be equal to constant"}],!1;var je=f===e}else var je=!0;if(je)if(r.sql!==void 0){const s=e;ee(r.sql,{instancePath:t+"/sql",parentData:r,parentDataProperty:"sql",rootData:l})||(i=i===null?ee.errors:i.concat(ee.errors),e=i.length);var je=s===e}else var je=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/21/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="setSiteOptions"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.options===void 0&&(d="options")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/22/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/22/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/22/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/22/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var ze=T===e}else var ze=!0;if(ze)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/22/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ze=a===e}else var ze=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/22/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ae=f===e}else var Ae=!0;if(Ae){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/22/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="setSiteOptions")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/22/properties/step/const",keyword:"const",params:{allowedValue:"setSiteOptions"},message:"must be equal to constant"}],!1;var Ae=f===e}else var Ae=!0;if(Ae)if(r.options!==void 0){let s=r.options;const f=e;if(e===f&&!(s&&typeof s=="object"&&!Array.isArray(s)))return o.errors=[{instancePath:t+"/options",schemaPath:"#/oneOf/22/properties/options/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ae=f===e}else var Ae=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/22/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="unzip"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.extractToPath===void 0&&(d="extractToPath")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/23/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="zipFile"||s==="zipPath"||s==="extractToPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/23/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/23/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/23/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ve=T===e}else var Ve=!0;if(Ve)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/23/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ve=a===e}else var Ve=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/23/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var fe=f===e}else var fe=!0;if(fe){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/23/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="unzip")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/23/properties/step/const",keyword:"const",params:{allowedValue:"unzip"},message:"must be equal to constant"}],!1;var fe=f===e}else var fe=!0;if(fe){if(r.zipFile!==void 0){const s=e;ee(r.zipFile,{instancePath:t+"/zipFile",parentData:r,parentDataProperty:"zipFile",rootData:l})||(i=i===null?ee.errors:i.concat(ee.errors),e=i.length);var fe=s===e}else var fe=!0;if(fe){if(r.zipPath!==void 0){const s=e;if(typeof r.zipPath!="string")return o.errors=[{instancePath:t+"/zipPath",schemaPath:"#/oneOf/23/properties/zipPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var fe=s===e}else var fe=!0;if(fe)if(r.extractToPath!==void 0){const s=e;if(typeof r.extractToPath!="string")return o.errors=[{instancePath:t+"/extractToPath",schemaPath:"#/oneOf/23/properties/extractToPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var fe=s===e}else var fe=!0}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/23/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="updateUserMeta"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.meta===void 0&&(d="meta")||r.step===void 0&&(d="step")||r.userId===void 0&&(d="userId"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/24/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="meta"||s==="userId"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/24/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/24/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/24/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var He=T===e}else var He=!0;if(He)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/24/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var He=a===e}else var He=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/24/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ge=f===e}else var ge=!0;if(ge){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/24/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="updateUserMeta")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/24/properties/step/const",keyword:"const",params:{allowedValue:"updateUserMeta"},message:"must be equal to constant"}],!1;var ge=f===e}else var ge=!0;if(ge){if(r.meta!==void 0){let s=r.meta;const f=e;if(e===f&&!(s&&typeof s=="object"&&!Array.isArray(s)))return o.errors=[{instancePath:t+"/meta",schemaPath:"#/oneOf/24/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ge=f===e}else var ge=!0;if(ge)if(r.userId!==void 0){let s=r.userId;const f=e;if(!(typeof s=="number"&&isFinite(s)))return o.errors=[{instancePath:t+"/userId",schemaPath:"#/oneOf/24/properties/userId/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var ge=f===e}else var ge=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/24/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="writeFile"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.data===void 0&&(d="data")||r.path===void 0&&(d="path")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/25/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="path"||s==="data"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/25/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/25/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/25/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ge=T===e}else var Ge=!0;if(Ge)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/25/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ge=a===e}else var Ge=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/25/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var be=f===e}else var be=!0;if(be){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/25/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="writeFile")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/25/properties/step/const",keyword:"const",params:{allowedValue:"writeFile"},message:"must be equal to constant"}],!1;var be=f===e}else var be=!0;if(be){if(r.path!==void 0){const s=e;if(typeof r.path!="string")return o.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/25/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var be=s===e}else var be=!0;if(be)if(r.data!==void 0){let s=r.data;const f=e,A=e;let a=!1;const T=e;ee(s,{instancePath:t+"/data",parentData:r,parentDataProperty:"data",rootData:l})||(i=i===null?ee.errors:i.concat(ee.errors),e=i.length);var Ne=T===e;if(a=a||Ne,!a){const de=e;if(typeof s!="string"){const Pe={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[Pe]:i.push(Pe),e++}var Ne=de===e;if(a=a||Ne,!a){const Pe=e;if(e===Pe)if(s&&typeof s=="object"&&!Array.isArray(s)){let he;if(s.BYTES_PER_ELEMENT===void 0&&(he="BYTES_PER_ELEMENT")||s.buffer===void 0&&(he="buffer")||s.byteLength===void 0&&(he="byteLength")||s.byteOffset===void 0&&(he="byteOffset")||s.length===void 0&&(he="length")){const Je={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/2/required",keyword:"required",params:{missingProperty:he},message:"must have required property '"+he+"'"};i===null?i=[Je]:i.push(Je),e++}else{const Je=e;for(const Q in s)if(!(Q==="BYTES_PER_ELEMENT"||Q==="buffer"||Q==="byteLength"||Q==="byteOffset"||Q==="length")){let ce=s[Q];const Ke=e;if(!(typeof ce=="number"&&isFinite(ce))){const oe={instancePath:t+"/data/"+Q.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/oneOf/25/properties/data/anyOf/2/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[oe]:i.push(oe),e++}var Gt=Ke===e;if(!Gt)break}if(Je===e){if(s.BYTES_PER_ELEMENT!==void 0){let Q=s.BYTES_PER_ELEMENT;const ce=e;if(!(typeof Q=="number"&&isFinite(Q))){const Ke={instancePath:t+"/data/BYTES_PER_ELEMENT",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Ke]:i.push(Ke),e++}var ue=ce===e}else var ue=!0;if(ue){if(s.buffer!==void 0){let Q=s.buffer;const ce=e;if(e===ce)if(Q&&typeof Q=="object"&&!Array.isArray(Q)){let oe;if(Q.byteLength===void 0&&(oe="byteLength")){const Xe={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/required",keyword:"required",params:{missingProperty:oe},message:"must have required property '"+oe+"'"};i===null?i=[Xe]:i.push(Xe),e++}else{const Xe=e;for(const Fe in Q)if(Fe!=="byteLength"){const Ce={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:Fe},message:"must NOT have additional properties"};i===null?i=[Ce]:i.push(Ce),e++;break}if(Xe===e&&Q.byteLength!==void 0){let Fe=Q.byteLength;if(!(typeof Fe=="number"&&isFinite(Fe))){const Ce={instancePath:t+"/data/buffer/byteLength",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Ce]:i.push(Ce),e++}}}}else{const oe={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[oe]:i.push(oe),e++}var ue=ce===e}else var ue=!0;if(ue){if(s.byteLength!==void 0){let Q=s.byteLength;const ce=e;if(!(typeof Q=="number"&&isFinite(Q))){const oe={instancePath:t+"/data/byteLength",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[oe]:i.push(oe),e++}var ue=ce===e}else var ue=!0;if(ue){if(s.byteOffset!==void 0){let Q=s.byteOffset;const ce=e;if(!(typeof Q=="number"&&isFinite(Q))){const oe={instancePath:t+"/data/byteOffset",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[oe]:i.push(oe),e++}var ue=ce===e}else var ue=!0;if(ue)if(s.length!==void 0){let Q=s.length;const ce=e;if(!(typeof Q=="number"&&isFinite(Q))){const oe={instancePath:t+"/data/length",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[oe]:i.push(oe),e++}var ue=ce===e}else var ue=!0}}}}}}else{const he={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[he]:i.push(he),e++}var Ne=Pe===e;a=a||Ne}}if(a)e=A,i!==null&&(A?i.length=A:i=null);else{const de={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[de]:i.push(de),e++,o.errors=i,!1}var be=f===e}else var be=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/25/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="wp-cli"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.command===void 0&&(d="command")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/26/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="command"||s==="wpCliPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/26/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/26/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/26/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ye=T===e}else var Ye=!0;if(Ye)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/26/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ye=a===e}else var Ye=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/26/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var we=f===e}else var we=!0;if(we){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/26/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="wp-cli")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/26/properties/step/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var we=f===e}else var we=!0;if(we){if(r.command!==void 0){let s=r.command;const f=e,A=e;let a=!1;const T=e;if(typeof s!="string"){const de={instancePath:t+"/command",schemaPath:"#/oneOf/26/properties/command/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[de]:i.push(de),e++}var gr=T===e;if(a=a||gr,!a){const de=e;if(e===de)if(Array.isArray(s)){var Dr=!0;const Pe=s.length;for(let Qe=0;Qe<Pe;Qe++){const he=e;if(typeof s[Qe]!="string"){const Q={instancePath:t+"/command/"+Qe,schemaPath:"#/oneOf/26/properties/command/anyOf/1/items/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[Q]:i.push(Q),e++}var Dr=he===e;if(!Dr)break}}else{const Pe={instancePath:t+"/command",schemaPath:"#/oneOf/26/properties/command/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};i===null?i=[Pe]:i.push(Pe),e++}var gr=de===e;a=a||gr}if(a)e=A,i!==null&&(A?i.length=A:i=null);else{const de={instancePath:t+"/command",schemaPath:"#/oneOf/26/properties/command/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[de]:i.push(de),e++,o.errors=i,!1}var we=f===e}else var we=!0;if(we)if(r.wpCliPath!==void 0){const s=e;if(typeof r.wpCliPath!="string")return o.errors=[{instancePath:t+"/wpCliPath",schemaPath:"#/oneOf/26/properties/wpCliPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var we=s===e}else var we=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/26/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(Y==="setSiteLanguage"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.language===void 0&&(d="language")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="language"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const f=e;if(e===f)if(s&&typeof s=="object"&&!Array.isArray(s)){const A=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/27/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(A===e){if(s.weight!==void 0){let a=s.weight;const T=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/27/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ze=T===e}else var Ze=!0;if(Ze)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/27/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ze=a===e}else var Ze=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/27/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var qe=f===e}else var qe=!0;if(qe){if(r.step!==void 0){let s=r.step;const f=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/27/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="setSiteLanguage")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/27/properties/step/const",keyword:"const",params:{allowedValue:"setSiteLanguage"},message:"must be equal to constant"}],!1;var qe=f===e}else var qe=!0;if(qe)if(r.language!==void 0){const s=e;if(typeof r.language!="string")return o.errors=[{instancePath:t+"/language",schemaPath:"#/oneOf/27/properties/language/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var qe=s===e}else var qe=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else return o.errors=[{instancePath:t,schemaPath:"#/discriminator",keyword:"discriminator",params:{error:"mapping",tag:"step",tagValue:Y},message:'value of tag "step" must be in oneOf'}],!1;else return o.errors=[{instancePath:t,schemaPath:"#/discriminator",keyword:"discriminator",params:{error:"tag",tag:"step",tagValue:Y},message:'tag "step" must be string'}],!1}}else return o.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return o.errors=i,e===0}function B(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let i=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){const J=e;for(const m in r)if(!xt.call(Fs.properties,m))return B.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"}],!1;if(J===e){if(r.landingPage!==void 0){const m=e;if(typeof r.landingPage!="string")return B.errors=[{instancePath:t+"/landingPage",schemaPath:"#/properties/landingPage/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=m===e}else var u=!0;if(u){if(r.description!==void 0){const m=e;if(typeof r.description!="string")return B.errors=[{instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=m===e}else var u=!0;if(u){if(r.meta!==void 0){let m=r.meta;const R=e;if(e===R)if(m&&typeof m=="object"&&!Array.isArray(m)){let g;if(m.title===void 0&&(g="title")||m.author===void 0&&(g="author"))return B.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty:g},message:"must have required property '"+g+"'"}],!1;{const O=e;for(const w in m)if(!(w==="title"||w==="description"||w==="author"||w==="categories"))return B.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:w},message:"must NOT have additional properties"}],!1;if(O===e){if(m.title!==void 0){const w=e;if(typeof m.title!="string")return B.errors=[{instancePath:t+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=w===e}else var h=!0;if(h){if(m.description!==void 0){const w=e;if(typeof m.description!="string")return B.errors=[{instancePath:t+"/meta/description",schemaPath:"#/properties/meta/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=w===e}else var h=!0;if(h){if(m.author!==void 0){const w=e;if(typeof m.author!="string")return B.errors=[{instancePath:t+"/meta/author",schemaPath:"#/properties/meta/properties/author/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=w===e}else var h=!0;if(h)if(m.categories!==void 0){let w=m.categories;const $=e;if(e===$)if(Array.isArray(w)){var b=!0;const c=w.length;for(let N=0;N<c;N++){const L=e;if(typeof w[N]!="string")return B.errors=[{instancePath:t+"/meta/categories/"+N,schemaPath:"#/properties/meta/properties/categories/items/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var b=L===e;if(!b)break}}else return B.errors=[{instancePath:t+"/meta/categories",schemaPath:"#/properties/meta/properties/categories/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var h=$===e}else var h=!0}}}}}else return B.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var u=R===e}else var u=!0;if(u){if(r.preferredVersions!==void 0){let m=r.preferredVersions;const R=e;if(e===R)if(m&&typeof m=="object"&&!Array.isArray(m)){let g;if(m.php===void 0&&(g="php")||m.wp===void 0&&(g="wp"))return B.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/required",keyword:"required",params:{missingProperty:g},message:"must have required property '"+g+"'"}],!1;{const O=e;for(const w in m)if(!(w==="php"||w==="wp"))return B.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:w},message:"must NOT have additional properties"}],!1;if(O===e){if(m.php!==void 0){let w=m.php;const $=e,v=e;let c=!1;const N=e;if(typeof w!="string"){const L={instancePath:t+"/preferredVersions/php",schemaPath:"#/definitions/SupportedPHPVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[L]:i.push(L),e++}if(!(w==="8.3"||w==="8.2"||w==="8.1"||w==="8.0"||w==="7.4"||w==="7.3"||w==="7.2"||w==="7.1"||w==="7.0")){const L={instancePath:t+"/preferredVersions/php",schemaPath:"#/definitions/SupportedPHPVersion/enum",keyword:"enum",params:{allowedValues:Cs.enum},message:"must be equal to one of the allowed values"};i===null?i=[L]:i.push(L),e++}var k=N===e;if(c=c||k,!c){const L=e;if(typeof w!="string"){const M={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[M]:i.push(M),e++}if(w!=="latest"){const M={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/const",keyword:"const",params:{allowedValue:"latest"},message:"must be equal to constant"};i===null?i=[M]:i.push(M),e++}var k=L===e;c=c||k}if(c)e=v,i!==null&&(v?i.length=v:i=null);else{const L={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[L]:i.push(L),e++,B.errors=i,!1}var y=$===e}else var y=!0;if(y)if(m.wp!==void 0){const w=e;if(typeof m.wp!="string")return B.errors=[{instancePath:t+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var y=w===e}else var y=!0}}}else return B.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var u=R===e}else var u=!0;if(u){if(r.features!==void 0){let m=r.features;const R=e;if(e===R)if(m&&typeof m=="object"&&!Array.isArray(m)){const g=e;for(const O in m)if(O!=="networking")return B.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:O},message:"must NOT have additional properties"}],!1;if(g===e&&m.networking!==void 0&&typeof m.networking!="boolean")return B.errors=[{instancePath:t+"/features/networking",schemaPath:"#/properties/features/properties/networking/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1}else return B.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var u=R===e}else var u=!0;if(u){if(r.constants!==void 0){let m=r.constants;const R=e;if(e===R)if(m&&typeof m=="object"&&!Array.isArray(m))for(const g in m){const O=e;if(typeof m[g]!="string")return B.errors=[{instancePath:t+"/constants/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/constants/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var E=O===e;if(!E)break}else return B.errors=[{instancePath:t+"/constants",schemaPath:"#/properties/constants/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var u=R===e}else var u=!0;if(u){if(r.plugins!==void 0){let m=r.plugins;const R=e;if(e===R)if(Array.isArray(m)){var S=!0;const g=m.length;for(let O=0;O<g;O++){let w=m[O];const $=e,v=e;let c=!1;const N=e;if(typeof w!="string"){const j={instancePath:t+"/plugins/"+O,schemaPath:"#/properties/plugins/items/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[j]:i.push(j),e++}var I=N===e;if(c=c||I,!c){const j=e;ee(w,{instancePath:t+"/plugins/"+O,parentData:m,parentDataProperty:O,rootData:l})||(i=i===null?ee.errors:i.concat(ee.errors),e=i.length);var I=j===e;c=c||I}if(c)e=v,i!==null&&(v?i.length=v:i=null);else{const j={instancePath:t+"/plugins/"+O,schemaPath:"#/properties/plugins/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[j]:i.push(j),e++,B.errors=i,!1}var S=$===e;if(!S)break}}else return B.errors=[{instancePath:t+"/plugins",schemaPath:"#/properties/plugins/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var u=R===e}else var u=!0;if(u){if(r.siteOptions!==void 0){let m=r.siteOptions;const R=e;if(e===R)if(m&&typeof m=="object"&&!Array.isArray(m)){const g=e;for(const O in m)if(O!=="blogname"){const w=e;if(typeof m[O]!="string")return B.errors=[{instancePath:t+"/siteOptions/"+O.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/siteOptions/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var _=w===e;if(!_)break}if(g===e&&m.blogname!==void 0&&typeof m.blogname!="string")return B.errors=[{instancePath:t+"/siteOptions/blogname",schemaPath:"#/properties/siteOptions/properties/blogname/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1}else return B.errors=[{instancePath:t+"/siteOptions",schemaPath:"#/properties/siteOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var u=R===e}else var u=!0;if(u){if(r.login!==void 0){let m=r.login;const R=e,V=e;let g=!1;const O=e;if(typeof m!="boolean"){const $={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/0/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};i===null?i=[$]:i.push($),e++}var D=O===e;if(g=g||D,!g){const $=e;if(e===$)if(m&&typeof m=="object"&&!Array.isArray(m)){let c;if(m.username===void 0&&(c="username")||m.password===void 0&&(c="password")){const N={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"};i===null?i=[N]:i.push(N),e++}else{const N=e;for(const L in m)if(!(L==="username"||L==="password")){const j={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:L},message:"must NOT have additional properties"};i===null?i=[j]:i.push(j),e++;break}if(N===e){if(m.username!==void 0){const L=e;if(typeof m.username!="string"){const j={instancePath:t+"/login/username",schemaPath:"#/properties/login/anyOf/1/properties/username/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[j]:i.push(j),e++}var X=L===e}else var X=!0;if(X)if(m.password!==void 0){const L=e;if(typeof m.password!="string"){const M={instancePath:t+"/login/password",schemaPath:"#/properties/login/anyOf/1/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[M]:i.push(M),e++}var X=L===e}else var X=!0}}}else{const c={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[c]:i.push(c),e++}var D=$===e;g=g||D}if(g)e=V,i!==null&&(V?i.length=V:i=null);else{const $={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[$]:i.push($),e++,B.errors=i,!1}var u=R===e}else var u=!0;if(u){if(r.phpExtensionBundles!==void 0){let m=r.phpExtensionBundles;const R=e;if(e===R)if(Array.isArray(m)){var x=!0;const g=m.length;for(let O=0;O<g;O++){let w=m[O];const $=e;if(typeof w!="string")return B.errors=[{instancePath:t+"/phpExtensionBundles/"+O,schemaPath:"#/definitions/SupportedPHPExtensionBundle/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(w==="kitchen-sink"||w==="light"))return B.errors=[{instancePath:t+"/phpExtensionBundles/"+O,schemaPath:"#/definitions/SupportedPHPExtensionBundle/enum",keyword:"enum",params:{allowedValues:Is.enum},message:"must be equal to one of the allowed values"}],!1;var x=$===e;if(!x)break}}else return B.errors=[{instancePath:t+"/phpExtensionBundles",schemaPath:"#/properties/phpExtensionBundles/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var u=R===e}else var u=!0;if(u){if(r.steps!==void 0){let m=r.steps;const R=e;if(e===R)if(Array.isArray(m)){var P=!0;const g=m.length;for(let O=0;O<g;O++){let w=m[O];const $=e,v=e;let c=!1;const N=e;o(w,{instancePath:t+"/steps/"+O,parentData:m,parentDataProperty:O,rootData:l})||(i=i===null?o.errors:i.concat(o.errors),e=i.length);var W=N===e;if(c=c||W,!c){const j=e;if(typeof w!="string"){const q={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[q]:i.push(q),e++}var W=j===e;if(c=c||W,!c){const q=e,H={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/2/not",keyword:"not",params:{},message:"must NOT be valid"};i===null?i=[H]:i.push(H),e++;var W=q===e;if(c=c||W,!c){const Z=e;if(typeof w!="boolean"){const U={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/3/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};i===null?i=[U]:i.push(U),e++}if(w!==!1){const U={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/3/const",keyword:"const",params:{allowedValue:!1},message:"must be equal to constant"};i===null?i=[U]:i.push(U),e++}var W=Z===e;if(c=c||W,!c){const U=e;if(w!==null){const G={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf/4/type",keyword:"type",params:{type:"null"},message:"must be null"};i===null?i=[G]:i.push(G),e++}var W=U===e;c=c||W}}}}if(c)e=v,i!==null&&(v?i.length=v:i=null);else{const j={instancePath:t+"/steps/"+O,schemaPath:"#/properties/steps/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[j]:i.push(j),e++,B.errors=i,!1}var P=$===e;if(!P)break}}else return B.errors=[{instancePath:t+"/steps",schemaPath:"#/properties/steps/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var u=R===e}else var u=!0;if(u)if(r.$schema!==void 0){const m=e;if(typeof r.$schema!="string")return B.errors=[{instancePath:t+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var u=m===e}else var u=!0}}}}}}}}}}}}else return B.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return B.errors=i,e===0}function tr(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let i=null,e=0;return B(r,{instancePath:t,parentData:n,parentDataProperty:p,rootData:l})||(i=i===null?B.errors:i.concat(B.errors),e=i.length),tr.errors=i,e===0}const{wpCLI:Ds,...Zr}=gs,Ms={...Zr,"wp-cli":Ds,importFile:Zr.importWxr};function Ft(r,{progress:t=new yr,semaphore:n=new Qt({concurrency:3}),onStepCompleted:p=()=>{}}={}){var y,E,S,I,_,D,X;r={...r,steps:(r.steps||[]).filter(Vs).filter(Hs)};for(const x of r.steps)typeof x=="object"&&x.step==="importFile"&&(x.step="importWxr",ae.warn('The "importFile" step is deprecated. Use "importWxr" instead.'));if(r.constants&&r.steps.unshift({step:"defineWpConfigConsts",consts:r.constants}),r.siteOptions&&r.steps.unshift({step:"setSiteOptions",options:r.siteOptions}),r.plugins){const x=r.plugins.map(P=>typeof P=="string"?P.startsWith("https://")?{resource:"url",url:P}:{resource:"wordpress.org/plugins",slug:P}:P).map(P=>({step:"installPlugin",pluginZipFile:P}));r.steps.unshift(...x)}r.login&&r.steps.push({step:"login",...r.login===!0?{username:"admin",password:"password"}:r.login}),r.phpExtensionBundles||(r.phpExtensionBundles=[]),r.phpExtensionBundles||(r.phpExtensionBundles=[]),r.phpExtensionBundles.length===0&&r.phpExtensionBundles.push("kitchen-sink");const l=(y=r.steps)==null?void 0:y.findIndex(x=>typeof x=="object"&&(x==null?void 0:x.step)==="wp-cli");l!==void 0&&l>-1&&(r.phpExtensionBundles.includes("light")&&(r.phpExtensionBundles=r.phpExtensionBundles.filter(x=>x!=="light"),ae.warn("The wpCli step used in your Blueprint requires the iconv and mbstring PHP extensions. However, you did not specify the kitchen-sink extension bundle. Playground will override your choice and load the kitchen-sink PHP extensions bundle to prevent the WP-CLI step from failing. ")),(E=r.steps)==null||E.splice(l,0,{step:"writeFile",data:{resource:"url",url:"https://playground.wordpress.net/wp-cli.phar"},path:"/tmp/wp-cli.phar"}));const i=(S=r.steps)==null?void 0:S.findIndex(x=>typeof x=="object"&&(x==null?void 0:x.step)==="importWxr");i!==void 0&&i>-1&&(r.phpExtensionBundles.includes("light")&&(r.phpExtensionBundles=r.phpExtensionBundles.filter(x=>x!=="light"),ae.warn("The importWxr step used in your Blueprint requires the iconv and mbstring PHP extensions. However, you did not specify the kitchen-sink extension bundle. Playground will override your choice and load the kitchen-sink PHP extensions bundle to prevent the WP-CLI step from failing. ")),(I=r.steps)==null||I.splice(i,0,{step:"installPlugin",pluginZipFile:{resource:"url",url:"https://playground.wordpress.net/wordpress-importer.zip",caption:"Downloading the WordPress Importer plugin"}}));const{valid:e,errors:u}=Bs(r);if(!e){const x=new Error(`Invalid blueprint: ${u[0].message} at ${u[0].instancePath}`);throw x.errors=u,x}const h=r.steps||[],b=h.reduce((x,P)=>{var W;return x+(((W=P.progress)==null?void 0:W.weight)||1)},0),k=h.map(x=>Gs(x,{semaphore:n,rootProgressTracker:t,totalProgressWeight:b}));return{versions:{php:Us((_=r.preferredVersions)==null?void 0:_.php,hr,qt),wp:((D=r.preferredVersions)==null?void 0:D.wp)||"latest"},phpExtensions:zs([],r.phpExtensionBundles||[]),features:{networking:((X=r.features)==null?void 0:X.networking)??!1},run:async x=>{try{for(const{resources:P}of k)for(const W of P)W.setPlayground(x),W.isAsync&&W.resolve();for(const[P,{run:W,step:J}]of Object.entries(k))try{const m=await W(x);p(m,J)}catch(m){throw ae.error(m),new Error(`Error when executing the blueprint step #${P} (${JSON.stringify(J)}) ${m instanceof Error?`: ${m.message}`:m}`,{cause:m})}}finally{try{await x.goTo(r.landingPage||"/")}catch{}t.finish()}}}}function Bs(r){var l;const t=tr(r);if(t)return{valid:t};const n=new Set;for(const i of tr.errors)i.schemaPath.startsWith("#/properties/steps/items/anyOf")||n.add(i.instancePath);const p=(l=tr.errors)==null?void 0:l.filter(i=>!(i.schemaPath.startsWith("#/properties/steps/items/anyOf")&&n.has(i.instancePath)));return{valid:t,errors:p}}function Us(r,t,n){return r&&t.includes(r)?r:n}function zs(r,t){const n=Rt.filter(l=>r.includes(l)),p=t.flatMap(l=>l in Yr?Yr[l]:[]);return Array.from(new Set([...n,...p]))}function Vs(r){return!!(typeof r=="object"&&r)}function Hs(r){return["setPhpIniEntry","request"].includes(r.step)?(ae.warn(`The "${r.step}" Blueprint is no longer supported and you can remove it from your Blueprint.`),!1):!0}function Gs(r,{semaphore:t,rootProgressTracker:n,totalProgressWeight:p}){var k;const l=n.stage((((k=r.progress)==null?void 0:k.weight)||1)/p),i={};for(const y of Object.keys(r)){let E=r[y];Ts(E)&&(E=Se.create(E,{semaphore:t})),i[y]=E}const e=async y=>{var E;try{return l.fillSlowly(),await Ms[r.step](y,await Ys(i),{tracker:l,initialCaption:(E=r.progress)==null?void 0:E.caption})}finally{l.finish()}},u=Qr(i),h=Qr(i).filter(y=>y.isAsync),b=1/(h.length+1);for(const y of h)y.progress=l.stage(b);return{run:e,step:r,resources:u}}function Qr(r){const t=[];for(const n in r){const p=r[n];p instanceof Se&&t.push(p)}return t}async function Ys(r){const t={};for(const n in r){const p=r[n];p instanceof Se?t[n]=await p.resolve():t[n]=p}return t}async function Ct(r,t){await r.run(t)}function Zs(){}/**
737
+ for existing apps using this option.`}},required:["consts","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"defineSiteUrl"},siteUrl:{type:"string",description:"The URL"}},required:["siteUrl","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"enableMultisite"}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"importWxr"},file:{$ref:"#/definitions/FileReference",description:"The file to import"}},required:["file","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"importThemeStarterContent",description:"The step identifier."},themeSlug:{type:"string",description:"The name of the theme to import content from."}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"importWordPressFiles"},wordPressFilesZip:{$ref:"#/definitions/FileReference",description:"The zip file containing the top-level WordPress files and directories."},pathInZip:{type:"string",description:"The path inside the zip file where the WordPress files are."}},required:["step","wordPressFilesZip"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},ifAlreadyInstalled:{type:"string",enum:["overwrite","skip","error"],description:"What to do if the asset already exists."},step:{type:"string",const:"installPlugin",description:"The step identifier."},pluginZipFile:{$ref:"#/definitions/FileReference",description:"The plugin zip file to install."},options:{$ref:"#/definitions/InstallPluginOptions",description:"Optional installation options."}},required:["pluginZipFile","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},ifAlreadyInstalled:{type:"string",enum:["overwrite","skip","error"],description:"What to do if the asset already exists."},step:{type:"string",const:"installTheme",description:"The step identifier."},themeZipFile:{$ref:"#/definitions/FileReference",description:"The theme zip file to install."},options:{type:"object",properties:{activate:{type:"boolean",description:"Whether to activate the theme after installing it."},importStarterContent:{type:"boolean",description:"Whether to import the theme's starter content after installing it."}},additionalProperties:!1,description:"Optional installation options."}},required:["step","themeZipFile"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"login"},username:{type:"string",description:"The user to log in as. Defaults to 'admin'."},password:{type:"string",description:"The password to log in with. Defaults to 'password'."}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"mkdir"},path:{type:"string",description:"The path of the directory you want to create"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"mv"},fromPath:{type:"string",description:"Source path"},toPath:{type:"string",description:"Target path"}},required:["fromPath","step","toPath"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"resetData"}},required:["step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"request"},request:{$ref:"#/definitions/PHPRequest",description:"Request details (See /wordpress-playground/api/universal/interface/PHPRequest)"}},required:["request","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"rm"},path:{type:"string",description:"The path to remove"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"rmdir"},path:{type:"string",description:"The path to remove"}},required:["path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runPHP",description:"The step identifier."},code:{type:"string",description:"The PHP code to run."}},required:["code","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runPHPWithOptions"},options:{$ref:"#/definitions/PHPRunOptions",description:"Run options (See /wordpress-playground/api/universal/interface/PHPRunOptions/))"}},required:["options","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runWpInstallationWizard"},options:{$ref:"#/definitions/WordPressInstallationOptions"}},required:["options","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"runSql",description:"The step identifier."},sql:{$ref:"#/definitions/FileReference",description:"The SQL to run. Each non-empty line must contain a valid SQL query."}},required:["sql","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"setSiteOptions",description:'The name of the step. Must be "setSiteOptions".'},options:{type:"object",additionalProperties:{},description:"The options to set on the site."}},required:["options","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"unzip"},zipFile:{$ref:"#/definitions/FileReference",description:"The zip file to extract"},zipPath:{type:"string",description:"The path of the zip file to extract",deprecated:"Use zipFile instead."},extractToPath:{type:"string",description:"The path to extract the zip file to"}},required:["extractToPath","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"updateUserMeta"},meta:{type:"object",additionalProperties:{},description:'An object of user meta values to set, e.g. { "first_name": "John" }'},userId:{type:"number",description:"User ID"}},required:["meta","step","userId"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"writeFile"},path:{type:"string",description:"The path of the file to write to"},data:{anyOf:[{$ref:"#/definitions/FileReference"},{type:"string"},{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}}],description:"The data to write"}},required:["data","path","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"wp-cli",description:"The step identifier."},command:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}],description:"The WP CLI command to run."},wpCliPath:{type:"string",description:"wp-cli.phar path"}},required:["command","step"]},{type:"object",additionalProperties:!1,properties:{progress:{type:"object",properties:{weight:{type:"number"},caption:{type:"string"}},additionalProperties:!1},step:{type:"string",const:"setSiteLanguage"},language:{type:"string",description:"The language to set, e.g. 'en_US'"}},required:["language","step"]}]},xt={type:"string",enum:["GET","POST","HEAD","OPTIONS","PATCH","PUT","DELETE"]};function ye(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let i=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let te;if(r.url===void 0&&(te="url"))return ye.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:te},message:"must have required property '"+te+"'"}],!1;{const H=e;for(const E in r)if(!(E==="method"||E==="url"||E==="headers"||E==="body"))return ye.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:E},message:"must NOT have additional properties"}],!1;if(H===e){if(r.method!==void 0){let E=r.method;const L=e;if(typeof E!="string")return ye.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(E==="GET"||E==="POST"||E==="HEAD"||E==="OPTIONS"||E==="PATCH"||E==="PUT"||E==="DELETE"))return ye.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:xt.enum},message:"must be equal to one of the allowed values"}],!1;var f=L===e}else var f=!0;if(f){if(r.url!==void 0){const E=e;if(typeof r.url!="string")return ye.errors=[{instancePath:t+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=E===e}else var f=!0;if(f){if(r.headers!==void 0){let E=r.headers;const L=e;if(e===e)if(E&&typeof E=="object"&&!Array.isArray(E))for(const c in E){const A=e;if(typeof E[c]!="string")return ye.errors=[{instancePath:t+"/headers/"+c.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=A===e;if(!h)break}else return ye.errors=[{instancePath:t+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=L===e}else var f=!0;if(f)if(r.body!==void 0){let E=r.body;const L=e,I=e;let z=!1;const c=e;if(typeof E!="string"){const $={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[$]:i.push($),e++}var b=c===e;if(z=z||b,!z){const $=e;if(e===$)if(E&&typeof E=="object"&&!Array.isArray(E)){let P;if(E.BYTES_PER_ELEMENT===void 0&&(P="BYTES_PER_ELEMENT")||E.buffer===void 0&&(P="buffer")||E.byteLength===void 0&&(P="byteLength")||E.byteOffset===void 0&&(P="byteOffset")||E.length===void 0&&(P="length")){const y={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:P},message:"must have required property '"+P+"'"};i===null?i=[y]:i.push(y),e++}else{const y=e;for(const g in E)if(!(g==="BYTES_PER_ELEMENT"||g==="buffer"||g==="byteLength"||g==="byteOffset"||g==="length")){let w=E[g];const O=e;if(!(typeof w=="number"&&isFinite(w))){const N={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[N]:i.push(N),e++}var _=O===e;if(!_)break}if(y===e){if(E.BYTES_PER_ELEMENT!==void 0){let g=E.BYTES_PER_ELEMENT;const w=e;if(!(typeof g=="number"&&isFinite(g))){const O={instancePath:t+"/body/BYTES_PER_ELEMENT",schemaPath:"#/properties/body/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[O]:i.push(O),e++}var m=w===e}else var m=!0;if(m){if(E.buffer!==void 0){let g=E.buffer;const w=e;if(e===w)if(g&&typeof g=="object"&&!Array.isArray(g)){let N;if(g.byteLength===void 0&&(N="byteLength")){const q={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:N},message:"must have required property '"+N+"'"};i===null?i=[q]:i.push(q),e++}else{const q=e;for(const W in g)if(W!=="byteLength"){const R={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:W},message:"must NOT have additional properties"};i===null?i=[R]:i.push(R),e++;break}if(q===e&&g.byteLength!==void 0){let W=g.byteLength;if(!(typeof W=="number"&&isFinite(W))){const R={instancePath:t+"/body/buffer/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[R]:i.push(R),e++}}}}else{const N={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[N]:i.push(N),e++}var m=w===e}else var m=!0;if(m){if(E.byteLength!==void 0){let g=E.byteLength;const w=e;if(!(typeof g=="number"&&isFinite(g))){const N={instancePath:t+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[N]:i.push(N),e++}var m=w===e}else var m=!0;if(m){if(E.byteOffset!==void 0){let g=E.byteOffset;const w=e;if(!(typeof g=="number"&&isFinite(g))){const N={instancePath:t+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[N]:i.push(N),e++}var m=w===e}else var m=!0;if(m)if(E.length!==void 0){let g=E.length;const w=e;if(!(typeof g=="number"&&isFinite(g))){const N={instancePath:t+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[N]:i.push(N),e++}var m=w===e}else var m=!0}}}}}}else{const P={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[P]:i.push(P),e++}var b=$===e;if(z=z||b,!z){const P=e;if(e===P)if(E&&typeof E=="object"&&!Array.isArray(E))for(const g in E){let w=E[g];const O=e,N=e;let q=!1;const W=e;if(typeof w!="string"){const R={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[R]:i.push(R),e++}var k=W===e;if(q=q||k,!q){const R=e;if(e===R)if(w&&typeof w=="object"&&!Array.isArray(w)){let ee;if(w.BYTES_PER_ELEMENT===void 0&&(ee="BYTES_PER_ELEMENT")||w.buffer===void 0&&(ee="buffer")||w.byteLength===void 0&&(ee="byteLength")||w.byteOffset===void 0&&(ee="byteOffset")||w.length===void 0&&(ee="length")){const J={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/required",keyword:"required",params:{missingProperty:ee},message:"must have required property '"+ee+"'"};i===null?i=[J]:i.push(J),e++}else{const J=e;for(const C in w)if(!(C==="BYTES_PER_ELEMENT"||C==="buffer"||C==="byteLength"||C==="byteOffset"||C==="length")){let Q=w[C];const M=e;if(!(typeof Q=="number"&&isFinite(Q))){const Y={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1")+"/"+C.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Y]:i.push(Y),e++}var x=M===e;if(!x)break}if(J===e){if(w.BYTES_PER_ELEMENT!==void 0){let C=w.BYTES_PER_ELEMENT;const Q=e;if(!(typeof C=="number"&&isFinite(C))){const M={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1")+"/BYTES_PER_ELEMENT",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[M]:i.push(M),e++}var D=Q===e}else var D=!0;if(D){if(w.buffer!==void 0){let C=w.buffer;const Q=e;if(e===Q)if(C&&typeof C=="object"&&!Array.isArray(C)){let Y;if(C.byteLength===void 0&&(Y="byteLength")){const K={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:Y},message:"must have required property '"+Y+"'"};i===null?i=[K]:i.push(K),e++}else{const K=e;for(const pe in C)if(pe!=="byteLength"){const le={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:pe},message:"must NOT have additional properties"};i===null?i=[le]:i.push(le),e++;break}if(K===e&&C.byteLength!==void 0){let pe=C.byteLength;if(!(typeof pe=="number"&&isFinite(pe))){const le={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer/byteLength",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[le]:i.push(le),e++}}}}else{const Y={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1")+"/buffer",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[Y]:i.push(Y),e++}var D=Q===e}else var D=!0;if(D){if(w.byteLength!==void 0){let C=w.byteLength;const Q=e;if(!(typeof C=="number"&&isFinite(C))){const Y={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1")+"/byteLength",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Y]:i.push(Y),e++}var D=Q===e}else var D=!0;if(D){if(w.byteOffset!==void 0){let C=w.byteOffset;const Q=e;if(!(typeof C=="number"&&isFinite(C))){const Y={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1")+"/byteOffset",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Y]:i.push(Y),e++}var D=Q===e}else var D=!0;if(D)if(w.length!==void 0){let C=w.length;const Q=e;if(!(typeof C=="number"&&isFinite(C))){const Y={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1")+"/length",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Y]:i.push(Y),e++}var D=Q===e}else var D=!0}}}}}}else{const ee={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[ee]:i.push(ee),e++}var k=R===e;if(q=q||k,!q){const ee=e;if(e===ee)if(w&&typeof w=="object"&&!Array.isArray(w)){let C;if(w.lastModified===void 0&&(C="lastModified")||w.name===void 0&&(C="name")||w.size===void 0&&(C="size")||w.type===void 0&&(C="type")||w.webkitRelativePath===void 0&&(C="webkitRelativePath")){const Q={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/required",keyword:"required",params:{missingProperty:C},message:"must have required property '"+C+"'"};i===null?i=[Q]:i.push(Q),e++}else{const Q=e;for(const M in w)if(!(M==="size"||M==="type"||M==="lastModified"||M==="name"||M==="webkitRelativePath")){const Y={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:M},message:"must NOT have additional properties"};i===null?i=[Y]:i.push(Y),e++;break}if(Q===e){if(w.size!==void 0){let M=w.size;const Y=e;if(!(typeof M=="number"&&isFinite(M))){const K={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1")+"/size",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[K]:i.push(K),e++}var v=Y===e}else var v=!0;if(v){if(w.type!==void 0){const M=e;if(typeof w.type!="string"){const K={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1")+"/type",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/type/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[K]:i.push(K),e++}var v=M===e}else var v=!0;if(v){if(w.lastModified!==void 0){let M=w.lastModified;const Y=e;if(!(typeof M=="number"&&isFinite(M))){const pe={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1")+"/lastModified",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/lastModified/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[pe]:i.push(pe),e++}var v=Y===e}else var v=!0;if(v){if(w.name!==void 0){const M=e;if(typeof w.name!="string"){const K={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1")+"/name",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[K]:i.push(K),e++}var v=M===e}else var v=!0;if(v)if(w.webkitRelativePath!==void 0){const M=e;if(typeof w.webkitRelativePath!="string"){const K={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1")+"/webkitRelativePath",schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/properties/webkitRelativePath/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[K]:i.push(K),e++}var v=M===e}else var v=!0}}}}}}else{const C={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[C]:i.push(C),e++}var k=ee===e;q=q||k}}if(q)e=N,i!==null&&(N?i.length=N:i=null);else{const R={instancePath:t+"/body/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/2/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};i===null?i=[R]:i.push(R),e++}var U=O===e;if(!U)break}else{const g={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[g]:i.push(g),e++}var b=P===e;z=z||b}}if(z)e=I,i!==null&&(I?i.length=I:i=null);else{const $={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[$]:i.push($),e++,ye.errors=i,!1}var f=L===e}else var f=!0}}}}}else return ye.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return ye.errors=i,e===0}const Is={type:"object",properties:{relativeUri:{type:"string",description:"Request path following the domain:port part."},scriptPath:{type:"string",description:"Path of the .php file to execute."},protocol:{type:"string",description:"Request protocol."},method:{$ref:"#/definitions/HTTPMethod",description:"Request method. Default: `GET`."},headers:{$ref:"#/definitions/PHPRequestHeaders",description:"Request headers."},body:{anyOf:[{type:"string"},{type:"object",properties:{BYTES_PER_ELEMENT:{type:"number"},buffer:{type:"object",properties:{byteLength:{type:"number"}},required:["byteLength"],additionalProperties:!1},byteLength:{type:"number"},byteOffset:{type:"number"},length:{type:"number"}},required:["BYTES_PER_ELEMENT","buffer","byteLength","byteOffset","length"],additionalProperties:{type:"number"}}],description:"Request body."},env:{type:"object",additionalProperties:{type:"string"},description:"Environment variables to set for this run."},$_SERVER:{type:"object",additionalProperties:{type:"string"},description:"$_SERVER entries to set for this run."},code:{type:"string",description:"The code snippet to eval instead of a php file."}},additionalProperties:!1};function ne(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let i=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){const D=e;for(const v in r)if(!Lt.call(Is.properties,v))return ne.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"}],!1;if(D===e){if(r.relativeUri!==void 0){const v=e;if(typeof r.relativeUri!="string")return ne.errors=[{instancePath:t+"/relativeUri",schemaPath:"#/properties/relativeUri/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=v===e}else var f=!0;if(f){if(r.scriptPath!==void 0){const v=e;if(typeof r.scriptPath!="string")return ne.errors=[{instancePath:t+"/scriptPath",schemaPath:"#/properties/scriptPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=v===e}else var f=!0;if(f){if(r.protocol!==void 0){const v=e;if(typeof r.protocol!="string")return ne.errors=[{instancePath:t+"/protocol",schemaPath:"#/properties/protocol/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=v===e}else var f=!0;if(f){if(r.method!==void 0){let v=r.method;const U=e;if(typeof v!="string")return ne.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(v==="GET"||v==="POST"||v==="HEAD"||v==="OPTIONS"||v==="PATCH"||v==="PUT"||v==="DELETE"))return ne.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:xt.enum},message:"must be equal to one of the allowed values"}],!1;var f=U===e}else var f=!0;if(f){if(r.headers!==void 0){let v=r.headers;const U=e;if(e===e)if(v&&typeof v=="object"&&!Array.isArray(v))for(const E in v){const L=e;if(typeof v[E]!="string")return ne.errors=[{instancePath:t+"/headers/"+E.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/PHPRequestHeaders/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=L===e;if(!h)break}else return ne.errors=[{instancePath:t+"/headers",schemaPath:"#/definitions/PHPRequestHeaders/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=U===e}else var f=!0;if(f){if(r.body!==void 0){let v=r.body;const U=e,te=e;let H=!1;const E=e;if(typeof v!="string"){const I={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[I]:i.push(I),e++}var b=E===e;if(H=H||b,!H){const I=e;if(e===I)if(v&&typeof v=="object"&&!Array.isArray(v)){let c;if(v.BYTES_PER_ELEMENT===void 0&&(c="BYTES_PER_ELEMENT")||v.buffer===void 0&&(c="buffer")||v.byteLength===void 0&&(c="byteLength")||v.byteOffset===void 0&&(c="byteOffset")||v.length===void 0&&(c="length")){const A={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:c},message:"must have required property '"+c+"'"};i===null?i=[A]:i.push(A),e++}else{const A=e;for(const $ in v)if(!($==="BYTES_PER_ELEMENT"||$==="buffer"||$==="byteLength"||$==="byteOffset"||$==="length")){let T=v[$];const P=e;if(!(typeof T=="number"&&isFinite(T))){const y={instancePath:t+"/body/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/body/anyOf/1/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[y]:i.push(y),e++}var _=P===e;if(!_)break}if(A===e){if(v.BYTES_PER_ELEMENT!==void 0){let $=v.BYTES_PER_ELEMENT;const T=e;if(!(typeof $=="number"&&isFinite($))){const P={instancePath:t+"/body/BYTES_PER_ELEMENT",schemaPath:"#/properties/body/anyOf/1/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[P]:i.push(P),e++}var m=T===e}else var m=!0;if(m){if(v.buffer!==void 0){let $=v.buffer;const T=e;if(e===T)if($&&typeof $=="object"&&!Array.isArray($)){let y;if($.byteLength===void 0&&(y="byteLength")){const g={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/required",keyword:"required",params:{missingProperty:y},message:"must have required property '"+y+"'"};i===null?i=[g]:i.push(g),e++}else{const g=e;for(const w in $)if(w!=="byteLength"){const O={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:w},message:"must NOT have additional properties"};i===null?i=[O]:i.push(O),e++;break}if(g===e&&$.byteLength!==void 0){let w=$.byteLength;if(!(typeof w=="number"&&isFinite(w))){const O={instancePath:t+"/body/buffer/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[O]:i.push(O),e++}}}}else{const y={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[y]:i.push(y),e++}var m=T===e}else var m=!0;if(m){if(v.byteLength!==void 0){let $=v.byteLength;const T=e;if(!(typeof $=="number"&&isFinite($))){const y={instancePath:t+"/body/byteLength",schemaPath:"#/properties/body/anyOf/1/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[y]:i.push(y),e++}var m=T===e}else var m=!0;if(m){if(v.byteOffset!==void 0){let $=v.byteOffset;const T=e;if(!(typeof $=="number"&&isFinite($))){const y={instancePath:t+"/body/byteOffset",schemaPath:"#/properties/body/anyOf/1/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[y]:i.push(y),e++}var m=T===e}else var m=!0;if(m)if(v.length!==void 0){let $=v.length;const T=e;if(!(typeof $=="number"&&isFinite($))){const y={instancePath:t+"/body/length",schemaPath:"#/properties/body/anyOf/1/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[y]:i.push(y),e++}var m=T===e}else var m=!0}}}}}}else{const c={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[c]:i.push(c),e++}var b=I===e;H=H||b}if(H)e=te,i!==null&&(te?i.length=te:i=null);else{const I={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[I]:i.push(I),e++,ne.errors=i,!1}var f=U===e}else var f=!0;if(f){if(r.env!==void 0){let v=r.env;const U=e;if(e===U)if(v&&typeof v=="object"&&!Array.isArray(v))for(const H in v){const E=e;if(typeof v[H]!="string")return ne.errors=[{instancePath:t+"/env/"+H.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/env/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var k=E===e;if(!k)break}else return ne.errors=[{instancePath:t+"/env",schemaPath:"#/properties/env/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=U===e}else var f=!0;if(f){if(r.$_SERVER!==void 0){let v=r.$_SERVER;const U=e;if(e===U)if(v&&typeof v=="object"&&!Array.isArray(v))for(const H in v){const E=e;if(typeof v[H]!="string")return ne.errors=[{instancePath:t+"/$_SERVER/"+H.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/%24_SERVER/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var x=E===e;if(!x)break}else return ne.errors=[{instancePath:t+"/$_SERVER",schemaPath:"#/properties/%24_SERVER/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=U===e}else var f=!0;if(f)if(r.code!==void 0){const v=e;if(typeof r.code!="string")return ne.errors=[{instancePath:t+"/code",schemaPath:"#/properties/code/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=v===e}else var f=!0}}}}}}}}}else return ne.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return ne.errors=i,e===0}function o(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let i=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){let br;if(r.step===void 0&&(br="step"))return o.errors=[{instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:br},message:"must have required property '"+br+"'"}],!1;{const G=r.step;if(typeof G=="string")if(G==="activatePlugin"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.pluginPath===void 0&&(d="pluginPath")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="pluginPath"||s==="pluginName"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/0/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/0/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var f=j===e}else var f=!0;if(f)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/0/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=a===e}else var f=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/0/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var h=u===e}else var h=!0;if(h){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/0/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="activatePlugin")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/0/properties/step/const",keyword:"const",params:{allowedValue:"activatePlugin"},message:"must be equal to constant"}],!1;var h=u===e}else var h=!0;if(h){if(r.pluginPath!==void 0){const s=e;if(typeof r.pluginPath!="string")return o.errors=[{instancePath:t+"/pluginPath",schemaPath:"#/oneOf/0/properties/pluginPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=s===e}else var h=!0;if(h)if(r.pluginName!==void 0){const s=e;if(typeof r.pluginName!="string")return o.errors=[{instancePath:t+"/pluginName",schemaPath:"#/oneOf/0/properties/pluginName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=s===e}else var h=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="activateTheme"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step")||r.themeFolderName===void 0&&(d="themeFolderName"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="themeFolderName"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/1/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/1/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var b=j===e}else var b=!0;if(b)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/1/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var b=a===e}else var b=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/1/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var _=u===e}else var _=!0;if(_){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/1/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="activateTheme")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/1/properties/step/const",keyword:"const",params:{allowedValue:"activateTheme"},message:"must be equal to constant"}],!1;var _=u===e}else var _=!0;if(_)if(r.themeFolderName!==void 0){const s=e;if(typeof r.themeFolderName!="string")return o.errors=[{instancePath:t+"/themeFolderName",schemaPath:"#/oneOf/1/properties/themeFolderName/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var _=s===e}else var _=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="cp"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.fromPath===void 0&&(d="fromPath")||r.step===void 0&&(d="step")||r.toPath===void 0&&(d="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="fromPath"||s==="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/2/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/2/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var m=j===e}else var m=!0;if(m)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/2/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var m=a===e}else var m=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/2/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var k=u===e}else var k=!0;if(k){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/2/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="cp")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/2/properties/step/const",keyword:"const",params:{allowedValue:"cp"},message:"must be equal to constant"}],!1;var k=u===e}else var k=!0;if(k){if(r.fromPath!==void 0){const s=e;if(typeof r.fromPath!="string")return o.errors=[{instancePath:t+"/fromPath",schemaPath:"#/oneOf/2/properties/fromPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var k=s===e}else var k=!0;if(k)if(r.toPath!==void 0){const s=e;if(typeof r.toPath!="string")return o.errors=[{instancePath:t+"/toPath",schemaPath:"#/oneOf/2/properties/toPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var k=s===e}else var k=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="defineWpConfigConsts"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.consts===void 0&&(d="consts")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="consts"||s==="method"||s==="virtualize"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/3/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/3/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var x=j===e}else var x=!0;if(x)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/3/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var x=a===e}else var x=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/3/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var D=u===e}else var D=!0;if(D){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/3/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="defineWpConfigConsts")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/3/properties/step/const",keyword:"const",params:{allowedValue:"defineWpConfigConsts"},message:"must be equal to constant"}],!1;var D=u===e}else var D=!0;if(D){if(r.consts!==void 0){let s=r.consts;const u=e;if(e===u&&!(s&&typeof s=="object"&&!Array.isArray(s)))return o.errors=[{instancePath:t+"/consts",schemaPath:"#/oneOf/3/properties/consts/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var D=u===e}else var D=!0;if(D){if(r.method!==void 0){let s=r.method;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/method",schemaPath:"#/oneOf/3/properties/method/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(s==="rewrite-wp-config"||s==="define-before-run"))return o.errors=[{instancePath:t+"/method",schemaPath:"#/oneOf/3/properties/method/enum",keyword:"enum",params:{allowedValues:kr.oneOf[3].properties.method.enum},message:"must be equal to one of the allowed values"}],!1;var D=u===e}else var D=!0;if(D)if(r.virtualize!==void 0){const s=e;if(typeof r.virtualize!="boolean")return o.errors=[{instancePath:t+"/virtualize",schemaPath:"#/oneOf/3/properties/virtualize/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var D=s===e}else var D=!0}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="defineSiteUrl"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.siteUrl===void 0&&(d="siteUrl")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/4/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="siteUrl"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/4/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/4/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/4/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var v=j===e}else var v=!0;if(v)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/4/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var v=a===e}else var v=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/4/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var U=u===e}else var U=!0;if(U){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/4/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="defineSiteUrl")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/4/properties/step/const",keyword:"const",params:{allowedValue:"defineSiteUrl"},message:"must be equal to constant"}],!1;var U=u===e}else var U=!0;if(U)if(r.siteUrl!==void 0){const s=e;if(typeof r.siteUrl!="string")return o.errors=[{instancePath:t+"/siteUrl",schemaPath:"#/oneOf/4/properties/siteUrl/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var U=s===e}else var U=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/4/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="enableMultisite"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/5/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/5/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var te=j===e}else var te=!0;if(te)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/5/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var te=a===e}else var te=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/5/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var H=u===e}else var H=!0;if(H)if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/5/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="enableMultisite")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/5/properties/step/const",keyword:"const",params:{allowedValue:"enableMultisite"},message:"must be equal to constant"}],!1;var H=u===e}else var H=!0}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/5/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="importWxr"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.file===void 0&&(d="file")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="file"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/6/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/6/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var E=j===e}else var E=!0;if(E)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/6/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var E=a===e}else var E=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/6/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var L=u===e}else var L=!0;if(L){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/6/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="importWxr")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/6/properties/step/const",keyword:"const",params:{allowedValue:"importWxr"},message:"must be equal to constant"}],!1;var L=u===e}else var L=!0;if(L)if(r.file!==void 0){const s=e;re(r.file,{instancePath:t+"/file",parentData:r,parentDataProperty:"file",rootData:l})||(i=i===null?re.errors:i.concat(re.errors),e=i.length);var L=s===e}else var L=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/6/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="importThemeStarterContent"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="themeSlug"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/7/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/7/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var I=j===e}else var I=!0;if(I)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/7/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var I=a===e}else var I=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/7/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var z=u===e}else var z=!0;if(z){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/7/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="importThemeStarterContent")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/7/properties/step/const",keyword:"const",params:{allowedValue:"importThemeStarterContent"},message:"must be equal to constant"}],!1;var z=u===e}else var z=!0;if(z)if(r.themeSlug!==void 0){const s=e;if(typeof r.themeSlug!="string")return o.errors=[{instancePath:t+"/themeSlug",schemaPath:"#/oneOf/7/properties/themeSlug/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var z=s===e}else var z=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/7/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="importWordPressFiles"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step")||r.wordPressFilesZip===void 0&&(d="wordPressFilesZip"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="wordPressFilesZip"||s==="pathInZip"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/8/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/8/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var c=j===e}else var c=!0;if(c)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/8/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var c=a===e}else var c=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/8/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var A=u===e}else var A=!0;if(A){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/8/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="importWordPressFiles")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/8/properties/step/const",keyword:"const",params:{allowedValue:"importWordPressFiles"},message:"must be equal to constant"}],!1;var A=u===e}else var A=!0;if(A){if(r.wordPressFilesZip!==void 0){const s=e;re(r.wordPressFilesZip,{instancePath:t+"/wordPressFilesZip",parentData:r,parentDataProperty:"wordPressFilesZip",rootData:l})||(i=i===null?re.errors:i.concat(re.errors),e=i.length);var A=s===e}else var A=!0;if(A)if(r.pathInZip!==void 0){const s=e;if(typeof r.pathInZip!="string")return o.errors=[{instancePath:t+"/pathInZip",schemaPath:"#/oneOf/8/properties/pathInZip/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var A=s===e}else var A=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/8/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="installPlugin"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.pluginZipFile===void 0&&(d="pluginZipFile")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/9/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="ifAlreadyInstalled"||s==="step"||s==="pluginZipFile"||s==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/9/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/9/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/9/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var $=j===e}else var $=!0;if($)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/9/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var $=a===e}else var $=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/9/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var T=u===e}else var T=!0;if(T){if(r.ifAlreadyInstalled!==void 0){let s=r.ifAlreadyInstalled;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/9/properties/ifAlreadyInstalled/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(s==="overwrite"||s==="skip"||s==="error"))return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/9/properties/ifAlreadyInstalled/enum",keyword:"enum",params:{allowedValues:kr.oneOf[9].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var T=u===e}else var T=!0;if(T){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/9/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="installPlugin")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/9/properties/step/const",keyword:"const",params:{allowedValue:"installPlugin"},message:"must be equal to constant"}],!1;var T=u===e}else var T=!0;if(T){if(r.pluginZipFile!==void 0){const s=e;re(r.pluginZipFile,{instancePath:t+"/pluginZipFile",parentData:r,parentDataProperty:"pluginZipFile",rootData:l})||(i=i===null?re.errors:i.concat(re.errors),e=i.length);var T=s===e}else var T=!0;if(T)if(r.options!==void 0){let s=r.options;const u=e;if(e===e)if(s&&typeof s=="object"&&!Array.isArray(s)){const j=e;for(const ve in s)if(ve!=="activate")return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallPluginOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ve},message:"must NOT have additional properties"}],!1;if(j===e&&s.activate!==void 0&&typeof s.activate!="boolean")return o.errors=[{instancePath:t+"/options/activate",schemaPath:"#/definitions/InstallPluginOptions/properties/activate/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/InstallPluginOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var T=u===e}else var T=!0}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/9/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="installTheme"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step")||r.themeZipFile===void 0&&(d="themeZipFile"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="ifAlreadyInstalled"||s==="step"||s==="themeZipFile"||s==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/10/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/10/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var P=j===e}else var P=!0;if(P)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/10/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var P=a===e}else var P=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/10/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var y=u===e}else var y=!0;if(y){if(r.ifAlreadyInstalled!==void 0){let s=r.ifAlreadyInstalled;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/10/properties/ifAlreadyInstalled/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(s==="overwrite"||s==="skip"||s==="error"))return o.errors=[{instancePath:t+"/ifAlreadyInstalled",schemaPath:"#/oneOf/10/properties/ifAlreadyInstalled/enum",keyword:"enum",params:{allowedValues:kr.oneOf[10].properties.ifAlreadyInstalled.enum},message:"must be equal to one of the allowed values"}],!1;var y=u===e}else var y=!0;if(y){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/10/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="installTheme")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/10/properties/step/const",keyword:"const",params:{allowedValue:"installTheme"},message:"must be equal to constant"}],!1;var y=u===e}else var y=!0;if(y){if(r.themeZipFile!==void 0){const s=e;re(r.themeZipFile,{instancePath:t+"/themeZipFile",parentData:r,parentDataProperty:"themeZipFile",rootData:l})||(i=i===null?re.errors:i.concat(re.errors),e=i.length);var y=s===e}else var y=!0;if(y)if(r.options!==void 0){let s=r.options;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const a=e;for(const j in s)if(!(j==="activate"||j==="importStarterContent"))return o.errors=[{instancePath:t+"/options",schemaPath:"#/oneOf/10/properties/options/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:j},message:"must NOT have additional properties"}],!1;if(a===e){if(s.activate!==void 0){const j=e;if(typeof s.activate!="boolean")return o.errors=[{instancePath:t+"/options/activate",schemaPath:"#/oneOf/10/properties/options/properties/activate/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var g=j===e}else var g=!0;if(g)if(s.importStarterContent!==void 0){const j=e;if(typeof s.importStarterContent!="boolean")return o.errors=[{instancePath:t+"/options/importStarterContent",schemaPath:"#/oneOf/10/properties/options/properties/importStarterContent/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1;var g=j===e}else var g=!0}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/oneOf/10/properties/options/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var y=u===e}else var y=!0}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/10/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="login"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/11/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="username"||s==="password"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/11/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/11/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/11/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var w=j===e}else var w=!0;if(w)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/11/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var w=a===e}else var w=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/11/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var O=u===e}else var O=!0;if(O){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/11/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="login")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/11/properties/step/const",keyword:"const",params:{allowedValue:"login"},message:"must be equal to constant"}],!1;var O=u===e}else var O=!0;if(O){if(r.username!==void 0){const s=e;if(typeof r.username!="string")return o.errors=[{instancePath:t+"/username",schemaPath:"#/oneOf/11/properties/username/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var O=s===e}else var O=!0;if(O)if(r.password!==void 0){const s=e;if(typeof r.password!="string")return o.errors=[{instancePath:t+"/password",schemaPath:"#/oneOf/11/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var O=s===e}else var O=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/11/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="mkdir"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.path===void 0&&(d="path")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="path"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/12/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/12/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var N=j===e}else var N=!0;if(N)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/12/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var N=a===e}else var N=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/12/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var q=u===e}else var q=!0;if(q){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/12/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="mkdir")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/12/properties/step/const",keyword:"const",params:{allowedValue:"mkdir"},message:"must be equal to constant"}],!1;var q=u===e}else var q=!0;if(q)if(r.path!==void 0){const s=e;if(typeof r.path!="string")return o.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/12/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var q=s===e}else var q=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/12/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="mv"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.fromPath===void 0&&(d="fromPath")||r.step===void 0&&(d="step")||r.toPath===void 0&&(d="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/13/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="fromPath"||s==="toPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/13/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/13/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/13/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var W=j===e}else var W=!0;if(W)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/13/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var W=a===e}else var W=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/13/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var R=u===e}else var R=!0;if(R){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/13/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="mv")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/13/properties/step/const",keyword:"const",params:{allowedValue:"mv"},message:"must be equal to constant"}],!1;var R=u===e}else var R=!0;if(R){if(r.fromPath!==void 0){const s=e;if(typeof r.fromPath!="string")return o.errors=[{instancePath:t+"/fromPath",schemaPath:"#/oneOf/13/properties/fromPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var R=s===e}else var R=!0;if(R)if(r.toPath!==void 0){const s=e;if(typeof r.toPath!="string")return o.errors=[{instancePath:t+"/toPath",schemaPath:"#/oneOf/13/properties/toPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var R=s===e}else var R=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/13/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="resetData"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/14/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/14/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var V=j===e}else var V=!0;if(V)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/14/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var V=a===e}else var V=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/14/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ee=u===e}else var ee=!0;if(ee)if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/14/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="resetData")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/14/properties/step/const",keyword:"const",params:{allowedValue:"resetData"},message:"must be equal to constant"}],!1;var ee=u===e}else var ee=!0}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/14/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="request"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.request===void 0&&(d="request")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="request"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/15/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/15/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var J=j===e}else var J=!0;if(J)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/15/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var J=a===e}else var J=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/15/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var C=u===e}else var C=!0;if(C){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/15/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="request")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/15/properties/step/const",keyword:"const",params:{allowedValue:"request"},message:"must be equal to constant"}],!1;var C=u===e}else var C=!0;if(C)if(r.request!==void 0){const s=e;ye(r.request,{instancePath:t+"/request",parentData:r,parentDataProperty:"request",rootData:l})||(i=i===null?ye.errors:i.concat(ye.errors),e=i.length);var C=s===e}else var C=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/15/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="rm"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.path===void 0&&(d="path")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="path"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/16/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/16/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Q=j===e}else var Q=!0;if(Q)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/16/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Q=a===e}else var Q=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/16/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var M=u===e}else var M=!0;if(M){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/16/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="rm")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/16/properties/step/const",keyword:"const",params:{allowedValue:"rm"},message:"must be equal to constant"}],!1;var M=u===e}else var M=!0;if(M)if(r.path!==void 0){const s=e;if(typeof r.path!="string")return o.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/16/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var M=s===e}else var M=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/16/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="rmdir"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.path===void 0&&(d="path")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/17/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="path"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/17/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/17/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/17/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Y=j===e}else var Y=!0;if(Y)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/17/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Y=a===e}else var Y=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/17/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var K=u===e}else var K=!0;if(K){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/17/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="rmdir")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/17/properties/step/const",keyword:"const",params:{allowedValue:"rmdir"},message:"must be equal to constant"}],!1;var K=u===e}else var K=!0;if(K)if(r.path!==void 0){const s=e;if(typeof r.path!="string")return o.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/17/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var K=s===e}else var K=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/17/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="runPHP"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.code===void 0&&(d="code")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/18/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="code"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/18/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/18/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/18/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var pe=j===e}else var pe=!0;if(pe)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/18/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var pe=a===e}else var pe=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/18/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var le=u===e}else var le=!0;if(le){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/18/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="runPHP")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/18/properties/step/const",keyword:"const",params:{allowedValue:"runPHP"},message:"must be equal to constant"}],!1;var le=u===e}else var le=!0;if(le)if(r.code!==void 0){const s=e;if(typeof r.code!="string")return o.errors=[{instancePath:t+"/code",schemaPath:"#/oneOf/18/properties/code/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var le=s===e}else var le=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/18/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="runPHPWithOptions"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.options===void 0&&(d="options")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/19/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/19/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/19/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/19/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var De=j===e}else var De=!0;if(De)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/19/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var De=a===e}else var De=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/19/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var $e=u===e}else var $e=!0;if($e){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/19/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="runPHPWithOptions")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/19/properties/step/const",keyword:"const",params:{allowedValue:"runPHPWithOptions"},message:"must be equal to constant"}],!1;var $e=u===e}else var $e=!0;if($e)if(r.options!==void 0){const s=e;ne(r.options,{instancePath:t+"/options",parentData:r,parentDataProperty:"options",rootData:l})||(i=i===null?ne.errors:i.concat(ne.errors),e=i.length);var $e=s===e}else var $e=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/19/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="runWpInstallationWizard"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.options===void 0&&(d="options")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/20/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/20/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/20/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/20/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Me=j===e}else var Me=!0;if(Me)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/20/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Me=a===e}else var Me=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/20/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Te=u===e}else var Te=!0;if(Te){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/20/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="runWpInstallationWizard")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/20/properties/step/const",keyword:"const",params:{allowedValue:"runWpInstallationWizard"},message:"must be equal to constant"}],!1;var Te=u===e}else var Te=!0;if(Te)if(r.options!==void 0){let s=r.options;const u=e;if(e===e)if(s&&typeof s=="object"&&!Array.isArray(s)){const j=e;for(const ve in s)if(!(ve==="adminUsername"||ve==="adminPassword"))return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:ve},message:"must NOT have additional properties"}],!1;if(j===e){if(s.adminUsername!==void 0){const ve=e;if(typeof s.adminUsername!="string")return o.errors=[{instancePath:t+"/options/adminUsername",schemaPath:"#/definitions/WordPressInstallationOptions/properties/adminUsername/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Be=ve===e}else var Be=!0;if(Be)if(s.adminPassword!==void 0){const ve=e;if(typeof s.adminPassword!="string")return o.errors=[{instancePath:t+"/options/adminPassword",schemaPath:"#/definitions/WordPressInstallationOptions/properties/adminPassword/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Be=ve===e}else var Be=!0}}else return o.errors=[{instancePath:t+"/options",schemaPath:"#/definitions/WordPressInstallationOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Te=u===e}else var Te=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/20/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="runSql"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.sql===void 0&&(d="sql")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/21/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="sql"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/21/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/21/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/21/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ue=j===e}else var Ue=!0;if(Ue)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/21/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ue=a===e}else var Ue=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/21/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var je=u===e}else var je=!0;if(je){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/21/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="runSql")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/21/properties/step/const",keyword:"const",params:{allowedValue:"runSql"},message:"must be equal to constant"}],!1;var je=u===e}else var je=!0;if(je)if(r.sql!==void 0){const s=e;re(r.sql,{instancePath:t+"/sql",parentData:r,parentDataProperty:"sql",rootData:l})||(i=i===null?re.errors:i.concat(re.errors),e=i.length);var je=s===e}else var je=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/21/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="setSiteOptions"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.options===void 0&&(d="options")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/22/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="options"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/22/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/22/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/22/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var ze=j===e}else var ze=!0;if(ze)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/22/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ze=a===e}else var ze=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/22/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ae=u===e}else var Ae=!0;if(Ae){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/22/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="setSiteOptions")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/22/properties/step/const",keyword:"const",params:{allowedValue:"setSiteOptions"},message:"must be equal to constant"}],!1;var Ae=u===e}else var Ae=!0;if(Ae)if(r.options!==void 0){let s=r.options;const u=e;if(e===u&&!(s&&typeof s=="object"&&!Array.isArray(s)))return o.errors=[{instancePath:t+"/options",schemaPath:"#/oneOf/22/properties/options/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var Ae=u===e}else var Ae=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/22/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="unzip"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.extractToPath===void 0&&(d="extractToPath")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/23/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="zipFile"||s==="zipPath"||s==="extractToPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/23/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/23/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/23/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ve=j===e}else var Ve=!0;if(Ve)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/23/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ve=a===e}else var Ve=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/23/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var fe=u===e}else var fe=!0;if(fe){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/23/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="unzip")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/23/properties/step/const",keyword:"const",params:{allowedValue:"unzip"},message:"must be equal to constant"}],!1;var fe=u===e}else var fe=!0;if(fe){if(r.zipFile!==void 0){const s=e;re(r.zipFile,{instancePath:t+"/zipFile",parentData:r,parentDataProperty:"zipFile",rootData:l})||(i=i===null?re.errors:i.concat(re.errors),e=i.length);var fe=s===e}else var fe=!0;if(fe){if(r.zipPath!==void 0){const s=e;if(typeof r.zipPath!="string")return o.errors=[{instancePath:t+"/zipPath",schemaPath:"#/oneOf/23/properties/zipPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var fe=s===e}else var fe=!0;if(fe)if(r.extractToPath!==void 0){const s=e;if(typeof r.extractToPath!="string")return o.errors=[{instancePath:t+"/extractToPath",schemaPath:"#/oneOf/23/properties/extractToPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var fe=s===e}else var fe=!0}}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/23/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="updateUserMeta"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.meta===void 0&&(d="meta")||r.step===void 0&&(d="step")||r.userId===void 0&&(d="userId"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/24/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="meta"||s==="userId"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/24/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/24/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/24/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var He=j===e}else var He=!0;if(He)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/24/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var He=a===e}else var He=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/24/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ge=u===e}else var ge=!0;if(ge){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/24/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="updateUserMeta")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/24/properties/step/const",keyword:"const",params:{allowedValue:"updateUserMeta"},message:"must be equal to constant"}],!1;var ge=u===e}else var ge=!0;if(ge){if(r.meta!==void 0){let s=r.meta;const u=e;if(e===u&&!(s&&typeof s=="object"&&!Array.isArray(s)))return o.errors=[{instancePath:t+"/meta",schemaPath:"#/oneOf/24/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ge=u===e}else var ge=!0;if(ge)if(r.userId!==void 0){let s=r.userId;const u=e;if(!(typeof s=="number"&&isFinite(s)))return o.errors=[{instancePath:t+"/userId",schemaPath:"#/oneOf/24/properties/userId/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var ge=u===e}else var ge=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/24/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="writeFile"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.data===void 0&&(d="data")||r.path===void 0&&(d="path")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/25/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="path"||s==="data"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/25/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/25/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/25/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ge=j===e}else var Ge=!0;if(Ge)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/25/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ge=a===e}else var Ge=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/25/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var be=u===e}else var be=!0;if(be){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/25/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="writeFile")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/25/properties/step/const",keyword:"const",params:{allowedValue:"writeFile"},message:"must be equal to constant"}],!1;var be=u===e}else var be=!0;if(be){if(r.path!==void 0){const s=e;if(typeof r.path!="string")return o.errors=[{instancePath:t+"/path",schemaPath:"#/oneOf/25/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var be=s===e}else var be=!0;if(be)if(r.data!==void 0){let s=r.data;const u=e,S=e;let a=!1;const j=e;re(s,{instancePath:t+"/data",parentData:r,parentDataProperty:"data",rootData:l})||(i=i===null?re.errors:i.concat(re.errors),e=i.length);var Ne=j===e;if(a=a||Ne,!a){const de=e;if(typeof s!="string"){const Pe={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[Pe]:i.push(Pe),e++}var Ne=de===e;if(a=a||Ne,!a){const Pe=e;if(e===Pe)if(s&&typeof s=="object"&&!Array.isArray(s)){let he;if(s.BYTES_PER_ELEMENT===void 0&&(he="BYTES_PER_ELEMENT")||s.buffer===void 0&&(he="buffer")||s.byteLength===void 0&&(he="byteLength")||s.byteOffset===void 0&&(he="byteOffset")||s.length===void 0&&(he="length")){const Je={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/2/required",keyword:"required",params:{missingProperty:he},message:"must have required property '"+he+"'"};i===null?i=[Je]:i.push(Je),e++}else{const Je=e;for(const Z in s)if(!(Z==="BYTES_PER_ELEMENT"||Z==="buffer"||Z==="byteLength"||Z==="byteOffset"||Z==="length")){let ce=s[Z];const Ke=e;if(!(typeof ce=="number"&&isFinite(ce))){const oe={instancePath:t+"/data/"+Z.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/oneOf/25/properties/data/anyOf/2/additionalProperties/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[oe]:i.push(oe),e++}var Ht=Ke===e;if(!Ht)break}if(Je===e){if(s.BYTES_PER_ELEMENT!==void 0){let Z=s.BYTES_PER_ELEMENT;const ce=e;if(!(typeof Z=="number"&&isFinite(Z))){const Ke={instancePath:t+"/data/BYTES_PER_ELEMENT",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/BYTES_PER_ELEMENT/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Ke]:i.push(Ke),e++}var ue=ce===e}else var ue=!0;if(ue){if(s.buffer!==void 0){let Z=s.buffer;const ce=e;if(e===ce)if(Z&&typeof Z=="object"&&!Array.isArray(Z)){let oe;if(Z.byteLength===void 0&&(oe="byteLength")){const Xe={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/required",keyword:"required",params:{missingProperty:oe},message:"must have required property '"+oe+"'"};i===null?i=[Xe]:i.push(Xe),e++}else{const Xe=e;for(const Fe in Z)if(Fe!=="byteLength"){const Ce={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:Fe},message:"must NOT have additional properties"};i===null?i=[Ce]:i.push(Ce),e++;break}if(Xe===e&&Z.byteLength!==void 0){let Fe=Z.byteLength;if(!(typeof Fe=="number"&&isFinite(Fe))){const Ce={instancePath:t+"/data/buffer/byteLength",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[Ce]:i.push(Ce),e++}}}}else{const oe={instancePath:t+"/data/buffer",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/buffer/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[oe]:i.push(oe),e++}var ue=ce===e}else var ue=!0;if(ue){if(s.byteLength!==void 0){let Z=s.byteLength;const ce=e;if(!(typeof Z=="number"&&isFinite(Z))){const oe={instancePath:t+"/data/byteLength",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/byteLength/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[oe]:i.push(oe),e++}var ue=ce===e}else var ue=!0;if(ue){if(s.byteOffset!==void 0){let Z=s.byteOffset;const ce=e;if(!(typeof Z=="number"&&isFinite(Z))){const oe={instancePath:t+"/data/byteOffset",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/byteOffset/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[oe]:i.push(oe),e++}var ue=ce===e}else var ue=!0;if(ue)if(s.length!==void 0){let Z=s.length;const ce=e;if(!(typeof Z=="number"&&isFinite(Z))){const oe={instancePath:t+"/data/length",schemaPath:"#/oneOf/25/properties/data/anyOf/2/properties/length/type",keyword:"type",params:{type:"number"},message:"must be number"};i===null?i=[oe]:i.push(oe),e++}var ue=ce===e}else var ue=!0}}}}}}else{const he={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[he]:i.push(he),e++}var Ne=Pe===e;a=a||Ne}}if(a)e=S,i!==null&&(S?i.length=S:i=null);else{const de={instancePath:t+"/data",schemaPath:"#/oneOf/25/properties/data/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[de]:i.push(de),e++,o.errors=i,!1}var be=u===e}else var be=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/25/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="wp-cli"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.command===void 0&&(d="command")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/26/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="command"||s==="wpCliPath"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/26/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/26/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/26/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ye=j===e}else var Ye=!0;if(Ye)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/26/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ye=a===e}else var Ye=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/26/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var we=u===e}else var we=!0;if(we){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/26/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="wp-cli")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/26/properties/step/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var we=u===e}else var we=!0;if(we){if(r.command!==void 0){let s=r.command;const u=e,S=e;let a=!1;const j=e;if(typeof s!="string"){const de={instancePath:t+"/command",schemaPath:"#/oneOf/26/properties/command/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[de]:i.push(de),e++}var gr=j===e;if(a=a||gr,!a){const de=e;if(e===de)if(Array.isArray(s)){var Wr=!0;const Pe=s.length;for(let Qe=0;Qe<Pe;Qe++){const he=e;if(typeof s[Qe]!="string"){const Z={instancePath:t+"/command/"+Qe,schemaPath:"#/oneOf/26/properties/command/anyOf/1/items/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[Z]:i.push(Z),e++}var Wr=he===e;if(!Wr)break}}else{const Pe={instancePath:t+"/command",schemaPath:"#/oneOf/26/properties/command/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};i===null?i=[Pe]:i.push(Pe),e++}var gr=de===e;a=a||gr}if(a)e=S,i!==null&&(S?i.length=S:i=null);else{const de={instancePath:t+"/command",schemaPath:"#/oneOf/26/properties/command/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[de]:i.push(de),e++,o.errors=i,!1}var we=u===e}else var we=!0;if(we)if(r.wpCliPath!==void 0){const s=e;if(typeof r.wpCliPath!="string")return o.errors=[{instancePath:t+"/wpCliPath",schemaPath:"#/oneOf/26/properties/wpCliPath/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var we=s===e}else var we=!0}}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/26/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else if(G==="setSiteLanguage"){if(e===e)if(r&&typeof r=="object"&&!Array.isArray(r)){let d;if(r.language===void 0&&(d="language")||r.step===void 0&&(d="step"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/required",keyword:"required",params:{missingProperty:d},message:"must have required property '"+d+"'"}],!1;{const F=e;for(const s in r)if(!(s==="progress"||s==="step"||s==="language"))return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:s},message:"must NOT have additional properties"}],!1;if(F===e){if(r.progress!==void 0){let s=r.progress;const u=e;if(e===u)if(s&&typeof s=="object"&&!Array.isArray(s)){const S=e;for(const a in s)if(!(a==="weight"||a==="caption"))return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/27/properties/progress/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"}],!1;if(S===e){if(s.weight!==void 0){let a=s.weight;const j=e;if(!(typeof a=="number"&&isFinite(a)))return o.errors=[{instancePath:t+"/progress/weight",schemaPath:"#/oneOf/27/properties/progress/properties/weight/type",keyword:"type",params:{type:"number"},message:"must be number"}],!1;var Ze=j===e}else var Ze=!0;if(Ze)if(s.caption!==void 0){const a=e;if(typeof s.caption!="string")return o.errors=[{instancePath:t+"/progress/caption",schemaPath:"#/oneOf/27/properties/progress/properties/caption/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var Ze=a===e}else var Ze=!0}}else return o.errors=[{instancePath:t+"/progress",schemaPath:"#/oneOf/27/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var qe=u===e}else var qe=!0;if(qe){if(r.step!==void 0){let s=r.step;const u=e;if(typeof s!="string")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/27/properties/step/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(s!=="setSiteLanguage")return o.errors=[{instancePath:t+"/step",schemaPath:"#/oneOf/27/properties/step/const",keyword:"const",params:{allowedValue:"setSiteLanguage"},message:"must be equal to constant"}],!1;var qe=u===e}else var qe=!0;if(qe)if(r.language!==void 0){const s=e;if(typeof r.language!="string")return o.errors=[{instancePath:t+"/language",schemaPath:"#/oneOf/27/properties/language/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var qe=s===e}else var qe=!0}}}}else return o.errors=[{instancePath:t,schemaPath:"#/oneOf/27/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1}else return o.errors=[{instancePath:t,schemaPath:"#/discriminator",keyword:"discriminator",params:{error:"mapping",tag:"step",tagValue:G},message:'value of tag "step" must be in oneOf'}],!1;else return o.errors=[{instancePath:t,schemaPath:"#/discriminator",keyword:"discriminator",params:{error:"tag",tag:"step",tagValue:G},message:'tag "step" must be string'}],!1}}else return o.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return o.errors=i,e===0}function B(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let i=null,e=0;if(e===0)if(r&&typeof r=="object"&&!Array.isArray(r)){const z=e;for(const c in r)if(!Lt.call(Ns.properties,c))return B.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:c},message:"must NOT have additional properties"}],!1;if(z===e){if(r.landingPage!==void 0){const c=e;if(typeof r.landingPage!="string")return B.errors=[{instancePath:t+"/landingPage",schemaPath:"#/properties/landingPage/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=c===e}else var f=!0;if(f){if(r.description!==void 0){const c=e;if(typeof r.description!="string")return B.errors=[{instancePath:t+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=c===e}else var f=!0;if(f){if(r.meta!==void 0){let c=r.meta;const A=e;if(e===A)if(c&&typeof c=="object"&&!Array.isArray(c)){let T;if(c.title===void 0&&(T="title")||c.author===void 0&&(T="author"))return B.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty:T},message:"must have required property '"+T+"'"}],!1;{const P=e;for(const y in c)if(!(y==="title"||y==="description"||y==="author"||y==="categories"))return B.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"}],!1;if(P===e){if(c.title!==void 0){const y=e;if(typeof c.title!="string")return B.errors=[{instancePath:t+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=y===e}else var h=!0;if(h){if(c.description!==void 0){const y=e;if(typeof c.description!="string")return B.errors=[{instancePath:t+"/meta/description",schemaPath:"#/properties/meta/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=y===e}else var h=!0;if(h){if(c.author!==void 0){const y=e;if(typeof c.author!="string")return B.errors=[{instancePath:t+"/meta/author",schemaPath:"#/properties/meta/properties/author/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var h=y===e}else var h=!0;if(h)if(c.categories!==void 0){let y=c.categories;const g=e;if(e===g)if(Array.isArray(y)){var b=!0;const O=y.length;for(let N=0;N<O;N++){const q=e;if(typeof y[N]!="string")return B.errors=[{instancePath:t+"/meta/categories/"+N,schemaPath:"#/properties/meta/properties/categories/items/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var b=q===e;if(!b)break}}else return B.errors=[{instancePath:t+"/meta/categories",schemaPath:"#/properties/meta/properties/categories/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var h=g===e}else var h=!0}}}}}else return B.errors=[{instancePath:t+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=A===e}else var f=!0;if(f){if(r.preferredVersions!==void 0){let c=r.preferredVersions;const A=e;if(e===A)if(c&&typeof c=="object"&&!Array.isArray(c)){let T;if(c.php===void 0&&(T="php")||c.wp===void 0&&(T="wp"))return B.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/required",keyword:"required",params:{missingProperty:T},message:"must have required property '"+T+"'"}],!1;{const P=e;for(const y in c)if(!(y==="php"||y==="wp"))return B.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:y},message:"must NOT have additional properties"}],!1;if(P===e){if(c.php!==void 0){let y=c.php;const g=e,w=e;let O=!1;const N=e;if(typeof y!="string"){const q={instancePath:t+"/preferredVersions/php",schemaPath:"#/definitions/SupportedPHPVersion/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[q]:i.push(q),e++}if(!(y==="8.3"||y==="8.2"||y==="8.1"||y==="8.0"||y==="7.4"||y==="7.3"||y==="7.2"||y==="7.1"||y==="7.0")){const q={instancePath:t+"/preferredVersions/php",schemaPath:"#/definitions/SupportedPHPVersion/enum",keyword:"enum",params:{allowedValues:Fs.enum},message:"must be equal to one of the allowed values"};i===null?i=[q]:i.push(q),e++}var _=N===e;if(O=O||_,!O){const q=e;if(typeof y!="string"){const R={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[R]:i.push(R),e++}if(y!=="latest"){const R={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf/1/const",keyword:"const",params:{allowedValue:"latest"},message:"must be equal to constant"};i===null?i=[R]:i.push(R),e++}var _=q===e;O=O||_}if(O)e=w,i!==null&&(w?i.length=w:i=null);else{const q={instancePath:t+"/preferredVersions/php",schemaPath:"#/properties/preferredVersions/properties/php/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[q]:i.push(q),e++,B.errors=i,!1}var m=g===e}else var m=!0;if(m)if(c.wp!==void 0){const y=e;if(typeof c.wp!="string")return B.errors=[{instancePath:t+"/preferredVersions/wp",schemaPath:"#/properties/preferredVersions/properties/wp/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var m=y===e}else var m=!0}}}else return B.errors=[{instancePath:t+"/preferredVersions",schemaPath:"#/properties/preferredVersions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=A===e}else var f=!0;if(f){if(r.features!==void 0){let c=r.features;const A=e;if(e===A)if(c&&typeof c=="object"&&!Array.isArray(c)){const T=e;for(const P in c)if(P!=="networking")return B.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"}],!1;if(T===e&&c.networking!==void 0&&typeof c.networking!="boolean")return B.errors=[{instancePath:t+"/features/networking",schemaPath:"#/properties/features/properties/networking/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"}],!1}else return B.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=A===e}else var f=!0;if(f){if(r.extraLibraries!==void 0){let c=r.extraLibraries;const A=e;if(e===A)if(Array.isArray(c)){var k=!0;const T=c.length;for(let P=0;P<T;P++){let y=c[P];const g=e;if(typeof y!="string")return B.errors=[{instancePath:t+"/extraLibraries/"+P,schemaPath:"#/definitions/ExtraLibrary/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(y!=="wp-cli")return B.errors=[{instancePath:t+"/extraLibraries/"+P,schemaPath:"#/definitions/ExtraLibrary/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var k=g===e;if(!k)break}}else return B.errors=[{instancePath:t+"/extraLibraries",schemaPath:"#/properties/extraLibraries/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var f=A===e}else var f=!0;if(f){if(r.constants!==void 0){let c=r.constants;const A=e;if(e===A)if(c&&typeof c=="object"&&!Array.isArray(c))for(const T in c){const P=e;if(typeof c[T]!="string")return B.errors=[{instancePath:t+"/constants/"+T.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/constants/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var x=P===e;if(!x)break}else return B.errors=[{instancePath:t+"/constants",schemaPath:"#/properties/constants/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=A===e}else var f=!0;if(f){if(r.plugins!==void 0){let c=r.plugins;const A=e;if(e===A)if(Array.isArray(c)){var D=!0;const T=c.length;for(let P=0;P<T;P++){let y=c[P];const g=e,w=e;let O=!1;const N=e;if(typeof y!="string"){const W={instancePath:t+"/plugins/"+P,schemaPath:"#/properties/plugins/items/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[W]:i.push(W),e++}var v=N===e;if(O=O||v,!O){const W=e;re(y,{instancePath:t+"/plugins/"+P,parentData:c,parentDataProperty:P,rootData:l})||(i=i===null?re.errors:i.concat(re.errors),e=i.length);var v=W===e;O=O||v}if(O)e=w,i!==null&&(w?i.length=w:i=null);else{const W={instancePath:t+"/plugins/"+P,schemaPath:"#/properties/plugins/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[W]:i.push(W),e++,B.errors=i,!1}var D=g===e;if(!D)break}}else return B.errors=[{instancePath:t+"/plugins",schemaPath:"#/properties/plugins/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var f=A===e}else var f=!0;if(f){if(r.siteOptions!==void 0){let c=r.siteOptions;const A=e;if(e===A)if(c&&typeof c=="object"&&!Array.isArray(c)){const T=e;for(const P in c)if(P!=="blogname"){const y=e;if(typeof c[P]!="string")return B.errors=[{instancePath:t+"/siteOptions/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/siteOptions/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var U=y===e;if(!U)break}if(T===e&&c.blogname!==void 0&&typeof c.blogname!="string")return B.errors=[{instancePath:t+"/siteOptions/blogname",schemaPath:"#/properties/siteOptions/properties/blogname/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1}else return B.errors=[{instancePath:t+"/siteOptions",schemaPath:"#/properties/siteOptions/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var f=A===e}else var f=!0;if(f){if(r.login!==void 0){let c=r.login;const A=e,$=e;let T=!1;const P=e;if(typeof c!="boolean"){const g={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/0/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};i===null?i=[g]:i.push(g),e++}var te=P===e;if(T=T||te,!T){const g=e;if(e===g)if(c&&typeof c=="object"&&!Array.isArray(c)){let O;if(c.username===void 0&&(O="username")||c.password===void 0&&(O="password")){const N={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/required",keyword:"required",params:{missingProperty:O},message:"must have required property '"+O+"'"};i===null?i=[N]:i.push(N),e++}else{const N=e;for(const q in c)if(!(q==="username"||q==="password")){const W={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:q},message:"must NOT have additional properties"};i===null?i=[W]:i.push(W),e++;break}if(N===e){if(c.username!==void 0){const q=e;if(typeof c.username!="string"){const W={instancePath:t+"/login/username",schemaPath:"#/properties/login/anyOf/1/properties/username/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[W]:i.push(W),e++}var H=q===e}else var H=!0;if(H)if(c.password!==void 0){const q=e;if(typeof c.password!="string"){const R={instancePath:t+"/login/password",schemaPath:"#/properties/login/anyOf/1/properties/password/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[R]:i.push(R),e++}var H=q===e}else var H=!0}}}else{const O={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[O]:i.push(O),e++}var te=g===e;T=T||te}if(T)e=$,i!==null&&($?i.length=$:i=null);else{const g={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[g]:i.push(g),e++,B.errors=i,!1}var f=A===e}else var f=!0;if(f){if(r.phpExtensionBundles!==void 0){let c=r.phpExtensionBundles;const A=e;if(e===A)if(Array.isArray(c)){var E=!0;const T=c.length;for(let P=0;P<T;P++){let y=c[P];const g=e;if(typeof y!="string")return B.errors=[{instancePath:t+"/phpExtensionBundles/"+P,schemaPath:"#/definitions/SupportedPHPExtensionBundle/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!(y==="kitchen-sink"||y==="light"))return B.errors=[{instancePath:t+"/phpExtensionBundles/"+P,schemaPath:"#/definitions/SupportedPHPExtensionBundle/enum",keyword:"enum",params:{allowedValues:Cs.enum},message:"must be equal to one of the allowed values"}],!1;var E=g===e;if(!E)break}}else return B.errors=[{instancePath:t+"/phpExtensionBundles",schemaPath:"#/properties/phpExtensionBundles/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var f=A===e}else var f=!0;if(f){if(r.steps!==void 0){let c=r.steps;const A=e;if(e===A)if(Array.isArray(c)){var L=!0;const T=c.length;for(let P=0;P<T;P++){let y=c[P];const g=e,w=e;let O=!1;const N=e;o(y,{instancePath:t+"/steps/"+P,parentData:c,parentDataProperty:P,rootData:l})||(i=i===null?o.errors:i.concat(o.errors),e=i.length);var I=N===e;if(O=O||I,!O){const W=e;if(typeof y!="string"){const V={instancePath:t+"/steps/"+P,schemaPath:"#/properties/steps/items/anyOf/1/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[V]:i.push(V),e++}var I=W===e;if(O=O||I,!O){const V=e,ee={instancePath:t+"/steps/"+P,schemaPath:"#/properties/steps/items/anyOf/2/not",keyword:"not",params:{},message:"must NOT be valid"};i===null?i=[ee]:i.push(ee),e++;var I=V===e;if(O=O||I,!O){const C=e;if(typeof y!="boolean"){const M={instancePath:t+"/steps/"+P,schemaPath:"#/properties/steps/items/anyOf/3/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};i===null?i=[M]:i.push(M),e++}if(y!==!1){const M={instancePath:t+"/steps/"+P,schemaPath:"#/properties/steps/items/anyOf/3/const",keyword:"const",params:{allowedValue:!1},message:"must be equal to constant"};i===null?i=[M]:i.push(M),e++}var I=C===e;if(O=O||I,!O){const M=e;if(y!==null){const K={instancePath:t+"/steps/"+P,schemaPath:"#/properties/steps/items/anyOf/4/type",keyword:"type",params:{type:"null"},message:"must be null"};i===null?i=[K]:i.push(K),e++}var I=M===e;O=O||I}}}}if(O)e=w,i!==null&&(w?i.length=w:i=null);else{const W={instancePath:t+"/steps/"+P,schemaPath:"#/properties/steps/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[W]:i.push(W),e++,B.errors=i,!1}var L=g===e;if(!L)break}}else return B.errors=[{instancePath:t+"/steps",schemaPath:"#/properties/steps/type",keyword:"type",params:{type:"array"},message:"must be array"}],!1;var f=A===e}else var f=!0;if(f)if(r.$schema!==void 0){const c=e;if(typeof r.$schema!="string")return B.errors=[{instancePath:t+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var f=c===e}else var f=!0}}}}}}}}}}}}}else return B.errors=[{instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;return B.errors=i,e===0}function tr(r,{instancePath:t="",parentData:n,parentDataProperty:p,rootData:l=r}={}){let i=null,e=0;return B(r,{instancePath:t,parentData:n,parentDataProperty:p,rootData:l})||(i=i===null?B.errors:i.concat(B.errors),e=i.length),tr.errors=i,e===0}const{wpCLI:Ws,...Yr}=hs,Ds={...Yr,"wp-cli":Ws,importFile:Yr.importWxr};function Nt(r,{progress:t=new yr,semaphore:n=new Zt({concurrency:3}),onStepCompleted:p=()=>{}}={}){var m,k,x,D,v,U,te,H,E;r={...r,steps:(r.steps||[]).filter(zs).filter(Vs)};for(const L of r.steps)typeof L=="object"&&L.step==="importFile"&&(L.step="importWxr",ae.warn('The "importFile" step is deprecated. Use "importWxr" instead.'));if(r.constants&&r.steps.unshift({step:"defineWpConfigConsts",consts:r.constants}),r.siteOptions&&r.steps.unshift({step:"setSiteOptions",options:r.siteOptions}),r.plugins){const L=r.plugins.map(I=>typeof I=="string"?I.startsWith("https://")?{resource:"url",url:I}:{resource:"wordpress.org/plugins",slug:I}:I).map(I=>({step:"installPlugin",pluginZipFile:I}));r.steps.unshift(...L)}r.login&&r.steps.push({step:"login",...r.login===!0?{username:"admin",password:"password"}:r.login}),r.phpExtensionBundles||(r.phpExtensionBundles=[]),r.phpExtensionBundles||(r.phpExtensionBundles=[]),r.phpExtensionBundles.length===0&&r.phpExtensionBundles.push("kitchen-sink");const l=((m=r.steps)==null?void 0:m.findIndex(L=>typeof L=="object"&&(L==null?void 0:L.step)==="wp-cli"))??-1;if((k=r==null?void 0:r.extraLibraries)!=null&&k.includes("wp-cli")||l>-1){r.phpExtensionBundles.includes("light")&&(r.phpExtensionBundles=r.phpExtensionBundles.filter(I=>I!=="light"),ae.warn("WP-CLI is used in your Blueprint, and it requires the iconv and mbstring PHP extensions. However, you did not specify the kitchen-sink extension bundle. Playground will override your choice and load the kitchen-sink PHP extensions bundle to prevent the WP-CLI step from failing. "));const L={step:"writeFile",data:{resource:"url",url:"https://playground.wordpress.net/wp-cli.phar"},path:"/tmp/wp-cli.phar"};l===-1?(x=r.steps)==null||x.push(L):(D=r.steps)==null||D.splice(l,0,L)}const i=(v=r.steps)==null?void 0:v.findIndex(L=>typeof L=="object"&&(L==null?void 0:L.step)==="importWxr");i!==void 0&&i>-1&&(r.phpExtensionBundles.includes("light")&&(r.phpExtensionBundles=r.phpExtensionBundles.filter(L=>L!=="light"),ae.warn("The importWxr step used in your Blueprint requires the iconv and mbstring PHP extensions. However, you did not specify the kitchen-sink extension bundle. Playground will override your choice and load the kitchen-sink PHP extensions bundle to prevent the WP-CLI step from failing. ")),(U=r.steps)==null||U.splice(i,0,{step:"installPlugin",pluginZipFile:{resource:"url",url:"https://playground.wordpress.net/wordpress-importer.zip",caption:"Downloading the WordPress Importer plugin"}}));const{valid:e,errors:f}=Ms(r);if(!e){const L=new Error(`Invalid blueprint: ${f[0].message} at ${f[0].instancePath}`);throw L.errors=f,L}const h=r.steps||[],b=h.reduce((L,I)=>{var z;return L+(((z=I.progress)==null?void 0:z.weight)||1)},0),_=h.map(L=>Hs(L,{semaphore:n,rootProgressTracker:t,totalProgressWeight:b}));return{versions:{php:Bs((te=r.preferredVersions)==null?void 0:te.php,hr,At),wp:((H=r.preferredVersions)==null?void 0:H.wp)||"latest"},phpExtensions:Us([],r.phpExtensionBundles||[]),features:{networking:((E=r.features)==null?void 0:E.networking)??!1},extraLibraries:r.extraLibraries||[],run:async L=>{try{for(const{resources:I}of _)for(const z of I)z.setPlayground(L),z.isAsync&&z.resolve();for(const[I,{run:z,step:c}]of Object.entries(_))try{const A=await z(L);p(A,c)}catch(A){throw ae.error(A),new Error(`Error when executing the blueprint step #${I} (${JSON.stringify(c)}) ${A instanceof Error?`: ${A.message}`:A}`,{cause:A})}}finally{try{await L.goTo(r.landingPage||"/")}catch{}t.finish()}}}}function Ms(r){var l;const t=tr(r);if(t)return{valid:t};const n=new Set;for(const i of tr.errors)i.schemaPath.startsWith("#/properties/steps/items/anyOf")||n.add(i.instancePath);const p=(l=tr.errors)==null?void 0:l.filter(i=>!(i.schemaPath.startsWith("#/properties/steps/items/anyOf")&&n.has(i.instancePath)));return{valid:t,errors:p}}function Bs(r,t,n){return r&&t.includes(r)?r:n}function Us(r,t){const n=qt.filter(l=>r.includes(l)),p=t.flatMap(l=>l in Gr?Gr[l]:[]);return Array.from(new Set([...n,...p]))}function zs(r){return!!(typeof r=="object"&&r)}function Vs(r){return["setPhpIniEntry","request"].includes(r.step)?(ae.warn(`The "${r.step}" Blueprint is no longer supported and you can remove it from your Blueprint.`),!1):!0}function Hs(r,{semaphore:t,rootProgressTracker:n,totalProgressWeight:p}){var _;const l=n.stage((((_=r.progress)==null?void 0:_.weight)||1)/p),i={};for(const m of Object.keys(r)){let k=r[m];$s(k)&&(k=Se.create(k,{semaphore:t})),i[m]=k}const e=async m=>{var k;try{return l.fillSlowly(),await Ds[r.step](m,await Gs(i),{tracker:l,initialCaption:(k=r.progress)==null?void 0:k.caption})}finally{l.finish()}},f=Zr(i),h=Zr(i).filter(m=>m.isAsync),b=1/(h.length+1);for(const m of h)m.progress=l.stage(b);return{run:e,step:r,resources:f}}function Zr(r){const t=[];for(const n in r){const p=r[n];p instanceof Se&&t.push(p)}return t}async function Gs(r){const t={};for(const n in r){const p=r[n];p instanceof Se?t[n]=await p.resolve():t[n]=p}return t}async function Ft(r,t){await r.run(t)}function Ys(){}/**
731
738
  * @license
732
739
  * Copyright 2019 Google LLC
733
740
  * SPDX-License-Identifier: Apache-2.0
734
- */const It=Symbol("Comlink.proxy"),Qs=Symbol("Comlink.endpoint"),Js=Symbol("Comlink.releaseProxy"),Or=Symbol("Comlink.finalizer"),sr=Symbol("Comlink.thrown"),Wt=r=>typeof r=="object"&&r!==null||typeof r=="function",Ks={canHandle:r=>Wt(r)&&r[It],serialize(r){const{port1:t,port2:n}=new MessageChannel;return Ir(r,t),[n,[n]]},deserialize(r){return r.start(),Wr(r)}},Xs={canHandle:r=>Wt(r)&&sr in r,serialize({value:r}){let t;return r instanceof Error?t={isError:!0,value:{message:r.message,name:r.name,stack:r.stack}}:t={isError:!1,value:r},[t,[]]},deserialize(r){throw r.isError?Object.assign(new Error(r.value.message),r.value):r.value}},xe=new Map([["proxy",Ks],["throw",Xs]]);function ei(r,t){for(const n of r)if(t===n||n==="*"||n instanceof RegExp&&n.test(t))return!0;return!1}function Ir(r,t=globalThis,n=["*"]){t.addEventListener("message",function p(l){if(!l||!l.data)return;if(!ei(n,l.origin)){console.warn(`Invalid origin '${l.origin}' for comlink proxy`);return}const{id:i,type:e,path:u}=Object.assign({path:[]},l.data),h=(l.data.argumentList||[]).map(Re);let b;try{const k=u.slice(0,-1).reduce((E,S)=>E[S],r),y=u.reduce((E,S)=>E[S],r);switch(e){case"GET":b=y;break;case"SET":k[u.slice(-1)[0]]=Re(l.data.value),b=!0;break;case"APPLY":b=y.apply(k,h);break;case"CONSTRUCT":{const E=new y(...h);b=Ut(E)}break;case"ENDPOINT":{const{port1:E,port2:S}=new MessageChannel;Ir(r,S),b=ni(E,[E])}break;case"RELEASE":b=void 0;break;default:return}}catch(k){b={value:k,[sr]:0}}Promise.resolve(b).catch(k=>({value:k,[sr]:0})).then(k=>{const[y,E]=ur(k);t.postMessage(Object.assign(Object.assign({},y),{id:i}),E),e==="RELEASE"&&(t.removeEventListener("message",p),Dt(t),Or in r&&typeof r[Or]=="function"&&r[Or]())}).catch(k=>{const[y,E]=ur({value:new TypeError("Unserializable return value"),[sr]:0});t.postMessage(Object.assign(Object.assign({},y),{id:i}),E)})}),t.start&&t.start()}function ri(r){return r.constructor.name==="MessagePort"}function Dt(r){ri(r)&&r.close()}function Wr(r,t){return Ar(r,[],t)}function er(r){if(r)throw new Error("Proxy has been released and is not useable")}function Mt(r){return Le(r,{type:"RELEASE"}).then(()=>{Dt(r)})}const lr=new WeakMap,fr="FinalizationRegistry"in globalThis&&new FinalizationRegistry(r=>{const t=(lr.get(r)||0)-1;lr.set(r,t),t===0&&Mt(r)});function ti(r,t){const n=(lr.get(t)||0)+1;lr.set(t,n),fr&&fr.register(r,t,r)}function si(r){fr&&fr.unregister(r)}function Ar(r,t=[],n=function(){}){let p=!1;const l=new Proxy(n,{get(i,e){if(er(p),e===Js)return()=>{si(l),Mt(r),p=!0};if(e==="then"){if(t.length===0)return{then:()=>l};const u=Le(r,{type:"GET",path:t.map(h=>h.toString())}).then(Re);return u.then.bind(u)}return Ar(r,[...t,e])},set(i,e,u){er(p);const[h,b]=ur(u);return Le(r,{type:"SET",path:[...t,e].map(k=>k.toString()),value:h},b).then(Re)},apply(i,e,u){er(p);const h=t[t.length-1];if(h===Qs)return Le(r,{type:"ENDPOINT"}).then(Re);if(h==="bind")return Ar(r,t.slice(0,-1));const[b,k]=Jr(u);return Le(r,{type:"APPLY",path:t.map(y=>y.toString()),argumentList:b},k).then(Re)},construct(i,e){er(p);const[u,h]=Jr(e);return Le(r,{type:"CONSTRUCT",path:t.map(b=>b.toString()),argumentList:u},h).then(Re)}});return ti(l,r),l}function ii(r){return Array.prototype.concat.apply([],r)}function Jr(r){const t=r.map(ur);return[t.map(n=>n[0]),ii(t.map(n=>n[1]))]}const Bt=new WeakMap;function ni(r,t){return Bt.set(r,t),r}function Ut(r){return Object.assign(r,{[It]:!0})}function oi(r,t=globalThis,n="*"){return{postMessage:(p,l)=>r.postMessage(p,n,l),addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}function ur(r){for(const[t,n]of xe)if(n.canHandle(r)){const[p,l]=n.serialize(r);return[{type:"HANDLER",name:t,value:p},l]}return[{type:"RAW",value:r},Bt.get(r)||[]]}function Re(r){switch(r.type){case"HANDLER":return xe.get(r.name).deserialize(r.value);case"RAW":return r.value}}function Le(r,t,n){return new Promise(p=>{const l=ai();r.addEventListener("message",function i(e){!e.data||!e.data.id||e.data.id!==l||(r.removeEventListener("message",i),p(e.data))}),r.start&&r.start(),r.postMessage(Object.assign({id:l},t),n)})}function ai(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}function zt(r,t=void 0){li();const n=r instanceof Worker?r:oi(r,t),p=Wr(n),l=Vt(p);return new Proxy(l,{get:(i,e)=>e==="isConnected"?async()=>{for(;;)try{await pi(p.isConnected(),200);break}catch{}}:p[e]})}async function pi(r,t){return new Promise((n,p)=>{setTimeout(p,t),r.then(n)})}let Kr=!1;function li(){if(Kr)return;Kr=!0,xe.set("EVENT",{canHandle:n=>n instanceof CustomEvent,serialize:n=>[{detail:n.detail},[]],deserialize:n=>n}),xe.set("FUNCTION",{canHandle:n=>typeof n=="function",serialize(n){const{port1:p,port2:l}=new MessageChannel;return Ir(n,p),[l,[l]]},deserialize(n){return n.start(),Wr(n)}}),xe.set("PHPResponse",{canHandle:n=>typeof n=="object"&&n!==null&&"headers"in n&&"bytes"in n&&"errors"in n&&"exitCode"in n&&"httpStatusCode"in n,serialize(n){return[n.toRawData(),[]]},deserialize(n){return pr.fromRawData(n)}});const r=xe.get("throw"),t=r==null?void 0:r.serialize;r.serialize=({value:n})=>{const p=t({value:n});return n.response&&(p[0].value.response=n.response),n.source&&(p[0].value.source=n.source),p}}function Vt(r){return new Proxy(r,{get(t,n){switch(typeof t[n]){case"function":return(...p)=>t[n](...p);case"object":return t[n]===null?t[n]:Vt(t[n]);case"undefined":case"number":case"string":return t[n];default:return Ut(t[n])}}})}new Promise(r=>{});async function Ht({iframe:r,blueprint:t,remoteUrl:n,progressTracker:p=new yr,disableProgressBar:l,onBlueprintStepCompleted:i,onClientConnected:e=()=>{},sapiName:u,onBeforeBlueprint:h,siteSlug:b}){if(ui(n),fi(r),n=Er(n,{progressbar:!l}),p.setCaption("Preparing WordPress"),!t){const E=await Xr(r,Er(n,{"php-extension":"kitchen-sink","site-slug":b}),p);return e(E),E}const k=Ft(t,{progress:p.stage(.5),onStepCompleted:i}),y=await Xr(r,Er(n,{php:k.versions.php,wp:k.versions.wp,"sapi-name":u,"php-extension":k.phpExtensions,networking:k.features.networking?"yes":"no","site-slug":b}),p);return ps(ae,y),e(y),h&&await h(),await Ct(k,y),p.finish(),y}function fi(r){var t,n;(t=r.sandbox)!=null&&t.length&&!((n=r.sandbox)!=null&&n.contains("allow-storage-access-by-user-activation"))&&r.sandbox.add("allow-storage-access-by-user-activation")}async function Xr(r,t,n){await new Promise(i=>{r.src=t,r.addEventListener("load",i,!1)});const p=zt(r.contentWindow,r.ownerDocument.defaultView);await p.isConnected(),n.pipe(p);const l=n.stage();return await p.onDownloadProgress(l.loadingListener),await p.isReady(),l.finish(),p}const ir="https://playground.wordpress.net";function ui(r){const t=new URL(r,ir);if((t.origin===ir||t.hostname==="localhost")&&t.pathname!=="/remote.html")throw new Error(`Invalid remote URL: ${t}. Expected origin to be ${ir}/remote.html.`)}function Er(r,t){const n=new URL(r,ir),p=new URLSearchParams(n.search);for(const[l,i]of Object.entries(t))if(i!=null&&i!==!1)if(Array.isArray(i))for(const e of i)p.append(l,e.toString());else p.set(l,i.toString());return n.search=p.toString(),n.toString()}async function di(r,t){if(ae.warn("`connectPlayground` is deprecated and will be removed. Use `startPlayground` instead."),t!=null&&t.loadRemote)return Ht({iframe:r,remoteUrl:t.loadRemote});const n=zt(r.contentWindow,r.ownerDocument.defaultView);return await n.isConnected(),n}exports.LatestSupportedPHPVersion=qt;exports.SupportedPHPVersions=hr;exports.SupportedPHPVersionsList=Es;exports.activatePlugin=dr;exports.activateTheme=Rr;exports.compileBlueprint=Ft;exports.connectPlayground=di;exports.cp=dt;exports.defineSiteUrl=Nr;exports.defineWpConfigConsts=Ie;exports.enableMultisite=ut;exports.exportWXR=wt;exports.importThemeStarterContent=Fr;exports.importWordPressFiles=bt;exports.importWxr=ht;exports.installPlugin=Pt;exports.installTheme=_t;exports.login=or;exports.mkdir=mt;exports.mv=ct;exports.phpVar=se;exports.phpVars=We;exports.request=nr;exports.resetData=kt;exports.rm=Sr;exports.rmdir=yt;exports.runBlueprintSteps=Ct;exports.runPHP=ot;exports.runPHPWithOptions=at;exports.runSql=pt;exports.runWpInstallationWizard=Ot;exports.setPhpIniEntries=Os;exports.setPluginProxyURL=Zs;exports.setSiteLanguage=Tt;exports.setSiteOptions=Lr;exports.startPlaygroundWeb=Ht;exports.unzip=cr;exports.updateUserMeta=lt;exports.wpCLI=$t;exports.wpContentFilesExcludedFromExport=qr;exports.writeFile=xr;exports.zipWpContent=Et;
741
+ */const Ct=Symbol("Comlink.proxy"),Zs=Symbol("Comlink.endpoint"),Qs=Symbol("Comlink.releaseProxy"),Or=Symbol("Comlink.finalizer"),sr=Symbol("Comlink.thrown"),It=r=>typeof r=="object"&&r!==null||typeof r=="function",Js={canHandle:r=>It(r)&&r[Ct],serialize(r){const{port1:t,port2:n}=new MessageChannel;return Cr(r,t),[n,[n]]},deserialize(r){return r.start(),Ir(r)}},Ks={canHandle:r=>It(r)&&sr in r,serialize({value:r}){let t;return r instanceof Error?t={isError:!0,value:{message:r.message,name:r.name,stack:r.stack}}:t={isError:!1,value:r},[t,[]]},deserialize(r){throw r.isError?Object.assign(new Error(r.value.message),r.value):r.value}},xe=new Map([["proxy",Js],["throw",Ks]]);function Xs(r,t){for(const n of r)if(t===n||n==="*"||n instanceof RegExp&&n.test(t))return!0;return!1}function Cr(r,t=globalThis,n=["*"]){t.addEventListener("message",function p(l){if(!l||!l.data)return;if(!Xs(n,l.origin)){console.warn(`Invalid origin '${l.origin}' for comlink proxy`);return}const{id:i,type:e,path:f}=Object.assign({path:[]},l.data),h=(l.data.argumentList||[]).map(Re);let b;try{const _=f.slice(0,-1).reduce((k,x)=>k[x],r),m=f.reduce((k,x)=>k[x],r);switch(e){case"GET":b=m;break;case"SET":_[f.slice(-1)[0]]=Re(l.data.value),b=!0;break;case"APPLY":b=m.apply(_,h);break;case"CONSTRUCT":{const k=new m(...h);b=Bt(k)}break;case"ENDPOINT":{const{port1:k,port2:x}=new MessageChannel;Cr(r,x),b=ii(k,[k])}break;case"RELEASE":b=void 0;break;default:return}}catch(_){b={value:_,[sr]:0}}Promise.resolve(b).catch(_=>({value:_,[sr]:0})).then(_=>{const[m,k]=ur(_);t.postMessage(Object.assign(Object.assign({},m),{id:i}),k),e==="RELEASE"&&(t.removeEventListener("message",p),Wt(t),Or in r&&typeof r[Or]=="function"&&r[Or]())}).catch(_=>{const[m,k]=ur({value:new TypeError("Unserializable return value"),[sr]:0});t.postMessage(Object.assign(Object.assign({},m),{id:i}),k)})}),t.start&&t.start()}function ei(r){return r.constructor.name==="MessagePort"}function Wt(r){ei(r)&&r.close()}function Ir(r,t){return jr(r,[],t)}function er(r){if(r)throw new Error("Proxy has been released and is not useable")}function Dt(r){return Le(r,{type:"RELEASE"}).then(()=>{Wt(r)})}const lr=new WeakMap,fr="FinalizationRegistry"in globalThis&&new FinalizationRegistry(r=>{const t=(lr.get(r)||0)-1;lr.set(r,t),t===0&&Dt(r)});function ri(r,t){const n=(lr.get(t)||0)+1;lr.set(t,n),fr&&fr.register(r,t,r)}function ti(r){fr&&fr.unregister(r)}function jr(r,t=[],n=function(){}){let p=!1;const l=new Proxy(n,{get(i,e){if(er(p),e===Qs)return()=>{ti(l),Dt(r),p=!0};if(e==="then"){if(t.length===0)return{then:()=>l};const f=Le(r,{type:"GET",path:t.map(h=>h.toString())}).then(Re);return f.then.bind(f)}return jr(r,[...t,e])},set(i,e,f){er(p);const[h,b]=ur(f);return Le(r,{type:"SET",path:[...t,e].map(_=>_.toString()),value:h},b).then(Re)},apply(i,e,f){er(p);const h=t[t.length-1];if(h===Zs)return Le(r,{type:"ENDPOINT"}).then(Re);if(h==="bind")return jr(r,t.slice(0,-1));const[b,_]=Qr(f);return Le(r,{type:"APPLY",path:t.map(m=>m.toString()),argumentList:b},_).then(Re)},construct(i,e){er(p);const[f,h]=Qr(e);return Le(r,{type:"CONSTRUCT",path:t.map(b=>b.toString()),argumentList:f},h).then(Re)}});return ri(l,r),l}function si(r){return Array.prototype.concat.apply([],r)}function Qr(r){const t=r.map(ur);return[t.map(n=>n[0]),si(t.map(n=>n[1]))]}const Mt=new WeakMap;function ii(r,t){return Mt.set(r,t),r}function Bt(r){return Object.assign(r,{[Ct]:!0})}function ni(r,t=globalThis,n="*"){return{postMessage:(p,l)=>r.postMessage(p,n,l),addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}function ur(r){for(const[t,n]of xe)if(n.canHandle(r)){const[p,l]=n.serialize(r);return[{type:"HANDLER",name:t,value:p},l]}return[{type:"RAW",value:r},Mt.get(r)||[]]}function Re(r){switch(r.type){case"HANDLER":return xe.get(r.name).deserialize(r.value);case"RAW":return r.value}}function Le(r,t,n){return new Promise(p=>{const l=oi();r.addEventListener("message",function i(e){!e.data||!e.data.id||e.data.id!==l||(r.removeEventListener("message",i),p(e.data))}),r.start&&r.start(),r.postMessage(Object.assign({id:l},t),n)})}function oi(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}function Ut(r,t=void 0){pi();const n=r instanceof Worker?r:ni(r,t),p=Ir(n),l=zt(p);return new Proxy(l,{get:(i,e)=>e==="isConnected"?async()=>{for(;;)try{await ai(p.isConnected(),200);break}catch{}}:p[e]})}async function ai(r,t){return new Promise((n,p)=>{setTimeout(p,t),r.then(n)})}let Jr=!1;function pi(){if(Jr)return;Jr=!0,xe.set("EVENT",{canHandle:n=>n instanceof CustomEvent,serialize:n=>[{detail:n.detail},[]],deserialize:n=>n}),xe.set("FUNCTION",{canHandle:n=>typeof n=="function",serialize(n){const{port1:p,port2:l}=new MessageChannel;return Cr(n,p),[l,[l]]},deserialize(n){return n.start(),Ir(n)}}),xe.set("PHPResponse",{canHandle:n=>typeof n=="object"&&n!==null&&"headers"in n&&"bytes"in n&&"errors"in n&&"exitCode"in n&&"httpStatusCode"in n,serialize(n){return[n.toRawData(),[]]},deserialize(n){return pr.fromRawData(n)}});const r=xe.get("throw"),t=r==null?void 0:r.serialize;r.serialize=({value:n})=>{const p=t({value:n});return n.response&&(p[0].value.response=n.response),n.source&&(p[0].value.source=n.source),p}}function zt(r){return new Proxy(r,{get(t,n){switch(typeof t[n]){case"function":return(...p)=>t[n](...p);case"object":return t[n]===null?t[n]:zt(t[n]);case"undefined":case"number":case"string":return t[n];default:return Bt(t[n])}}})}new Promise(r=>{});async function Vt({iframe:r,blueprint:t,remoteUrl:n,progressTracker:p=new yr,disableProgressBar:l,onBlueprintStepCompleted:i,onClientConnected:e=()=>{},sapiName:f,onBeforeBlueprint:h,siteSlug:b}){ui(n),li(r),n=Kr(n,{progressbar:!l}),p.setCaption("Preparing WordPress"),t||(t={phpExtensionBundles:["kitchen-sink"]});const _=Nt(t,{progress:p.stage(.5),onStepCompleted:i}),m=await fi(r,Kr(n,{php:_.versions.php,wp:_.versions.wp,"sapi-name":f,"php-extension":_.phpExtensions,networking:_.features.networking?"yes":"no","site-slug":b}),p);return as(ae,m),e(m),h&&await h(),await Ft(_,m),p.finish(),m}function li(r){var t,n;(t=r.sandbox)!=null&&t.length&&!((n=r.sandbox)!=null&&n.contains("allow-storage-access-by-user-activation"))&&r.sandbox.add("allow-storage-access-by-user-activation")}async function fi(r,t,n){await new Promise(i=>{r.src=t,r.addEventListener("load",i,!1)});const p=Ut(r.contentWindow,r.ownerDocument.defaultView);await p.isConnected(),n.pipe(p);const l=n.stage();return await p.onDownloadProgress(l.loadingListener),await p.isReady(),l.finish(),p}const ir="https://playground.wordpress.net";function ui(r){const t=new URL(r,ir);if((t.origin===ir||t.hostname==="localhost")&&t.pathname!=="/remote.html")throw new Error(`Invalid remote URL: ${t}. Expected origin to be ${ir}/remote.html.`)}function Kr(r,t){const n=new URL(r,ir),p=new URLSearchParams(n.search);for(const[l,i]of Object.entries(t))if(i!=null&&i!==!1)if(Array.isArray(i))for(const e of i)p.append(l,e.toString());else p.set(l,i.toString());return n.search=p.toString(),n.toString()}async function di(r,t){if(ae.warn("`connectPlayground` is deprecated and will be removed. Use `startPlayground` instead."),t!=null&&t.loadRemote)return Vt({iframe:r,remoteUrl:t.loadRemote});const n=Ut(r.contentWindow,r.ownerDocument.defaultView);return await n.isConnected(),n}exports.LatestSupportedPHPVersion=At;exports.SupportedPHPVersions=hr;exports.SupportedPHPVersionsList=Os;exports.activatePlugin=dr;exports.activateTheme=qr;exports.compileBlueprint=Nt;exports.connectPlayground=di;exports.cp=ut;exports.defineSiteUrl=xr;exports.defineWpConfigConsts=Ie;exports.enableMultisite=ft;exports.exportWXR=bt;exports.importThemeStarterContent=Nr;exports.importWordPressFiles=gt;exports.importWxr=yt;exports.installPlugin=vt;exports.installTheme=Pt;exports.login=or;exports.mkdir=ct;exports.mv=dt;exports.phpVar=se;exports.phpVars=We;exports.request=nr;exports.resetData=_t;exports.rm=Rr;exports.rmdir=mt;exports.runBlueprintSteps=Ft;exports.runPHP=nt;exports.runPHPWithOptions=ot;exports.runSql=at;exports.runWpInstallationWizard=kt;exports.setPhpIniEntries=ks;exports.setPluginProxyURL=Ys;exports.setSiteLanguage=$t;exports.setSiteOptions=Sr;exports.startPlaygroundWeb=Vt;exports.unzip=cr;exports.updateUserMeta=pt;exports.wpCLI=Et;exports.wpContentFilesExcludedFromExport=Ar;exports.writeFile=Lr;exports.zipWpContent=Ot;