@wp-playground/client 0.9.30 → 0.9.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +25 -25
- package/index.d.ts +5 -15
- package/index.js +1389 -1409
- package/package.json +9 -8
package/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
`):JSON.stringify(r,null,2),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Kr=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(Kr==="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(Kr==="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"],Xr=Symbol("SleepFinished");function zt(r){return new Promise(t=>{setTimeout(()=>t(Xr),r)})}class Vt extends Error{constructor(){super("Acquiring lock timed out")}}class Ht{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,zt(this.timeout)]).then(n=>{if(n===Xr)throw new Vt}):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=rt(n),!n&&!p&&(n="."),n&&l&&!t(n)&&(n+="/"),n}function et(r){if(r==="/")return"/";r=rt(r);const t=r.lastIndexOf("/");return t===-1?"":t===0?"/":r.substr(0,t)}function rt(r){const t=r[0]==="/";return r=Gt(r.split("/").filter(n=>!!n),!t).join("/"),(t?"/":"")+r.replace(/\/$/,"")}function Gt(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 tt(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 Yt(){return tt(36,"-_")}function se(r){return`json_decode(base64_decode('${Zt(JSON.stringify(r))}'), true)`}function We(r){const t={};for(const n in r)t[n]=se(r[n]);return t}function Zt(r){return Qt(new TextEncoder().encode(r))}function Qt(r){const t=String.fromCodePoint(...r);return btoa(t)}const Jt="playground-log",Dr=(r,...t)=>{ae.dispatchEvent(new CustomEvent(Jt,{detail:{log:r,args:t}}))},Kt=(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)}},Xt=r=>r instanceof Error?[r.message,r.stack].join(`
|
|
2
|
+
`):JSON.stringify(r,null,2),st=[],Mr=r=>{st.push(r)},Er=r=>{if(r.raw===!0)Mr(r.message);else{const t=ts(typeof r.message=="object"?Xt(r.message):r.message,r.severity??"Info",r.prefix??"JavaScript");Mr(t)}};class es extends EventTarget{constructor(t=[]){super(),this.handlers=t,this.fatalErrorEvent="playground-fatal-error"}getLogs(){return this.handlers.includes(Er)?[...st]:(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
|
|
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 rs=()=>{try{if(process.env.NODE_ENV==="test")return[Er,Dr]}catch{}return[Er,Kt,Dr]},ae=new es(rs()),$r=r=>r.replace(/\t/g,""),ts=(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",ss=async r=>await r.fileExists(Br)?await r.readFileAsText(Br):"",is=(r,t)=>{t.addEventListener("request.end",async()=>{const n=await ss(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" );
|
|
@@ -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`)},
|
|
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`)},it=async(r,{code:t})=>await r.run({code:t}),nt=async(r,{options:t})=>await r.run(t),Rr=async(r,{path:t})=>{await r.unlink(t)},ot=async(r,{sql:t},n)=>{n==null||n.tracker.setCaption("Executing SQL Queries");const p=`/tmp/${Yt()}.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 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},
|
|
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},ns=`<?php
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* Rewrites the wp-config.php file to ensure specific constants are defined
|
|
@@ -402,7 +402,7 @@ 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
|
|
405
|
+
`,Ie=async(r,{consts:t,method:n="define-before-run"})=>{switch(n){case"define-before-run":await os(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 as(r,i,t);await r.writeFile(l,e);break}default:throw new Error(`Invalid method: ${n}`)}};async function os(r,t){for(const n in t)await r.defineConstant(n,t[n])}async function as(r,t,n){await r.writeFile("/tmp/code.php",t);const p=We({consts:n});return await r.run({code:`${ns}
|
|
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});
|
|
@@ -414,13 +414,13 @@ function skip_whitespace($tokens) {
|
|
|
414
414
|
update_option($name, $value);
|
|
415
415
|
}
|
|
416
416
|
echo "Success";
|
|
417
|
-
`})},
|
|
417
|
+
`})},at=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
|
|
423
|
+
`})};function pt(r){return r.pathname.startsWith("/scope:")}function ps(r){return pt(r)?r.pathname.split("/")[1].split(":")[1]:null}const lt=async r=>{var w;await Ie(r,{consts:{WP_ALLOW_MULTISITE:1}});const t=new URL(await r.absoluteUrl);if(t.port!==""){let L=`The current host is ${t.host}, but WordPress multisites do not support custom ports.`;throw t.hostname==="localhost"&&(L+=" For development, you can set up a playground.test domain using the instructions at https://wordpress.github.io/wordpress-playground/contributing/code."),new Error(L)}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,8 +452,8 @@ foreach($plugins as $plugin_path) {
|
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
454
|
echo json_encode($deactivated_plugins);
|
|
455
|
-
`})).json,h=(
|
|
456
|
-
$_SERVER['HTTP_HOST'] = ${se(
|
|
455
|
+
`})).json,h=(w=(await nr(r,{request:{url:"/wp-admin/network.php"}})).text.match(/name="_wpnonce"\s+value="([^"]+)"/))==null?void 0:w[1],b=await nr(r,{request:{url:"/wp-admin/network.php",method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:ls({_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),m=pt(k)?"scope:"+ps(k):null;await r.writeFile("/internal/shared/preload/sunrise.php",`<?php
|
|
456
|
+
$_SERVER['HTTP_HOST'] = ${se(k.hostname)};
|
|
457
457
|
$folder = ${se(m)};
|
|
458
458
|
if ($folder && strpos($_SERVER['REQUEST_URI'],"/$folder") === false) {
|
|
459
459
|
$_SERVER['REQUEST_URI'] = "/$folder/" . ltrim($_SERVER['REQUEST_URI'], '/');
|
|
@@ -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
|
|
465
|
+
`),await or(r,{});for(const L of e)await dr(r,{pluginPath:L})};function ls(r){return Object.keys(r).map(t=>encodeURIComponent(t)+"="+encodeURIComponent(r[t])).join("&")}const ft=async(r,{fromPath:t,toPath:n})=>{await r.writeFile(n,await r.readFileAsBuffer(t))},ut=async(r,{fromPath:t,toPath:n})=>{await r.mv(t,n)},dt=async(r,{path:t})=>{await r.mkdir(t)},ct=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}})},mt=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
|
|
|
@@ -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",
|
|
532
|
+
`})},vr="/tmp/file.zip",yt=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
|
|
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 yt(r,t||n,p)},ht=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 Ar){const m=ie(i,k);await Ur(r,m);const w=ie(e,k);await r.fileExists(w)&&(await r.mkdir(et(m)),await r.mv(w,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 k of h)await Ur(r,ie(p,k)),await r.mv(ie(l,k),ie(p,k));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 Ur(r,t){await r.fileExists(t)&&(await r.isDir(t)?await r.rmdir(t):await r.unlink(t))}async function
|
|
561
|
+
`})};async function Ur(r,t){await r.fileExists(t)&&(await r.isDir(t)?await r.rmdir(t):await r.unlink(t))}async function gt(r){const t=await r.request({url:"/wp-admin/export.php?download=true&content=all"});return new File([t.bytes],"export.xml")}async function bt(r,{targetPath:t,zipFile:n,ifAlreadyInstalled:p="overwrite"}){const i=n.name.replace(/\.zip$/,""),e=ie(await r.documentRoot,"wp-content"),f=ie(e,tt()),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(W=>!W.endsWith("/__MACOSX"));const k=b.length===1&&await r.isDir(b[0]);let m,w="";k?(w=b[0],m=b[0].split("/").pop()):(w=h,m=i);const L=`${t}/${m}`;if(await r.fileExists(L)){if(!await r.isDir(L))throw new Error(`Cannot install asset ${m} to ${L} 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(L,{recursive:!0});else{if(p==="skip")return{assetFolderPath:L,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(w,L),{assetFolderPath:L,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 wt=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 bt(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)},vt=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 bt(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)},Pt=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
|
-
`})},
|
|
575
|
+
`})},_t=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"}})},kt=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 us(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 f=await r.readFileAsBuffer(n);return r.unlink(n),f},
|
|
579
|
+
));`);const f=await r.readFileAsBuffer(n);return r.unlink(n),f},fs=`<?php
|
|
580
580
|
|
|
581
581
|
function zipDir($root, $output, $options = array())
|
|
582
582
|
{
|
|
@@ -635,14 +635,14 @@ function join_paths()
|
|
|
635
635
|
|
|
636
636
|
return preg_replace('#/+#', '/', join('/', $paths));
|
|
637
637
|
}
|
|
638
|
-
`;async function
|
|
638
|
+
`;async function us(r,t){return await r.run({code:fs+t})}const Ot=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
639
|
You can enable wp-cli support by adding "wp-cli" to the list of extra libraries in your blueprint as follows:
|
|
640
640
|
{
|
|
641
641
|
"extraLibraries": [ "wp-cli" ]
|
|
642
642
|
}
|
|
643
643
|
|
|
644
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=
|
|
645
|
+
https://wordpress.github.io/wordpress-playground/blueprints-api/data-format#extra-libraries`);let p;if(typeof t=="string"?(t=t.trim(),p=ds(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
|
|
646
646
|
// Set up the environment to emulate a shell script
|
|
647
647
|
// call.
|
|
648
648
|
|
|
@@ -664,7 +664,7 @@ function join_paths()
|
|
|
664
664
|
define('STDERR', fopen('php://stderr', 'wb'));
|
|
665
665
|
|
|
666
666
|
require( ${se(n)} );
|
|
667
|
-
`);const i=await r.run({scriptPath:"/wordpress/run-cli.php"});if(i.errors)throw new Error(i.errors);return i};function
|
|
667
|
+
`);const i=await r.run({scriptPath:"/wordpress/run-cli.php"});if(i.errors)throw new Error(i.errors);return i};function ds(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 Et=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
|
|
668
668
|
require '${p}/wp-includes/version.php';
|
|
669
669
|
echo $wp_version;
|
|
670
670
|
`})).text}/${t}.zip`,type:"core"}],f=(await r.run({code:`<?php
|
|
@@ -687,7 +687,7 @@ function join_paths()
|
|
|
687
687
|
)
|
|
688
688
|
)
|
|
689
689
|
)
|
|
690
|
-
);`})).json;for(const{slug:
|
|
690
|
+
);`})).json;for(const{slug:k,version:m}of f)i.push({url:`https://downloads.wordpress.org/translation/plugin/${k}/${m}/${t}.zip`,type:"plugin"});const b=(await r.run({code:`<?php
|
|
691
691
|
require_once('${p}/wp-load.php');
|
|
692
692
|
require_once('${p}/wp-admin/includes/theme.php');
|
|
693
693
|
echo json_encode(
|
|
@@ -702,9 +702,9 @@ function join_paths()
|
|
|
702
702
|
wp_get_themes()
|
|
703
703
|
)
|
|
704
704
|
)
|
|
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
|
|
705
|
+
);`})).json;for(const{slug:k,version:m}of b)i.push({url:`https://downloads.wordpress.org/translation/theme/${k}/${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:k,type:m}of i)try{const w=await fetch(k);if(!w.ok)throw new Error(`Failed to download translations for ${m}: ${w.statusText}`);let L=`${p}/wp-content/languages`;m==="plugin"?L+="/plugins":m==="theme"&&(L+="/themes"),await yt(r,new File([await w.blob()],`${t}-${m}.zip`),L)}catch(w){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}: ${w}`)}},cs=Object.freeze(Object.defineProperty({__proto__:null,activatePlugin:dr,activateTheme:qr,cp:ft,defineSiteUrl:xr,defineWpConfigConsts:Ie,enableMultisite:lt,exportWXR:gt,importThemeStarterContent:Nr,importWordPressFiles:ht,importWxr:mt,installPlugin:wt,installTheme:vt,login:or,mkdir:dt,mv:ut,request:nr,resetData:Pt,rm:Rr,rmdir:ct,runPHP:it,runPHPWithOptions:nt,runSql:ot,runWpInstallationWizard:_t,setSiteLanguage:Et,setSiteOptions:Sr,unzip:cr,updateUserMeta:at,wpCLI:Ot,writeFile:Lr,zipWpContent:kt},Symbol.toStringTag,{value:"Module"})),ms=5*1024*1024;function ys(r,t){const n=r.headers.get("content-length")||"",p=parseInt(n,10)||ms;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 hs(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],k=typeof e[1]=="string"?e[1]:null,m=k!==null?r.replaceAll("{path}",k):r;throw new Error(`${m}: ${b}`,{cause:f})}throw f}}}}var gs=Object.defineProperty,bs=Object.getOwnPropertyDescriptor,ke=(r,t,n,p)=>{for(var l=p>1?void 0:p?bs(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&&gs(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(et(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=hs(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 ws={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||ws[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
|
|
706
706
|
`:`
|
|
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,
|
|
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,k)=>Ee(b).length>=Ee(k).length?b:k)).length);let f="";const h=t.bracketedArray?"[]":"";for(const b of i){const k=r[b];if(k&&Array.isArray(k))for(const m of k)f+=Ee(`${b}${h}`).padEnd(e," ")+p+Ee(m)+n;else k&&typeof k=="object"?l.push(b):f+=Ee(b).padEnd(e," ")+p+Ee(k)+n}t.section&&f.length&&(f="["+Ee(t.section)+"]"+(t.newline?n+n:n)+f);for(const b of l){const k=$t(b,".").join("\\."),m=(t.section?t.section+".":"")+k,w=Tr(r[b],{...t,section:m});f.length&&w.length&&(f+=n),f+=w}return f};function $t(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 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 m=rr(k[2]);let w;t.bracketedArray?w=m.length>2&&m.slice(-2)==="[]":(f[m]=((f==null?void 0:f[m])||0)+1,w=f[m]>1);const L=w?m.slice(0,-2):m;if(L==="__proto__")continue;const W=k[3]?rr(k[4]):!0,P=W==="true"||W==="false"||W==="null"?JSON.parse(W):W;w&&(_r.call(p,L)?Array.isArray(p[L])||(p[L]=[p[L]]):p[L]=[]),Array.isArray(p[L])?p[L].push(P):p[L]=P}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=$t(b,".");p=n;const m=k.pop(),w=m.replace(/\\\./g,".");for(const L of k)L!=="__proto__"&&((!_r.call(p,L)||typeof p[L]!="object")&&(p[L]=Object.create(null)),p=p[L]);p===n&&w===m||(p[w]=n[b],h.push(b))}for(const b of h)delete n[b];return n},Tt=r=>r.startsWith('"')&&r.endsWith('"')||r.startsWith("'")&&r.endsWith("'"),Ee=r=>typeof r!="string"||r.match(/[=\r\n]/)||r.match(/^\[/)||r.length>1&&Tt(r)||r!==r.trim()?JSON.stringify(r):r.split(";").join("\\;").split("#").join("\\#"),rr=r=>{if(r=(r||"").trim(),Tt(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 vs(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"],jt=hr[0],Ps=hr,At=["iconv","mbstring","xml-bundle","gd"],Gr={"kitchen-sink":At,light:[]},_s=["vfs","literal","wordpress.org/themes","wordpress.org/plugins","url"];function ks(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 Os(t,p);break;case"literal":l=new Es(t,p);break;case"wordpress.org/themes":l=new js(t,p);break;case"wordpress.org/plugins":l=new As(t,p);break;case"url":l=new Ts(t,p);break;default:throw new Error(`Invalid resource: ${t}`)}return l=new qs(l),n&&(l=new Rs(l,n)),l}setPlayground(t){this.playground=t}get isAsync(){return!1}}class Os 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 Es 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 ys(l,((p=this.progress)==null?void 0:p.loadingListener)??$s),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}".
|
|
708
708
|
Check if the URL is correct and the server is reachable.
|
|
709
709
|
If it is reachable, the server might be blocking the request.
|
|
710
710
|
Check the browser console and network tabs for more information.
|
|
@@ -728,14 +728,14 @@ function join_paths()
|
|
|
728
728
|
https://raw.githubusercontent.com/username/repository/branch/filename
|
|
729
729
|
|
|
730
730
|
Error:
|
|
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:
|
|
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 $s=()=>{};class Ts extends Fr{constructor(t,n){super(n),this.resource=t}getURL(){return this.resource.url}get caption(){return this.resource.caption??super.caption}}class js extends Fr{constructor(t,n){super(n),this.resource=t}get name(){return mr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/theme/${qt(this.resource.slug)}`}}class As extends Fr{constructor(t,n){super(n),this.resource=t}get name(){return mr(this.resource.slug)}getURL(){return`https://downloads.wordpress.org/plugin/${qt(this.resource.slug)}`}}function qt(r){return!r||r.endsWith(".zip")?r:r+".latest-stable.zip"}class Rt 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 qs extends Rt{async resolve(){return this.promise||(this.promise=super.resolve()),this.promise}}class Rs extends Rt{constructor(t,n){super(t),this.semaphore=n}async resolve(){return this.isAsync?this.semaphore.run(()=>super.resolve()):super.resolve()}}const Ss={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},Ls={type:"string",enum:["8.3","8.2","8.1","8.0","7.4","7.3","7.2","7.1","7.0"]},xs={type:"string",enum:["kitchen-sink","light"]},St=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 x;if(r.resource===void 0&&(x="resource")||r.path===void 0&&(x="path")){const I={instancePath:t,schemaPath:"#/definitions/VFSReference/required",keyword:"required",params:{missingProperty:x},message:"must have required property '"+x+"'"};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 x={instancePath:t,schemaPath:"#/definitions/VFSReference/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[x]:i.push(x),e++}var w=b===e;if(h=h||w,!h){const x=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 _={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[_]:i.push(_),e++}if($!=="literal"){const _={instancePath:t+"/resource",schemaPath:"#/definitions/LiteralReference/properties/resource/const",keyword:"const",params:{allowedValue:"literal"},message:"must be equal to constant"};i===null?i=[_]:i.push(_),e++}var L=T===e}else var L=!0;if(L){if(r.name!==void 0){const $=e;if(typeof r.name!="string"){const _={instancePath:t+"/name",schemaPath:"#/definitions/LiteralReference/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[_]:i.push(_),e++}var L=$===e}else var L=!0;if(L)if(r.contents!==void 0){let $=r.contents;const T=e,_=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 W=g===e;if(y=y||W,!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 D={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=[D]:i.push(D),e++}else{const D=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 P=ee===e;if(!P)break}if(D===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 W=O===e;y=y||W}if(y)e=_,i!==null&&(_?i.length=_: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 L=T===e}else var L=!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 w=x===e;if(h=h||w,!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 _={instancePath:t,schemaPath:"#/definitions/CoreThemeReference/required",keyword:"required",params:{missingProperty:T},message:"must have required property '"+T+"'"};i===null?i=[_]:i.push(_),e++}else{const _=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(_===e){if(r.resource!==void 0){let y=r.resource;const g=e;if(typeof y!="string"){const v={instancePath:t+"/resource",schemaPath:"#/definitions/CoreThemeReference/properties/resource/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[v]:i.push(v),e++}if(y!=="wordpress.org/themes"){const v={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=[v]:i.push(v),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 v={instancePath:t+"/slug",schemaPath:"#/definitions/CoreThemeReference/properties/slug/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[v]:i.push(v),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 w=c===e;if(h=h||w,!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 v={instancePath:t,schemaPath:"#/definitions/CorePluginReference/required",keyword:"required",params:{missingProperty:g},message:"must have required property '"+g+"'"};i===null?i=[v]:i.push(v),e++}else{const v=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(v===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 w=T===e;if(h=h||w,!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 D in r)if(!(D==="resource"||D==="url"||D==="caption")){const R={instancePath:t,schemaPath:"#/definitions/UrlReference/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:D},message:"must NOT have additional properties"};i===null?i=[R]:i.push(R),e++;break}if(q===e){if(r.resource!==void 0){let D=r.resource;const R=e;if(typeof D!="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(D!=="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 D=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=D===e}else var E=!0;if(E)if(r.caption!==void 0){const D=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=D===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 w=g===e;h=h||w}}}}if(h)e=f,i!==null&&(f?i.length=f:i=null);else{const x={instancePath:t,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[x]:i.push(x),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:
|
|
732
732
|
|
|
733
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.
|
|
734
734
|
|
|
735
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.
|
|
736
736
|
This option is only kept in here to avoid breaking Blueprint schema validation
|
|
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(){}/**
|
|
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"]}]},Lt={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 x=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:Lt.enum},message:"must be equal to one of the allowed values"}],!1;var f=x===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 x=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=x===e}else var f=!0;if(f)if(r.body!==void 0){let E=r.body;const x=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 _;if(E.BYTES_PER_ELEMENT===void 0&&(_="BYTES_PER_ELEMENT")||E.buffer===void 0&&(_="buffer")||E.byteLength===void 0&&(_="byteLength")||E.byteOffset===void 0&&(_="byteOffset")||E.length===void 0&&(_="length")){const y={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/required",keyword:"required",params:{missingProperty:_},message:"must have required property '"+_+"'"};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 v=E[g];const O=e;if(!(typeof v=="number"&&isFinite(v))){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 k=O===e;if(!k)break}if(y===e){if(E.BYTES_PER_ELEMENT!==void 0){let g=E.BYTES_PER_ELEMENT;const v=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=v===e}else var m=!0;if(m){if(E.buffer!==void 0){let g=E.buffer;const v=e;if(e===v)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 D in g)if(D!=="byteLength"){const R={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:D},message:"must NOT have additional properties"};i===null?i=[R]:i.push(R),e++;break}if(q===e&&g.byteLength!==void 0){let D=g.byteLength;if(!(typeof D=="number"&&isFinite(D))){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=v===e}else var m=!0;if(m){if(E.byteLength!==void 0){let g=E.byteLength;const v=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=v===e}else var m=!0;if(m){if(E.byteOffset!==void 0){let g=E.byteOffset;const v=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=v===e}else var m=!0;if(m)if(E.length!==void 0){let g=E.length;const v=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=v===e}else var m=!0}}}}}}else{const _={instancePath:t+"/body",schemaPath:"#/properties/body/anyOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};i===null?i=[_]:i.push(_),e++}var b=$===e;if(z=z||b,!z){const _=e;if(e===_)if(E&&typeof E=="object"&&!Array.isArray(E))for(const g in E){let v=E[g];const O=e,N=e;let q=!1;const D=e;if(typeof v!="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 w=D===e;if(q=q||w,!q){const R=e;if(e===R)if(v&&typeof v=="object"&&!Array.isArray(v)){let ee;if(v.BYTES_PER_ELEMENT===void 0&&(ee="BYTES_PER_ELEMENT")||v.buffer===void 0&&(ee="buffer")||v.byteLength===void 0&&(ee="byteLength")||v.byteOffset===void 0&&(ee="byteOffset")||v.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 v)if(!(C==="BYTES_PER_ELEMENT"||C==="buffer"||C==="byteLength"||C==="byteOffset"||C==="length")){let Q=v[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 L=M===e;if(!L)break}if(J===e){if(v.BYTES_PER_ELEMENT!==void 0){let C=v.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 W=Q===e}else var W=!0;if(W){if(v.buffer!==void 0){let C=v.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 W=Q===e}else var W=!0;if(W){if(v.byteLength!==void 0){let C=v.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 W=Q===e}else var W=!0;if(W){if(v.byteOffset!==void 0){let C=v.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 W=Q===e}else var W=!0;if(W)if(v.length!==void 0){let C=v.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 W=Q===e}else var W=!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 w=R===e;if(q=q||w,!q){const ee=e;if(e===ee)if(v&&typeof v=="object"&&!Array.isArray(v)){let C;if(v.lastModified===void 0&&(C="lastModified")||v.name===void 0&&(C="name")||v.size===void 0&&(C="size")||v.type===void 0&&(C="type")||v.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 v)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(v.size!==void 0){let M=v.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 P=Y===e}else var P=!0;if(P){if(v.type!==void 0){const M=e;if(typeof v.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 P=M===e}else var P=!0;if(P){if(v.lastModified!==void 0){let M=v.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 P=Y===e}else var P=!0;if(P){if(v.name!==void 0){const M=e;if(typeof v.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 P=M===e}else var P=!0;if(P)if(v.webkitRelativePath!==void 0){const M=e;if(typeof v.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 P=M===e}else var P=!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 w=ee===e;q=q||w}}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=_===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=x===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 Ns={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 W=e;for(const P in r)if(!St.call(Ns.properties,P))return ne.errors=[{instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"}],!1;if(W===e){if(r.relativeUri!==void 0){const P=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=P===e}else var f=!0;if(f){if(r.scriptPath!==void 0){const P=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=P===e}else var f=!0;if(f){if(r.protocol!==void 0){const P=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=P===e}else var f=!0;if(f){if(r.method!==void 0){let P=r.method;const U=e;if(typeof P!="string")return ne.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 ne.errors=[{instancePath:t+"/method",schemaPath:"#/definitions/HTTPMethod/enum",keyword:"enum",params:{allowedValues:Lt.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 P=r.headers;const U=e;if(e===e)if(P&&typeof P=="object"&&!Array.isArray(P))for(const E in P){const x=e;if(typeof P[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=x===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 P=r.body;const U=e,te=e;let H=!1;const E=e;if(typeof P!="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(P&&typeof P=="object"&&!Array.isArray(P)){let c;if(P.BYTES_PER_ELEMENT===void 0&&(c="BYTES_PER_ELEMENT")||P.buffer===void 0&&(c="buffer")||P.byteLength===void 0&&(c="byteLength")||P.byteOffset===void 0&&(c="byteOffset")||P.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 P)if(!($==="BYTES_PER_ELEMENT"||$==="buffer"||$==="byteLength"||$==="byteOffset"||$==="length")){let T=P[$];const _=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 k=_===e;if(!k)break}if(A===e){if(P.BYTES_PER_ELEMENT!==void 0){let $=P.BYTES_PER_ELEMENT;const T=e;if(!(typeof $=="number"&&isFinite($))){const _={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=[_]:i.push(_),e++}var m=T===e}else var m=!0;if(m){if(P.buffer!==void 0){let $=P.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 v in $)if(v!=="byteLength"){const O={instancePath:t+"/body/buffer",schemaPath:"#/properties/body/anyOf/1/properties/buffer/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"};i===null?i=[O]:i.push(O),e++;break}if(g===e&&$.byteLength!==void 0){let v=$.byteLength;if(!(typeof v=="number"&&isFinite(v))){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(P.byteLength!==void 0){let $=P.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(P.byteOffset!==void 0){let $=P.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(P.length!==void 0){let $=P.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 P=r.env;const U=e;if(e===U)if(P&&typeof P=="object"&&!Array.isArray(P))for(const H in P){const E=e;if(typeof P[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 w=E===e;if(!w)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 P=r.$_SERVER;const U=e;if(e===U)if(P&&typeof P=="object"&&!Array.isArray(P))for(const H in P){const E=e;if(typeof P[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 L=E===e;if(!L)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 P=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=P===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 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/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=u===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(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 w=u===e}else var w=!0;if(w){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 w=u===e}else var w=!0;if(w){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 w=s===e}else var w=!0;if(w)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 w=s===e}else var w=!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 L=j===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/3/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/3/properties/progress/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var W=u===e}else var W=!0;if(W){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 W=u===e}else var W=!0;if(W){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 W=u===e}else var W=!0;if(W){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 W=u===e}else var W=!0;if(W)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 W=s===e}else var W=!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 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/4/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/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 x=u===e}else var x=!0;if(x){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 x=u===e}else var x=!0;if(x)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 x=s===e}else var x=!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 _=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/10/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/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 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/11/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/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 D=j===e}else var D=!0;if(D)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 D=a===e}else var D=!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 Ut=Ke===e;if(!Ut)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(!St.call(Ss.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 _=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(_===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 _=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(_===e){if(c.php!==void 0){let y=c.php;const g=e,v=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:Ls.enum},message:"must be equal to one of the allowed values"};i===null?i=[q]:i.push(q),e++}var k=N===e;if(O=O||k,!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 k=q===e;O=O||k}if(O)e=v,i!==null&&(v?i.length=v: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 _ in c)if(_!=="networking")return B.errors=[{instancePath:t+"/features",schemaPath:"#/properties/features/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:_},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 w=!0;const T=c.length;for(let _=0;_<T;_++){let y=c[_];const g=e;if(typeof y!="string")return B.errors=[{instancePath:t+"/extraLibraries/"+_,schemaPath:"#/definitions/ExtraLibrary/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(y!=="wp-cli")return B.errors=[{instancePath:t+"/extraLibraries/"+_,schemaPath:"#/definitions/ExtraLibrary/const",keyword:"const",params:{allowedValue:"wp-cli"},message:"must be equal to constant"}],!1;var w=g===e;if(!w)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 _=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 L=_===e;if(!L)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 W=!0;const T=c.length;for(let _=0;_<T;_++){let y=c[_];const g=e,v=e;let O=!1;const N=e;if(typeof y!="string"){const D={instancePath:t+"/plugins/"+_,schemaPath:"#/properties/plugins/items/anyOf/0/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[D]:i.push(D),e++}var P=N===e;if(O=O||P,!O){const D=e;re(y,{instancePath:t+"/plugins/"+_,parentData:c,parentDataProperty:_,rootData:l})||(i=i===null?re.errors:i.concat(re.errors),e=i.length);var P=D===e;O=O||P}if(O)e=v,i!==null&&(v?i.length=v:i=null);else{const D={instancePath:t+"/plugins/"+_,schemaPath:"#/properties/plugins/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[D]:i.push(D),e++,B.errors=i,!1}var W=g===e;if(!W)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 _ in c)if(_!=="blogname"){const y=e;if(typeof c[_]!="string")return B.errors=[{instancePath:t+"/siteOptions/"+_.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 _=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=_===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 D={instancePath:t+"/login",schemaPath:"#/properties/login/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:q},message:"must NOT have additional properties"};i===null?i=[D]:i.push(D),e++;break}if(N===e){if(c.username!==void 0){const q=e;if(typeof c.username!="string"){const D={instancePath:t+"/login/username",schemaPath:"#/properties/login/anyOf/1/properties/username/type",keyword:"type",params:{type:"string"},message:"must be string"};i===null?i=[D]:i.push(D),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 _=0;_<T;_++){let y=c[_];const g=e;if(typeof y!="string")return B.errors=[{instancePath:t+"/phpExtensionBundles/"+_,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/"+_,schemaPath:"#/definitions/SupportedPHPExtensionBundle/enum",keyword:"enum",params:{allowedValues:xs.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 x=!0;const T=c.length;for(let _=0;_<T;_++){let y=c[_];const g=e,v=e;let O=!1;const N=e;o(y,{instancePath:t+"/steps/"+_,parentData:c,parentDataProperty:_,rootData:l})||(i=i===null?o.errors:i.concat(o.errors),e=i.length);var I=N===e;if(O=O||I,!O){const D=e;if(typeof y!="string"){const V={instancePath:t+"/steps/"+_,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=D===e;if(O=O||I,!O){const V=e,ee={instancePath:t+"/steps/"+_,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/"+_,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/"+_,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/"+_,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=v,i!==null&&(v?i.length=v:i=null);else{const D={instancePath:t+"/steps/"+_,schemaPath:"#/properties/steps/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};return i===null?i=[D]:i.push(D),e++,B.errors=i,!1}var x=g===e;if(!x)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:Fs,...Yr}=cs,Cs={...Yr,"wp-cli":Fs,importFile:Yr.importWxr};function xt(r,{progress:t=new yr,semaphore:n=new Ht({concurrency:3}),onStepCompleted:p=()=>{}}={}){var m,w,L,W,P,U,te,H,E;r={...r,steps:(r.steps||[]).filter(Ms).filter(Bs)};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(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(...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=((m=r.steps)==null?void 0:m.findIndex(x=>typeof x=="object"&&(x==null?void 0:x.step)==="wp-cli"))??-1;if((w=r==null?void 0:r.extraLibraries)!=null&&w.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 x={step:"writeFile",data:{resource:"url",url:"https://playground.wordpress.net/wp-cli.phar"},path:"/tmp/wp-cli.phar"};l===-1?(L=r.steps)==null||L.push(x):(W=r.steps)==null||W.splice(l,0,x)}const i=(P=r.steps)==null?void 0:P.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. ")),(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}=Is(r);if(!e){const x=new Error(`Invalid blueprint: ${f[0].message} at ${f[0].instancePath}`);throw x.errors=f,x}const h=r.steps||[],b=h.reduce((x,I)=>{var z;return x+(((z=I.progress)==null?void 0:z.weight)||1)},0),k=h.map(x=>Us(x,{semaphore:n,rootProgressTracker:t,totalProgressWeight:b}));return{versions:{php:Ws((te=r.preferredVersions)==null?void 0:te.php,hr,jt),wp:((H=r.preferredVersions)==null?void 0:H.wp)||"latest"},phpExtensions:Ds([],r.phpExtensionBundles||[]),features:{networking:((E=r.features)==null?void 0:E.networking)??!1},extraLibraries:r.extraLibraries||[],run:async x=>{try{for(const{resources:I}of k)for(const z of I)z.setPlayground(x),z.isAsync&&z.resolve();for(const[I,{run:z,step:c}]of Object.entries(k))try{const A=await z(x);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 x.goTo(r.landingPage||"/")}catch{}t.finish()}}}}function Is(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 Ws(r,t,n){return r&&t.includes(r)?r:n}function Ds(r,t){const n=At.filter(l=>r.includes(l)),p=t.flatMap(l=>l in Gr?Gr[l]:[]);return Array.from(new Set([...n,...p]))}function Ms(r){return!!(typeof r=="object"&&r)}function Bs(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 Us(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 m of Object.keys(r)){let w=r[m];ks(w)&&(w=Se.create(w,{semaphore:t})),i[m]=w}const e=async m=>{var w;try{return l.fillSlowly(),await Cs[r.step](m,await zs(i),{tracker:l,initialCaption:(w=r.progress)==null?void 0:w.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 zs(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 Nt(r,t){await r.run(t)}function Vs(){}/**
|
|
738
738
|
* @license
|
|
739
739
|
* Copyright 2019 Google LLC
|
|
740
740
|
* SPDX-License-Identifier: Apache-2.0
|
|
741
|
-
*/const
|
|
741
|
+
*/const Ft=Symbol("Comlink.proxy"),Hs=Symbol("Comlink.endpoint"),Gs=Symbol("Comlink.releaseProxy"),Or=Symbol("Comlink.finalizer"),sr=Symbol("Comlink.thrown"),Ct=r=>typeof r=="object"&&r!==null||typeof r=="function",Ys={canHandle:r=>Ct(r)&&r[Ft],serialize(r){const{port1:t,port2:n}=new MessageChannel;return Cr(r,t),[n,[n]]},deserialize(r){return r.start(),Ir(r)}},Zs={canHandle:r=>Ct(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",Ys],["throw",Zs]]);function Qs(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(!Qs(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 k=f.slice(0,-1).reduce((w,L)=>w[L],r),m=f.reduce((w,L)=>w[L],r);switch(e){case"GET":b=m;break;case"SET":k[f.slice(-1)[0]]=Re(l.data.value),b=!0;break;case"APPLY":b=m.apply(k,h);break;case"CONSTRUCT":{const w=new m(...h);b=Mt(w)}break;case"ENDPOINT":{const{port1:w,port2:L}=new MessageChannel;Cr(r,L),b=ri(w,[w])}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[m,w]=ur(k);t.postMessage(Object.assign(Object.assign({},m),{id:i}),w),e==="RELEASE"&&(t.removeEventListener("message",p),It(t),Or in r&&typeof r[Or]=="function"&&r[Or]())}).catch(k=>{const[m,w]=ur({value:new TypeError("Unserializable return value"),[sr]:0});t.postMessage(Object.assign(Object.assign({},m),{id:i}),w)})}),t.start&&t.start()}function Js(r){return r.constructor.name==="MessagePort"}function It(r){Js(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 Wt(r){return Le(r,{type:"RELEASE"}).then(()=>{It(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&&Wt(r)});function Ks(r,t){const n=(lr.get(t)||0)+1;lr.set(t,n),fr&&fr.register(r,t,r)}function Xs(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===Gs)return()=>{Xs(l),Wt(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(k=>k.toString()),value:h},b).then(Re)},apply(i,e,f){er(p);const h=t[t.length-1];if(h===Hs)return Le(r,{type:"ENDPOINT"}).then(Re);if(h==="bind")return jr(r,t.slice(0,-1));const[b,k]=Qr(f);return Le(r,{type:"APPLY",path:t.map(m=>m.toString()),argumentList:b},k).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 Ks(l,r),l}function ei(r){return Array.prototype.concat.apply([],r)}function Qr(r){const t=r.map(ur);return[t.map(n=>n[0]),ei(t.map(n=>n[1]))]}const Dt=new WeakMap;function ri(r,t){return Dt.set(r,t),r}function Mt(r){return Object.assign(r,{[Ft]:!0})}function ti(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},Dt.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=si();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 si(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}function ii(r,t=void 0){oi();const n=r instanceof Worker?r:ti(r,t),p=Ir(n),l=Bt(p);return new Proxy(l,{get:(i,e)=>e==="isConnected"?async()=>{for(;;)try{await ni(p.isConnected(),200);break}catch{}}:p[e]})}async function ni(r,t){return new Promise((n,p)=>{setTimeout(p,t),r.then(n)})}let Jr=!1;function oi(){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 Bt(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]:Bt(t[n]);case"undefined":case"number":case"string":return t[n];default:return Mt(t[n])}}})}new Promise(r=>{});async function ai({iframe:r,blueprint:t,remoteUrl:n,progressTracker:p=new yr,disableProgressBar:l,onBlueprintStepCompleted:i,onClientConnected:e=()=>{},sapiName:f,onBeforeBlueprint:h,mounts:b,shouldInstallWordPress:k}){li(n),pi(r),n=fi(n,{progressbar:!l}),p.setCaption("Preparing WordPress"),t||(t={phpExtensionBundles:["kitchen-sink"]});const m=xt(t,{progress:p.stage(.5),onStepCompleted:i});await new Promise(W=>{r.src=n,r.addEventListener("load",W,!1)});const w=ii(r.contentWindow,r.ownerDocument.defaultView);await w.isConnected(),p.pipe(w);const L=p.stage();return await w.onDownloadProgress(L.loadingListener),await w.boot({mounts:b,sapiName:f,shouldInstallWordPress:k,phpVersion:m.versions.php,wpVersion:m.versions.wp,phpExtensions:m.phpExtensions,withNetworking:m.features.networking}),await w.isReady(),L.finish(),is(ae,w),e(w),h&&await h(),await Nt(m,w),p.finish(),w}function pi(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")}const ir="https://playground.wordpress.net";function li(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 fi(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()}exports.LatestSupportedPHPVersion=jt;exports.SupportedPHPVersions=hr;exports.SupportedPHPVersionsList=Ps;exports.activatePlugin=dr;exports.activateTheme=qr;exports.compileBlueprint=xt;exports.cp=ft;exports.defineSiteUrl=xr;exports.defineWpConfigConsts=Ie;exports.enableMultisite=lt;exports.exportWXR=gt;exports.importThemeStarterContent=Nr;exports.importWordPressFiles=ht;exports.importWxr=mt;exports.installPlugin=wt;exports.installTheme=vt;exports.login=or;exports.mkdir=dt;exports.mv=ut;exports.phpVar=se;exports.phpVars=We;exports.request=nr;exports.resetData=Pt;exports.rm=Rr;exports.rmdir=ct;exports.runBlueprintSteps=Nt;exports.runPHP=it;exports.runPHPWithOptions=nt;exports.runSql=ot;exports.runWpInstallationWizard=_t;exports.setPhpIniEntries=vs;exports.setPluginProxyURL=Vs;exports.setSiteLanguage=Et;exports.setSiteOptions=Sr;exports.startPlaygroundWeb=ai;exports.unzip=cr;exports.updateUserMeta=at;exports.wpCLI=Ot;exports.wpContentFilesExcludedFromExport=Ar;exports.writeFile=Lr;exports.zipWpContent=kt;
|