diff --git a/action.yml b/action.yml index b308c2a..80b6fe0 100644 --- a/action.yml +++ b/action.yml @@ -6,6 +6,10 @@ inputs: required: false default: '2019.2.11f1' description: 'Version of unity to use for testing the project.' + customImage: + required: false + default: '' + description: 'Specific docker image that should be used for building the project' projectPath: required: false description: 'Path to the Unity project to be tested.' diff --git a/action/index.js b/action/index.js index feb765e..ba43051 100644 --- a/action/index.js +++ b/action/index.js @@ -1 +1 @@ -module.exports=function(e,r){"use strict";var t={};function __webpack_require__(r){if(t[r]){return t[r].exports}var n=t[r]={i:r,l:false,exports:{}};e[r].call(n.exports,n,n.exports,__webpack_require__);n.l=true;return n.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(501)}r(__webpack_require__);return startup()}({1:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,a){function fulfilled(e){try{step(n.next(e))}catch(e){a(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){a(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};Object.defineProperty(r,"__esModule",{value:true});const a=t(129);const i=t(622);const o=t(669);const u=t(672);const s=o.promisify(a.exec);function cp(e,r,t={}){return n(this,void 0,void 0,function*(){const{force:n,recursive:a}=readCopyOptions(t);const o=(yield u.exists(r))?yield u.stat(r):null;if(o&&o.isFile()&&!n){return}const s=o&&o.isDirectory()?i.join(r,i.basename(e)):r;if(!(yield u.exists(e))){throw new Error(`no such file or directory: ${e}`)}const c=yield u.stat(e);if(c.isDirectory()){if(!a){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,s,0,n)}}else{if(i.relative(e,s)===""){throw new Error(`'${s}' and '${e}' are the same file`)}yield copyFile(e,s,n)}})}r.cp=cp;function mv(e,r,t={}){return n(this,void 0,void 0,function*(){if(yield u.exists(r)){let n=true;if(yield u.isDirectory(r)){r=i.join(r,i.basename(e));n=yield u.exists(r)}if(n){if(t.force==null||t.force){yield rmRF(r)}else{throw new Error("Destination already exists")}}}yield mkdirP(i.dirname(r));yield u.rename(e,r)})}r.mv=mv;function rmRF(e){return n(this,void 0,void 0,function*(){if(u.IS_WINDOWS){try{if(yield u.isDirectory(e,true)){yield s(`rd /s /q "${e}"`)}else{yield s(`del /f /a "${e}"`)}}catch(e){if(e.code!=="ENOENT")throw e}try{yield u.unlink(e)}catch(e){if(e.code!=="ENOENT")throw e}}else{let r=false;try{r=yield u.isDirectory(e)}catch(e){if(e.code!=="ENOENT")throw e;return}if(r){yield s(`rm -rf "${e}"`)}else{yield u.unlink(e)}}})}r.rmRF=rmRF;function mkdirP(e){return n(this,void 0,void 0,function*(){yield u.mkdirP(e)})}r.mkdirP=mkdirP;function which(e,r){return n(this,void 0,void 0,function*(){if(!e){throw new Error("parameter 'tool' is required")}if(r){const r=yield which(e,false);if(!r){if(u.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`)}else{throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`)}}}try{const r=[];if(u.IS_WINDOWS&&process.env.PATHEXT){for(const e of process.env.PATHEXT.split(i.delimiter)){if(e){r.push(e)}}}if(u.isRooted(e)){const t=yield u.tryGetExecutablePath(e,r);if(t){return t}return""}if(e.includes("/")||u.IS_WINDOWS&&e.includes("\\")){return""}const t=[];if(process.env.PATH){for(const e of process.env.PATH.split(i.delimiter)){if(e){t.push(e)}}}for(const n of t){const t=yield u.tryGetExecutablePath(n+i.sep+e,r);if(t){return t}}return""}catch(e){throw new Error(`which failed with message ${e.message}`)}})}r.which=which;function readCopyOptions(e){const r=e.force==null?true:e.force;const t=Boolean(e.recursive);return{force:r,recursive:t}}function cpDirRecursive(e,r,t,a){return n(this,void 0,void 0,function*(){if(t>=255)return;t++;yield mkdirP(r);const n=yield u.readdir(e);for(const i of n){const n=`${e}/${i}`;const o=`${r}/${i}`;const s=yield u.lstat(n);if(s.isDirectory()){yield cpDirRecursive(n,o,t,a)}else{yield copyFile(n,o,a)}}yield u.chmod(r,(yield u.stat(e)).mode)})}function copyFile(e,r,t){return n(this,void 0,void 0,function*(){if((yield u.lstat(e)).isSymbolicLink()){try{yield u.lstat(r);yield u.unlink(r)}catch(e){if(e.code==="EPERM"){yield u.chmod(r,"0666");yield u.unlink(r)}}const t=yield u.readlink(e);yield u.symlink(t,r,u.IS_WINDOWS?"junction":null)}else if(!(yield u.exists(r))||t){yield u.copyFile(e,r)}})}},9:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,a){function fulfilled(e){try{step(n.next(e))}catch(e){a(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){a(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};Object.defineProperty(r,"__esModule",{value:true});const a=t(87);const i=t(614);const o=t(129);const u=t(622);const s=t(1);const c=t(672);const f=process.platform==="win32";class ToolRunner extends i.EventEmitter{constructor(e,r,t){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=r||[];this.options=t||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,r){const t=this._getSpawnFileName();const n=this._getSpawnArgs(e);let a=r?"":"[command]";if(f){if(this._isCmdFile()){a+=t;for(const e of n){a+=` ${e}`}}else if(e.windowsVerbatimArguments){a+=`"${t}"`;for(const e of n){a+=` ${e}`}}else{a+=this._windowsQuoteCmdArg(t);for(const e of n){a+=` ${this._windowsQuoteCmdArg(e)}`}}}else{a+=t;for(const e of n){a+=` ${e}`}}return a}_processLineBuffer(e,r,t){try{let n=r+e.toString();let i=n.indexOf(a.EOL);while(i>-1){const e=n.substring(0,i);t(e);n=n.substring(i+a.EOL.length);i=n.indexOf(a.EOL)}r=n}catch(e){this._debug(`error processing line. Failed with error ${e}`)}}_getSpawnFileName(){if(f){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(f){if(this._isCmdFile()){let r=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const t of this.args){r+=" ";r+=e.windowsVerbatimArguments?t:this._windowsQuoteCmdArg(t)}r+='"';return[r]}}return this.args}_endsWith(e,r){return e.endsWith(r)}_isCmdFile(){const e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile()){return this._uvQuoteCmdArg(e)}if(!e){return'""'}const r=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let t=false;for(const n of e){if(r.some(e=>e===n)){t=true;break}}if(!t){return e}let n='"';let a=true;for(let r=e.length;r>0;r--){n+=e[r-1];if(a&&e[r-1]==="\\"){n+="\\"}else if(e[r-1]==='"'){a=true;n+='"'}else{a=false}}n+='"';return n.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e){return'""'}if(!e.includes(" ")&&!e.includes("\t")&&!e.includes('"')){return e}if(!e.includes('"')&&!e.includes("\\")){return`"${e}"`}let r='"';let t=true;for(let n=e.length;n>0;n--){r+=e[n-1];if(t&&e[n-1]==="\\"){r+="\\"}else if(e[n-1]==='"'){t=true;r+="\\"}else{t=false}}r+='"';return r.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const r={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||false,windowsVerbatimArguments:e.windowsVerbatimArguments||false,failOnStdErr:e.failOnStdErr||false,ignoreReturnCode:e.ignoreReturnCode||false,delay:e.delay||1e4};r.outStream=e.outStream||process.stdout;r.errStream=e.errStream||process.stderr;return r}_getSpawnOptions(e,r){e=e||{};const t={};t.cwd=e.cwd;t.env=e.env;t["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){t.argv0=`"${r}"`}return t}exec(){return n(this,void 0,void 0,function*(){if(!c.isRooted(this.toolPath)&&(this.toolPath.includes("/")||f&&this.toolPath.includes("\\"))){this.toolPath=u.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield s.which(this.toolPath,true);return new Promise((e,r)=>{this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const e of this.args){this._debug(` ${e}`)}const t=this._cloneExecOptions(this.options);if(!t.silent&&t.outStream){t.outStream.write(this._getCommandString(t)+a.EOL)}const n=new ExecState(t,this.toolPath);n.on("debug",e=>{this._debug(e)});const i=this._getSpawnFileName();const u=o.spawn(i,this._getSpawnArgs(t),this._getSpawnOptions(this.options,i));const s="";if(u.stdout){u.stdout.on("data",e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!t.silent&&t.outStream){t.outStream.write(e)}this._processLineBuffer(e,s,e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}})})}const c="";if(u.stderr){u.stderr.on("data",e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!t.silent&&t.errStream&&t.outStream){const r=t.failOnStdErr?t.errStream:t.outStream;r.write(e)}this._processLineBuffer(e,c,e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}})})}u.on("error",e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()});u.on("exit",e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()});u.on("close",e=>{n.processExitCode=e;n.processExited=true;n.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);n.CheckComplete()});n.on("done",(t,n)=>{if(s.length>0){this.emit("stdline",s)}if(c.length>0){this.emit("errline",c)}u.removeAllListeners();if(t){r(t)}else{e(n)}})})})}}r.ToolRunner=ToolRunner;function argStringToArray(e){const r=[];let t=false;let n=false;let a="";function append(e){if(n&&e!=='"'){a+="\\"}a+=e;n=false}for(let i=0;i0){r.push(a);a=""}continue}append(o)}if(a.length>0){r.push(a.trim())}return r}r.argStringToArray=argStringToArray;class ExecState extends i.EventEmitter{constructor(e,r){super();this.processClosed=false;this.processError="";this.processExitCode=0;this.processExited=false;this.processStderr=false;this.delay=1e4;this.done=false;this.timeout=null;if(!r){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=r;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=setTimeout(ExecState.HandleTimeout,this.delay,this)}}_debug(e){this.emit("debug",e)}_setResult(){let e;if(this.processExited){if(this.processError){e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}}if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.done=true;this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(e.done){return}if(!e.processClosed&&e.processExited){const r=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(r)}e._setResult()}}},87:function(e){e.exports=require("os")},129:function(e){e.exports=require("child_process")},357:function(e){e.exports=require("assert")},431:function(e,r,t){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(Object.hasOwnProperty.call(e,t))r[t]=e[t];r["default"]=e;return r};Object.defineProperty(r,"__esModule",{value:true});const a=n(t(87));function issueCommand(e,r,t){const n=new Command(e,r,t);process.stdout.write(n.toString()+a.EOL)}r.issueCommand=issueCommand;function issue(e,r=""){issueCommand(e,{},r)}r.issue=issue;const i="::";class Command{constructor(e,r,t){if(!e){e="missing.command"}this.command=e;this.properties=r;this.message=t}toString(){let e=i+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=true;for(const t in this.properties){if(this.properties.hasOwnProperty(t)){const n=this.properties[t];if(n){if(r){r=false}else{e+=","}e+=`${t}=${escapeProperty(n)}`}}}}e+=`${i}${escapeData(this.message)}`;return e}}function escapeData(e){return(e||"").replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return(e||"").replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},470:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,a){function fulfilled(e){try{step(n.next(e))}catch(e){a(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){a(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};var a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(Object.hasOwnProperty.call(e,t))r[t]=e[t];r["default"]=e;return r};Object.defineProperty(r,"__esModule",{value:true});const i=t(431);const o=a(t(87));const u=a(t(622));var s;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(s=r.ExitCode||(r.ExitCode={}));function exportVariable(e,r){process.env[e]=r;i.issueCommand("set-env",{name:e},r)}r.exportVariable=exportVariable;function setSecret(e){i.issueCommand("add-mask",{},e)}r.setSecret=setSecret;function addPath(e){i.issueCommand("add-path",{},e);process.env["PATH"]=`${e}${u.delimiter}${process.env["PATH"]}`}r.addPath=addPath;function getInput(e,r){const t=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(r&&r.required&&!t){throw new Error(`Input required and not supplied: ${e}`)}return t.trim()}r.getInput=getInput;function setOutput(e,r){i.issueCommand("set-output",{name:e},r)}r.setOutput=setOutput;function setFailed(e){process.exitCode=s.Failure;error(e)}r.setFailed=setFailed;function debug(e){i.issueCommand("debug",{},e)}r.debug=debug;function error(e){i.issue("error",e)}r.error=error;function warning(e){i.issue("warning",e)}r.warning=warning;function info(e){process.stdout.write(e+o.EOL)}r.info=info;function startGroup(e){i.issue("group",e)}r.startGroup=startGroup;function endGroup(){i.issue("endgroup")}r.endGroup=endGroup;function group(e,r){return n(this,void 0,void 0,function*(){startGroup(e);let t;try{t=yield r()}finally{endGroup()}return t})}r.group=group;function saveState(e,r){i.issueCommand("save-state",{name:e},r)}r.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}r.getState=getState},501:function(e,r,t){"use strict";t.r(r);var n=t(470);var a=t(622);var i=t.n(a);class action_Action{static get supportedPlatforms(){return["linux"]}static get isRunningLocally(){return process.env.RUNNER_WORKSPACE===undefined}static get isRunningFromSource(){return i().basename(__dirname)==="model"}static get name(){return"unity-test-runner"}static get rootFolder(){if(action_Action.isRunningFromSource){return i().dirname(i().dirname(i().dirname(__filename)))}return i().dirname(i().dirname(__filename))}static get actionFolder(){return`${action_Action.rootFolder}/action`}static get dockerfile(){return`${action_Action.actionFolder}/Dockerfile`}static get workspace(){return process.env.GITHUB_WORKSPACE}static checkCompatibility(){const e=process.platform;if(!action_Action.supportedPlatforms.includes(e)){throw new Error(`Currently ${e}-platform is not supported`)}}}var o=action_Action;var u=t(986);var s=typeof global=="object"&&global&&global.Object===Object&&global;var c=s;var f=typeof self=="object"&&self&&self.Object===Object&&self;var l=c||f||Function("return this")();var v=l;var d=v.Symbol;var p=d;var h=Object.prototype;var y=h.hasOwnProperty;var g=h.toString;var b=p?p.toStringTag:undefined;function getRawTag(e){var r=y.call(e,b),t=e[b];try{e[b]=undefined;var n=true}catch(e){}var a=g.call(e);if(n){if(r){e[b]=t}else{delete e[b]}}return a}var _=getRawTag;var m=Object.prototype;var w=m.toString;function objectToString(e){return w.call(e)}var x=objectToString;var j="[object Null]",O="[object Undefined]";var I=p?p.toStringTag:undefined;function baseGetTag(e){if(e==null){return e===undefined?O:j}return I&&I in Object(e)?_(e):x(e)}var S=baseGetTag;function isObjectLike(e){return e!=null&&typeof e=="object"}var A=isObjectLike;var E="[object Symbol]";function isSymbol(e){return typeof e=="symbol"||A(e)&&S(e)==E}var k=isSymbol;var C=0/0;function baseToNumber(e){if(typeof e=="number"){return e}if(k(e)){return C}return+e}var P=baseToNumber;function arrayMap(e,r){var t=-1,n=e==null?0:e.length,a=Array(n);while(++t0){if(++r>=ur){return arguments[0]}}else{r=0}return e.apply(undefined,arguments)}}var fr=shortOut;var lr=fr(Ce);var vr=lr;var dr=/\{\n\/\* \[wrapped with (.+)\] \*/,pr=/,? & /;function getWrapDetails(e){var r=e.match(dr);return r?r[1].split(pr):[]}var hr=getWrapDetails;var yr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function insertWrapDetails(e,r){var t=r.length;if(!t){return e}var n=t-1;r[n]=(t>1?"& ":"")+r[n];r=r.join(t>2?", ":" ");return e.replace(yr,"{\n/* [wrapped with "+r+"] */\n")}var gr=insertWrapDetails;function constant(e){return function(){return e}}var br=constant;var _r=function(){try{var e=Oe(Object,"defineProperty");e({},"",{});return e}catch(e){}}();var mr=_r;var wr=!mr?te:function(e,r){return mr(e,"toString",{configurable:true,enumerable:false,value:br(r),writable:true})};var xr=wr;var jr=fr(xr);var Or=jr;function arrayEach(e,r){var t=-1,n=e==null?0:e.length;while(++t-1}var Cr=arrayIncludes;var Pr=1,Rr=2,Wr=8,Tr=16,Mr=32,Br=64,Dr=128,Fr=256,Lr=512;var Nr=[["ary",Dr],["bind",Pr],["bindKey",Rr],["curry",Wr],["curryRight",Tr],["flip",Lr],["partial",Mr],["partialRight",Br],["rearg",Fr]];function updateWrapDetails(e,r){Ir(Nr,function(t){var n="_."+t[0];if(r&t[1]&&!Cr(e,n)){e.push(n)}});return e.sort()}var zr=updateWrapDetails;function setWrapToString(e,r,t){var n=r+"";return Or(e,gr(n,zr(hr(n),t)))}var $r=setWrapToString;var Ur=1,qr=2,Hr=4,Vr=8,Gr=32,Kr=64;function createRecurry(e,r,t,n,a,i,o,u,s,c){var f=r&Vr,l=f?o:undefined,v=f?undefined:o,d=f?i:undefined,p=f?undefined:i;r|=f?Gr:Kr;r&=~(f?Kr:Gr);if(!(r&Hr)){r&=~(Ur|qr)}var h=[e,r,a,d,l,p,v,u,s,c];var y=t.apply(undefined,h);if(or(e)){vr(y,h)}y.placeholder=n;return $r(y,e,r)}var Zr=createRecurry;function getHolder(e){var r=e;return r.placeholder}var Yr=getHolder;var Qr=9007199254740991;var Jr=/^(?:0|[1-9]\d*)$/;function isIndex(e,r){var t=typeof e;r=r==null?Qr:r;return!!r&&(t=="number"||t!="symbol"&&Jr.test(e))&&(e>-1&&e%1==0&&e1){b.reverse()}if(f&&s-1&&e%1==0&&e<=Ut}var qt=isLength;function isArrayLike(e){return e!=null&&qt(e.length)&&!ue(e)}var Ht=isArrayLike;function isIterateeCall(e,r,t){if(!$(t)){return false}var n=typeof r;if(n=="number"?Ht(t)&&Xr(r,t.length):n=="string"&&r in t){return Mt(t[r],e)}return false}var Vt=isIterateeCall;function createAssigner(e){return $t(function(r,t){var n=-1,a=t.length,i=a>1?t[a-1]:undefined,o=a>2?t[2]:undefined;i=e.length>3&&typeof i=="function"?(a--,i):undefined;if(o&&Vt(t[0],t[1],o)){i=a<3?undefined:i;a=1}r=Object(r);while(++n-1}var Ua=listCacheHas;function listCacheSet(e,r){var t=this.__data__,n=Fa(t,e);if(n<0){++this.size;t.push([e,r])}else{t[n][1]=r}return this}var qa=listCacheSet;function ListCache(e){var r=-1,t=e==null?0:e.length;this.clear();while(++r0&&t(u)){if(r>1){baseFlatten(u,r-1,t,n,a)}else{gi(a,u)}}else if(!n){a[a.length]=u}}return a}var mi=baseFlatten;function flatten(e){var r=e==null?0:e.length;return r?mi(e,1):[]}var wi=flatten;function flatRest(e){return Or(zt(e,undefined,wi),e+"")}var xi=flatRest;var ji=xi(yi);var Oi=ji;var Ii=Jn(Object.getPrototypeOf,Object);var Si=Ii;var Ai="[object Object]";var Ei=Function.prototype,ki=Object.prototype;var Ci=Ei.toString;var Pi=ki.hasOwnProperty;var Ri=Ci.call(Object);function isPlainObject(e){if(!A(e)||S(e)!=Ai){return false}var r=Si(e);if(r===null){return true}var t=Pi.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&Ci.call(t)==Ri}var Wi=isPlainObject;var Ti="[object DOMException]",Mi="[object Error]";function isError(e){if(!A(e)){return false}var r=S(e);return r==Mi||r==Ti||typeof e.message=="string"&&typeof e.name=="string"&&!Wi(e)}var Bi=isError;var Di=$t(function(e,r){try{return De(e,undefined,r)}catch(e){return Bi(e)?e:new Error(e)}});var Fi=Di;var Li="Expected a function";function before(e,r){var t;if(typeof r!="function"){throw new TypeError(Li)}e=X(e);return function(){if(--e>0){t=r.apply(this,arguments)}if(e<=1){r=undefined}return t}}var Ni=before;var zi=1,$i=32;var Ui=$t(function(e,r,t){var n=zi;if(t.length){var a=nt(t,Yr(Ui));n|=$i}return Pt(e,n,r,t,a)});Ui.placeholder={};var qi=Ui;var Hi=xi(function(e,r){Ir(r,function(r){r=di(r);Tt(e,r,qi(e[r],e))});return e});var Vi=Hi;var Gi=1,Ki=2,Zi=32;var Yi=$t(function(e,r,t){var n=Gi|Ki;if(t.length){var a=nt(t,Yr(Yi));n|=Zi}return Pt(r,n,e,t,a)});Yi.placeholder={};var Qi=Yi;function baseSlice(e,r,t){var n=-1,a=e.length;if(r<0){r=-r>a?0:a+r}t=t>a?a:t;if(t<0){t+=a}a=r>t?0:t-r>>>0;r>>>=0;var i=Array(a);while(++n=n?e:Ji(e,r,t)}var Xi=castSlice;var eo="\\ud800-\\udfff",ro="\\u0300-\\u036f",to="\\ufe20-\\ufe2f",no="\\u20d0-\\u20ff",ao=ro+to+no,io="\\ufe0e\\ufe0f";var oo="\\u200d";var uo=RegExp("["+oo+eo+ao+io+"]");function hasUnicode(e){return uo.test(e)}var so=hasUnicode;function asciiToArray(e){return e.split("")}var co=asciiToArray;var fo="\\ud800-\\udfff",lo="\\u0300-\\u036f",vo="\\ufe20-\\ufe2f",po="\\u20d0-\\u20ff",ho=lo+vo+po,yo="\\ufe0e\\ufe0f";var go="["+fo+"]",bo="["+ho+"]",_o="\\ud83c[\\udffb-\\udfff]",mo="(?:"+bo+"|"+_o+")",wo="[^"+fo+"]",xo="(?:\\ud83c[\\udde6-\\uddff]){2}",jo="[\\ud800-\\udbff][\\udc00-\\udfff]",Oo="\\u200d";var Io=mo+"?",So="["+yo+"]?",Ao="(?:"+Oo+"(?:"+[wo,xo,jo].join("|")+")"+So+Io+")*",Eo=So+Io+Ao,ko="(?:"+[wo+bo+"?",bo,xo,jo,go].join("|")+")";var Co=RegExp(_o+"(?="+_o+")|"+ko+Eo,"g");function unicodeToArray(e){return e.match(Co)||[]}var Po=unicodeToArray;function stringToArray(e){return so(e)?Po(e):co(e)}var Ro=stringToArray;function createCaseFirst(e){return function(r){r=fi(r);var t=so(r)?Ro(r):undefined;var n=t?t[0]:r.charAt(0);var a=t?Xi(t,1).join(""):r.slice(1);return n[e]()+a}}var Wo=createCaseFirst;var To=Wo("toUpperCase");var Mo=To;function capitalize(e){return Mo(fi(e).toLowerCase())}var Bo=capitalize;function arrayReduce(e,r,t,n){var a=-1,i=e==null?0:e.length;if(n&&i){t=e[++a]}while(++a=r?e:r}}return e}var ns=baseClamp;function clamp(e,r,t){if(t===undefined){t=r;r=undefined}if(t!==undefined){t=Z(t);t=t===t?t:0}if(r!==undefined){r=Z(r);r=r===r?r:0}return ns(Z(e),r,t)}var as=clamp;function stackClear(){this.__data__=new Ha;this.size=0}var is=stackClear;function stackDelete(e){var r=this.__data__,t=r["delete"](e);this.size=r.size;return t}var os=stackDelete;function stackGet(e){return this.__data__.get(e)}var us=stackGet;function stackHas(e){return this.__data__.has(e)}var ss=stackHas;var cs=200;function stackSet(e,r){var t=this.__data__;if(t instanceof Ha){var n=t.__data__;if(!Ga||n.lengthu)){return false}var c=i.get(e);if(c&&i.get(r)){return c==r}var f=-1,l=true,v=t&$f?new Ff:undefined;i.set(e,r);i.set(r,e);while(++f=r||t<0||l&&n>=i}function timerExpired(){var e=fv();if(shouldInvoke(e)){return trailingEdge(e)}u=setTimeout(timerExpired,remainingWait(e))}function trailingEdge(e){u=undefined;if(v&&n){return invokeFunc(e)}n=a=undefined;return o}function cancel(){if(u!==undefined){clearTimeout(u)}c=0;n=s=a=u=undefined}function flush(){return u===undefined?o:trailingEdge(fv())}function debounced(){var e=fv(),t=shouldInvoke(e);n=arguments;a=this;s=e;if(t){if(u===undefined){return leadingEdge(s)}if(l){clearTimeout(u);u=setTimeout(timerExpired,r);return invokeFunc(s)}}if(u===undefined){u=setTimeout(timerExpired,r)}return o}debounced.cancel=cancel;debounced.flush=flush;return debounced}var pv=debounce;function defaultTo(e,r){return e==null||e!==e?r:e}var hv=defaultTo;var yv=Object.prototype;var gv=yv.hasOwnProperty;var bv=$t(function(e,r){e=Object(e);var t=-1;var n=r.length;var a=n>2?r[2]:undefined;if(a&&Vt(r[0],r[1],a)){n=1}while(++t=Fv){i=Nf;o=false;r=new Ff(r)}e:while(++a=0&&e.slice(t,a)==r}var cd=endsWith;function baseToPairs(e,r){return R(r,function(r){return[r,e[r]]})}var fd=baseToPairs;function setToPairs(e){var r=-1,t=Array(e.size);e.forEach(function(e){t[++r]=[e,e]});return t}var ld=setToPairs;var vd="[object Map]",dd="[object Set]";function createToPairs(e){return function(r){var t=Xs(r);if(t==vd){return qf(r)}if(t==dd){return ld(r)}return fd(r,e(r))}}var pd=createToPairs;var hd=pd(aa);var yd=hd;var gd=pd(da);var bd=gd;var _d={"&":"&","<":"<",">":">",'"':""","'":"'"};var md=Fo(_d);var wd=md;var xd=/[&<>"']/g,jd=RegExp(xd.source);function escape_escape(e){e=fi(e);return e&&jd.test(e)?e.replace(xd,wd):e}var Od=escape_escape;var Id=/[\\^$.*+?()[\]{}|]/g,Sd=RegExp(Id.source);function escapeRegExp(e){e=fi(e);return e&&Sd.test(e)?e.replace(Id,"\\$&"):e}var Ad=escapeRegExp;function arrayEvery(e,r){var t=-1,n=e==null?0:e.length;while(++ta?0:a+t}n=n===undefined||n>a?a:X(n);if(n<0){n+=a}n=t>n?0:Rd(n);while(t-1?a[i?r[o]:o]:undefined}}var Dd=createFind;var Fd=Math.max;function findIndex(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var a=t==null?0:X(t);if(a<0){a=Fd(n+a,0)}return Sr(e,Bl(r,3),a)}var Ld=findIndex;var Nd=Dd(Ld);var zd=Nd;function baseFindKey(e,r,t){var n;t(e,function(e,t,a){if(r(e,t,a)){n=t;return false}});return n}var $d=baseFindKey;function findKey(e,r){return $d(e,Bl(r,3),Kl)}var Ud=findKey;var qd=Math.max,Hd=Math.min;function findLastIndex(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var a=n-1;if(t!==undefined){a=X(t);a=t<0?qd(n+a,0):Hd(a,n-1)}return Sr(e,Bl(r,3),a,true)}var Vd=findLastIndex;var Gd=Dd(Vd);var Kd=Gd;function findLastKey(e,r){return $d(e,Bl(r,3),id)}var Zd=findLastKey;function head(e){return e&&e.length?e[0]:undefined}var Yd=head;function baseMap(e,r){var t=-1,n=Ht(e)?Array(e.length):[];Ql(e,function(e,a,i){n[++t]=r(e,a,i)});return n}var Qd=baseMap;function map_map(e,r){var t=T(e)?R:Qd;return t(e,Bl(r,3))}var Jd=map_map;function flatMap(e,r){return mi(Jd(e,r),1)}var Xd=flatMap;var ep=1/0;function flatMapDeep(e,r){return mi(Jd(e,r),ep)}var rp=flatMapDeep;function flatMapDepth(e,r,t){t=t===undefined?1:X(t);return mi(Jd(e,r),t)}var tp=flatMapDepth;var np=1/0;function flattenDeep(e){var r=e==null?0:e.length;return r?mi(e,np):[]}var ap=flattenDeep;function flattenDepth(e,r){var t=e==null?0:e.length;if(!t){return[]}r=r===undefined?1:X(r);return mi(e,r)}var ip=flattenDepth;var op=512;function flip(e){return Pt(e,op)}var up=flip;var sp=Yu("floor");var cp=sp;var fp="Expected a function";var lp=8,vp=32,dp=128,pp=256;function createFlow(e){return xi(function(r){var t=r.length,n=t,a=er.prototype.thru;if(e){r.reverse()}while(n--){var i=r[n];if(typeof i!="function"){throw new TypeError(fp)}if(a&&!o&&Xe(i)=="wrapper"){var o=new er([],true)}}n=o?n:t;while(++nr}var Rp=baseGt;function createRelationalOperation(e){return function(r,t){if(!(typeof r=="string"&&typeof t=="string")){r=Z(r);t=Z(t)}return e(r,t)}}var Wp=createRelationalOperation;var Tp=Wp(Rp);var Mp=Tp;var Bp=Wp(function(e,r){return e>=r});var Dp=Bp;var Fp=Object.prototype;var Lp=Fp.hasOwnProperty;function baseHas(e,r){return e!=null&&Lp.call(e,r)}var Np=baseHas;function has(e,r){return e!=null&&El(e,r,Np)}var zp=has;var $p=Math.max,Up=Math.min;function baseInRange(e,r,t){return e>=Up(r,t)&&e<$p(r,t)}var qp=baseInRange;function inRange(e,r,t){r=J(r);if(t===undefined){t=r;r=0}else{t=J(t)}e=Z(e);return qp(e,r,t)}var Hp=inRange;var Vp="[object String]";function isString(e){return typeof e=="string"||!T(e)&&A(e)&&S(e)==Vp}var Gp=isString;function baseValues(e,r){return R(r,function(r){return e[r]})}var Kp=baseValues;function values_values(e){return e==null?[]:Kp(e,aa(e))}var Zp=values_values;var Yp=Math.max;function includes_includes(e,r,t,n){e=Ht(e)?e:Zp(e);t=t&&!n?X(t):0;var a=e.length;if(t<0){t=Yp(a+t,0)}return Gp(e)?t<=a&&e.indexOf(r,t)>-1:!!a&&kr(e,r,t)>-1}var Qp=includes_includes;var Jp=Math.max;function indexOf_indexOf(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var a=t==null?0:X(t);if(a<0){a=Jp(n+a,0)}return kr(e,r,a)}var Xp=indexOf_indexOf;function initial(e){var r=e==null?0:e.length;return r?Ji(e,0,-1):[]}var eh=initial;var rh=Math.min;function baseIntersection(e,r,t){var n=t?Dv:Cr,a=e[0].length,i=e.length,o=i,u=Array(i),s=Infinity,c=[];while(o--){var f=e[o];if(o&&r){f=R(f,Ln(r))}s=rh(f.length,s);u[o]=!t&&(r||a>=120&&f.length>=120)?new Ff(o&&f):undefined}f=e[0];var l=-1,v=u[0];e:while(++l=-vy&&e<=vy}var dy=isSafeInteger;function isUndefined(e){return e===undefined}var py=isUndefined;var hy="[object WeakMap]";function isWeakMap(e){return A(e)&&Xs(e)==hy}var yy=isWeakMap;var gy="[object WeakSet]";function isWeakSet(e){return A(e)&&S(e)==gy}var by=isWeakSet;var _y=1;function iteratee_iteratee(e){return Bl(typeof e=="function"?e:wf(e,_y))}var my=iteratee_iteratee;var wy=Array.prototype;var xy=wy.join;function join(e,r){return e==null?"":xy.call(e,r)}var jy=join;var Oy=qu(function(e,r,t){return e+(t?"-":"")+r.toLowerCase()});var Iy=Oy;var Sy=Xl(function(e,r,t){Tt(e,t,r)});var Ay=Sy;function strictLastIndexOf(e,r,t){var n=t+1;while(n--){if(e[n]===r){return n}}return n}var Ey=strictLastIndexOf;var ky=Math.max,Cy=Math.min;function lastIndexOf(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var a=n;if(t!==undefined){a=X(t);a=a<0?ky(n+a,0):Cy(a,n-1)}return r===r?Ey(e,r,a):Sr(e,Ar,a,true)}var Py=lastIndexOf;var Ry=qu(function(e,r,t){return e+(t?" ":"")+r.toLowerCase()});var Wy=Ry;var Ty=Wo("toLowerCase");var My=Ty;function baseLt(e,r){return e=this.__values__.length,r=e?undefined:this.__values__[this.__index__++];return{done:e,value:r}}var _g=wrapperNext;function baseNth(e,r){var t=e.length;if(!t){return}r+=r<0?t:0;return Xr(r,t)?e[r]:undefined}var mg=baseNth;function nth(e,r){return e&&e.length?mg(e,X(r)):undefined}var wg=nth;function nthArg(e){e=X(e);return $t(function(r){return mg(r,e)})}var xg=nthArg;function baseUnset(e,r){r=li(r,e);e=wh(e,r);return e==null||delete e[di($v(r))]}var jg=baseUnset;function customOmitClone(e){return Wi(e)?undefined:e}var Og=customOmitClone;var Ig=1,Sg=2,Ag=4;var Eg=xi(function(e,r){var t={};if(e==null){return t}var n=false;r=R(r,function(r){r=li(r,e);n||(n=r.length>1);return r});Lt(e,Ts(e),t);if(n){t=wf(t,Ig|Sg|Ag,Og)}var a=r.length;while(a--){jg(t,r[a])}return t});var kg=Eg;function baseSet(e,r,t,n){if(!$(e)){return e}r=li(r,e);var a=-1,i=r.length,o=i-1,u=e;while(u!=null&&++ar||i&&o&&s&&!u&&!c||n&&o&&s||!t&&s||!a){return 1}if(!n&&!i&&!c&&e=u){return s}var c=t[n];return s*(c=="desc"?-1:1)}}return e.index-r.index}var Dg=compareMultiple;function baseOrderBy(e,r,t){var n=-1;r=R(r.length?r:[te],Ln(Bl));var a=Qd(e,function(e,t,a){var i=R(r,function(r){return r(e)});return{criteria:i,index:++n,value:e}});return Mg(a,function(e,r){return Dg(e,r,t)})}var Fg=baseOrderBy;function orderBy(e,r,t,n){if(e==null){return[]}if(!T(r)){r=r==null?[]:[r]}t=n?undefined:t;if(!T(t)){t=t==null?[]:[t]}return Fg(e,r,t)}var Lg=orderBy;function createOver(e){return xi(function(r){r=R(r,Ln(Bl));return $t(function(t){var n=this;return e(r,function(e){return De(e,n,t)})})})}var Ng=createOver;var zg=Ng(R);var $g=zg;var Ug=$t;var qg=Ug;var Hg=Math.min;var Vg=qg(function(e,r){r=r.length==1&&T(r[0])?R(r[0],Ln(Bl)):R(mi(r,1),Ln(Bl));var t=r.length;return $t(function(n){var a=-1,i=Hg(n.length,t);while(++aJg){return t}do{if(r%2){t+=e}r=Xg(r/2);if(r){e+=e}}while(r);return t}var eb=baseRepeat;var rb=Wl("length");var tb=rb;var nb="\\ud800-\\udfff",ab="\\u0300-\\u036f",ib="\\ufe20-\\ufe2f",ob="\\u20d0-\\u20ff",ub=ab+ib+ob,sb="\\ufe0e\\ufe0f";var cb="["+nb+"]",fb="["+ub+"]",lb="\\ud83c[\\udffb-\\udfff]",vb="(?:"+fb+"|"+lb+")",db="[^"+nb+"]",pb="(?:\\ud83c[\\udde6-\\uddff]){2}",hb="[\\ud800-\\udbff][\\udc00-\\udfff]",yb="\\u200d";var gb=vb+"?",bb="["+sb+"]?",_b="(?:"+yb+"(?:"+[db,pb,hb].join("|")+")"+bb+gb+")*",mb=bb+gb+_b,wb="(?:"+[db+fb+"?",fb,pb,hb,cb].join("|")+")";var xb=RegExp(lb+"(?="+lb+")|"+wb+mb,"g");function unicodeSize(e){var r=xb.lastIndex=0;while(xb.test(e)){++r}return r}var jb=unicodeSize;function stringSize(e){return so(e)?jb(e):tb(e)}var Ob=stringSize;var Ib=Math.ceil;function createPadding(e,r){r=r===undefined?" ":F(r);var t=r.length;if(t<2){return t?eb(r,e):r}var n=eb(r,Ib(e/Ob(r)));return so(r)?Xi(Ro(n),0,e).join(""):n.slice(0,e)}var Sb=createPadding;var Ab=Math.ceil,Eb=Math.floor;function pad(e,r,t){e=fi(e);r=X(r);var n=r?Ob(e):0;if(!r||n>=r){return e}var a=(r-n)/2;return Sb(Eb(a),t)+e+Sb(Ab(a),t)}var kb=pad;function padEnd(e,r,t){e=fi(e);r=X(r);var n=r?Ob(e):0;return r&&n-1){if(u!==e){Yb.call(u,s,1)}Yb.call(e,s,1)}}return e}var Qb=basePullAll;function pullAll(e,r){return e&&e.length&&r&&r.length?Qb(e,r):e}var Jb=pullAll;var Xb=$t(Jb);var e_=Xb;function pullAllBy(e,r,t){return e&&e.length&&r&&r.length?Qb(e,r,Bl(t,2)):e}var r_=pullAllBy;function pullAllWith(e,r,t){return e&&e.length&&r&&r.length?Qb(e,r,undefined,t):e}var t_=pullAllWith;var n_=Array.prototype;var a_=n_.splice;function basePullAt(e,r){var t=e?r.length:0,n=t-1;while(t--){var a=r[t];if(t==n||a!==i){var i=a;if(Xr(a)){a_.call(e,a,1)}else{jg(e,a)}}}return e}var i_=basePullAt;var o_=xi(function(e,r){var t=e==null?0:e.length,n=yi(e,r);i_(e,R(r,function(e){return Xr(e,t)?+e:e}).sort(Bg));return n});var u_=o_;var s_=Math.floor,c_=Math.random;function baseRandom(e,r){return e+s_(c_()*(r-e+1))}var f_=baseRandom;var l_=parseFloat;var v_=Math.min,d_=Math.random;function random(e,r,t){if(t&&typeof t!="boolean"&&Vt(e,r,t)){r=t=undefined}if(t===undefined){if(typeof r=="boolean"){t=r;r=undefined}else if(typeof e=="boolean"){t=e;e=undefined}}if(e===undefined&&r===undefined){e=0;r=1}else{e=J(e);if(r===undefined){r=e;e=0}else{r=J(r)}}if(e>r){var n=e;e=r;r=n}if(t||e%1||r%1){var a=d_();return v_(e+a*(r-e+l_("1e-"+((a+"").length-1))),r)}return f_(e,r)}var p_=random;var h_=Math.ceil,y_=Math.max;function baseRange(e,r,t,n){var a=-1,i=y_(h_((r-e)/(t||1)),0),o=Array(i);while(i--){o[n?i:++a]=e;e+=t}return o}var g_=baseRange;function createRange(e){return function(r,t,n){if(n&&typeof n!="number"&&Vt(r,t,n)){t=n=undefined}r=J(r);if(t===undefined){t=r;r=0}else{t=J(t)}n=n===undefined?r1&&Vt(e,r[0],r[1])){r=[]}else if(t>2&&Vt(r[0],r[1],r[2])){r=[r[0]]}return Fg(e,mi(r,1),[])});var cm=sm;var fm=4294967295,lm=fm-1;var vm=Math.floor,dm=Math.min;function baseSortedIndexBy(e,r,t,n){r=t(r);var a=0,i=e==null?0:e.length,o=r!==r,u=r===null,s=k(r),c=r===undefined;while(a>>1;function baseSortedIndex(e,r,t){var n=0,a=e==null?n:e.length;if(typeof r=="number"&&r===r&&a<=ym){while(n>>1,o=e[i];if(o!==null&&!k(o)&&(t?o<=r:o>>0;if(!t){return[]}e=fi(e);if(e&&(typeof r=="string"||r!=null&&!ly(r))){r=F(r);if(!r&&so(e)){return Xi(Ro(e),0,t)}}return e.split(r,t)}var Em=split;var km="Expected a function";var Cm=Math.max;function spread(e,r){if(typeof e!="function"){throw new TypeError(km)}r=r==null?0:Cm(X(r),0);return $t(function(t){var n=t[r],a=Xi(t,0,r);if(n){gi(a,n)}return De(e,this,a)})}var Pm=spread;var Rm=qu(function(e,r,t){return e+(t?" ":"")+Mo(r)});var Wm=Rm;function startsWith(e,r,t){e=fi(e);t=t==null?0:ns(X(t),0,e.length);r=F(r);return e.slice(t,t+r.length)==r}var Tm=startsWith;function stubObject(){return{}}var Mm=stubObject;function stubString(){return""}var Bm=stubString;function stubTrue(){return true}var Dm=stubTrue;var Fm=L(function(e,r){return e-r},0);var Lm=Fm;function sum(e){return e&&e.length?Yy(e,te):0}var Nm=sum;function sumBy(e,r){return e&&e.length?Yy(e,Bl(r,2)):0}var zm=sumBy;function tail(e){var r=e==null?0:e.length;return r?Ji(e,1,r):[]}var $m=tail;function take(e,r,t){if(!(e&&e.length)){return[]}r=t||r===undefined?1:X(r);return Ji(e,0,r<0?0:r)}var Um=take;function takeRight(e,r,t){var n=e==null?0:e.length;if(!n){return[]}r=t||r===undefined?1:X(r);r=n-r;return Ji(e,r<0?0:r,n)}var qm=takeRight;function takeRightWhile(e,r){return e&&e.length?Qv(e,Bl(r,3),false,true):[]}var Hm=takeRightWhile;function takeWhile(e,r){return e&&e.length?Qv(e,Bl(r,3)):[]}var Vm=takeWhile;function tap(e,r){r(e);return e}var Gm=tap;var Km=Object.prototype;var Zm=Km.hasOwnProperty;function customDefaultsAssignIn(e,r,t,n){if(e===undefined||Mt(e,Km[t])&&!Zm.call(n,t)){return r}return e}var Ym=customDefaultsAssignIn;var Qm={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function escapeStringChar(e){return"\\"+Qm[e]}var Jm=escapeStringChar;var Xm=/<%=([\s\S]+?)%>/g;var ew=Xm;var rw=/<%-([\s\S]+?)%>/g;var tw=rw;var nw=/<%([\s\S]+?)%>/g;var aw=nw;var iw={escape:tw,evaluate:aw,interpolate:ew,variable:"",imports:{_:{escape:Od}}};var ow=iw;var uw=/\b__p \+= '';/g,sw=/\b(__p \+=) '' \+/g,cw=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var fw=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var lw=/($^)/;var vw=/['\n\r\u2028\u2029\\]/g;var dw=Object.prototype;var pw=dw.hasOwnProperty;function template(e,r,t){var n=ow.imports._.templateSettings||ow;if(t&&Vt(e,r,t)){r=undefined}e=fi(e);r=ga({},r,n,Ym);var a=ga({},r.imports,n.imports,Ym),i=aa(a),o=Kp(a,i);var u,s,c=0,f=r.interpolate||lw,l="__p += '";var v=RegExp((r.escape||lw).source+"|"+f.source+"|"+(f===ew?fw:lw).source+"|"+(r.evaluate||lw).source+"|$","g");var d=pw.call(r,"sourceURL")?"//# sourceURL="+(r.sourceURL+"").replace(/[\r\n]/g," ")+"\n":"";e.replace(v,function(r,t,n,a,i,o){n||(n=a);l+=e.slice(c,o).replace(vw,Jm);if(t){u=true;l+="' +\n__e("+t+") +\n'"}if(i){s=true;l+="';\n"+i+";\n__p += '"}if(n){l+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"}c=o+r.length;return r});l+="';\n";var p=pw.call(r,"variable")&&r.variable;if(!p){l="with (obj) {\n"+l+"\n}\n"}l=(s?l.replace(uw,""):l).replace(sw,"$1").replace(cw,"$1;");l="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+l+"return __p\n}";var h=Fi(function(){return Function(i,d+"return "+l).apply(undefined,o)});h.source=l;if(Bi(h)){throw h}return h}var hw=template;var yw="Expected a function";function throttle(e,r,t){var n=true,a=true;if(typeof e!="function"){throw new TypeError(yw)}if($(t)){n="leading"in t?!!t.leading:n;a="trailing"in t?!!t.trailing:a}return pv(e,r,{leading:n,maxWait:r,trailing:a})}var gw=throttle;function thru(e,r){return r(e)}var bw=thru;var _w=9007199254740991;var mw=4294967295;var ww=Math.min;function times(e,r){e=X(e);if(e<1||e>_w){return[]}var t=mw,n=ww(e,mw);r=ed(r);e-=mw;var a=Yt(n,r);while(++t-1){}return t}var Rw=charsEndIndex;function charsStartIndex(e,r){var t=-1,n=e.length;while(++t-1){}return t}var Ww=charsStartIndex;var Tw=/^\s+|\s+$/g;function trim(e,r,t){e=fi(e);if(e&&(t||r===undefined)){return e.replace(Tw,"")}if(!e||!(r=F(r))){return e}var n=Ro(e),a=Ro(r),i=Ww(n,a),o=Rw(n,a)+1;return Xi(n,i,o).join("")}var Mw=trim;var Bw=/\s+$/;function trimEnd(e,r,t){e=fi(e);if(e&&(t||r===undefined)){return e.replace(Bw,"")}if(!e||!(r=F(r))){return e}var n=Ro(e),a=Rw(n,Ro(r))+1;return Xi(n,0,a).join("")}var Dw=trimEnd;var Fw=/^\s+/;function trimStart(e,r,t){e=fi(e);if(e&&(t||r===undefined)){return e.replace(Fw,"")}if(!e||!(r=F(r))){return e}var n=Ro(e),a=Ww(n,Ro(r));return Xi(n,a).join("")}var Lw=trimStart;var Nw=30,zw="...";var $w=/\w*$/;function truncate(e,r){var t=Nw,n=zw;if($(r)){var a="separator"in r?r.separator:a;t="length"in r?X(r.length):t;n="omission"in r?F(r.omission):n}e=fi(e);var i=e.length;if(so(e)){var o=Ro(e);i=o.length}if(t>=i){return e}var u=t-Ob(n);if(u<1){return n}var s=o?Xi(o,0,u).join(""):e.slice(0,u);if(a===undefined){return s+n}if(o){u+=s.length-u}if(ly(a)){if(e.slice(u).search(a)){var c,f=s;if(!a.global){a=RegExp(a.source,fi($w.exec(a))+"g")}a.lastIndex=0;while(c=a.exec(f)){var l=c.index}s=s.slice(0,l===undefined?u:l)}}else if(e.indexOf(F(a),u)!=u){var v=s.lastIndexOf(a);if(v>-1){s=s.slice(0,v)}}return s+n}var Uw=truncate;function unary(e){return Wt(e,1)}var qw=unary;var Hw={"&":"&","<":"<",">":">",""":'"',"'":"'"};var Vw=Fo(Hw);var Gw=Vw;var Kw=/&(?:amp|lt|gt|quot|#39);/g,Zw=RegExp(Kw.source);function unescape_unescape(e){e=fi(e);return e&&Zw.test(e)?e.replace(Kw,Gw):e}var Yw=unescape_unescape;var Qw=1/0;var Jw=!(Ns&&1/Hf(new Ns([,-0]))[1]==Qw)?Ve:function(e){return new Ns(e)};var Xw=Jw;var ex=200;function baseUniq(e,r,t){var n=-1,a=Cr,i=e.length,o=true,u=[],s=u;if(t){o=false;a=Dv}else if(i>=ex){var c=r?null:Xw(e);if(c){return Hf(c)}o=false;a=Nf;s=new Ff}else{s=r?[]:u}e:while(++n1||this.__actions__.length||!(n instanceof He)||!Xr(t)){return this.thru(a)}n=n.slice(t,+t+(r?1:0));n.__actions__.push({func:bw,args:[a],thisArg:undefined});return new er(n,this.__chain__).thru(function(e){if(r&&!e.length){e.push(undefined)}return e})});var Ax=Sx;function wrapperChain(){return Xu(this)}var Ex=wrapperChain;function wrapperReverse(){var e=this.__wrapped__;if(e instanceof He){var r=e;if(this.__actions__.length){r=new He(this)}r=r.reverse();r.__actions__.push({func:bw,args:[L_],thisArg:undefined});return new er(r,this.__chain__)}return this.thru(L_)}var kx=wrapperReverse;function baseXor(e,r,t){var n=e.length;if(n<2){return n?rx(e[0]):[]}var a=-1,i=Array(n);while(++a1?e[r-1]:undefined;t=typeof t=="function"?(e.pop(),t):undefined;return yx(e,t)});var Ux=$x;var qx={chunk:ts,compact:Wf,concat:Tf,difference:zv,differenceBy:qv,differenceWith:Vv,drop:Zv,dropRight:Yv,dropRightWhile:Jv,dropWhile:Xv,fill:Td,findIndex:Ld,findLastIndex:Vd,first:Yd,flatten:wi,flattenDeep:ap,flattenDepth:ip,fromPairs:Op,head:Yd,indexOf:Xp,initial:eh,intersection:ih,intersectionBy:uh,intersectionWith:ch,join:jy,last:$v,lastIndexOf:Py,nth:wg,pull:e_,pullAll:Jb,pullAllBy:r_,pullAllWith:t_,pullAt:u_,remove:P_,reverse:L_,slice:nm,sortedIndex:bm,sortedIndexBy:_m,sortedIndexOf:mm,sortedLastIndex:wm,sortedLastIndexBy:xm,sortedLastIndexOf:jm,sortedUniq:Im,sortedUniqBy:Sm,tail:$m,take:Um,takeRight:qm,takeRightWhile:Hm,takeWhile:Vm,union:nx,unionBy:ix,unionWith:ux,uniq:sx,uniqBy:cx,uniqWith:fx,unzip:hx,unzipWith:yx,without:Ox,xor:Rx,xorBy:Tx,xorWith:Bx,zip:Fx,zipObject:Nx,zipObjectDeep:zx,zipWith:Ux};var Hx={countBy:nv,each:rd,eachRight:sd,every:Cd,filter:Bd,find:zd,findLast:Kd,flatMap:Xd,flatMapDeep:rp,flatMapDepth:tp,forEach:rd,forEachRight:sd,groupBy:Pp,includes:Qp,invokeMap:Sh,keyBy:Ay,map:Jd,orderBy:Lg,partition:$b,reduce:A_,reduceRight:k_,reject:C_,sample:q_,sampleSize:K_,shuffle:X_,size:tm,some:um,sortBy:cm};var Vx={now:fv};var Gx={after:re,ary:Wt,before:Ni,bind:qi,bindKey:Qi,curry:ov,curryRight:sv,debounce:pv,defer:Tv,delay:Bv,flip:up,memoize:ni,negate:dg,once:Tg,overArgs:Gg,partial:Db,partialRight:Nb,rearg:I_,rest:M_,spread:Pm,throttle:gw,unary:qw,wrap:Ix};var Kx={castArray:Gu,clone:jf,cloneDeep:Sf,cloneDeepWith:kf,cloneWith:Pf,conformsTo:Ul,eq:Mt,gt:Mp,gte:Dp,isArguments:nn,isArray:T,isArrayBuffer:Ph,isArrayLike:Ht,isArrayLikeObject:wv,isBoolean:Wh,isBuffer:vn,isDate:Fh,isElement:Lh,isEmpty:qh,isEqual:Hh,isEqualWith:Vh,isError:Bi,isFinite:Kh,isFunction:ue,isInteger:Zh,isLength:qt,isMap:Fc,isMatch:Yh,isMatchWith:Qh,isNaN:ey,isNative:ay,isNil:iy,isNull:oy,isNumber:Xh,isObject:$,isObjectLike:A,isPlainObject:Wi,isRegExp:ly,isSafeInteger:dy,isSet:Uc,isString:Gp,isSymbol:k,isTypedArray:Kn,isUndefined:py,isWeakMap:yy,isWeakSet:by,lt:Fy,lte:Ny,toArray:bg,toFinite:J,toInteger:X,toLength:Rd,toNumber:Z,toPlainObject:jv,toSafeInteger:kw,toString:fi};var Zx={add:z,ceil:Ju,divide:Kv,floor:cp,max:Ky,maxBy:Zy,mean:Xy,meanBy:eg,min:ug,minBy:sg,multiply:lg,round:z_,subtract:Lm,sum:Nm,sumBy:zm};var Yx={clamp:as,inRange:Hp,random:p_};var Qx={assign:sa,assignIn:ha,assignInWith:ga,assignWith:_a,at:Oi,create:av,defaults:_v,defaultsDeep:Cv,entries:yd,entriesIn:bd,extend:ha,extendWith:ga,findKey:Ud,findLastKey:Zd,forIn:mp,forInRight:wp,forOwn:xp,forOwnRight:jp,functions:Sp,functionsIn:Ap,get:hi,has:zp,hasIn:kl,invert:hh,invertBy:mh,invoke:Oh,keys:aa,keysIn:da,mapKeys:zy,mapValues:$y,merge:tg,mergeWith:Ev,omit:kg,omitBy:Wg,pick:Hb,pickBy:Rg,result:B_,set:Z_,setWith:Y_,toPairs:yd,toPairsIn:bd,transform:Pw,unset:dx,update:bx,updateWith:_x,values:Zp,valuesIn:xx};var Jx={at:Ax,chain:Xu,commit:Rf,lodash:ir,next:_g,plant:Vb,reverse:kx,tap:Gm,thru:bw,toIterator:jw,toJSON:Iw,value:Iw,valueOf:Iw,wrapperChain:Ex};var Xx={camelCase:Vu,capitalize:Bo,deburr:Zo,endsWith:cd,escape:Od,escapeRegExp:Ad,kebabCase:Iy,lowerCase:Wy,lowerFirst:My,pad:kb,padEnd:Cb,padStart:Pb,parseInt:Tb,repeat:R_,replace:W_,snakeCase:im,split:Em,startCase:Wm,startsWith:Tm,template:hw,templateSettings:ow,toLower:Sw,toUpper:Cw,trim:Mw,trimEnd:Dw,trimStart:Lw,truncate:Uw,unescape:Yw,upperCase:wx,upperFirst:Mo,words:zu};var ej={attempt:Fi,bindAll:Vi,cond:Fl,conforms:$l,constant:br,defaultTo:hv,flow:gp,flowRight:_p,identity:te,iteratee:my,matches:qy,matchesProperty:Vy,method:ag,methodOf:og,mixin:cg,noop:Ve,nthArg:xg,over:$g,overEvery:Zg,overSome:Qg,property:Ml,propertyOf:Gb,range:m_,rangeRight:x_,stubArray:ws,stubFalse:an,stubObject:Mm,stubString:Bm,stubTrue:Dm,times:xw,toPath:Aw,uniqueId:vx};function lazyClone(){var e=new He(this.__wrapped__);e.__actions__=rr(this.__actions__);e.__dir__=this.__dir__;e.__filtered__=this.__filtered__;e.__iteratees__=rr(this.__iteratees__);e.__takeCount__=this.__takeCount__;e.__views__=rr(this.__views__);return e}var rj=lazyClone;function lazyReverse(){if(this.__filtered__){var e=new He(this);e.__dir__=-1;e.__filtered__=true}else{e=this.clone();e.__dir__*=-1}return e}var tj=lazyReverse;var nj=Math.max,aj=Math.min;function getView(e,r,t){var n=-1,a=t.length;while(++n0||r<0)){return new He(t)}if(e<0){t=t.takeRight(-e)}else if(e){t=t.drop(e)}if(r!==undefined){r=X(r);t=r<0?t.dropRight(-r):t.take(r-e)}return t};He.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()};He.prototype.toArray=function(){return this.take(pj)};Kl(He.prototype,function(e,r){var t=/^(?:filter|find|map|reject)|While$/.test(r),n=/^(?:head|last)$/.test(r),a=ir[n?"take"+(r=="last"?"Right":""):r],i=n||/^find/.test(r);if(!a){return}ir.prototype[r]=function(){var r=this.__wrapped__,o=n?[1]:arguments,u=r instanceof He,s=o[0],c=u||T(r);var f=function(e){var r=a.apply(ir,gi([e],o));return n&&l?r[0]:r};if(c&&t&&typeof s=="function"&&s.length!=1){u=c=false}var l=this.__chain__,v=!!this.__actions__.length,d=i&&!l,p=u&&!v;if(!i&&c){r=p?r:new He(this);var h=e.apply(r,o);h.__actions__.push({func:bw,args:[f],thisArg:undefined});return new er(h,l)}if(d&&p){return e.apply(this,o)}h=this.thru(f);return d?n?h.value()[0]:h.value():h}});Ir(["pop","push","shift","sort","splice","unshift"],function(e){var r=hj[e],t=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);ir.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var a=this.value();return r.apply(T(a)?a:[],e)}return this[t](function(t){return r.apply(T(t)?t:[],e)})}});Kl(He.prototype,function(e,r){var t=ir[r];if(t){var n=t.name+"";if(!gj.call(Ye,n)){Ye[n]=[]}Ye[n].push({name:r,func:t})}});Ye[ft(undefined,lj).name]=[{name:"wrapper",func:undefined}];He.prototype.clone=rj;He.prototype.reverse=tj;He.prototype.value=cj;ir.prototype.at=Jx.at;ir.prototype.chain=Jx.wrapperChain;ir.prototype.commit=Jx.commit;ir.prototype.next=Jx.next;ir.prototype.plant=Jx.plant;ir.prototype.reverse=Jx.reverse;ir.prototype.toJSON=ir.prototype.valueOf=ir.prototype.value=Jx.value;ir.prototype.first=ir.prototype.head;if(bj){ir.prototype[bj]=Jx.toIterator}var xj=ir;class image_tag_ImageTag{static createForBase(e){const r="gableroux";const t="unity3d";return new this({repository:r,name:t,version:e})}static createForAction(e){const r="";const t="unity-action";return new this({repository:r,name:t,version:e})}constructor({repository:e="",name:r,version:t}){if(!image_tag_ImageTag.versionPattern.test(t)){throw new Error(`Invalid version "${t}".`)}Object.assign(this,{repository:e,name:r,version:t})}static get versionPattern(){return/^20\d{2}\.\d\.\w{3,4}|3$/}get tag(){return this.version}get image(){return Lw(`${this.repository}/${this.name}`,"/")}toString(){return`${this.image}:${this.tag}`}}var jj=image_tag_ImageTag;class docker_Docker{static async build(e,r=false){const{path:t,dockerfile:n,baseImage:a}=e;const{version:i}=a;const o=jj.createForAction(i);const s=`docker build ${t} --file ${n} --build-arg IMAGE=${a} --tag ${o}`;await Object(u.exec)(s,null,{silent:r});return o}static async run(e,r,t=false){const{unityVersion:n,workspace:a,projectPath:i,testMode:o,artifactsPath:s,useHostNetwork:c,customParameters:f}=r;const l=`docker run --workdir /github/workspace --rm --env UNITY_LICENSE --env UNITY_LICENSE_FILE --env UNITY_EMAIL --env UNITY_PASSWORD --env UNITY_SERIAL --env UNITY_VERSION="${n}" --env PROJECT_PATH="${i}" --env TEST_MODE="${o}" --env ARTIFACTS_PATH="${s}" --env CUSTOM_PARAMETERS="${f}" --env HOME=/github/home --env GITHUB_REF --env GITHUB_SHA --env GITHUB_REPOSITORY --env GITHUB_ACTOR --env GITHUB_WORKFLOW --env GITHUB_HEAD_REF --env GITHUB_BASE_REF --env GITHUB_EVENT_NAME --env GITHUB_WORKSPACE=/github/workspace --env GITHUB_ACTION --env GITHUB_EVENT_PATH --env RUNNER_OS --env RUNNER_TOOL_CACHE --env RUNNER_TEMP --env RUNNER_WORKSPACE --volume "/var/run/docker.sock":"/var/run/docker.sock" --volume "/home/runner/work/_temp/_github_home":"/github/home" --volume "/home/runner/work/_temp/_github_workflow":"/github/workflow" --volume "${a}":"/github/workspace" ${c?"--net=host":""} ${e}`;await Object(u.exec)(l,null,{silent:t})}}var Oj=docker_Docker;class input_Input{static get testModes(){return["all","playmode","editmode"]}static isValidFolderName(e){const r=new RegExp(/^(\.|\.\/)?(\.?\w+([-_]?\w+)*\/?)*$/);return r.test(e)}static getFromUser(){const e=Object(n.getInput)("unityVersion")||"2019.2.11f1";const r=Object(n.getInput)("testMode")||"all";const t=Object(n.getInput)("projectPath")||".";const a=Object(n.getInput)("artifactsPath")||"artifacts";const i=Object(n.getInput)("useHostNetwork")||"false";const o=Object(n.getInput)("customParameters")||"";if(!Qp(this.testModes,r)){throw new Error(`Invalid testMode ${r}`)}if(!this.isValidFolderName(a)){throw new Error(`Invalid artifactsPath "${a}"`)}if(!this.isValidFolderName(t)){throw new Error(`Invalid projectPath "${t}"`)}if(i!=="true"&&i!=="false"){throw new Error(`Invalid useHostNetwork "${i}"`)}const u=t.replace(/\/$/,"");const s=a.replace(/\/$/,"");const c=i==="true";return{unityVersion:e,projectPath:u,testMode:r,artifactsPath:s,useHostNetwork:c,customParameters:o}}}var Ij=input_Input;const Sj=t(470);class Output{static async setArtifactsPath(e){await Sj.setOutput("artifactsPath",e)}}var Aj=Output;async function src_action(){o.checkCompatibility();const{dockerfile:e,workspace:r,actionFolder:t}=o;const{unityVersion:n,projectPath:a,testMode:i,artifactsPath:u,useHostNetwork:s,customParameters:c}=Ij.getFromUser();const f=jj.createForBase(n);const l=await Oj.build({path:t,dockerfile:e,baseImage:f});await Oj.run(l,{workspace:r,unityVersion:n,projectPath:a,testMode:i,artifactsPath:u,useHostNetwork:s,customParameters:c});await Aj.setArtifactsPath(u)}src_action().catch(e=>{Object(n.setFailed)(e.message)})},614:function(e){e.exports=require("events")},622:function(e){e.exports=require("path")},669:function(e){e.exports=require("util")},672:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,a){function fulfilled(e){try{step(n.next(e))}catch(e){a(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){a(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};var a;Object.defineProperty(r,"__esModule",{value:true});const i=t(357);const o=t(747);const u=t(622);a=o.promises,r.chmod=a.chmod,r.copyFile=a.copyFile,r.lstat=a.lstat,r.mkdir=a.mkdir,r.readdir=a.readdir,r.readlink=a.readlink,r.rename=a.rename,r.rmdir=a.rmdir,r.stat=a.stat,r.symlink=a.symlink,r.unlink=a.unlink;r.IS_WINDOWS=process.platform==="win32";function exists(e){return n(this,void 0,void 0,function*(){try{yield r.stat(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true})}r.exists=exists;function isDirectory(e,t=false){return n(this,void 0,void 0,function*(){const n=t?yield r.stat(e):yield r.lstat(e);return n.isDirectory()})}r.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(r.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}r.isRooted=isRooted;function mkdirP(e,t=1e3,a=1){return n(this,void 0,void 0,function*(){i.ok(e,"a path argument must be provided");e=u.resolve(e);if(a>=t)return r.mkdir(e);try{yield r.mkdir(e);return}catch(n){switch(n.code){case"ENOENT":{yield mkdirP(u.dirname(e),t,a+1);yield r.mkdir(e);return}default:{let t;try{t=yield r.stat(e)}catch(e){throw n}if(!t.isDirectory())throw n}}}})}r.mkdirP=mkdirP;function tryGetExecutablePath(e,t){return n(this,void 0,void 0,function*(){let n=undefined;try{n=yield r.stat(e)}catch(r){if(r.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${r}`)}}if(n&&n.isFile()){if(r.IS_WINDOWS){const r=u.extname(e).toUpperCase();if(t.some(e=>e.toUpperCase()===r)){return e}}else{if(isUnixExecutable(n)){return e}}}const a=e;for(const i of t){e=a+i;n=undefined;try{n=yield r.stat(e)}catch(r){if(r.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${r}`)}}if(n&&n.isFile()){if(r.IS_WINDOWS){try{const t=u.dirname(e);const n=u.basename(e).toUpperCase();for(const a of yield r.readdir(t)){if(n===a.toUpperCase()){e=u.join(t,a);break}}}catch(r){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${r}`)}return e}else{if(isUnixExecutable(n)){return e}}}}return""})}r.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(r.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}},747:function(e){e.exports=require("fs")},986:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,a){function fulfilled(e){try{step(n.next(e))}catch(e){a(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){a(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};Object.defineProperty(r,"__esModule",{value:true});const a=t(9);function exec(e,r,t){return n(this,void 0,void 0,function*(){const n=a.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const i=n[0];r=n.slice(1).concat(r||[]);const o=new a.ToolRunner(i,r,t);return o.exec()})}r.exec=exec}},function(e){"use strict";!function(){e.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}}();!function(){var r=Object.prototype.hasOwnProperty;e.d=function(e,t,n){if(!r.call(e,t)){Object.defineProperty(e,t,{enumerable:true,get:n})}}}();!function(){e.t=function(r,t){if(t&1)r=this(r);if(t&8)return r;if(t&4&&typeof r==="object"&&r&&r.__esModule)return r;var n=Object.create(null);e.r(n);Object.defineProperty(n,"default",{enumerable:true,value:r});if(t&2&&typeof r!="string")for(var a in r)e.d(n,a,function(e){return r[e]}.bind(null,a));return n}}();!function(){e.n=function(r){var t=r&&r.__esModule?function getDefault(){return r["default"]}:function getModuleExports(){return r};e.d(t,"a",t);return t}}();!function(){e.hmd=function(e){e=Object.create(e);if(!e.children)e.children=[];Object.defineProperty(e,"loaded",{enumerable:true,get:function(){return e.l}});Object.defineProperty(e,"id",{enumerable:true,get:function(){return e.i}});Object.defineProperty(e,"exports",{enumerable:true,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}});return e}}()}); \ No newline at end of file +module.exports=function(e,r){"use strict";var t={};function __webpack_require__(r){if(t[r]){return t[r].exports}var n=t[r]={i:r,l:false,exports:{}};e[r].call(n.exports,n,n.exports,__webpack_require__);n.l=true;return n.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(501)}r(__webpack_require__);return startup()}({1:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,a){function fulfilled(e){try{step(n.next(e))}catch(e){a(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){a(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};Object.defineProperty(r,"__esModule",{value:true});const a=t(129);const i=t(622);const o=t(669);const u=t(672);const s=o.promisify(a.exec);function cp(e,r,t={}){return n(this,void 0,void 0,function*(){const{force:n,recursive:a}=readCopyOptions(t);const o=(yield u.exists(r))?yield u.stat(r):null;if(o&&o.isFile()&&!n){return}const s=o&&o.isDirectory()?i.join(r,i.basename(e)):r;if(!(yield u.exists(e))){throw new Error(`no such file or directory: ${e}`)}const c=yield u.stat(e);if(c.isDirectory()){if(!a){throw new Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`)}else{yield cpDirRecursive(e,s,0,n)}}else{if(i.relative(e,s)===""){throw new Error(`'${s}' and '${e}' are the same file`)}yield copyFile(e,s,n)}})}r.cp=cp;function mv(e,r,t={}){return n(this,void 0,void 0,function*(){if(yield u.exists(r)){let n=true;if(yield u.isDirectory(r)){r=i.join(r,i.basename(e));n=yield u.exists(r)}if(n){if(t.force==null||t.force){yield rmRF(r)}else{throw new Error("Destination already exists")}}}yield mkdirP(i.dirname(r));yield u.rename(e,r)})}r.mv=mv;function rmRF(e){return n(this,void 0,void 0,function*(){if(u.IS_WINDOWS){try{if(yield u.isDirectory(e,true)){yield s(`rd /s /q "${e}"`)}else{yield s(`del /f /a "${e}"`)}}catch(e){if(e.code!=="ENOENT")throw e}try{yield u.unlink(e)}catch(e){if(e.code!=="ENOENT")throw e}}else{let r=false;try{r=yield u.isDirectory(e)}catch(e){if(e.code!=="ENOENT")throw e;return}if(r){yield s(`rm -rf "${e}"`)}else{yield u.unlink(e)}}})}r.rmRF=rmRF;function mkdirP(e){return n(this,void 0,void 0,function*(){yield u.mkdirP(e)})}r.mkdirP=mkdirP;function which(e,r){return n(this,void 0,void 0,function*(){if(!e){throw new Error("parameter 'tool' is required")}if(r){const r=yield which(e,false);if(!r){if(u.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`)}else{throw new Error(`Unable to locate executable file: ${e}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`)}}}try{const r=[];if(u.IS_WINDOWS&&process.env.PATHEXT){for(const e of process.env.PATHEXT.split(i.delimiter)){if(e){r.push(e)}}}if(u.isRooted(e)){const t=yield u.tryGetExecutablePath(e,r);if(t){return t}return""}if(e.includes("/")||u.IS_WINDOWS&&e.includes("\\")){return""}const t=[];if(process.env.PATH){for(const e of process.env.PATH.split(i.delimiter)){if(e){t.push(e)}}}for(const n of t){const t=yield u.tryGetExecutablePath(n+i.sep+e,r);if(t){return t}}return""}catch(e){throw new Error(`which failed with message ${e.message}`)}})}r.which=which;function readCopyOptions(e){const r=e.force==null?true:e.force;const t=Boolean(e.recursive);return{force:r,recursive:t}}function cpDirRecursive(e,r,t,a){return n(this,void 0,void 0,function*(){if(t>=255)return;t++;yield mkdirP(r);const n=yield u.readdir(e);for(const i of n){const n=`${e}/${i}`;const o=`${r}/${i}`;const s=yield u.lstat(n);if(s.isDirectory()){yield cpDirRecursive(n,o,t,a)}else{yield copyFile(n,o,a)}}yield u.chmod(r,(yield u.stat(e)).mode)})}function copyFile(e,r,t){return n(this,void 0,void 0,function*(){if((yield u.lstat(e)).isSymbolicLink()){try{yield u.lstat(r);yield u.unlink(r)}catch(e){if(e.code==="EPERM"){yield u.chmod(r,"0666");yield u.unlink(r)}}const t=yield u.readlink(e);yield u.symlink(t,r,u.IS_WINDOWS?"junction":null)}else if(!(yield u.exists(r))||t){yield u.copyFile(e,r)}})}},9:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,a){function fulfilled(e){try{step(n.next(e))}catch(e){a(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){a(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};Object.defineProperty(r,"__esModule",{value:true});const a=t(87);const i=t(614);const o=t(129);const u=t(622);const s=t(1);const c=t(672);const f=process.platform==="win32";class ToolRunner extends i.EventEmitter{constructor(e,r,t){super();if(!e){throw new Error("Parameter 'toolPath' cannot be null or empty.")}this.toolPath=e;this.args=r||[];this.options=t||{}}_debug(e){if(this.options.listeners&&this.options.listeners.debug){this.options.listeners.debug(e)}}_getCommandString(e,r){const t=this._getSpawnFileName();const n=this._getSpawnArgs(e);let a=r?"":"[command]";if(f){if(this._isCmdFile()){a+=t;for(const e of n){a+=` ${e}`}}else if(e.windowsVerbatimArguments){a+=`"${t}"`;for(const e of n){a+=` ${e}`}}else{a+=this._windowsQuoteCmdArg(t);for(const e of n){a+=` ${this._windowsQuoteCmdArg(e)}`}}}else{a+=t;for(const e of n){a+=` ${e}`}}return a}_processLineBuffer(e,r,t){try{let n=r+e.toString();let i=n.indexOf(a.EOL);while(i>-1){const e=n.substring(0,i);t(e);n=n.substring(i+a.EOL.length);i=n.indexOf(a.EOL)}r=n}catch(e){this._debug(`error processing line. Failed with error ${e}`)}}_getSpawnFileName(){if(f){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(f){if(this._isCmdFile()){let r=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const t of this.args){r+=" ";r+=e.windowsVerbatimArguments?t:this._windowsQuoteCmdArg(t)}r+='"';return[r]}}return this.args}_endsWith(e,r){return e.endsWith(r)}_isCmdFile(){const e=this.toolPath.toUpperCase();return this._endsWith(e,".CMD")||this._endsWith(e,".BAT")}_windowsQuoteCmdArg(e){if(!this._isCmdFile()){return this._uvQuoteCmdArg(e)}if(!e){return'""'}const r=[" ","\t","&","(",")","[","]","{","}","^","=",";","!","'","+",",","`","~","|","<",">",'"'];let t=false;for(const n of e){if(r.some(e=>e===n)){t=true;break}}if(!t){return e}let n='"';let a=true;for(let r=e.length;r>0;r--){n+=e[r-1];if(a&&e[r-1]==="\\"){n+="\\"}else if(e[r-1]==='"'){a=true;n+='"'}else{a=false}}n+='"';return n.split("").reverse().join("")}_uvQuoteCmdArg(e){if(!e){return'""'}if(!e.includes(" ")&&!e.includes("\t")&&!e.includes('"')){return e}if(!e.includes('"')&&!e.includes("\\")){return`"${e}"`}let r='"';let t=true;for(let n=e.length;n>0;n--){r+=e[n-1];if(t&&e[n-1]==="\\"){r+="\\"}else if(e[n-1]==='"'){t=true;r+="\\"}else{t=false}}r+='"';return r.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const r={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||false,windowsVerbatimArguments:e.windowsVerbatimArguments||false,failOnStdErr:e.failOnStdErr||false,ignoreReturnCode:e.ignoreReturnCode||false,delay:e.delay||1e4};r.outStream=e.outStream||process.stdout;r.errStream=e.errStream||process.stderr;return r}_getSpawnOptions(e,r){e=e||{};const t={};t.cwd=e.cwd;t.env=e.env;t["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){t.argv0=`"${r}"`}return t}exec(){return n(this,void 0,void 0,function*(){if(!c.isRooted(this.toolPath)&&(this.toolPath.includes("/")||f&&this.toolPath.includes("\\"))){this.toolPath=u.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield s.which(this.toolPath,true);return new Promise((e,r)=>{this._debug(`exec tool: ${this.toolPath}`);this._debug("arguments:");for(const e of this.args){this._debug(` ${e}`)}const t=this._cloneExecOptions(this.options);if(!t.silent&&t.outStream){t.outStream.write(this._getCommandString(t)+a.EOL)}const n=new ExecState(t,this.toolPath);n.on("debug",e=>{this._debug(e)});const i=this._getSpawnFileName();const u=o.spawn(i,this._getSpawnArgs(t),this._getSpawnOptions(this.options,i));const s="";if(u.stdout){u.stdout.on("data",e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!t.silent&&t.outStream){t.outStream.write(e)}this._processLineBuffer(e,s,e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}})})}const c="";if(u.stderr){u.stderr.on("data",e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!t.silent&&t.errStream&&t.outStream){const r=t.failOnStdErr?t.errStream:t.outStream;r.write(e)}this._processLineBuffer(e,c,e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}})})}u.on("error",e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()});u.on("exit",e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()});u.on("close",e=>{n.processExitCode=e;n.processExited=true;n.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);n.CheckComplete()});n.on("done",(t,n)=>{if(s.length>0){this.emit("stdline",s)}if(c.length>0){this.emit("errline",c)}u.removeAllListeners();if(t){r(t)}else{e(n)}})})})}}r.ToolRunner=ToolRunner;function argStringToArray(e){const r=[];let t=false;let n=false;let a="";function append(e){if(n&&e!=='"'){a+="\\"}a+=e;n=false}for(let i=0;i0){r.push(a);a=""}continue}append(o)}if(a.length>0){r.push(a.trim())}return r}r.argStringToArray=argStringToArray;class ExecState extends i.EventEmitter{constructor(e,r){super();this.processClosed=false;this.processError="";this.processExitCode=0;this.processExited=false;this.processStderr=false;this.delay=1e4;this.done=false;this.timeout=null;if(!r){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=r;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=setTimeout(ExecState.HandleTimeout,this.delay,this)}}_debug(e){this.emit("debug",e)}_setResult(){let e;if(this.processExited){if(this.processError){e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}}if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.done=true;this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(e.done){return}if(!e.processClosed&&e.processExited){const r=`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;e._debug(r)}e._setResult()}}},87:function(e){e.exports=require("os")},129:function(e){e.exports=require("child_process")},357:function(e){e.exports=require("assert")},431:function(e,r,t){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(Object.hasOwnProperty.call(e,t))r[t]=e[t];r["default"]=e;return r};Object.defineProperty(r,"__esModule",{value:true});const a=n(t(87));function issueCommand(e,r,t){const n=new Command(e,r,t);process.stdout.write(n.toString()+a.EOL)}r.issueCommand=issueCommand;function issue(e,r=""){issueCommand(e,{},r)}r.issue=issue;const i="::";class Command{constructor(e,r,t){if(!e){e="missing.command"}this.command=e;this.properties=r;this.message=t}toString(){let e=i+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=true;for(const t in this.properties){if(this.properties.hasOwnProperty(t)){const n=this.properties[t];if(n){if(r){r=false}else{e+=","}e+=`${t}=${escapeProperty(n)}`}}}}e+=`${i}${escapeData(this.message)}`;return e}}function escapeData(e){return(e||"").replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return(e||"").replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},470:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,a){function fulfilled(e){try{step(n.next(e))}catch(e){a(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){a(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};var a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(Object.hasOwnProperty.call(e,t))r[t]=e[t];r["default"]=e;return r};Object.defineProperty(r,"__esModule",{value:true});const i=t(431);const o=a(t(87));const u=a(t(622));var s;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(s=r.ExitCode||(r.ExitCode={}));function exportVariable(e,r){process.env[e]=r;i.issueCommand("set-env",{name:e},r)}r.exportVariable=exportVariable;function setSecret(e){i.issueCommand("add-mask",{},e)}r.setSecret=setSecret;function addPath(e){i.issueCommand("add-path",{},e);process.env["PATH"]=`${e}${u.delimiter}${process.env["PATH"]}`}r.addPath=addPath;function getInput(e,r){const t=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(r&&r.required&&!t){throw new Error(`Input required and not supplied: ${e}`)}return t.trim()}r.getInput=getInput;function setOutput(e,r){i.issueCommand("set-output",{name:e},r)}r.setOutput=setOutput;function setFailed(e){process.exitCode=s.Failure;error(e)}r.setFailed=setFailed;function debug(e){i.issueCommand("debug",{},e)}r.debug=debug;function error(e){i.issue("error",e)}r.error=error;function warning(e){i.issue("warning",e)}r.warning=warning;function info(e){process.stdout.write(e+o.EOL)}r.info=info;function startGroup(e){i.issue("group",e)}r.startGroup=startGroup;function endGroup(){i.issue("endgroup")}r.endGroup=endGroup;function group(e,r){return n(this,void 0,void 0,function*(){startGroup(e);let t;try{t=yield r()}finally{endGroup()}return t})}r.group=group;function saveState(e,r){i.issueCommand("save-state",{name:e},r)}r.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}r.getState=getState},501:function(e,r,t){"use strict";t.r(r);var n=t(470);var a=t(622);var i=t.n(a);class action_Action{static get supportedPlatforms(){return["linux"]}static get isRunningLocally(){return process.env.RUNNER_WORKSPACE===undefined}static get isRunningFromSource(){return i().basename(__dirname)==="model"}static get name(){return"unity-test-runner"}static get rootFolder(){if(action_Action.isRunningFromSource){return i().dirname(i().dirname(i().dirname(__filename)))}return i().dirname(i().dirname(__filename))}static get actionFolder(){return`${action_Action.rootFolder}/action`}static get dockerfile(){return`${action_Action.actionFolder}/Dockerfile`}static get workspace(){return process.env.GITHUB_WORKSPACE}static checkCompatibility(){const e=process.platform;if(!action_Action.supportedPlatforms.includes(e)){throw new Error(`Currently ${e}-platform is not supported`)}}}var o=action_Action;var u=t(986);var s=typeof global=="object"&&global&&global.Object===Object&&global;var c=s;var f=typeof self=="object"&&self&&self.Object===Object&&self;var l=c||f||Function("return this")();var v=l;var d=v.Symbol;var p=d;var h=Object.prototype;var y=h.hasOwnProperty;var g=h.toString;var b=p?p.toStringTag:undefined;function getRawTag(e){var r=y.call(e,b),t=e[b];try{e[b]=undefined;var n=true}catch(e){}var a=g.call(e);if(n){if(r){e[b]=t}else{delete e[b]}}return a}var _=getRawTag;var m=Object.prototype;var w=m.toString;function objectToString(e){return w.call(e)}var x=objectToString;var j="[object Null]",O="[object Undefined]";var I=p?p.toStringTag:undefined;function baseGetTag(e){if(e==null){return e===undefined?O:j}return I&&I in Object(e)?_(e):x(e)}var S=baseGetTag;function isObjectLike(e){return e!=null&&typeof e=="object"}var A=isObjectLike;var E="[object Symbol]";function isSymbol(e){return typeof e=="symbol"||A(e)&&S(e)==E}var k=isSymbol;var C=0/0;function baseToNumber(e){if(typeof e=="number"){return e}if(k(e)){return C}return+e}var P=baseToNumber;function arrayMap(e,r){var t=-1,n=e==null?0:e.length,a=Array(n);while(++t0){if(++r>=ur){return arguments[0]}}else{r=0}return e.apply(undefined,arguments)}}var fr=shortOut;var lr=fr(Ce);var vr=lr;var dr=/\{\n\/\* \[wrapped with (.+)\] \*/,pr=/,? & /;function getWrapDetails(e){var r=e.match(dr);return r?r[1].split(pr):[]}var hr=getWrapDetails;var yr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function insertWrapDetails(e,r){var t=r.length;if(!t){return e}var n=t-1;r[n]=(t>1?"& ":"")+r[n];r=r.join(t>2?", ":" ");return e.replace(yr,"{\n/* [wrapped with "+r+"] */\n")}var gr=insertWrapDetails;function constant(e){return function(){return e}}var br=constant;var _r=function(){try{var e=Oe(Object,"defineProperty");e({},"",{});return e}catch(e){}}();var mr=_r;var wr=!mr?te:function(e,r){return mr(e,"toString",{configurable:true,enumerable:false,value:br(r),writable:true})};var xr=wr;var jr=fr(xr);var Or=jr;function arrayEach(e,r){var t=-1,n=e==null?0:e.length;while(++t-1}var Cr=arrayIncludes;var Pr=1,Rr=2,Wr=8,Tr=16,Mr=32,Br=64,Dr=128,Fr=256,Lr=512;var Nr=[["ary",Dr],["bind",Pr],["bindKey",Rr],["curry",Wr],["curryRight",Tr],["flip",Lr],["partial",Mr],["partialRight",Br],["rearg",Fr]];function updateWrapDetails(e,r){Ir(Nr,function(t){var n="_."+t[0];if(r&t[1]&&!Cr(e,n)){e.push(n)}});return e.sort()}var zr=updateWrapDetails;function setWrapToString(e,r,t){var n=r+"";return Or(e,gr(n,zr(hr(n),t)))}var $r=setWrapToString;var Ur=1,qr=2,Hr=4,Vr=8,Gr=32,Kr=64;function createRecurry(e,r,t,n,a,i,o,u,s,c){var f=r&Vr,l=f?o:undefined,v=f?undefined:o,d=f?i:undefined,p=f?undefined:i;r|=f?Gr:Kr;r&=~(f?Kr:Gr);if(!(r&Hr)){r&=~(Ur|qr)}var h=[e,r,a,d,l,p,v,u,s,c];var y=t.apply(undefined,h);if(or(e)){vr(y,h)}y.placeholder=n;return $r(y,e,r)}var Zr=createRecurry;function getHolder(e){var r=e;return r.placeholder}var Yr=getHolder;var Qr=9007199254740991;var Jr=/^(?:0|[1-9]\d*)$/;function isIndex(e,r){var t=typeof e;r=r==null?Qr:r;return!!r&&(t=="number"||t!="symbol"&&Jr.test(e))&&(e>-1&&e%1==0&&e1){b.reverse()}if(f&&s-1&&e%1==0&&e<=Ut}var qt=isLength;function isArrayLike(e){return e!=null&&qt(e.length)&&!ue(e)}var Ht=isArrayLike;function isIterateeCall(e,r,t){if(!$(t)){return false}var n=typeof r;if(n=="number"?Ht(t)&&Xr(r,t.length):n=="string"&&r in t){return Mt(t[r],e)}return false}var Vt=isIterateeCall;function createAssigner(e){return $t(function(r,t){var n=-1,a=t.length,i=a>1?t[a-1]:undefined,o=a>2?t[2]:undefined;i=e.length>3&&typeof i=="function"?(a--,i):undefined;if(o&&Vt(t[0],t[1],o)){i=a<3?undefined:i;a=1}r=Object(r);while(++n-1}var Ua=listCacheHas;function listCacheSet(e,r){var t=this.__data__,n=Fa(t,e);if(n<0){++this.size;t.push([e,r])}else{t[n][1]=r}return this}var qa=listCacheSet;function ListCache(e){var r=-1,t=e==null?0:e.length;this.clear();while(++r0&&t(u)){if(r>1){baseFlatten(u,r-1,t,n,a)}else{gi(a,u)}}else if(!n){a[a.length]=u}}return a}var mi=baseFlatten;function flatten(e){var r=e==null?0:e.length;return r?mi(e,1):[]}var wi=flatten;function flatRest(e){return Or(zt(e,undefined,wi),e+"")}var xi=flatRest;var ji=xi(yi);var Oi=ji;var Ii=Jn(Object.getPrototypeOf,Object);var Si=Ii;var Ai="[object Object]";var Ei=Function.prototype,ki=Object.prototype;var Ci=Ei.toString;var Pi=ki.hasOwnProperty;var Ri=Ci.call(Object);function isPlainObject(e){if(!A(e)||S(e)!=Ai){return false}var r=Si(e);if(r===null){return true}var t=Pi.call(r,"constructor")&&r.constructor;return typeof t=="function"&&t instanceof t&&Ci.call(t)==Ri}var Wi=isPlainObject;var Ti="[object DOMException]",Mi="[object Error]";function isError(e){if(!A(e)){return false}var r=S(e);return r==Mi||r==Ti||typeof e.message=="string"&&typeof e.name=="string"&&!Wi(e)}var Bi=isError;var Di=$t(function(e,r){try{return De(e,undefined,r)}catch(e){return Bi(e)?e:new Error(e)}});var Fi=Di;var Li="Expected a function";function before(e,r){var t;if(typeof r!="function"){throw new TypeError(Li)}e=X(e);return function(){if(--e>0){t=r.apply(this,arguments)}if(e<=1){r=undefined}return t}}var Ni=before;var zi=1,$i=32;var Ui=$t(function(e,r,t){var n=zi;if(t.length){var a=nt(t,Yr(Ui));n|=$i}return Pt(e,n,r,t,a)});Ui.placeholder={};var qi=Ui;var Hi=xi(function(e,r){Ir(r,function(r){r=di(r);Tt(e,r,qi(e[r],e))});return e});var Vi=Hi;var Gi=1,Ki=2,Zi=32;var Yi=$t(function(e,r,t){var n=Gi|Ki;if(t.length){var a=nt(t,Yr(Yi));n|=Zi}return Pt(r,n,e,t,a)});Yi.placeholder={};var Qi=Yi;function baseSlice(e,r,t){var n=-1,a=e.length;if(r<0){r=-r>a?0:a+r}t=t>a?a:t;if(t<0){t+=a}a=r>t?0:t-r>>>0;r>>>=0;var i=Array(a);while(++n=n?e:Ji(e,r,t)}var Xi=castSlice;var eo="\\ud800-\\udfff",ro="\\u0300-\\u036f",to="\\ufe20-\\ufe2f",no="\\u20d0-\\u20ff",ao=ro+to+no,io="\\ufe0e\\ufe0f";var oo="\\u200d";var uo=RegExp("["+oo+eo+ao+io+"]");function hasUnicode(e){return uo.test(e)}var so=hasUnicode;function asciiToArray(e){return e.split("")}var co=asciiToArray;var fo="\\ud800-\\udfff",lo="\\u0300-\\u036f",vo="\\ufe20-\\ufe2f",po="\\u20d0-\\u20ff",ho=lo+vo+po,yo="\\ufe0e\\ufe0f";var go="["+fo+"]",bo="["+ho+"]",_o="\\ud83c[\\udffb-\\udfff]",mo="(?:"+bo+"|"+_o+")",wo="[^"+fo+"]",xo="(?:\\ud83c[\\udde6-\\uddff]){2}",jo="[\\ud800-\\udbff][\\udc00-\\udfff]",Oo="\\u200d";var Io=mo+"?",So="["+yo+"]?",Ao="(?:"+Oo+"(?:"+[wo,xo,jo].join("|")+")"+So+Io+")*",Eo=So+Io+Ao,ko="(?:"+[wo+bo+"?",bo,xo,jo,go].join("|")+")";var Co=RegExp(_o+"(?="+_o+")|"+ko+Eo,"g");function unicodeToArray(e){return e.match(Co)||[]}var Po=unicodeToArray;function stringToArray(e){return so(e)?Po(e):co(e)}var Ro=stringToArray;function createCaseFirst(e){return function(r){r=fi(r);var t=so(r)?Ro(r):undefined;var n=t?t[0]:r.charAt(0);var a=t?Xi(t,1).join(""):r.slice(1);return n[e]()+a}}var Wo=createCaseFirst;var To=Wo("toUpperCase");var Mo=To;function capitalize(e){return Mo(fi(e).toLowerCase())}var Bo=capitalize;function arrayReduce(e,r,t,n){var a=-1,i=e==null?0:e.length;if(n&&i){t=e[++a]}while(++a=r?e:r}}return e}var ns=baseClamp;function clamp(e,r,t){if(t===undefined){t=r;r=undefined}if(t!==undefined){t=Z(t);t=t===t?t:0}if(r!==undefined){r=Z(r);r=r===r?r:0}return ns(Z(e),r,t)}var as=clamp;function stackClear(){this.__data__=new Ha;this.size=0}var is=stackClear;function stackDelete(e){var r=this.__data__,t=r["delete"](e);this.size=r.size;return t}var os=stackDelete;function stackGet(e){return this.__data__.get(e)}var us=stackGet;function stackHas(e){return this.__data__.has(e)}var ss=stackHas;var cs=200;function stackSet(e,r){var t=this.__data__;if(t instanceof Ha){var n=t.__data__;if(!Ga||n.lengthu)){return false}var c=i.get(e);if(c&&i.get(r)){return c==r}var f=-1,l=true,v=t&$f?new Ff:undefined;i.set(e,r);i.set(r,e);while(++f=r||t<0||l&&n>=i}function timerExpired(){var e=fv();if(shouldInvoke(e)){return trailingEdge(e)}u=setTimeout(timerExpired,remainingWait(e))}function trailingEdge(e){u=undefined;if(v&&n){return invokeFunc(e)}n=a=undefined;return o}function cancel(){if(u!==undefined){clearTimeout(u)}c=0;n=s=a=u=undefined}function flush(){return u===undefined?o:trailingEdge(fv())}function debounced(){var e=fv(),t=shouldInvoke(e);n=arguments;a=this;s=e;if(t){if(u===undefined){return leadingEdge(s)}if(l){clearTimeout(u);u=setTimeout(timerExpired,r);return invokeFunc(s)}}if(u===undefined){u=setTimeout(timerExpired,r)}return o}debounced.cancel=cancel;debounced.flush=flush;return debounced}var pv=debounce;function defaultTo(e,r){return e==null||e!==e?r:e}var hv=defaultTo;var yv=Object.prototype;var gv=yv.hasOwnProperty;var bv=$t(function(e,r){e=Object(e);var t=-1;var n=r.length;var a=n>2?r[2]:undefined;if(a&&Vt(r[0],r[1],a)){n=1}while(++t=Fv){i=Nf;o=false;r=new Ff(r)}e:while(++a=0&&e.slice(t,a)==r}var cd=endsWith;function baseToPairs(e,r){return R(r,function(r){return[r,e[r]]})}var fd=baseToPairs;function setToPairs(e){var r=-1,t=Array(e.size);e.forEach(function(e){t[++r]=[e,e]});return t}var ld=setToPairs;var vd="[object Map]",dd="[object Set]";function createToPairs(e){return function(r){var t=Xs(r);if(t==vd){return qf(r)}if(t==dd){return ld(r)}return fd(r,e(r))}}var pd=createToPairs;var hd=pd(aa);var yd=hd;var gd=pd(da);var bd=gd;var _d={"&":"&","<":"<",">":">",'"':""","'":"'"};var md=Fo(_d);var wd=md;var xd=/[&<>"']/g,jd=RegExp(xd.source);function escape_escape(e){e=fi(e);return e&&jd.test(e)?e.replace(xd,wd):e}var Od=escape_escape;var Id=/[\\^$.*+?()[\]{}|]/g,Sd=RegExp(Id.source);function escapeRegExp(e){e=fi(e);return e&&Sd.test(e)?e.replace(Id,"\\$&"):e}var Ad=escapeRegExp;function arrayEvery(e,r){var t=-1,n=e==null?0:e.length;while(++ta?0:a+t}n=n===undefined||n>a?a:X(n);if(n<0){n+=a}n=t>n?0:Rd(n);while(t-1?a[i?r[o]:o]:undefined}}var Dd=createFind;var Fd=Math.max;function findIndex(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var a=t==null?0:X(t);if(a<0){a=Fd(n+a,0)}return Sr(e,Bl(r,3),a)}var Ld=findIndex;var Nd=Dd(Ld);var zd=Nd;function baseFindKey(e,r,t){var n;t(e,function(e,t,a){if(r(e,t,a)){n=t;return false}});return n}var $d=baseFindKey;function findKey(e,r){return $d(e,Bl(r,3),Kl)}var Ud=findKey;var qd=Math.max,Hd=Math.min;function findLastIndex(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var a=n-1;if(t!==undefined){a=X(t);a=t<0?qd(n+a,0):Hd(a,n-1)}return Sr(e,Bl(r,3),a,true)}var Vd=findLastIndex;var Gd=Dd(Vd);var Kd=Gd;function findLastKey(e,r){return $d(e,Bl(r,3),id)}var Zd=findLastKey;function head(e){return e&&e.length?e[0]:undefined}var Yd=head;function baseMap(e,r){var t=-1,n=Ht(e)?Array(e.length):[];Ql(e,function(e,a,i){n[++t]=r(e,a,i)});return n}var Qd=baseMap;function map_map(e,r){var t=T(e)?R:Qd;return t(e,Bl(r,3))}var Jd=map_map;function flatMap(e,r){return mi(Jd(e,r),1)}var Xd=flatMap;var ep=1/0;function flatMapDeep(e,r){return mi(Jd(e,r),ep)}var rp=flatMapDeep;function flatMapDepth(e,r,t){t=t===undefined?1:X(t);return mi(Jd(e,r),t)}var tp=flatMapDepth;var np=1/0;function flattenDeep(e){var r=e==null?0:e.length;return r?mi(e,np):[]}var ap=flattenDeep;function flattenDepth(e,r){var t=e==null?0:e.length;if(!t){return[]}r=r===undefined?1:X(r);return mi(e,r)}var ip=flattenDepth;var op=512;function flip(e){return Pt(e,op)}var up=flip;var sp=Yu("floor");var cp=sp;var fp="Expected a function";var lp=8,vp=32,dp=128,pp=256;function createFlow(e){return xi(function(r){var t=r.length,n=t,a=er.prototype.thru;if(e){r.reverse()}while(n--){var i=r[n];if(typeof i!="function"){throw new TypeError(fp)}if(a&&!o&&Xe(i)=="wrapper"){var o=new er([],true)}}n=o?n:t;while(++nr}var Rp=baseGt;function createRelationalOperation(e){return function(r,t){if(!(typeof r=="string"&&typeof t=="string")){r=Z(r);t=Z(t)}return e(r,t)}}var Wp=createRelationalOperation;var Tp=Wp(Rp);var Mp=Tp;var Bp=Wp(function(e,r){return e>=r});var Dp=Bp;var Fp=Object.prototype;var Lp=Fp.hasOwnProperty;function baseHas(e,r){return e!=null&&Lp.call(e,r)}var Np=baseHas;function has(e,r){return e!=null&&El(e,r,Np)}var zp=has;var $p=Math.max,Up=Math.min;function baseInRange(e,r,t){return e>=Up(r,t)&&e<$p(r,t)}var qp=baseInRange;function inRange(e,r,t){r=J(r);if(t===undefined){t=r;r=0}else{t=J(t)}e=Z(e);return qp(e,r,t)}var Hp=inRange;var Vp="[object String]";function isString(e){return typeof e=="string"||!T(e)&&A(e)&&S(e)==Vp}var Gp=isString;function baseValues(e,r){return R(r,function(r){return e[r]})}var Kp=baseValues;function values_values(e){return e==null?[]:Kp(e,aa(e))}var Zp=values_values;var Yp=Math.max;function includes_includes(e,r,t,n){e=Ht(e)?e:Zp(e);t=t&&!n?X(t):0;var a=e.length;if(t<0){t=Yp(a+t,0)}return Gp(e)?t<=a&&e.indexOf(r,t)>-1:!!a&&kr(e,r,t)>-1}var Qp=includes_includes;var Jp=Math.max;function indexOf_indexOf(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var a=t==null?0:X(t);if(a<0){a=Jp(n+a,0)}return kr(e,r,a)}var Xp=indexOf_indexOf;function initial(e){var r=e==null?0:e.length;return r?Ji(e,0,-1):[]}var eh=initial;var rh=Math.min;function baseIntersection(e,r,t){var n=t?Dv:Cr,a=e[0].length,i=e.length,o=i,u=Array(i),s=Infinity,c=[];while(o--){var f=e[o];if(o&&r){f=R(f,Ln(r))}s=rh(f.length,s);u[o]=!t&&(r||a>=120&&f.length>=120)?new Ff(o&&f):undefined}f=e[0];var l=-1,v=u[0];e:while(++l=-vy&&e<=vy}var dy=isSafeInteger;function isUndefined(e){return e===undefined}var py=isUndefined;var hy="[object WeakMap]";function isWeakMap(e){return A(e)&&Xs(e)==hy}var yy=isWeakMap;var gy="[object WeakSet]";function isWeakSet(e){return A(e)&&S(e)==gy}var by=isWeakSet;var _y=1;function iteratee_iteratee(e){return Bl(typeof e=="function"?e:wf(e,_y))}var my=iteratee_iteratee;var wy=Array.prototype;var xy=wy.join;function join(e,r){return e==null?"":xy.call(e,r)}var jy=join;var Oy=qu(function(e,r,t){return e+(t?"-":"")+r.toLowerCase()});var Iy=Oy;var Sy=Xl(function(e,r,t){Tt(e,t,r)});var Ay=Sy;function strictLastIndexOf(e,r,t){var n=t+1;while(n--){if(e[n]===r){return n}}return n}var Ey=strictLastIndexOf;var ky=Math.max,Cy=Math.min;function lastIndexOf(e,r,t){var n=e==null?0:e.length;if(!n){return-1}var a=n;if(t!==undefined){a=X(t);a=a<0?ky(n+a,0):Cy(a,n-1)}return r===r?Ey(e,r,a):Sr(e,Ar,a,true)}var Py=lastIndexOf;var Ry=qu(function(e,r,t){return e+(t?" ":"")+r.toLowerCase()});var Wy=Ry;var Ty=Wo("toLowerCase");var My=Ty;function baseLt(e,r){return e=this.__values__.length,r=e?undefined:this.__values__[this.__index__++];return{done:e,value:r}}var _g=wrapperNext;function baseNth(e,r){var t=e.length;if(!t){return}r+=r<0?t:0;return Xr(r,t)?e[r]:undefined}var mg=baseNth;function nth(e,r){return e&&e.length?mg(e,X(r)):undefined}var wg=nth;function nthArg(e){e=X(e);return $t(function(r){return mg(r,e)})}var xg=nthArg;function baseUnset(e,r){r=li(r,e);e=wh(e,r);return e==null||delete e[di($v(r))]}var jg=baseUnset;function customOmitClone(e){return Wi(e)?undefined:e}var Og=customOmitClone;var Ig=1,Sg=2,Ag=4;var Eg=xi(function(e,r){var t={};if(e==null){return t}var n=false;r=R(r,function(r){r=li(r,e);n||(n=r.length>1);return r});Lt(e,Ts(e),t);if(n){t=wf(t,Ig|Sg|Ag,Og)}var a=r.length;while(a--){jg(t,r[a])}return t});var kg=Eg;function baseSet(e,r,t,n){if(!$(e)){return e}r=li(r,e);var a=-1,i=r.length,o=i-1,u=e;while(u!=null&&++ar||i&&o&&s&&!u&&!c||n&&o&&s||!t&&s||!a){return 1}if(!n&&!i&&!c&&e=u){return s}var c=t[n];return s*(c=="desc"?-1:1)}}return e.index-r.index}var Dg=compareMultiple;function baseOrderBy(e,r,t){var n=-1;r=R(r.length?r:[te],Ln(Bl));var a=Qd(e,function(e,t,a){var i=R(r,function(r){return r(e)});return{criteria:i,index:++n,value:e}});return Mg(a,function(e,r){return Dg(e,r,t)})}var Fg=baseOrderBy;function orderBy(e,r,t,n){if(e==null){return[]}if(!T(r)){r=r==null?[]:[r]}t=n?undefined:t;if(!T(t)){t=t==null?[]:[t]}return Fg(e,r,t)}var Lg=orderBy;function createOver(e){return xi(function(r){r=R(r,Ln(Bl));return $t(function(t){var n=this;return e(r,function(e){return De(e,n,t)})})})}var Ng=createOver;var zg=Ng(R);var $g=zg;var Ug=$t;var qg=Ug;var Hg=Math.min;var Vg=qg(function(e,r){r=r.length==1&&T(r[0])?R(r[0],Ln(Bl)):R(mi(r,1),Ln(Bl));var t=r.length;return $t(function(n){var a=-1,i=Hg(n.length,t);while(++aJg){return t}do{if(r%2){t+=e}r=Xg(r/2);if(r){e+=e}}while(r);return t}var eb=baseRepeat;var rb=Wl("length");var tb=rb;var nb="\\ud800-\\udfff",ab="\\u0300-\\u036f",ib="\\ufe20-\\ufe2f",ob="\\u20d0-\\u20ff",ub=ab+ib+ob,sb="\\ufe0e\\ufe0f";var cb="["+nb+"]",fb="["+ub+"]",lb="\\ud83c[\\udffb-\\udfff]",vb="(?:"+fb+"|"+lb+")",db="[^"+nb+"]",pb="(?:\\ud83c[\\udde6-\\uddff]){2}",hb="[\\ud800-\\udbff][\\udc00-\\udfff]",yb="\\u200d";var gb=vb+"?",bb="["+sb+"]?",_b="(?:"+yb+"(?:"+[db,pb,hb].join("|")+")"+bb+gb+")*",mb=bb+gb+_b,wb="(?:"+[db+fb+"?",fb,pb,hb,cb].join("|")+")";var xb=RegExp(lb+"(?="+lb+")|"+wb+mb,"g");function unicodeSize(e){var r=xb.lastIndex=0;while(xb.test(e)){++r}return r}var jb=unicodeSize;function stringSize(e){return so(e)?jb(e):tb(e)}var Ob=stringSize;var Ib=Math.ceil;function createPadding(e,r){r=r===undefined?" ":F(r);var t=r.length;if(t<2){return t?eb(r,e):r}var n=eb(r,Ib(e/Ob(r)));return so(r)?Xi(Ro(n),0,e).join(""):n.slice(0,e)}var Sb=createPadding;var Ab=Math.ceil,Eb=Math.floor;function pad(e,r,t){e=fi(e);r=X(r);var n=r?Ob(e):0;if(!r||n>=r){return e}var a=(r-n)/2;return Sb(Eb(a),t)+e+Sb(Ab(a),t)}var kb=pad;function padEnd(e,r,t){e=fi(e);r=X(r);var n=r?Ob(e):0;return r&&n-1){if(u!==e){Yb.call(u,s,1)}Yb.call(e,s,1)}}return e}var Qb=basePullAll;function pullAll(e,r){return e&&e.length&&r&&r.length?Qb(e,r):e}var Jb=pullAll;var Xb=$t(Jb);var e_=Xb;function pullAllBy(e,r,t){return e&&e.length&&r&&r.length?Qb(e,r,Bl(t,2)):e}var r_=pullAllBy;function pullAllWith(e,r,t){return e&&e.length&&r&&r.length?Qb(e,r,undefined,t):e}var t_=pullAllWith;var n_=Array.prototype;var a_=n_.splice;function basePullAt(e,r){var t=e?r.length:0,n=t-1;while(t--){var a=r[t];if(t==n||a!==i){var i=a;if(Xr(a)){a_.call(e,a,1)}else{jg(e,a)}}}return e}var i_=basePullAt;var o_=xi(function(e,r){var t=e==null?0:e.length,n=yi(e,r);i_(e,R(r,function(e){return Xr(e,t)?+e:e}).sort(Bg));return n});var u_=o_;var s_=Math.floor,c_=Math.random;function baseRandom(e,r){return e+s_(c_()*(r-e+1))}var f_=baseRandom;var l_=parseFloat;var v_=Math.min,d_=Math.random;function random(e,r,t){if(t&&typeof t!="boolean"&&Vt(e,r,t)){r=t=undefined}if(t===undefined){if(typeof r=="boolean"){t=r;r=undefined}else if(typeof e=="boolean"){t=e;e=undefined}}if(e===undefined&&r===undefined){e=0;r=1}else{e=J(e);if(r===undefined){r=e;e=0}else{r=J(r)}}if(e>r){var n=e;e=r;r=n}if(t||e%1||r%1){var a=d_();return v_(e+a*(r-e+l_("1e-"+((a+"").length-1))),r)}return f_(e,r)}var p_=random;var h_=Math.ceil,y_=Math.max;function baseRange(e,r,t,n){var a=-1,i=y_(h_((r-e)/(t||1)),0),o=Array(i);while(i--){o[n?i:++a]=e;e+=t}return o}var g_=baseRange;function createRange(e){return function(r,t,n){if(n&&typeof n!="number"&&Vt(r,t,n)){t=n=undefined}r=J(r);if(t===undefined){t=r;r=0}else{t=J(t)}n=n===undefined?r1&&Vt(e,r[0],r[1])){r=[]}else if(t>2&&Vt(r[0],r[1],r[2])){r=[r[0]]}return Fg(e,mi(r,1),[])});var cm=sm;var fm=4294967295,lm=fm-1;var vm=Math.floor,dm=Math.min;function baseSortedIndexBy(e,r,t,n){r=t(r);var a=0,i=e==null?0:e.length,o=r!==r,u=r===null,s=k(r),c=r===undefined;while(a>>1;function baseSortedIndex(e,r,t){var n=0,a=e==null?n:e.length;if(typeof r=="number"&&r===r&&a<=ym){while(n>>1,o=e[i];if(o!==null&&!k(o)&&(t?o<=r:o>>0;if(!t){return[]}e=fi(e);if(e&&(typeof r=="string"||r!=null&&!ly(r))){r=F(r);if(!r&&so(e)){return Xi(Ro(e),0,t)}}return e.split(r,t)}var Em=split;var km="Expected a function";var Cm=Math.max;function spread(e,r){if(typeof e!="function"){throw new TypeError(km)}r=r==null?0:Cm(X(r),0);return $t(function(t){var n=t[r],a=Xi(t,0,r);if(n){gi(a,n)}return De(e,this,a)})}var Pm=spread;var Rm=qu(function(e,r,t){return e+(t?" ":"")+Mo(r)});var Wm=Rm;function startsWith(e,r,t){e=fi(e);t=t==null?0:ns(X(t),0,e.length);r=F(r);return e.slice(t,t+r.length)==r}var Tm=startsWith;function stubObject(){return{}}var Mm=stubObject;function stubString(){return""}var Bm=stubString;function stubTrue(){return true}var Dm=stubTrue;var Fm=L(function(e,r){return e-r},0);var Lm=Fm;function sum(e){return e&&e.length?Yy(e,te):0}var Nm=sum;function sumBy(e,r){return e&&e.length?Yy(e,Bl(r,2)):0}var zm=sumBy;function tail(e){var r=e==null?0:e.length;return r?Ji(e,1,r):[]}var $m=tail;function take(e,r,t){if(!(e&&e.length)){return[]}r=t||r===undefined?1:X(r);return Ji(e,0,r<0?0:r)}var Um=take;function takeRight(e,r,t){var n=e==null?0:e.length;if(!n){return[]}r=t||r===undefined?1:X(r);r=n-r;return Ji(e,r<0?0:r,n)}var qm=takeRight;function takeRightWhile(e,r){return e&&e.length?Qv(e,Bl(r,3),false,true):[]}var Hm=takeRightWhile;function takeWhile(e,r){return e&&e.length?Qv(e,Bl(r,3)):[]}var Vm=takeWhile;function tap(e,r){r(e);return e}var Gm=tap;var Km=Object.prototype;var Zm=Km.hasOwnProperty;function customDefaultsAssignIn(e,r,t,n){if(e===undefined||Mt(e,Km[t])&&!Zm.call(n,t)){return r}return e}var Ym=customDefaultsAssignIn;var Qm={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function escapeStringChar(e){return"\\"+Qm[e]}var Jm=escapeStringChar;var Xm=/<%=([\s\S]+?)%>/g;var ew=Xm;var rw=/<%-([\s\S]+?)%>/g;var tw=rw;var nw=/<%([\s\S]+?)%>/g;var aw=nw;var iw={escape:tw,evaluate:aw,interpolate:ew,variable:"",imports:{_:{escape:Od}}};var ow=iw;var uw=/\b__p \+= '';/g,sw=/\b(__p \+=) '' \+/g,cw=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var fw=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var lw=/($^)/;var vw=/['\n\r\u2028\u2029\\]/g;var dw=Object.prototype;var pw=dw.hasOwnProperty;function template(e,r,t){var n=ow.imports._.templateSettings||ow;if(t&&Vt(e,r,t)){r=undefined}e=fi(e);r=ga({},r,n,Ym);var a=ga({},r.imports,n.imports,Ym),i=aa(a),o=Kp(a,i);var u,s,c=0,f=r.interpolate||lw,l="__p += '";var v=RegExp((r.escape||lw).source+"|"+f.source+"|"+(f===ew?fw:lw).source+"|"+(r.evaluate||lw).source+"|$","g");var d=pw.call(r,"sourceURL")?"//# sourceURL="+(r.sourceURL+"").replace(/[\r\n]/g," ")+"\n":"";e.replace(v,function(r,t,n,a,i,o){n||(n=a);l+=e.slice(c,o).replace(vw,Jm);if(t){u=true;l+="' +\n__e("+t+") +\n'"}if(i){s=true;l+="';\n"+i+";\n__p += '"}if(n){l+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"}c=o+r.length;return r});l+="';\n";var p=pw.call(r,"variable")&&r.variable;if(!p){l="with (obj) {\n"+l+"\n}\n"}l=(s?l.replace(uw,""):l).replace(sw,"$1").replace(cw,"$1;");l="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+l+"return __p\n}";var h=Fi(function(){return Function(i,d+"return "+l).apply(undefined,o)});h.source=l;if(Bi(h)){throw h}return h}var hw=template;var yw="Expected a function";function throttle(e,r,t){var n=true,a=true;if(typeof e!="function"){throw new TypeError(yw)}if($(t)){n="leading"in t?!!t.leading:n;a="trailing"in t?!!t.trailing:a}return pv(e,r,{leading:n,maxWait:r,trailing:a})}var gw=throttle;function thru(e,r){return r(e)}var bw=thru;var _w=9007199254740991;var mw=4294967295;var ww=Math.min;function times(e,r){e=X(e);if(e<1||e>_w){return[]}var t=mw,n=ww(e,mw);r=ed(r);e-=mw;var a=Yt(n,r);while(++t-1){}return t}var Rw=charsEndIndex;function charsStartIndex(e,r){var t=-1,n=e.length;while(++t-1){}return t}var Ww=charsStartIndex;var Tw=/^\s+|\s+$/g;function trim(e,r,t){e=fi(e);if(e&&(t||r===undefined)){return e.replace(Tw,"")}if(!e||!(r=F(r))){return e}var n=Ro(e),a=Ro(r),i=Ww(n,a),o=Rw(n,a)+1;return Xi(n,i,o).join("")}var Mw=trim;var Bw=/\s+$/;function trimEnd(e,r,t){e=fi(e);if(e&&(t||r===undefined)){return e.replace(Bw,"")}if(!e||!(r=F(r))){return e}var n=Ro(e),a=Rw(n,Ro(r))+1;return Xi(n,0,a).join("")}var Dw=trimEnd;var Fw=/^\s+/;function trimStart(e,r,t){e=fi(e);if(e&&(t||r===undefined)){return e.replace(Fw,"")}if(!e||!(r=F(r))){return e}var n=Ro(e),a=Ww(n,Ro(r));return Xi(n,a).join("")}var Lw=trimStart;var Nw=30,zw="...";var $w=/\w*$/;function truncate(e,r){var t=Nw,n=zw;if($(r)){var a="separator"in r?r.separator:a;t="length"in r?X(r.length):t;n="omission"in r?F(r.omission):n}e=fi(e);var i=e.length;if(so(e)){var o=Ro(e);i=o.length}if(t>=i){return e}var u=t-Ob(n);if(u<1){return n}var s=o?Xi(o,0,u).join(""):e.slice(0,u);if(a===undefined){return s+n}if(o){u+=s.length-u}if(ly(a)){if(e.slice(u).search(a)){var c,f=s;if(!a.global){a=RegExp(a.source,fi($w.exec(a))+"g")}a.lastIndex=0;while(c=a.exec(f)){var l=c.index}s=s.slice(0,l===undefined?u:l)}}else if(e.indexOf(F(a),u)!=u){var v=s.lastIndexOf(a);if(v>-1){s=s.slice(0,v)}}return s+n}var Uw=truncate;function unary(e){return Wt(e,1)}var qw=unary;var Hw={"&":"&","<":"<",">":">",""":'"',"'":"'"};var Vw=Fo(Hw);var Gw=Vw;var Kw=/&(?:amp|lt|gt|quot|#39);/g,Zw=RegExp(Kw.source);function unescape_unescape(e){e=fi(e);return e&&Zw.test(e)?e.replace(Kw,Gw):e}var Yw=unescape_unescape;var Qw=1/0;var Jw=!(Ns&&1/Hf(new Ns([,-0]))[1]==Qw)?Ve:function(e){return new Ns(e)};var Xw=Jw;var ex=200;function baseUniq(e,r,t){var n=-1,a=Cr,i=e.length,o=true,u=[],s=u;if(t){o=false;a=Dv}else if(i>=ex){var c=r?null:Xw(e);if(c){return Hf(c)}o=false;a=Nf;s=new Ff}else{s=r?[]:u}e:while(++n1||this.__actions__.length||!(n instanceof He)||!Xr(t)){return this.thru(a)}n=n.slice(t,+t+(r?1:0));n.__actions__.push({func:bw,args:[a],thisArg:undefined});return new er(n,this.__chain__).thru(function(e){if(r&&!e.length){e.push(undefined)}return e})});var Ax=Sx;function wrapperChain(){return Xu(this)}var Ex=wrapperChain;function wrapperReverse(){var e=this.__wrapped__;if(e instanceof He){var r=e;if(this.__actions__.length){r=new He(this)}r=r.reverse();r.__actions__.push({func:bw,args:[L_],thisArg:undefined});return new er(r,this.__chain__)}return this.thru(L_)}var kx=wrapperReverse;function baseXor(e,r,t){var n=e.length;if(n<2){return n?rx(e[0]):[]}var a=-1,i=Array(n);while(++a1?e[r-1]:undefined;t=typeof t=="function"?(e.pop(),t):undefined;return yx(e,t)});var Ux=$x;var qx={chunk:ts,compact:Wf,concat:Tf,difference:zv,differenceBy:qv,differenceWith:Vv,drop:Zv,dropRight:Yv,dropRightWhile:Jv,dropWhile:Xv,fill:Td,findIndex:Ld,findLastIndex:Vd,first:Yd,flatten:wi,flattenDeep:ap,flattenDepth:ip,fromPairs:Op,head:Yd,indexOf:Xp,initial:eh,intersection:ih,intersectionBy:uh,intersectionWith:ch,join:jy,last:$v,lastIndexOf:Py,nth:wg,pull:e_,pullAll:Jb,pullAllBy:r_,pullAllWith:t_,pullAt:u_,remove:P_,reverse:L_,slice:nm,sortedIndex:bm,sortedIndexBy:_m,sortedIndexOf:mm,sortedLastIndex:wm,sortedLastIndexBy:xm,sortedLastIndexOf:jm,sortedUniq:Im,sortedUniqBy:Sm,tail:$m,take:Um,takeRight:qm,takeRightWhile:Hm,takeWhile:Vm,union:nx,unionBy:ix,unionWith:ux,uniq:sx,uniqBy:cx,uniqWith:fx,unzip:hx,unzipWith:yx,without:Ox,xor:Rx,xorBy:Tx,xorWith:Bx,zip:Fx,zipObject:Nx,zipObjectDeep:zx,zipWith:Ux};var Hx={countBy:nv,each:rd,eachRight:sd,every:Cd,filter:Bd,find:zd,findLast:Kd,flatMap:Xd,flatMapDeep:rp,flatMapDepth:tp,forEach:rd,forEachRight:sd,groupBy:Pp,includes:Qp,invokeMap:Sh,keyBy:Ay,map:Jd,orderBy:Lg,partition:$b,reduce:A_,reduceRight:k_,reject:C_,sample:q_,sampleSize:K_,shuffle:X_,size:tm,some:um,sortBy:cm};var Vx={now:fv};var Gx={after:re,ary:Wt,before:Ni,bind:qi,bindKey:Qi,curry:ov,curryRight:sv,debounce:pv,defer:Tv,delay:Bv,flip:up,memoize:ni,negate:dg,once:Tg,overArgs:Gg,partial:Db,partialRight:Nb,rearg:I_,rest:M_,spread:Pm,throttle:gw,unary:qw,wrap:Ix};var Kx={castArray:Gu,clone:jf,cloneDeep:Sf,cloneDeepWith:kf,cloneWith:Pf,conformsTo:Ul,eq:Mt,gt:Mp,gte:Dp,isArguments:nn,isArray:T,isArrayBuffer:Ph,isArrayLike:Ht,isArrayLikeObject:wv,isBoolean:Wh,isBuffer:vn,isDate:Fh,isElement:Lh,isEmpty:qh,isEqual:Hh,isEqualWith:Vh,isError:Bi,isFinite:Kh,isFunction:ue,isInteger:Zh,isLength:qt,isMap:Fc,isMatch:Yh,isMatchWith:Qh,isNaN:ey,isNative:ay,isNil:iy,isNull:oy,isNumber:Xh,isObject:$,isObjectLike:A,isPlainObject:Wi,isRegExp:ly,isSafeInteger:dy,isSet:Uc,isString:Gp,isSymbol:k,isTypedArray:Kn,isUndefined:py,isWeakMap:yy,isWeakSet:by,lt:Fy,lte:Ny,toArray:bg,toFinite:J,toInteger:X,toLength:Rd,toNumber:Z,toPlainObject:jv,toSafeInteger:kw,toString:fi};var Zx={add:z,ceil:Ju,divide:Kv,floor:cp,max:Ky,maxBy:Zy,mean:Xy,meanBy:eg,min:ug,minBy:sg,multiply:lg,round:z_,subtract:Lm,sum:Nm,sumBy:zm};var Yx={clamp:as,inRange:Hp,random:p_};var Qx={assign:sa,assignIn:ha,assignInWith:ga,assignWith:_a,at:Oi,create:av,defaults:_v,defaultsDeep:Cv,entries:yd,entriesIn:bd,extend:ha,extendWith:ga,findKey:Ud,findLastKey:Zd,forIn:mp,forInRight:wp,forOwn:xp,forOwnRight:jp,functions:Sp,functionsIn:Ap,get:hi,has:zp,hasIn:kl,invert:hh,invertBy:mh,invoke:Oh,keys:aa,keysIn:da,mapKeys:zy,mapValues:$y,merge:tg,mergeWith:Ev,omit:kg,omitBy:Wg,pick:Hb,pickBy:Rg,result:B_,set:Z_,setWith:Y_,toPairs:yd,toPairsIn:bd,transform:Pw,unset:dx,update:bx,updateWith:_x,values:Zp,valuesIn:xx};var Jx={at:Ax,chain:Xu,commit:Rf,lodash:ir,next:_g,plant:Vb,reverse:kx,tap:Gm,thru:bw,toIterator:jw,toJSON:Iw,value:Iw,valueOf:Iw,wrapperChain:Ex};var Xx={camelCase:Vu,capitalize:Bo,deburr:Zo,endsWith:cd,escape:Od,escapeRegExp:Ad,kebabCase:Iy,lowerCase:Wy,lowerFirst:My,pad:kb,padEnd:Cb,padStart:Pb,parseInt:Tb,repeat:R_,replace:W_,snakeCase:im,split:Em,startCase:Wm,startsWith:Tm,template:hw,templateSettings:ow,toLower:Sw,toUpper:Cw,trim:Mw,trimEnd:Dw,trimStart:Lw,truncate:Uw,unescape:Yw,upperCase:wx,upperFirst:Mo,words:zu};var ej={attempt:Fi,bindAll:Vi,cond:Fl,conforms:$l,constant:br,defaultTo:hv,flow:gp,flowRight:_p,identity:te,iteratee:my,matches:qy,matchesProperty:Vy,method:ag,methodOf:og,mixin:cg,noop:Ve,nthArg:xg,over:$g,overEvery:Zg,overSome:Qg,property:Ml,propertyOf:Gb,range:m_,rangeRight:x_,stubArray:ws,stubFalse:an,stubObject:Mm,stubString:Bm,stubTrue:Dm,times:xw,toPath:Aw,uniqueId:vx};function lazyClone(){var e=new He(this.__wrapped__);e.__actions__=rr(this.__actions__);e.__dir__=this.__dir__;e.__filtered__=this.__filtered__;e.__iteratees__=rr(this.__iteratees__);e.__takeCount__=this.__takeCount__;e.__views__=rr(this.__views__);return e}var rj=lazyClone;function lazyReverse(){if(this.__filtered__){var e=new He(this);e.__dir__=-1;e.__filtered__=true}else{e=this.clone();e.__dir__*=-1}return e}var tj=lazyReverse;var nj=Math.max,aj=Math.min;function getView(e,r,t){var n=-1,a=t.length;while(++n0||r<0)){return new He(t)}if(e<0){t=t.takeRight(-e)}else if(e){t=t.drop(e)}if(r!==undefined){r=X(r);t=r<0?t.dropRight(-r):t.take(r-e)}return t};He.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()};He.prototype.toArray=function(){return this.take(pj)};Kl(He.prototype,function(e,r){var t=/^(?:filter|find|map|reject)|While$/.test(r),n=/^(?:head|last)$/.test(r),a=ir[n?"take"+(r=="last"?"Right":""):r],i=n||/^find/.test(r);if(!a){return}ir.prototype[r]=function(){var r=this.__wrapped__,o=n?[1]:arguments,u=r instanceof He,s=o[0],c=u||T(r);var f=function(e){var r=a.apply(ir,gi([e],o));return n&&l?r[0]:r};if(c&&t&&typeof s=="function"&&s.length!=1){u=c=false}var l=this.__chain__,v=!!this.__actions__.length,d=i&&!l,p=u&&!v;if(!i&&c){r=p?r:new He(this);var h=e.apply(r,o);h.__actions__.push({func:bw,args:[f],thisArg:undefined});return new er(h,l)}if(d&&p){return e.apply(this,o)}h=this.thru(f);return d?n?h.value()[0]:h.value():h}});Ir(["pop","push","shift","sort","splice","unshift"],function(e){var r=hj[e],t=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);ir.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var a=this.value();return r.apply(T(a)?a:[],e)}return this[t](function(t){return r.apply(T(t)?t:[],e)})}});Kl(He.prototype,function(e,r){var t=ir[r];if(t){var n=t.name+"";if(!gj.call(Ye,n)){Ye[n]=[]}Ye[n].push({name:r,func:t})}});Ye[ft(undefined,lj).name]=[{name:"wrapper",func:undefined}];He.prototype.clone=rj;He.prototype.reverse=tj;He.prototype.value=cj;ir.prototype.at=Jx.at;ir.prototype.chain=Jx.wrapperChain;ir.prototype.commit=Jx.commit;ir.prototype.next=Jx.next;ir.prototype.plant=Jx.plant;ir.prototype.reverse=Jx.reverse;ir.prototype.toJSON=ir.prototype.valueOf=ir.prototype.value=Jx.value;ir.prototype.first=ir.prototype.head;if(bj){ir.prototype[bj]=Jx.toIterator}var xj=ir;class image_tag_ImageTag{static createForBase({version:e,customImage:r}){const t="gableroux";const n="unity3d";return new this({repository:t,name:n,version:e,customImage:r})}static createForAction(e){const r="";const t="unity-action";return new this({repository:r,name:t,version:e})}constructor({repository:e="",name:r,version:t,customImage:n}){if(!image_tag_ImageTag.versionPattern.test(t)){throw new Error(`Invalid version "${t}".`)}Object.assign(this,{repository:e,name:r,version:t,customImage:n})}static get versionPattern(){return/^20\d{2}\.\d\.\w{3,4}|3$/}get tag(){return this.version}get image(){return Lw(`${this.repository}/${this.name}`,"/")}toString(){if(this.customImage&&this.customImage!==""){return this.customImage}return`${this.image}:${this.tag}`}}var jj=image_tag_ImageTag;class docker_Docker{static async build(e,r=false){const{path:t,dockerfile:n,baseImage:a}=e;const{version:i}=a;const o=jj.createForAction(i);const s=`docker build ${t} --file ${n} --build-arg IMAGE=${a} --tag ${o}`;await Object(u.exec)(s,null,{silent:r});return o}static async run(e,r,t=false){const{unityVersion:n,workspace:a,projectPath:i,testMode:o,artifactsPath:s,useHostNetwork:c,customParameters:f}=r;const l=`docker run --workdir /github/workspace --rm --env UNITY_LICENSE --env UNITY_LICENSE_FILE --env UNITY_EMAIL --env UNITY_PASSWORD --env UNITY_SERIAL --env UNITY_VERSION="${n}" --env PROJECT_PATH="${i}" --env TEST_MODE="${o}" --env ARTIFACTS_PATH="${s}" --env CUSTOM_PARAMETERS="${f}" --env HOME=/github/home --env GITHUB_REF --env GITHUB_SHA --env GITHUB_REPOSITORY --env GITHUB_ACTOR --env GITHUB_WORKFLOW --env GITHUB_HEAD_REF --env GITHUB_BASE_REF --env GITHUB_EVENT_NAME --env GITHUB_WORKSPACE=/github/workspace --env GITHUB_ACTION --env GITHUB_EVENT_PATH --env RUNNER_OS --env RUNNER_TOOL_CACHE --env RUNNER_TEMP --env RUNNER_WORKSPACE --volume "/var/run/docker.sock":"/var/run/docker.sock" --volume "/home/runner/work/_temp/_github_home":"/github/home" --volume "/home/runner/work/_temp/_github_workflow":"/github/workflow" --volume "${a}":"/github/workspace" ${c?"--net=host":""} ${e}`;await Object(u.exec)(l,null,{silent:t})}}var Oj=docker_Docker;class input_Input{static get testModes(){return["all","playmode","editmode"]}static isValidFolderName(e){const r=new RegExp(/^(\.|\.\/)?(\.?\w+([-_]?\w+)*\/?)*$/);return r.test(e)}static getFromUser(){const e=Object(n.getInput)("unityVersion")||"2019.2.11f1";const r=Object(n.getInput)("testMode")||"all";const t=Object(n.getInput)("projectPath")||".";const a=Object(n.getInput)("artifactsPath")||"artifacts";const i=Object(n.getInput)("useHostNetwork")||"false";const o=Object(n.getInput)("customParameters")||"";if(!Qp(this.testModes,r)){throw new Error(`Invalid testMode ${r}`)}if(!this.isValidFolderName(a)){throw new Error(`Invalid artifactsPath "${a}"`)}if(!this.isValidFolderName(t)){throw new Error(`Invalid projectPath "${t}"`)}if(i!=="true"&&i!=="false"){throw new Error(`Invalid useHostNetwork "${i}"`)}const u=t.replace(/\/$/,"");const s=a.replace(/\/$/,"");const c=i==="true";return{unityVersion:e,projectPath:u,testMode:r,artifactsPath:s,useHostNetwork:c,customParameters:o}}}var Ij=input_Input;const Sj=t(470);class Output{static async setArtifactsPath(e){await Sj.setOutput("artifactsPath",e)}}var Aj=Output;async function src_action(){o.checkCompatibility();const{dockerfile:e,workspace:r,actionFolder:t}=o;const{unityVersion:n,customImage:a,projectPath:i,testMode:u,artifactsPath:s,useHostNetwork:c,customParameters:f}=Ij.getFromUser();const l=jj.createForBase({version:n,customImage:a});const v=await Oj.build({path:t,dockerfile:e,baseImage:l});await Oj.run(v,{workspace:r,unityVersion:n,projectPath:i,testMode:u,artifactsPath:s,useHostNetwork:c,customParameters:f});await Aj.setArtifactsPath(s)}src_action().catch(e=>{Object(n.setFailed)(e.message)})},614:function(e){e.exports=require("events")},622:function(e){e.exports=require("path")},669:function(e){e.exports=require("util")},672:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,a){function fulfilled(e){try{step(n.next(e))}catch(e){a(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){a(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};var a;Object.defineProperty(r,"__esModule",{value:true});const i=t(357);const o=t(747);const u=t(622);a=o.promises,r.chmod=a.chmod,r.copyFile=a.copyFile,r.lstat=a.lstat,r.mkdir=a.mkdir,r.readdir=a.readdir,r.readlink=a.readlink,r.rename=a.rename,r.rmdir=a.rmdir,r.stat=a.stat,r.symlink=a.symlink,r.unlink=a.unlink;r.IS_WINDOWS=process.platform==="win32";function exists(e){return n(this,void 0,void 0,function*(){try{yield r.stat(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true})}r.exists=exists;function isDirectory(e,t=false){return n(this,void 0,void 0,function*(){const n=t?yield r.stat(e):yield r.lstat(e);return n.isDirectory()})}r.isDirectory=isDirectory;function isRooted(e){e=normalizeSeparators(e);if(!e){throw new Error('isRooted() parameter "p" cannot be empty')}if(r.IS_WINDOWS){return e.startsWith("\\")||/^[A-Z]:/i.test(e)}return e.startsWith("/")}r.isRooted=isRooted;function mkdirP(e,t=1e3,a=1){return n(this,void 0,void 0,function*(){i.ok(e,"a path argument must be provided");e=u.resolve(e);if(a>=t)return r.mkdir(e);try{yield r.mkdir(e);return}catch(n){switch(n.code){case"ENOENT":{yield mkdirP(u.dirname(e),t,a+1);yield r.mkdir(e);return}default:{let t;try{t=yield r.stat(e)}catch(e){throw n}if(!t.isDirectory())throw n}}}})}r.mkdirP=mkdirP;function tryGetExecutablePath(e,t){return n(this,void 0,void 0,function*(){let n=undefined;try{n=yield r.stat(e)}catch(r){if(r.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${r}`)}}if(n&&n.isFile()){if(r.IS_WINDOWS){const r=u.extname(e).toUpperCase();if(t.some(e=>e.toUpperCase()===r)){return e}}else{if(isUnixExecutable(n)){return e}}}const a=e;for(const i of t){e=a+i;n=undefined;try{n=yield r.stat(e)}catch(r){if(r.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${r}`)}}if(n&&n.isFile()){if(r.IS_WINDOWS){try{const t=u.dirname(e);const n=u.basename(e).toUpperCase();for(const a of yield r.readdir(t)){if(n===a.toUpperCase()){e=u.join(t,a);break}}}catch(r){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${r}`)}return e}else{if(isUnixExecutable(n)){return e}}}}return""})}r.tryGetExecutablePath=tryGetExecutablePath;function normalizeSeparators(e){e=e||"";if(r.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&e.gid===process.getgid()||(e.mode&64)>0&&e.uid===process.getuid()}},747:function(e){e.exports=require("fs")},986:function(e,r,t){"use strict";var n=this&&this.__awaiter||function(e,r,t,n){function adopt(e){return e instanceof t?e:new t(function(r){r(e)})}return new(t||(t=Promise))(function(t,a){function fulfilled(e){try{step(n.next(e))}catch(e){a(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){a(e)}}function step(e){e.done?t(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,r||[])).next())})};Object.defineProperty(r,"__esModule",{value:true});const a=t(9);function exec(e,r,t){return n(this,void 0,void 0,function*(){const n=a.argStringToArray(e);if(n.length===0){throw new Error(`Parameter 'commandLine' cannot be null or empty.`)}const i=n[0];r=n.slice(1).concat(r||[]);const o=new a.ToolRunner(i,r,t);return o.exec()})}r.exec=exec}},function(e){"use strict";!function(){e.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}}();!function(){var r=Object.prototype.hasOwnProperty;e.d=function(e,t,n){if(!r.call(e,t)){Object.defineProperty(e,t,{enumerable:true,get:n})}}}();!function(){e.t=function(r,t){if(t&1)r=this(r);if(t&8)return r;if(t&4&&typeof r==="object"&&r&&r.__esModule)return r;var n=Object.create(null);e.r(n);Object.defineProperty(n,"default",{enumerable:true,value:r});if(t&2&&typeof r!="string")for(var a in r)e.d(n,a,function(e){return r[e]}.bind(null,a));return n}}();!function(){e.n=function(r){var t=r&&r.__esModule?function getDefault(){return r["default"]}:function getModuleExports(){return r};e.d(t,"a",t);return t}}();!function(){e.hmd=function(e){e=Object.create(e);if(!e.children)e.children=[];Object.defineProperty(e,"loaded",{enumerable:true,get:function(){return e.l}});Object.defineProperty(e,"id",{enumerable:true,get:function(){return e.i}});Object.defineProperty(e,"exports",{enumerable:true,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}});return e}}()}); \ No newline at end of file diff --git a/src/index.js b/src/index.js index 00a2529..584e6df 100644 --- a/src/index.js +++ b/src/index.js @@ -7,13 +7,14 @@ async function action() { const { dockerfile, workspace, actionFolder } = Action; const { unityVersion, + customImage, projectPath, testMode, artifactsPath, useHostNetwork, customParameters, } = Input.getFromUser(); - const baseImage = ImageTag.createForBase(unityVersion); + const baseImage = ImageTag.createForBase({ version: unityVersion, customImage }); // Build docker image const actionImage = await Docker.build({ path: actionFolder, dockerfile, baseImage }); diff --git a/src/model/image-tag.js b/src/model/image-tag.js index fb91ed2..2500c75 100644 --- a/src/model/image-tag.js +++ b/src/model/image-tag.js @@ -1,10 +1,10 @@ import { trimStart } from 'lodash-es'; class ImageTag { - static createForBase(version) { + static createForBase({ version, customImage }) { const repository = 'gableroux'; const name = 'unity3d'; - return new this({ repository, name, version }); + return new this({ repository, name, version, customImage }); } static createForAction(version) { @@ -13,12 +13,12 @@ class ImageTag { return new this({ repository, name, version }); } - constructor({ repository = '', name, version }) { + constructor({ repository = '', name, version, customImage }) { if (!ImageTag.versionPattern.test(version)) { throw new Error(`Invalid version "${version}".`); } - Object.assign(this, { repository, name, version }); + Object.assign(this, { repository, name, version, customImage }); } static get versionPattern() { @@ -34,6 +34,10 @@ class ImageTag { } toString() { + if (this.customImage && this.customImage !== '') { + return this.customImage; + } + return `${this.image}:${this.tag}`; } } diff --git a/src/model/image-tag.test.js b/src/model/image-tag.test.js index ee01ccd..da533b8 100644 --- a/src/model/image-tag.test.js +++ b/src/model/image-tag.test.js @@ -30,9 +30,18 @@ describe('UnityImageVersion', () => { describe('toString', () => { it('returns the correct version', () => { - const image = ImageTag.createForBase('2099.1.1111'); + const image = ImageTag.createForBase({ version: '2099.1.1111' }); expect(image.toString()).toStrictEqual(`gableroux/unity3d:2099.1.1111`); }); + + it('returns customImage if given', () => { + const image = ImageTag.createForBase({ + version: '2099.1.1111', + customImage: 'unityci/editor:2099.1.1111-base-0', + }); + + expect(image.toString()).toStrictEqual(image.customImage); + }); }); });