From b7fe461760b837036a1ed9783a8fb3e9ab761b13 Mon Sep 17 00:00:00 2001 From: Carlos Miguel Date: Sat, 15 Jan 2022 18:47:07 -0300 Subject: [PATCH] feat: :bento: Adding Iconly Glass library --- dist/app.js | 57342 +++++++++++++++++++++- dist/app.js.map | 2 +- src/@types/Icon.d.ts | 7 +- src/assets/IconlyGlass/Activity.svg | 67 + src/assets/IconlyGlass/Add.svg | 61 + src/assets/IconlyGlass/Arrow-1.svg | 66 + src/assets/IconlyGlass/Arrow.svg | 54 + src/assets/IconlyGlass/Bag-1.svg | 53 + src/assets/IconlyGlass/Bag.svg | 80 + src/assets/IconlyGlass/Bookmark.svg | 54 + src/assets/IconlyGlass/Buy.svg | 61 + src/assets/IconlyGlass/Calendar.svg | 100 + src/assets/IconlyGlass/Camera.svg | 62 + src/assets/IconlyGlass/Chart.svg | 69 + src/assets/IconlyGlass/Chat.svg | 61 + src/assets/IconlyGlass/Clock.svg | 57 + src/assets/IconlyGlass/Close.svg | 58 + src/assets/IconlyGlass/Danger.svg | 57 + src/assets/IconlyGlass/Discount.svg | 61 + src/assets/IconlyGlass/Discovery.svg | 65 + src/assets/IconlyGlass/Document.svg | 57 + src/assets/IconlyGlass/Edit.svg | 61 + src/assets/IconlyGlass/Filter.svg | 35 + src/assets/IconlyGlass/Folder.svg | 58 + src/assets/IconlyGlass/Gallery.svg | 61 + src/assets/IconlyGlass/Game.svg | 95 + src/assets/IconlyGlass/Graph.svg | 72 + src/assets/IconlyGlass/Heart.svg | 79 + src/assets/IconlyGlass/Home.svg | 54 + src/assets/IconlyGlass/Info-1.svg | 58 + src/assets/IconlyGlass/Info.svg | 57 + src/assets/IconlyGlass/Location.svg | 53 + src/assets/IconlyGlass/Lock-1.svg | 61 + src/assets/IconlyGlass/Lock.svg | 81 + src/assets/IconlyGlass/Menu-1.svg | 57 + src/assets/IconlyGlass/Menu.svg | 61 + src/assets/IconlyGlass/Message.svg | 61 + src/assets/IconlyGlass/Notification.svg | 81 + src/assets/IconlyGlass/Paper Plus.svg | 80 + src/assets/IconlyGlass/Paper.svg | 70 + src/assets/IconlyGlass/Play.svg | 62 + src/assets/IconlyGlass/Profile.svg | 51 + src/assets/IconlyGlass/Search.svg | 43 + src/assets/IconlyGlass/Send.svg | 58 + src/assets/IconlyGlass/Setting.svg | 66 + src/assets/IconlyGlass/Shield.svg | 58 + src/assets/IconlyGlass/Show.svg | 66 + src/assets/IconlyGlass/Star-1.svg | 58 + src/assets/IconlyGlass/Star.svg | 31 + src/assets/IconlyGlass/Tick.svg | 61 + src/assets/IconlyGlass/Video.svg | 31 + src/assets/IconlyGlass/Volume.svg | 27 + src/assets/IconlyGlass/Wallet.svg | 91 + src/assets/IconlyGlass/index.ts | 21 + src/components/ContextMenu.tsx | 36 +- src/pages/Home/index.tsx | 11 +- src/pages/Home/styles.ts | 2 + 57 files changed, 60471 insertions(+), 31 deletions(-) create mode 100644 src/assets/IconlyGlass/Activity.svg create mode 100644 src/assets/IconlyGlass/Add.svg create mode 100644 src/assets/IconlyGlass/Arrow-1.svg create mode 100644 src/assets/IconlyGlass/Arrow.svg create mode 100644 src/assets/IconlyGlass/Bag-1.svg create mode 100644 src/assets/IconlyGlass/Bag.svg create mode 100644 src/assets/IconlyGlass/Bookmark.svg create mode 100644 src/assets/IconlyGlass/Buy.svg create mode 100644 src/assets/IconlyGlass/Calendar.svg create mode 100644 src/assets/IconlyGlass/Camera.svg create mode 100644 src/assets/IconlyGlass/Chart.svg create mode 100644 src/assets/IconlyGlass/Chat.svg create mode 100644 src/assets/IconlyGlass/Clock.svg create mode 100644 src/assets/IconlyGlass/Close.svg create mode 100644 src/assets/IconlyGlass/Danger.svg create mode 100644 src/assets/IconlyGlass/Discount.svg create mode 100644 src/assets/IconlyGlass/Discovery.svg create mode 100644 src/assets/IconlyGlass/Document.svg create mode 100644 src/assets/IconlyGlass/Edit.svg create mode 100644 src/assets/IconlyGlass/Filter.svg create mode 100644 src/assets/IconlyGlass/Folder.svg create mode 100644 src/assets/IconlyGlass/Gallery.svg create mode 100644 src/assets/IconlyGlass/Game.svg create mode 100644 src/assets/IconlyGlass/Graph.svg create mode 100644 src/assets/IconlyGlass/Heart.svg create mode 100644 src/assets/IconlyGlass/Home.svg create mode 100644 src/assets/IconlyGlass/Info-1.svg create mode 100644 src/assets/IconlyGlass/Info.svg create mode 100644 src/assets/IconlyGlass/Location.svg create mode 100644 src/assets/IconlyGlass/Lock-1.svg create mode 100644 src/assets/IconlyGlass/Lock.svg create mode 100644 src/assets/IconlyGlass/Menu-1.svg create mode 100644 src/assets/IconlyGlass/Menu.svg create mode 100644 src/assets/IconlyGlass/Message.svg create mode 100644 src/assets/IconlyGlass/Notification.svg create mode 100644 src/assets/IconlyGlass/Paper Plus.svg create mode 100644 src/assets/IconlyGlass/Paper.svg create mode 100644 src/assets/IconlyGlass/Play.svg create mode 100644 src/assets/IconlyGlass/Profile.svg create mode 100644 src/assets/IconlyGlass/Search.svg create mode 100644 src/assets/IconlyGlass/Send.svg create mode 100644 src/assets/IconlyGlass/Setting.svg create mode 100644 src/assets/IconlyGlass/Shield.svg create mode 100644 src/assets/IconlyGlass/Show.svg create mode 100644 src/assets/IconlyGlass/Star-1.svg create mode 100644 src/assets/IconlyGlass/Star.svg create mode 100644 src/assets/IconlyGlass/Tick.svg create mode 100644 src/assets/IconlyGlass/Video.svg create mode 100644 src/assets/IconlyGlass/Volume.svg create mode 100644 src/assets/IconlyGlass/Wallet.svg create mode 100644 src/assets/IconlyGlass/index.ts diff --git a/dist/app.js b/dist/app.js index 68d5cb1..e2d10f8 100644 --- a/dist/app.js +++ b/dist/app.js @@ -1,12 +1,25617 @@ -!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=383)}([function(e,t){e.exports=require("path")},function(e,t){e.exports=require("electron")},function(e,t){e.exports=require("fs")},function(e,t,r){"use strict";var n=r(18),i=r(107),a=r(49),o=r(223),s=r(39);function c(e){return e}function l(e,t){for(var r=0;r1;)try{return u.stringifyByChunk(e,n,r)}catch(e){r=Math.floor(r/2)}return u.stringifyByChar(e)}function d(e,t){for(var r=0;ri)throw new TypeError(`version is longer than ${i} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?o[s.LOOSE]:o[s.FULL]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>a||this.major<0)throw new TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this}}e.exports=u},function(e,t,r){const n=r(52),{MAX_LENGTH:i,MAX_SAFE_INTEGER:a}=r(51),{re:o,t:s}=r(34),c=r(53),{compareIdentifiers:l}=r(78);class u{constructor(e,t){if(t=c(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>i)throw new TypeError(`version is longer than ${i} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?o[s.LOOSE]:o[s.FULL]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>a||this.major<0)throw new TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this}}e.exports=u},function(e,t,r){var n,i,a=r(2),o=r(319),s=r(321),c=r(322),l=r(9);function u(e,t){Object.defineProperty(e,n,{get:function(){return t}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(n=Symbol.for("graceful-fs.queue"),i=Symbol.for("graceful-fs.previous")):(n="___graceful-fs.queue",i="___graceful-fs.previous");var p,d=function(){};if(l.debuglog?d=l.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(d=function(){var e=l.format.apply(l,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),!a[n]){var h=global[n]||[];u(a,h),a.close=function(e){function t(t,r){return e.call(a,t,(function(e){e||v(),"function"==typeof r&&r.apply(this,arguments)}))}return Object.defineProperty(t,i,{value:e}),t}(a.close),a.closeSync=function(e){function t(t){e.apply(a,arguments),v()}return Object.defineProperty(t,i,{value:e}),t}(a.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){d(a[n]),r(22).equal(a[n].length,0)}))}function f(e){o(e),e.gracefulify=f,e.createReadStream=function(t,r){return new e.ReadStream(t,r)},e.createWriteStream=function(t,r){return new e.WriteStream(t,r)};var t=e.readFile;e.readFile=function(e,r,n){"function"==typeof r&&(n=r,r=null);return function e(r,n,i,a){return t(r,n,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?"function"==typeof i&&i.apply(this,arguments):m([e,[r,n,i],t,a||Date.now(),Date.now()])}))}(e,r,n)};var r=e.writeFile;e.writeFile=function(e,t,n,i){"function"==typeof n&&(i=n,n=null);return function e(t,n,i,a,o){return r(t,n,i,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?"function"==typeof a&&a.apply(this,arguments):m([e,[t,n,i,a],r,o||Date.now(),Date.now()])}))}(e,t,n,i)};var n=e.appendFile;n&&(e.appendFile=function(e,t,r,i){"function"==typeof r&&(i=r,r=null);return function e(t,r,i,a,o){return n(t,r,i,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?"function"==typeof a&&a.apply(this,arguments):m([e,[t,r,i,a],n,o||Date.now(),Date.now()])}))}(e,t,r,i)});var i=e.copyFile;i&&(e.copyFile=function(e,t,r,n){"function"==typeof r&&(n=r,r=0);return function e(t,r,n,a,o){return i(t,r,n,(function(i){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?"function"==typeof a&&a.apply(this,arguments):m([e,[t,r,n,a],i,o||Date.now(),Date.now()])}))}(e,t,r,n)});var a=e.readdir;if(e.readdir=function(e,t,r){"function"==typeof t&&(r=t,t=null);return function e(t,r,n,i){return a(t,r,(function(a,o){!a||"EMFILE"!==a.code&&"ENFILE"!==a.code?(o&&o.sort&&o.sort(),"function"==typeof n&&n.call(this,a,o)):m([e,[t,r,n],a,i||Date.now(),Date.now()])}))}(e,t,r)},"v0.8"===process.version.substr(0,4)){var c=s(e);h=c.ReadStream,v=c.WriteStream}var l=e.ReadStream;l&&(h.prototype=Object.create(l.prototype),h.prototype.open=function(){var e=this;b(e.path,e.flags,e.mode,(function(t,r){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r),e.read())}))});var u=e.WriteStream;u&&(v.prototype=Object.create(u.prototype),v.prototype.open=function(){var e=this;b(e.path,e.flags,e.mode,(function(t,r){t?(e.destroy(),e.emit("error",t)):(e.fd=r,e.emit("open",r))}))}),Object.defineProperty(e,"ReadStream",{get:function(){return h},set:function(e){h=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return v},set:function(e){v=e},enumerable:!0,configurable:!0});var p=h;Object.defineProperty(e,"FileReadStream",{get:function(){return p},set:function(e){p=e},enumerable:!0,configurable:!0});var d=v;function h(e,t){return this instanceof h?(l.apply(this,arguments),this):h.apply(Object.create(h.prototype),arguments)}function v(e,t){return this instanceof v?(u.apply(this,arguments),this):v.apply(Object.create(v.prototype),arguments)}Object.defineProperty(e,"FileWriteStream",{get:function(){return d},set:function(e){d=e},enumerable:!0,configurable:!0});var g=e.open;function b(e,t,r,n){return"function"==typeof r&&(n=r,r=null),function e(t,r,n,i,a){return g(t,r,n,(function(o,s){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?"function"==typeof i&&i.apply(this,arguments):m([e,[t,r,n,i],o,a||Date.now(),Date.now()])}))}(e,t,r,n)}return e.open=b,e}function m(e){d("ENQUEUE",e[0].name,e[1]),a[n].push(e),g()}function v(){for(var e=Date.now(),t=0;t2&&(a[n][t][3]=e,a[n][t][4]=e);g()}function g(){if(clearTimeout(p),p=void 0,0!==a[n].length){var e=a[n].shift(),t=e[0],r=e[1],i=e[2],o=e[3],s=e[4];if(void 0===o)d("RETRY",t.name,r),t.apply(null,r);else if(Date.now()-o>=6e4){d("TIMEOUT",t.name,r);var c=r.pop();"function"==typeof c&&c.call(null,i)}else{var l=Date.now()-s,u=Math.max(s-o,1);l>=Math.min(1.2*u,100)?(d("RETRY",t.name,r),t.apply(null,r.concat([o]))):a[n].push(e)}void 0===p&&(p=setTimeout(g,0))}}global[n]||u(global,a[n]),e.exports=f(c(a)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!a.__patched&&(e.exports=f(a),a.__patched=!0)},function(e,t,r){"use strict";t.fromCallback=function(e){return Object.defineProperty((function(...t){if("function"!=typeof t[t.length-1])return new Promise((r,n)=>{e.call(this,...t,(e,t)=>null!=e?n(e):r(t))});e.apply(this,t)}),"name",{value:e.name})},t.fromPromise=function(e){return Object.defineProperty((function(...t){const r=t[t.length-1];if("function"!=typeof r)return e.apply(this,t);e.apply(this,t.slice(0,-1)).then(e=>r(null,e),r)}),"name",{value:e.name})}},function(e,t){e.exports=require("util")},function(e,t,r){"use strict";function n(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r "+e:e}},e.exports=n},function(e,t,r){const n=r(5);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},function(e,t,r){class n{constructor(e,t){if(t=a(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!f(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&m(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,r=i.get(t);if(r)return r;const n=this.options.loose,a=n?l[u.HYPHENRANGELOOSE]:l[u.HYPHENRANGE];e=e.replace(a,C(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(l[u.COMPARATORTRIM],p),s("comparator trim",e,l[u.COMPARATORTRIM]),e=(e=(e=e.replace(l[u.TILDETRIM],d)).replace(l[u.CARETTRIM],h)).split(/\s+/).join(" ");const c=n?l[u.COMPARATORLOOSE]:l[u.COMPARATOR],m=e.split(" ").map(e=>g(e,this.options)).join(" ").split(/\s+/).map(e=>k(e,this.options)).filter(this.options.loose?e=>!!e.match(c):()=>!0).map(e=>new o(e,this.options)),v=(m.length,new Map);for(const e of m){if(f(e))return[e];v.set(e.value,e)}v.size>1&&v.has("")&&v.delete("");const b=[...v.values()];return i.set(t,b),b}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some(r=>v(r,t)&&e.set.some(e=>v(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t"<0.0.0-0"===e.value,m=e=>""===e.value,v=(e,t)=>{let r=!0;const n=e.slice();let i=n.pop();for(;r&&n.length;)r=n.every(e=>i.intersects(e,t)),i=n.pop();return r},g=(e,t)=>(s("comp",e,t),e=w(e,t),s("caret",e),e=y(e,t),s("tildes",e),e=D(e,t),s("xrange",e),e=S(e,t),s("stars",e),e),b=e=>!e||"x"===e.toLowerCase()||"*"===e,y=(e,t)=>e.trim().split(/\s+/).map(e=>x(e,t)).join(" "),x=(e,t)=>{const r=t.loose?l[u.TILDELOOSE]:l[u.TILDE];return e.replace(r,(t,r,n,i,a)=>{let o;return s("tilde",e,t,r,n,i,a),b(r)?o="":b(n)?o=`>=${r}.0.0 <${+r+1}.0.0-0`:b(i)?o=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:a?(s("replaceTilde pr",a),o=`>=${r}.${n}.${i}-${a} <${r}.${+n+1}.0-0`):o=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`,s("tilde return",o),o})},w=(e,t)=>e.trim().split(/\s+/).map(e=>E(e,t)).join(" "),E=(e,t)=>{s("caret",e,t);const r=t.loose?l[u.CARETLOOSE]:l[u.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,i,a,o)=>{let c;return s("caret",e,t,r,i,a,o),b(r)?c="":b(i)?c=`>=${r}.0.0${n} <${+r+1}.0.0-0`:b(a)?c="0"===r?`>=${r}.${i}.0${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${n} <${+r+1}.0.0-0`:o?(s("replaceCaret pr",o),c="0"===r?"0"===i?`>=${r}.${i}.${a}-${o} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}-${o} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a}-${o} <${+r+1}.0.0-0`):(s("no pr"),c="0"===r?"0"===i?`>=${r}.${i}.${a}${n} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a} <${+r+1}.0.0-0`),s("caret return",c),c})},D=(e,t)=>(s("replaceXRanges",e,t),e.split(/\s+/).map(e=>_(e,t)).join(" ")),_=(e,t)=>{e=e.trim();const r=t.loose?l[u.XRANGELOOSE]:l[u.XRANGE];return e.replace(r,(r,n,i,a,o,c)=>{s("xRange",e,r,n,i,a,o,c);const l=b(i),u=l||b(a),p=u||b(o),d=p;return"="===n&&d&&(n=""),c=t.includePrerelease?"-0":"",l?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(u&&(a=0),o=0,">"===n?(n=">=",u?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):"<="===n&&(n="<",u?i=+i+1:a=+a+1),"<"===n&&(c="-0"),r=`${n+i}.${a}.${o}${c}`):u?r=`>=${i}.0.0${c} <${+i+1}.0.0-0`:p&&(r=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),s("xRange return",r),r})},S=(e,t)=>(s("replaceStars",e,t),e.trim().replace(l[u.STAR],"")),k=(e,t)=>(s("replaceGTE0",e,t),e.trim().replace(l[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),C=e=>(t,r,n,i,a,o,s,c,l,u,p,d,h)=>`${r=b(n)?"":b(i)?`>=${n}.0.0${e?"-0":""}`:b(a)?`>=${n}.${i}.0${e?"-0":""}`:o?">="+r:`>=${r}${e?"-0":""}`} ${c=b(l)?"":b(u)?`<${+l+1}.0.0-0`:b(p)?`<${l}.${+u+1}.0-0`:d?`<=${l}.${u}.${p}-${d}`:e?`<${l}.${u}.${+p+1}-0`:"<="+c}`.trim(),A=(e,t,r)=>{for(let r=0;r0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},function(e,t,r){const n=r(6);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},function(e,t,r){class n{constructor(e,t){if(t=a(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof o)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!f(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&m(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,r=i.get(t);if(r)return r;const n=this.options.loose,a=n?l[u.HYPHENRANGELOOSE]:l[u.HYPHENRANGE];e=e.replace(a,C(this.options.includePrerelease)),s("hyphen replace",e),e=e.replace(l[u.COMPARATORTRIM],p),s("comparator trim",e,l[u.COMPARATORTRIM]),e=(e=(e=e.replace(l[u.TILDETRIM],d)).replace(l[u.CARETTRIM],h)).split(/\s+/).join(" ");const c=n?l[u.COMPARATORLOOSE]:l[u.COMPARATOR],m=e.split(" ").map(e=>g(e,this.options)).join(" ").split(/\s+/).map(e=>k(e,this.options)).filter(this.options.loose?e=>!!e.match(c):()=>!0).map(e=>new o(e,this.options)),v=(m.length,new Map);for(const e of m){if(f(e))return[e];v.set(e.value,e)}v.size>1&&v.has("")&&v.delete("");const b=[...v.values()];return i.set(t,b),b}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some(r=>v(r,t)&&e.set.some(e=>v(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t"<0.0.0-0"===e.value,m=e=>""===e.value,v=(e,t)=>{let r=!0;const n=e.slice();let i=n.pop();for(;r&&n.length;)r=n.every(e=>i.intersects(e,t)),i=n.pop();return r},g=(e,t)=>(s("comp",e,t),e=w(e,t),s("caret",e),e=y(e,t),s("tildes",e),e=D(e,t),s("xrange",e),e=S(e,t),s("stars",e),e),b=e=>!e||"x"===e.toLowerCase()||"*"===e,y=(e,t)=>e.trim().split(/\s+/).map(e=>x(e,t)).join(" "),x=(e,t)=>{const r=t.loose?l[u.TILDELOOSE]:l[u.TILDE];return e.replace(r,(t,r,n,i,a)=>{let o;return s("tilde",e,t,r,n,i,a),b(r)?o="":b(n)?o=`>=${r}.0.0 <${+r+1}.0.0-0`:b(i)?o=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:a?(s("replaceTilde pr",a),o=`>=${r}.${n}.${i}-${a} <${r}.${+n+1}.0-0`):o=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`,s("tilde return",o),o})},w=(e,t)=>e.trim().split(/\s+/).map(e=>E(e,t)).join(" "),E=(e,t)=>{s("caret",e,t);const r=t.loose?l[u.CARETLOOSE]:l[u.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,i,a,o)=>{let c;return s("caret",e,t,r,i,a,o),b(r)?c="":b(i)?c=`>=${r}.0.0${n} <${+r+1}.0.0-0`:b(a)?c="0"===r?`>=${r}.${i}.0${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${n} <${+r+1}.0.0-0`:o?(s("replaceCaret pr",o),c="0"===r?"0"===i?`>=${r}.${i}.${a}-${o} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}-${o} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a}-${o} <${+r+1}.0.0-0`):(s("no pr"),c="0"===r?"0"===i?`>=${r}.${i}.${a}${n} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a} <${+r+1}.0.0-0`),s("caret return",c),c})},D=(e,t)=>(s("replaceXRanges",e,t),e.split(/\s+/).map(e=>_(e,t)).join(" ")),_=(e,t)=>{e=e.trim();const r=t.loose?l[u.XRANGELOOSE]:l[u.XRANGE];return e.replace(r,(r,n,i,a,o,c)=>{s("xRange",e,r,n,i,a,o,c);const l=b(i),u=l||b(a),p=u||b(o),d=p;return"="===n&&d&&(n=""),c=t.includePrerelease?"-0":"",l?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(u&&(a=0),o=0,">"===n?(n=">=",u?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):"<="===n&&(n="<",u?i=+i+1:a=+a+1),"<"===n&&(c="-0"),r=`${n+i}.${a}.${o}${c}`):u?r=`>=${i}.0.0${c} <${+i+1}.0.0-0`:p&&(r=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),s("xRange return",r),r})},S=(e,t)=>(s("replaceStars",e,t),e.trim().replace(l[u.STAR],"")),k=(e,t)=>(s("replaceGTE0",e,t),e.trim().replace(l[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),C=e=>(t,r,n,i,a,o,s,c,l,u,p,d,h)=>`${r=b(n)?"":b(i)?`>=${n}.0.0${e?"-0":""}`:b(a)?`>=${n}.${i}.0${e?"-0":""}`:o?">="+r:`>=${r}${e?"-0":""}`} ${c=b(l)?"":b(u)?`<${+l+1}.0.0-0`:b(p)?`<${l}.${+u+1}.0-0`:d?`<=${l}.${u}.${p}-${d}`:e?`<${l}.${u}.${+p+1}-0`:"<="+c}`.trim(),A=(e,t,r)=>{for(let r=0;r0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdaterSignal=t.UPDATE_DOWNLOADED=t.DOWNLOAD_PROGRESS=t.NsisUpdater=t.MacUpdater=t.AppImageUpdater=t.Provider=t.CancellationToken=t.NoOpLogger=t.AppUpdater=void 0;const n=r(4);Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return n.CancellationToken}});var i=r(74);Object.defineProperty(t,"AppUpdater",{enumerable:!0,get:function(){return i.AppUpdater}}),Object.defineProperty(t,"NoOpLogger",{enumerable:!0,get:function(){return i.NoOpLogger}});var a=r(21);Object.defineProperty(t,"Provider",{enumerable:!0,get:function(){return a.Provider}});var o=r(146);Object.defineProperty(t,"AppImageUpdater",{enumerable:!0,get:function(){return o.AppImageUpdater}});var s=r(152);Object.defineProperty(t,"MacUpdater",{enumerable:!0,get:function(){return s.MacUpdater}});var c=r(153);let l;Object.defineProperty(t,"NsisUpdater",{enumerable:!0,get:function(){return c.NsisUpdater}}),Object.defineProperty(t,"autoUpdater",{enumerable:!0,get:()=>l||(l="win32"===process.platform?new(r(153).NsisUpdater):"darwin"===process.platform?new(r(152).MacUpdater):new(r(146).AppImageUpdater),l)}),t.DOWNLOAD_PROGRESS="download-progress",t.UPDATE_DOWNLOADED="update-downloaded";t.UpdaterSignal=class{constructor(e){this.emitter=e}login(e){u(this.emitter,"login",e)}progress(e){u(this.emitter,t.DOWNLOAD_PROGRESS,e)}updateDownloaded(e){u(this.emitter,t.UPDATE_DOWNLOADED,e)}updateCancelled(e){u(this.emitter,"update-cancelled",e)}};function u(e,t,r){e.on(t,r)}},function(e,t,r){"use strict";const n=r(8).fromPromise,{makeDir:i,makeDirSync:a}=r(324),o=n(i);e.exports={mkdirs:o,mkdirsSync:a,mkdirp:o,mkdirpSync:a,ensureDir:o,ensureDirSync:a}},function(e,t){e.exports=require("url")},function(e,t,r){"use strict";if(t.base64=!0,t.array=!0,t.string=!0,t.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,t.nodebuffer="undefined"!=typeof Buffer,t.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)t.blob=!1;else{var n=new ArrayBuffer(0);try{t.blob=0===new Blob([n],{type:"application/zip"}).size}catch(e){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(n),t.blob=0===i.getBlob("application/zip").size}catch(e){t.blob=!1}}}try{t.nodestream=!!r(99).Readable}catch(e){t.nodestream=!1}},function(e,t){e.exports=require("stream")},function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)i(r,n)&&(e[n]=r[n])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var a={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var a=0;a0)return t;if(null!=e.path)return[{url:e.path,sha2:e.sha2,sha512:e.sha512}];throw n.newError("No files provided: "+n.safeStringifyJson(e),"ERR_UPDATER_NO_FILES_PROVIDED")}t.Provider=class{constructor(e){this.runtimeOptions=e,this.requestHeaders=null,this.executor=e.executor}get isUseMultipleRangeRequest(){return!1!==this.runtimeOptions.isUseMultipleRangeRequest}getChannelFilePrefix(){if("linux"===this.runtimeOptions.platform){const e=process.env.TEST_UPDATER_ARCH||process.arch;return"-linux"+("x64"===e?"":"-"+e)}return"darwin"===this.runtimeOptions.platform?"-mac":""}getDefaultChannelName(){return this.getCustomChannelName("latest")}getCustomChannelName(e){return`${e}${this.getChannelFilePrefix()}`}get fileExtraDownloadHeaders(){return null}setRequestHeaders(e){this.requestHeaders=e}httpRequest(e,t,r){return this.executor.request(this.createRequestOptions(e,t),r)}createRequestOptions(e,t){const r={};return null==this.requestHeaders?null!=t&&(r.headers=t):r.headers=null==t?this.requestHeaders:{...this.requestHeaders,...t},n.configureRequestUrl(e,r),r}},t.findFile=function(e,t,r){if(0===e.length)throw n.newError("No files provided","ERR_UPDATER_NO_FILES_PROVIDED");const i=e.find(e=>e.url.pathname.toLowerCase().endsWith("."+t));return null!=i?i:null==r?e[0]:e.find(e=>!r.some(t=>e.url.pathname.toLowerCase().endsWith("."+t)))},t.parseUpdateInfo=function(e,t,r){if(null==e)throw n.newError(`Cannot parse update info from ${t} in the latest release artifacts (${r}): rawData: null`,"ERR_UPDATER_INVALID_UPDATE_INFO");let a;try{a=i.load(e)}catch(i){throw n.newError(`Cannot parse update info from ${t} in the latest release artifacts (${r}): ${i.stack||i.message}, rawData: ${e}`,"ERR_UPDATER_INVALID_UPDATE_INFO")}return a},t.getFileList=o,t.resolveFiles=function(e,t,r=(e=>e)){const i=o(e).map(e=>{if(null==e.sha2&&null==e.sha512)throw n.newError("Update info doesn't contain nor sha256 neither sha512 checksum: "+n.safeStringifyJson(e),"ERR_UPDATER_NO_CHECKSUM");return{url:a.newUrlFromBase(r(e.url),t),info:e}}),s=e.packages,c=null==s?null:s[process.arch]||s.ia32;return null!=c&&(i[0].packageInfo={...c,path:a.newUrlFromBase(r(c.path),t).href}),i}},function(e,t){e.exports=require("assert")},function(e,t,r){"use strict";e.exports={...r(32),...r(138),...r(140),...r(327),...r(329),...r(335),...r(16),...r(340),...r(342),...r(76),...r(24),...r(50)}},function(e,t,r){"use strict";const n=r(8).fromPromise,i=r(32);e.exports={pathExists:n((function(e){return i.access(e).then(()=>!0).catch(()=>!1)})),pathExistsSync:i.existsSync}},function(e,t,r){const{MAX_SAFE_COMPONENT_LENGTH:n}=r(41),i=r(42),a=(t=e.exports={}).re=[],o=t.src=[],s=t.t={};let c=0;const l=(e,t,r)=>{const n=c++;i(n,t),s[e]=n,o[n]=t,a[n]=new RegExp(t,r?"g":void 0)};l("NUMERICIDENTIFIER","0|[1-9]\\d*"),l("NUMERICIDENTIFIERLOOSE","[0-9]+"),l("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),l("MAINVERSION",`(${o[s.NUMERICIDENTIFIER]})\\.(${o[s.NUMERICIDENTIFIER]})\\.(${o[s.NUMERICIDENTIFIER]})`),l("MAINVERSIONLOOSE",`(${o[s.NUMERICIDENTIFIERLOOSE]})\\.(${o[s.NUMERICIDENTIFIERLOOSE]})\\.(${o[s.NUMERICIDENTIFIERLOOSE]})`),l("PRERELEASEIDENTIFIER",`(?:${o[s.NUMERICIDENTIFIER]}|${o[s.NONNUMERICIDENTIFIER]})`),l("PRERELEASEIDENTIFIERLOOSE",`(?:${o[s.NUMERICIDENTIFIERLOOSE]}|${o[s.NONNUMERICIDENTIFIER]})`),l("PRERELEASE",`(?:-(${o[s.PRERELEASEIDENTIFIER]}(?:\\.${o[s.PRERELEASEIDENTIFIER]})*))`),l("PRERELEASELOOSE",`(?:-?(${o[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[s.PRERELEASEIDENTIFIERLOOSE]})*))`),l("BUILDIDENTIFIER","[0-9A-Za-z-]+"),l("BUILD",`(?:\\+(${o[s.BUILDIDENTIFIER]}(?:\\.${o[s.BUILDIDENTIFIER]})*))`),l("FULLPLAIN",`v?${o[s.MAINVERSION]}${o[s.PRERELEASE]}?${o[s.BUILD]}?`),l("FULL",`^${o[s.FULLPLAIN]}$`),l("LOOSEPLAIN",`[v=\\s]*${o[s.MAINVERSIONLOOSE]}${o[s.PRERELEASELOOSE]}?${o[s.BUILD]}?`),l("LOOSE",`^${o[s.LOOSEPLAIN]}$`),l("GTLT","((?:<|>)?=?)"),l("XRANGEIDENTIFIERLOOSE",o[s.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),l("XRANGEIDENTIFIER",o[s.NUMERICIDENTIFIER]+"|x|X|\\*"),l("XRANGEPLAIN",`[v=\\s]*(${o[s.XRANGEIDENTIFIER]})(?:\\.(${o[s.XRANGEIDENTIFIER]})(?:\\.(${o[s.XRANGEIDENTIFIER]})(?:${o[s.PRERELEASE]})?${o[s.BUILD]}?)?)?`),l("XRANGEPLAINLOOSE",`[v=\\s]*(${o[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[s.XRANGEIDENTIFIERLOOSE]})(?:${o[s.PRERELEASELOOSE]})?${o[s.BUILD]}?)?)?`),l("XRANGE",`^${o[s.GTLT]}\\s*${o[s.XRANGEPLAIN]}$`),l("XRANGELOOSE",`^${o[s.GTLT]}\\s*${o[s.XRANGEPLAINLOOSE]}$`),l("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),l("COERCERTL",o[s.COERCE],!0),l("LONETILDE","(?:~>?)"),l("TILDETRIM",`(\\s*)${o[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",l("TILDE",`^${o[s.LONETILDE]}${o[s.XRANGEPLAIN]}$`),l("TILDELOOSE",`^${o[s.LONETILDE]}${o[s.XRANGEPLAINLOOSE]}$`),l("LONECARET","(?:\\^)"),l("CARETTRIM",`(\\s*)${o[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",l("CARET",`^${o[s.LONECARET]}${o[s.XRANGEPLAIN]}$`),l("CARETLOOSE",`^${o[s.LONECARET]}${o[s.XRANGEPLAINLOOSE]}$`),l("COMPARATORLOOSE",`^${o[s.GTLT]}\\s*(${o[s.LOOSEPLAIN]})$|^$`),l("COMPARATOR",`^${o[s.GTLT]}\\s*(${o[s.FULLPLAIN]})$|^$`),l("COMPARATORTRIM",`(\\s*)${o[s.GTLT]}\\s*(${o[s.LOOSEPLAIN]}|${o[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",l("HYPHENRANGE",`^\\s*(${o[s.XRANGEPLAIN]})\\s+-\\s+(${o[s.XRANGEPLAIN]})\\s*$`),l("HYPHENRANGELOOSE",`^\\s*(${o[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[s.XRANGEPLAINLOOSE]})\\s*$`),l("STAR","(<|>)?=?\\s*\\*"),l("GTE0","^\\s*>=\\s*0.0.0\\s*$"),l("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},function(e,t,r){const{MAX_LENGTH:n}=r(41),{re:i,t:a}=r(25),o=r(5),s=r(43);e.exports=(e,t)=>{if(t=s(t),e instanceof o)return e;if("string"!=typeof e)return null;if(e.length>n)return null;if(!(t.loose?i[a.LOOSE]:i[a.FULL]).test(e))return null;try{return new o(e,t)}catch(e){return null}}},function(e,t,r){try{var n=r(9);if("function"!=typeof n.inherits)throw"";e.exports=n.inherits}catch(t){e.exports=r(212)}},function(e,t){e.exports=require("events")},function(e,t,r){"use strict";for(var n=r(3),i=r(18),a=r(49),o=r(10),s=new Array(256),c=0;c<256;c++)s[c]=c>=252?6:c>=248?5:c>=240?4:c>=224?3:c>=192?2:1;s[254]=s[254]=1;function l(){o.call(this,"utf-8 decode"),this.leftOver=null}function u(){o.call(this,"utf-8 encode")}t.utf8encode=function(e){return i.nodebuffer?a.newBufferFrom(e,"utf-8"):function(e){var t,r,n,a,o,s=e.length,c=0;for(a=0;a>>6,t[o++]=128|63&r):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|63&r):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|63&r);return t}(e)},t.utf8decode=function(e){return i.nodebuffer?n.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,i,a,o=e.length,c=new Array(2*o);for(r=0,t=0;t4)c[r++]=65533,t+=a-1;else{for(i&=2===a?31:3===a?15:7;a>1&&t1?c[r++]=65533:i<65536?c[r++]=i:(i-=65536,c[r++]=55296|i>>10&1023,c[r++]=56320|1023&i)}return c.length!==r&&(c.subarray?c=c.subarray(0,r):c.length=r),n.applyFromCharCode(c)}(e=n.transformTo(i.uint8array?"uint8array":"array",e))},n.inherits(l,o),l.prototype.processChunk=function(e){var r=n.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var a=r;(r=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),r.set(a,this.leftOver.length)}else r=this.leftOver.concat(r);this.leftOver=null}var o=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+s[e[r]]>t?r:t}(r),c=r;o!==r.length&&(i.uint8array?(c=r.subarray(0,o),this.leftOver=r.subarray(o,r.length)):(c=r.slice(0,o),this.leftOver=r.slice(o,r.length))),this.push({data:t.utf8decode(c),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=l,n.inherits(u,o),u.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=u},function(e,t,r){"use strict";var n=r(47),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=p;var a=Object.create(r(38));a.inherits=r(27);var o=r(100),s=r(104);a.inherits(p,o);for(var c=i(s.prototype),l=0;l=t)throw new Error("Cannot access property/index "+n+" levels up, current level is "+t);return r[t-n]}if(n>t)throw new Error("Cannot access data "+n+" levels up, current level is "+t);if(a="data"+(t-n||""),!i)return a}for(var s=a,l=i.split("/"),u=0;u"function"==typeof i[e]);Object.assign(t,i),a.forEach(e=>{t[e]=n(i[e])}),t.realpath.native=n(i.realpath.native),t.exists=function(e,t){return"function"==typeof t?i.exists(e,t):new Promise(t=>i.exists(e,t))},t.read=function(e,t,r,n,a,o){return"function"==typeof o?i.read(e,t,r,n,a,o):new Promise((o,s)=>{i.read(e,t,r,n,a,(e,t,r)=>{if(e)return s(e);o({bytesRead:t,buffer:r})})})},t.write=function(e,t,...r){return"function"==typeof r[r.length-1]?i.write(e,t,...r):new Promise((n,a)=>{i.write(e,t,...r,(e,t,r)=>{if(e)return a(e);n({bytesWritten:t,buffer:r})})})},"function"==typeof i.writev&&(t.writev=function(e,t,...r){return"function"==typeof r[r.length-1]?i.writev(e,t,...r):new Promise((n,a)=>{i.writev(e,t,...r,(e,t,r)=>{if(e)return a(e);n({bytesWritten:t,buffers:r})})})})},function(e,t,r){"use strict";const n=r(32),i=r(0),a=r(9);function o(e,t,r){const i=r.dereference?e=>n.stat(e,{bigint:!0}):e=>n.lstat(e,{bigint:!0});return Promise.all([i(e),i(t).catch(e=>{if("ENOENT"===e.code)return null;throw e})]).then(([e,t])=>({srcStat:e,destStat:t}))}function s(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function c(e,t){const r=i.resolve(e).split(i.sep).filter(e=>e),n=i.resolve(t).split(i.sep).filter(e=>e);return r.reduce((e,t,r)=>e&&n[r]===t,!0)}function l(e,t,r){return`Cannot ${r} '${e}' to a subdirectory of itself, '${t}'.`}e.exports={checkPaths:function(e,t,r,n,u){a.callbackify(o)(e,t,n,(n,a)=>{if(n)return u(n);const{srcStat:o,destStat:p}=a;if(p){if(s(o,p)){const n=i.basename(e),a=i.basename(t);return"move"===r&&n!==a&&n.toLowerCase()===a.toLowerCase()?u(null,{srcStat:o,destStat:p,isChangingCase:!0}):u(new Error("Source and destination must not be the same."))}if(o.isDirectory()&&!p.isDirectory())return u(new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`));if(!o.isDirectory()&&p.isDirectory())return u(new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`))}return o.isDirectory()&&c(e,t)?u(new Error(l(e,t,r))):u(null,{srcStat:o,destStat:p})})},checkPathsSync:function(e,t,r,a){const{srcStat:o,destStat:u}=function(e,t,r){let i;const a=r.dereference?e=>n.statSync(e,{bigint:!0}):e=>n.lstatSync(e,{bigint:!0}),o=a(e);try{i=a(t)}catch(e){if("ENOENT"===e.code)return{srcStat:o,destStat:null};throw e}return{srcStat:o,destStat:i}}(e,t,a);if(u){if(s(o,u)){const n=i.basename(e),a=i.basename(t);if("move"===r&&n!==a&&n.toLowerCase()===a.toLowerCase())return{srcStat:o,destStat:u,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(o.isDirectory()&&!u.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!o.isDirectory()&&u.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(o.isDirectory()&&c(e,t))throw new Error(l(e,t,r));return{srcStat:o,destStat:u}},checkParentPaths:function e(t,r,a,o,c){const u=i.resolve(i.dirname(t)),p=i.resolve(i.dirname(a));if(p===u||p===i.parse(p).root)return c();n.stat(p,{bigint:!0},(n,i)=>n?"ENOENT"===n.code?c():c(n):s(r,i)?c(new Error(l(t,a,o))):e(t,r,p,o,c))},checkParentPathsSync:function e(t,r,a,o){const c=i.resolve(i.dirname(t)),u=i.resolve(i.dirname(a));if(u===c||u===i.parse(u).root)return;let p;try{p=n.statSync(u,{bigint:!0})}catch(e){if("ENOENT"===e.code)return;throw e}if(s(r,p))throw new Error(l(t,a,o));return e(t,r,u,o)},isSrcSubdir:c,areIdentical:s}},function(e,t,r){const{MAX_SAFE_COMPONENT_LENGTH:n}=r(51),i=r(52),a=(t=e.exports={}).re=[],o=t.src=[],s=t.t={};let c=0;const l=(e,t,r)=>{const n=c++;i(n,t),s[e]=n,o[n]=t,a[n]=new RegExp(t,r?"g":void 0)};l("NUMERICIDENTIFIER","0|[1-9]\\d*"),l("NUMERICIDENTIFIERLOOSE","[0-9]+"),l("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),l("MAINVERSION",`(${o[s.NUMERICIDENTIFIER]})\\.(${o[s.NUMERICIDENTIFIER]})\\.(${o[s.NUMERICIDENTIFIER]})`),l("MAINVERSIONLOOSE",`(${o[s.NUMERICIDENTIFIERLOOSE]})\\.(${o[s.NUMERICIDENTIFIERLOOSE]})\\.(${o[s.NUMERICIDENTIFIERLOOSE]})`),l("PRERELEASEIDENTIFIER",`(?:${o[s.NUMERICIDENTIFIER]}|${o[s.NONNUMERICIDENTIFIER]})`),l("PRERELEASEIDENTIFIERLOOSE",`(?:${o[s.NUMERICIDENTIFIERLOOSE]}|${o[s.NONNUMERICIDENTIFIER]})`),l("PRERELEASE",`(?:-(${o[s.PRERELEASEIDENTIFIER]}(?:\\.${o[s.PRERELEASEIDENTIFIER]})*))`),l("PRERELEASELOOSE",`(?:-?(${o[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[s.PRERELEASEIDENTIFIERLOOSE]})*))`),l("BUILDIDENTIFIER","[0-9A-Za-z-]+"),l("BUILD",`(?:\\+(${o[s.BUILDIDENTIFIER]}(?:\\.${o[s.BUILDIDENTIFIER]})*))`),l("FULLPLAIN",`v?${o[s.MAINVERSION]}${o[s.PRERELEASE]}?${o[s.BUILD]}?`),l("FULL",`^${o[s.FULLPLAIN]}$`),l("LOOSEPLAIN",`[v=\\s]*${o[s.MAINVERSIONLOOSE]}${o[s.PRERELEASELOOSE]}?${o[s.BUILD]}?`),l("LOOSE",`^${o[s.LOOSEPLAIN]}$`),l("GTLT","((?:<|>)?=?)"),l("XRANGEIDENTIFIERLOOSE",o[s.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),l("XRANGEIDENTIFIER",o[s.NUMERICIDENTIFIER]+"|x|X|\\*"),l("XRANGEPLAIN",`[v=\\s]*(${o[s.XRANGEIDENTIFIER]})(?:\\.(${o[s.XRANGEIDENTIFIER]})(?:\\.(${o[s.XRANGEIDENTIFIER]})(?:${o[s.PRERELEASE]})?${o[s.BUILD]}?)?)?`),l("XRANGEPLAINLOOSE",`[v=\\s]*(${o[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[s.XRANGEIDENTIFIERLOOSE]})(?:${o[s.PRERELEASELOOSE]})?${o[s.BUILD]}?)?)?`),l("XRANGE",`^${o[s.GTLT]}\\s*${o[s.XRANGEPLAIN]}$`),l("XRANGELOOSE",`^${o[s.GTLT]}\\s*${o[s.XRANGEPLAINLOOSE]}$`),l("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),l("COERCERTL",o[s.COERCE],!0),l("LONETILDE","(?:~>?)"),l("TILDETRIM",`(\\s*)${o[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",l("TILDE",`^${o[s.LONETILDE]}${o[s.XRANGEPLAIN]}$`),l("TILDELOOSE",`^${o[s.LONETILDE]}${o[s.XRANGEPLAINLOOSE]}$`),l("LONECARET","(?:\\^)"),l("CARETTRIM",`(\\s*)${o[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",l("CARET",`^${o[s.LONECARET]}${o[s.XRANGEPLAIN]}$`),l("CARETLOOSE",`^${o[s.LONECARET]}${o[s.XRANGEPLAINLOOSE]}$`),l("COMPARATORLOOSE",`^${o[s.GTLT]}\\s*(${o[s.LOOSEPLAIN]})$|^$`),l("COMPARATOR",`^${o[s.GTLT]}\\s*(${o[s.FULLPLAIN]})$|^$`),l("COMPARATORTRIM",`(\\s*)${o[s.GTLT]}\\s*(${o[s.LOOSEPLAIN]}|${o[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",l("HYPHENRANGE",`^\\s*(${o[s.XRANGEPLAIN]})\\s+-\\s+(${o[s.XRANGEPLAIN]})\\s*$`),l("HYPHENRANGELOOSE",`^\\s*(${o[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[s.XRANGEPLAINLOOSE]})\\s*$`),l("STAR","(<|>)?=?\\s*\\*"),l("GTE0","^\\s*>=\\s*0.0.0\\s*$"),l("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},function(e,t,r){const{MAX_LENGTH:n}=r(51),{re:i,t:a}=r(34),o=r(6),s=r(53);e.exports=(e,t)=>{if(t=s(t),e instanceof o)return e;if("string"!=typeof e)return null;if(e.length>n)return null;if(!(t.loose?i[a.LOOSE]:i[a.FULL]).test(e))return null;try{return new o(e,t)}catch(e){return null}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.blockmapFiles=t.getChannelFilename=t.newUrlFromBase=t.newBaseUrl=void 0;const n=r(17),i=r(373);function a(e,t,r=!1){const i=new n.URL(e,t),a=t.search;return null!=a&&0!==a.length?i.search=a:r&&(i.search="noCache="+Date.now().toString(32)),i}t.newBaseUrl=function(e){const t=new n.URL(e);return t.pathname.endsWith("/")||(t.pathname+="/"),t},t.newUrlFromBase=a,t.getChannelFilename=function(e){return e+".yml"},t.blockmapFiles=function(e,t,r){const n=a(e.pathname+".blockmap",e);return[a(e.pathname.replace(new RegExp(i(r),"g"),t)+".blockmap",e),n]}},function(e,t){e.exports=require("os")},function(e,t,r){function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(102).Buffer.isBuffer},function(e,t,r){"use strict";var n=null;n="undefined"!=typeof Promise?Promise:r(224),e.exports={Promise:n}},function(e,t){e.exports=require("crypto")},function(e,t){const r=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:r,MAX_SAFE_COMPONENT_LENGTH:16}},function(e,t){const r="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=r},function(e,t){const r=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:r.filter(t=>e[t]).reduce((e,t)=>(e[t]=!0,e),{}):{}},function(e,t,r){const n=r(11);e.exports=(e,t,r)=>n(e,t,r)>0},function(e,t,r){const n=Symbol("SemVer ANY");class i{static get ANY(){return n}constructor(e,t){if(t=a(t),e instanceof i){if(e.loose===!!t.loose)return e;e=e.value}l("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,l("comp",this)}parse(e){const t=this.options.loose?o[s.COMPARATORLOOSE]:o[s.COMPARATOR],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new u(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(l("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new p(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new p(this.value,t).test(e.semver);const r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),n=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=c(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),l=c(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||n||a&&o||s||l}}e.exports=i;const a=r(43),{re:o,t:s}=r(25),c=r(91),l=r(42),u=r(5),p=r(12)},function(e,t,r){const n=r(12);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},function(e,t,r){"use strict";"undefined"==typeof process||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?e.exports={nextTick:function(e,t,r,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,a,o=arguments.length;switch(o){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick((function(){e.call(null,t)}));case 3:return process.nextTick((function(){e.call(null,t,r)}));case 4:return process.nextTick((function(){e.call(null,t,r,n)}));default:for(i=new Array(o-1),a=0;aconsole.error("SEMVER",...e):()=>{};e.exports=r},function(e,t){const r=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:r.filter(t=>e[t]).reduce((e,t)=>(e[t]=!0,e),{}):{}},function(e,t,r){const n=r(13);e.exports=(e,t,r)=>n(e,t,r)>0},function(e,t,r){const n=Symbol("SemVer ANY");class i{static get ANY(){return n}constructor(e,t){if(t=a(t),e instanceof i){if(e.loose===!!t.loose)return e;e=e.value}l("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,l("comp",this)}parse(e){const t=this.options.loose?o[s.COMPARATORLOOSE]:o[s.COMPARATOR],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new u(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(l("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new p(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new p(this.value,t).test(e.semver);const r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),n=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=c(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),l=c(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||n||a&&o||s||l}}e.exports=i;const a=r(53),{re:o,t:s}=r(34),c=r(143),l=r(52),u=r(6),p=r(14)},function(e,t,r){const n=r(14);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},function(e,t,r){"use strict";const n=r(0),i=r(1),a=r(252);e.exports=class extends a{constructor(e){const t=(i.app||i.remote.app).getPath("userData");(e={name:"config",...e}).cwd?e.cwd=n.isAbsolute(e.cwd)?e.cwd:n.join(t,e.cwd):e.cwd=t,e.configName=e.name,delete e.name,super(e)}openInEditor(){(i.shell.openItem||i.shell.openPath)(this.path)}}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){const r=/^[0-9]+$/,n=(e,t)=>{const n=r.test(e),i=r.test(t);return n&&i&&(e=+e,t=+t),e===t?0:n&&!i?-1:i&&!n?1:en(t,e)}},function(e,t,r){const n=r(11);e.exports=(e,t,r)=>0===n(e,t,r)},function(e,t,r){const n=r(5);e.exports=(e,t,r)=>{const i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)}},function(e,t,r){const n=r(11);e.exports=(e,t,r)=>n(e,t,r)<0},function(e,t,r){const n=r(11);e.exports=(e,t,r)=>n(e,t,r)>=0},function(e,t,r){const n=r(11);e.exports=(e,t,r)=>n(e,t,r)<=0},function(e,t,r){const n=r(5),i=r(45),{ANY:a}=i,o=r(12),s=r(46),c=r(44),l=r(62),u=r(64),p=r(63);e.exports=(e,t,r,d)=>{let h,f,m,v,g;switch(e=new n(e,d),t=new o(t,d),r){case">":h=c,f=u,m=l,v=">",g=">=";break;case"<":h=l,f=p,m=c,v="<",g="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,d))return!1;for(let r=0;r{e.semver===a&&(e=new i(">=0.0.0")),o=o||e,s=s||e,h(e.semver,o.semver,d)?o=e:m(e.semver,s.semver,d)&&(s=e)}),o.operator===v||o.operator===g)return!1;if((!s.operator||s.operator===v)&&f(e,s.semver))return!1;if(s.operator===g&&m(e,s.semver))return!1}return!0}},function(e,t,r){e.exports=u,u.Minimatch=p;var n={sep:"/"};try{n=r(0)}catch(e){}var i=u.GLOBSTAR=p.GLOBSTAR={},a=r(209),o={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},s="().*{}+?[]^$\\!".split("").reduce((function(e,t){return e[t]=!0,e}),{});var c=/\/+/;function l(e,t){e=e||{},t=t||{};var r={};return Object.keys(t).forEach((function(e){r[e]=t[e]})),Object.keys(e).forEach((function(t){r[t]=e[t]})),r}function u(e,t,r){if("string"!=typeof t)throw new TypeError("glob pattern string required");return r||(r={}),!(!r.nocomment&&"#"===t.charAt(0))&&(""===t.trim()?""===e:new p(t,r).match(e))}function p(e,t){if(!(this instanceof p))return new p(e,t);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),"/"!==n.sep&&(e=e.split(n.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function d(e,t){if(t||(t=this instanceof p?this.options:{}),void 0===(e=void 0===e?this.pattern:e))throw new TypeError("undefined pattern");return t.nobrace||!e.match(/\{.*\}/)?[e]:a(e)}u.filter=function(e,t){return t=t||{},function(r,n,i){return u(r,e,t)}},u.defaults=function(e){if(!e||!Object.keys(e).length)return u;var t=u,r=function(r,n,i){return t.minimatch(r,n,l(e,i))};return r.Minimatch=function(r,n){return new t.Minimatch(r,l(e,n))},r},p.defaults=function(e){return e&&Object.keys(e).length?u.defaults(e).Minimatch:p},p.prototype.debug=function(){},p.prototype.make=function(){if(this._made)return;var e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();var r=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error);this.debug(this.pattern,r),r=this.globParts=r.map((function(e){return e.split(c)})),this.debug(this.pattern,r),r=r.map((function(e,t,r){return e.map(this.parse,this)}),this),this.debug(this.pattern,r),r=r.filter((function(e){return-1===e.indexOf(!1)})),this.debug(this.pattern,r),this.set=r},p.prototype.parseNegate=function(){var e=this.pattern,t=!1,r=this.options,n=0;if(r.nonegate)return;for(var i=0,a=e.length;i65536)throw new TypeError("pattern is too long");var r=this.options;if(!r.noglobstar&&"**"===e)return i;if(""===e)return"";var n,a="",c=!!r.nocase,l=!1,u=[],p=[],d=!1,f=-1,m=-1,v="."===e.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",g=this;function b(){if(n){switch(n){case"*":a+="[^/]*?",c=!0;break;case"?":a+="[^/]",c=!0;break;default:a+="\\"+n}g.debug("clearStateChar %j %j",n,a),n=!1}}for(var y,x=0,w=e.length;x-1;A--){var O=p[A],I=a.slice(0,O.reStart),R=a.slice(O.reStart,O.reEnd-8),P=a.slice(O.reEnd-8,O.reEnd),F=a.slice(O.reEnd);P+=F;var T=I.split("(").length-1,N=F;for(x=0;x=0&&!(i=e[a]);a--);for(a=0;a>> no match, partial?",e,d,t,h),d!==s))}if("string"==typeof u?(l=n.nocase?p.toLowerCase()===u.toLowerCase():p===u,this.debug("string match",u,p,l)):(l=p.match(u),this.debug("pattern match",u,p,l)),!l)return!1}if(a===s&&o===c)return!0;if(a===s)return r;if(o===c)return a===s-1&&""===e[a];throw new Error("wtf?")}},function(e,t,r){"use strict";function n(e){return"/"===e.charAt(0)}function i(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/.exec(e),r=t[1]||"",n=Boolean(r&&":"!==r.charAt(1));return Boolean(t[2]||n)}e.exports="win32"===process.platform?i:n,e.exports.posix=n,e.exports.win32=i},function(e,t,r){"use strict";var n=r(39),i=r(110),a=r(111),o=r(228);function s(e,t,r,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(e,t,r){return e.pipe(new a).pipe(new o("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new o("compressedSize")).withStreamInfo("compression",t)},e.exports=s},function(e,t,r){"use strict";var n=r(3);var i=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,r,n){var a=i,o=n+r;e^=-1;for(var s=n;s>>8^a[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):function(e,t,r,n){var a=i,o=n+r;e^=-1;for(var s=n;s>>8^a[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length,0):0}},function(e,t,r){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(e,t,r){"use strict";var n=r(272),i=r(72),a=r(31),o=r(125),s=r(274);function c(e,t,r){var n=this._refs[r];if("string"==typeof n){if(!this._refs[n])return c.call(this,e,t,n);n=this._refs[n]}if((n=n||this._schemas[r])instanceof o)return f(n.schema,this._opts.inlineRefs)?n.schema:n.validate||this._compile(n);var i,a,s,u=l.call(this,t,r);return u&&(i=u.schema,t=u.root,s=u.baseId),i instanceof o?a=i.validate||e.call(this,i.schema,t,void 0,s):void 0!==i&&(a=f(i,this._opts.inlineRefs)?i:e.call(this,i,t,void 0,s)),a}function l(e,t){var r=n.parse(t),i=v(r),a=m(this._getId(e.schema));if(0===Object.keys(e.schema).length||i!==a){var s=b(i),c=this._refs[s];if("string"==typeof c)return u.call(this,e,c,r);if(c instanceof o)c.validate||this._compile(c),e=c;else{if(!((c=this._schemas[s])instanceof o))return;if(c.validate||this._compile(c),s==b(t))return{schema:c,root:e,baseId:a};e=c}if(!e.schema)return;a=m(this._getId(e.schema))}return d.call(this,r,a,e.schema,e)}function u(e,t,r){var n=l.call(this,e,t);if(n){var i=n.schema,a=n.baseId;e=n.root;var o=this._getId(i);return o&&(a=y(a,o)),d.call(this,r,a,i,e)}}e.exports=c,c.normalizeId=b,c.fullPath=m,c.url=y,c.ids=function(e){var t=b(this._getId(e)),r={"":t},o={"":m(t,!1)},c={},l=this;return s(e,{allKeys:!0},(function(e,t,s,u,p,d,h){if(""!==t){var f=l._getId(e),m=r[u],v=o[u]+"/"+p;if(void 0!==h&&(v+="/"+("number"==typeof h?h:a.escapeFragment(h))),"string"==typeof f){f=m=b(m?n.resolve(m,f):f);var g=l._refs[f];if("string"==typeof g&&(g=l._refs[g]),g&&g.schema){if(!i(e,g.schema))throw new Error('id "'+f+'" resolves to more than one schema')}else if(f!=b(v))if("#"==f[0]){if(c[f]&&!i(e,c[f]))throw new Error('id "'+f+'" resolves to more than one schema');c[f]=e}else l._refs[f]=v}r[t]=m,o[t]=v}})),c},c.inlineRef=f,c.schema=l;var p=a.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function d(e,t,r,n){if(e.fragment=e.fragment||"","/"==e.fragment.slice(0,1)){for(var i=e.fragment.split("/"),o=1;othis.getOrCreateStagingUserId()),this.configOnDisk=new c.Lazy(()=>this.loadUpdateConfig()),this.checkForUpdatesPromise=null,this.updateInfoAndProvider=null,this._testOnlyOptions=null,this.on("error",e=>{this._logger.error("Error: "+(e.stack||e.message))}),null==t?(this.app=new d.ElectronAppAdapter,this.httpExecutor=new h.ElectronHttpExecutor((e,t)=>this.emit("login",e,t))):(this.app=t,this.httpExecutor=null);const r=this.app.version,i=u.parse(r);if(null==i)throw n.newError(`App version is not a valid semver version: "${r}"`,"ERR_UPDATER_INVALID_VERSION");this.currentVersion=i,this.allowPrerelease=function(e){const t=u.prerelease(e);return null!=t&&t.length>0}(i),null!=e&&(this.setFeedURL(e),"string"!=typeof e&&e.requestHeaders&&(this.requestHeaders=e.requestHeaders))}get channel(){return this._channel}set channel(e){if(null!=this._channel){if("string"!=typeof e)throw n.newError("Channel must be a string, but got: "+e,"ERR_UPDATER_INVALID_CHANNEL");if(0===e.length)throw n.newError("Channel must be not an empty string","ERR_UPDATER_INVALID_CHANNEL")}this._channel=e,this.allowDowngrade=!0}get netSession(){return h.getNetSession()}get logger(){return this._logger}set logger(e){this._logger=null==e?new b:e}set updateConfigPath(e){this.clientPromise=null,this._appUpdateConfigPath=e,this.configOnDisk=new c.Lazy(()=>this.loadUpdateConfig())}getFeedURL(){return"Deprecated. Do not use it."}setFeedURL(e){const t=this.createProviderRuntimeOptions();let r;r="string"==typeof e?new f.GenericProvider({provider:"generic",url:e},this,{...t,isUseMultipleRangeRequest:v.isUrlProbablySupportMultiRangeRequests(e)}):v.createClient(e,this,t),this.clientPromise=Promise.resolve(r)}checkForUpdates(){let e=this.checkForUpdatesPromise;if(null!=e)return this._logger.info("Checking for update (already in progress)"),e;const t=()=>this.checkForUpdatesPromise=null;return this._logger.info("Checking for update"),e=this.doCheckForUpdates().then(e=>(t(),e)).catch(e=>{throw t(),this.emit("error",e,"Cannot check for updates: "+(e.stack||e).toString()),e}),this.checkForUpdatesPromise=e,e}isUpdaterActive(){return!!this.app.isPackaged||(this._logger.info("Skip checkForUpdatesAndNotify because application is not packed"),!1)}checkForUpdatesAndNotify(e){return this.isUpdaterActive()?this.checkForUpdates().then(t=>{const n=t.downloadPromise;return null==n?(null!=this._logger.debug&&this._logger.debug("checkForUpdatesAndNotify called, downloadPromise is null"),t):(n.then(()=>{const n=g.formatDownloadNotification(t.updateInfo.version,this.app.name,e);new(r(1).Notification)(n).show()}),t)}):Promise.resolve(null)}static formatDownloadNotification(e,t,r){return null==r&&(r={title:"A new update is ready to install",body:"{appName} version {version} has been downloaded and will be automatically installed on exit"}),r={title:r.title.replace("{appName}",t).replace("{version}",e),body:r.body.replace("{appName}",t).replace("{version}",e)}}async isStagingMatch(e){const t=e.stagingPercentage;let r=t;if(null==r)return!0;if(r=parseInt(r,10),isNaN(r))return this._logger.warn("Staging percentage is NaN: "+t),!0;r/=100;const i=await this.stagingUserIdPromise.value,a=n.UUID.parse(i).readUInt32BE(12)/4294967295;return this._logger.info(`Staging percentage: ${r}, percentage: ${a}, user id: ${i}`),av.createClient(e,this,this.createProviderRuntimeOptions())));const e=await this.clientPromise,t=await this.stagingUserIdPromise.value;return e.setRequestHeaders(this.computeFinalHeaders({"x-user-staging-id":t})),{info:await e.getLatestVersion(),provider:e}}createProviderRuntimeOptions(){return{isUseMultipleRangeRequest:!0,platform:null==this._testOnlyOptions?process.platform:this._testOnlyOptions.platform,executor:this.httpExecutor}}async doCheckForUpdates(){this.emit("checking-for-update");const e=await this.getUpdateInfoAndProvider(),t=e.info;if(!await this.isUpdateAvailable(t))return this._logger.info(`Update for version ${this.currentVersion} is not available (latest version: ${t.version}, downgrade is ${this.allowDowngrade?"allowed":"disallowed"}).`),this.emit("update-not-available",t),{versionInfo:t,updateInfo:t};this.updateInfoAndProvider=e,this.onUpdateAvailable(t);const r=new n.CancellationToken;return{versionInfo:t,updateInfo:t,cancellationToken:r,downloadPromise:this.autoDownload?this.downloadUpdate(r):null}}onUpdateAvailable(e){this._logger.info(`Found version ${e.version} (url: ${n.asArray(e.files).map(e=>e.url).join(", ")})`),this.emit("update-available",e)}downloadUpdate(e=new n.CancellationToken){const t=this.updateInfoAndProvider;if(null==t){const e=new Error("Please check update first");return this.dispatchError(e),Promise.reject(e)}this._logger.info("Downloading update from "+n.asArray(t.info.files).map(e=>e.url).join(", "));const r=e=>{if(!(e instanceof n.CancellationError))try{this.dispatchError(e)}catch(e){this._logger.warn("Cannot dispatch error event: "+(e.stack||e))}return e};try{return this.doDownloadUpdate({updateInfoAndProvider:t,requestHeaders:this.computeRequestHeaders(t.provider),cancellationToken:e}).catch(e=>{throw r(e)})}catch(e){return Promise.reject(r(e))}}dispatchError(e){this.emit("error",e,(e.stack||e).toString())}dispatchUpdateDownloaded(e){this.emit(m.UPDATE_DOWNLOADED,e)}async loadUpdateConfig(){return null==this._appUpdateConfigPath&&(this._appUpdateConfigPath=this.app.appUpdateConfigPath),s.load(await o.readFile(this._appUpdateConfigPath,"utf-8"))}computeRequestHeaders(e){const t=e.fileExtraDownloadHeaders;if(null!=t){const e=this.requestHeaders;return null==e?t:{...t,...e}}return this.computeFinalHeaders({accept:"*/*"})}async getOrCreateStagingUserId(){const e=l.join(this.app.userDataPath,".updaterId");try{const t=await o.readFile(e,"utf-8");if(n.UUID.check(t))return t;this._logger.warn("Staging user id file exists, but content was invalid: "+t)}catch(e){"ENOENT"!==e.code&&this._logger.warn("Couldn't read staging user ID, creating a blank one: "+e)}const t=n.UUID.v5(i.randomBytes(4096),n.UUID.OID);this._logger.info("Generated new staging user ID: "+t);try{await o.outputFile(e,t)}catch(e){this._logger.warn("Couldn't write out staging user ID: "+e)}return t}get isAddNoCacheQuery(){const e=this.requestHeaders;if(null==e)return!0;for(const t of Object.keys(e)){const e=t.toLowerCase();if("authorization"===e||"private-token"===e)return!1}return!0}async getOrCreateDownloadHelper(){let e=this.downloadedUpdateHelper;if(null==e){const t=(await this.configOnDisk.value).updaterCacheDirName,r=this._logger;null==t&&r.error("updaterCacheDirName is not specified in app-update.yml Was app build using at least electron-builder 20.34.0?");const n=l.join(this.app.baseCachePath,t||this.app.name);null!=r.debug&&r.debug("updater cache dir: "+n),e=new p.DownloadedUpdateHelper(n),this.downloadedUpdateHelper=e}return e}async executeDownload(e){const t=e.fileInfo,r={headers:e.downloadUpdateOptions.requestHeaders,cancellationToken:e.downloadUpdateOptions.cancellationToken,sha2:t.info.sha2,sha512:t.info.sha512};this.listenerCount(m.DOWNLOAD_PROGRESS)>0&&(r.onProgress=e=>this.emit(m.DOWNLOAD_PROGRESS,e));const i=e.downloadUpdateOptions.updateInfoAndProvider.info,a=i.version,s=t.packageInfo;const c=await this.getOrCreateDownloadHelper(),u=c.cacheDirForPendingUpdate;await o.ensureDir(u);const d=function(){const t=decodeURIComponent(e.fileInfo.url.pathname);return t.endsWith("."+e.fileExtension)?l.posix.basename(t):"update."+e.fileExtension}();let h=l.join(u,d);const f=null==s?null:l.join(u,`package-${a}${l.extname(s.path)||".7z"}`),v=async r=>(await c.setDownloadedFile(h,f,i,t,d,r),await e.done({...i,downloadedFile:h}),null==f?[h]:[h,f]),g=this._logger,b=await c.validateDownloadedPath(h,i,t,g);if(null!=b)return h=b,await v(!1);const y=async()=>(await c.clear().catch(()=>{}),await o.unlink(h).catch(()=>{})),x=await p.createTempUpdateFile("temp-"+d,u,g);try{await e.task(x,r,f,y),await o.rename(x,h)}catch(e){throw await y(),e instanceof n.CancellationError&&(g.info("cancelled"),this.emit("update-cancelled",i)),e}return g.info(`New version ${a} has been downloaded to ${h}`),await v(!0)}}t.AppUpdater=g;class b{info(e){}warn(e){}error(e){}}t.NoOpLogger=b},function(e,t){e.exports={stringify:function(e,{EOL:t="\n",finalEOL:r=!0,replacer:n=null,spaces:i}={}){const a=r?t:"";return JSON.stringify(e,n,i).replace(/\n/g,t)+a},stripBom:function(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}}},function(e,t,r){"use strict";const n=r(8).fromCallback,i=r(7),a=r(0),o=r(16),s=r(24).pathExists;e.exports={outputFile:n((function(e,t,r,n){"function"==typeof r&&(n=r,r="utf8");const c=a.dirname(e);s(c,(a,s)=>a?n(a):s?i.writeFile(e,t,r,n):void o.mkdirs(c,a=>{if(a)return n(a);i.writeFile(e,t,r,n)}))})),outputFileSync:function(e,...t){const r=a.dirname(e);if(i.existsSync(r))return i.writeFileSync(e,...t);o.mkdirsSync(r),i.writeFileSync(e,...t)}}},function(e,t,r){"use strict"; -/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ -function n(e){return null==e}r.r(t),r.d(t,"CORE_SCHEMA",(function(){return rt})),r.d(t,"DEFAULT_SCHEMA",(function(){return nt})),r.d(t,"FAILSAFE_SCHEMA",(function(){return et})),r.d(t,"JSON_SCHEMA",(function(){return tt})),r.d(t,"Schema",(function(){return Je})),r.d(t,"Type",(function(){return Ze})),r.d(t,"YAMLException",(function(){return st})),r.d(t,"dump",(function(){return ot})),r.d(t,"load",(function(){return it})),r.d(t,"loadAll",(function(){return at})),r.d(t,"safeDump",(function(){return pt})),r.d(t,"safeLoad",(function(){return lt})),r.d(t,"safeLoadAll",(function(){return ut})),r.d(t,"types",(function(){return ct}));var i={isNothing:n,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:n(e)?[]:[e]},repeat:function(e,t){var r,n="";for(r=0;rs&&(t=n-s+(a=" ... ").length),r-n>s&&(r=n+s-(o=" ...").length),{str:a+e.slice(t,r).replace(/\t/g,"→")+o,pos:n-t+a.length}}function l(e,t){return i.repeat(" ",t-e.length)+e}var u=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var r,n=/\r?\n|\r|\0/g,a=[0],o=[],s=-1;r=n.exec(e.buffer);)o.push(r.index),a.push(r.index+r[0].length),e.position<=r.index&&s<0&&(s=a.length-2);s<0&&(s=a.length-1);var u,p,d="",h=Math.min(e.line+t.linesAfter,o.length).toString().length,f=t.maxLength-(t.indent+h+3);for(u=1;u<=t.linesBefore&&!(s-u<0);u++)p=c(e.buffer,a[s-u],o[s-u],e.position-(a[s]-a[s-u]),f),d=i.repeat(" ",t.indent)+l((e.line-u+1).toString(),h)+" | "+p.str+"\n"+d;for(p=c(e.buffer,a[s],o[s],e.position,f),d+=i.repeat(" ",t.indent)+l((e.line+1).toString(),h)+" | "+p.str+"\n",d+=i.repeat("-",t.indent+h+3+p.pos)+"^\n",u=1;u<=t.linesAfter&&!(s+u>=o.length);u++)p=c(e.buffer,a[s+u],o[s+u],e.position-(a[s]-a[s+u]),f),d+=i.repeat(" ",t.indent)+l((e.line+u+1).toString(),h)+" | "+p.str+"\n";return d.replace(/\n$/,"")},p=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],d=["scalar","sequence","mapping"];var h=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===p.indexOf(t))throw new s('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(r){e[r].forEach((function(e){t[String(e)]=r}))})),t}(t.styleAliases||null),-1===d.indexOf(this.kind))throw new s('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function f(e,t){var r=[];return e[t].forEach((function(e){var t=r.length;r.forEach((function(r,n){r.tag===e.tag&&r.kind===e.kind&&r.multi===e.multi&&(t=n)})),r[t]=e})),r}function m(e){return this.extend(e)}m.prototype.extend=function(e){var t=[],r=[];if(e instanceof h)r.push(e);else if(Array.isArray(e))r=r.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new s("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof h))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new s("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new s("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),r.forEach((function(e){if(!(e instanceof h))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var n=Object.create(m.prototype);return n.implicit=(this.implicit||[]).concat(t),n.explicit=(this.explicit||[]).concat(r),n.compiledImplicit=f(n,"implicit"),n.compiledExplicit=f(n,"explicit"),n.compiledTypeMap=function(){var e,t,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(e){e.multi?(r.multi[e.kind].push(e),r.multi.fallback.push(e)):r[e.kind][e.tag]=r.fallback[e.tag]=e}for(e=0,t=arguments.length;e=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),k=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var C=/^[-+]?[0-9]+e/;var A=new h("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!k.test(e)||"_"===e[e.length-1])},construct:function(e){var t,r;return r="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:r*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||i.isNegativeZero(e))},represent:function(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(i.isNegativeZero(e))return"-0.0";return r=e.toString(10),C.test(r)?r.replace("e",".e"):r},defaultStyle:"lowercase"}),O=x.extend({implicit:[w,E,S,A]}),I=O,R=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),P=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var F=new h("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==R.exec(e)||null!==P.exec(e))},construct:function(e){var t,r,n,i,a,o,s,c,l=0,u=null;if(null===(t=R.exec(e))&&(t=P.exec(e)),null===t)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(r,n,i));if(a=+t[4],o=+t[5],s=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),c=new Date(Date.UTC(r,n,i,a,o,s,l)),u&&c.setTime(c.getTime()-u),c},instanceOf:Date,represent:function(e){return e.toISOString()}});var T=new h("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var j=new h("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,r,n=0,i=e.length,a=N;for(r=0;r64)){if(t<0)return!1;n+=6}return n%8==0},construct:function(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,a=N,o=0,s=[];for(t=0;t>16&255),s.push(o>>8&255),s.push(255&o)),o=o<<6|a.indexOf(n.charAt(t));return 0===(r=i%4*6)?(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)):18===r?(s.push(o>>10&255),s.push(o>>2&255)):12===r&&s.push(o>>4&255),new Uint8Array(s)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,r,n="",i=0,a=e.length,o=N;for(t=0;t>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]),i=(i<<8)+e[t];return 0===(r=a%3)?(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[63&i]):2===r?(n+=o[i>>10&63],n+=o[i>>4&63],n+=o[i<<2&63],n+=o[64]):1===r&&(n+=o[i>>2&63],n+=o[i<<4&63],n+=o[64],n+=o[64]),n}}),L=Object.prototype.hasOwnProperty,$=Object.prototype.toString;var U=new h("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,r,n,i,a,o=[],s=e;for(t=0,r=s.length;t>10),56320+(e-65536&1023))}for(var ae=new Array(256),oe=new Array(256),se=0;se<256;se++)ae[se]=ne(se)?1:0,oe[se]=ne(se);function ce(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||G,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function le(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=u(r),new s(t,r)}function ue(e,t){throw le(e,t)}function pe(e,t){e.onWarning&&e.onWarning.call(null,le(e,t))}var de={YAML:function(e,t,r){var n,i,a;null!==e.version&&ue(e,"duplication of %YAML directive"),1!==r.length&&ue(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&ue(e,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),a=parseInt(n[2],10),1!==i&&ue(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=a<2,1!==a&&2!==a&&pe(e,"unsupported YAML version of the document")},TAG:function(e,t,r){var n,i;2!==r.length&&ue(e,"TAG directive accepts exactly two arguments"),n=r[0],i=r[1],Y.test(n)||ue(e,"ill-formed tag handle (first argument) of the TAG directive"),H.call(e.tagMap,n)&&ue(e,'there is a previously declared suffix for "'+n+'" tag handle'),Q.test(i)||ue(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(t){ue(e,"tag prefix is malformed: "+i)}e.tagMap[n]=i}};function he(e,t,r,n){var i,a,o,s;if(t1&&(e.result+=i.repeat("\n",t-1))}function xe(e,t){var r,n,i=e.tag,a=e.anchor,o=[],s=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=o),n=e.input.charCodeAt(e.position);0!==n&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,ue(e,"tab characters must not be used in indentation")),45===n)&&ee(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,ge(e,!0,-1)&&e.lineIndent<=t)o.push(null),n=e.input.charCodeAt(e.position);else if(r=e.line,De(e,t,3,!1,!0),o.push(e.result),ge(e,!0,-1),n=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==n)ue(e,"bad indentation of a sequence entry");else if(e.lineIndentt?m=1:e.lineIndent===t?m=0:e.lineIndentt?m=1:e.lineIndent===t?m=0:e.lineIndentt)&&(g&&(o=e.line,s=e.lineStart,c=e.position),De(e,t,4,!0,i)&&(g?m=e.result:v=e.result),g||(me(e,d,h,f,m,v,o,s,c),f=m=v=null),ge(e,!0,-1),l=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&0!==l)ue(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===a?ue(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?ue(e,"repeat of an indentation width identifier"):(p=t+a-1,u=!0)}if(J(o)){do{o=e.input.charCodeAt(++e.position)}while(J(o));if(35===o)do{o=e.input.charCodeAt(++e.position)}while(!Z(o)&&0!==o)}for(;0!==o;){for(ve(e),e.lineIndent=0,o=e.input.charCodeAt(e.position);(!u||e.lineIndentp&&(p=e.lineIndent),Z(o))d++;else{if(e.lineIndent0){for(i=o,a=0;i>0;i--)(o=re(s=e.input.charCodeAt(++e.position)))>=0?a=(a<<4)+o:ue(e,"expected hexadecimal character");e.result+=ie(a),e.position++}else ue(e,"unknown escape sequence");r=n=e.position}else Z(s)?(he(e,r,n,!0),ye(e,ge(e,!1,t)),r=n=e.position):e.position===e.lineStart&&be(e)?ue(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}ue(e,"unexpected end of the stream within a double quoted scalar")}(e,h)?g=!0:!function(e){var t,r,n;if(42!==(n=e.input.charCodeAt(e.position)))return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!ee(n)&&!te(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&ue(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),H.call(e.anchorMap,r)||ue(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],ge(e,!0,-1),!0}(e)?function(e,t,r){var n,i,a,o,s,c,l,u,p=e.kind,d=e.result;if(ee(u=e.input.charCodeAt(e.position))||te(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(ee(n=e.input.charCodeAt(e.position+1))||r&&te(n)))return!1;for(e.kind="scalar",e.result="",i=a=e.position,o=!1;0!==u;){if(58===u){if(ee(n=e.input.charCodeAt(e.position+1))||r&&te(n))break}else if(35===u){if(ee(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&be(e)||r&&te(u))break;if(Z(u)){if(s=e.line,c=e.lineStart,l=e.lineIndent,ge(e,!1,-1),e.lineIndent>=t){o=!0,u=e.input.charCodeAt(e.position);continue}e.position=a,e.line=s,e.lineStart=c,e.lineIndent=l;break}}o&&(he(e,i,a,!1),ye(e,e.line-s),i=a=e.position,o=!1),J(u)||(a=e.position+1),u=e.input.charCodeAt(++e.position)}return he(e,i,a,!1),!!e.result||(e.kind=p,e.result=d,!1)}(e,h,1===r)&&(g=!0,null===e.tag&&(e.tag="?")):(g=!0,null===e.tag&&null===e.anchor||ue(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===m&&(g=c&&xe(e,f))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&ue(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),l=0,u=e.implicitTypes.length;l"),null!==e.result&&d.kind!==e.kind&&ue(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+d.kind+'", not "'+e.kind+'"'),d.resolve(e.result,e.tag)?(e.result=d.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):ue(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function _e(e){var t,r,n,i,a=e.position,o=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(i=e.input.charCodeAt(e.position))&&(ge(e,!0,-1),i=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==i));){for(o=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!ee(i);)i=e.input.charCodeAt(++e.position);for(n=[],(r=e.input.slice(t,e.position)).length<1&&ue(e,"directive name must not be less than one character in length");0!==i;){for(;J(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!Z(i));break}if(Z(i))break;for(t=e.position;0!==i&&!ee(i);)i=e.input.charCodeAt(++e.position);n.push(e.input.slice(t,e.position))}0!==i&&ve(e),H.call(de,r)?de[r](e,r,n):pe(e,'unknown document directive "'+r+'"')}ge(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,ge(e,!0,-1)):o&&ue(e,"directives end mark is expected"),De(e,e.lineIndent-1,4,!1,!0),ge(e,!0,-1),e.checkLineBreaks&&W.test(e.input.slice(a,e.position))&&pe(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&be(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,ge(e,!0,-1)):e.position=55296&&n<=56319&&t+1=56320&&r<=57343?1024*(n-55296)+r-56320+65536:n}function Me(e){return/^\n* /.test(e)}function ze(e,t,r,n,i,a,o,s){var c,l,u=0,p=null,d=!1,h=!1,f=-1!==n,m=-1,v=Le(l=Be(e,0))&&65279!==l&&!je(l)&&45!==l&&63!==l&&58!==l&&44!==l&&91!==l&&93!==l&&123!==l&&125!==l&&35!==l&&38!==l&&42!==l&&33!==l&&124!==l&&61!==l&&62!==l&&39!==l&&34!==l&&37!==l&&64!==l&&96!==l&&function(e){return!je(e)&&58!==e}(Be(e,e.length-1));if(t||o)for(c=0;c=65536?c+=2:c++){if(!Le(u=Be(e,c)))return 5;v=v&&Ue(u,p,s),p=u}else{for(c=0;c=65536?c+=2:c++){if(10===(u=Be(e,c)))d=!0,f&&(h=h||c-m-1>n&&" "!==e[m+1],m=c);else if(!Le(u))return 5;v=v&&Ue(u,p,s),p=u}h=h||f&&c-m-1>n&&" "!==e[m+1]}return d||h?r>9&&Me(e)?5:o?2===a?5:2:h?4:3:!v||o||i(e)?2===a?5:2:1}function qe(e,t,r,n,i){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==Ie.indexOf(t)||Re.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),c=n||e.flowLevel>-1&&r>=e.flowLevel;switch(ze(t,c,e.indent,o,(function(t){return function(e,t){var r,n;for(r=0,n=e.implicitTypes.length;r"+Ge(t,e.indent)+He(Te(function(e,t){var r,n,i=/(\n+)([^\n]*)/g,a=(s=e.indexOf("\n"),s=-1!==s?s:e.length,i.lastIndex=s,Ve(e.slice(0,s),t)),o="\n"===e[0]||" "===e[0];var s;for(;n=i.exec(e);){var c=n[1],l=n[2];r=" "===l[0],a+=c+(o||r||""===l?"":"\n")+Ve(l,t),o=r}return a}(t,o),a));case 5:return'"'+function(e){for(var t,r="",n=0,i=0;i=65536?i+=2:i++)n=Be(e,i),!(t=Oe[n])&&Le(n)?(r+=e[i],n>=65536&&(r+=e[i+1])):r+=t||Pe(n);return r}(t)+'"';default:throw new s("impossible error: invalid scalar style")}}()}function Ge(e,t){var r=Me(e)?String(t):"",n="\n"===e[e.length-1];return r+(n&&("\n"===e[e.length-2]||"\n"===e)?"+":n?"":"-")+"\n"}function He(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function Ve(e,t){if(""===e||" "===e[0])return e;for(var r,n,i=/ [^ ]/g,a=0,o=0,s=0,c="";r=i.exec(e);)(s=r.index)-a>t&&(n=o>a?o:s,c+="\n"+e.slice(a,n),a=n+1),o=s;return c+="\n",e.length-a>t&&o>a?c+=e.slice(a,o)+"\n"+e.slice(o+1):c+=e.slice(a),c.slice(1)}function We(e,t,r,n){var i,a,o,s="",c=e.tag;for(i=0,a=r.length;i tag resolver accepts not "'+l+'" style');n=c.represent[l](t,l)}e.dump=n}return!0}return!1}function Ye(e,t,r,n,i,a,o){e.tag=null,e.dump=r,Xe(e,r,!1)||Xe(e,r,!0);var c,l=Ce.call(e.dump),u=n;n&&(n=e.flowLevel<0||e.flowLevel>t);var p,d,h="[object Object]"===l||"[object Array]"===l;if(h&&(d=-1!==(p=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||d||2!==e.indent&&t>0)&&(i=!1),d&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(h&&d&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),"[object Object]"===l)n&&0!==Object.keys(e.dump).length?(!function(e,t,r,n){var i,a,o,c,l,u,p="",d=e.tag,h=Object.keys(r);if(!0===e.sortKeys)h.sort();else if("function"==typeof e.sortKeys)h.sort(e.sortKeys);else if(e.sortKeys)throw new s("sortKeys must be a boolean or a function");for(i=0,a=h.length;i1024)&&(e.dump&&10===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,l&&(u+=Ne(e,t)),Ye(e,t+1,c,!0,l)&&(e.dump&&10===e.dump.charCodeAt(0)?u+=":":u+=": ",p+=u+=e.dump));e.tag=d,e.dump=p||"{}"}(e,t,e.dump,i),d&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,r){var n,i,a,o,s,c="",l=e.tag,u=Object.keys(r);for(n=0,i=u.length;n1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ye(e,t,o,!1,!1)&&(c+=s+=e.dump));e.tag=l,e.dump="{"+c+"}"}(e,t,e.dump),d&&(e.dump="&ref_"+p+" "+e.dump));else if("[object Array]"===l)n&&0!==e.dump.length?(e.noArrayIndent&&!o&&t>0?We(e,t-1,e.dump,i):We(e,t,e.dump,i),d&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,r){var n,i,a,o="",s=e.tag;for(n=0,i=r.length;n",e.dump=c+" "+e.dump)}return!0}function Qe(e,t){var r,n,i=[],a=[];for(function e(t,r,n){var i,a,o;if(null!==t&&"object"==typeof t)if(-1!==(a=r.indexOf(t)))-1===n.indexOf(a)&&n.push(a);else if(r.push(t),Array.isArray(t))for(a=0,o=t.length;a{const n=r.test(e),i=r.test(t);return n&&i&&(e=+e,t=+t),e===t?0:n&&!i?-1:i&&!n?1:en(t,e)}},function(e,t,r){const n=r(13);e.exports=(e,t,r)=>0===n(e,t,r)},function(e,t,r){const n=r(6);e.exports=(e,t,r)=>{const i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)}},function(e,t,r){const n=r(13);e.exports=(e,t,r)=>n(e,t,r)<0},function(e,t,r){const n=r(13);e.exports=(e,t,r)=>n(e,t,r)>=0},function(e,t,r){const n=r(13);e.exports=(e,t,r)=>n(e,t,r)<=0},function(e,t,r){const n=r(6),i=r(55),{ANY:a}=i,o=r(14),s=r(56),c=r(54),l=r(81),u=r(83),p=r(82);e.exports=(e,t,r,d)=>{let h,f,m,v,g;switch(e=new n(e,d),t=new o(t,d),r){case">":h=c,f=u,m=l,v=">",g=">=";break;case"<":h=l,f=p,m=c,v="<",g="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,d))return!1;for(let r=0;r{e.semver===a&&(e=new i(">=0.0.0")),o=o||e,s=s||e,h(e.semver,o.semver,d)?o=e:m(e.semver,s.semver,d)&&(s=e)}),o.operator===v||o.operator===g)return!1;if((!s.operator||s.operator===v)&&f(e,s.semver))return!1;if(s.operator===g&&m(e,s.semver))return!1}return!0}},function(e,t){e.exports=require("child_process")},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.computeOperations=t.OperationKind=void 0,function(e){e[e.COPY=0]="COPY",e[e.DOWNLOAD=1]="DOWNLOAD"}(n=t.OperationKind||(t.OperationKind={})),t.computeOperations=function(e,t,r){const i=o(e.files),s=o(t.files);let c=null;const l=t.files[0],u=[],p=l.name,d=i.get(p);if(null==d)throw new Error(`no file ${p} in old blockmap`);const h=s.get(p);let f=0;const{checksumToOffset:m,checksumToOldSize:v}=function(e,t,r){const n=new Map,i=new Map;let a=t;for(let t=0;t0&&r.info(`File${"file"===l.name?"":" "+l.name} has ${f} changed blocks`),u};const i="true"===process.env.DIFFERENTIAL_DOWNLOAD_PLAN_BUILDER_VALIDATE_RANGES;function a(e,t,r,a){if(i&&0!==t.length){const i=t[t.length-1];if(i.kind===e.kind&&e.starti.start){const t=[i.start,i.end,e.start,e.end].reduce((e,t)=>ea.resolve(c.getPath(),"IDMap.json");if(i.existsSync(u()))try{l=JSON.parse(i.readFileSync(u(),"utf8"))}catch(e){console.error("electron-devtools-installer: Invalid JSON present in the IDMap file")}const p=(e,t={})=>{"boolean"==typeof t&&(t={forceDownload:t});const{forceDownload:r,loadExtensionOptions:a}=t;if("browser"!==process.type)return Promise.reject(new Error("electron-devtools-installer can only be used from the main process"));if(Array.isArray(e))return e.reduce((e,r)=>e.then(()=>p(r,t)),Promise.resolve(""));let c;if("object"==typeof e&&e.id){c=e.id;const t=process.versions.electron.split("-")[0];if(!o.satisfies(t,e.electron))return Promise.reject(new Error(`Version of Electron: ${t} does not match required range ${e.electron} for extension ${c}`))}else{if("string"!=typeof e)return Promise.reject(new Error(`Invalid extensionReference passed in: "${e}"`));c=e}const d=l[c];let h;return h=n.session.defaultSession.getExtension?!!d&&n.session.defaultSession.getAllExtensions().find(e=>e.name===d):!!d&&n.BrowserWindow.getDevToolsExtensions&&n.BrowserWindow.getDevToolsExtensions().hasOwnProperty(d),!r&&h?Promise.resolve(l[c]):s.default(c,r||!1).then(e=>{if(h)if(n.session.defaultSession.removeExtension){const e=n.session.defaultSession.getAllExtensions().find(e=>e.name).id;n.session.defaultSession.removeExtension(e)}else n.BrowserWindow.removeDevToolsExtension(d);if(n.session.defaultSession.loadExtension)return n.session.defaultSession.loadExtension(e,a).then(e=>Promise.resolve(e.name));const t=n.BrowserWindow.addDevToolsExtension(e);return i.writeFileSync(u(),JSON.stringify(Object.assign(l,{[c]:t}))),Promise.resolve(t)})};t.default=p,t.EMBER_INSPECTOR={id:"bmdblncegkenkacieihfhpjfppoconhi",electron:">=1.2.1"},t.REACT_DEVELOPER_TOOLS={id:"fmkadmapgofadopljbjfkapdkoienihi",electron:">=1.2.1"},t.BACKBONE_DEBUGGER={id:"bhljhndlimiafopmmhjlgfpnnchjjbhd",electron:">=1.2.1"},t.JQUERY_DEBUGGER={id:"dbhhnnnpaeobfddmlalhnehgclcmjimi",electron:">=1.2.1"},t.ANGULARJS_BATARANG={id:"ighdmehidhipcmcojjgiloacoafjmpfk",electron:">=1.2.1"},t.VUEJS_DEVTOOLS={id:"nhdogjmejiglipccpnnnanhbledajbpd",electron:">=1.2.1"},t.VUEJS3_DEVTOOLS={id:"ljjemllljcmogpfapbkkighbhhppjdbg",electron:">=1.2.1"},t.REDUX_DEVTOOLS={id:"lmhkpmbekcpmknklioeibfkpmmfibljd",electron:">=1.2.1"},t.CYCLEJS_DEVTOOL={id:"dfgplfmhhmdekalbpejekgfegkonjpfp",electron:">=1.2.1"},t.APOLLO_DEVELOPER_TOOLS={id:"jdkknkkbebbapilgoeccciglkfbmbnfm",electron:">=1.2.1"},t.MOBX_DEVTOOLS={id:"pfgnfdagidkfgccljigdamigbcnndkod",electron:">=1.2.1"}},function(e,t,r){"use strict";const n=e=>!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141));e.exports=n,e.exports.default=n},function(e,t,r){const n=r(160),i={};for(const e of Object.keys(n))i[n[e]]=e;const a={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=a;for(const e of Object.keys(a)){if(!("channels"in a[e]))throw new Error("missing channels property: "+e);if(!("labels"in a[e]))throw new Error("missing channel labels property: "+e);if(a[e].labels.length!==a[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=a[e];delete a[e].channels,delete a[e].labels,Object.defineProperty(a[e],"channels",{value:t}),Object.defineProperty(a[e],"labels",{value:r})}a.rgb.hsl=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=a-i;let s,c;a===i?s=0:t===a?s=(r-n)/o:r===a?s=2+(n-t)/o:n===a&&(s=4+(t-r)/o),s=Math.min(60*s,360),s<0&&(s+=360);const l=(i+a)/2;return c=a===i?0:l<=.5?o/(a+i):o/(2-a-i),[s,100*c,100*l]},a.rgb.hsv=function(e){let t,r,n,i,a;const o=e[0]/255,s=e[1]/255,c=e[2]/255,l=Math.max(o,s,c),u=l-Math.min(o,s,c),p=function(e){return(l-e)/6/u+.5};return 0===u?(i=0,a=0):(a=u/l,t=p(o),r=p(s),n=p(c),o===l?i=n-r:s===l?i=1/3+t-n:c===l&&(i=2/3+r-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*a,100*l]},a.rgb.hwb=function(e){const t=e[0],r=e[1];let n=e[2];const i=a.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[i,100*o,100*n]},a.rgb.cmyk=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(1-t,1-r,1-n);return[100*((1-t-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*i]},a.rgb.keyword=function(e){const t=i[e];if(t)return t;let r,a=1/0;for(const t of Object.keys(n)){const i=n[t],c=(s=i,((o=e)[0]-s[0])**2+(o[1]-s[1])**2+(o[2]-s[2])**2);c.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;return[100*(.4124*t+.3576*r+.1805*n),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},a.rgb.lab=function(e){const t=a.rgb.xyz(e);let r=t[0],n=t[1],i=t[2];r/=95.047,n/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*n-16,500*(r-n),200*(n-i)]},a.hsl.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;let i,a,o;if(0===r)return o=255*n,[o,o,o];i=n<.5?n*(1+r):n+r-n*r;const s=2*n-i,c=[0,0,0];for(let e=0;e<3;e++)a=t+1/3*-(e-1),a<0&&a++,a>1&&a--,o=6*a<1?s+6*(i-s)*a:2*a<1?i:3*a<2?s+(i-s)*(2/3-a)*6:s,c[e]=255*o;return c},a.hsl.hsv=function(e){const t=e[0];let r=e[1]/100,n=e[2]/100,i=r;const a=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=a<=1?a:2-a;return[t,100*(0===n?2*i/(a+i):2*r/(n+r)),100*((n+r)/2)]},a.hsv.rgb=function(e){const t=e[0]/60,r=e[1]/100;let n=e[2]/100;const i=Math.floor(t)%6,a=t-Math.floor(t),o=255*n*(1-r),s=255*n*(1-r*a),c=255*n*(1-r*(1-a));switch(n*=255,i){case 0:return[n,c,o];case 1:return[s,n,o];case 2:return[o,n,c];case 3:return[o,s,n];case 4:return[c,o,n];case 5:return[n,o,s]}},a.hsv.hsl=function(e){const t=e[0],r=e[1]/100,n=e[2]/100,i=Math.max(n,.01);let a,o;o=(2-r)*n;const s=(2-r)*i;return a=r*i,a/=s<=1?s:2-s,a=a||0,o/=2,[t,100*a,100*o]},a.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100,n=e[2]/100;const i=r+n;let a;i>1&&(r/=i,n/=i);const o=Math.floor(6*t),s=1-n;a=6*t-o,0!=(1&o)&&(a=1-a);const c=r+a*(s-r);let l,u,p;switch(o){default:case 6:case 0:l=s,u=c,p=r;break;case 1:l=c,u=s,p=r;break;case 2:l=r,u=s,p=c;break;case 3:l=r,u=c,p=s;break;case 4:l=c,u=r,p=s;break;case 5:l=s,u=r,p=c}return[255*l,255*u,255*p]},a.cmyk.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i))]},a.xyz.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100;let i,a,o;return i=3.2406*t+-1.5372*r+-.4986*n,a=-.9689*t+1.8758*r+.0415*n,o=.0557*t+-.204*r+1.057*n,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[255*i,255*a,255*o]},a.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;return[116*r-16,500*(t-r),200*(r-n)]},a.lab.xyz=function(e){let t,r,n;r=(e[0]+16)/116,t=e[1]/500+r,n=r-e[2]/200;const i=r**3,a=t**3,o=n**3;return r=i>.008856?i:(r-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,n=o>.008856?o:(n-16/116)/7.787,t*=95.047,r*=100,n*=108.883,[t,r,n]},a.lab.lch=function(e){const t=e[0],r=e[1],n=e[2];let i;i=360*Math.atan2(n,r)/2/Math.PI,i<0&&(i+=360);return[t,Math.sqrt(r*r+n*n),i]},a.lch.lab=function(e){const t=e[0],r=e[1],n=e[2]/360*2*Math.PI;return[t,r*Math.cos(n),r*Math.sin(n)]},a.rgb.ansi16=function(e,t=null){const[r,n,i]=e;let o=null===t?a.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),0===o)return 30;let s=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return 2===o&&(s+=60),s},a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])},a.rgb.ansi256=function(e){const t=e[0],r=e[1],n=e[2];if(t===r&&r===n)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},a.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},a.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},a.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},a.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];3===t[0].length&&(r=r.split("").map(e=>e+e).join(""));const n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},a.rgb.hcg=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.max(Math.max(t,r),n),a=Math.min(Math.min(t,r),n),o=i-a;let s,c;return s=o<1?a/(1-o):0,c=o<=0?0:i===t?(r-n)/o%6:i===r?2+(n-t)/o:4+(t-r)/o,c/=6,c%=1,[360*c,100*o,100*s]},a.hsl.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r);let i=0;return n<1&&(i=(r-.5*n)/(1-n)),[e[0],100*n,100*i]},a.hsv.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=t*r;let i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},a.hcg.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];const i=[0,0,0],a=t%1*6,o=a%1,s=1-o;let c=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return c=(1-r)*n,[255*(r*i[0]+c),255*(r*i[1]+c),255*(r*i[2]+c)]},a.hcg.hsv=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);let n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},a.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},a.hcg.hwb=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},a.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,n=r-t;let i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},a.gray.hsl=function(e){return[0,0,e[0]]},a.gray.hsv=a.gray.hsl,a.gray.hwb=function(e){return[0,100,e[0]]},a.gray.cmyk=function(e){return[0,0,0,e[0]]},a.gray.lab=function(e){return[e[0],0,0]},a.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},a.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},function(e,t,r){const n=r(11);e.exports=(e,t,r)=>0!==n(e,t,r)},function(e,t,r){const n=r(60),i=r(90),a=r(44),o=r(63),s=r(62),c=r(64);e.exports=(e,t,r,l)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,l);case"!=":return i(e,r,l);case">":return a(e,r,l);case">=":return o(e,r,l);case"<":return s(e,r,l);case"<=":return c(e,r,l);default:throw new TypeError("Invalid operator: "+t)}}},function(e,t,r){"use strict";const n=r(194),i=Symbol("max"),a=Symbol("length"),o=Symbol("lengthCalculator"),s=Symbol("allowStale"),c=Symbol("maxAge"),l=Symbol("dispose"),u=Symbol("noDisposeOnSet"),p=Symbol("lruList"),d=Symbol("cache"),h=Symbol("updateAgeOnGet"),f=()=>1;const m=(e,t,r)=>{const n=e[d].get(t);if(n){const t=n.value;if(v(e,t)){if(b(e,n),!e[s])return}else r&&(e[h]&&(n.value.now=Date.now()),e[p].unshiftNode(n));return t.value}},v=(e,t)=>{if(!t||!t.maxAge&&!e[c])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},g=e=>{if(e[a]>e[i])for(let t=e[p].tail;e[a]>e[i]&&null!==t;){const r=t.prev;b(e,t),t=r}},b=(e,t)=>{if(t){const r=t.value;e[l]&&e[l](r.key,r.value),e[a]-=r.length,e[d].delete(r.key),e[p].removeNode(t)}};class y{constructor(e,t,r,n,i){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=i||0}}const x=(e,t,r,n)=>{let i=r.value;v(e,i)&&(b(e,r),e[s]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[i]=e.max||1/0;const t=e.length||f;if(this[o]="function"!=typeof t?f:t,this[s]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0,this[l]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[h]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[i]=e||1/0,g(this)}get max(){return this[i]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,g(this)}get maxAge(){return this[c]}set lengthCalculator(e){"function"!=typeof e&&(e=f),e!==this[o]&&(this[o]=e,this[a]=0,this[p].forEach(e=>{e.length=this[o](e.value,e.key),this[a]+=e.length})),g(this)}get lengthCalculator(){return this[o]}get length(){return this[a]}get itemCount(){return this[p].length}rforEach(e,t){t=t||this;for(let r=this[p].tail;null!==r;){const n=r.prev;x(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[p].head;null!==r;){const n=r.next;x(this,e,r,t),r=n}}keys(){return this[p].toArray().map(e=>e.key)}values(){return this[p].toArray().map(e=>e.value)}reset(){this[l]&&this[p]&&this[p].length&&this[p].forEach(e=>this[l](e.key,e.value)),this[d]=new Map,this[p]=new n,this[a]=0}dump(){return this[p].map(e=>!v(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[p]}set(e,t,r){if((r=r||this[c])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,s=this[o](t,e);if(this[d].has(e)){if(s>this[i])return b(this,this[d].get(e)),!1;const o=this[d].get(e).value;return this[l]&&(this[u]||this[l](e,o.value)),o.now=n,o.maxAge=r,o.value=t,this[a]+=s-o.length,o.length=s,this.get(e),g(this),!0}const h=new y(e,t,s,n,r);return h.length>this[i]?(this[l]&&this[l](e,t),!1):(this[a]+=h.length,this[p].unshift(h),this[d].set(e,this[p].head),g(this),!0)}has(e){if(!this[d].has(e))return!1;const t=this[d].get(e).value;return!v(this,t)}get(e){return m(this,e,!0)}peek(e){return m(this,e,!1)}pop(){const e=this[p].tail;return e?(b(this,e),e.value):null}del(e){b(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{const e=i-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[d].forEach((e,t)=>m(this,t,!1))}}},function(e,t,r){e.exports=b;var n=r(94),i=r(66),a=(i.Minimatch,r(27)),o=r(28).EventEmitter,s=r(0),c=r(22),l=r(67),u=r(213),p=r(95),d=p.setopts,h=p.ownProp,f=r(214),m=(r(9),p.childrenIgnored),v=p.isIgnored,g=r(97);function b(e,t,r){if("function"==typeof t&&(r=t,t={}),t||(t={}),t.sync){if(r)throw new TypeError("callback provided to sync glob");return u(e,t)}return new x(e,t,r)}b.sync=u;var y=b.GlobSync=u.GlobSync;function x(e,t,r){if("function"==typeof t&&(r=t,t=null),t&&t.sync){if(r)throw new TypeError("callback provided to sync glob");return new y(e,t)}if(!(this instanceof x))return new x(e,t,r);d(this,e,t),this._didRealPath=!1;var n=this.minimatch.set.length;this.matches=new Array(n),"function"==typeof r&&(r=g(r),this.on("error",r),this.on("end",(function(e){r(null,e)})));var i=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(0===n)return o();for(var a=0;a1)return!0;for(var i=0;ithis.maxLength)return t();if(!this.stat&&h(this.cache,r)){var i=this.cache[r];if(Array.isArray(i)&&(i="DIR"),!n||"DIR"===i)return t(null,i);if(n&&"FILE"===i)return t()}var a=this.statCache[r];if(void 0!==a){if(!1===a)return t(null,a);var o=a.isDirectory()?"DIR":"FILE";return n&&"FILE"===o?t():t(null,o,a)}var s=this,c=f("stat\0"+r,(function(n,i){if(i&&i.isSymbolicLink())return s.fs.stat(r,(function(n,a){n?s._stat2(e,r,null,i,t):s._stat2(e,r,n,a,t)}));s._stat2(e,r,n,i,t)}));c&&s.fs.lstat(r,c)},x.prototype._stat2=function(e,t,r,n,i){if(r&&("ENOENT"===r.code||"ENOTDIR"===r.code))return this.statCache[t]=!1,i();var a="/"===e.slice(-1);if(this.statCache[t]=n,"/"===t.slice(-1)&&n&&!n.isDirectory())return i(null,!1,n);var o=!0;return n&&(o=n.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||o,a&&"FILE"===o?i():i(null,o,n)}},function(e,t,r){e.exports=u,u.realpath=u,u.sync=p,u.realpathSync=p,u.monkeypatch=function(){n.realpath=u,n.realpathSync=p},u.unmonkeypatch=function(){n.realpath=i,n.realpathSync=a};var n=r(2),i=n.realpath,a=n.realpathSync,o=process.version,s=/^v[0-5]\./.test(o),c=r(208);function l(e){return e&&"realpath"===e.syscall&&("ELOOP"===e.code||"ENOMEM"===e.code||"ENAMETOOLONG"===e.code)}function u(e,t,r){if(s)return i(e,t,r);"function"==typeof t&&(r=t,t=null),i(e,t,(function(n,i){l(n)?c.realpath(e,t,r):r(n,i)}))}function p(e,t){if(s)return a(e,t);try{return a(e,t)}catch(r){if(l(r))return c.realpathSync(e,t);throw r}}},function(e,t,r){function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.setopts=function(e,t,r){r||(r={});if(r.matchBase&&-1===t.indexOf("/")){if(r.noglobstar)throw new Error("base matching requires globstar");t="**/"+t}e.silent=!!r.silent,e.pattern=t,e.strict=!1!==r.strict,e.realpath=!!r.realpath,e.realpathCache=r.realpathCache||Object.create(null),e.follow=!!r.follow,e.dot=!!r.dot,e.mark=!!r.mark,e.nodir=!!r.nodir,e.nodir&&(e.mark=!0);e.sync=!!r.sync,e.nounique=!!r.nounique,e.nonull=!!r.nonull,e.nosort=!!r.nosort,e.nocase=!!r.nocase,e.stat=!!r.stat,e.noprocess=!!r.noprocess,e.absolute=!!r.absolute,e.fs=r.fs||i,e.maxLength=r.maxLength||1/0,e.cache=r.cache||Object.create(null),e.statCache=r.statCache||Object.create(null),e.symlinks=r.symlinks||Object.create(null),function(e,t){e.ignore=t.ignore||[],Array.isArray(e.ignore)||(e.ignore=[e.ignore]);e.ignore.length&&(e.ignore=e.ignore.map(u))}(e,r),e.changedCwd=!1;var o=process.cwd();n(r,"cwd")?(e.cwd=a.resolve(r.cwd),e.changedCwd=e.cwd!==o):e.cwd=o;e.root=r.root||a.resolve(e.cwd,"/"),e.root=a.resolve(e.root),"win32"===process.platform&&(e.root=e.root.replace(/\\/g,"/"));e.cwdAbs=s(e.cwd)?e.cwd:p(e,e.cwd),"win32"===process.platform&&(e.cwdAbs=e.cwdAbs.replace(/\\/g,"/"));e.nomount=!!r.nomount,r.nonegate=!0,r.nocomment=!0,e.minimatch=new c(t,r),e.options=e.minimatch.options},t.ownProp=n,t.makeAbs=p,t.finish=function(e){for(var t=e.nounique,r=t?[]:Object.create(null),n=0,i=e.matches.length;n{const e=n.app.getPath("userData");return a.resolve(e+"/extensions")};const s=n.net?n.net.request:o.get;t.downloadFile=(e,r)=>new Promise((n,a)=>{const o=s(e);o.on("response",e=>{if(e.statusCode&&e.statusCode>=300&&e.statusCode<400&&e.headers.location)return t.downloadFile(e.headers.location,r).then(n).catch(a);e.pipe(i.createWriteStream(r)).on("close",n),e.on("error",a)}),o.on("error",a),o.end()});t.changePermissions=(e,r)=>{i.readdirSync(e).forEach(n=>{const o=a.join(e,n);i.chmodSync(o,parseInt(""+r,8)),i.statSync(o).isDirectory()&&t.changePermissions(o,r)})}},function(e,t,r){var n=r(19);"disable"===process.env.READABLE_STREAM&&n?(e.exports=n,(t=e.exports=n.Readable).Readable=n.Readable,t.Writable=n.Writable,t.Duplex=n.Duplex,t.Transform=n.Transform,t.PassThrough=n.PassThrough,t.Stream=n):((t=e.exports=r(100)).Stream=n||t,t.Readable=t,t.Writable=r(104),t.Duplex=r(30),t.Transform=r(106),t.PassThrough=r(222))},function(e,t,r){"use strict";var n=r(47);e.exports=b;var i,a=r(219);b.ReadableState=g;r(28).EventEmitter;var o=function(e,t){return e.listeners(t).length},s=r(101),c=r(48).Buffer,l=global.Uint8Array||function(){};var u=Object.create(r(38));u.inherits=r(27);var p=r(9),d=void 0;d=p&&p.debuglog?p.debuglog("stream"):function(){};var h,f=r(220),m=r(103);u.inherits(b,s);var v=["error","close","destroy","pause","resume"];function g(e,t){e=e||{};var n=t instanceof(i=i||r(30));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var a=e.highWaterMark,o=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=a||0===a?a:n&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(h||(h=r(105).StringDecoder),this.decoder=new h(e.encoding),this.encoding=e.encoding)}function b(e){if(i=i||r(30),!(this instanceof b))return new b(e);this._readableState=new g(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function y(e,t,r,n,i){var a,o=e._readableState;null===t?(o.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,E(e)}(e,o)):(i||(a=function(e,t){var r;n=t,c.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(o,t)),a?e.emit("error",a):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):x(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?x(e,o,t,!1):_(e,o)):x(e,o,t,!1))):n||(o.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function E(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(D,e):D(e))}function D(e){d("emit readable"),e.emit("readable"),A(e)}function _(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(S,e,t))}function S(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;ea.length?a.length:e;if(o===a.length?i+=a:i+=a.slice(0,e),0===(e-=o)){o===a.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=c.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,o),0===(e-=o)){o===a.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++i}return t.length-=i,r}(e,t);return n}(e,t.buffer,t.decoder),r);var r}function I(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(R,t,e))}function R(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function P(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?I(this):E(this),null;if(0===(e=w(e,t))&&t.ended)return 0===t.length&&I(this),null;var n,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e0?O(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&I(this)),null!==n&&this.emit("data",n),n},b.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,d("pipe count=%d opts=%j",i.pipesCount,t);var s=(!t||!1!==t.end)&&e!==process.stdout&&e!==process.stderr?l:b;function c(t,n){d("onunpipe"),t===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),e.removeListener("close",v),e.removeListener("finish",g),e.removeListener("drain",u),e.removeListener("error",m),e.removeListener("unpipe",c),r.removeListener("end",l),r.removeListener("end",b),r.removeListener("data",f),p=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||u())}function l(){d("onend"),e.end()}i.endEmitted?n.nextTick(s):r.once("end",s),e.on("unpipe",c);var u=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,A(e))}}(r);e.on("drain",u);var p=!1;var h=!1;function f(t){d("ondata"),h=!1,!1!==e.write(t)||h||((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==P(i.pipes,e))&&!p&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,h=!0),r.pause())}function m(t){d("onerror",t),b(),e.removeListener("error",m),0===o(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",g),b()}function g(){d("onfinish"),e.removeListener("close",v),b()}function b(){d("unpipe"),r.unpipe(e)}return r.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",m),e.once("close",v),e.once("finish",g),e.emit("pipe",r),i.flowing||(d("pipe resume"),r.resume()),e},b.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a-1?setImmediate:n.nextTick;v.WritableState=m;var s=Object.create(r(38));s.inherits=r(27);var c={deprecate:r(221)},l=r(101),u=r(48).Buffer,p=global.Uint8Array||function(){};var d,h=r(103);function f(){}function m(e,t){a=a||r(30),e=e||{};var s=t instanceof a;this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var c=e.highWaterMark,l=e.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=c||0===c?c:s&&(l||0===l)?l:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var p=!1===e.decodeStrings;this.decodeStrings=!p,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,a=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,i,a){--t.pendingcb,r?(n.nextTick(a,i),n.nextTick(E,e,t),e._writableState.errorEmitted=!0,e.emit("error",i)):(a(i),e._writableState.errorEmitted=!0,e.emit("error",i),E(e,t))}(e,r,i,t,a);else{var s=x(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||y(e,r),i?o(b,e,r,s,a):b(e,r,s,a)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function v(e){if(a=a||r(30),!(d.call(v,this)||this instanceof a))return new v(e);this._writableState=new m(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function g(e,t,r,n,i,a,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function b(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),E(e,t)}function y(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,a=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var s=0,c=!0;r;)a[s]=r,r.isBuf||(c=!1),r=r.next,s+=1;a.allBuffers=c,g(e,t,!0,t.length,a,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,u=r.encoding,p=r.callback;if(g(e,t,!1,t.objectMode?1:l.length,l,u,p),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function x(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function w(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),E(e,t)}))}function E(e,t){var r=x(t);return r&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,n.nextTick(w,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}s.inherits(v,l),m.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(m.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===v&&(e&&e._writableState instanceof m)}})):d=function(e){return e instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(e,t,r){var i,a=this._writableState,o=!1,s=!a.objectMode&&(i=e,u.isBuffer(i)||i instanceof p);return s&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=a.defaultEncoding),"function"!=typeof r&&(r=f),a.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),n.nextTick(t,r)}(this,r):(s||function(e,t,r,i){var a=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),n.nextTick(i,o),a=!1),a}(this,a,e,r))&&(a.pendingcb++,o=function(e,t,r,n,i,a){if(!r){var o=function(e,t,r){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,r));return t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var c=t.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(e,t,r){var i=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(e,t,r){t.ending=!0,E(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r));t.ended=!0,e.writable=!1}(this,i,r)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),v.prototype.destroy=h.destroy,v.prototype._undestroy=h.undestroy,v.prototype._destroy=function(e,t){this.end(),t(e)}},function(e,t,r){"use strict";var n=r(48).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=c,this.end=l,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=u,this.end=p,t=3;break;default:return this.write=d,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function c(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function u(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function p(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(e.lastNeed=i-1),i;if(--n=0)return i>0&&(e.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,r){"use strict";e.exports=o;var n=r(30),i=Object.create(r(38));function a(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length>2,s=(3&t)<<4|r>>4,c=h>1?(15&r)<<2|i>>6:64,l=h>2?63&i:64,u.push(a.charAt(o)+a.charAt(s)+a.charAt(c)+a.charAt(l));return u.join("")},t.decode=function(e){var t,r,n,o,s,c,l=0,u=0;if("data:"===e.substr(0,"data:".length))throw new Error("Invalid base64 input, it looks like a data url.");var p,d=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===a.charAt(64)&&d--,e.charAt(e.length-2)===a.charAt(64)&&d--,d%1!=0)throw new Error("Invalid base64 input, bad content length.");for(p=i.uint8array?new Uint8Array(0|d):new Array(0|d);l>4,r=(15&o)<<4|(s=a.indexOf(e.charAt(l++)))>>2,n=(3&s)<<6|(c=a.indexOf(e.charAt(l++))),p[u++]=t,64!==s&&(p[u++]=r),64!==c&&(p[u++]=n);return p}},function(e,t,r){"use strict";var n=r(3),i=r(226),a=r(10),o=r(107),s=r(18),c=r(39),l=null;if(s.nodestream)try{l=r(227)}catch(e){}function u(e,t){return new c.Promise((function(r,i){var a=[],s=e._internalType,c=e._outputType,l=e._mimeType;e.on("data",(function(e,r){a.push(e),t&&t(r)})).on("error",(function(e){a=[],i(e)})).on("end",(function(){try{var e=function(e,t,r){switch(e){case"blob":return n.newBlob(n.transformTo("arraybuffer",t),r);case"base64":return o.encode(t);default:return n.transformTo(e,t)}}(c,function(e,t){var r,n=0,i=null,a=0;for(r=0;r=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=a},function(e,t,r){"use strict";var n=r(10),i=r(69);function a(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r(3).inherits(a,n),a.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},e.exports=a},function(e,t,r){"use strict";var n=r(10);t.STORE={magic:"\0\0",compressWorker:function(e){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},t.DEFLATE=r(231)},function(e,t,r){"use strict";e.exports=function(e,t,r,n){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;0!==r;){r-=o=r>2e3?2e3:r;do{a=a+(i=i+t[n++]|0)|0}while(--o);i%=65521,a%=65521}return i|a<<16|0}},function(e,t,r){"use strict";var n=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,t,r,i){var a=n,o=i+r;e^=-1;for(var s=i;s>>8^a[255&(e^t[s])];return-1^e}},function(e,t,r){"use strict";var n=r(20),i=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){a=!1}for(var o=new n.Buf8(256),s=0;s<256;s++)o[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function c(e,t){if(t<65534&&(e.subarray&&a||!e.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(e,t));for(var r="",o=0;o>>6,t[o++]=128|63&r):r<65536?(t[o++]=224|r>>>12,t[o++]=128|r>>>6&63,t[o++]=128|63&r):(t[o++]=240|r>>>18,t[o++]=128|r>>>12&63,t[o++]=128|r>>>6&63,t[o++]=128|63&r);return t},t.buf2binstring=function(e){return c(e,e.length)},t.binstring2buf=function(e){for(var t=new n.Buf8(e.length),r=0,i=t.length;r4)l[n++]=65533,r+=a-1;else{for(i&=2===a?31:3===a?15:7;a>1&&r1?l[n++]=65533:i<65536?l[n++]=i:(i-=65536,l[n++]=55296|i>>10&1023,l[n++]=56320|1023&i)}return c(l,n)},t.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+o[e[r]]>t?r:t}},function(e,t,r){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(e,t,r){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t,r){"use strict";t.LOCAL_FILE_HEADER="PK",t.CENTRAL_FILE_HEADER="PK",t.CENTRAL_DIRECTORY_END="PK",t.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",t.ZIP64_CENTRAL_DIRECTORY_END="PK",t.DATA_DESCRIPTOR="PK\b"},function(e,t,r){"use strict";var n=r(3),i=r(18),a=r(120),o=r(245),s=r(246),c=r(122);e.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new s(e):i.uint8array?new c(n.transformTo("uint8array",e)):new a(n.transformTo("array",e)):new o(e)}},function(e,t,r){"use strict";var n=r(121);function i(e){n.call(this,e);for(var t=0;t=0;--a)if(this.data[a]===t&&this.data[a+1]===r&&this.data[a+2]===n&&this.data[a+3]===i)return a-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),a=this.readData(4);return t===a[0]&&r===a[1]&&n===a[2]&&i===a[3]},i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=i},function(e,t,r){"use strict";var n=r(3);function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},e.exports=i},function(e,t,r){"use strict";var n=r(120);function i(e){n.call(this,e)}r(3).inherits(i,n),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=i},function(e,t){var r;t=e.exports=p,r="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var n=Number.MAX_SAFE_INTEGER||9007199254740991,i=t.re=[],a=t.src=[],o=t.tokens={},s=0;function c(e){o[e]=s++}c("NUMERICIDENTIFIER"),a[o.NUMERICIDENTIFIER]="0|[1-9]\\d*",c("NUMERICIDENTIFIERLOOSE"),a[o.NUMERICIDENTIFIERLOOSE]="[0-9]+",c("NONNUMERICIDENTIFIER"),a[o.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*",c("MAINVERSION"),a[o.MAINVERSION]="("+a[o.NUMERICIDENTIFIER]+")\\.("+a[o.NUMERICIDENTIFIER]+")\\.("+a[o.NUMERICIDENTIFIER]+")",c("MAINVERSIONLOOSE"),a[o.MAINVERSIONLOOSE]="("+a[o.NUMERICIDENTIFIERLOOSE]+")\\.("+a[o.NUMERICIDENTIFIERLOOSE]+")\\.("+a[o.NUMERICIDENTIFIERLOOSE]+")",c("PRERELEASEIDENTIFIER"),a[o.PRERELEASEIDENTIFIER]="(?:"+a[o.NUMERICIDENTIFIER]+"|"+a[o.NONNUMERICIDENTIFIER]+")",c("PRERELEASEIDENTIFIERLOOSE"),a[o.PRERELEASEIDENTIFIERLOOSE]="(?:"+a[o.NUMERICIDENTIFIERLOOSE]+"|"+a[o.NONNUMERICIDENTIFIER]+")",c("PRERELEASE"),a[o.PRERELEASE]="(?:-("+a[o.PRERELEASEIDENTIFIER]+"(?:\\."+a[o.PRERELEASEIDENTIFIER]+")*))",c("PRERELEASELOOSE"),a[o.PRERELEASELOOSE]="(?:-?("+a[o.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+a[o.PRERELEASEIDENTIFIERLOOSE]+")*))",c("BUILDIDENTIFIER"),a[o.BUILDIDENTIFIER]="[0-9A-Za-z-]+",c("BUILD"),a[o.BUILD]="(?:\\+("+a[o.BUILDIDENTIFIER]+"(?:\\."+a[o.BUILDIDENTIFIER]+")*))",c("FULL"),c("FULLPLAIN"),a[o.FULLPLAIN]="v?"+a[o.MAINVERSION]+a[o.PRERELEASE]+"?"+a[o.BUILD]+"?",a[o.FULL]="^"+a[o.FULLPLAIN]+"$",c("LOOSEPLAIN"),a[o.LOOSEPLAIN]="[v=\\s]*"+a[o.MAINVERSIONLOOSE]+a[o.PRERELEASELOOSE]+"?"+a[o.BUILD]+"?",c("LOOSE"),a[o.LOOSE]="^"+a[o.LOOSEPLAIN]+"$",c("GTLT"),a[o.GTLT]="((?:<|>)?=?)",c("XRANGEIDENTIFIERLOOSE"),a[o.XRANGEIDENTIFIERLOOSE]=a[o.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",c("XRANGEIDENTIFIER"),a[o.XRANGEIDENTIFIER]=a[o.NUMERICIDENTIFIER]+"|x|X|\\*",c("XRANGEPLAIN"),a[o.XRANGEPLAIN]="[v=\\s]*("+a[o.XRANGEIDENTIFIER]+")(?:\\.("+a[o.XRANGEIDENTIFIER]+")(?:\\.("+a[o.XRANGEIDENTIFIER]+")(?:"+a[o.PRERELEASE]+")?"+a[o.BUILD]+"?)?)?",c("XRANGEPLAINLOOSE"),a[o.XRANGEPLAINLOOSE]="[v=\\s]*("+a[o.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+a[o.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+a[o.XRANGEIDENTIFIERLOOSE]+")(?:"+a[o.PRERELEASELOOSE]+")?"+a[o.BUILD]+"?)?)?",c("XRANGE"),a[o.XRANGE]="^"+a[o.GTLT]+"\\s*"+a[o.XRANGEPLAIN]+"$",c("XRANGELOOSE"),a[o.XRANGELOOSE]="^"+a[o.GTLT]+"\\s*"+a[o.XRANGEPLAINLOOSE]+"$",c("COERCE"),a[o.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",c("COERCERTL"),i[o.COERCERTL]=new RegExp(a[o.COERCE],"g"),c("LONETILDE"),a[o.LONETILDE]="(?:~>?)",c("TILDETRIM"),a[o.TILDETRIM]="(\\s*)"+a[o.LONETILDE]+"\\s+",i[o.TILDETRIM]=new RegExp(a[o.TILDETRIM],"g");c("TILDE"),a[o.TILDE]="^"+a[o.LONETILDE]+a[o.XRANGEPLAIN]+"$",c("TILDELOOSE"),a[o.TILDELOOSE]="^"+a[o.LONETILDE]+a[o.XRANGEPLAINLOOSE]+"$",c("LONECARET"),a[o.LONECARET]="(?:\\^)",c("CARETTRIM"),a[o.CARETTRIM]="(\\s*)"+a[o.LONECARET]+"\\s+",i[o.CARETTRIM]=new RegExp(a[o.CARETTRIM],"g");c("CARET"),a[o.CARET]="^"+a[o.LONECARET]+a[o.XRANGEPLAIN]+"$",c("CARETLOOSE"),a[o.CARETLOOSE]="^"+a[o.LONECARET]+a[o.XRANGEPLAINLOOSE]+"$",c("COMPARATORLOOSE"),a[o.COMPARATORLOOSE]="^"+a[o.GTLT]+"\\s*("+a[o.LOOSEPLAIN]+")$|^$",c("COMPARATOR"),a[o.COMPARATOR]="^"+a[o.GTLT]+"\\s*("+a[o.FULLPLAIN]+")$|^$",c("COMPARATORTRIM"),a[o.COMPARATORTRIM]="(\\s*)"+a[o.GTLT]+"\\s*("+a[o.LOOSEPLAIN]+"|"+a[o.XRANGEPLAIN]+")",i[o.COMPARATORTRIM]=new RegExp(a[o.COMPARATORTRIM],"g");c("HYPHENRANGE"),a[o.HYPHENRANGE]="^\\s*("+a[o.XRANGEPLAIN]+")\\s+-\\s+("+a[o.XRANGEPLAIN]+")\\s*$",c("HYPHENRANGELOOSE"),a[o.HYPHENRANGELOOSE]="^\\s*("+a[o.XRANGEPLAINLOOSE]+")\\s+-\\s+("+a[o.XRANGEPLAINLOOSE]+")\\s*$",c("STAR"),a[o.STAR]="(<|>)?=?\\s*\\*";for(var l=0;l256)return null;if(!(t.loose?i[o.LOOSE]:i[o.FULL]).test(e))return null;try{return new p(e,t)}catch(e){return null}}function p(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof p){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof p))return new p(e,t);r("SemVer",e,t),this.options=t,this.loose=!!t.loose;var a=e.trim().match(t.loose?i[o.LOOSE]:i[o.FULL]);if(!a)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+a[1],this.minor=+a[2],this.patch=+a[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");a[4]?this.prerelease=a[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new p(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(g(e,t))return null;var r=u(e),n=u(t),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var a="prerelease"}for(var o in r)if(("major"===o||"minor"===o||"patch"===o)&&r[o]!==n[o])return i+o;return a},t.compareIdentifiers=h;var d=/^[0-9]+$/;function h(e,t){var r=d.test(e),n=d.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e0}function v(e,t,r){return f(e,t,r)<0}function g(e,t,r){return 0===f(e,t,r)}function b(e,t,r){return 0!==f(e,t,r)}function y(e,t,r){return f(e,t,r)>=0}function x(e,t,r){return f(e,t,r)<=0}function w(e,t,r,n){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return g(e,r,n);case"!=":return b(e,r,n);case">":return m(e,r,n);case">=":return y(e,r,n);case"<":return v(e,r,n);case"<=":return x(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}function E(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof E){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof E))return new E(e,t);r("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===D?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}t.rcompareIdentifiers=function(e,t){return h(t,e)},t.major=function(e,t){return new p(e,t).major},t.minor=function(e,t){return new p(e,t).minor},t.patch=function(e,t){return new p(e,t).patch},t.compare=f,t.compareLoose=function(e,t){return f(e,t,!0)},t.compareBuild=function(e,t,r){var n=new p(e,r),i=new p(t,r);return n.compare(i)||n.compareBuild(i)},t.rcompare=function(e,t,r){return f(t,e,r)},t.sort=function(e,r){return e.sort((function(e,n){return t.compareBuild(e,n,r)}))},t.rsort=function(e,r){return e.sort((function(e,n){return t.compareBuild(n,e,r)}))},t.gt=m,t.lt=v,t.eq=g,t.neq=b,t.gte=y,t.lte=x,t.cmp=w,t.Comparator=E;var D={};function _(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof _)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new _(e.raw,t);if(e instanceof E)return new _(e.value,t);if(!(this instanceof _))return new _(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function S(e,t){for(var r=!0,n=e.slice(),i=n.pop();r&&n.length;)r=n.every((function(e){return i.intersects(e,t)})),i=n.pop();return r}function k(e){return!e||"x"===e.toLowerCase()||"*"===e}function C(e,t,r,n,i,a,o,s,c,l,u,p,d){return((t=k(r)?"":k(n)?">="+r+".0.0":k(i)?">="+r+"."+n+".0":">="+t)+" "+(s=k(c)?"":k(l)?"<"+(+c+1)+".0.0":k(u)?"<"+c+"."+(+l+1)+".0":p?"<="+c+"."+l+"."+u+"-"+p:"<="+s)).trim()}function A(e,t,n){for(var i=0;i0){var a=e[i].semver;if(a.major===t.major&&a.minor===t.minor&&a.patch===t.patch)return!0}return!1}return!0}function O(e,t,r){try{t=new _(t,r)}catch(e){return!1}return t.test(e)}function I(e,t,r,n){var i,a,o,s,c;switch(e=new p(e,n),t=new _(t,n),r){case">":i=m,a=x,o=v,s=">",c=">=";break;case"<":i=v,a=y,o=m,s="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(O(e,t,n))return!1;for(var l=0;l=0.0.0")),d=d||e,h=h||e,i(e.semver,d.semver,n)?d=e:o(e.semver,h.semver,n)&&(h=e)})),d.operator===s||d.operator===c)return!1;if((!h.operator||h.operator===s)&&a(e,h.semver))return!1;if(h.operator===c&&o(e,h.semver))return!1}return!0}E.prototype.parse=function(e){var t=this.options.loose?i[o.COMPARATORLOOSE]:i[o.COMPARATOR],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new p(r[2],this.options.loose):this.semver=D},E.prototype.toString=function(){return this.value},E.prototype.test=function(e){if(r("Comparator.test",e,this.options.loose),this.semver===D||e===D)return!0;if("string"==typeof e)try{e=new p(e,this.options)}catch(e){return!1}return w(e,this.operator,this.semver,this.options)},E.prototype.intersects=function(e,t){if(!(e instanceof E))throw new TypeError("a Comparator is required");var r;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||(r=new _(e.value,t),O(this.value,r,t));if(""===e.operator)return""===e.value||(r=new _(this.value,t),O(e.semver,r,t));var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,o=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=w(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=w(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||i||a&&o||s||c},t.Range=_,_.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},_.prototype.toString=function(){return this.range},_.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?i[o.HYPHENRANGELOOSE]:i[o.HYPHENRANGE];e=e.replace(n,C),r("hyphen replace",e),e=e.replace(i[o.COMPARATORTRIM],"$1$2$3"),r("comparator trim",e,i[o.COMPARATORTRIM]),e=(e=(e=e.replace(i[o.TILDETRIM],"$1~")).replace(i[o.CARETTRIM],"$1^")).split(/\s+/).join(" ");var a=t?i[o.COMPARATORLOOSE]:i[o.COMPARATOR],s=e.split(" ").map((function(e){return function(e,t){return r("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){r("caret",e,t);var n=t.loose?i[o.CARETLOOSE]:i[o.CARET];return e.replace(n,(function(t,n,i,a,o){var s;return r("caret",e,t,n,i,a,o),k(n)?s="":k(i)?s=">="+n+".0.0 <"+(+n+1)+".0.0":k(a)?s="0"===n?">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":">="+n+"."+i+".0 <"+(+n+1)+".0.0":o?(r("replaceCaret pr",o),s="0"===n?"0"===i?">="+n+"."+i+"."+a+"-"+o+" <"+n+"."+i+"."+(+a+1):">="+n+"."+i+"."+a+"-"+o+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+a+"-"+o+" <"+(+n+1)+".0.0"):(r("no pr"),s="0"===n?"0"===i?">="+n+"."+i+"."+a+" <"+n+"."+i+"."+(+a+1):">="+n+"."+i+"."+a+" <"+n+"."+(+i+1)+".0":">="+n+"."+i+"."+a+" <"+(+n+1)+".0.0"),r("caret return",s),s}))}(e,t)})).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var n=t.loose?i[o.TILDELOOSE]:i[o.TILDE];return e.replace(n,(function(t,n,i,a,o){var s;return r("tilde",e,t,n,i,a,o),k(n)?s="":k(i)?s=">="+n+".0.0 <"+(+n+1)+".0.0":k(a)?s=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0":o?(r("replaceTilde pr",o),s=">="+n+"."+i+"."+a+"-"+o+" <"+n+"."+(+i+1)+".0"):s=">="+n+"."+i+"."+a+" <"+n+"."+(+i+1)+".0",r("tilde return",s),s}))}(e,t)})).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var n=t.loose?i[o.XRANGELOOSE]:i[o.XRANGE];return e.replace(n,(function(n,i,a,o,s,c){r("xRange",e,n,i,a,o,s,c);var l=k(a),u=l||k(o),p=u||k(s),d=p;return"="===i&&d&&(i=""),c=t.includePrerelease?"-0":"",l?n=">"===i||"<"===i?"<0.0.0-0":"*":i&&d?(u&&(o=0),s=0,">"===i?(i=">=",u?(a=+a+1,o=0,s=0):(o=+o+1,s=0)):"<="===i&&(i="<",u?a=+a+1:o=+o+1),n=i+a+"."+o+"."+s+c):u?n=">="+a+".0.0"+c+" <"+(+a+1)+".0.0"+c:p&&(n=">="+a+"."+o+".0"+c+" <"+a+"."+(+o+1)+".0"+c),r("xRange return",n),n}))}(e,t)})).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(i[o.STAR],"")}(e,t),r("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(a)}))),s=s.map((function(e){return new E(e,this.options)}),this)},_.prototype.intersects=function(e,t){if(!(e instanceof _))throw new TypeError("a Range is required");return this.set.some((function(r){return S(r,t)&&e.set.some((function(e){return S(e,t)&&r.every((function(r){return e.every((function(e){return r.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new _(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},_.prototype.test=function(e){if(!e)return!1;if("string"==typeof e)try{e=new p(e,this.options)}catch(e){return!1}for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!m(r,t)||(r=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}if(r&&e.test(r))return r;return null},t.validRange=function(e,t){try{return new _(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,r){return I(e,t,"<",r)},t.gtr=function(e,t,r){return I(e,t,">",r)},t.outside=I,t.prerelease=function(e,t){var r=u(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new _(e,r),t=new _(t,r),e.intersects(t)},t.coerce=function(e,t){if(e instanceof p)return e;"number"==typeof e&&(e=String(e));if("string"!=typeof e)return null;var r=null;if((t=t||{}).rtl){for(var n;(n=i[o.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),i[o.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;i[o.COERCERTL].lastIndex=-1}else r=e.match(i[o.COERCE]);if(null===r)return null;return u(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}},function(e,t){e.exports=i,i.strict=a,i.loose=o;var r=Object.prototype.toString,n={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function i(e){return a(e)||o(e)}function a(e){return e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}function o(e){return n[r.call(e)]}},function(e,t,r){"use strict";var n=r(31);e.exports=function(e){n.copy(e,this)}},function(e,t,r){"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r,n="boolean"==typeof t.cycles&&t.cycles,i=t.cmp&&(r=t.cmp,function(e){return function(t,n){var i={key:t,value:e[t]},a={key:n,value:e[n]};return r(i,a)}}),a=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var r,o;if(Array.isArray(t)){for(o="[",r=0;r",b=h?">":"<",y=void 0;if(!d&&"number"!=typeof s&&void 0!==s)throw new Error(t+" must be number");if(!v&&void 0!==m&&"number"!=typeof m&&"boolean"!=typeof m)throw new Error(f+" must be number or boolean");if(v){var x=e.util.getData(m.$data,o,e.dataPathArr),w="exclusive"+a,E="exclType"+a,D="exclIsNumber"+a,_="' + "+(C="op"+a)+" + '";i+=" var schemaExcl"+a+" = "+x+"; ",i+=" var "+w+"; var "+E+" = typeof "+(x="schemaExcl"+a)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var S;y=f;(S=S||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(y||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: '"+f+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var k=i;i=S.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+k+"]); ":i+=" validate.errors = ["+k+"]; return false; ":i+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+E+" == 'number' ? ( ("+w+" = "+n+" === undefined || "+x+" "+g+"= "+n+") ? "+p+" "+b+"= "+x+" : "+p+" "+b+" "+n+" ) : ( ("+w+" = "+x+" === true) ? "+p+" "+b+"= "+n+" : "+p+" "+b+" "+n+" ) || "+p+" !== "+p+") { var op"+a+" = "+w+" ? '"+g+"' : '"+g+"='; ",void 0===s&&(y=f,l=e.errSchemaPath+"/"+f,n=x,d=v)}else{_=g;if((D="number"==typeof m)&&d){var C="'"+_+"'";i+=" if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" ( "+n+" === undefined || "+m+" "+g+"= "+n+" ? "+p+" "+b+"= "+m+" : "+p+" "+b+" "+n+" ) || "+p+" !== "+p+") { "}else{D&&void 0===s?(w=!0,y=f,l=e.errSchemaPath+"/"+f,n=m,b+="="):(D&&(n=Math[h?"min":"max"](m,s)),m===(!D||n)?(w=!0,y=f,l=e.errSchemaPath+"/"+f,b+="="):(w=!1,_+="="));C="'"+_+"'";i+=" if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+p+" "+b+" "+n+" || "+p+" !== "+p+") { "}}y=y||t,(S=S||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(y||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { comparison: "+C+", limit: "+n+", exclusive: "+w+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+_+" ",i+=d?"' + "+n:n+"'"),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";k=i;return i=S.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+k+"]); ":i+=" validate.errors = ["+k+"]; return false; ":i+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",u&&(i+=" else { "),i}},function(e,t,r){"use strict";e.exports=function(e,t,r){var n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,p="data"+(o||""),d=e.opts.$data&&s&&s.$data;if(d?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s,!d&&"number"!=typeof s)throw new Error(t+" must be number");i+="if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+p+".length "+("maxItems"==t?">":"<")+" "+n+") { ";var h=t,f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(h||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"fewer",i+=" than ",i+=d?"' + "+n+" + '":""+s,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var m=i;return i=f.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i}},function(e,t,r){"use strict";e.exports=function(e,t,r){var n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,p="data"+(o||""),d=e.opts.$data&&s&&s.$data;if(d?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s,!d&&"number"!=typeof s)throw new Error(t+" must be number");var h="maxLength"==t?">":"<";i+="if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),!1===e.opts.unicode?i+=" "+p+".length ":i+=" ucs2length("+p+") ",i+=" "+h+" "+n+") { ";var f=t,m=m||[];m.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(f||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=d?"' + "+n+" + '":""+s,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var v=i;return i=m.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+v+"]); ":i+=" validate.errors = ["+v+"]; return false; ":i+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i}},function(e,t,r){"use strict";e.exports=function(e,t,r){var n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,p="data"+(o||""),d=e.opts.$data&&s&&s.$data;if(d?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s,!d&&"number"!=typeof s)throw new Error(t+" must be number");i+="if ( ",d&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" Object.keys("+p+").length "+("maxProperties"==t?">":"<")+" "+n+") { ";var h=t,f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(h||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+n+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"fewer",i+=" than ",i+=d?"' + "+n+" + '":""+s,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var m=i;return i=f.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i}},function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},function(e,t,r){"use strict";const n=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};e.exports=n,e.exports.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationError=t.CancellationToken=void 0;const n=r(28);class i extends n.EventEmitter{constructor(e){super(),this.parentCancelHandler=null,this._parent=null,this._cancelled=!1,null!=e&&(this.parent=e)}get cancelled(){return this._cancelled||null!=this._parent&&this._parent.cancelled}set parent(e){this.removeParentCancelHandler(),this._parent=e,this.parentCancelHandler=()=>this.cancel(),this._parent.onCancel(this.parentCancelHandler)}cancel(){this._cancelled=!0,this.emit("cancel")}onCancel(e){this.cancelled?e():this.once("cancel",e)}createPromise(e){if(this.cancelled)return Promise.reject(new a);const t=()=>{if(null!=r)try{this.removeListener("cancel",r),r=null}catch(e){}};let r=null;return new Promise((t,n)=>{let i=null;r=()=>{try{null!=i&&(i(),i=null)}finally{n(new a)}},this.cancelled?r():(this.onCancel(r),e(t,n,e=>{i=e}))}).then(e=>(t(),e)).catch(e=>{throw t(),e})}removeParentCancelHandler(){const e=this._parent;null!=e&&null!=this.parentCancelHandler&&(e.removeListener("cancel",this.parentCancelHandler),this.parentCancelHandler=null)}dispose(){try{this.removeParentCancelHandler()}finally{this.removeAllListeners(),this._parent=null}}}t.CancellationToken=i;class a extends Error{constructor(){super("cancelled")}}t.CancellationError=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.safeStringifyJson=t.configureRequestOptions=t.safeGetHeader=t.DigestTransform=t.configureRequestUrl=t.configureRequestOptionsFromUrl=t.HttpExecutor=t.parseJson=t.HttpError=t.createHttpError=void 0;const n=r(40),i=r(306),a=r(2),o=r(19),s=r(17),c=r(134),l=r(4),u=r(137),p=i.default("electron-builder");function d(e,t=null){return new f(e.statusCode||-1,`${e.statusCode} ${e.statusMessage}`+(null==t?"":"\n"+JSON.stringify(t,null," "))+"\nHeaders: "+w(e.headers),t)}t.createHttpError=d;const h=new Map([[429,"Too many requests"],[400,"Bad request"],[403,"Forbidden"],[404,"Not found"],[405,"Method not allowed"],[406,"Not acceptable"],[408,"Request timeout"],[413,"Request entity too large"],[500,"Internal server error"],[502,"Bad gateway"],[503,"Service unavailable"],[504,"Gateway timeout"],[505,"HTTP version not supported"]]);class f extends Error{constructor(e,t="HTTP error: "+(h.get(e)||e),r=null){super(t),this.statusCode=e,this.description=r,this.name="HttpError",this.code="HTTP_ERROR_"+e}}t.HttpError=f,t.parseJson=function(e){return e.then(e=>null==e||0===e.length?null:JSON.parse(e))};class m{constructor(){this.maxRedirects=10}request(e,t=new c.CancellationToken,r){x(e);const n=null==r?void 0:Buffer.from(JSON.stringify(r));return null!=n&&(e.method="post",e.headers["Content-Type"]="application/json",e.headers["Content-Length"]=n.length),this.doApiRequest(e,t,e=>{e.end(n)})}doApiRequest(e,t,r,n=0){return p.enabled&&p("Request: "+w(e)),t.createPromise((i,a,o)=>{const s=this.createRequest(e,o=>{try{this.handleResponse(o,e,t,i,a,n,r)}catch(e){a(e)}});this.addErrorAndTimeoutHandlers(s,a),this.addRedirectHandlers(s,e,a,n,e=>{this.doApiRequest(e,t,r,n).then(i).catch(a)}),r(s,a),o(()=>s.abort())})}addRedirectHandlers(e,t,r,n,i){}addErrorAndTimeoutHandlers(e,t){this.addTimeOutHandler(e,t),e.on("error",t),e.on("aborted",()=>{t(new Error("Request has been aborted by the server"))})}handleResponse(e,t,r,n,i,a,o){if(p.enabled&&p(`Response: ${e.statusCode} ${e.statusMessage}, request options: ${w(t)}`),404===e.statusCode)return void i(d(e,`method: ${t.method||"GET"} url: ${t.protocol||"https:"}//${t.hostname}${t.port?":"+t.port:""}${t.path}\n\nPlease double check that your authentication token is correct. Due to security reasons actual status maybe not reported, but 404.\n`));if(204===e.statusCode)return void n();const s=y(e,"location");if(null!=s)return a>this.maxRedirects?void i(this.createMaxRedirectError()):void this.doApiRequest(m.prepareRedirectUrlOptions(s,t),r,o,a).then(n).catch(i);e.setEncoding("utf8");let c="";e.on("error",i),e.on("data",e=>c+=e),e.on("end",()=>{try{if(null!=e.statusCode&&e.statusCode>=400){const t=y(e,"content-type"),r=null!=t&&(Array.isArray(t)?null!=t.find(e=>e.includes("json")):t.includes("json"));i(d(e,r?JSON.parse(c):c))}else n(0===c.length?null:c)}catch(e){i(e)}})}async downloadToBuffer(e,t){return await t.cancellationToken.createPromise((r,n,i)=>{let a=null;const o={headers:t.headers||void 0,redirect:"manual"};g(e,o),x(o),this.doDownload(o,{destination:null,options:t,onCancel:i,callback:e=>{null==e?r(a):n(e)},responseHandler:(e,t)=>{const r=y(e,"content-length");let n=-1;if(null!=r){const e=parseInt(r,10);if(e>0){if(e>524288e3)return void t(new Error("Maximum allowed size is 500 MB"));a=Buffer.alloc(e),n=0}}e.on("data",e=>{if(-1!==n)e.copy(a,n),n+=e.length;else if(null==a)a=e;else{if(a.length>524288e3)return void t(new Error("Maximum allowed size is 500 MB"));a=Buffer.concat([a,e])}}),e.on("end",()=>{null!=a&&-1!==n&&n!==a.length?t(new Error(`Received data length ${n} is not equal to expected ${a.length}`)):t(null)})}},0)})}doDownload(e,t,r){const n=this.createRequest(e,n=>{if(n.statusCode>=400)return void t.callback(new Error(`Cannot download "${e.protocol||"https:"}//${e.hostname}${e.path}", status ${n.statusCode}: ${n.statusMessage}`));n.on("error",t.callback);const i=y(n,"location");null==i?null==t.responseHandler?function(e,t){if(!function(e,t,r){if(null!=e&&null!=t&&e!==t)return r(new Error(`checksum mismatch: expected ${t} but got ${e} (X-Checksum-Sha2 header)`)),!1;return!0}(y(t,"X-Checksum-Sha2"),e.options.sha2,e.callback))return;const r=[];if(null!=e.options.onProgress){const n=y(t,"content-length");null!=n&&r.push(new u.ProgressCallbackTransform(parseInt(n,10),e.options.cancellationToken,e.options.onProgress))}const n=e.options.sha512;null!=n?r.push(new b(n,"sha512",128!==n.length||n.includes("+")||n.includes("Z")||n.includes("=")?"base64":"hex")):null!=e.options.sha2&&r.push(new b(e.options.sha2,"sha256","hex"));const i=a.createWriteStream(e.destination);r.push(i);let o=t;for(const t of r)t.on("error",t=>{e.options.cancellationToken.cancelled||e.callback(t)}),o=o.pipe(t);i.on("finish",()=>{i.close(e.callback)})}(t,n):t.responseHandler(n,t.callback):r{this.doDownload(e,t,r++)}),n.end()}createMaxRedirectError(){return new Error(`Too many redirects (> ${this.maxRedirects})`)}addTimeOutHandler(e,t){e.on("socket",r=>{r.setTimeout(6e4,()=>{e.abort(),t(new Error("Request timed out"))})})}static prepareRedirectUrlOptions(e,t){const r=v(e,{...t}),n=r.headers;if(null!=n&&null!=n.authorization&&n.authorization.startsWith("token")){const t=new s.URL(e);(t.hostname.endsWith(".amazonaws.com")||t.searchParams.has("X-Amz-Credential"))&&delete n.authorization}return r}}function v(e,t){const r=x(t);return g(new s.URL(e),r),r}function g(e,t){t.protocol=e.protocol,t.hostname=e.hostname,e.port?t.port=e.port:t.port&&delete t.port,t.path=e.pathname+e.search}t.HttpExecutor=m,t.configureRequestOptionsFromUrl=v,t.configureRequestUrl=g;class b extends o.Transform{constructor(e,t="sha512",r="base64"){super(),this.expected=e,this.algorithm=t,this.encoding=r,this._actual=null,this.isValidateOnEnd=!0,this.digester=n.createHash(t)}get actual(){return this._actual}_transform(e,t,r){this.digester.update(e),r(null,e)}_flush(e){if(this._actual=this.digester.digest(this.encoding),this.isValidateOnEnd)try{this.validate()}catch(t){return void e(t)}e(null)}validate(){if(null==this._actual)throw l.newError("Not finished yet","ERR_STREAM_NOT_FINISHED");if(this._actual!==this.expected)throw l.newError(`${this.algorithm} checksum mismatch, expected ${this.expected}, got ${this._actual}`,"ERR_CHECKSUM_MISMATCH");return null}}function y(e,t){const r=e.headers[t];return null==r?null:Array.isArray(r)?0===r.length?null:r[r.length-1]:r}function x(e,t,r){null!=r&&(e.method=r),e.headers={...e.headers};const n=e.headers;return null!=t&&(n.authorization=t.startsWith("Basic")?t:"token "+t),null==n["User-Agent"]&&(n["User-Agent"]="electron-builder"),null!=r&&"GET"!==r&&null!=n["Cache-Control"]||(n["Cache-Control"]="no-cache"),null==e.protocol&&null!=process.versions.electron&&(e.protocol="https:"),e}function w(e,t){return JSON.stringify(e,(e,r)=>e.endsWith("authorization")||e.endsWith("Password")||e.endsWith("PASSWORD")||e.endsWith("Token")||e.includes("password")||e.includes("token")||null!=t&&t.has(e)?"":r,2)}t.DigestTransform=b,t.safeGetHeader=y,t.configureRequestOptions=x,t.safeStringifyJson=w},function(e,t,r){e.exports=function(e){function t(e){let r,i,a,o=null;function s(...e){if(!s.enabled)return;const n=s,i=Number(new Date),a=i-(r||i);n.diff=a,n.prev=r,n.curr=i,r=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let o=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,i)=>{if("%%"===r)return"%";o++;const a=t.formatters[i];if("function"==typeof a){const t=e[o];r=a.call(n,t),e.splice(o,1),o--}return r}),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==t.namespaces&&(i=t.namespaces,a=t.enabled(e)),a),set:e=>{o=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),i=n.length;for(r=0;r{t[r]=e[r]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t=this.nextUpdate&&this.transferred!==this.total&&(this.nextUpdate=n+1e3,this.onProgress({total:this.total,delta:this.delta,transferred:this.transferred,percent:this.transferred/this.total*100,bytesPerSecond:Math.round(this.transferred/((n-this.start)/1e3))}),this.delta=0),r(null,e)}_flush(e){this.cancellationToken.cancelled?e(new Error("cancelled")):(this.onProgress({total:this.total,delta:this.delta,transferred:this.total,percent:100,bytesPerSecond:Math.round(this.transferred/((Date.now()-this.start)/1e3))}),this.delta=0,e(null))}}t.ProgressCallbackTransform=i},function(e,t,r){"use strict";e.exports={copySync:r(323)}},function(e,t,r){"use strict";const n=r(7);e.exports={utimesMillis:function(e,t,r,i){n.open(e,"r+",(e,a)=>{if(e)return i(e);n.futimes(a,t,r,e=>{n.close(a,t=>{i&&i(e||t)})})})},utimesMillisSync:function(e,t,r){const i=n.openSync(e,"r+");return n.futimesSync(i,t,r),n.closeSync(i)}}},function(e,t,r){"use strict";const n=r(8).fromCallback;e.exports={copy:n(r(326))}},function(e,t,r){const n=r(34);e.exports={re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r(51).SEMVER_SPEC_VERSION,SemVer:r(6),compareIdentifiers:r(78).compareIdentifiers,rcompareIdentifiers:r(78).rcompareIdentifiers,parse:r(35),valid:r(345),clean:r(346),inc:r(347),diff:r(348),major:r(349),minor:r(350),patch:r(351),prerelease:r(352),compare:r(13),rcompare:r(353),compareLoose:r(354),compareBuild:r(80),sort:r(355),rsort:r(356),gt:r(54),lt:r(81),eq:r(79),neq:r(142),gte:r(82),lte:r(83),cmp:r(143),coerce:r(357),Comparator:r(55),Range:r(14),satisfies:r(56),toComparators:r(358),maxSatisfying:r(359),minSatisfying:r(360),minVersion:r(361),validRange:r(362),outside:r(84),gtr:r(363),ltr:r(364),intersects:r(365),simplifyRange:r(366),subset:r(367)}},function(e,t,r){const n=r(13);e.exports=(e,t,r)=>0!==n(e,t,r)},function(e,t,r){const n=r(79),i=r(142),a=r(54),o=r(82),s=r(81),c=r(83);e.exports=(e,t,r,l)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,l);case"!=":return i(e,r,l);case">":return a(e,r,l);case">=":return o(e,r,l);case"<":return s(e,r,l);case"<=":return c(e,r,l);default:throw new TypeError("Invalid operator: "+t)}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GenericProvider=void 0;const n=r(4),i=r(36),a=r(21);class o extends a.Provider{constructor(e,t,r){super(r),this.configuration=e,this.updater=t,this.baseUrl=i.newBaseUrl(this.configuration.url)}get channel(){const e=this.updater.channel||this.configuration.channel;return null==e?this.getDefaultChannelName():this.getCustomChannelName(e)}async getLatestVersion(){const e=i.getChannelFilename(this.channel),t=i.newUrlFromBase(e,this.baseUrl,this.updater.isAddNoCacheQuery);for(let r=0;;r++)try{return a.parseUpdateInfo(await this.httpRequest(t),e,t)}catch(t){if(t instanceof n.HttpError&&404===t.statusCode)throw n.newError(`Cannot find channel "${e}" update info: ${t.stack||t.message}`,"ERR_UPDATER_CHANNEL_FILE_NOT_FOUND");if("ECONNREFUSED"===t.code&&r<3){await new Promise((e,t)=>{try{setTimeout(e,1e3*r)}catch(e){t(e)}});continue}throw t}}resolveFiles(e){return a.resolveFiles(e,this.baseUrl)}}t.GenericProvider=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeReleaseNotes=t.GitHubProvider=t.BaseGitHubProvider=void 0;const n=r(4),i=r(141),a=r(17),o=r(36),s=r(21),c=/\/tag\/v?([^/]+)$/;class l extends s.Provider{constructor(e,t,r){super({...r,isUseMultipleRangeRequest:!1}),this.options=e,this.baseUrl=o.newBaseUrl(n.githubUrl(e,t));const i="github.com"===t?"api.github.com":t;this.baseApiUrl=o.newBaseUrl(n.githubUrl(e,i))}computeGithubBasePath(e){const t=this.options.host;return null!=t&&"github.com"!==t&&"api.github.com"!==t?"/api/v3"+e:e}}t.BaseGitHubProvider=l;function u(e){const t=e.elementValueOrEmpty("content");return"No content."===t?"":t}function p(e,t,r,n){if(!t)return u(n);const a=[];for(const t of r.getElements("entry")){const r=/\/tag\/v?([^/]+)$/.exec(t.element("link").attribute("href"))[1];i.lt(e,r)&&a.push({version:r,note:u(t)})}return a.sort((e,t)=>i.rcompare(e.version,t.version))}t.GitHubProvider=class extends l{constructor(e,t,r){super(e,"github.com",r),this.options=e,this.updater=t}async getLatestVersion(){const e=new n.CancellationToken,t=await this.httpRequest(o.newUrlFromBase(this.basePath+".atom",this.baseUrl),{accept:"application/xml, application/atom+xml, text/xml, */*"},e),r=n.parseXml(t);let i,a=r.element("entry",!1,"No published versions on GitHub");try{if(this.updater.allowPrerelease)i=c.exec(a.element("link").attribute("href"))[1];else{i=await this.getLatestVersionString(e);for(const e of r.getElements("entry"))if(c.exec(e.element("link").attribute("href"))[1]===i){a=e;break}}}catch(e){throw n.newError(`Cannot parse releases feed: ${e.stack||e.message},\nXML:\n${t}`,"ERR_UPDATER_INVALID_RELEASE_FEED")}if(null==i)throw n.newError("No published versions on GitHub","ERR_UPDATER_NO_PUBLISHED_VERSIONS");const l=o.getChannelFilename(this.getDefaultChannelName()),u=o.newUrlFromBase(this.getBaseDownloadPath(i,l),this.baseUrl),d=this.createRequestOptions(u);let h;try{h=await this.executor.request(d,e)}catch(e){if(!this.updater.allowPrerelease&&e instanceof n.HttpError&&404===e.statusCode)throw n.newError(`Cannot find ${l} in the latest release artifacts (${u}): ${e.stack||e.message}`,"ERR_UPDATER_CHANNEL_FILE_NOT_FOUND");throw e}const f=s.parseUpdateInfo(h,l,u);return null==f.releaseName&&(f.releaseName=a.elementValueOrEmpty("title")),null==f.releaseNotes&&(f.releaseNotes=p(this.updater.currentVersion,this.updater.fullChangelog,r,a)),f}async getLatestVersionString(e){const t=this.options,r=null==t.host||"github.com"===t.host?o.newUrlFromBase(this.basePath+"/latest",this.baseUrl):new a.URL(this.computeGithubBasePath(`/repos/${t.owner}/${t.repo}/releases`)+"/latest",this.baseApiUrl);try{const t=await this.httpRequest(r,{Accept:"application/json"},e);if(null==t)return null;const n=JSON.parse(t);return n.tag_name.startsWith("v")?n.tag_name.substring(1):n.tag_name}catch(e){throw n.newError(`Unable to find latest version on GitHub (${r}), please ensure a production release exists: ${e.stack||e.message}`,"ERR_UPDATER_LATEST_VERSION_NOT_FOUND")}}get basePath(){return`/${this.options.owner}/${this.options.repo}/releases`}resolveFiles(e){return s.resolveFiles(e,this.baseUrl,t=>this.getBaseDownloadPath(e.version,t.replace(/ /g,"-")))}getBaseDownloadPath(e,t){return`${this.basePath}/download/${!1===this.options.vPrefixedTagName?"":"v"}${e}/${t}`}},t.computeReleaseNotes=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppImageUpdater=void 0;const n=r(4),i=r(85),a=r(23),o=r(2),s=r(0),c=r(147),l=r(148),u=r(15),p=r(21);class d extends c.BaseUpdater{constructor(e,t){super(e,t)}isUpdaterActive(){return null==process.env.APPIMAGE?(null==process.env.SNAP?this._logger.warn("APPIMAGE env is not defined, current application is not an AppImage"):this._logger.info("SNAP env is defined, updater is disabled"),!1):super.isUpdaterActive()}doDownloadUpdate(e){const t=e.updateInfoAndProvider.provider,r=p.findFile(t.resolveFiles(e.updateInfoAndProvider.info),"AppImage");return this.executeDownload({fileExtension:"AppImage",fileInfo:r,downloadUpdateOptions:e,task:async(i,o)=>{const s=process.env.APPIMAGE;if(null==s)throw n.newError("APPIMAGE env is not defined","ERR_UPDATER_OLD_FILE_NOT_FOUND");let c=!1;try{const n={newUrl:r.url,oldFile:s,logger:this._logger,newFile:i,isUseMultipleRangeRequest:t.isUseMultipleRangeRequest,requestHeaders:e.requestHeaders,cancellationToken:e.cancellationToken};this.listenerCount(u.DOWNLOAD_PROGRESS)>0&&(n.onProgress=e=>this.emit(u.DOWNLOAD_PROGRESS,e)),await new l.FileWithEmbeddedBlockMapDifferentialDownloader(r.info,this.httpExecutor,n).download()}catch(e){this._logger.error("Cannot download differentially, fallback to full download: "+(e.stack||e)),c="linux"===process.platform}c&&await this.httpExecutor.download(r.url,i,o),await a.chmod(i,493)}})}doInstall(e){const t=process.env.APPIMAGE;if(null==t)throw n.newError("APPIMAGE env is not defined","ERR_UPDATER_OLD_FILE_NOT_FOUND");let r;o.unlinkSync(t);const a=s.basename(t);r=s.basename(e.installerPath)!==a&&/\d+\.\d+\.\d+/.test(a)?s.join(s.dirname(t),s.basename(e.installerPath)):t,i.execFileSync("mv",["-f",e.installerPath,r]),r!==t&&this.emit("appimage-filename-updated",r);const c={...process.env,APPIMAGE_SILENT_INSTALL:"true"};return e.isForceRunAfter?i.spawn(r,[],{detached:!0,stdio:"ignore",env:c}).unref():(c.APPIMAGE_EXIT_AFTER_INSTALL="true",i.execFileSync(r,[],{env:c})),!0}}t.AppImageUpdater=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseUpdater=void 0;const n=r(74);class i extends n.AppUpdater{constructor(e,t){super(e,t),this.quitAndInstallCalled=!1,this.quitHandlerAdded=!1}quitAndInstall(e=!1,t=!1){this._logger.info("Install on explicit quitAndInstall");this.install(e,!e||t)?setImmediate(()=>{this.app.quit()}):this.quitAndInstallCalled=!1}executeDownload(e){return super.executeDownload({...e,done:e=>(this.dispatchUpdateDownloaded(e),this.addQuitHandler(),Promise.resolve())})}install(e,t){if(this.quitAndInstallCalled)return this._logger.warn("install call ignored: quitAndInstallCalled is set to true"),!1;const r=this.downloadedUpdateHelper,n=null==r?null:r.file,i=null==r?null:r.downloadedFileInfo;if(null==n||null==i)return this.dispatchError(new Error("No valid update available, can't quit and install")),!1;this.quitAndInstallCalled=!0;try{return this._logger.info(`Install: isSilent: ${e}, isForceRunAfter: ${t}`),this.doInstall({installerPath:n,isSilent:e,isForceRunAfter:t,isAdminRightsRequired:i.isAdminRightsRequired})}catch(e){return this.dispatchError(e),!1}}addQuitHandler(){!this.quitHandlerAdded&&this.autoInstallOnAppQuit&&(this.quitHandlerAdded=!0,this.app.onQuit(e=>{this.quitAndInstallCalled?this._logger.info("Update installer has already been triggered. Quitting application."):this.autoInstallOnAppQuit?0===e?(this._logger.info("Auto install update on quit"),this.install(!0,!1)):this._logger.info("Update will be not installed on quit because application is quitting with exit code "+e):this._logger.info("Update will not be installed on quit because autoInstallOnAppQuit is set to false.")}))}}t.BaseUpdater=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileWithEmbeddedBlockMapDifferentialDownloader=void 0;const n=r(23),i=r(149),a=r(151);class o extends i.DifferentialDownloader{async download(){const e=this.blockAwareFileInfo,t=e.size,r=t-(e.blockMapSize+4);this.fileMetadataBuffer=await this.readRemoteBytes(r,t-1);const i=s(this.fileMetadataBuffer.slice(0,this.fileMetadataBuffer.length-4));await this.doDownload(await async function(e){const t=await n.open(e,"r");try{const e=(await n.fstat(t)).size,r=Buffer.allocUnsafe(4);await n.read(t,r,0,r.length,e-r.length);const i=Buffer.allocUnsafe(r.readUInt32BE(0));return await n.read(t,i,0,i.length,e-r.length-i.length),await n.close(t),s(i)}catch(e){throw await n.close(t),e}}(this.options.oldFile),i)}}function s(e){return JSON.parse(a.inflateRawSync(e).toString())}t.FileWithEmbeddedBlockMapDifferentialDownloader=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DifferentialDownloader=void 0;const n=r(4),i=r(23),a=r(2),o=r(150),s=r(17),c=r(86),l=r(378),u=r(379);function p(e,t=" KB"){return new Intl.NumberFormat("en").format((e/1024).toFixed(2))+t}t.DifferentialDownloader=class{constructor(e,t,r){this.blockAwareFileInfo=e,this.httpExecutor=t,this.options=r,this.fileMetadataBuffer=null,this.logger=r.logger}createRequestOptions(){const e={headers:{...this.options.requestHeaders,accept:"*/*"}};return n.configureRequestUrl(this.options.newUrl,e),n.configureRequestOptions(e),e}doDownload(e,t){if(e.version!==t.version)throw new Error(`version is different (${e.version} - ${t.version}), full download is required`);const r=this.logger,n=c.computeOperations(e,t,r);null!=r.debug&&r.debug(JSON.stringify(n,null,2));let i=0,a=0;for(const e of n){const t=e.end-e.start;e.kind===c.OperationKind.DOWNLOAD?i+=t:a+=t}const o=this.blockAwareFileInfo.size;if(i+a+(null==this.fileMetadataBuffer?0:this.fileMetadataBuffer.length)!==o)throw new Error(`Internal error, size mismatch: downloadSize: ${i}, copySize: ${a}, newSize: ${o}`);return r.info(`Full: ${p(o)}, To download: ${p(i)} (${Math.round(i/(o/100))}%)`),this.downloadFile(n)}downloadFile(e){const t=[],r=()=>Promise.all(t.map(e=>i.close(e.descriptor).catch(t=>{this.logger.error(`cannot close file "${e.path}": ${t}`)})));return this.doDownloadFile(e,t).then(r).catch(e=>r().catch(t=>{try{this.logger.error("cannot close files: "+t)}catch(e){try{console.error(e)}catch(e){}}throw e}).then(()=>{throw e}))}async doDownloadFile(e,t){const r=await i.open(this.options.oldFile,"r");t.push({descriptor:r,path:this.options.oldFile});const p=await i.open(this.options.newFile,"w");t.push({descriptor:p,path:this.options.newFile});const d=a.createWriteStream(this.options.newFile,{fd:p});await new Promise((i,a)=>{const p=[];let h=void 0;if(!this.options.isUseMultipleRangeRequest&&this.options.onProgress){const t=[];let r=0;for(const n of e)n.kind===c.OperationKind.DOWNLOAD&&(t.push(n.end-n.start),r+=n.end-n.start);const n={expectedByteCounts:t,grandTotal:r};h=new u.ProgressDifferentialDownloadCallbackTransform(n,this.options.cancellationToken,this.options.onProgress),p.push(h)}const f=new n.DigestTransform(this.blockAwareFileInfo.sha512);f.isValidateOnEnd=!1,p.push(f),d.on("finish",()=>{d.close(()=>{t.splice(1,1);try{f.validate()}catch(e){return void a(e)}i(void 0)})}),p.push(d);let m=null;for(const e of p)e.on("error",a),m=null==m?e:m.pipe(e);const v=p[0];let g;if(this.options.isUseMultipleRangeRequest)return g=l.executeTasksUsingMultipleRangeRequests(this,e,v,r,a),void g(0);let b=0,y=null;this.logger.info("Differential download: "+this.options.newUrl);const x=this.createRequestOptions();x.redirect="manual",g=t=>{var i,l;if(t>=e.length)return null!=this.fileMetadataBuffer&&v.write(this.fileMetadataBuffer),void v.end();const u=e[t++];if(u.kind===c.OperationKind.COPY)return h&&h.beginFileCopy(),void o.copyData(u,v,r,a,()=>g(t));const p=`bytes=${u.start}-${u.end-1}`;x.headers.range=p,null===(l=null===(i=this.logger)||void 0===i?void 0:i.debug)||void 0===l||l.call(i,"download range: "+p),h&&h.beginRangeDownload();const d=this.httpExecutor.createRequest(x,e=>{e.statusCode>=400&&a(n.createHttpError(e)),e.pipe(v,{end:!1}),e.once("end",()=>{h&&h.endRangeDownload(),100==++b?(b=0,setTimeout(()=>g(t),1e3)):g(t)})});d.on("redirect",(e,t,r)=>{this.logger.info("Redirect to "+function(e){const t=e.indexOf("?");return t<0?e:e.substring(0,t)}(r)),y=r,n.configureRequestUrl(new s.URL(y),x),d.followRedirect()}),this.httpExecutor.addErrorAndTimeoutHandlers(d,a),d.end()},g(0)})}async readRemoteBytes(e,t){const r=Buffer.allocUnsafe(t+1-e),n=this.createRequestOptions();n.headers.range=`bytes=${e}-${t}`;let i=0;if(await this.request(n,e=>{e.copy(r,i),i+=e.length}),i!==r.length)throw new Error(`Received data length ${i} is not equal to expected ${r.length}`);return r}request(e,t){return new Promise((r,n)=>{const i=this.httpExecutor.createRequest(e,e=>{l.checkIsRangesSupported(e,n)&&(e.on("data",t),e.on("end",()=>r()))});this.httpExecutor.addErrorAndTimeoutHandlers(i,n),i.end()})}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataSplitter=t.copyData=void 0;const n=r(4),i=r(2),a=r(19),o=r(86),s=Buffer.from("\r\n\r\n");var c;function l(e,t,r,n,a){const o=i.createReadStream("",{fd:r,autoClose:!1,start:e.start,end:e.end-1});o.on("error",n),o.once("end",a),o.pipe(t,{end:!1})}!function(e){e[e.INIT=0]="INIT",e[e.HEADER=1]="HEADER",e[e.BODY=2]="BODY"}(c||(c={})),t.copyData=l;class u extends a.Writable{constructor(e,t,r,n,i,a){super(),this.out=e,this.options=t,this.partIndexToTaskIndex=r,this.partIndexToLength=i,this.finishHandler=a,this.partIndex=-1,this.headerListBuffer=null,this.readState=c.INIT,this.ignoreByteCount=0,this.remainingPartDataCount=0,this.actualPartLength=0,this.boundaryLength=n.length+4,this.ignoreByteCount=this.boundaryLength-2}get isFinished(){return this.partIndex===this.partIndexToLength.length}_write(e,t,r){this.isFinished?console.error(`Trailing ignored data: ${e.length} bytes`):this.handleData(e).then(r).catch(r)}async handleData(e){let t=0;if(0!==this.ignoreByteCount&&0!==this.remainingPartDataCount)throw n.newError("Internal error","ERR_DATA_SPLITTER_BYTE_COUNT_MISMATCH");if(this.ignoreByteCount>0){const r=Math.min(this.ignoreByteCount,e.length);this.ignoreByteCount-=r,t=r}else if(this.remainingPartDataCount>0){const r=Math.min(this.remainingPartDataCount,e.length);this.remainingPartDataCount-=r,await this.processPartData(e,0,r),t=r}if(t!==e.length){if(this.readState===c.HEADER){const r=this.searchHeaderListEnd(e,t);if(-1===r)return;t=r,this.readState=c.BODY,this.headerListBuffer=null}for(;;){if(this.readState===c.BODY)this.readState=c.INIT;else{this.partIndex++;let r=this.partIndexToTaskIndex.get(this.partIndex);if(null==r){if(!this.isFinished)throw n.newError("taskIndex is null","ERR_DATA_SPLITTER_TASK_INDEX_IS_NULL");r=this.options.end}const i=0===this.partIndex?this.options.start:this.partIndexToTaskIndex.get(this.partIndex-1)+1;if(ir)throw n.newError("prevTaskIndex must be < taskIndex","ERR_DATA_SPLITTER_TASK_INDEX_ASSERT_FAILED");if(this.isFinished)return this.onPartEnd(),void this.finishHandler();if(t=this.searchHeaderListEnd(e,t),-1===t)return void(this.readState=c.HEADER)}const r=this.partIndexToLength[this.partIndex],i=t+r,a=Math.min(i,e.length);if(await this.processPartStarted(e,t,a),this.remainingPartDataCount=r-(a-t),this.remainingPartDataCount>0)return;if(t=i+this.boundaryLength,t>=e.length)return void(this.ignoreByteCount=this.boundaryLength-(e.length-i))}}}copyExistingData(e,t){return new Promise((r,n)=>{const i=()=>{if(e===t)return void r();const a=this.options.tasks[e];a.kind===o.OperationKind.COPY?l(a,this.out,this.options.oldFileFd,n,()=>{e++,i()}):n(new Error("Task kind must be COPY"))};i()})}searchHeaderListEnd(e,t){const r=e.indexOf(s,t);if(-1!==r)return r+s.length;const n=0===t?e:e.slice(t);return null==this.headerListBuffer?this.headerListBuffer=n:this.headerListBuffer=Buffer.concat([this.headerListBuffer,n]),-1}onPartEnd(){const e=this.partIndexToLength[this.partIndex-1];if(this.actualPartLength!==e)throw n.newError(`Expected length: ${e} differs from actual: ${this.actualPartLength}`,"ERR_DATA_SPLITTER_LENGTH_MISMATCH");this.actualPartLength=0}processPartStarted(e,t,r){return 0!==this.partIndex&&this.onPartEnd(),this.processPartData(e,t,r)}processPartData(e,t,r){this.actualPartLength+=r-t;const n=this.out;return n.write(0===t&&e.length===r?e:e.slice(t,r))?Promise.resolve():new Promise((e,t)=>{n.on("error",t),n.once("drain",()=>{n.removeListener("error",t),e()})})}}t.DataSplitter=u},function(e,t){e.exports=require("zlib")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MacUpdater=void 0;const n=r(4),i=r(23),a=r(2),o=r(380),s=r(74),c=r(21);class l extends s.AppUpdater{constructor(e,t){super(e,t),this.nativeUpdater=r(1).autoUpdater,this.squirrelDownloadedUpdate=!1,this.nativeUpdater.on("error",e=>{this._logger.warn(e),this.emit("error",e)}),this.nativeUpdater.on("update-downloaded",()=>{this.squirrelDownloadedUpdate=!0})}doDownloadUpdate(e){let t=e.updateInfoAndProvider.provider.resolveFiles(e.updateInfoAndProvider.info);const r=e=>e.url.pathname.includes("arm64");t.some(r)&&(t=t.filter(e=>"arm64"===process.arch===r(e)));const s=c.findFile(t,"zip",["pkg","dmg"]);if(null==s)throw n.newError("ZIP file not provided: "+n.safeStringifyJson(t),"ERR_UPDATER_ZIP_FILE_NOT_FOUND");const l=o.createServer();function u(){return"http://127.0.0.1:"+l.address().port}return l.on("close",()=>{this._logger.info(`Proxy server for native Squirrel.Mac is closed (was started to download ${s.url.href})`)}),this.executeDownload({fileExtension:"zip",fileInfo:s,downloadUpdateOptions:e,task:(e,t)=>this.httpExecutor.download(s.url,e,t),done:async e=>{const t=e.downloadedFile;let r=s.info.size;return null==r&&(r=(await i.stat(t)).size),await new Promise((n,i)=>{const o=`/${Date.now()}-${Math.floor(9999*Math.random())}.zip`;l.on("request",(e,s)=>{const c=e.url;if(this._logger.info(c+" requested"),"/"===c){const e=Buffer.from(`{ "url": "${u()}${o}" }`);return s.writeHead(200,{"Content-Type":"application/json","Content-Length":e.length}),void s.end(e)}if(!c.startsWith(o))return this._logger.warn(c+" requested, but not supported"),s.writeHead(404),void s.end();this._logger.info(`${o} requested by Squirrel.Mac, pipe ${t}`);let p=!1;s.on("finish",()=>{try{setImmediate(()=>l.close())}finally{p||(this.nativeUpdater.removeListener("error",i),n([]))}});const d=a.createReadStream(t);d.on("error",e=>{try{s.end()}catch(e){this._logger.warn("cannot end response: "+e)}p=!0,this.nativeUpdater.removeListener("error",i),i(new Error(`Cannot pipe "${t}": ${e}`))}),s.writeHead(200,{"Content-Type":"application/zip","Content-Length":r}),d.pipe(s)}),l.listen(0,"127.0.0.1",()=>{this.nativeUpdater.setFeedURL({url:u(),headers:{"Cache-Control":"no-cache"}}),this.dispatchUpdateDownloaded(e),this.autoInstallOnAppQuit?(this.nativeUpdater.once("error",i),this.nativeUpdater.checkForUpdates()):n([])})})}})}quitAndInstall(){this.squirrelDownloadedUpdate?this.nativeUpdater.quitAndInstall():(this.nativeUpdater.on("update-downloaded",()=>{this.nativeUpdater.quitAndInstall()}),this.nativeUpdater.checkForUpdates())}}t.MacUpdater=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NsisUpdater=void 0;const n=r(4),i=r(85),a=r(0),o=r(147),s=r(148),c=r(381),l=r(15),u=r(36),p=r(21),d=r(23),h=r(382),f=r(17),m=r(151);class v extends o.BaseUpdater{constructor(e,t){super(e,t)}doDownloadUpdate(e){const t=e.updateInfoAndProvider.provider,r=p.findFile(t.resolveFiles(e.updateInfoAndProvider.info),"exe");return this.executeDownload({fileExtension:"exe",downloadUpdateOptions:e,fileInfo:r,task:async(i,a,o,s)=>{const c=r.packageInfo,l=null!=c&&null!=o;(l||await this.differentialDownloadInstaller(r,e,i,t))&&await this.httpExecutor.download(r.url,i,a);const u=await this.verifySignature(i);if(null!=u)throw await s(),n.newError(`New version ${e.updateInfoAndProvider.info.version} is not signed by the application owner: ${u}`,"ERR_UPDATER_INVALID_SIGNATURE");if(l&&await this.differentialDownloadWebPackage(e,c,o,t))try{await this.httpExecutor.download(new f.URL(c.path),o,{headers:e.requestHeaders,cancellationToken:e.cancellationToken,sha512:c.sha512})}catch(e){try{await d.unlink(o)}catch(e){}throw e}}})}async verifySignature(e){let t;try{if(t=(await this.configOnDisk.value).publisherName,null==t)return null}catch(e){if("ENOENT"===e.code)return null;throw e}return await h.verifySignature(Array.isArray(t)?t:[t],e,this._logger)}doInstall(e){const t=["--updated"];e.isSilent&&t.push("/S"),e.isForceRunAfter&&t.push("--force-run");const r=null==this.downloadedUpdateHelper?null:this.downloadedUpdateHelper.packageFile;null!=r&&t.push("--package-file="+r);const n=()=>{g(a.join(process.resourcesPath,"elevate.exe"),[e.installerPath].concat(t)).catch(e=>this.dispatchError(e))};return e.isAdminRightsRequired?(this._logger.info("isAdminRightsRequired is set to true, run installer using elevate.exe"),n(),!0):(g(e.installerPath,t).catch(e=>{const t=e.code;this._logger.info(`Cannot run installer: error code: ${t}, error message: "${e.message}", will be executed again using elevate if EACCES"`),"UNKNOWN"===t||"EACCES"===t?n():this.dispatchError(e)}),!0)}async differentialDownloadInstaller(e,t,r,i){try{if(null!=this._testOnlyOptions&&!this._testOnlyOptions.isUseDifferentialDownload)return!0;const o=u.blockmapFiles(e.url,t.updateInfoAndProvider.info.version,this.app.version);this._logger.info(`Download block maps (old: "${o[0]}", new: ${o[1]})`);const s=async e=>{const r=await this.httpExecutor.downloadToBuffer(e,{headers:t.requestHeaders,cancellationToken:t.cancellationToken});if(null==r||0===r.length)throw new Error(`Blockmap "${e.href}" is empty`);try{return JSON.parse(m.gunzipSync(r).toString())}catch(t){throw new Error(`Cannot parse blockmap "${e.href}", error: ${t}, raw data: ${r}`)}},p={newUrl:e.url,oldFile:a.join(this.downloadedUpdateHelper.cacheDir,n.CURRENT_APP_INSTALLER_FILE_NAME),logger:this._logger,newFile:r,isUseMultipleRangeRequest:i.isUseMultipleRangeRequest,requestHeaders:t.requestHeaders,cancellationToken:t.cancellationToken};this.listenerCount(l.DOWNLOAD_PROGRESS)>0&&(p.onProgress=e=>this.emit(l.DOWNLOAD_PROGRESS,e));const d=await Promise.all(o.map(e=>s(e)));return await new c.GenericDifferentialDownloader(e.info,this.httpExecutor,p).download(d[0],d[1]),!1}catch(e){if(this._logger.error("Cannot download differentially, fallback to full download: "+(e.stack||e)),null!=this._testOnlyOptions)throw e;return!0}}async differentialDownloadWebPackage(e,t,r,i){if(null==t.blockMapSize)return!0;try{const o={newUrl:new f.URL(t.path),oldFile:a.join(this.downloadedUpdateHelper.cacheDir,n.CURRENT_APP_PACKAGE_FILE_NAME),logger:this._logger,newFile:r,requestHeaders:this.requestHeaders,isUseMultipleRangeRequest:i.isUseMultipleRangeRequest,cancellationToken:e.cancellationToken};this.listenerCount(l.DOWNLOAD_PROGRESS)>0&&(o.onProgress=e=>this.emit(l.DOWNLOAD_PROGRESS,e)),await new s.FileWithEmbeddedBlockMapDifferentialDownloader(t,this.httpExecutor,o).download()}catch(e){return this._logger.error("Cannot download differentially, fallback to full download: "+(e.stack||e)),"win32"===process.platform}return!1}}async function g(e,t){return new Promise((r,n)=>{try{const a=i.spawn(e,t,{detached:!0,stdio:"ignore"});a.on("error",e=>{n(e)}),a.unref(),void 0!==a.pid&&r(!0)}catch(e){n(e)}})}t.NsisUpdater=v},function(e,t,r){"use strict";const n=r(1),i=r(155),{download:a}=r(166),o=r(179),s=e=>e.webContents||e.getWebContentsId&&n.remote.webContents.fromId(e.getWebContentsId()),c=e=>(t={})=>(t.transform&&!t.click&&(e.transform=t.transform),e),l=(e,t)=>{const r=(r,l)=>{if("function"==typeof t.shouldShowMenu&&!1===t.shouldShowMenu(r,l))return;const{editFlags:u}=l,p=l.selectionText.trim().length>0,d=Boolean(l.linkURL),h=e=>u["can"+e]&&p,f={separator:()=>({type:"separator"}),learnSpelling:c({id:"learnSpelling",label:"&Learn Spelling",visible:Boolean(l.isEditable&&p&&l.misspelledWord),click(){s(e).session.addWordToSpellCheckerDictionary(l.misspelledWord)}}),lookUpSelection:c({id:"lookUpSelection",label:"Look Up “{selection}”",visible:"darwin"===process.platform&&p&&!d,click(){"darwin"===process.platform&&s(e).showDefinitionForSelection()}}),searchWithGoogle:c({id:"searchWithGoogle",label:"&Search with Google",visible:p,click(){const e=new URL("https://www.google.com/search");e.searchParams.set("q",l.selectionText),n.shell.openExternal(e.toString())}}),cut:c({id:"cut",label:"Cu&t",enabled:h("Cut"),visible:l.isEditable,click(t){const r=s(e);!t.transform&&r?r.cut():(l.selectionText=t.transform?t.transform(l.selectionText):l.selectionText,n.clipboard.writeText(l.selectionText))}}),copy:c({id:"copy",label:"&Copy",enabled:h("Copy"),visible:l.isEditable||p,click(t){const r=s(e);!t.transform&&r?r.copy():(l.selectionText=t.transform?t.transform(l.selectionText):l.selectionText,n.clipboard.writeText(l.selectionText))}}),paste:c({id:"paste",label:"&Paste",enabled:u.canPaste,visible:l.isEditable,click(t){const r=s(e);if(t.transform){let e=n.clipboard.readText(l.selectionText);e=t.transform?t.transform(e):e,r.insertText(e)}else r.paste()}}),saveImage:c({id:"saveImage",label:"Save I&mage",visible:"image"===l.mediaType,click(t){l.srcURL=t.transform?t.transform(l.srcURL):l.srcURL,a(e,l.srcURL)}}),saveImageAs:c({id:"saveImageAs",label:"Sa&ve Image As…",visible:"image"===l.mediaType,click(t){l.srcURL=t.transform?t.transform(l.srcURL):l.srcURL,a(e,l.srcURL,{saveAs:!0})}}),copyLink:c({id:"copyLink",label:"Copy Lin&k",visible:l.linkURL.length>0&&"none"===l.mediaType,click(e){l.linkURL=e.transform?e.transform(l.linkURL):l.linkURL,n.clipboard.write({bookmark:l.linkText,text:l.linkURL})}}),saveLinkAs:c({id:"saveLinkAs",label:"Save Link As…",visible:l.linkURL.length>0&&"none"===l.mediaType,click(t){l.linkURL=t.transform?t.transform(l.linkURL):l.linkURL,a(e,l.linkURL,{saveAs:!0})}}),copyImage:c({id:"copyImage",label:"Cop&y Image",visible:"image"===l.mediaType,click(){s(e).copyImageAt(l.x,l.y)}}),copyImageAddress:c({id:"copyImageAddress",label:"C&opy Image Address",visible:"image"===l.mediaType,click(e){l.srcURL=e.transform?e.transform(l.srcURL):l.srcURL,n.clipboard.write({bookmark:l.srcURL,text:l.srcURL})}}),inspect:()=>({id:"inspect",label:"I&nspect Element",click(){e.inspectElement(l.x,l.y),s(e).isDevToolsOpened()&&s(e).devToolsWebContents.focus()}}),services:()=>({id:"services",label:"Services",role:"services",visible:"darwin"===process.platform&&(l.isEditable||p)})},m="boolean"==typeof t.showInspectElement?t.showInspectElement:o;let v=[];p&&l.misspelledWord&&l.dictionarySuggestions.length>0?v=l.dictionarySuggestions.map(t=>function(t){return{id:"dictionarySuggestions",label:t,visible:Boolean(l.isEditable&&p&&l.misspelledWord),click(t){s(e).replaceMisspelling(t.label)}}}(t)):v.push({id:"dictionarySuggestions",label:"No Guesses Found",visible:Boolean(p&&l.misspelledWord),enabled:!1});let g=[v.length>0&&f.separator(),...v,f.separator(),f.learnSpelling(),f.separator(),!1!==t.showLookUpSelection&&f.lookUpSelection(),f.separator(),!1!==t.showSearchWithGoogle&&f.searchWithGoogle(),f.separator(),f.cut(),f.copy(),f.paste(),f.separator(),t.showSaveImage&&f.saveImage(),t.showSaveImageAs&&f.saveImageAs(),!1!==t.showCopyImage&&f.copyImage(),t.showCopyImageAddress&&f.copyImageAddress(),f.separator(),f.copyLink(),t.showSaveLinkAs&&f.saveLinkAs(),f.separator(),m&&f.inspect(),t.showServices&&f.services(),f.separator()];if(t.menu&&(g=t.menu(f,l,e,v)),t.prepend){const r=t.prepend(f,l,e);Array.isArray(r)&&g.unshift(...r)}if(t.append){const r=t.append(f,l,e);Array.isArray(r)&&g.push(...r)}g=(e=>{let t;return e.filter(e=>void 0!==e&&!1!==e&&!1!==e.visible&&""!==e.visible).filter((e,r,n)=>{const i="separator"===e.type&&(!t||r===n.length-1||"separator"===n[r+1].type);return t=i?t:e,!i})})(g);for(const e of g)if(t.labels&&t.labels[e.id]&&(e.label=t.labels[e.id]),"string"==typeof e.label&&e.label.includes("{selection}")){const t="string"==typeof l.selectionText?l.selectionText.trim():"";e.label=e.label.replace("{selection}",i(t,25).replace(/&/g,"&&"))}if(g.length>0){(n.remote?n.remote.Menu:n.Menu).buildFromTemplate(g).popup(n.remote?n.remote.getCurrentWindow():e)}};return s(e).on("context-menu",r),()=>{e.isDestroyed()||s(e).removeListener("context-menu",r)}};e.exports=(e={})=>{let t=!1;const r=[],i=n=>{if(t)return;const i=l(n,e);r.push(i);const a=()=>{const e=r.indexOf(i);-1!==e&&r.splice(e,1)};void 0!==n.once&&n.once("closed",a),r.push(()=>{n.off("closed",a)})},a=()=>{for(const e of r)e();r.length=0,t=!0};if(e.window){const t=e.window;if(void 0===s(t)){const e=()=>{i(t)};return(t.addEventListener||t.addListener)("dom-ready",e,{once:!0}),r.push(()=>{t.removeEventListener("dom-ready",e,{once:!0})}),a}return i(t),a}for(const e of(n.BrowserWindow||n.remote.BrowserWindow).getAllWindows())i(e);const o=n.app||n.remote.app,c=(e,t)=>{i(t)};return o.on("browser-window-created",c),r.push(()=>{o.removeListener("browser-window-created",c)}),a}},function(e,t,r){"use strict";const n=r(156),i=r(162);function a(e,t,r){if(" "===e.charAt(t))return t;for(let n=1;n<=3;n++)if(r){if(" "===e.charAt(t+n))return t+n}else if(" "===e.charAt(t-n))return t-n;return t}e.exports=(e,t,r)=>{r={position:"end",preferTruncationOnSpace:!1,...r};const{position:o,space:s,preferTruncationOnSpace:c}=r;let l="…",u=1;if("string"!=typeof e)throw new TypeError("Expected `input` to be a string, got "+typeof e);if("number"!=typeof t)throw new TypeError("Expected `columns` to be a number, got "+typeof t);if(t<1)return"";if(1===t)return l;const p=i(e);if(p<=t)return e;if("start"===o){if(c){const r=a(e,p-t+1,!0);return l+n(e,r,p).trim()}return!0===s&&(l+=" ",u=2),l+n(e,p-t+u,p)}if("middle"===o){!0===s&&(l=" "+l+" ",u=3);const r=Math.floor(t/2);if(c){const i=a(e,r),o=a(e,p-(t-r)+1,!0);return n(e,0,i)+l+n(e,o,p).trim()}return n(e,0,r)+l+n(e,p-(t-r)+u,p)}if("end"===o){if(c){const r=a(e,t-1);return n(e,0,r)+l}return!0===s&&(l=" "+l,u=2),n(e,0,t-u)+l}throw new Error("Expected `options.position` to be either `start`, `middle` or `end`, got "+o)}},function(e,t,r){"use strict";const n=r(88),i=r(157),a=r(158),o=["","›"],s=e=>`${o[0]}[${e}m`,c=(e,t,r)=>{let n=[];e=[...e];for(let r of e){const i=r;r.match(";")&&(r=r.split(";")[0][0]+"0");const o=a.codes.get(parseInt(r,10));if(o){const r=e.indexOf(o.toString());r>=0?e.splice(r,1):n.push(s(t?o:i))}else{if(t){n.push(s(0));break}n.push(s(i))}}if(t&&(n=n.filter((e,t)=>n.indexOf(e)===t),void 0!==r)){const e=s(a.codes.get(parseInt(r,10)));n=n.reduce((t,r)=>r===e?[r,...t]:[...t,r],[])}return n.join("")};e.exports=(e,t,r)=>{const a=[...e.normalize()],s=[];r="number"==typeof r?r:a.length;let l,u=!1,p=0,d="";for(const[h,f]of a.entries()){let a=!1;if(o.includes(f)){const t=/\d[^m]*/.exec(e.slice(h,h+18));l=t&&t.length>0?t[0]:void 0,pt&&p<=r)d+=f;else if(p!==t||u||void 0===l){if(p>=r){d+=c(s,!0,l);break}}else d=c(s)}return d}},function(e,t,r){"use strict";e.exports=e=>e&&e.exact?new RegExp("^[\ud800-\udbff][\udc00-\udfff]$"):new RegExp("[\ud800-\udbff][\udc00-\udfff]","g")},function(e,t,r){"use strict";(function(e){const t=(e,t)=>(...r)=>`[${e(...r)+t}m`,n=(e,t)=>(...r)=>{const n=e(...r);return`[${38+t};5;${n}m`},i=(e,t)=>(...r)=>{const n=e(...r);return`[${38+t};2;${n[0]};${n[1]};${n[2]}m`},a=e=>e,o=(e,t,r)=>[e,t,r],s=(e,t,r)=>{Object.defineProperty(e,t,{get:()=>{const n=r();return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0}),n},enumerable:!0,configurable:!0})};let c;const l=(e,t,n,i)=>{void 0===c&&(c=r(159));const a=i?10:0,o={};for(const[r,i]of Object.entries(c)){const s="ansi16"===r?"ansi":r;r===t?o[s]=e(n,a):"object"==typeof i&&(o[s]=e(i[t],a))}return o};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,r={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};r.color.gray=r.color.blackBright,r.bgColor.bgGray=r.bgColor.bgBlackBright,r.color.grey=r.color.blackBright,r.bgColor.bgGrey=r.bgColor.bgBlackBright;for(const[t,n]of Object.entries(r)){for(const[t,i]of Object.entries(n))r[t]={open:`[${i[0]}m`,close:`[${i[1]}m`},n[t]=r[t],e.set(i[0],i[1]);Object.defineProperty(r,t,{value:n,enumerable:!1})}return Object.defineProperty(r,"codes",{value:e,enumerable:!1}),r.color.close="",r.bgColor.close="",s(r.color,"ansi",()=>l(t,"ansi16",a,!1)),s(r.color,"ansi256",()=>l(n,"ansi256",a,!1)),s(r.color,"ansi16m",()=>l(i,"rgb",o,!1)),s(r.bgColor,"ansi",()=>l(t,"ansi16",a,!0)),s(r.bgColor,"ansi256",()=>l(n,"ansi256",a,!0)),s(r.bgColor,"ansi16m",()=>l(i,"rgb",o,!0)),r}})}).call(this,r(58)(e))},function(e,t,r){const n=r(89),i=r(161),a={};Object.keys(n).forEach(e=>{a[e]={},Object.defineProperty(a[e],"channels",{value:n[e].channels}),Object.defineProperty(a[e],"labels",{value:n[e].labels});const t=i(e);Object.keys(t).forEach(r=>{const n=t[r];a[e][r]=function(e){const t=function(...t){const r=t[0];if(null==r)return r;r.length>1&&(t=r);const n=e(t);if("object"==typeof n)for(let e=n.length,t=0;t1&&(t=r),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)})}),e.exports=a},function(e,t,r){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},function(e,t,r){const n=r(89);function i(e){const t=function(){const e={},t=Object.keys(n);for(let r=t.length,n=0;n{if("string"!=typeof e||0===e.length)return 0;if(0===(e=n(e)).length)return 0;e=e.replace(a()," ");let t=0;for(let r=0;r=127&&n<=159||(n>=768&&n<=879||(n>65535&&r++,t+=i(n)?2:1))}return t};e.exports=o,e.exports.default=o},function(e,t,r){"use strict";const n=r(164);e.exports=e=>"string"==typeof e?e.replace(n(),""):e},function(e,t,r){"use strict";e.exports=({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}},function(e,t,r){"use strict";e.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}},function(e,t,r){"use strict";const n=r(0),{app:i,BrowserWindow:a,shell:o,dialog:s}=r(1),c=r(167),l=r(170),u=r(172),p=e=>{let t;switch(e.getType()){case"webview":t=a.fromWebContents(e.hostWebContents);break;case"browserView":t=(e=>{for(const t of a.getAllWindows())for(const r of t.getBrowserViews())if(r.webContents.id===e.id)return t})(e);break;default:t=a.fromWebContents(e)}return t};function d(e,t,r=(()=>{})){const s=new Set;let d=0,h=0,f=0;const m=()=>s.size,v=()=>d/f;t={showBadge:!0,...t};const g=(b,y,x)=>{s.add(y),f+=y.getTotalBytes();const w=(()=>{const e=process.versions.electron.split(".");return Number.parseInt(e[0],10)})()>=12?a.fromWebContents(x):p(x);if(t.directory&&!n.isAbsolute(t.directory))throw new Error("The `directory` option must be an absolute path");const E=t.directory||i.getPath("downloads");let D;if(t.filename)D=n.join(E,t.filename);else{const e=y.getFilename(),r=n.extname(e)?e:((e,t)=>{const r=u.mime(t);return 1!==r.length?e:`${e}.${r[0].ext}`})(e,y.getMimeType());D=t.overwrite?n.join(E,r):c.sync(n.join(E,r))}const _=t.errorMessage||"The download of {filename} was interrupted";t.saveAs?y.setSaveDialogOptions({defaultPath:D}):y.setSavePath(D),"function"==typeof t.onStarted&&t.onStarted(y),y.on("updated",()=>{d=h;for(const e of s)d+=e.getReceivedBytes();if(t.showBadge&&["darwin","linux"].includes(process.platform)&&(i.badgeCount=m()),w.isDestroyed()||w.setProgressBar(v()),"function"==typeof t.onProgress){const e=y.getReceivedBytes(),r=y.getTotalBytes();t.onProgress({percent:r?e/r:0,transferredBytes:e,totalBytes:r})}"function"==typeof t.onTotalProgress&&t.onTotalProgress({percent:v(),transferredBytes:d,totalBytes:f})}),y.on("done",(a,c)=>{if(h+=y.getTotalBytes(),s.delete(y),t.showBadge&&["darwin","linux"].includes(process.platform)&&(i.badgeCount=m()),w.isDestroyed()||m()||(w.setProgressBar(-1),d=0,h=0,f=0),t.unregisterWhenDone&&e.removeListener("will-download",g),"cancelled"===c)"function"==typeof t.onCancel&&t.onCancel(y);else if("interrupted"===c){const e=l(_,{filename:n.basename(D)});r(new Error(e))}else"completed"===c&&("darwin"===process.platform&&i.dock.downloadFinished(D),t.openFolderWhenDone&&o.showItemInFolder(D),"function"==typeof t.onCompleted&&t.onCompleted({fileName:y.getFilename(),path:y.getSavePath(),fileSize:y.getReceivedBytes(),mimeType:y.getMimeType(),url:y.getURL()}),r(null,y))})};e.on("will-download",g)}e.exports=(e={})=>{i.on("session-created",t=>{d(t,e,(t,r)=>{if(t){const r=e.errorTitle||"Download Error";s.showErrorBox(r,t.message)}})})},e.exports.download=(e,t,r)=>new Promise((n,i)=>{r={...r,unregisterWhenDone:!0},d(e.webContents.session,r,(e,t)=>{e?i(e):n(t)}),e.webContents.downloadURL(t)})},function(e,t,r){"use strict";const n=r(168),i=r(169),a=e=>{let t=0;return()=>i(e,(e,r)=>`${e} (${++t})${r}`)},o=e=>{const t=a(e),r=async e=>await n(e)?r(t()):e;return r(e)};e.exports=o,e.exports.default=o,e.exports.sync=e=>{const t=a(e),r=e=>n.sync(e)?r(t()):e;return r(e)}},function(e,t,r){"use strict";const n=r(2),{promisify:i}=r(9),a=i(n.access);e.exports=async e=>{try{return await a(e),!0}catch(e){return!1}},e.exports.sync=e=>{try{return n.accessSync(e),!0}catch(e){return!1}}},function(e,t,r){"use strict";var n=r(0);e.exports=function e(t,r){if(2!==arguments.length)throw new Error("`path` and `modifier` required");if(Array.isArray(t))return t.map((function(t){return e(t,r)}));var i=n.extname(t);return n.join(n.dirname(t),r(n.basename(t,i),i))}},function(e,t,r){"use strict";const{htmlEscape:n}=r(171);e.exports=(e,t)=>{if("string"!=typeof e)throw new TypeError(`Expected a \`string\` in the first argument, got \`${typeof e}\``);if("object"!=typeof t)throw new TypeError(`Expected an \`object\` or \`Array\` in the second argument, got \`${typeof t}\``);const r=/{{(\d+|[a-z$_][a-z\d$_]*?(?:\.[a-z\d$_]*?)*?)}}/gi;r.test(e)&&(e=e.replace(r,(e,r)=>{let i=t;for(const e of r.split("."))i=i?i[e]:"";return n(String(i))}));return e.replace(/{(\d+|[a-z$_][a-z\d$_]*?(?:\.[a-z\d$_]*?)*?)}/gi,(e,r)=>{let n=t;for(const e of r.split("."))n=n?n[e]:"";return String(n)})}},function(e,t,r){"use strict";t.htmlEscape=e=>e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">"),t.htmlUnescape=e=>e.replace(/>/g,">").replace(/</g,"<").replace(/�?39;/g,"'").replace(/"/g,'"').replace(/&/g,"&"),t.htmlEscapeTag=(e,...r)=>{let n=e[0];for(let i=0;i{let n=e[0];for(let i=0;i{const t=i.desc(n()),r=Object.keys(t).filter(t=>e.endsWith(t));return 0===r.length?[]:r.map(e=>({ext:e,mime:t[e]}))},e.exports.mime=e=>{const t=i.desc(n()),r=Object.keys(t).filter(r=>t[r]===e);return 0===r.length?[]:r.map(e=>({ext:e,mime:t[e]}))}},function(e,t,r){"use strict";var n=r(174);e.exports=function(){var e={};return Object.keys(n).forEach((function(t){var r=n[t];r.extensions&&r.extensions.length>0&&r.extensions.forEach((function(r){e[r]=t}))})),e}},function(e,t,r){ -/*! - * mime-db - * Copyright(c) 2014 Jonathan Ong - * MIT Licensed +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "./electron/main.ts"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "./electron/getSystemColorPalette.ts": +/*!*******************************************!*\ + !*** ./electron/getSystemColorPalette.ts ***! + \*******************************************/ +/*! exports provided: getSystemColorPalette */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSystemColorPalette", function() { return getSystemColorPalette; }); +/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! electron */ "electron"); +/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var os__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! os */ "os"); +/* harmony import */ var os__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(os__WEBPACK_IMPORTED_MODULE_1__); + + +var windowsColors = { + desktop: 'desktop', + appWorkspace: 'app-workspace', + windowBackground: 'window', + windowText: 'window-text', + menu: 'menu', + focusIndicator: 'active-caption', + textBackground: 'info-background', + text: 'info-text', + disabledText: 'disabled-text' +}; +var MacOSColors = { + desktop: 'under-page-background', + appWorkspace: 'control-background', + windowBackground: 'window-background', + windowText: 'window-frame-text', + menu: 'control', + focusIndicator: 'keyboard-focus-indicator', + textBackground: 'text-background', + text: 'text', + disabledText: 'tertiary-label' +}; +function getSystemColorPalette() { + var plataform = os__WEBPACK_IMPORTED_MODULE_1___default.a.platform(); + var palette = {}; + + if (plataform === 'win32') { + Object.keys(windowsColors).map(function (item) { + var color = electron__WEBPACK_IMPORTED_MODULE_0__["systemPreferences"].getColor(windowsColors[item]); // palette[item] = color + + setDeepVal(palette, item, color); + }); + } else if (plataform === 'darwin') { + Object.keys(MacOSColors).forEach(function (item) { + var color = electron__WEBPACK_IMPORTED_MODULE_0__["systemPreferences"].getColor(MacOSColors[item]); + setDeepVal(palette, item, color); + }); + } // const color = systemPreferences.getAccentColor() + // const red = `#${color.substr(0, 2)}0000` + // const green = `#00${color.substr(2, 2)}00` + // const blue = `#0000${color.substr(4, 2)}` + + + console.log(palette); + return { + palette: palette, + paletteChanged: function paletteChanged(callback) { + electron__WEBPACK_IMPORTED_MODULE_0__["nativeTheme"].on('updated', callback); + } + }; +} + +function setDeepVal(obj, path, val) { + var props = path.split('.'); + var i, n; + + for (i = 0, n = props.length - 1; i < n; ++i) { + obj = obj[props[i]] = obj[props[i]] || {}; + } + + obj[props[i]] = val; + return obj; +} + +var Windows = ['3d-dark-shadow', '3d-face', '3d-highlight', '3d-light', '3d-shadow', 'active-border', 'active-caption', 'active-caption-gradient', 'app-workspace', 'button-text', 'caption-text', 'desktop', 'disabled-text', 'highlight', 'highlight-text', 'hotlight', 'inactive-border', 'inactive-caption', 'inactive-caption-gradient', 'inactive-caption-text', 'info-background', 'info-text', 'menu', 'menu-highlight', 'menubar', 'menu-text', 'scrollbar', 'window', 'window-frame', 'window-text']; // 29 options + +var MacOS = ['alternate-selected-control-text', 'control-background', 'control', 'control-text', 'disabled-control-text', 'find-highlight', 'grid', 'header-text', 'highlight', 'keyboard-focus-indicator', 'label', 'link', 'placeholder-text', 'quaternary-label', 'scrubber-textured-background', 'secondary-label', 'selected-content-background', 'selected-control', 'selected-control-text', 'selected-menu-item-text', 'selected-text-background', 'selected-text', 'separator', 'shadow', 'tertiary-label', 'text-background', 'text', 'under-page-background', 'unemphasized-selected-content-background', 'unemphasized-selected-text-background', 'unemphasized-selected-text', 'window-background', 'window-frame-tex']; // 32 options + +/***/ }), + +/***/ "./electron/main.ts": +/*!**************************!*\ + !*** ./electron/main.ts ***! + \**************************/ +/*! no exports provided */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! electron */ "electron"); +/* harmony import */ var electron__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(electron__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var electron_context_menu__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! electron-context-menu */ "./node_modules/electron-context-menu/index.js"); +/* harmony import */ var electron_context_menu__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(electron_context_menu__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var electron_devtools_installer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! electron-devtools-installer */ "./node_modules/electron-devtools-installer/dist/index.js"); +/* harmony import */ var electron_devtools_installer__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(electron_devtools_installer__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! path */ "path"); +/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! url */ "url"); +/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(url__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var _src_utils_window__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../src/utils/window */ "./src/utils/window.ts"); +/* harmony import */ var _getSystemColorPalette__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./getSystemColorPalette */ "./electron/getSystemColorPalette.ts"); +/* harmony import */ var electron_updater__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! electron-updater */ "./node_modules/electron-updater/out/main.js"); +/* harmony import */ var electron_updater__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(electron_updater__WEBPACK_IMPORTED_MODULE_7__); + + + + + + + + +electron_updater__WEBPACK_IMPORTED_MODULE_7__["autoUpdater"].on('checking-for-update', function () { + sendStatusToWindow('Procurando pr atualizações...'); +}); +electron_updater__WEBPACK_IMPORTED_MODULE_7__["autoUpdater"].on('update-available', function (info) { + sendStatusToWindow('Atualização encontrada.'); +}); +electron_updater__WEBPACK_IMPORTED_MODULE_7__["autoUpdater"].on('update-not-available', function (info) { + sendStatusToWindow('Nenhuma atualização encontrada.'); +}); +electron_updater__WEBPACK_IMPORTED_MODULE_7__["autoUpdater"].on('error', function (err) { + sendStatusToWindow('Erro na hora de fazer a atualização. ' + err); +}); +electron_updater__WEBPACK_IMPORTED_MODULE_7__["autoUpdater"].on('download-progress', function (progressObj) { + var logMessage = 'Velocidade do download: ' + progressObj.bytesPerSecond; + logMessage = logMessage + ' - Downloaded ' + progressObj.percent + '%'; + logMessage = logMessage + ' (' + progressObj.transferred + '/' + progressObj.total + ')'; + sendStatusToWindow(logMessage); +}); +electron_updater__WEBPACK_IMPORTED_MODULE_7__["autoUpdater"].on('update-downloaded', function (info) { + sendStatusToWindow('Atualização baixada'); +}); +var mainWindow; // | null + +var webContents; + +function sendStatusToWindow(text) {// webContents.send('message', text) +} + +Object(_getSystemColorPalette__WEBPACK_IMPORTED_MODULE_6__["getSystemColorPalette"])(); + +function createWindow() { + var partition = 'persist:solrachix'; + var icon = electron__WEBPACK_IMPORTED_MODULE_0__["nativeImage"].createFromPath("".concat(electron__WEBPACK_IMPORTED_MODULE_0__["app"].getAppPath(), "/dist/renderer/icon.png")); + + if (electron__WEBPACK_IMPORTED_MODULE_0__["app"].dock) { + electron__WEBPACK_IMPORTED_MODULE_0__["app"].dock.setIcon(icon); + } + + var splashScreen = new electron__WEBPACK_IMPORTED_MODULE_0__["BrowserWindow"]({ + icon: icon, + width: 400, + height: 400, + backgroundColor: '#1C2028', + transparent: true, + frame: false, + alwaysOnTop: true + }); + splashScreen.loadURL(chooseUrl("".concat(electron__WEBPACK_IMPORTED_MODULE_0__["app"].getAppPath(), "/build/splashScreen.html"), 'splashScreen.html')); + mainWindow = Object(_src_utils_window__WEBPACK_IMPORTED_MODULE_5__["default"])({ + id: 0, + title: 'Icons Manager', + icon: icon, + themeSource: 'dark', + show: false, + minWidth: 760, + minHeight: 500, + partition: partition + }); + mainWindow.loadURL(chooseUrl('http://localhost:4000', 'renderer/index.html')); + mainWindow.once('ready-to-show', function () { + splashScreen.destroy(); + mainWindow.show(); + mainWindow.focus(); + electron_devtools_installer__WEBPACK_IMPORTED_MODULE_2___default()(electron_devtools_installer__WEBPACK_IMPORTED_MODULE_2__["REACT_DEVELOPER_TOOLS"]).then(function (name) { + return console.log("Added Extension: ".concat(name)); + })["catch"](function (err) { + return console.log('An error occurred: ', err); + }); + mainWindow.webContents.on('before-input-event', function (event, input) { + mainWindow.webContents.setIgnoreMenuShortcuts(!input.control && !input.meta); + }); + }); + webContents = mainWindow.webContents; +} + +var chooseUrl = function chooseUrl(development, production) { + if (true) { + return development; + } else {} +}; + +var recreateWindow = function recreateWindow() { + // On macOS it's common to re-create a window in the app when the + // dock icon is clicked and there are no other windows open. + if (electron__WEBPACK_IMPORTED_MODULE_0__["BrowserWindow"].getAllWindows().length === 0) { + createWindow(); + } +}; + +var toggleDevTools = function toggleDevTools() { + return webContents.toggleDevTools(); +}; + +var toggleReload = function toggleReload() { + return webContents.reload(); +}; + +var createShortcuts = function createShortcuts() { + electron__WEBPACK_IMPORTED_MODULE_0__["globalShortcut"].register('CmdOrCtrl+J', toggleDevTools); + electron__WEBPACK_IMPORTED_MODULE_0__["globalShortcut"].register('Cmd+ROrCtrl+R', toggleReload); +}; + +electron__WEBPACK_IMPORTED_MODULE_0__["app"].on('web-contents-created', function (e, contents) { + if (contents.getType() === 'webview') { + // open link with external browser in webview + contents.on('new-window', function (e, url) { + e.preventDefault(); + electron__WEBPACK_IMPORTED_MODULE_0__["shell"].openExternal(url); + }); + } + + electron_context_menu__WEBPACK_IMPORTED_MODULE_1___default()({ + showSaveImage: true, + showCopyImageAddress: true, + showServices: true, + showSearchWithGoogle: false, + shouldShowMenu: function shouldShowMenu(event, params) { + return !params.isEditable; + }, + // Não mostra o menu se o elemento for editável + labels: { + copy: 'Copiar', + paste: 'Colar', + cut: 'Recortar', + saveImage: 'Guardar imagem como…', + saveImageAs: 'Guardar imagem como…', + copyImage: 'Copiar imagem', + copyImageAddress: 'Copiar endereço da imagem', + lookUpSelection: 'Consultar “{selection}”', + copyLink: 'Copiar Link', + inspect: 'Inspecionar' + }, + prepend: function prepend(defaultActions, params, browserWindow) { + return [{ + label: 'Pesquisar no google, por “{selection}”', + // Only show it when right-clicking text + visible: params.selectionText.trim().length > 0, + click: function click() { + electron__WEBPACK_IMPORTED_MODULE_0__["shell"].openExternal("https://google.com/search?q=".concat(encodeURIComponent(params.selectionText))); + } + }]; + }, + // menu: (defaultActions, params, browserWindow, dictionarySuggestions) => { + // }, + window: contents + }); +}); +electron__WEBPACK_IMPORTED_MODULE_0__["app"].on('ready', function () { + electron_updater__WEBPACK_IMPORTED_MODULE_7__["autoUpdater"].checkForUpdatesAndNotify(); + setTimeout(function () { + createWindow(); + createShortcuts(); + }, 2000); +}); +electron__WEBPACK_IMPORTED_MODULE_0__["app"].on('activate', recreateWindow); +electron__WEBPACK_IMPORTED_MODULE_0__["app"].allowRendererProcessReuse = true; +electron__WEBPACK_IMPORTED_MODULE_0__["app"].commandLine.appendSwitch('--enable-experimental-web-platform-features'); + +/***/ }), + +/***/ "./node_modules/ajv/lib/ajv.js": +/*!*************************************!*\ + !*** ./node_modules/ajv/lib/ajv.js ***! + \*************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var compileSchema = __webpack_require__(/*! ./compile */ "./node_modules/ajv/lib/compile/index.js") + , resolve = __webpack_require__(/*! ./compile/resolve */ "./node_modules/ajv/lib/compile/resolve.js") + , Cache = __webpack_require__(/*! ./cache */ "./node_modules/ajv/lib/cache.js") + , SchemaObject = __webpack_require__(/*! ./compile/schema_obj */ "./node_modules/ajv/lib/compile/schema_obj.js") + , stableStringify = __webpack_require__(/*! fast-json-stable-stringify */ "./node_modules/fast-json-stable-stringify/index.js") + , formats = __webpack_require__(/*! ./compile/formats */ "./node_modules/ajv/lib/compile/formats.js") + , rules = __webpack_require__(/*! ./compile/rules */ "./node_modules/ajv/lib/compile/rules.js") + , $dataMetaSchema = __webpack_require__(/*! ./data */ "./node_modules/ajv/lib/data.js") + , util = __webpack_require__(/*! ./compile/util */ "./node_modules/ajv/lib/compile/util.js"); + +module.exports = Ajv; + +Ajv.prototype.validate = validate; +Ajv.prototype.compile = compile; +Ajv.prototype.addSchema = addSchema; +Ajv.prototype.addMetaSchema = addMetaSchema; +Ajv.prototype.validateSchema = validateSchema; +Ajv.prototype.getSchema = getSchema; +Ajv.prototype.removeSchema = removeSchema; +Ajv.prototype.addFormat = addFormat; +Ajv.prototype.errorsText = errorsText; + +Ajv.prototype._addSchema = _addSchema; +Ajv.prototype._compile = _compile; + +Ajv.prototype.compileAsync = __webpack_require__(/*! ./compile/async */ "./node_modules/ajv/lib/compile/async.js"); +var customKeyword = __webpack_require__(/*! ./keyword */ "./node_modules/ajv/lib/keyword.js"); +Ajv.prototype.addKeyword = customKeyword.add; +Ajv.prototype.getKeyword = customKeyword.get; +Ajv.prototype.removeKeyword = customKeyword.remove; +Ajv.prototype.validateKeyword = customKeyword.validate; + +var errorClasses = __webpack_require__(/*! ./compile/error_classes */ "./node_modules/ajv/lib/compile/error_classes.js"); +Ajv.ValidationError = errorClasses.Validation; +Ajv.MissingRefError = errorClasses.MissingRef; +Ajv.$dataMetaSchema = $dataMetaSchema; + +var META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema'; + +var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ]; +var META_SUPPORT_DATA = ['/properties']; + +/** + * Creates validator instance. + * Usage: `Ajv(opts)` + * @param {Object} opts optional options + * @return {Object} ajv instance + */ +function Ajv(opts) { + if (!(this instanceof Ajv)) return new Ajv(opts); + opts = this._opts = util.copy(opts) || {}; + setLogger(this); + this._schemas = {}; + this._refs = {}; + this._fragments = {}; + this._formats = formats(opts.format); + + this._cache = opts.cache || new Cache; + this._loadingSchemas = {}; + this._compilations = []; + this.RULES = rules(); + this._getId = chooseGetId(opts); + + opts.loopRequired = opts.loopRequired || Infinity; + if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true; + if (opts.serialize === undefined) opts.serialize = stableStringify; + this._metaOpts = getMetaSchemaOptions(this); + + if (opts.formats) addInitialFormats(this); + if (opts.keywords) addInitialKeywords(this); + addDefaultMetaSchema(this); + if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); + if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}}); + addInitialSchemas(this); +} + + + +/** + * Validate data using schema + * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize. + * @this Ajv + * @param {String|Object} schemaKeyRef key, ref or schema object + * @param {Any} data to be validated + * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). + */ +function validate(schemaKeyRef, data) { + var v; + if (typeof schemaKeyRef == 'string') { + v = this.getSchema(schemaKeyRef); + if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); + } else { + var schemaObj = this._addSchema(schemaKeyRef); + v = schemaObj.validate || this._compile(schemaObj); + } + + var valid = v(data); + if (v.$async !== true) this.errors = v.errors; + return valid; +} + + +/** + * Create validating function for passed schema. + * @this Ajv + * @param {Object} schema schema object + * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords. + * @return {Function} validating function + */ +function compile(schema, _meta) { + var schemaObj = this._addSchema(schema, undefined, _meta); + return schemaObj.validate || this._compile(schemaObj); +} + + +/** + * Adds schema to the instance. + * @this Ajv + * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. + * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. + * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead. + * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. + * @return {Ajv} this for method chaining + */ +function addSchema(schema, key, _skipValidation, _meta) { + if (Array.isArray(schema)){ + for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. + * @param {Object} options optional options with properties `separator` and `dataVar`. + * @return {String} human readable string with all errors descriptions + */ +function errorsText(errors, options) { + errors = errors || this.errors; + if (!errors) return 'No errors'; + options = options || {}; + var separator = options.separator === undefined ? ', ' : options.separator; + var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; + + var text = ''; + for (var i=0; i%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; +// For the source: https://gist.github.com/dperini/729294 +// For test cases: https://mathiasbynens.be/demo/url-regex +// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. +// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; +var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; +var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; +var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; +var JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; +var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; + + +module.exports = formats; + +function formats(mode) { + mode = mode == 'full' ? 'full' : 'fast'; + return util.copy(formats[mode]); +} + + +formats.fast = { + // date: http://tools.ietf.org/html/rfc3339#section-5.6 + date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, + // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 + time: /^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, + 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, + // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js + uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i, + 'uri-reference': /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i, + 'uri-template': URITEMPLATE, + url: URL, + // email (sources from jsen validator): + // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 + // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') + email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, + hostname: HOSTNAME, + // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex: regex, + // uuid: http://tools.ietf.org/html/rfc4122 + uuid: UUID, + // JSON-pointer: https://tools.ietf.org/html/rfc6901 + // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A + 'json-pointer': JSON_POINTER, + 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, + // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +formats.full = { + date: date, + time: time, + 'date-time': date_time, + uri: uri, + 'uri-reference': URIREF, + 'uri-template': URITEMPLATE, + url: URL, + email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, + hostname: HOSTNAME, + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex: regex, + uuid: UUID, + 'json-pointer': JSON_POINTER, + 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT, + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +function isLeapYear(year) { + // https://tools.ietf.org/html/rfc3339#appendix-C + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); +} + + +function date(str) { + // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 + var matches = str.match(DATE); + if (!matches) return false; + + var year = +matches[1]; + var month = +matches[2]; + var day = +matches[3]; + + return month >= 1 && month <= 12 && day >= 1 && + day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); +} + + +function time(str, full) { + var matches = str.match(TIME); + if (!matches) return false; + + var hour = matches[1]; + var minute = matches[2]; + var second = matches[3]; + var timeZone = matches[5]; + return ((hour <= 23 && minute <= 59 && second <= 59) || + (hour == 23 && minute == 59 && second == 60)) && + (!full || timeZone); +} + + +var DATE_TIME_SEPARATOR = /t|\s/i; +function date_time(str) { + // http://tools.ietf.org/html/rfc3339#section-5.6 + var dateTime = str.split(DATE_TIME_SEPARATOR); + return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); +} + + +var NOT_URI_FRAGMENT = /\/|:/; +function uri(str) { + // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." + return NOT_URI_FRAGMENT.test(str) && URI.test(str); +} + + +var Z_ANCHOR = /[^\\]\\Z/; +function regex(str) { + if (Z_ANCHOR.test(str)) return false; + try { + new RegExp(str); + return true; + } catch(e) { + return false; + } +} + + +/***/ }), + +/***/ "./node_modules/ajv/lib/compile/index.js": +/*!***********************************************!*\ + !*** ./node_modules/ajv/lib/compile/index.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var resolve = __webpack_require__(/*! ./resolve */ "./node_modules/ajv/lib/compile/resolve.js") + , util = __webpack_require__(/*! ./util */ "./node_modules/ajv/lib/compile/util.js") + , errorClasses = __webpack_require__(/*! ./error_classes */ "./node_modules/ajv/lib/compile/error_classes.js") + , stableStringify = __webpack_require__(/*! fast-json-stable-stringify */ "./node_modules/fast-json-stable-stringify/index.js"); + +var validateGenerator = __webpack_require__(/*! ../dotjs/validate */ "./node_modules/ajv/lib/dotjs/validate.js"); + +/** + * Functions below are used inside compiled validations function + */ + +var ucs2length = util.ucs2length; +var equal = __webpack_require__(/*! fast-deep-equal */ "./node_modules/fast-deep-equal/index.js"); + +// this error is thrown by async schemas to return validation errors via exception +var ValidationError = errorClasses.Validation; + +module.exports = compile; + + +/** + * Compiles schema to validation function + * @this Ajv + * @param {Object} schema schema object + * @param {Object} root object with information about the root schema for this schema + * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution + * @param {String} baseId base ID for IDs in the schema + * @return {Function} validation function + */ +function compile(schema, root, localRefs, baseId) { + /* jshint validthis: true, evil: true */ + /* eslint no-shadow: 0 */ + var self = this + , opts = this._opts + , refVal = [ undefined ] + , refs = {} + , patterns = [] + , patternsHash = {} + , defaults = [] + , defaultsHash = {} + , customRules = []; + + root = root || { schema: schema, refVal: refVal, refs: refs }; + + var c = checkCompiling.call(this, schema, root, baseId); + var compilation = this._compilations[c.index]; + if (c.compiling) return (compilation.callValidate = callValidate); + + var formats = this._formats; + var RULES = this.RULES; + + try { + var v = localCompile(schema, root, localRefs, baseId); + compilation.validate = v; + var cv = compilation.callValidate; + if (cv) { + cv.schema = v.schema; + cv.errors = null; + cv.refs = v.refs; + cv.refVal = v.refVal; + cv.root = v.root; + cv.$async = v.$async; + if (opts.sourceCode) cv.source = v.source; + } + return v; + } finally { + endCompiling.call(this, schema, root, baseId); + } + + /* @this {*} - custom context, see passContext option */ + function callValidate() { + /* jshint validthis: true */ + var validate = compilation.validate; + var result = validate.apply(this, arguments); + callValidate.errors = validate.errors; + return result; + } + + function localCompile(_schema, _root, localRefs, baseId) { + var isRoot = !_root || (_root && _root.schema == _schema); + if (_root.schema != root.schema) + return compile.call(self, _schema, _root, localRefs, baseId); + + var $async = _schema.$async === true; + + var sourceCode = validateGenerator({ + isTop: true, + schema: _schema, + isRoot: isRoot, + baseId: baseId, + root: _root, + schemaPath: '', + errSchemaPath: '#', + errorPath: '""', + MissingRefError: errorClasses.MissingRef, + RULES: RULES, + validate: validateGenerator, + util: util, + resolve: resolve, + resolveRef: resolveRef, + usePattern: usePattern, + useDefault: useDefault, + useCustomRule: useCustomRule, + opts: opts, + formats: formats, + logger: self.logger, + self: self + }); + + sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) + + vars(defaults, defaultCode) + vars(customRules, customRuleCode) + + sourceCode; + + if (opts.processCode) sourceCode = opts.processCode(sourceCode, _schema); + // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); + var validate; + try { + var makeValidate = new Function( + 'self', + 'RULES', + 'formats', + 'root', + 'refVal', + 'defaults', + 'customRules', + 'equal', + 'ucs2length', + 'ValidationError', + sourceCode + ); + + validate = makeValidate( + self, + RULES, + formats, + root, + refVal, + defaults, + customRules, + equal, + ucs2length, + ValidationError + ); + + refVal[0] = validate; + } catch(e) { + self.logger.error('Error compiling schema, function code:', sourceCode); + throw e; + } + + validate.schema = _schema; + validate.errors = null; + validate.refs = refs; + validate.refVal = refVal; + validate.root = isRoot ? validate : _root; + if ($async) validate.$async = true; + if (opts.sourceCode === true) { + validate.source = { + code: sourceCode, + patterns: patterns, + defaults: defaults + }; + } + + return validate; + } + + function resolveRef(baseId, ref, isRoot) { + ref = resolve.url(baseId, ref); + var refIndex = refs[ref]; + var _refVal, refCode; + if (refIndex !== undefined) { + _refVal = refVal[refIndex]; + refCode = 'refVal[' + refIndex + ']'; + return resolvedRef(_refVal, refCode); + } + if (!isRoot && root.refs) { + var rootRefId = root.refs[ref]; + if (rootRefId !== undefined) { + _refVal = root.refVal[rootRefId]; + refCode = addLocalRef(ref, _refVal); + return resolvedRef(_refVal, refCode); + } + } + + refCode = addLocalRef(ref); + var v = resolve.call(self, localCompile, root, ref); + if (v === undefined) { + var localSchema = localRefs && localRefs[ref]; + if (localSchema) { + v = resolve.inlineRef(localSchema, opts.inlineRefs) + ? localSchema + : compile.call(self, localSchema, root, localRefs, baseId); + } + } + + if (v === undefined) { + removeLocalRef(ref); + } else { + replaceLocalRef(ref, v); + return resolvedRef(v, refCode); + } + } + + function addLocalRef(ref, v) { + var refId = refVal.length; + refVal[refId] = v; + refs[ref] = refId; + return 'refVal' + refId; + } + + function removeLocalRef(ref) { + delete refs[ref]; + } + + function replaceLocalRef(ref, v) { + var refId = refs[ref]; + refVal[refId] = v; + } + + function resolvedRef(refVal, code) { + return typeof refVal == 'object' || typeof refVal == 'boolean' + ? { code: code, schema: refVal, inline: true } + : { code: code, $async: refVal && !!refVal.$async }; + } + + function usePattern(regexStr) { + var index = patternsHash[regexStr]; + if (index === undefined) { + index = patternsHash[regexStr] = patterns.length; + patterns[index] = regexStr; + } + return 'pattern' + index; + } + + function useDefault(value) { + switch (typeof value) { + case 'boolean': + case 'number': + return '' + value; + case 'string': + return util.toQuotedString(value); + case 'object': + if (value === null) return 'null'; + var valueStr = stableStringify(value); + var index = defaultsHash[valueStr]; + if (index === undefined) { + index = defaultsHash[valueStr] = defaults.length; + defaults[index] = value; + } + return 'default' + index; + } + } + + function useCustomRule(rule, schema, parentSchema, it) { + if (self._opts.validateSchema !== false) { + var deps = rule.definition.dependencies; + if (deps && !deps.every(function(keyword) { + return Object.prototype.hasOwnProperty.call(parentSchema, keyword); + })) + throw new Error('parent schema must have all required keywords: ' + deps.join(',')); + + var validateSchema = rule.definition.validateSchema; + if (validateSchema) { + var valid = validateSchema(schema); + if (!valid) { + var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors); + if (self._opts.validateSchema == 'log') self.logger.error(message); + else throw new Error(message); + } + } + } + + var compile = rule.definition.compile + , inline = rule.definition.inline + , macro = rule.definition.macro; + + var validate; + if (compile) { + validate = compile.call(self, schema, parentSchema, it); + } else if (macro) { + validate = macro.call(self, schema, parentSchema, it); + if (opts.validateSchema !== false) self.validateSchema(validate, true); + } else if (inline) { + validate = inline.call(self, it, rule.keyword, schema, parentSchema); + } else { + validate = rule.definition.validate; + if (!validate) return; + } + + if (validate === undefined) + throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); + + var index = customRules.length; + customRules[index] = validate; + + return { + code: 'customRule' + index, + validate: validate + }; + } +} + + +/** + * Checks if the schema is currently compiled + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean) + */ +function checkCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var index = compIndex.call(this, schema, root, baseId); + if (index >= 0) return { index: index, compiling: true }; + index = this._compilations.length; + this._compilations[index] = { + schema: schema, + root: root, + baseId: baseId + }; + return { index: index, compiling: false }; +} + + +/** + * Removes the schema from the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + */ +function endCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var i = compIndex.call(this, schema, root, baseId); + if (i >= 0) this._compilations.splice(i, 1); +} + + +/** + * Index of schema compilation in the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Integer} compilation index + */ +function compIndex(schema, root, baseId) { + /* jshint validthis: true */ + for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) { + // high surrogate, and there is a next character + value = str.charCodeAt(pos); + if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate + } + } + return length; +}; + + +/***/ }), + +/***/ "./node_modules/ajv/lib/compile/util.js": +/*!**********************************************!*\ + !*** ./node_modules/ajv/lib/compile/util.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + + +module.exports = { + copy: copy, + checkDataType: checkDataType, + checkDataTypes: checkDataTypes, + coerceToTypes: coerceToTypes, + toHash: toHash, + getProperty: getProperty, + escapeQuotes: escapeQuotes, + equal: __webpack_require__(/*! fast-deep-equal */ "./node_modules/fast-deep-equal/index.js"), + ucs2length: __webpack_require__(/*! ./ucs2length */ "./node_modules/ajv/lib/compile/ucs2length.js"), + varOccurences: varOccurences, + varReplace: varReplace, + schemaHasRules: schemaHasRules, + schemaHasRulesExcept: schemaHasRulesExcept, + schemaUnknownRules: schemaUnknownRules, + toQuotedString: toQuotedString, + getPathExpr: getPathExpr, + getPath: getPath, + getData: getData, + unescapeFragment: unescapeFragment, + unescapeJsonPointer: unescapeJsonPointer, + escapeFragment: escapeFragment, + escapeJsonPointer: escapeJsonPointer +}; + + +function copy(o, to) { + to = to || {}; + for (var key in o) to[key] = o[key]; + return to; +} + + +function checkDataType(dataType, data, strictNumbers, negate) { + var EQUAL = negate ? ' !== ' : ' === ' + , AND = negate ? ' || ' : ' && ' + , OK = negate ? '!' : '' + , NOT = negate ? '' : '!'; + switch (dataType) { + case 'null': return data + EQUAL + 'null'; + case 'array': return OK + 'Array.isArray(' + data + ')'; + case 'object': return '(' + OK + data + AND + + 'typeof ' + data + EQUAL + '"object"' + AND + + NOT + 'Array.isArray(' + data + '))'; + case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + + NOT + '(' + data + ' % 1)' + + AND + data + EQUAL + data + + (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; + case 'number': return '(typeof ' + data + EQUAL + '"' + dataType + '"' + + (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')'; + default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; + } +} + + +function checkDataTypes(dataTypes, data, strictNumbers) { + switch (dataTypes.length) { + case 1: return checkDataType(dataTypes[0], data, strictNumbers, true); + default: + var code = ''; + var types = toHash(dataTypes); + if (types.array && types.object) { + code = types.null ? '(': '(!' + data + ' || '; + code += 'typeof ' + data + ' !== "object")'; + delete types.null; + delete types.array; + delete types.object; + } + if (types.number) delete types.integer; + for (var t in types) + code += (code ? ' && ' : '' ) + checkDataType(t, data, strictNumbers, true); + + return code; + } +} + + +var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); +function coerceToTypes(optionCoerceTypes, dataTypes) { + if (Array.isArray(dataTypes)) { + var types = []; + for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); + return paths[lvl - up]; + } + + if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); + data = 'data' + ((lvl - up) || ''); + if (!jsonPointer) return data; + } + + var expr = data; + var segments = jsonPointer.split('/'); + for (var i=0; i', + $notOp = $isMax ? '>' : '<', + $errorKeyword = undefined; + if (!($isData || typeof $schema == 'number' || $schema === undefined)) { + throw new Error($keyword + ' must be number'); + } + if (!($isDataExcl || $schemaExcl === undefined || typeof $schemaExcl == 'number' || typeof $schemaExcl == 'boolean')) { + throw new Error($exclusiveKeyword + ' must be number or boolean'); + } + if ($isDataExcl) { + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), + $exclusive = 'exclusive' + $lvl, + $exclType = 'exclType' + $lvl, + $exclIsNumber = 'exclIsNumber' + $lvl, + $opExpr = 'op' + $lvl, + $opStr = '\' + ' + $opExpr + ' + \''; + out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; + $schemaValueExcl = 'schemaExcl' + $lvl; + out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; + var $errorKeyword = $exclusiveKeyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\'; '; + if ($schema === undefined) { + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaValueExcl; + $isData = $isDataExcl; + } + } else { + var $exclIsNumber = typeof $schemaExcl == 'number', + $opStr = $op; + if ($exclIsNumber && $isData) { + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; + } else { + if ($exclIsNumber && $schema === undefined) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaExcl; + $notOp += '='; + } else { + if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $notOp += '='; + } else { + $exclusive = false; + $opStr += '='; + } + } + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; + } + } + $errorKeyword = $errorKeyword || $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be ' + ($opStr) + ' '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ "./node_modules/ajv/lib/dotjs/_limitItems.js": +/*!***************************************************!*\ + !*** ./node_modules/ajv/lib/dotjs/_limitItems.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate__limitItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + var $op = $keyword == 'maxItems' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxItems') { + out += 'more'; + } else { + out += 'fewer'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ "./node_modules/ajv/lib/dotjs/_limitLength.js": +/*!****************************************************!*\ + !*** ./node_modules/ajv/lib/dotjs/_limitLength.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate__limitLength(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + var $op = $keyword == 'maxLength' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + if (it.opts.unicode === false) { + out += ' ' + ($data) + '.length '; + } else { + out += ' ucs2length(' + ($data) + ') '; + } + out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be '; + if ($keyword == 'maxLength') { + out += 'longer'; + } else { + out += 'shorter'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' characters\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ "./node_modules/ajv/lib/dotjs/_limitProperties.js": +/*!********************************************************!*\ + !*** ./node_modules/ajv/lib/dotjs/_limitProperties.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate__limitProperties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + var $op = $keyword == 'maxProperties' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxProperties') { + out += 'more'; + } else { + out += 'fewer'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' properties\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ "./node_modules/ajv/lib/dotjs/allOf.js": +/*!*********************************************!*\ + !*** ./node_modules/ajv/lib/dotjs/allOf.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate_allOf(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $allSchemasEmpty = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($breakOnError) { + if ($allSchemasEmpty) { + out += ' if (true) { '; + } else { + out += ' ' + ($closingBraces.slice(0, -1)) + ' '; + } + } + return out; +} + + +/***/ }), + +/***/ "./node_modules/ajv/lib/dotjs/anyOf.js": +/*!*********************************************!*\ + !*** ./node_modules/ajv/lib/dotjs/anyOf.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate_anyOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $noEmptySchema = $schema.every(function($sch) { + return (it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all)); + }); + if ($noEmptySchema) { + var $currentBaseId = $it.baseId; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; + $closingBraces += '}'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should match some schema in anyOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + + +/***/ }), + +/***/ "./node_modules/ajv/lib/dotjs/comment.js": +/*!***********************************************!*\ + !*** ./node_modules/ajv/lib/dotjs/comment.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate_comment(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $comment = it.util.toQuotedString($schema); + if (it.opts.$comment === true) { + out += ' console.log(' + ($comment) + ');'; + } else if (typeof it.opts.$comment == 'function') { + out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);'; + } + return out; +} + + +/***/ }), + +/***/ "./node_modules/ajv/lib/dotjs/const.js": +/*!*********************************************!*\ + !*** ./node_modules/ajv/lib/dotjs/const.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate_const(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!$isData) { + out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to constant\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ "./node_modules/ajv/lib/dotjs/contains.js": +/*!************************************************!*\ + !*** ./node_modules/ajv/lib/dotjs/contains.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate_contains(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId, + $nonEmptySchema = (it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all)); + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($nonEmptySchema) { + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (' + ($nextValid) + ') break; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; + } else { + out += ' if (' + ($data) + '.length == 0) {'; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should contain a valid item\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + if ($nonEmptySchema) { + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + } + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} + + +/***/ }), + +/***/ "./node_modules/ajv/lib/dotjs/custom.js": +/*!**********************************************!*\ + !*** ./node_modules/ajv/lib/dotjs/custom.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate_custom(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $rule = this, + $definition = 'definition' + $lvl, + $rDef = $rule.definition, + $closingBraces = ''; + var $compile, $inline, $macro, $ruleValidate, $validateCode; + if ($isData && $rDef.$data) { + $validateCode = 'keywordValidate' + $lvl; + var $validateSchema = $rDef.validateSchema; + out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; + } else { + $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; + $schemaValue = 'validate.schema' + $schemaPath; + $validateCode = $ruleValidate.code; + $compile = $rDef.compile; + $inline = $rDef.inline; + $macro = $rDef.macro; + } + var $ruleErrs = $validateCode + '.errors', + $i = 'i' + $lvl, + $ruleErr = 'ruleErr' + $lvl, + $asyncKeyword = $rDef.async; + if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); + if (!($inline || $macro)) { + out += '' + ($ruleErrs) + ' = null;'; + } + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($isData && $rDef.$data) { + $closingBraces += '}'; + out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; + if ($validateSchema) { + $closingBraces += '}'; + out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; + } + } + if ($inline) { + if ($rDef.statements) { + out += ' ' + ($ruleValidate.validate) + ' '; + } else { + out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; + } + } else if ($macro) { + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + $it.schema = $ruleValidate.validate; + $it.schemaPath = ''; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($code); + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + out += ' ' + ($validateCode) + '.call( '; + if (it.opts.passContext) { + out += 'this'; + } else { + out += 'self'; + } + if ($compile || $rDef.schema === false) { + out += ' , ' + ($data) + ' '; + } else { + out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; + } + out += ' , (dataPath || \'\')'; + if (it.errorPath != '""') { + out += ' + ' + (it.errorPath); + } + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; + var def_callRuleValidate = out; + out = $$outStack.pop(); + if ($rDef.errors === false) { + out += ' ' + ($valid) + ' = '; + if ($asyncKeyword) { + out += 'await '; + } + out += '' + (def_callRuleValidate) + '; '; + } else { + if ($asyncKeyword) { + $ruleErrs = 'customErrors' + $lvl; + out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; + } else { + out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; + } + } + } + if ($rDef.modifying) { + out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; + } + out += '' + ($closingBraces); + if ($rDef.valid) { + if ($breakOnError) { + out += ' if (true) { '; + } + } else { + out += ' if ( '; + if ($rDef.valid === undefined) { + out += ' !'; + if ($macro) { + out += '' + ($nextValid); + } else { + out += '' + ($valid); + } + } else { + out += ' ' + (!$rDef.valid) + ' '; + } + out += ') { '; + $errorKeyword = $rule.keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + var def_customError = out; + out = $$outStack.pop(); + if ($inline) { + if ($rDef.errors) { + if ($rDef.errors != 'full') { + out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + ' 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; + } + out += ') { '; + $it.schema = $sch; + $it.schemaPath = $schemaPath + it.util.getProperty($property); + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + return out; +} + + +/***/ }), + +/***/ "./node_modules/ajv/lib/dotjs/enum.js": +/*!********************************************!*\ + !*** ./node_modules/ajv/lib/dotjs/enum.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate_enum(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $i = 'i' + $lvl, + $vSchema = 'schema' + $lvl; + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ';'; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }'; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('enum') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to one of the allowed values\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ "./node_modules/ajv/lib/dotjs/format.js": +/*!**********************************************!*\ + !*** ./node_modules/ajv/lib/dotjs/format.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate_format(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + if (it.opts.format === false) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $unknownFormats = it.opts.unknownFormats, + $allowUnknown = Array.isArray($unknownFormats); + if ($isData) { + var $format = 'format' + $lvl, + $isObject = 'isObject' + $lvl, + $formatType = 'formatType' + $lvl; + out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { '; + if (it.async) { + out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; '; + } + out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' ('; + if ($unknownFormats != 'ignore') { + out += ' (' + ($schemaValue) + ' && !' + ($format) + ' '; + if ($allowUnknown) { + out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 '; + } + out += ') || '; + } + out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? '; + if (it.async) { + out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) '; + } else { + out += ' ' + ($format) + '(' + ($data) + ') '; + } + out += ' : ' + ($format) + '.test(' + ($data) + '))))) {'; + } else { + var $format = it.formats[$schema]; + if (!$format) { + if ($unknownFormats == 'ignore') { + it.logger.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else { + throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); + } + } + var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; + var $formatType = $isObject && $format.type || 'string'; + if ($isObject) { + var $async = $format.async === true; + $format = $format.validate; + } + if ($formatType != $ruleType) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + if ($async) { + if (!it.async) throw new Error('async format in sync schema'); + var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; + out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { '; + } else { + out += ' if (! '; + var $formatRef = 'formats' + it.util.getProperty($schema); + if ($isObject) $formatRef += '.validate'; + if (typeof $format == 'function') { + out += ' ' + ($formatRef) + '(' + ($data) + ') '; + } else { + out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; + } + out += ') { '; + } + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match format "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ "./node_modules/ajv/lib/dotjs/if.js": +/*!******************************************!*\ + !*** ./node_modules/ajv/lib/dotjs/if.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate_if(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + var $thenSch = it.schema['then'], + $elseSch = it.schema['else'], + $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? (typeof $thenSch == 'object' && Object.keys($thenSch).length > 0) || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)), + $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? (typeof $elseSch == 'object' && Object.keys($elseSch).length > 0) || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)), + $currentBaseId = $it.baseId; + if ($thenPresent || $elsePresent) { + var $ifClause; + $it.createErrors = false; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + $it.createErrors = true; + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + if ($thenPresent) { + out += ' if (' + ($nextValid) + ') { '; + $it.schema = it.schema['then']; + $it.schemaPath = it.schemaPath + '.then'; + $it.errSchemaPath = it.errSchemaPath + '/then'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'then\'; '; + } else { + $ifClause = '\'then\''; + } + out += ' } '; + if ($elsePresent) { + out += ' else { '; + } + } else { + out += ' if (!' + ($nextValid) + ') { '; + } + if ($elsePresent) { + $it.schema = it.schema['else']; + $it.schemaPath = it.schemaPath + '.else'; + $it.errSchemaPath = it.errSchemaPath + '/else'; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($nextValid) + '; '; + if ($thenPresent && $elsePresent) { + $ifClause = 'ifClause' + $lvl; + out += ' var ' + ($ifClause) + ' = \'else\'; '; + } else { + $ifClause = '\'else\''; + } + out += ' } '; + } + out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('if') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match "\' + ' + ($ifClause) + ' + \'" schema\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + + +/***/ }), + +/***/ "./node_modules/ajv/lib/dotjs/index.js": +/*!*********************************************!*\ + !*** ./node_modules/ajv/lib/dotjs/index.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +//all requires must be explicit because browserify won't work with dynamic requires +module.exports = { + '$ref': __webpack_require__(/*! ./ref */ "./node_modules/ajv/lib/dotjs/ref.js"), + allOf: __webpack_require__(/*! ./allOf */ "./node_modules/ajv/lib/dotjs/allOf.js"), + anyOf: __webpack_require__(/*! ./anyOf */ "./node_modules/ajv/lib/dotjs/anyOf.js"), + '$comment': __webpack_require__(/*! ./comment */ "./node_modules/ajv/lib/dotjs/comment.js"), + const: __webpack_require__(/*! ./const */ "./node_modules/ajv/lib/dotjs/const.js"), + contains: __webpack_require__(/*! ./contains */ "./node_modules/ajv/lib/dotjs/contains.js"), + dependencies: __webpack_require__(/*! ./dependencies */ "./node_modules/ajv/lib/dotjs/dependencies.js"), + 'enum': __webpack_require__(/*! ./enum */ "./node_modules/ajv/lib/dotjs/enum.js"), + format: __webpack_require__(/*! ./format */ "./node_modules/ajv/lib/dotjs/format.js"), + 'if': __webpack_require__(/*! ./if */ "./node_modules/ajv/lib/dotjs/if.js"), + items: __webpack_require__(/*! ./items */ "./node_modules/ajv/lib/dotjs/items.js"), + maximum: __webpack_require__(/*! ./_limit */ "./node_modules/ajv/lib/dotjs/_limit.js"), + minimum: __webpack_require__(/*! ./_limit */ "./node_modules/ajv/lib/dotjs/_limit.js"), + maxItems: __webpack_require__(/*! ./_limitItems */ "./node_modules/ajv/lib/dotjs/_limitItems.js"), + minItems: __webpack_require__(/*! ./_limitItems */ "./node_modules/ajv/lib/dotjs/_limitItems.js"), + maxLength: __webpack_require__(/*! ./_limitLength */ "./node_modules/ajv/lib/dotjs/_limitLength.js"), + minLength: __webpack_require__(/*! ./_limitLength */ "./node_modules/ajv/lib/dotjs/_limitLength.js"), + maxProperties: __webpack_require__(/*! ./_limitProperties */ "./node_modules/ajv/lib/dotjs/_limitProperties.js"), + minProperties: __webpack_require__(/*! ./_limitProperties */ "./node_modules/ajv/lib/dotjs/_limitProperties.js"), + multipleOf: __webpack_require__(/*! ./multipleOf */ "./node_modules/ajv/lib/dotjs/multipleOf.js"), + not: __webpack_require__(/*! ./not */ "./node_modules/ajv/lib/dotjs/not.js"), + oneOf: __webpack_require__(/*! ./oneOf */ "./node_modules/ajv/lib/dotjs/oneOf.js"), + pattern: __webpack_require__(/*! ./pattern */ "./node_modules/ajv/lib/dotjs/pattern.js"), + properties: __webpack_require__(/*! ./properties */ "./node_modules/ajv/lib/dotjs/properties.js"), + propertyNames: __webpack_require__(/*! ./propertyNames */ "./node_modules/ajv/lib/dotjs/propertyNames.js"), + required: __webpack_require__(/*! ./required */ "./node_modules/ajv/lib/dotjs/required.js"), + uniqueItems: __webpack_require__(/*! ./uniqueItems */ "./node_modules/ajv/lib/dotjs/uniqueItems.js"), + validate: __webpack_require__(/*! ./validate */ "./node_modules/ajv/lib/dotjs/validate.js") +}; + + +/***/ }), + +/***/ "./node_modules/ajv/lib/dotjs/items.js": +/*!*********************************************!*\ + !*** ./node_modules/ajv/lib/dotjs/items.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate_items(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId; + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if (Array.isArray($schema)) { + var $additionalItems = it.schema.additionalItems; + if ($additionalItems === false) { + out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + } + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; + var $passData = $data + '[' + $i + ']'; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? (typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0) || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) { + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + '.additionalItems'; + $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } else if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' }'; + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + return out; +} + + +/***/ }), + +/***/ "./node_modules/ajv/lib/dotjs/multipleOf.js": +/*!**************************************************!*\ + !*** ./node_modules/ajv/lib/dotjs/multipleOf.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate_multipleOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!($isData || typeof $schema == 'number')) { + throw new Error($keyword + ' must be number'); + } + out += 'var division' + ($lvl) + ';if ('; + if ($isData) { + out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; + } + out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; + if (it.opts.multipleOfPrecision) { + out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; + } else { + out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; + } + out += ' ) '; + if ($isData) { + out += ' ) '; + } + out += ' ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be multiple of '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ "./node_modules/ajv/lib/dotjs/not.js": +/*!*******************************************!*\ + !*** ./node_modules/ajv/lib/dotjs/not.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate_not(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + out += ' ' + (it.validate($it)) + ' '; + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (' + ($nextValid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + out += ' var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if ($breakOnError) { + out += ' if (false) { '; + } + } + return out; +} + + +/***/ }), + +/***/ "./node_modules/ajv/lib/dotjs/oneOf.js": +/*!*********************************************!*\ + !*** ./node_modules/ajv/lib/dotjs/oneOf.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate_oneOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $prevValid = 'prevValid' + $lvl, + $passingSchemas = 'passingSchemas' + $lvl; + out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + } else { + out += ' var ' + ($nextValid) + ' = true; '; + } + if ($i) { + out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { '; + $closingBraces += '}'; + } + out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match exactly one schema in oneOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} + + +/***/ }), + +/***/ "./node_modules/ajv/lib/dotjs/pattern.js": +/*!***********************************************!*\ + !*** ./node_modules/ajv/lib/dotjs/pattern.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate_pattern(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema); + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match pattern "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + + +/***/ }), + +/***/ "./node_modules/ajv/lib/dotjs/properties.js": +/*!**************************************************!*\ + !*** ./node_modules/ajv/lib/dotjs/properties.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate_properties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl; + var $schemaKeys = Object.keys($schema || {}).filter(notProto), + $pProperties = it.schema.patternProperties || {}, + $pPropertyKeys = Object.keys($pProperties).filter(notProto), + $aProperties = it.schema.additionalProperties, + $someProperties = $schemaKeys.length || $pPropertyKeys.length, + $noAdditional = $aProperties === false, + $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, + $removeAdditional = it.opts.removeAdditional, + $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + var $required = it.schema.required; + if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) { + var $requiredHash = it.util.toHash($required); + } + + function notProto(p) { + return p !== '__proto__'; + } + out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined;'; + } + if ($checkAdditional) { + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + if ($someProperties) { + out += ' var isAdditional' + ($lvl) + ' = !(false '; + if ($schemaKeys.length) { + if ($schemaKeys.length > 8) { + out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') '; + } else { + var arr1 = $schemaKeys; + if (arr1) { + var $propertyKey, i1 = -1, + l1 = arr1.length - 1; + while (i1 < l1) { + $propertyKey = arr1[i1 += 1]; + out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; + } + } + } + } + if ($pPropertyKeys.length) { + var arr2 = $pPropertyKeys; + if (arr2) { + var $pProperty, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $pProperty = arr2[$i += 1]; + out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; + } + } + } + out += ' ); if (isAdditional' + ($lvl) + ') { '; + } + if ($removeAdditional == 'all') { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + var $currentErrorPath = it.errorPath; + var $additionalProperty = '\' + ' + $key + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + } + if ($noAdditional) { + if ($removeAdditional) { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + out += ' ' + ($nextValid) + ' = false; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalProperties'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is an invalid additional property'; + } else { + out += 'should NOT have additional properties'; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + out += ' break; '; + } + } + } else if ($additionalIsSchema) { + if ($removeAdditional == 'failing') { + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + } else { + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + } + } + it.errorPath = $currentErrorPath; + } + if ($someProperties) { + out += ' } '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + var $useDefaults = it.opts.useDefaults && !it.compositeRule; + if ($schemaKeys.length) { + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + var $prop = it.util.getProperty($propertyKey), + $passData = $data + $prop, + $hasDefault = $useDefaults && $sch.default !== undefined; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + $code = it.util.varReplace($code, $nextData, $passData); + var $useData = $passData; + } else { + var $useData = $nextData; + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; + } + if ($hasDefault) { + out += ' ' + ($code) + ' '; + } else { + if ($requiredHash && $requiredHash[$propertyKey]) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = false; '; + var $currentErrorPath = it.errorPath, + $currErrSchemaPath = $errSchemaPath, + $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + '/required'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + it.errorPath = $currentErrorPath; + out += ' } else { '; + } else { + if ($breakOnError) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = true; } else { '; + } else { + out += ' if (' + ($useData) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ' ) { '; + } + } + out += ' ' + ($code) + ' } '; + } + } + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($pPropertyKeys.length) { + var arr4 = $pPropertyKeys; + if (arr4) { + var $pProperty, i4 = -1, + l4 = arr4.length - 1; + while (i4 < l4) { + $pProperty = arr4[i4 += 1]; + var $sch = $pProperties[$pProperty]; + if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) { + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); + $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else ' + ($nextValid) + ' = true; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + return out; +} + + +/***/ }), + +/***/ "./node_modules/ajv/lib/dotjs/propertyNames.js": +/*!*****************************************************!*\ + !*** ./node_modules/ajv/lib/dotjs/propertyNames.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate_propertyNames(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + out += 'var ' + ($errs) + ' = errors;'; + if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $i = 'i' + $lvl, + $invalidName = '\' + ' + $key + ' + \'', + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined; '; + } + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' var startErrs' + ($lvl) + ' = errors; '; + var $passData = $key; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + ' 0) || $propertySch === false : it.util.schemaHasRules($propertySch, it.RULES.all)))) { + $required[$required.length] = $property; + } + } + } + } else { + var $required = $schema; + } + } + if ($isData || $required.length) { + var $currentErrorPath = it.errorPath, + $loopRequired = $isData || $required.length >= it.opts.loopRequired, + $ownProperties = it.opts.ownProperties; + if ($breakOnError) { + out += ' var missing' + ($lvl) + '; '; + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + out += ' var ' + ($valid) + ' = true; '; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += '; if (!' + ($valid) + ') break; } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } else { + out += ' if ( '; + var arr2 = $required; + if (arr2) { + var $propertyKey, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $propertyKey = arr2[$i += 1]; + if ($i) { + out += ' || '; + } + var $prop = it.util.getProperty($propertyKey), + $useData = $data + $prop; + out += ' ( ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; + } + } + out += ') { '; + var $propertyPath = 'missing' + $lvl, + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } + } else { + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + if ($isData) { + out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; + if ($isData) { + out += ' } '; + } + } else { + var arr3 = $required; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $prop = it.util.getProperty($propertyKey), + $missingProperty = it.util.escapeQuotes($propertyKey), + $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; + } + } + } + } + it.errorPath = $currentErrorPath; + } else if ($breakOnError) { + out += ' if (true) {'; + } + return out; +} + + +/***/ }), + +/***/ "./node_modules/ajv/lib/dotjs/uniqueItems.js": +/*!***************************************************!*\ + !*** ./node_modules/ajv/lib/dotjs/uniqueItems.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (($schema || $isData) && it.opts.uniqueItems !== false) { + if ($isData) { + out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; + } + out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { '; + var $itemType = it.schema.items && it.schema.items.type, + $typeIsArray = Array.isArray($itemType); + if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) { + out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } '; + } else { + out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; '; + var $method = 'checkDataType' + ($typeIsArray ? 's' : ''); + out += ' if (' + (it.util[$method]($itemType, 'item', it.opts.strictNumbers, true)) + ') continue; '; + if ($typeIsArray) { + out += ' if (typeof item == \'string\') item = \'"\' + item; '; + } + out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } '; + } + out += ' } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + + +/***/ }), + +/***/ "./node_modules/ajv/lib/dotjs/validate.js": +/*!************************************************!*\ + !*** ./node_modules/ajv/lib/dotjs/validate.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = function generate_validate(it, $keyword, $ruleType) { + var out = ''; + var $async = it.schema.$async === true, + $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), + $id = it.self._getId(it.schema); + if (it.opts.strictKeywords) { + var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords); + if ($unknownKwd) { + var $keywordsMsg = 'unknown keyword: ' + $unknownKwd; + if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg); + else throw new Error($keywordsMsg); + } + } + if (it.isTop) { + out += ' var validate = '; + if ($async) { + it.async = true; + out += 'async '; + } + out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; + if ($id && (it.opts.sourceCode || it.opts.processCode)) { + out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; + } + } + if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { + var $keyword = 'false schema'; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + if (it.schema === false) { + if (it.isTop) { + $breakOnError = true; + } else { + out += ' var ' + ($valid) + ' = false; '; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'boolean schema is false\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } else { + if (it.isTop) { + if ($async) { + out += ' return data; '; + } else { + out += ' validate.errors = null; return true; '; + } + } else { + out += ' var ' + ($valid) + ' = true; '; + } + } + if (it.isTop) { + out += ' }; return validate; '; + } + return out; + } + if (it.isTop) { + var $top = it.isTop, + $lvl = it.level = 0, + $dataLvl = it.dataLevel = 0, + $data = 'data'; + it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); + it.baseId = it.baseId || it.rootId; + delete it.isTop; + it.dataPathArr = [""]; + if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored in the schema root'; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + out += ' var vErrors = null; '; + out += ' var errors = 0; '; + out += ' if (rootData === undefined) rootData = data; '; + } else { + var $lvl = it.level, + $dataLvl = it.dataLevel, + $data = 'data' + ($dataLvl || ''); + if ($id) it.baseId = it.resolve.url(it.baseId, $id); + if ($async && !it.async) throw new Error('async schema in sync schema'); + out += ' var errs_' + ($lvl) + ' = errors;'; + } + var $valid = 'valid' + $lvl, + $breakOnError = !it.opts.allErrors, + $closingBraces1 = '', + $closingBraces2 = ''; + var $errorKeyword; + var $typeSchema = it.schema.type, + $typeIsArray = Array.isArray($typeSchema); + if ($typeSchema && it.opts.nullable && it.schema.nullable === true) { + if ($typeIsArray) { + if ($typeSchema.indexOf('null') == -1) $typeSchema = $typeSchema.concat('null'); + } else if ($typeSchema != 'null') { + $typeSchema = [$typeSchema, 'null']; + $typeIsArray = true; + } + } + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; + } + if (it.schema.$ref && $refKeywords) { + if (it.opts.extendRefs == 'fail') { + throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); + } else if (it.opts.extendRefs !== true) { + $refKeywords = false; + it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); + } + } + if (it.schema.$comment && it.opts.$comment) { + out += ' ' + (it.RULES.all.$comment.code(it, '$comment')); + } + if ($typeSchema) { + if (it.opts.coerceTypes) { + var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); + } + var $rulesGroup = it.RULES.types[$typeSchema]; + if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type', + $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; + out += ' if (' + (it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true)) + ') { '; + if ($coerceToTypes) { + var $dataType = 'dataType' + $lvl, + $coerced = 'coerced' + $lvl; + out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; var ' + ($coerced) + ' = undefined; '; + if (it.opts.coerceTypes == 'array') { + out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ') && ' + ($data) + '.length == 1) { ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; if (' + (it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)) + ') ' + ($coerced) + ' = ' + ($data) + '; } '; + } + out += ' if (' + ($coerced) + ' !== undefined) ; '; + var arr1 = $coerceToTypes; + if (arr1) { + var $type, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $type = arr1[$i += 1]; + if ($type == 'string') { + out += ' else if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; + } else if ($type == 'number' || $type == 'integer') { + out += ' else if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; + if ($type == 'integer') { + out += ' && !(' + ($data) + ' % 1)'; + } + out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; + } else if ($type == 'boolean') { + out += ' else if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; + } else if ($type == 'null') { + out += ' else if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; + } else if (it.opts.coerceTypes == 'array' && $type == 'array') { + out += ' else if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; + } + } + } + out += ' else { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } if (' + ($coerced) + ' !== undefined) { '; + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' ' + ($data) + ' = ' + ($coerced) + '; '; + if (!$dataLvl) { + out += 'if (' + ($parentData) + ' !== undefined)'; + } + out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } + out += ' } '; + } + } + if (it.schema.$ref && !$refKeywords) { + out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' '; + if ($breakOnError) { + out += ' } if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } else { + var arr2 = it.RULES; + if (arr2) { + var $rulesGroup, i2 = -1, + l2 = arr2.length - 1; + while (i2 < l2) { + $rulesGroup = arr2[i2 += 1]; + if ($shouldUseGroup($rulesGroup)) { + if ($rulesGroup.type) { + out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers)) + ') { '; + } + if (it.opts.useDefaults) { + if ($rulesGroup.type == 'object' && it.schema.properties) { + var $schema = it.schema.properties, + $schemaKeys = Object.keys($schema); + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ($sch.default !== undefined) { + var $passData = $data + it.util.getProperty($propertyKey); + if (it.compositeRule) { + if (it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored for: ' + $passData; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + } else { + out += ' if (' + ($passData) + ' === undefined '; + if (it.opts.useDefaults == 'empty') { + out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; + } + out += ' ) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } + } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) { + var arr4 = it.schema.items; + if (arr4) { + var $sch, $i = -1, + l4 = arr4.length - 1; + while ($i < l4) { + $sch = arr4[$i += 1]; + if ($sch.default !== undefined) { + var $passData = $data + '[' + $i + ']'; + if (it.compositeRule) { + if (it.opts.strictDefaults) { + var $defaultMsg = 'default is ignored for: ' + $passData; + if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg); + else throw new Error($defaultMsg); + } + } else { + out += ' if (' + ($passData) + ' === undefined '; + if (it.opts.useDefaults == 'empty') { + out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \'\' '; + } + out += ' ) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } + } + } + var arr5 = $rulesGroup.rules; + if (arr5) { + var $rule, i5 = -1, + l5 = arr5.length - 1; + while (i5 < l5) { + $rule = arr5[i5 += 1]; + if ($shouldUseRule($rule)) { + var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); + if ($code) { + out += ' ' + ($code) + ' '; + if ($breakOnError) { + $closingBraces1 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces1) + ' '; + $closingBraces1 = ''; + } + if ($rulesGroup.type) { + out += ' } '; + if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { + out += ' else { '; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { + /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + } + } + if ($breakOnError) { + out += ' if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces2) + ' '; + } + if ($top) { + if ($async) { + out += ' if (errors === 0) return data; '; + out += ' else throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; '; + out += ' return errors === 0; '; + } + out += ' }; return validate;'; + } else { + out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; + } + + function $shouldUseGroup($rulesGroup) { + var rules = $rulesGroup.rules; + for (var i = 0; i < rules.length; i++) + if ($shouldUseRule(rules[i])) return true; + } + + function $shouldUseRule($rule) { + return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); + } + + function $ruleImplementsSomeKeyword($rule) { + var impl = $rule.implements; + for (var i = 0; i < impl.length; i++) + if (it.schema[impl[i]] !== undefined) return true; + } + return out; +} + + +/***/ }), + +/***/ "./node_modules/ajv/lib/keyword.js": +/*!*****************************************!*\ + !*** ./node_modules/ajv/lib/keyword.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; +var customRuleCode = __webpack_require__(/*! ./dotjs/custom */ "./node_modules/ajv/lib/dotjs/custom.js"); +var definitionSchema = __webpack_require__(/*! ./definition_schema */ "./node_modules/ajv/lib/definition_schema.js"); + +module.exports = { + add: addKeyword, + get: getKeyword, + remove: removeKeyword, + validate: validateKeyword +}; + + +/** + * Define custom keyword + * @this Ajv + * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords). + * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. + * @return {Ajv} this for method chaining + */ +function addKeyword(keyword, definition) { + /* jshint validthis: true */ + /* eslint no-shadow: 0 */ + var RULES = this.RULES; + if (RULES.keywords[keyword]) + throw new Error('Keyword ' + keyword + ' is already defined'); + + if (!IDENTIFIER.test(keyword)) + throw new Error('Keyword ' + keyword + ' is not a valid identifier'); + + if (definition) { + this.validateKeyword(definition, true); + + var dataType = definition.type; + if (Array.isArray(dataType)) { + for (var i=0; i { + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' + ].join('|'); + + return new RegExp(pattern, onlyFirst ? undefined : 'g'); +}; + + +/***/ }), + +/***/ "./node_modules/ansi-styles/index.js": +/*!*******************************************!*\ + !*** ./node_modules/ansi-styles/index.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(module) { + +const wrapAnsi16 = (fn, offset) => (...args) => { + const code = fn(...args); + return `\u001B[${code + offset}m`; +}; + +const wrapAnsi256 = (fn, offset) => (...args) => { + const code = fn(...args); + return `\u001B[${38 + offset};5;${code}m`; +}; + +const wrapAnsi16m = (fn, offset) => (...args) => { + const rgb = fn(...args); + return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; +}; + +const ansi2ansi = n => n; +const rgb2rgb = (r, g, b) => [r, g, b]; + +const setLazyProperty = (object, property, get) => { + Object.defineProperty(object, property, { + get: () => { + const value = get(); + + Object.defineProperty(object, property, { + value, + enumerable: true, + configurable: true + }); + + return value; + }, + enumerable: true, + configurable: true + }); +}; + +/** @type {typeof import('color-convert')} */ +let colorConvert; +const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { + if (colorConvert === undefined) { + colorConvert = __webpack_require__(/*! color-convert */ "./node_modules/color-convert/index.js"); + } + + const offset = isBackground ? 10 : 0; + const styles = {}; + + for (const [sourceSpace, suite] of Object.entries(colorConvert)) { + const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace; + if (sourceSpace === targetSpace) { + styles[name] = wrap(identity, offset); + } else if (typeof suite === 'object') { + styles[name] = wrap(suite[targetSpace], offset); + } + } + + return styles; +}; + +function assembleStyles() { + const codes = new Map(); + const styles = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + + // Bright color + blackBright: [90, 39], + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + + // Bright color + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } + }; + + // Alias bright black as gray (and grey) + styles.color.gray = styles.color.blackBright; + styles.bgColor.bgGray = styles.bgColor.bgBlackBright; + styles.color.grey = styles.color.blackBright; + styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; + + for (const [groupName, group] of Object.entries(styles)) { + for (const [styleName, style] of Object.entries(group)) { + styles[styleName] = { + open: `\u001B[${style[0]}m`, + close: `\u001B[${style[1]}m` + }; + + group[styleName] = styles[styleName]; + + codes.set(style[0], style[1]); + } + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + } + + Object.defineProperty(styles, 'codes', { + value: codes, + enumerable: false + }); + + styles.color.close = '\u001B[39m'; + styles.bgColor.close = '\u001B[49m'; + + setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false)); + setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false)); + setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false)); + setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true)); + setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true)); + setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true)); + + return styles; +} + +// Make the export immutable +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) + +/***/ }), + +/***/ "./node_modules/astral-regex/index.js": +/*!********************************************!*\ + !*** ./node_modules/astral-regex/index.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const regex = '[\uD800-\uDBFF][\uDC00-\uDFFF]'; + +const astralRegex = options => options && options.exact ? new RegExp(`^${regex}$`) : new RegExp(regex, 'g'); + +module.exports = astralRegex; + + +/***/ }), + +/***/ "./node_modules/balanced-match/index.js": +/*!**********************************************!*\ + !*** ./node_modules/balanced-match/index.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = balanced; +function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + + var r = range(a, b, str); + + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} + +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; +} + +balanced.range = range; +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + if(a===b) { + return [ai, bi]; + } + begs = []; + left = str.length; + + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + + bi = str.indexOf(b, i + 1); + } + + i = ai < bi && ai >= 0 ? ai : bi; + } + + if (begs.length) { + result = [ left, right ]; + } + } + + return result; +} + + +/***/ }), + +/***/ "./node_modules/brace-expansion/index.js": +/*!***********************************************!*\ + !*** ./node_modules/brace-expansion/index.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var concatMap = __webpack_require__(/*! concat-map */ "./node_modules/concat-map/index.js"); +var balanced = __webpack_require__(/*! balanced-match */ "./node_modules/balanced-match/index.js"); + +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; +} + +function expandTop(str) { + if (!str) + return []; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function identity(e) { + return e; +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + + return expansions; +} + + + +/***/ }), + +/***/ "./node_modules/cli-truncate/index.js": +/*!********************************************!*\ + !*** ./node_modules/cli-truncate/index.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const sliceAnsi = __webpack_require__(/*! slice-ansi */ "./node_modules/slice-ansi/index.js"); +const stringWidth = __webpack_require__(/*! string-width */ "./node_modules/string-width/index.js"); + +function getIndexOfNearestSpace(string, index, shouldSearchRight) { + if (string.charAt(index) === ' ') { + return index; + } + + for (let i = 1; i <= 3; i++) { + if (shouldSearchRight) { + if (string.charAt(index + i) === ' ') { + return index + i; + } + } else if (string.charAt(index - i) === ' ') { + return index - i; + } + } + + return index; +} + +module.exports = (text, columns, options) => { + options = { + position: 'end', + preferTruncationOnSpace: false, + ...options + }; + + const {position, space, preferTruncationOnSpace} = options; + let ellipsis = '…'; + let ellipsisWidth = 1; + + if (typeof text !== 'string') { + throw new TypeError(`Expected \`input\` to be a string, got ${typeof text}`); + } + + if (typeof columns !== 'number') { + throw new TypeError(`Expected \`columns\` to be a number, got ${typeof columns}`); + } + + if (columns < 1) { + return ''; + } + + if (columns === 1) { + return ellipsis; + } + + const length = stringWidth(text); + + if (length <= columns) { + return text; + } + + if (position === 'start') { + if (preferTruncationOnSpace) { + const nearestSpace = getIndexOfNearestSpace(text, length - columns + 1, true); + return ellipsis + sliceAnsi(text, nearestSpace, length).trim(); + } + + if (space === true) { + ellipsis += ' '; + ellipsisWidth = 2; + } + + return ellipsis + sliceAnsi(text, length - columns + ellipsisWidth, length); + } + + if (position === 'middle') { + if (space === true) { + ellipsis = ' ' + ellipsis + ' '; + ellipsisWidth = 3; + } + + const half = Math.floor(columns / 2); + + if (preferTruncationOnSpace) { + const spaceNearFirstBreakPoint = getIndexOfNearestSpace(text, half); + const spaceNearSecondBreakPoint = getIndexOfNearestSpace(text, length - (columns - half) + 1, true); + return sliceAnsi(text, 0, spaceNearFirstBreakPoint) + ellipsis + sliceAnsi(text, spaceNearSecondBreakPoint, length).trim(); + } + + return ( + sliceAnsi(text, 0, half) + + ellipsis + + sliceAnsi(text, length - (columns - half) + ellipsisWidth, length) + ); + } + + if (position === 'end') { + if (preferTruncationOnSpace) { + const nearestSpace = getIndexOfNearestSpace(text, columns - 1); + return sliceAnsi(text, 0, nearestSpace) + ellipsis; + } + + if (space === true) { + ellipsis = ' ' + ellipsis; + ellipsisWidth = 2; + } + + return sliceAnsi(text, 0, columns - ellipsisWidth) + ellipsis; + } + + throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${position}`); +}; + + +/***/ }), + +/***/ "./node_modules/color-convert/conversions.js": +/*!***************************************************!*\ + !*** ./node_modules/color-convert/conversions.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/* MIT license */ +/* eslint-disable no-mixed-operators */ +const cssKeywords = __webpack_require__(/*! color-name */ "./node_modules/color-name/index.js"); + +// NOTE: conversions should only return primitive values (i.e. arrays, or +// values that give correct `typeof` results). +// do not use box values types (i.e. Number(), String(), etc.) + +const reverseKeywords = {}; +for (const key of Object.keys(cssKeywords)) { + reverseKeywords[cssKeywords[key]] = key; +} + +const convert = { + rgb: {channels: 3, labels: 'rgb'}, + hsl: {channels: 3, labels: 'hsl'}, + hsv: {channels: 3, labels: 'hsv'}, + hwb: {channels: 3, labels: 'hwb'}, + cmyk: {channels: 4, labels: 'cmyk'}, + xyz: {channels: 3, labels: 'xyz'}, + lab: {channels: 3, labels: 'lab'}, + lch: {channels: 3, labels: 'lch'}, + hex: {channels: 1, labels: ['hex']}, + keyword: {channels: 1, labels: ['keyword']}, + ansi16: {channels: 1, labels: ['ansi16']}, + ansi256: {channels: 1, labels: ['ansi256']}, + hcg: {channels: 3, labels: ['h', 'c', 'g']}, + apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, + gray: {channels: 1, labels: ['gray']} +}; + +module.exports = convert; + +// Hide .channels and .labels properties +for (const model of Object.keys(convert)) { + if (!('channels' in convert[model])) { + throw new Error('missing channels property: ' + model); + } + + if (!('labels' in convert[model])) { + throw new Error('missing channel labels property: ' + model); + } + + if (convert[model].labels.length !== convert[model].channels) { + throw new Error('channel and label counts mismatch: ' + model); + } + + const {channels, labels} = convert[model]; + delete convert[model].channels; + delete convert[model].labels; + Object.defineProperty(convert[model], 'channels', {value: channels}); + Object.defineProperty(convert[model], 'labels', {value: labels}); +} + +convert.rgb.hsl = function (rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const min = Math.min(r, g, b); + const max = Math.max(r, g, b); + const delta = max - min; + let h; + let s; + + if (max === min) { + h = 0; + } else if (r === max) { + h = (g - b) / delta; + } else if (g === max) { + h = 2 + (b - r) / delta; + } else if (b === max) { + h = 4 + (r - g) / delta; + } + + h = Math.min(h * 60, 360); + + if (h < 0) { + h += 360; + } + + const l = (min + max) / 2; + + if (max === min) { + s = 0; + } else if (l <= 0.5) { + s = delta / (max + min); + } else { + s = delta / (2 - max - min); + } + + return [h, s * 100, l * 100]; +}; + +convert.rgb.hsv = function (rgb) { + let rdif; + let gdif; + let bdif; + let h; + let s; + + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const v = Math.max(r, g, b); + const diff = v - Math.min(r, g, b); + const diffc = function (c) { + return (v - c) / 6 / diff + 1 / 2; + }; + + if (diff === 0) { + h = 0; + s = 0; + } else { + s = diff / v; + rdif = diffc(r); + gdif = diffc(g); + bdif = diffc(b); + + if (r === v) { + h = bdif - gdif; + } else if (g === v) { + h = (1 / 3) + rdif - bdif; + } else if (b === v) { + h = (2 / 3) + gdif - rdif; + } + + if (h < 0) { + h += 1; + } else if (h > 1) { + h -= 1; + } + } + + return [ + h * 360, + s * 100, + v * 100 + ]; +}; + +convert.rgb.hwb = function (rgb) { + const r = rgb[0]; + const g = rgb[1]; + let b = rgb[2]; + const h = convert.rgb.hsl(rgb)[0]; + const w = 1 / 255 * Math.min(r, Math.min(g, b)); + + b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); + + return [h, w * 100, b * 100]; +}; + +convert.rgb.cmyk = function (rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + + const k = Math.min(1 - r, 1 - g, 1 - b); + const c = (1 - r - k) / (1 - k) || 0; + const m = (1 - g - k) / (1 - k) || 0; + const y = (1 - b - k) / (1 - k) || 0; + + return [c * 100, m * 100, y * 100, k * 100]; +}; + +function comparativeDistance(x, y) { + /* + See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance + */ + return ( + ((x[0] - y[0]) ** 2) + + ((x[1] - y[1]) ** 2) + + ((x[2] - y[2]) ** 2) + ); +} + +convert.rgb.keyword = function (rgb) { + const reversed = reverseKeywords[rgb]; + if (reversed) { + return reversed; + } + + let currentClosestDistance = Infinity; + let currentClosestKeyword; + + for (const keyword of Object.keys(cssKeywords)) { + const value = cssKeywords[keyword]; + + // Compute comparative distance + const distance = comparativeDistance(rgb, value); + + // Check if its less, if so set as closest + if (distance < currentClosestDistance) { + currentClosestDistance = distance; + currentClosestKeyword = keyword; + } + } + + return currentClosestKeyword; +}; + +convert.keyword.rgb = function (keyword) { + return cssKeywords[keyword]; +}; + +convert.rgb.xyz = function (rgb) { + let r = rgb[0] / 255; + let g = rgb[1] / 255; + let b = rgb[2] / 255; + + // Assume sRGB + r = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92); + g = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92); + b = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92); + + const x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); + const y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); + const z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); + + return [x * 100, y * 100, z * 100]; +}; + +convert.rgb.lab = function (rgb) { + const xyz = convert.rgb.xyz(rgb); + let x = xyz[0]; + let y = xyz[1]; + let z = xyz[2]; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); + + const l = (116 * y) - 16; + const a = 500 * (x - y); + const b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.hsl.rgb = function (hsl) { + const h = hsl[0] / 360; + const s = hsl[1] / 100; + const l = hsl[2] / 100; + let t2; + let t3; + let val; + + if (s === 0) { + val = l * 255; + return [val, val, val]; + } + + if (l < 0.5) { + t2 = l * (1 + s); + } else { + t2 = l + s - l * s; + } + + const t1 = 2 * l - t2; + + const rgb = [0, 0, 0]; + for (let i = 0; i < 3; i++) { + t3 = h + 1 / 3 * -(i - 1); + if (t3 < 0) { + t3++; + } + + if (t3 > 1) { + t3--; + } + + if (6 * t3 < 1) { + val = t1 + (t2 - t1) * 6 * t3; + } else if (2 * t3 < 1) { + val = t2; + } else if (3 * t3 < 2) { + val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; + } else { + val = t1; + } + + rgb[i] = val * 255; + } + + return rgb; +}; + +convert.hsl.hsv = function (hsl) { + const h = hsl[0]; + let s = hsl[1] / 100; + let l = hsl[2] / 100; + let smin = s; + const lmin = Math.max(l, 0.01); + + l *= 2; + s *= (l <= 1) ? l : 2 - l; + smin *= lmin <= 1 ? lmin : 2 - lmin; + const v = (l + s) / 2; + const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); + + return [h, sv * 100, v * 100]; +}; + +convert.hsv.rgb = function (hsv) { + const h = hsv[0] / 60; + const s = hsv[1] / 100; + let v = hsv[2] / 100; + const hi = Math.floor(h) % 6; + + const f = h - Math.floor(h); + const p = 255 * v * (1 - s); + const q = 255 * v * (1 - (s * f)); + const t = 255 * v * (1 - (s * (1 - f))); + v *= 255; + + switch (hi) { + case 0: + return [v, t, p]; + case 1: + return [q, v, p]; + case 2: + return [p, v, t]; + case 3: + return [p, q, v]; + case 4: + return [t, p, v]; + case 5: + return [v, p, q]; + } +}; + +convert.hsv.hsl = function (hsv) { + const h = hsv[0]; + const s = hsv[1] / 100; + const v = hsv[2] / 100; + const vmin = Math.max(v, 0.01); + let sl; + let l; + + l = (2 - s) * v; + const lmin = (2 - s) * vmin; + sl = s * vmin; + sl /= (lmin <= 1) ? lmin : 2 - lmin; + sl = sl || 0; + l /= 2; + + return [h, sl * 100, l * 100]; +}; + +// http://dev.w3.org/csswg/css-color/#hwb-to-rgb +convert.hwb.rgb = function (hwb) { + const h = hwb[0] / 360; + let wh = hwb[1] / 100; + let bl = hwb[2] / 100; + const ratio = wh + bl; + let f; + + // Wh + bl cant be > 1 + if (ratio > 1) { + wh /= ratio; + bl /= ratio; + } + + const i = Math.floor(6 * h); + const v = 1 - bl; + f = 6 * h - i; + + if ((i & 0x01) !== 0) { + f = 1 - f; + } + + const n = wh + f * (v - wh); // Linear interpolation + + let r; + let g; + let b; + /* eslint-disable max-statements-per-line,no-multi-spaces */ + switch (i) { + default: + case 6: + case 0: r = v; g = n; b = wh; break; + case 1: r = n; g = v; b = wh; break; + case 2: r = wh; g = v; b = n; break; + case 3: r = wh; g = n; b = v; break; + case 4: r = n; g = wh; b = v; break; + case 5: r = v; g = wh; b = n; break; + } + /* eslint-enable max-statements-per-line,no-multi-spaces */ + + return [r * 255, g * 255, b * 255]; +}; + +convert.cmyk.rgb = function (cmyk) { + const c = cmyk[0] / 100; + const m = cmyk[1] / 100; + const y = cmyk[2] / 100; + const k = cmyk[3] / 100; + + const r = 1 - Math.min(1, c * (1 - k) + k); + const g = 1 - Math.min(1, m * (1 - k) + k); + const b = 1 - Math.min(1, y * (1 - k) + k); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.rgb = function (xyz) { + const x = xyz[0] / 100; + const y = xyz[1] / 100; + const z = xyz[2] / 100; + let r; + let g; + let b; + + r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); + g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); + b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); + + // Assume sRGB + r = r > 0.0031308 + ? ((1.055 * (r ** (1.0 / 2.4))) - 0.055) + : r * 12.92; + + g = g > 0.0031308 + ? ((1.055 * (g ** (1.0 / 2.4))) - 0.055) + : g * 12.92; + + b = b > 0.0031308 + ? ((1.055 * (b ** (1.0 / 2.4))) - 0.055) + : b * 12.92; + + r = Math.min(Math.max(0, r), 1); + g = Math.min(Math.max(0, g), 1); + b = Math.min(Math.max(0, b), 1); + + return [r * 255, g * 255, b * 255]; +}; + +convert.xyz.lab = function (xyz) { + let x = xyz[0]; + let y = xyz[1]; + let z = xyz[2]; + + x /= 95.047; + y /= 100; + z /= 108.883; + + x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116); + y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116); + z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116); + + const l = (116 * y) - 16; + const a = 500 * (x - y); + const b = 200 * (y - z); + + return [l, a, b]; +}; + +convert.lab.xyz = function (lab) { + const l = lab[0]; + const a = lab[1]; + const b = lab[2]; + let x; + let y; + let z; + + y = (l + 16) / 116; + x = a / 500 + y; + z = y - b / 200; + + const y2 = y ** 3; + const x2 = x ** 3; + const z2 = z ** 3; + y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; + x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; + z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; + + x *= 95.047; + y *= 100; + z *= 108.883; + + return [x, y, z]; +}; + +convert.lab.lch = function (lab) { + const l = lab[0]; + const a = lab[1]; + const b = lab[2]; + let h; + + const hr = Math.atan2(b, a); + h = hr * 360 / 2 / Math.PI; + + if (h < 0) { + h += 360; + } + + const c = Math.sqrt(a * a + b * b); + + return [l, c, h]; +}; + +convert.lch.lab = function (lch) { + const l = lch[0]; + const c = lch[1]; + const h = lch[2]; + + const hr = h / 360 * 2 * Math.PI; + const a = c * Math.cos(hr); + const b = c * Math.sin(hr); + + return [l, a, b]; +}; + +convert.rgb.ansi16 = function (args, saturation = null) { + const [r, g, b] = args; + let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization + + value = Math.round(value / 50); + + if (value === 0) { + return 30; + } + + let ansi = 30 + + ((Math.round(b / 255) << 2) + | (Math.round(g / 255) << 1) + | Math.round(r / 255)); + + if (value === 2) { + ansi += 60; + } + + return ansi; +}; + +convert.hsv.ansi16 = function (args) { + // Optimization here; we already know the value and don't need to get + // it converted for us. + return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); +}; + +convert.rgb.ansi256 = function (args) { + const r = args[0]; + const g = args[1]; + const b = args[2]; + + // We use the extended greyscale palette here, with the exception of + // black and white. normal palette only has 4 greyscale shades. + if (r === g && g === b) { + if (r < 8) { + return 16; + } + + if (r > 248) { + return 231; + } + + return Math.round(((r - 8) / 247) * 24) + 232; + } + + const ansi = 16 + + (36 * Math.round(r / 255 * 5)) + + (6 * Math.round(g / 255 * 5)) + + Math.round(b / 255 * 5); + + return ansi; +}; + +convert.ansi16.rgb = function (args) { + let color = args % 10; + + // Handle greyscale + if (color === 0 || color === 7) { + if (args > 50) { + color += 3.5; + } + + color = color / 10.5 * 255; + + return [color, color, color]; + } + + const mult = (~~(args > 50) + 1) * 0.5; + const r = ((color & 1) * mult) * 255; + const g = (((color >> 1) & 1) * mult) * 255; + const b = (((color >> 2) & 1) * mult) * 255; + + return [r, g, b]; +}; + +convert.ansi256.rgb = function (args) { + // Handle greyscale + if (args >= 232) { + const c = (args - 232) * 10 + 8; + return [c, c, c]; + } + + args -= 16; + + let rem; + const r = Math.floor(args / 36) / 5 * 255; + const g = Math.floor((rem = args % 36) / 6) / 5 * 255; + const b = (rem % 6) / 5 * 255; + + return [r, g, b]; +}; + +convert.rgb.hex = function (args) { + const integer = ((Math.round(args[0]) & 0xFF) << 16) + + ((Math.round(args[1]) & 0xFF) << 8) + + (Math.round(args[2]) & 0xFF); + + const string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.hex.rgb = function (args) { + const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); + if (!match) { + return [0, 0, 0]; + } + + let colorString = match[0]; + + if (match[0].length === 3) { + colorString = colorString.split('').map(char => { + return char + char; + }).join(''); + } + + const integer = parseInt(colorString, 16); + const r = (integer >> 16) & 0xFF; + const g = (integer >> 8) & 0xFF; + const b = integer & 0xFF; + + return [r, g, b]; +}; + +convert.rgb.hcg = function (rgb) { + const r = rgb[0] / 255; + const g = rgb[1] / 255; + const b = rgb[2] / 255; + const max = Math.max(Math.max(r, g), b); + const min = Math.min(Math.min(r, g), b); + const chroma = (max - min); + let grayscale; + let hue; + + if (chroma < 1) { + grayscale = min / (1 - chroma); + } else { + grayscale = 0; + } + + if (chroma <= 0) { + hue = 0; + } else + if (max === r) { + hue = ((g - b) / chroma) % 6; + } else + if (max === g) { + hue = 2 + (b - r) / chroma; + } else { + hue = 4 + (r - g) / chroma; + } + + hue /= 6; + hue %= 1; + + return [hue * 360, chroma * 100, grayscale * 100]; +}; + +convert.hsl.hcg = function (hsl) { + const s = hsl[1] / 100; + const l = hsl[2] / 100; + + const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l)); + + let f = 0; + if (c < 1.0) { + f = (l - 0.5 * c) / (1.0 - c); + } + + return [hsl[0], c * 100, f * 100]; +}; + +convert.hsv.hcg = function (hsv) { + const s = hsv[1] / 100; + const v = hsv[2] / 100; + + const c = s * v; + let f = 0; + + if (c < 1.0) { + f = (v - c) / (1 - c); + } + + return [hsv[0], c * 100, f * 100]; +}; + +convert.hcg.rgb = function (hcg) { + const h = hcg[0] / 360; + const c = hcg[1] / 100; + const g = hcg[2] / 100; + + if (c === 0.0) { + return [g * 255, g * 255, g * 255]; + } + + const pure = [0, 0, 0]; + const hi = (h % 1) * 6; + const v = hi % 1; + const w = 1 - v; + let mg = 0; + + /* eslint-disable max-statements-per-line */ + switch (Math.floor(hi)) { + case 0: + pure[0] = 1; pure[1] = v; pure[2] = 0; break; + case 1: + pure[0] = w; pure[1] = 1; pure[2] = 0; break; + case 2: + pure[0] = 0; pure[1] = 1; pure[2] = v; break; + case 3: + pure[0] = 0; pure[1] = w; pure[2] = 1; break; + case 4: + pure[0] = v; pure[1] = 0; pure[2] = 1; break; + default: + pure[0] = 1; pure[1] = 0; pure[2] = w; + } + /* eslint-enable max-statements-per-line */ + + mg = (1.0 - c) * g; + + return [ + (c * pure[0] + mg) * 255, + (c * pure[1] + mg) * 255, + (c * pure[2] + mg) * 255 + ]; +}; + +convert.hcg.hsv = function (hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + + const v = c + g * (1.0 - c); + let f = 0; + + if (v > 0.0) { + f = c / v; + } + + return [hcg[0], f * 100, v * 100]; +}; + +convert.hcg.hsl = function (hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + + const l = g * (1.0 - c) + 0.5 * c; + let s = 0; + + if (l > 0.0 && l < 0.5) { + s = c / (2 * l); + } else + if (l >= 0.5 && l < 1.0) { + s = c / (2 * (1 - l)); + } + + return [hcg[0], s * 100, l * 100]; +}; + +convert.hcg.hwb = function (hcg) { + const c = hcg[1] / 100; + const g = hcg[2] / 100; + const v = c + g * (1.0 - c); + return [hcg[0], (v - c) * 100, (1 - v) * 100]; +}; + +convert.hwb.hcg = function (hwb) { + const w = hwb[1] / 100; + const b = hwb[2] / 100; + const v = 1 - b; + const c = v - w; + let g = 0; + + if (c < 1) { + g = (v - c) / (1 - c); + } + + return [hwb[0], c * 100, g * 100]; +}; + +convert.apple.rgb = function (apple) { + return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; +}; + +convert.rgb.apple = function (rgb) { + return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; +}; + +convert.gray.rgb = function (args) { + return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; +}; + +convert.gray.hsl = function (args) { + return [0, 0, args[0]]; +}; + +convert.gray.hsv = convert.gray.hsl; + +convert.gray.hwb = function (gray) { + return [0, 100, gray[0]]; +}; + +convert.gray.cmyk = function (gray) { + return [0, 0, 0, gray[0]]; +}; + +convert.gray.lab = function (gray) { + return [gray[0], 0, 0]; +}; + +convert.gray.hex = function (gray) { + const val = Math.round(gray[0] / 100 * 255) & 0xFF; + const integer = (val << 16) + (val << 8) + val; + + const string = integer.toString(16).toUpperCase(); + return '000000'.substring(string.length) + string; +}; + +convert.rgb.gray = function (rgb) { + const val = (rgb[0] + rgb[1] + rgb[2]) / 3; + return [val / 255 * 100]; +}; + + +/***/ }), + +/***/ "./node_modules/color-convert/index.js": +/*!*********************************************!*\ + !*** ./node_modules/color-convert/index.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const conversions = __webpack_require__(/*! ./conversions */ "./node_modules/color-convert/conversions.js"); +const route = __webpack_require__(/*! ./route */ "./node_modules/color-convert/route.js"); + +const convert = {}; + +const models = Object.keys(conversions); + +function wrapRaw(fn) { + const wrappedFn = function (...args) { + const arg0 = args[0]; + if (arg0 === undefined || arg0 === null) { + return arg0; + } + + if (arg0.length > 1) { + args = arg0; + } + + return fn(args); + }; + + // Preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +function wrapRounded(fn) { + const wrappedFn = function (...args) { + const arg0 = args[0]; + + if (arg0 === undefined || arg0 === null) { + return arg0; + } + + if (arg0.length > 1) { + args = arg0; + } + + const result = fn(args); + + // We're assuming the result is an array here. + // see notice in conversions.js; don't use box types + // in conversion functions. + if (typeof result === 'object') { + for (let len = result.length, i = 0; i < len; i++) { + result[i] = Math.round(result[i]); + } + } + + return result; + }; + + // Preserve .conversion property if there is one + if ('conversion' in fn) { + wrappedFn.conversion = fn.conversion; + } + + return wrappedFn; +} + +models.forEach(fromModel => { + convert[fromModel] = {}; + + Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); + Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); + + const routes = route(fromModel); + const routeModels = Object.keys(routes); + + routeModels.forEach(toModel => { + const fn = routes[toModel]; + + convert[fromModel][toModel] = wrapRounded(fn); + convert[fromModel][toModel].raw = wrapRaw(fn); + }); +}); + +module.exports = convert; + + +/***/ }), + +/***/ "./node_modules/color-convert/route.js": +/*!*********************************************!*\ + !*** ./node_modules/color-convert/route.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const conversions = __webpack_require__(/*! ./conversions */ "./node_modules/color-convert/conversions.js"); + +/* + This function routes a model to all other models. + + all functions that are routed have a property `.conversion` attached + to the returned synthetic function. This property is an array + of strings, each with the steps in between the 'from' and 'to' + color models (inclusive). + + conversions that are not possible simply are not included. +*/ + +function buildGraph() { + const graph = {}; + // https://jsperf.com/object-keys-vs-for-in-with-closure/3 + const models = Object.keys(conversions); + + for (let len = models.length, i = 0; i < len; i++) { + graph[models[i]] = { + // http://jsperf.com/1-vs-infinity + // micro-opt, but this is simple. + distance: -1, + parent: null + }; + } + + return graph; +} + +// https://en.wikipedia.org/wiki/Breadth-first_search +function deriveBFS(fromModel) { + const graph = buildGraph(); + const queue = [fromModel]; // Unshift -> queue -> pop + + graph[fromModel].distance = 0; + + while (queue.length) { + const current = queue.pop(); + const adjacents = Object.keys(conversions[current]); + + for (let len = adjacents.length, i = 0; i < len; i++) { + const adjacent = adjacents[i]; + const node = graph[adjacent]; + + if (node.distance === -1) { + node.distance = graph[current].distance + 1; + node.parent = current; + queue.unshift(adjacent); + } + } + } + + return graph; +} + +function link(from, to) { + return function (args) { + return to(from(args)); + }; +} + +function wrapConversion(toModel, graph) { + const path = [graph[toModel].parent, toModel]; + let fn = conversions[graph[toModel].parent][toModel]; + + let cur = graph[toModel].parent; + while (graph[cur].parent) { + path.unshift(graph[cur].parent); + fn = link(conversions[graph[cur].parent][cur], fn); + cur = graph[cur].parent; + } + + fn.conversion = path; + return fn; +} + +module.exports = function (fromModel) { + const graph = deriveBFS(fromModel); + const conversion = {}; + + const models = Object.keys(graph); + for (let len = models.length, i = 0; i < len; i++) { + const toModel = models[i]; + const node = graph[toModel]; + + if (node.parent === null) { + // No possible conversion, or this node is the source model. + continue; + } + + conversion[toModel] = wrapConversion(toModel, graph); + } + + return conversion; +}; + + + +/***/ }), + +/***/ "./node_modules/color-name/index.js": +/*!******************************************!*\ + !*** ./node_modules/color-name/index.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = { + "aliceblue": [240, 248, 255], + "antiquewhite": [250, 235, 215], + "aqua": [0, 255, 255], + "aquamarine": [127, 255, 212], + "azure": [240, 255, 255], + "beige": [245, 245, 220], + "bisque": [255, 228, 196], + "black": [0, 0, 0], + "blanchedalmond": [255, 235, 205], + "blue": [0, 0, 255], + "blueviolet": [138, 43, 226], + "brown": [165, 42, 42], + "burlywood": [222, 184, 135], + "cadetblue": [95, 158, 160], + "chartreuse": [127, 255, 0], + "chocolate": [210, 105, 30], + "coral": [255, 127, 80], + "cornflowerblue": [100, 149, 237], + "cornsilk": [255, 248, 220], + "crimson": [220, 20, 60], + "cyan": [0, 255, 255], + "darkblue": [0, 0, 139], + "darkcyan": [0, 139, 139], + "darkgoldenrod": [184, 134, 11], + "darkgray": [169, 169, 169], + "darkgreen": [0, 100, 0], + "darkgrey": [169, 169, 169], + "darkkhaki": [189, 183, 107], + "darkmagenta": [139, 0, 139], + "darkolivegreen": [85, 107, 47], + "darkorange": [255, 140, 0], + "darkorchid": [153, 50, 204], + "darkred": [139, 0, 0], + "darksalmon": [233, 150, 122], + "darkseagreen": [143, 188, 143], + "darkslateblue": [72, 61, 139], + "darkslategray": [47, 79, 79], + "darkslategrey": [47, 79, 79], + "darkturquoise": [0, 206, 209], + "darkviolet": [148, 0, 211], + "deeppink": [255, 20, 147], + "deepskyblue": [0, 191, 255], + "dimgray": [105, 105, 105], + "dimgrey": [105, 105, 105], + "dodgerblue": [30, 144, 255], + "firebrick": [178, 34, 34], + "floralwhite": [255, 250, 240], + "forestgreen": [34, 139, 34], + "fuchsia": [255, 0, 255], + "gainsboro": [220, 220, 220], + "ghostwhite": [248, 248, 255], + "gold": [255, 215, 0], + "goldenrod": [218, 165, 32], + "gray": [128, 128, 128], + "green": [0, 128, 0], + "greenyellow": [173, 255, 47], + "grey": [128, 128, 128], + "honeydew": [240, 255, 240], + "hotpink": [255, 105, 180], + "indianred": [205, 92, 92], + "indigo": [75, 0, 130], + "ivory": [255, 255, 240], + "khaki": [240, 230, 140], + "lavender": [230, 230, 250], + "lavenderblush": [255, 240, 245], + "lawngreen": [124, 252, 0], + "lemonchiffon": [255, 250, 205], + "lightblue": [173, 216, 230], + "lightcoral": [240, 128, 128], + "lightcyan": [224, 255, 255], + "lightgoldenrodyellow": [250, 250, 210], + "lightgray": [211, 211, 211], + "lightgreen": [144, 238, 144], + "lightgrey": [211, 211, 211], + "lightpink": [255, 182, 193], + "lightsalmon": [255, 160, 122], + "lightseagreen": [32, 178, 170], + "lightskyblue": [135, 206, 250], + "lightslategray": [119, 136, 153], + "lightslategrey": [119, 136, 153], + "lightsteelblue": [176, 196, 222], + "lightyellow": [255, 255, 224], + "lime": [0, 255, 0], + "limegreen": [50, 205, 50], + "linen": [250, 240, 230], + "magenta": [255, 0, 255], + "maroon": [128, 0, 0], + "mediumaquamarine": [102, 205, 170], + "mediumblue": [0, 0, 205], + "mediumorchid": [186, 85, 211], + "mediumpurple": [147, 112, 219], + "mediumseagreen": [60, 179, 113], + "mediumslateblue": [123, 104, 238], + "mediumspringgreen": [0, 250, 154], + "mediumturquoise": [72, 209, 204], + "mediumvioletred": [199, 21, 133], + "midnightblue": [25, 25, 112], + "mintcream": [245, 255, 250], + "mistyrose": [255, 228, 225], + "moccasin": [255, 228, 181], + "navajowhite": [255, 222, 173], + "navy": [0, 0, 128], + "oldlace": [253, 245, 230], + "olive": [128, 128, 0], + "olivedrab": [107, 142, 35], + "orange": [255, 165, 0], + "orangered": [255, 69, 0], + "orchid": [218, 112, 214], + "palegoldenrod": [238, 232, 170], + "palegreen": [152, 251, 152], + "paleturquoise": [175, 238, 238], + "palevioletred": [219, 112, 147], + "papayawhip": [255, 239, 213], + "peachpuff": [255, 218, 185], + "peru": [205, 133, 63], + "pink": [255, 192, 203], + "plum": [221, 160, 221], + "powderblue": [176, 224, 230], + "purple": [128, 0, 128], + "rebeccapurple": [102, 51, 153], + "red": [255, 0, 0], + "rosybrown": [188, 143, 143], + "royalblue": [65, 105, 225], + "saddlebrown": [139, 69, 19], + "salmon": [250, 128, 114], + "sandybrown": [244, 164, 96], + "seagreen": [46, 139, 87], + "seashell": [255, 245, 238], + "sienna": [160, 82, 45], + "silver": [192, 192, 192], + "skyblue": [135, 206, 235], + "slateblue": [106, 90, 205], + "slategray": [112, 128, 144], + "slategrey": [112, 128, 144], + "snow": [255, 250, 250], + "springgreen": [0, 255, 127], + "steelblue": [70, 130, 180], + "tan": [210, 180, 140], + "teal": [0, 128, 128], + "thistle": [216, 191, 216], + "tomato": [255, 99, 71], + "turquoise": [64, 224, 208], + "violet": [238, 130, 238], + "wheat": [245, 222, 179], + "white": [255, 255, 255], + "whitesmoke": [245, 245, 245], + "yellow": [255, 255, 0], + "yellowgreen": [154, 205, 50] +}; + + +/***/ }), + +/***/ "./node_modules/concat-map/index.js": +/*!******************************************!*\ + !*** ./node_modules/concat-map/index.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = function (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + + +/***/ }), + +/***/ "./node_modules/conf/index.js": +/*!************************************!*\ + !*** ./node_modules/conf/index.js ***! + \************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(module) {/* eslint-disable node/no-deprecated-api */ + +const fs = __webpack_require__(/*! fs */ "fs"); +const path = __webpack_require__(/*! path */ "path"); +const crypto = __webpack_require__(/*! crypto */ "crypto"); +const assert = __webpack_require__(/*! assert */ "assert"); +const EventEmitter = __webpack_require__(/*! events */ "events"); +const dotProp = __webpack_require__(/*! dot-prop */ "./node_modules/dot-prop/index.js"); +const makeDir = __webpack_require__(/*! make-dir */ "./node_modules/make-dir/index.js"); +const pkgUp = __webpack_require__(/*! pkg-up */ "./node_modules/pkg-up/index.js"); +const envPaths = __webpack_require__(/*! env-paths */ "./node_modules/env-paths/index.js"); +const writeFileAtomic = __webpack_require__(/*! write-file-atomic */ "./node_modules/write-file-atomic/index.js"); +const Ajv = __webpack_require__(/*! ajv */ "./node_modules/ajv/lib/ajv.js"); +const debounceFn = __webpack_require__(/*! debounce-fn */ "./node_modules/debounce-fn/index.js"); +const semver = __webpack_require__(/*! semver */ "./node_modules/semver/semver.js"); +const onetime = __webpack_require__(/*! onetime */ "./node_modules/onetime/index.js"); + +const plainObject = () => Object.create(null); +const encryptionAlgorithm = 'aes-256-cbc'; + +// Prevent caching of this module so module.parent is always accurate +delete __webpack_require__.c[__filename]; +const parentDir = path.dirname((module.parent && module.parent.filename) || '.'); + +const checkValueType = (key, value) => { + const nonJsonTypes = [ + 'undefined', + 'symbol', + 'function' + ]; + + const type = typeof value; + + if (nonJsonTypes.includes(type)) { + throw new TypeError(`Setting a value of type \`${type}\` for key \`${key}\` is not allowed as it's not supported by JSON`); + } +}; + +const INTERNAL_KEY = '__internal__'; +const MIGRATION_KEY = `${INTERNAL_KEY}.migrations.version`; + +class Conf { + constructor(options) { + options = { + configName: 'config', + fileExtension: 'json', + projectSuffix: 'nodejs', + clearInvalidConfig: true, + serialize: value => JSON.stringify(value, null, '\t'), + deserialize: JSON.parse, + accessPropertiesByDotNotation: true, + ...options + }; + + const getPackageData = onetime(() => { + const packagePath = pkgUp.sync({cwd: parentDir}); + // Can't use `require` because of Webpack being annoying: + // https://github.com/webpack/webpack/issues/196 + const packageData = packagePath && JSON.parse(fs.readFileSync(packagePath, 'utf8')); + + return packageData || {}; + }); + + if (!options.cwd) { + if (!options.projectName) { + options.projectName = getPackageData().name; + } + + if (!options.projectName) { + throw new Error('Project name could not be inferred. Please specify the `projectName` option.'); + } + + options.cwd = envPaths(options.projectName, {suffix: options.projectSuffix}).config; + } + + this._options = options; + this._defaultValues = {}; + + if (options.schema) { + if (typeof options.schema !== 'object') { + throw new TypeError('The `schema` option must be an object.'); + } + + const ajv = new Ajv({ + allErrors: true, + format: 'full', + useDefaults: true, + errorDataPath: 'property' + }); + const schema = { + type: 'object', + properties: options.schema + }; + + this._validator = ajv.compile(schema); + + for (const [key, value] of Object.entries(options.schema)) { + if (value && value.default) { + this._defaultValues[key] = value.default; + } + } + } + + if (options.defaults) { + this._defaultValues = { + ...this._defaultValues, + ...options.defaults + }; + } + + this.events = new EventEmitter(); + this.encryptionKey = options.encryptionKey; + this.serialize = options.serialize; + this.deserialize = options.deserialize; + + const fileExtension = options.fileExtension ? `.${options.fileExtension}` : ''; + this.path = path.resolve(options.cwd, `${options.configName}${fileExtension}`); + + const fileStore = this.store; + const store = Object.assign(plainObject(), options.defaults, fileStore); + this._validate(store); + try { + assert.deepEqual(fileStore, store); + } catch (_) { + this.store = store; + } + + if (options.watch) { + this._watch(); + } + + if (options.migrations) { + if (!options.projectVersion) { + options.projectVersion = getPackageData().version; + } + + if (!options.projectVersion) { + throw new Error('Project version could not be inferred. Please specify the `projectVersion` option.'); + } + + this._migrate(options.migrations, options.projectVersion); + } + } + + _validate(data) { + if (!this._validator) { + return; + } + + const valid = this._validator(data); + if (!valid) { + const errors = this._validator.errors.reduce((error, {dataPath, message}) => + error + ` \`${dataPath.slice(1)}\` ${message};`, ''); + throw new Error('Config schema violation:' + errors.slice(0, -1)); + } + } + + _ensureDirectory() { + // TODO: Use `fs.mkdirSync` `recursive` option when targeting Node.js 12. + // Ensure the directory exists as it could have been deleted in the meantime. + makeDir.sync(path.dirname(this.path)); + } + + _write(value) { + let data = this.serialize(value); + + if (this.encryptionKey) { + const initializationVector = crypto.randomBytes(16); + const password = crypto.pbkdf2Sync(this.encryptionKey, initializationVector.toString(), 10000, 32, 'sha512'); + const cipher = crypto.createCipheriv(encryptionAlgorithm, password, initializationVector); + data = Buffer.concat([initializationVector, Buffer.from(':'), cipher.update(Buffer.from(data)), cipher.final()]); + } + + // Temporary workaround for Conf being packaged in a Ubuntu Snap app. + // See https://github.com/sindresorhus/conf/pull/82 + if (process.env.SNAP) { + fs.writeFileSync(this.path, data); + } else { + try { + writeFileAtomic.sync(this.path, data); + } catch (error) { + // Fix for https://github.com/sindresorhus/electron-store/issues/106 + // Sometimes on Windows, we will get an EXDEV error when atomic writing + // (even though to the same directory), so we fall back to non atomic write + if (error.code === 'EXDEV') { + fs.writeFileSync(this.path, data); + return; + } + + throw error; + } + } + } + + _watch() { + this._ensureDirectory(); + + if (!fs.existsSync(this.path)) { + this._write({}); + } + + fs.watch(this.path, {persistent: false}, debounceFn(() => { + // On Linux and Windows, writing to the config file emits a `rename` event, so we skip checking the event type. + this.events.emit('change'); + }, {wait: 100})); + } + + _migrate(migrations, versionToMigrate) { + let previousMigratedVersion = this._get(MIGRATION_KEY, '0.0.0'); + + const newerVersions = Object.keys(migrations) + .filter(candidateVersion => this._shouldPerformMigration(candidateVersion, previousMigratedVersion, versionToMigrate)); + + let storeBackup = {...this.store}; + + for (const version of newerVersions) { + try { + const migration = migrations[version]; + migration(this); + + this._set(MIGRATION_KEY, version); + + previousMigratedVersion = version; + storeBackup = {...this.store}; + } catch (error) { + this.store = storeBackup; + + throw new Error( + `Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${error}` + ); + } + } + + if (this._isVersionInRangeFormat(previousMigratedVersion) || !semver.eq(previousMigratedVersion, versionToMigrate)) { + this._set(MIGRATION_KEY, versionToMigrate); + } + } + + _containsReservedKey(key) { + if (typeof key === 'object') { + const firstKey = Object.keys(key)[0]; + + if (firstKey === INTERNAL_KEY) { + return true; + } + } + + if (typeof key !== 'string') { + return false; + } + + if (this._options.accessPropertiesByDotNotation) { + if (key.startsWith(`${INTERNAL_KEY}.`)) { + return true; + } + + return false; + } + + return false; + } + + _isVersionInRangeFormat(version) { + return semver.clean(version) === null; + } + + _shouldPerformMigration(candidateVersion, previousMigratedVersion, versionToMigrate) { + if (this._isVersionInRangeFormat(candidateVersion)) { + if (previousMigratedVersion !== '0.0.0' && semver.satisfies(previousMigratedVersion, candidateVersion)) { + return false; + } + + return semver.satisfies(versionToMigrate, candidateVersion); + } + + if (semver.lte(candidateVersion, previousMigratedVersion)) { + return false; + } + + if (semver.gt(candidateVersion, versionToMigrate)) { + return false; + } + + return true; + } + + _get(key, defaultValue) { + return dotProp.get(this.store, key, defaultValue); + } + + _set(key, value) { + const {store} = this; + dotProp.set(store, key, value); + + this.store = store; + } + + get(key, defaultValue) { + if (this._options.accessPropertiesByDotNotation) { + return dotProp.get(this.store, key, defaultValue); + } + + return key in this.store ? this.store[key] : defaultValue; + } + + set(key, value) { + if (typeof key !== 'string' && typeof key !== 'object') { + throw new TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof key}`); + } + + if (typeof key !== 'object' && value === undefined) { + throw new TypeError('Use `delete()` to clear values'); + } + + if (this._containsReservedKey(key)) { + throw new TypeError(`Please don't use the ${INTERNAL_KEY} key, as it's used to manage this module internal operations.`); + } + + const {store} = this; + + const set = (key, value) => { + checkValueType(key, value); + if (this._options.accessPropertiesByDotNotation) { + dotProp.set(store, key, value); + } else { + store[key] = value; + } + }; + + if (typeof key === 'object') { + const object = key; + for (const [key, value] of Object.entries(object)) { + set(key, value); + } + } else { + set(key, value); + } + + this.store = store; + } + + has(key) { + if (this._options.accessPropertiesByDotNotation) { + return dotProp.has(this.store, key); + } + + return key in this.store; + } + + reset(...keys) { + for (const key of keys) { + if (this._defaultValues[key]) { + this.set(key, this._defaultValues[key]); + } + } + } + + delete(key) { + const {store} = this; + if (this._options.accessPropertiesByDotNotation) { + dotProp.delete(store, key); + } else { + delete store[key]; + } + + this.store = store; + } + + clear() { + this.store = plainObject(); + } + + onDidChange(key, callback) { + if (typeof key !== 'string') { + throw new TypeError(`Expected \`key\` to be of type \`string\`, got ${typeof key}`); + } + + if (typeof callback !== 'function') { + throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof callback}`); + } + + const getter = () => this.get(key); + + return this.handleChange(getter, callback); + } + + onDidAnyChange(callback) { + if (typeof callback !== 'function') { + throw new TypeError(`Expected \`callback\` to be of type \`function\`, got ${typeof callback}`); + } + + const getter = () => this.store; + + return this.handleChange(getter, callback); + } + + handleChange(getter, callback) { + let currentValue = getter(); + + const onChange = () => { + const oldValue = currentValue; + const newValue = getter(); + + try { + // TODO: Use `util.isDeepStrictEqual` when targeting Node.js 10 + assert.deepEqual(newValue, oldValue); + } catch (_) { + currentValue = newValue; + callback.call(this, newValue, oldValue); + } + }; + + this.events.on('change', onChange); + return () => this.events.removeListener('change', onChange); + } + + get size() { + return Object.keys(this.store).length; + } + + get store() { + try { + let data = fs.readFileSync(this.path, this.encryptionKey ? null : 'utf8'); + + if (this.encryptionKey) { + try { + // Check if an initialization vector has been used to encrypt the data + if (data.slice(16, 17).toString() === ':') { + const initializationVector = data.slice(0, 16); + const password = crypto.pbkdf2Sync(this.encryptionKey, initializationVector.toString(), 10000, 32, 'sha512'); + const decipher = crypto.createDecipheriv(encryptionAlgorithm, password, initializationVector); + data = Buffer.concat([decipher.update(data.slice(17)), decipher.final()]); + } else { + const decipher = crypto.createDecipher(encryptionAlgorithm, this.encryptionKey); + data = Buffer.concat([decipher.update(data), decipher.final()]); + } + } catch (_) {} + } + + data = this.deserialize(data); + this._validate(data); + return Object.assign(plainObject(), data); + } catch (error) { + if (error.code === 'ENOENT') { + this._ensureDirectory(); + return plainObject(); + } + + if (this._options.clearInvalidConfig && error.name === 'SyntaxError') { + return plainObject(); + } + + throw error; + } + } + + set store(value) { + this._ensureDirectory(); + + this._validate(value); + this._write(value); + + this.events.emit('change'); + } + + * [Symbol.iterator]() { + for (const [key, value] of Object.entries(this.store)) { + yield [key, value]; + } + } +} + +module.exports = Conf; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module))) + +/***/ }), + +/***/ "./node_modules/debounce-fn/index.js": +/*!*******************************************!*\ + !*** ./node_modules/debounce-fn/index.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const mimicFn = __webpack_require__(/*! mimic-fn */ "./node_modules/mimic-fn/index.js"); + +module.exports = (fn, options = {}) => { + if (typeof fn !== 'function') { + throw new TypeError(`Expected the first argument to be a function, got \`${typeof fn}\``); + } + + let timeout; + let result; + + const debounced = function (...args) { + const context = this; + + const later = () => { + timeout = null; + if (!options.immediate) { + result = fn.apply(context, args); + } + }; + + const callNow = options.immediate && !timeout; + clearTimeout(timeout); + timeout = setTimeout(later, options.wait || 0); + + if (callNow) { + result = fn.apply(context, args); + } + + return result; + }; + + mimicFn(debounced, fn); + + debounced.cancel = () => { + if (timeout) { + clearTimeout(timeout); + timeout = null; + } + }; + + return debounced; +}; + + +/***/ }), + +/***/ "./node_modules/debug/node_modules/ms/index.js": +/*!*****************************************************!*\ + !*** ./node_modules/debug/node_modules/ms/index.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var w = d * 7; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + +module.exports = function(val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'weeks': + case 'week': + case 'w': + return n * w; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + 'd'; + } + if (msAbs >= h) { + return Math.round(ms / h) + 'h'; + } + if (msAbs >= m) { + return Math.round(ms / m) + 'm'; + } + if (msAbs >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, 'day'); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, 'hour'); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, 'minute'); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, 'second'); + } + return ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); +} + + +/***/ }), + +/***/ "./node_modules/debug/src/browser.js": +/*!*******************************************!*\ + !*** ./node_modules/debug/src/browser.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/* eslint-env browser */ + +/** + * This is the web browser implementation of `debug()`. + */ + +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = localstorage(); +exports.destroy = (() => { + let warned = false; + + return () => { + if (!warned) { + warned = true; + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + }; +})(); + +/** + * Colors. + */ + +exports.colors = [ + '#0000CC', + '#0000FF', + '#0033CC', + '#0033FF', + '#0066CC', + '#0066FF', + '#0099CC', + '#0099FF', + '#00CC00', + '#00CC33', + '#00CC66', + '#00CC99', + '#00CCCC', + '#00CCFF', + '#3300CC', + '#3300FF', + '#3333CC', + '#3333FF', + '#3366CC', + '#3366FF', + '#3399CC', + '#3399FF', + '#33CC00', + '#33CC33', + '#33CC66', + '#33CC99', + '#33CCCC', + '#33CCFF', + '#6600CC', + '#6600FF', + '#6633CC', + '#6633FF', + '#66CC00', + '#66CC33', + '#9900CC', + '#9900FF', + '#9933CC', + '#9933FF', + '#99CC00', + '#99CC33', + '#CC0000', + '#CC0033', + '#CC0066', + '#CC0099', + '#CC00CC', + '#CC00FF', + '#CC3300', + '#CC3333', + '#CC3366', + '#CC3399', + '#CC33CC', + '#CC33FF', + '#CC6600', + '#CC6633', + '#CC9900', + '#CC9933', + '#CCCC00', + '#CCCC33', + '#FF0000', + '#FF0033', + '#FF0066', + '#FF0099', + '#FF00CC', + '#FF00FF', + '#FF3300', + '#FF3333', + '#FF3366', + '#FF3399', + '#FF33CC', + '#FF33FF', + '#FF6600', + '#FF6633', + '#FF9900', + '#FF9933', + '#FFCC00', + '#FFCC33' +]; + +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + +// eslint-disable-next-line complexity +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { + return true; + } + + // Internet Explorer and Edge do not support colors. + if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + + // Is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // Is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // Double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); +} + +/** + * Colorize log arguments if enabled. + * + * @api public + */ + +function formatArgs(args) { + args[0] = (this.useColors ? '%c' : '') + + this.namespace + + (this.useColors ? ' %c' : ' ') + + args[0] + + (this.useColors ? '%c ' : ' ') + + '+' + module.exports.humanize(this.diff); + + if (!this.useColors) { + return; + } + + const c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); + + // The final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, match => { + if (match === '%%') { + return; + } + index++; + if (match === '%c') { + // We only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); +} + +/** + * Invokes `console.debug()` when available. + * No-op when `console.debug` is not a "function". + * If `console.debug` is not available, falls back + * to `console.log`. + * + * @api public + */ +exports.log = console.debug || console.log || (() => {}); + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ +function save(namespaces) { + try { + if (namespaces) { + exports.storage.setItem('debug', namespaces); + } else { + exports.storage.removeItem('debug'); + } + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ +function load() { + let r; + try { + r = exports.storage.getItem('debug'); + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; +} + +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + +function localstorage() { + try { + // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context + // The Browser also has localStorage in the global context. + return localStorage; + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } +} + +module.exports = __webpack_require__(/*! ./common */ "./node_modules/debug/src/common.js")(exports); + +const {formatters} = module.exports; + +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +formatters.j = function (v) { + try { + return JSON.stringify(v); + } catch (error) { + return '[UnexpectedJSONParseError]: ' + error.message; + } +}; + + +/***/ }), + +/***/ "./node_modules/debug/src/common.js": +/*!******************************************!*\ + !*** ./node_modules/debug/src/common.js ***! + \******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + */ + +function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = __webpack_require__(/*! ms */ "./node_modules/debug/node_modules/ms/index.js"); + createDebug.destroy = destroy; + + Object.keys(env).forEach(key => { + createDebug[key] = env[key]; + }); + + /** + * The currently active debug mode names, and names to skip. + */ + + createDebug.names = []; + createDebug.skips = []; + + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + createDebug.formatters = {}; + + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + function selectColor(namespace) { + let hash = 0; + + for (let i = 0; i < namespace.length; i++) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; + + function debug(...args) { + // Disabled? + if (!debug.enabled) { + return; + } + + const self = debug; + + // Set `diff` timestamp + const curr = Number(new Date()); + const ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + args[0] = createDebug.coerce(args[0]); + + if (typeof args[0] !== 'string') { + // Anything else let's inspect with %O + args.unshift('%O'); + } + + // Apply any `formatters` transformations + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return '%'; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === 'function') { + const val = args[index]; + match = formatter.call(self, val); + + // Now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // Apply env-specific formatting (colors, etc.) + createDebug.formatArgs.call(self, args); + + const logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.useColors = createDebug.useColors(); + debug.color = createDebug.selectColor(namespace); + debug.extend = extend; + debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. + + Object.defineProperty(debug, 'enabled', { + enumerable: true, + configurable: false, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + + return enabledCache; + }, + set: v => { + enableOverride = v; + } + }); + + // Env-specific initialization logic for debug instances + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } + + return debug; + } + + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.namespaces = namespaces; + + createDebug.names = []; + createDebug.skips = []; + + let i; + const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + const len = split.length; + + for (i = 0; i < len; i++) { + if (!split[i]) { + // ignore empty strings + continue; + } + + namespaces = split[i].replace(/\*/g, '.*?'); + + if (namespaces[0] === '-') { + createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); + } else { + createDebug.names.push(new RegExp('^' + namespaces + '$')); + } + } + } + + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + function disable() { + const namespaces = [ + ...createDebug.names.map(toNamespace), + ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) + ].join(','); + createDebug.enable(''); + return namespaces; + } + + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + function enabled(name) { + if (name[name.length - 1] === '*') { + return true; + } + + let i; + let len; + + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } + + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + + return false; + } + + /** + * Convert regexp to namespace + * + * @param {RegExp} regxep + * @return {String} namespace + * @api private + */ + function toNamespace(regexp) { + return regexp.toString() + .substring(2, regexp.toString().length - 2) + .replace(/\.\*\?$/, '*'); + } + + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + + /** + * XXX DO NOT USE. This is a temporary stub function. + * XXX It WILL be removed in the next major release. + */ + function destroy() { + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + + createDebug.enable(createDebug.load()); + + return createDebug; +} + +module.exports = setup; + + +/***/ }), + +/***/ "./node_modules/debug/src/index.js": +/*!*****************************************!*\ + !*** ./node_modules/debug/src/index.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * Detect Electron renderer / nwjs process, which is node, but we should + * treat as a browser. + */ + +if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { + module.exports = __webpack_require__(/*! ./browser.js */ "./node_modules/debug/src/browser.js"); +} else { + module.exports = __webpack_require__(/*! ./node.js */ "./node_modules/debug/src/node.js"); +} + + +/***/ }), + +/***/ "./node_modules/debug/src/node.js": +/*!****************************************!*\ + !*** ./node_modules/debug/src/node.js ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * Module dependencies. + */ + +const tty = __webpack_require__(/*! tty */ "tty"); +const util = __webpack_require__(/*! util */ "util"); + +/** + * This is the Node.js implementation of `debug()`. + */ + +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.destroy = util.deprecate( + () => {}, + 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' +); + +/** + * Colors. + */ + +exports.colors = [6, 2, 3, 4, 5, 1]; + +try { + // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) + // eslint-disable-next-line import/no-extraneous-dependencies + const supportsColor = __webpack_require__(/*! supports-color */ "./node_modules/supports-color/index.js"); + + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } +} catch (error) { + // Swallow - we only care if `supports-color` is available; it doesn't have to be. +} + +/** + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js + */ + +exports.inspectOpts = Object.keys(process.env).filter(key => { + return /^debug_/i.test(key); +}).reduce((obj, key) => { + // Camel-case + const prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); + + // Coerce string value into JS value + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === 'null') { + val = null; + } else { + val = Number(val); + } + + obj[prop] = val; + return obj; +}, {}); + +/** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + +function useColors() { + return 'colors' in exports.inspectOpts ? + Boolean(exports.inspectOpts.colors) : + tty.isatty(process.stderr.fd); +} + +/** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ + +function formatArgs(args) { + const {namespace: name, useColors} = this; + + if (useColors) { + const c = this.color; + const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); + const prefix = ` ${colorCode};1m${name} \u001B[0m`; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); + } else { + args[0] = getDate() + name + ' ' + args[0]; + } +} + +function getDate() { + if (exports.inspectOpts.hideDate) { + return ''; + } + return new Date().toISOString() + ' '; +} + +/** + * Invokes `util.format()` with the specified arguments and writes to stderr. + */ + +function log(...args) { + return process.stderr.write(util.format(...args) + '\n'); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ +function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + return process.env.DEBUG; +} + +/** + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. + */ + +function init(debug) { + debug.inspectOpts = {}; + + const keys = Object.keys(exports.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } +} + +module.exports = __webpack_require__(/*! ./common */ "./node_modules/debug/src/common.js")(exports); + +const {formatters} = module.exports; + +/** + * Map %o to `util.inspect()`, all on a single line. + */ + +formatters.o = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .split('\n') + .map(str => str.trim()) + .join(' '); +}; + +/** + * Map %O to `util.inspect()`, allowing multiple lines if needed. + */ + +formatters.O = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; + + +/***/ }), + +/***/ "./node_modules/dot-prop/index.js": +/*!****************************************!*\ + !*** ./node_modules/dot-prop/index.js ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const isObj = __webpack_require__(/*! is-obj */ "./node_modules/is-obj/index.js"); + +const disallowedKeys = [ + '__proto__', + 'prototype', + 'constructor' +]; + +const isValidPath = pathSegments => !pathSegments.some(segment => disallowedKeys.includes(segment)); + +function getPathSegments(path) { + const pathArray = path.split('.'); + const parts = []; + + for (let i = 0; i < pathArray.length; i++) { + let p = pathArray[i]; + + while (p[p.length - 1] === '\\' && pathArray[i + 1] !== undefined) { + p = p.slice(0, -1) + '.'; + p += pathArray[++i]; + } + + parts.push(p); + } + + if (!isValidPath(parts)) { + return []; + } + + return parts; +} + +module.exports = { + get(object, path, value) { + if (!isObj(object) || typeof path !== 'string') { + return value === undefined ? object : value; + } + + const pathArray = getPathSegments(path); + if (pathArray.length === 0) { + return; + } + + for (let i = 0; i < pathArray.length; i++) { + if (!Object.prototype.propertyIsEnumerable.call(object, pathArray[i])) { + return value; + } + + object = object[pathArray[i]]; + + if (object === undefined || object === null) { + // `object` is either `undefined` or `null` so we want to stop the loop, and + // if this is not the last bit of the path, and + // if it did't return `undefined` + // it would return `null` if `object` is `null` + // but we want `get({foo: null}, 'foo.bar')` to equal `undefined`, or the supplied value, not `null` + if (i !== pathArray.length - 1) { + return value; + } + + break; + } + } + + return object; + }, + + set(object, path, value) { + if (!isObj(object) || typeof path !== 'string') { + return object; + } + + const root = object; + const pathArray = getPathSegments(path); + + for (let i = 0; i < pathArray.length; i++) { + const p = pathArray[i]; + + if (!isObj(object[p])) { + object[p] = {}; + } + + if (i === pathArray.length - 1) { + object[p] = value; + } + + object = object[p]; + } + + return root; + }, + + delete(object, path) { + if (!isObj(object) || typeof path !== 'string') { + return false; + } + + const pathArray = getPathSegments(path); + + for (let i = 0; i < pathArray.length; i++) { + const p = pathArray[i]; + + if (i === pathArray.length - 1) { + delete object[p]; + return true; + } + + object = object[p]; + + if (!isObj(object)) { + return false; + } + } + }, + + has(object, path) { + if (!isObj(object) || typeof path !== 'string') { + return false; + } + + const pathArray = getPathSegments(path); + if (pathArray.length === 0) { + return false; + } + + // eslint-disable-next-line unicorn/no-for-loop + for (let i = 0; i < pathArray.length; i++) { + if (isObj(object)) { + if (!(pathArray[i] in object)) { + return false; + } + + object = object[pathArray[i]]; + } else { + return false; + } + } + + return true; + } +}; + + +/***/ }), + +/***/ "./node_modules/electron-context-menu/index.js": +/*!*****************************************************!*\ + !*** ./node_modules/electron-context-menu/index.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const electron = __webpack_require__(/*! electron */ "electron"); +const cliTruncate = __webpack_require__(/*! cli-truncate */ "./node_modules/cli-truncate/index.js"); +const {download} = __webpack_require__(/*! electron-dl */ "./node_modules/electron-dl/index.js"); +const isDev = __webpack_require__(/*! electron-is-dev */ "./node_modules/electron-is-dev/index.js"); + +const webContents = win => win.webContents || (win.getWebContentsId && electron.remote.webContents.fromId(win.getWebContentsId())); + +const decorateMenuItem = menuItem => { + return (options = {}) => { + if (options.transform && !options.click) { + menuItem.transform = options.transform; + } + + return menuItem; + }; +}; + +const removeUnusedMenuItems = menuTemplate => { + let notDeletedPreviousElement; + + return menuTemplate + .filter(menuItem => menuItem !== undefined && menuItem !== false && menuItem.visible !== false && menuItem.visible !== '') + .filter((menuItem, index, array) => { + const toDelete = menuItem.type === 'separator' && (!notDeletedPreviousElement || index === array.length - 1 || array[index + 1].type === 'separator'); + notDeletedPreviousElement = toDelete ? notDeletedPreviousElement : menuItem; + return !toDelete; + }); +}; + +const create = (win, options) => { + const handleContextMenu = (event, props) => { + if (typeof options.shouldShowMenu === 'function' && options.shouldShowMenu(event, props) === false) { + return; + } + + const {editFlags} = props; + const hasText = props.selectionText.trim().length > 0; + const isLink = Boolean(props.linkURL); + const can = type => editFlags[`can${type}`] && hasText; + + const defaultActions = { + separator: () => ({type: 'separator'}), + learnSpelling: decorateMenuItem({ + id: 'learnSpelling', + label: '&Learn Spelling', + visible: Boolean(props.isEditable && hasText && props.misspelledWord), + click() { + const target = webContents(win); + target.session.addWordToSpellCheckerDictionary(props.misspelledWord); + } + }), + lookUpSelection: decorateMenuItem({ + id: 'lookUpSelection', + label: 'Look Up “{selection}”', + visible: process.platform === 'darwin' && hasText && !isLink, + click() { + if (process.platform === 'darwin') { + webContents(win).showDefinitionForSelection(); + } + } + }), + searchWithGoogle: decorateMenuItem({ + id: 'searchWithGoogle', + label: '&Search with Google', + visible: hasText, + click() { + const url = new URL('https://www.google.com/search'); + url.searchParams.set('q', props.selectionText); + electron.shell.openExternal(url.toString()); + } + }), + cut: decorateMenuItem({ + id: 'cut', + label: 'Cu&t', + enabled: can('Cut'), + visible: props.isEditable, + click(menuItem) { + const target = webContents(win); + + if (!menuItem.transform && target) { + target.cut(); + } else { + props.selectionText = menuItem.transform ? menuItem.transform(props.selectionText) : props.selectionText; + electron.clipboard.writeText(props.selectionText); + } + } + }), + copy: decorateMenuItem({ + id: 'copy', + label: '&Copy', + enabled: can('Copy'), + visible: props.isEditable || hasText, + click(menuItem) { + const target = webContents(win); + + if (!menuItem.transform && target) { + target.copy(); + } else { + props.selectionText = menuItem.transform ? menuItem.transform(props.selectionText) : props.selectionText; + electron.clipboard.writeText(props.selectionText); + } + } + }), + paste: decorateMenuItem({ + id: 'paste', + label: '&Paste', + enabled: editFlags.canPaste, + visible: props.isEditable, + click(menuItem) { + const target = webContents(win); + + if (menuItem.transform) { + let clipboardContent = electron.clipboard.readText(props.selectionText); + clipboardContent = menuItem.transform ? menuItem.transform(clipboardContent) : clipboardContent; + target.insertText(clipboardContent); + } else { + target.paste(); + } + } + }), + saveImage: decorateMenuItem({ + id: 'saveImage', + label: 'Save I&mage', + visible: props.mediaType === 'image', + click(menuItem) { + props.srcURL = menuItem.transform ? menuItem.transform(props.srcURL) : props.srcURL; + download(win, props.srcURL); + } + }), + saveImageAs: decorateMenuItem({ + id: 'saveImageAs', + label: 'Sa&ve Image As…', + visible: props.mediaType === 'image', + click(menuItem) { + props.srcURL = menuItem.transform ? menuItem.transform(props.srcURL) : props.srcURL; + download(win, props.srcURL, {saveAs: true}); + } + }), + copyLink: decorateMenuItem({ + id: 'copyLink', + label: 'Copy Lin&k', + visible: props.linkURL.length > 0 && props.mediaType === 'none', + click(menuItem) { + props.linkURL = menuItem.transform ? menuItem.transform(props.linkURL) : props.linkURL; + + electron.clipboard.write({ + bookmark: props.linkText, + text: props.linkURL + }); + } + }), + saveLinkAs: decorateMenuItem({ + id: 'saveLinkAs', + label: 'Save Link As…', + visible: props.linkURL.length > 0 && props.mediaType === 'none', + click(menuItem) { + props.linkURL = menuItem.transform ? menuItem.transform(props.linkURL) : props.linkURL; + download(win, props.linkURL, {saveAs: true}); + } + }), + copyImage: decorateMenuItem({ + id: 'copyImage', + label: 'Cop&y Image', + visible: props.mediaType === 'image', + click() { + webContents(win).copyImageAt(props.x, props.y); + } + }), + copyImageAddress: decorateMenuItem({ + id: 'copyImageAddress', + label: 'C&opy Image Address', + visible: props.mediaType === 'image', + click(menuItem) { + props.srcURL = menuItem.transform ? menuItem.transform(props.srcURL) : props.srcURL; + + electron.clipboard.write({ + bookmark: props.srcURL, + text: props.srcURL + }); + } + }), + inspect: () => ({ + id: 'inspect', + label: 'I&nspect Element', + click() { + win.inspectElement(props.x, props.y); + + if (webContents(win).isDevToolsOpened()) { + webContents(win).devToolsWebContents.focus(); + } + } + }), + services: () => ({ + id: 'services', + label: 'Services', + role: 'services', + visible: process.platform === 'darwin' && (props.isEditable || hasText) + }) + }; + + const shouldShowInspectElement = typeof options.showInspectElement === 'boolean' ? options.showInspectElement : isDev; + + function word(suggestion) { + return { + id: 'dictionarySuggestions', + label: suggestion, + visible: Boolean(props.isEditable && hasText && props.misspelledWord), + click(menuItem) { + const target = webContents(win); + target.replaceMisspelling(menuItem.label); + } + }; + } + + let dictionarySuggestions = []; + if (hasText && props.misspelledWord && props.dictionarySuggestions.length > 0) { + dictionarySuggestions = props.dictionarySuggestions.map(suggestion => word(suggestion)); + } else { + dictionarySuggestions.push( + { + id: 'dictionarySuggestions', + label: 'No Guesses Found', + visible: Boolean(hasText && props.misspelledWord), + enabled: false + } + ); + } + + let menuTemplate = [ + dictionarySuggestions.length > 0 && defaultActions.separator(), + ...dictionarySuggestions, + defaultActions.separator(), + defaultActions.learnSpelling(), + defaultActions.separator(), + options.showLookUpSelection !== false && defaultActions.lookUpSelection(), + defaultActions.separator(), + options.showSearchWithGoogle !== false && defaultActions.searchWithGoogle(), + defaultActions.separator(), + defaultActions.cut(), + defaultActions.copy(), + defaultActions.paste(), + defaultActions.separator(), + options.showSaveImage && defaultActions.saveImage(), + options.showSaveImageAs && defaultActions.saveImageAs(), + options.showCopyImage !== false && defaultActions.copyImage(), + options.showCopyImageAddress && defaultActions.copyImageAddress(), + defaultActions.separator(), + defaultActions.copyLink(), + options.showSaveLinkAs && defaultActions.saveLinkAs(), + defaultActions.separator(), + shouldShowInspectElement && defaultActions.inspect(), + options.showServices && defaultActions.services(), + defaultActions.separator() + ]; + + if (options.menu) { + menuTemplate = options.menu(defaultActions, props, win, dictionarySuggestions); + } + + if (options.prepend) { + const result = options.prepend(defaultActions, props, win); + + if (Array.isArray(result)) { + menuTemplate.unshift(...result); + } + } + + if (options.append) { + const result = options.append(defaultActions, props, win); + + if (Array.isArray(result)) { + menuTemplate.push(...result); + } + } + + // Filter out leading/trailing separators + // TODO: https://github.com/electron/electron/issues/5869 + menuTemplate = removeUnusedMenuItems(menuTemplate); + + for (const menuItem of menuTemplate) { + // Apply custom labels for default menu items + if (options.labels && options.labels[menuItem.id]) { + menuItem.label = options.labels[menuItem.id]; + } + + // Replace placeholders in menu item labels + if (typeof menuItem.label === 'string' && menuItem.label.includes('{selection}')) { + const selectionString = typeof props.selectionText === 'string' ? props.selectionText.trim() : ''; + menuItem.label = menuItem.label.replace('{selection}', cliTruncate(selectionString, 25).replace(/&/g, '&&')); + } + } + + if (menuTemplate.length > 0) { + const menu = (electron.remote ? electron.remote.Menu : electron.Menu).buildFromTemplate(menuTemplate); + + /* + When `electron.remote` is not available, this runs in the browser process. + + We can safely use `win` in this case as it refers to the window the + context-menu should open in. + + When this is being called from a web view, we can't use `win` as this + would refer to the web view which is not allowed to render a popup menu. + */ + menu.popup(electron.remote ? electron.remote.getCurrentWindow() : win); + } + }; + + webContents(win).on('context-menu', handleContextMenu); + + return () => { + if (win.isDestroyed()) { + return; + } + + webContents(win).removeListener('context-menu', handleContextMenu); + }; +}; + +module.exports = (options = {}) => { + let isDisposed = false; + const disposables = []; + + const init = win => { + if (isDisposed) { + return; + } + + const disposeMenu = create(win, options); + + disposables.push(disposeMenu); + const removeDisposable = () => { + const index = disposables.indexOf(disposeMenu); + if (index !== -1) { + disposables.splice(index, 1); + } + }; + + if (typeof win.once !== 'undefined') { // Support for BrowserView + win.once('closed', removeDisposable); + } + + disposables.push(() => { + win.off('closed', removeDisposable); + }); + }; + + const dispose = () => { + for (const dispose of disposables) { + dispose(); + } + + disposables.length = 0; + isDisposed = true; + }; + + if (options.window) { + const win = options.window; + + // When window is a webview that has not yet finished loading webContents is not available + if (webContents(win) === undefined) { + const onDomReady = () => { + init(win); + }; + + const listenerFunction = win.addEventListener || win.addListener; + listenerFunction('dom-ready', onDomReady, {once: true}); + + disposables.push(() => { + win.removeEventListener('dom-ready', onDomReady, {once: true}); + }); + + return dispose; + } + + init(win); + + return dispose; + } + + for (const win of (electron.BrowserWindow || electron.remote.BrowserWindow).getAllWindows()) { + init(win); + } + + const app = electron.app || electron.remote.app; + + const onWindowCreated = (event, win) => { + init(win); + }; + + app.on('browser-window-created', onWindowCreated); + disposables.push(() => { + app.removeListener('browser-window-created', onWindowCreated); + }); + + return dispose; +}; + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/dist/downloadChromeExtension.js": +/*!**********************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/dist/downloadChromeExtension.js ***! + \**********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +const fs = __webpack_require__(/*! fs */ "fs"); +const path = __webpack_require__(/*! path */ "path"); +const rimraf = __webpack_require__(/*! rimraf */ "./node_modules/rimraf/rimraf.js"); +const utils_1 = __webpack_require__(/*! ./utils */ "./node_modules/electron-devtools-installer/dist/utils.js"); +const unzip = __webpack_require__(/*! unzip-crx-3 */ "./node_modules/unzip-crx-3/dist/index.js"); +const downloadChromeExtension = (chromeStoreID, forceDownload, attempts = 5) => { + const extensionsStore = utils_1.getPath(); + if (!fs.existsSync(extensionsStore)) { + fs.mkdirSync(extensionsStore, { recursive: true }); + } + const extensionFolder = path.resolve(`${extensionsStore}/${chromeStoreID}`); + return new Promise((resolve, reject) => { + if (!fs.existsSync(extensionFolder) || forceDownload) { + if (fs.existsSync(extensionFolder)) { + rimraf.sync(extensionFolder); + } + const fileURL = `https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&x=id%3D${chromeStoreID}%26uc&prodversion=32`; // eslint-disable-line + const filePath = path.resolve(`${extensionFolder}.crx`); + utils_1.downloadFile(fileURL, filePath) + .then(() => { + unzip(filePath, extensionFolder) + .then(() => { + utils_1.changePermissions(extensionFolder, 755); + resolve(extensionFolder); + }) + .catch((err) => { + if (!fs.existsSync(path.resolve(extensionFolder, 'manifest.json'))) { + return reject(err); + } + }); + }) + .catch((err) => { + console.log(`Failed to fetch extension, trying ${attempts - 1} more times`); // eslint-disable-line + if (attempts <= 1) { + return reject(err); + } + setTimeout(() => { + downloadChromeExtension(chromeStoreID, forceDownload, attempts - 1) + .then(resolve) + .catch(reject); + }, 200); + }); + } + else { + resolve(extensionFolder); + } + }); +}; +exports.default = downloadChromeExtension; +//# sourceMappingURL=downloadChromeExtension.js.map + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/dist/index.js": +/*!****************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/dist/index.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MOBX_DEVTOOLS = exports.APOLLO_DEVELOPER_TOOLS = exports.CYCLEJS_DEVTOOL = exports.REDUX_DEVTOOLS = exports.VUEJS3_DEVTOOLS = exports.VUEJS_DEVTOOLS = exports.ANGULARJS_BATARANG = exports.JQUERY_DEBUGGER = exports.BACKBONE_DEBUGGER = exports.REACT_DEVELOPER_TOOLS = exports.EMBER_INSPECTOR = void 0; +const electron_1 = __webpack_require__(/*! electron */ "electron"); +const fs = __webpack_require__(/*! fs */ "fs"); +const path = __webpack_require__(/*! path */ "path"); +const semver = __webpack_require__(/*! semver */ "./node_modules/electron-devtools-installer/node_modules/semver/index.js"); +const downloadChromeExtension_1 = __webpack_require__(/*! ./downloadChromeExtension */ "./node_modules/electron-devtools-installer/dist/downloadChromeExtension.js"); +const utils_1 = __webpack_require__(/*! ./utils */ "./node_modules/electron-devtools-installer/dist/utils.js"); +let IDMap = {}; +const getIDMapPath = () => path.resolve(utils_1.getPath(), 'IDMap.json'); +if (fs.existsSync(getIDMapPath())) { + try { + IDMap = JSON.parse(fs.readFileSync(getIDMapPath(), 'utf8')); + } + catch (err) { + console.error('electron-devtools-installer: Invalid JSON present in the IDMap file'); + } +} +/** + * @param extensionReference Extension or extensions to install + * @param options Installation options + * @returns A promise resolving with the name or names of the extensions installed + */ +const install = (extensionReference, options = {}) => { + // Support old forceDownload syntax + if (typeof options === 'boolean') { + options = { forceDownload: options }; + } + const { forceDownload, loadExtensionOptions } = options; + if (process.type !== 'browser') { + return Promise.reject(new Error('electron-devtools-installer can only be used from the main process')); + } + if (Array.isArray(extensionReference)) { + return extensionReference.reduce((accum, extension) => accum.then(() => install(extension, options)), Promise.resolve('')); + } + let chromeStoreID; + if (typeof extensionReference === 'object' && extensionReference.id) { + chromeStoreID = extensionReference.id; + const electronVersion = process.versions.electron.split('-')[0]; + if (!semver.satisfies(electronVersion, extensionReference.electron)) { + return Promise.reject(new Error(`Version of Electron: ${electronVersion} does not match required range ${extensionReference.electron} for extension ${chromeStoreID}`)); + } + } + else if (typeof extensionReference === 'string') { + chromeStoreID = extensionReference; + } + else { + return Promise.reject(new Error(`Invalid extensionReference passed in: "${extensionReference}"`)); + } + const extensionName = IDMap[chromeStoreID]; + let extensionInstalled; + // For Electron >=9. + if (electron_1.session.defaultSession.getExtension) { + extensionInstalled = + !!extensionName && + electron_1.session.defaultSession + .getAllExtensions() + .find((e) => e.name === extensionName); + } + else { + extensionInstalled = + !!extensionName && + electron_1.BrowserWindow.getDevToolsExtensions && + electron_1.BrowserWindow.getDevToolsExtensions().hasOwnProperty(extensionName); + } + if (!forceDownload && extensionInstalled) { + return Promise.resolve(IDMap[chromeStoreID]); + } + return downloadChromeExtension_1.default(chromeStoreID, forceDownload || false).then((extensionFolder) => { + // Use forceDownload, but already installed + if (extensionInstalled) { + // For Electron >=9. + if (electron_1.session.defaultSession.removeExtension) { + const extensionId = electron_1.session.defaultSession + .getAllExtensions() + .find((e) => e.name).id; + electron_1.session.defaultSession.removeExtension(extensionId); + } + else { + electron_1.BrowserWindow.removeDevToolsExtension(extensionName); + } + } + // For Electron >=9. + if (electron_1.session.defaultSession.loadExtension) { + return electron_1.session.defaultSession + .loadExtension(extensionFolder, loadExtensionOptions) + .then((ext) => { + return Promise.resolve(ext.name); + }); + } + const name = electron_1.BrowserWindow.addDevToolsExtension(extensionFolder); // eslint-disable-line + fs.writeFileSync(getIDMapPath(), JSON.stringify(Object.assign(IDMap, { + [chromeStoreID]: name, + }))); + return Promise.resolve(name); + }); +}; +exports.default = install; +exports.EMBER_INSPECTOR = { + id: 'bmdblncegkenkacieihfhpjfppoconhi', + electron: '>=1.2.1', +}; +exports.REACT_DEVELOPER_TOOLS = { + id: 'fmkadmapgofadopljbjfkapdkoienihi', + electron: '>=1.2.1', +}; +exports.BACKBONE_DEBUGGER = { + id: 'bhljhndlimiafopmmhjlgfpnnchjjbhd', + electron: '>=1.2.1', +}; +exports.JQUERY_DEBUGGER = { + id: 'dbhhnnnpaeobfddmlalhnehgclcmjimi', + electron: '>=1.2.1', +}; +exports.ANGULARJS_BATARANG = { + id: 'ighdmehidhipcmcojjgiloacoafjmpfk', + electron: '>=1.2.1', +}; +exports.VUEJS_DEVTOOLS = { + id: 'nhdogjmejiglipccpnnnanhbledajbpd', + electron: '>=1.2.1', +}; +exports.VUEJS3_DEVTOOLS = { + id: 'ljjemllljcmogpfapbkkighbhhppjdbg', + electron: '>=1.2.1', +}; +exports.REDUX_DEVTOOLS = { + id: 'lmhkpmbekcpmknklioeibfkpmmfibljd', + electron: '>=1.2.1', +}; +exports.CYCLEJS_DEVTOOL = { + id: 'dfgplfmhhmdekalbpejekgfegkonjpfp', + electron: '>=1.2.1', +}; +exports.APOLLO_DEVELOPER_TOOLS = { + id: 'jdkknkkbebbapilgoeccciglkfbmbnfm', + electron: '>=1.2.1', +}; +exports.MOBX_DEVTOOLS = { + id: 'pfgnfdagidkfgccljigdamigbcnndkod', + electron: '>=1.2.1', +}; +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/dist/utils.js": +/*!****************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/dist/utils.js ***! + \****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.changePermissions = exports.downloadFile = exports.getPath = void 0; +const electron_1 = __webpack_require__(/*! electron */ "electron"); +const fs = __webpack_require__(/*! fs */ "fs"); +const path = __webpack_require__(/*! path */ "path"); +const https = __webpack_require__(/*! https */ "https"); +const getPath = () => { + const savePath = electron_1.app.getPath('userData'); + return path.resolve(`${savePath}/extensions`); +}; +exports.getPath = getPath; +// Use https.get fallback for Electron < 1.4.5 +const request = electron_1.net ? electron_1.net.request : https.get; +const downloadFile = (from, to) => { + return new Promise((resolve, reject) => { + const req = request(from); + req.on('response', (res) => { + // Shouldn't handle redirect with `electron.net`, this is for https.get fallback + if (res.statusCode && res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) { + return exports.downloadFile(res.headers.location, to).then(resolve).catch(reject); + } + res.pipe(fs.createWriteStream(to)).on('close', resolve); + res.on('error', reject); + }); + req.on('error', reject); + req.end(); + }); +}; +exports.downloadFile = downloadFile; +const changePermissions = (dir, mode) => { + const files = fs.readdirSync(dir); + files.forEach((file) => { + const filePath = path.join(dir, file); + fs.chmodSync(filePath, parseInt(`${mode}`, 8)); + if (fs.statSync(filePath).isDirectory()) { + exports.changePermissions(filePath, mode); + } + }); +}; +exports.changePermissions = changePermissions; +//# sourceMappingURL=utils.js.map + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/classes/comparator.js": +/*!********************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/classes/comparator.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const ANY = Symbol('SemVer ANY') +// hoisted class for cyclic dependency +class Comparator { + static get ANY () { + return ANY + } + constructor (comp, options) { + options = parseOptions(options) + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } + + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) + + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } + + debug('comp', this) + } + + parse (comp) { + const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + const m = comp.match(r) + + if (!m) { + throw new TypeError(`Invalid comparator: ${comp}`) + } + + this.operator = m[1] !== undefined ? m[1] : '' + if (this.operator === '=') { + this.operator = '' + } + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } + } + + toString () { + return this.value + } + + test (version) { + debug('Comparator.test', version, this.options.loose) + + if (this.semver === ANY || version === ANY) { + return true + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + return cmp(version, this.operator, this.semver, this.options) + } + + intersects (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } + + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (this.operator === '') { + if (this.value === '') { + return true + } + return new Range(comp.value, options).test(this.value) + } else if (comp.operator === '') { + if (comp.value === '') { + return true + } + return new Range(this.value, options).test(comp.semver) + } + + const sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>') + const sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<') + const sameSemVer = this.semver.version === comp.semver.version + const differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<=') + const oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, options) && + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<') + const oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, options) && + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>') + + return ( + sameDirectionIncreasing || + sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || + oppositeDirectionsGreaterThan + ) + } +} + +module.exports = Comparator + +const parseOptions = __webpack_require__(/*! ../internal/parse-options */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/parse-options.js") +const {re, t} = __webpack_require__(/*! ../internal/re */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/re.js") +const cmp = __webpack_require__(/*! ../functions/cmp */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/cmp.js") +const debug = __webpack_require__(/*! ../internal/debug */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/debug.js") +const SemVer = __webpack_require__(/*! ./semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") +const Range = __webpack_require__(/*! ./range */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js") + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js": +/*!***************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// hoisted class for cyclic dependency +class Range { + constructor (range, options) { + options = parseOptions(options) + + if (range instanceof Range) { + if ( + range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease + ) { + return range + } else { + return new Range(range.raw, options) + } + } + + if (range instanceof Comparator) { + // just put it in the set and return + this.raw = range.value + this.set = [[range]] + this.format() + return this + } + + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease + + // First, split based on boolean or || + this.raw = range + this.set = range + .split(/\s*\|\|\s*/) + // map the range to a 2d array of comparators + .map(range => this.parseRange(range.trim())) + // throw out any comparator lists that are empty + // this generally means that it was not a valid range, which is allowed + // in loose mode, but will still throw if the WHOLE range is invalid. + .filter(c => c.length) + + if (!this.set.length) { + throw new TypeError(`Invalid SemVer Range: ${range}`) + } + + // if we have any that are not the null set, throw out null sets. + if (this.set.length > 1) { + // keep the first one, in case they're all null sets + const first = this.set[0] + this.set = this.set.filter(c => !isNullSet(c[0])) + if (this.set.length === 0) + this.set = [first] + else if (this.set.length > 1) { + // if we have any that are *, then the range is just * + for (const c of this.set) { + if (c.length === 1 && isAny(c[0])) { + this.set = [c] + break + } + } + } + } + + this.format() + } + + format () { + this.range = this.set + .map((comps) => { + return comps.join(' ').trim() + }) + .join('||') + .trim() + return this.range + } + + toString () { + return this.range + } + + parseRange (range) { + range = range.trim() + + // memoize range parsing for performance. + // this is a very hot path, and fully deterministic. + const memoOpts = Object.keys(this.options).join(',') + const memoKey = `parseRange:${memoOpts}:${range}` + const cached = cache.get(memoKey) + if (cached) + return cached + + const loose = this.options.loose + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] + range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) + debug('hyphen replace', range) + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, re[t.COMPARATORTRIM]) + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[t.TILDETRIM], tildeTrimReplace) + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[t.CARETTRIM], caretTrimReplace) + + // normalize spaces + range = range.split(/\s+/).join(' ') + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + const rangeList = range + .split(' ') + .map(comp => parseComparator(comp, this.options)) + .join(' ') + .split(/\s+/) + // >=0.0.0 is equivalent to * + .map(comp => replaceGTE0(comp, this.options)) + // in loose mode, throw out any that are not valid comparators + .filter(this.options.loose ? comp => !!comp.match(compRe) : () => true) + .map(comp => new Comparator(comp, this.options)) + + // if any comparators are the null set, then replace with JUST null set + // if more than one comparator, remove any * comparators + // also, don't include the same comparator more than once + const l = rangeList.length + const rangeMap = new Map() + for (const comp of rangeList) { + if (isNullSet(comp)) + return [comp] + rangeMap.set(comp.value, comp) + } + if (rangeMap.size > 1 && rangeMap.has('')) + rangeMap.delete('') + + const result = [...rangeMap.values()] + cache.set(memoKey, result) + return result + } + + intersects (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } + + return this.set.some((thisComparators) => { + return ( + isSatisfiable(thisComparators, options) && + range.set.some((rangeComparators) => { + return ( + isSatisfiable(rangeComparators, options) && + thisComparators.every((thisComparator) => { + return rangeComparators.every((rangeComparator) => { + return thisComparator.intersects(rangeComparator, options) + }) + }) + ) + }) + ) + }) + } + + // if ANY of the sets match ALL of its comparators, then pass + test (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + for (let i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false + } +} +module.exports = Range + +const LRU = __webpack_require__(/*! lru-cache */ "./node_modules/lru-cache/index.js") +const cache = new LRU({ max: 1000 }) + +const parseOptions = __webpack_require__(/*! ../internal/parse-options */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/parse-options.js") +const Comparator = __webpack_require__(/*! ./comparator */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/comparator.js") +const debug = __webpack_require__(/*! ../internal/debug */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/debug.js") +const SemVer = __webpack_require__(/*! ./semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") +const { + re, + t, + comparatorTrimReplace, + tildeTrimReplace, + caretTrimReplace +} = __webpack_require__(/*! ../internal/re */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/re.js") + +const isNullSet = c => c.value === '<0.0.0-0' +const isAny = c => c.value === '' + +// take a set of comparators and determine whether there +// exists a version which can satisfy it +const isSatisfiable = (comparators, options) => { + let result = true + const remainingComparators = comparators.slice() + let testComparator = remainingComparators.pop() + + while (result && remainingComparators.length) { + result = remainingComparators.every((otherComparator) => { + return testComparator.intersects(otherComparator, options) + }) + + testComparator = remainingComparators.pop() + } + + return result +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +const parseComparator = (comp, options) => { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} + +const isX = id => !id || id.toLowerCase() === 'x' || id === '*' + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 +const replaceTildes = (comp, options) => + comp.trim().split(/\s+/).map((comp) => { + return replaceTilde(comp, options) + }).join(' ') + +const replaceTilde = (comp, options) => { + const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] + return comp.replace(r, (_, M, m, p, pr) => { + debug('tilde', comp, _, M, m, p, pr) + let ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = `>=${M}.0.0 <${+M + 1}.0.0-0` + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0-0 + ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0` + } else if (pr) { + debug('replaceTilde pr', pr) + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${+m + 1}.0-0` + } else { + // ~1.2.3 == >=1.2.3 <1.3.0-0 + ret = `>=${M}.${m}.${p + } <${M}.${+m + 1}.0-0` + } + + debug('tilde return', ret) + return ret + }) +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 +// ^1.2.3 --> >=1.2.3 <2.0.0-0 +// ^1.2.0 --> >=1.2.0 <2.0.0-0 +const replaceCarets = (comp, options) => + comp.trim().split(/\s+/).map((comp) => { + return replaceCaret(comp, options) + }).join(' ') + +const replaceCaret = (comp, options) => { + debug('caret', comp, options) + const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] + const z = options.includePrerelease ? '-0' : '' + return comp.replace(r, (_, M, m, p, pr) => { + debug('caret', comp, _, M, m, p, pr) + let ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` + } else if (isX(p)) { + if (M === '0') { + ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` + } else { + ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${m}.${+p + 1}-0` + } else { + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${+m + 1}.0-0` + } + } else { + ret = `>=${M}.${m}.${p}-${pr + } <${+M + 1}.0.0-0` + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = `>=${M}.${m}.${p + }${z} <${M}.${m}.${+p + 1}-0` + } else { + ret = `>=${M}.${m}.${p + }${z} <${M}.${+m + 1}.0-0` + } + } else { + ret = `>=${M}.${m}.${p + } <${+M + 1}.0.0-0` + } + } + + debug('caret return', ret) + return ret + }) +} + +const replaceXRanges = (comp, options) => { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map((comp) => { + return replaceXRange(comp, options) + }).join(' ') +} + +const replaceXRange = (comp, options) => { + comp = comp.trim() + const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] + return comp.replace(r, (ret, gtlt, M, m, p, pr) => { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + const xM = isX(M) + const xm = xM || isX(m) + const xp = xm || isX(p) + const anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } + + // if we're including prereleases in the match, then we need + // to fix this to -0, the lowest possible prerelease value + pr = options.includePrerelease ? '-0' : '' + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0-0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } + + if (gtlt === '<') + pr = '-0' + + ret = `${gtlt + M}.${m}.${p}${pr}` + } else if (xm) { + ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` + } else if (xp) { + ret = `>=${M}.${m}.0${pr + } <${M}.${+m + 1}.0-0` + } + + debug('xRange return', ret) + + return ret + }) +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +const replaceStars = (comp, options) => { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[t.STAR], '') +} + +const replaceGTE0 = (comp, options) => { + debug('replaceGTE0', comp, options) + return comp.trim() + .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') +} + +// This function is passed to string.replace(re[t.HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0-0 +const hyphenReplace = incPr => ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) => { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = `>=${fM}.0.0${incPr ? '-0' : ''}` + } else if (isX(fp)) { + from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}` + } else if (fpr) { + from = `>=${from}` + } else { + from = `>=${from}${incPr ? '-0' : ''}` + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = `<${+tM + 1}.0.0-0` + } else if (isX(tp)) { + to = `<${tM}.${+tm + 1}.0-0` + } else if (tpr) { + to = `<=${tM}.${tm}.${tp}-${tpr}` + } else if (incPr) { + to = `<${tM}.${tm}.${+tp + 1}-0` + } else { + to = `<=${to}` + } + + return (`${from} ${to}`).trim() +} + +const testSet = (set, version, options) => { + for (let i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (let i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === Comparator.ANY) { + continue + } + + if (set[i].semver.prerelease.length > 0) { + const allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false + } + + return true +} + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js": +/*!****************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js ***! + \****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const debug = __webpack_require__(/*! ../internal/debug */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/debug.js") +const { MAX_LENGTH, MAX_SAFE_INTEGER } = __webpack_require__(/*! ../internal/constants */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/constants.js") +const { re, t } = __webpack_require__(/*! ../internal/re */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/re.js") + +const parseOptions = __webpack_require__(/*! ../internal/parse-options */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/parse-options.js") +const { compareIdentifiers } = __webpack_require__(/*! ../internal/identifiers */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/identifiers.js") +class SemVer { + constructor (version, options) { + options = parseOptions(options) + + if (version instanceof SemVer) { + if (version.loose === !!options.loose && + version.includePrerelease === !!options.includePrerelease) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError(`Invalid Version: ${version}`) + } + + if (version.length > MAX_LENGTH) { + throw new TypeError( + `version is longer than ${MAX_LENGTH} characters` + ) + } + + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + // this isn't actually relevant for versions, but keep it so that we + // don't run into trouble passing this.options around. + this.includePrerelease = !!options.includePrerelease + + const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) + + if (!m) { + throw new TypeError(`Invalid Version: ${version}`) + } + + this.raw = version + + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } + + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map((id) => { + if (/^[0-9]+$/.test(id)) { + const num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } + + this.build = m[5] ? m[5].split('.') : [] + this.format() + } + + format () { + this.version = `${this.major}.${this.minor}.${this.patch}` + if (this.prerelease.length) { + this.version += `-${this.prerelease.join('.')}` + } + return this.version + } + + toString () { + return this.version + } + + compare (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + if (typeof other === 'string' && other === this.version) { + return 0 + } + other = new SemVer(other, this.options) + } + + if (other.version === this.version) { + return 0 + } + + return this.compareMain(other) || this.comparePre(other) + } + + compareMain (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return ( + compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) + ) + } + + comparePre (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + + let i = 0 + do { + const a = this.prerelease[i] + const b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) + } + + compareBuild (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + let i = 0 + do { + const a = this.build[i] + const b = other.build[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) + } + + // preminor will bump the version up to the next minor release, and immediately + // down to pre-release. premajor and prepatch work the same way. + inc (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier) + this.inc('pre', identifier) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier) + } + this.inc('pre', identifier) + break + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if ( + this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0 + ) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) { + this.prerelease = [0] + } else { + let i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + // didn't increment anything + this.prerelease.push(0) + } + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0] + } + } else { + this.prerelease = [identifier, 0] + } + } + break + + default: + throw new Error(`invalid increment argument: ${release}`) + } + this.format() + this.raw = this.version + return this + } +} + +module.exports = SemVer + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/clean.js": +/*!*****************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/clean.js ***! + \*****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const parse = __webpack_require__(/*! ./parse */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/parse.js") +const clean = (version, options) => { + const s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null +} +module.exports = clean + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/cmp.js": +/*!***************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/cmp.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const eq = __webpack_require__(/*! ./eq */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/eq.js") +const neq = __webpack_require__(/*! ./neq */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/neq.js") +const gt = __webpack_require__(/*! ./gt */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/gt.js") +const gte = __webpack_require__(/*! ./gte */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/gte.js") +const lt = __webpack_require__(/*! ./lt */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/lt.js") +const lte = __webpack_require__(/*! ./lte */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/lte.js") + +const cmp = (a, op, b, loose) => { + switch (op) { + case '===': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a === b + + case '!==': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError(`Invalid operator: ${op}`) + } +} +module.exports = cmp + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/coerce.js": +/*!******************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/coerce.js ***! + \******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") +const parse = __webpack_require__(/*! ./parse */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/parse.js") +const {re, t} = __webpack_require__(/*! ../internal/re */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/re.js") + +const coerce = (version, options) => { + if (version instanceof SemVer) { + return version + } + + if (typeof version === 'number') { + version = String(version) + } + + if (typeof version !== 'string') { + return null + } + + options = options || {} + + let match = null + if (!options.rtl) { + match = version.match(re[t.COERCE]) + } else { + // Find the right-most coercible string that does not share + // a terminus with a more left-ward coercible string. + // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' + // + // Walk through the string checking with a /g regexp + // Manually set the index so as to pick up overlapping matches. + // Stop when we get a match that ends at the string end, since no + // coercible string can be more right-ward without the same terminus. + let next + while ((next = re[t.COERCERTL].exec(version)) && + (!match || match.index + match[0].length !== version.length) + ) { + if (!match || + next.index + next[0].length !== match.index + match[0].length) { + match = next + } + re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length + } + // leave it in a clean state + re[t.COERCERTL].lastIndex = -1 + } + + if (match === null) + return null + + return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options) +} +module.exports = coerce + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare-build.js": +/*!*************************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/compare-build.js ***! + \*************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") +const compareBuild = (a, b, loose) => { + const versionA = new SemVer(a, loose) + const versionB = new SemVer(b, loose) + return versionA.compare(versionB) || versionA.compareBuild(versionB) +} +module.exports = compareBuild + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare-loose.js": +/*!*************************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/compare-loose.js ***! + \*************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js") +const compareLoose = (a, b) => compare(a, b, true) +module.exports = compareLoose + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js": +/*!*******************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") +const compare = (a, b, loose) => + new SemVer(a, loose).compare(new SemVer(b, loose)) + +module.exports = compare + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/diff.js": +/*!****************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/diff.js ***! + \****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const parse = __webpack_require__(/*! ./parse */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/parse.js") +const eq = __webpack_require__(/*! ./eq */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/eq.js") + +const diff = (version1, version2) => { + if (eq(version1, version2)) { + return null + } else { + const v1 = parse(version1) + const v2 = parse(version2) + const hasPre = v1.prerelease.length || v2.prerelease.length + const prefix = hasPre ? 'pre' : '' + const defaultResult = hasPre ? 'prerelease' : '' + for (const key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return prefix + key + } + } + } + return defaultResult // may be undefined + } +} +module.exports = diff + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/eq.js": +/*!**************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/eq.js ***! + \**************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js") +const eq = (a, b, loose) => compare(a, b, loose) === 0 +module.exports = eq + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/gt.js": +/*!**************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/gt.js ***! + \**************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js") +const gt = (a, b, loose) => compare(a, b, loose) > 0 +module.exports = gt + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/gte.js": +/*!***************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/gte.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js") +const gte = (a, b, loose) => compare(a, b, loose) >= 0 +module.exports = gte + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/inc.js": +/*!***************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/inc.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") + +const inc = (version, release, options, identifier) => { + if (typeof (options) === 'string') { + identifier = options + options = undefined + } + + try { + return new SemVer(version, options).inc(release, identifier).version + } catch (er) { + return null + } +} +module.exports = inc + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/lt.js": +/*!**************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/lt.js ***! + \**************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js") +const lt = (a, b, loose) => compare(a, b, loose) < 0 +module.exports = lt + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/lte.js": +/*!***************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/lte.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js") +const lte = (a, b, loose) => compare(a, b, loose) <= 0 +module.exports = lte + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/major.js": +/*!*****************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/major.js ***! + \*****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") +const major = (a, loose) => new SemVer(a, loose).major +module.exports = major + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/minor.js": +/*!*****************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/minor.js ***! + \*****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") +const minor = (a, loose) => new SemVer(a, loose).minor +module.exports = minor + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/neq.js": +/*!***************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/neq.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js") +const neq = (a, b, loose) => compare(a, b, loose) !== 0 +module.exports = neq + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/parse.js": +/*!*****************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/parse.js ***! + \*****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const {MAX_LENGTH} = __webpack_require__(/*! ../internal/constants */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/constants.js") +const { re, t } = __webpack_require__(/*! ../internal/re */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/re.js") +const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") + +const parseOptions = __webpack_require__(/*! ../internal/parse-options */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/parse-options.js") +const parse = (version, options) => { + options = parseOptions(options) + + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + if (version.length > MAX_LENGTH) { + return null + } + + const r = options.loose ? re[t.LOOSE] : re[t.FULL] + if (!r.test(version)) { + return null + } + + try { + return new SemVer(version, options) + } catch (er) { + return null + } +} + +module.exports = parse + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/patch.js": +/*!*****************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/patch.js ***! + \*****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") +const patch = (a, loose) => new SemVer(a, loose).patch +module.exports = patch + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/prerelease.js": +/*!**********************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/prerelease.js ***! + \**********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const parse = __webpack_require__(/*! ./parse */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/parse.js") +const prerelease = (version, options) => { + const parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} +module.exports = prerelease + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/rcompare.js": +/*!********************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/rcompare.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js") +const rcompare = (a, b, loose) => compare(b, a, loose) +module.exports = rcompare + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/rsort.js": +/*!*****************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/rsort.js ***! + \*****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const compareBuild = __webpack_require__(/*! ./compare-build */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare-build.js") +const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) +module.exports = rsort + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/satisfies.js": +/*!*********************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/satisfies.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js") +const satisfies = (version, range, options) => { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} +module.exports = satisfies + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/sort.js": +/*!****************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/sort.js ***! + \****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const compareBuild = __webpack_require__(/*! ./compare-build */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare-build.js") +const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) +module.exports = sort + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/functions/valid.js": +/*!*****************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/functions/valid.js ***! + \*****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const parse = __webpack_require__(/*! ./parse */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/parse.js") +const valid = (version, options) => { + const v = parse(version, options) + return v ? v.version : null +} +module.exports = valid + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/index.js": +/*!*******************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/index.js ***! + \*******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// just pre-load all the stuff that index.js lazily exports +const internalRe = __webpack_require__(/*! ./internal/re */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/re.js") +module.exports = { + re: internalRe.re, + src: internalRe.src, + tokens: internalRe.t, + SEMVER_SPEC_VERSION: __webpack_require__(/*! ./internal/constants */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/constants.js").SEMVER_SPEC_VERSION, + SemVer: __webpack_require__(/*! ./classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js"), + compareIdentifiers: __webpack_require__(/*! ./internal/identifiers */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/identifiers.js").compareIdentifiers, + rcompareIdentifiers: __webpack_require__(/*! ./internal/identifiers */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/identifiers.js").rcompareIdentifiers, + parse: __webpack_require__(/*! ./functions/parse */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/parse.js"), + valid: __webpack_require__(/*! ./functions/valid */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/valid.js"), + clean: __webpack_require__(/*! ./functions/clean */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/clean.js"), + inc: __webpack_require__(/*! ./functions/inc */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/inc.js"), + diff: __webpack_require__(/*! ./functions/diff */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/diff.js"), + major: __webpack_require__(/*! ./functions/major */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/major.js"), + minor: __webpack_require__(/*! ./functions/minor */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/minor.js"), + patch: __webpack_require__(/*! ./functions/patch */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/patch.js"), + prerelease: __webpack_require__(/*! ./functions/prerelease */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/prerelease.js"), + compare: __webpack_require__(/*! ./functions/compare */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js"), + rcompare: __webpack_require__(/*! ./functions/rcompare */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/rcompare.js"), + compareLoose: __webpack_require__(/*! ./functions/compare-loose */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare-loose.js"), + compareBuild: __webpack_require__(/*! ./functions/compare-build */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare-build.js"), + sort: __webpack_require__(/*! ./functions/sort */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/sort.js"), + rsort: __webpack_require__(/*! ./functions/rsort */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/rsort.js"), + gt: __webpack_require__(/*! ./functions/gt */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/gt.js"), + lt: __webpack_require__(/*! ./functions/lt */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/lt.js"), + eq: __webpack_require__(/*! ./functions/eq */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/eq.js"), + neq: __webpack_require__(/*! ./functions/neq */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/neq.js"), + gte: __webpack_require__(/*! ./functions/gte */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/gte.js"), + lte: __webpack_require__(/*! ./functions/lte */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/lte.js"), + cmp: __webpack_require__(/*! ./functions/cmp */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/cmp.js"), + coerce: __webpack_require__(/*! ./functions/coerce */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/coerce.js"), + Comparator: __webpack_require__(/*! ./classes/comparator */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/comparator.js"), + Range: __webpack_require__(/*! ./classes/range */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js"), + satisfies: __webpack_require__(/*! ./functions/satisfies */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/satisfies.js"), + toComparators: __webpack_require__(/*! ./ranges/to-comparators */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/to-comparators.js"), + maxSatisfying: __webpack_require__(/*! ./ranges/max-satisfying */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/max-satisfying.js"), + minSatisfying: __webpack_require__(/*! ./ranges/min-satisfying */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/min-satisfying.js"), + minVersion: __webpack_require__(/*! ./ranges/min-version */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/min-version.js"), + validRange: __webpack_require__(/*! ./ranges/valid */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/valid.js"), + outside: __webpack_require__(/*! ./ranges/outside */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/outside.js"), + gtr: __webpack_require__(/*! ./ranges/gtr */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/gtr.js"), + ltr: __webpack_require__(/*! ./ranges/ltr */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/ltr.js"), + intersects: __webpack_require__(/*! ./ranges/intersects */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/intersects.js"), + simplifyRange: __webpack_require__(/*! ./ranges/simplify */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/simplify.js"), + subset: __webpack_require__(/*! ./ranges/subset */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/subset.js"), +} + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/internal/constants.js": +/*!********************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/internal/constants.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +const SEMVER_SPEC_VERSION = '2.0.0' + +const MAX_LENGTH = 256 +const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || + /* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +const MAX_SAFE_COMPONENT_LENGTH = 16 + +module.exports = { + SEMVER_SPEC_VERSION, + MAX_LENGTH, + MAX_SAFE_INTEGER, + MAX_SAFE_COMPONENT_LENGTH +} + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/internal/debug.js": +/*!****************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/internal/debug.js ***! + \****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +const debug = ( + typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG) +) ? (...args) => console.error('SEMVER', ...args) + : () => {} + +module.exports = debug + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/internal/identifiers.js": +/*!**********************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/internal/identifiers.js ***! + \**********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +const numeric = /^[0-9]+$/ +const compareIdentifiers = (a, b) => { + const anum = numeric.test(a) + const bnum = numeric.test(b) + + if (anum && bnum) { + a = +a + b = +b + } + + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 +} + +const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) + +module.exports = { + compareIdentifiers, + rcompareIdentifiers +} + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/internal/parse-options.js": +/*!************************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/internal/parse-options.js ***! + \************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +// parse out just the options we care about so we always get a consistent +// obj with keys in a consistent order. +const opts = ['includePrerelease', 'loose', 'rtl'] +const parseOptions = options => + !options ? {} + : typeof options !== 'object' ? { loose: true } + : opts.filter(k => options[k]).reduce((options, k) => { + options[k] = true + return options + }, {}) +module.exports = parseOptions + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/internal/re.js": +/*!*************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/internal/re.js ***! + \*************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const { MAX_SAFE_COMPONENT_LENGTH } = __webpack_require__(/*! ./constants */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/constants.js") +const debug = __webpack_require__(/*! ./debug */ "./node_modules/electron-devtools-installer/node_modules/semver/internal/debug.js") +exports = module.exports = {} + +// The actual regexps go on exports.re +const re = exports.re = [] +const src = exports.src = [] +const t = exports.t = {} +let R = 0 + +const createToken = (name, value, isGlobal) => { + const index = R++ + debug(index, value) + t[name] = index + src[index] = value + re[index] = new RegExp(value, isGlobal ? 'g' : undefined) +} + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') +createToken('NUMERICIDENTIFIERLOOSE', '[0-9]+') + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*') + +// ## Main Version +// Three dot-separated numeric identifiers. + +createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + + `(${src[t.NUMERICIDENTIFIER]})\\.` + + `(${src[t.NUMERICIDENTIFIER]})`) + +createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + + `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + + `(${src[t.NUMERICIDENTIFIERLOOSE]})`) + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER] +}|${src[t.NONNUMERICIDENTIFIER]})`) + +createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE] +}|${src[t.NONNUMERICIDENTIFIER]})`) + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER] +}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`) + +createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] +}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`) + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+') + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] +}(?:\\.${src[t.BUILDIDENTIFIER]})*))`) + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +createToken('FULLPLAIN', `v?${src[t.MAINVERSION] +}${src[t.PRERELEASE]}?${ + src[t.BUILD]}?`) + +createToken('FULL', `^${src[t.FULLPLAIN]}$`) + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE] +}${src[t.PRERELEASELOOSE]}?${ + src[t.BUILD]}?`) + +createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) + +createToken('GTLT', '((?:<|>)?=?)') + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`) +createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) + +createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + + `(?:${src[t.PRERELEASE]})?${ + src[t.BUILD]}?` + + `)?)?`) + +createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:${src[t.PRERELEASELOOSE]})?${ + src[t.BUILD]}?` + + `)?)?`) + +createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`) +createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`) + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +createToken('COERCE', `${'(^|[^\\d])' + + '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + + `(?:$|[^\\d])`) +createToken('COERCERTL', src[t.COERCE], true) + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +createToken('LONETILDE', '(?:~>?)') + +createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true) +exports.tildeTrimReplace = '$1~' + +createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`) +createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`) + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +createToken('LONECARET', '(?:\\^)') + +createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true) +exports.caretTrimReplace = '$1^' + +createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`) +createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`) + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`) +createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`) + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT] +}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true) +exports.comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + + `\\s+-\\s+` + + `(${src[t.XRANGEPLAIN]})` + + `\\s*$`) + +createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + + `\\s+-\\s+` + + `(${src[t.XRANGEPLAINLOOSE]})` + + `\\s*$`) + +// Star ranges basically just allow anything at all. +createToken('STAR', '(<|>)?=?\\s*\\*') +// >=0.0.0 is like a star +createToken('GTE0', '^\\s*>=\\s*0\.0\.0\\s*$') +createToken('GTE0PRE', '^\\s*>=\\s*0\.0\.0-0\\s*$') + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/gtr.js": +/*!************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/ranges/gtr.js ***! + \************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// Determine if version is greater than all the versions possible in the range. +const outside = __webpack_require__(/*! ./outside */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/outside.js") +const gtr = (version, range, options) => outside(version, range, '>', options) +module.exports = gtr + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/intersects.js": +/*!*******************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/ranges/intersects.js ***! + \*******************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js") +const intersects = (r1, r2, options) => { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} +module.exports = intersects + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/ltr.js": +/*!************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/ranges/ltr.js ***! + \************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const outside = __webpack_require__(/*! ./outside */ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/outside.js") +// Determine if version is less than all the versions possible in the range +const ltr = (version, range, options) => outside(version, range, '<', options) +module.exports = ltr + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/max-satisfying.js": +/*!***********************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/ranges/max-satisfying.js ***! + \***********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") +const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js") + +const maxSatisfying = (versions, range, options) => { + let max = null + let maxSV = null + let rangeObj = null + try { + rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max +} +module.exports = maxSatisfying + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/min-satisfying.js": +/*!***********************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/ranges/min-satisfying.js ***! + \***********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") +const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js") +const minSatisfying = (versions, range, options) => { + let min = null + let minSV = null + let rangeObj = null + try { + rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min +} +module.exports = minSatisfying + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/min-version.js": +/*!********************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/ranges/min-version.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") +const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js") +const gt = __webpack_require__(/*! ../functions/gt */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/gt.js") + +const minVersion = (range, loose) => { + range = new Range(range, loose) + + let minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i] + + let setMin = null + comparators.forEach((comparator) => { + // Clone to avoid manipulating the comparator's semver object. + const compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!setMin || gt(compver, setMin)) { + setMin = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error(`Unexpected operation: ${comparator.operator}`) + } + }) + if (setMin && (!minver || gt(minver, setMin))) + minver = setMin + } + + if (minver && range.test(minver)) { + return minver + } + + return null +} +module.exports = minVersion + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/outside.js": +/*!****************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/ranges/outside.js ***! + \****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/semver.js") +const Comparator = __webpack_require__(/*! ../classes/comparator */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/comparator.js") +const {ANY} = Comparator +const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js") +const satisfies = __webpack_require__(/*! ../functions/satisfies */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/satisfies.js") +const gt = __webpack_require__(/*! ../functions/gt */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/gt.js") +const lt = __webpack_require__(/*! ../functions/lt */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/lt.js") +const lte = __webpack_require__(/*! ../functions/lte */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/lte.js") +const gte = __webpack_require__(/*! ../functions/gte */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/gte.js") + +const outside = (version, range, hilo, options) => { + version = new SemVer(version, options) + range = new Range(range, options) + + let gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + + // If it satisfies the range it is not outside + if (satisfies(version, range, options)) { + return false + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i] + + let high = null + let low = null + + comparators.forEach((comparator) => { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } + } + return true +} + +module.exports = outside + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/simplify.js": +/*!*****************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/ranges/simplify.js ***! + \*****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// given a set of versions and a range, create a "simplified" range +// that includes the same versions that the original range does +// If the original range is shorter than the simplified one, return that. +const satisfies = __webpack_require__(/*! ../functions/satisfies.js */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/satisfies.js") +const compare = __webpack_require__(/*! ../functions/compare.js */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js") +module.exports = (versions, range, options) => { + const set = [] + let min = null + let prev = null + const v = versions.sort((a, b) => compare(a, b, options)) + for (const version of v) { + const included = satisfies(version, range, options) + if (included) { + prev = version + if (!min) + min = version + } else { + if (prev) { + set.push([min, prev]) + } + prev = null + min = null + } + } + if (min) + set.push([min, null]) + + const ranges = [] + for (const [min, max] of set) { + if (min === max) + ranges.push(min) + else if (!max && min === v[0]) + ranges.push('*') + else if (!max) + ranges.push(`>=${min}`) + else if (min === v[0]) + ranges.push(`<=${max}`) + else + ranges.push(`${min} - ${max}`) + } + const simplified = ranges.join(' || ') + const original = typeof range.raw === 'string' ? range.raw : String(range) + return simplified.length < original.length ? simplified : range +} + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/subset.js": +/*!***************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/ranges/subset.js ***! + \***************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const Range = __webpack_require__(/*! ../classes/range.js */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js") +const Comparator = __webpack_require__(/*! ../classes/comparator.js */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/comparator.js") +const { ANY } = Comparator +const satisfies = __webpack_require__(/*! ../functions/satisfies.js */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/satisfies.js") +const compare = __webpack_require__(/*! ../functions/compare.js */ "./node_modules/electron-devtools-installer/node_modules/semver/functions/compare.js") + +// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff: +// - Every simple range `r1, r2, ...` is a null set, OR +// - Every simple range `r1, r2, ...` which is not a null set is a subset of +// some `R1, R2, ...` +// +// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff: +// - If c is only the ANY comparator +// - If C is only the ANY comparator, return true +// - Else if in prerelease mode, return false +// - else replace c with `[>=0.0.0]` +// - If C is only the ANY comparator +// - if in prerelease mode, return true +// - else replace C with `[>=0.0.0]` +// - Let EQ be the set of = comparators in c +// - If EQ is more than one, return true (null set) +// - Let GT be the highest > or >= comparator in c +// - Let LT be the lowest < or <= comparator in c +// - If GT and LT, and GT.semver > LT.semver, return true (null set) +// - If any C is a = range, and GT or LT are set, return false +// - If EQ +// - If GT, and EQ does not satisfy GT, return true (null set) +// - If LT, and EQ does not satisfy LT, return true (null set) +// - If EQ satisfies every C, return true +// - Else return false +// - If GT +// - If GT.semver is lower than any > or >= comp in C, return false +// - If GT is >=, and GT.semver does not satisfy every C, return false +// - If GT.semver has a prerelease, and not in prerelease mode +// - If no C has a prerelease and the GT.semver tuple, return false +// - If LT +// - If LT.semver is greater than any < or <= comp in C, return false +// - If LT is <=, and LT.semver does not satisfy every C, return false +// - If GT.semver has a prerelease, and not in prerelease mode +// - If no C has a prerelease and the LT.semver tuple, return false +// - Else return true + +const subset = (sub, dom, options = {}) => { + if (sub === dom) + return true + + sub = new Range(sub, options) + dom = new Range(dom, options) + let sawNonNull = false + + OUTER: for (const simpleSub of sub.set) { + for (const simpleDom of dom.set) { + const isSub = simpleSubset(simpleSub, simpleDom, options) + sawNonNull = sawNonNull || isSub !== null + if (isSub) + continue OUTER + } + // the null set is a subset of everything, but null simple ranges in + // a complex range should be ignored. so if we saw a non-null range, + // then we know this isn't a subset, but if EVERY simple range was null, + // then it is a subset. + if (sawNonNull) + return false + } + return true +} + +const simpleSubset = (sub, dom, options) => { + if (sub === dom) + return true + + if (sub.length === 1 && sub[0].semver === ANY) { + if (dom.length === 1 && dom[0].semver === ANY) + return true + else if (options.includePrerelease) + sub = [ new Comparator('>=0.0.0-0') ] + else + sub = [ new Comparator('>=0.0.0') ] + } + + if (dom.length === 1 && dom[0].semver === ANY) { + if (options.includePrerelease) + return true + else + dom = [ new Comparator('>=0.0.0') ] + } + + const eqSet = new Set() + let gt, lt + for (const c of sub) { + if (c.operator === '>' || c.operator === '>=') + gt = higherGT(gt, c, options) + else if (c.operator === '<' || c.operator === '<=') + lt = lowerLT(lt, c, options) + else + eqSet.add(c.semver) + } + + if (eqSet.size > 1) + return null + + let gtltComp + if (gt && lt) { + gtltComp = compare(gt.semver, lt.semver, options) + if (gtltComp > 0) + return null + else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) + return null + } + + // will iterate one or zero times + for (const eq of eqSet) { + if (gt && !satisfies(eq, String(gt), options)) + return null + + if (lt && !satisfies(eq, String(lt), options)) + return null + + for (const c of dom) { + if (!satisfies(eq, String(c), options)) + return false + } + + return true + } + + let higher, lower + let hasDomLT, hasDomGT + // if the subset has a prerelease, we need a comparator in the superset + // with the same tuple and a prerelease, or it's not a subset + let needDomLTPre = lt && + !options.includePrerelease && + lt.semver.prerelease.length ? lt.semver : false + let needDomGTPre = gt && + !options.includePrerelease && + gt.semver.prerelease.length ? gt.semver : false + // exception: <1.2.3-0 is the same as <1.2.3 + if (needDomLTPre && needDomLTPre.prerelease.length === 1 && + lt.operator === '<' && needDomLTPre.prerelease[0] === 0) { + needDomLTPre = false + } + + for (const c of dom) { + hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' + hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' + if (gt) { + if (needDomGTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && + c.semver.major === needDomGTPre.major && + c.semver.minor === needDomGTPre.minor && + c.semver.patch === needDomGTPre.patch) { + needDomGTPre = false + } + } + if (c.operator === '>' || c.operator === '>=') { + higher = higherGT(gt, c, options) + if (higher === c && higher !== gt) + return false + } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) + return false + } + if (lt) { + if (needDomLTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && + c.semver.major === needDomLTPre.major && + c.semver.minor === needDomLTPre.minor && + c.semver.patch === needDomLTPre.patch) { + needDomLTPre = false + } + } + if (c.operator === '<' || c.operator === '<=') { + lower = lowerLT(lt, c, options) + if (lower === c && lower !== lt) + return false + } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) + return false + } + if (!c.operator && (lt || gt) && gtltComp !== 0) + return false + } + + // if there was a < or >, and nothing in the dom, then must be false + // UNLESS it was limited by another range in the other direction. + // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0 + if (gt && hasDomLT && !lt && gtltComp !== 0) + return false + + if (lt && hasDomGT && !gt && gtltComp !== 0) + return false + + // we needed a prerelease range in a specific tuple, but didn't get one + // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0, + // because it includes prereleases in the 1.2.3 tuple + if (needDomGTPre || needDomLTPre) + return false + + return true +} + +// >=1.2.3 is lower than >1.2.3 +const higherGT = (a, b, options) => { + if (!a) + return b + const comp = compare(a.semver, b.semver, options) + return comp > 0 ? a + : comp < 0 ? b + : b.operator === '>' && a.operator === '>=' ? b + : a +} + +// <=1.2.3 is higher than <1.2.3 +const lowerLT = (a, b, options) => { + if (!a) + return b + const comp = compare(a.semver, b.semver, options) + return comp < 0 ? a + : comp > 0 ? b + : b.operator === '<' && a.operator === '<=' ? b + : a +} + +module.exports = subset + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/to-comparators.js": +/*!***********************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/ranges/to-comparators.js ***! + \***********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js") + +// Mostly just for testing and legacy API reasons +const toComparators = (range, options) => + new Range(range, options).set + .map(comp => comp.map(c => c.value).join(' ').trim().split(' ')) + +module.exports = toComparators + + +/***/ }), + +/***/ "./node_modules/electron-devtools-installer/node_modules/semver/ranges/valid.js": +/*!**************************************************************************************!*\ + !*** ./node_modules/electron-devtools-installer/node_modules/semver/ranges/valid.js ***! + \**************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-devtools-installer/node_modules/semver/classes/range.js") +const validRange = (range, options) => { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } +} +module.exports = validRange + + +/***/ }), + +/***/ "./node_modules/electron-dl/index.js": +/*!*******************************************!*\ + !*** ./node_modules/electron-dl/index.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const path = __webpack_require__(/*! path */ "path"); +const {app, BrowserWindow, shell, dialog} = __webpack_require__(/*! electron */ "electron"); +const unusedFilename = __webpack_require__(/*! unused-filename */ "./node_modules/unused-filename/index.js"); +const pupa = __webpack_require__(/*! pupa */ "./node_modules/pupa/index.js"); +const extName = __webpack_require__(/*! ext-name */ "./node_modules/ext-name/index.js"); + +const getFilenameFromMime = (name, mime) => { + const extensions = extName.mime(mime); + + if (extensions.length !== 1) { + return name; + } + + return `${name}.${extensions[0].ext}`; +}; + +const majorElectronVersion = () => { + const version = process.versions.electron.split('.'); + return Number.parseInt(version[0], 10); +}; + +const getWindowFromBrowserView = webContents => { + for (const currentWindow of BrowserWindow.getAllWindows()) { + for (const currentBrowserView of currentWindow.getBrowserViews()) { + if (currentBrowserView.webContents.id === webContents.id) { + return currentWindow; + } + } + } +}; + +const getWindowFromWebContents = webContents => { + let window_; + const webContentsType = webContents.getType(); + switch (webContentsType) { + case 'webview': + window_ = BrowserWindow.fromWebContents(webContents.hostWebContents); + break; + case 'browserView': + window_ = getWindowFromBrowserView(webContents); + break; + default: + window_ = BrowserWindow.fromWebContents(webContents); + break; + } + + return window_; +}; + +function registerListener(session, options, callback = () => {}) { + const downloadItems = new Set(); + let receivedBytes = 0; + let completedBytes = 0; + let totalBytes = 0; + const activeDownloadItems = () => downloadItems.size; + const progressDownloadItems = () => receivedBytes / totalBytes; + + options = { + showBadge: true, + ...options + }; + + const listener = (event, item, webContents) => { + downloadItems.add(item); + totalBytes += item.getTotalBytes(); + + const window_ = majorElectronVersion() >= 12 ? BrowserWindow.fromWebContents(webContents) : getWindowFromWebContents(webContents); + + if (options.directory && !path.isAbsolute(options.directory)) { + throw new Error('The `directory` option must be an absolute path'); + } + + const directory = options.directory || app.getPath('downloads'); + + let filePath; + if (options.filename) { + filePath = path.join(directory, options.filename); + } else { + const filename = item.getFilename(); + const name = path.extname(filename) ? filename : getFilenameFromMime(filename, item.getMimeType()); + + filePath = options.overwrite ? path.join(directory, name) : unusedFilename.sync(path.join(directory, name)); + } + + const errorMessage = options.errorMessage || 'The download of {filename} was interrupted'; + + if (options.saveAs) { + item.setSaveDialogOptions({defaultPath: filePath}); + } else { + item.setSavePath(filePath); + } + + if (typeof options.onStarted === 'function') { + options.onStarted(item); + } + + item.on('updated', () => { + receivedBytes = completedBytes; + for (const item of downloadItems) { + receivedBytes += item.getReceivedBytes(); + } + + if (options.showBadge && ['darwin', 'linux'].includes(process.platform)) { + app.badgeCount = activeDownloadItems(); + } + + if (!window_.isDestroyed()) { + window_.setProgressBar(progressDownloadItems()); + } + + if (typeof options.onProgress === 'function') { + const itemTransferredBytes = item.getReceivedBytes(); + const itemTotalBytes = item.getTotalBytes(); + + options.onProgress({ + percent: itemTotalBytes ? itemTransferredBytes / itemTotalBytes : 0, + transferredBytes: itemTransferredBytes, + totalBytes: itemTotalBytes + }); + } + + if (typeof options.onTotalProgress === 'function') { + options.onTotalProgress({ + percent: progressDownloadItems(), + transferredBytes: receivedBytes, + totalBytes + }); + } + }); + + item.on('done', (event, state) => { + completedBytes += item.getTotalBytes(); + downloadItems.delete(item); + + if (options.showBadge && ['darwin', 'linux'].includes(process.platform)) { + app.badgeCount = activeDownloadItems(); + } + + if (!window_.isDestroyed() && !activeDownloadItems()) { + window_.setProgressBar(-1); + receivedBytes = 0; + completedBytes = 0; + totalBytes = 0; + } + + if (options.unregisterWhenDone) { + session.removeListener('will-download', listener); + } + + // eslint-disable-next-line unicorn/prefer-switch + if (state === 'cancelled') { + if (typeof options.onCancel === 'function') { + options.onCancel(item); + } + } else if (state === 'interrupted') { + const message = pupa(errorMessage, {filename: path.basename(filePath)}); + callback(new Error(message)); + } else if (state === 'completed') { + if (process.platform === 'darwin') { + app.dock.downloadFinished(filePath); + } + + if (options.openFolderWhenDone) { + shell.showItemInFolder(filePath); + } + + if (typeof options.onCompleted === 'function') { + options.onCompleted({ + fileName: item.getFilename(), + path: item.getSavePath(), + fileSize: item.getReceivedBytes(), + mimeType: item.getMimeType(), + url: item.getURL() + }); + } + + callback(null, item); + } + }); + }; + + session.on('will-download', listener); +} + +module.exports = (options = {}) => { + app.on('session-created', session => { + registerListener(session, options, (error, _) => { + if (error) { + const errorTitle = options.errorTitle || 'Download Error'; + dialog.showErrorBox(errorTitle, error.message); + } + }); + }); +}; + +module.exports.download = (window_, url, options) => new Promise((resolve, reject) => { + options = { + ...options, + unregisterWhenDone: true + }; + + registerListener(window_.webContents.session, options, (error, item) => { + if (error) { + reject(error); + } else { + resolve(item); + } + }); + + window_.webContents.downloadURL(url); +}); + + +/***/ }), + +/***/ "./node_modules/electron-is-dev/index.js": +/*!***********************************************!*\ + !*** ./node_modules/electron-is-dev/index.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const electron = __webpack_require__(/*! electron */ "electron"); + +if (typeof electron === 'string') { + throw new TypeError('Not running in an Electron environment!'); +} + +const app = electron.app || electron.remote.app; + +const isEnvSet = 'ELECTRON_IS_DEV' in process.env; +const getFromEnv = parseInt(process.env.ELECTRON_IS_DEV, 10) === 1; + +module.exports = isEnvSet ? getFromEnv : !app.isPackaged; + + +/***/ }), + +/***/ "./node_modules/electron-store/index.js": +/*!**********************************************!*\ + !*** ./node_modules/electron-store/index.js ***! + \**********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const path = __webpack_require__(/*! path */ "path"); +const electron = __webpack_require__(/*! electron */ "electron"); +const Conf = __webpack_require__(/*! conf */ "./node_modules/conf/index.js"); + +class ElectronStore extends Conf { + constructor(options) { + const defaultCwd = (electron.app || electron.remote.app).getPath('userData'); + + options = { + name: 'config', + ...options + }; + + if (options.cwd) { + options.cwd = path.isAbsolute(options.cwd) ? options.cwd : path.join(defaultCwd, options.cwd); + } else { + options.cwd = defaultCwd; + } + + options.configName = options.name; + delete options.name; + super(options); + } + + openInEditor() { + const open = electron.shell.openItem || electron.shell.openPath; + open(this.path); + } +} + +module.exports = ElectronStore; + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/CancellationToken.js": +/*!**************************************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/builder-util-runtime/out/CancellationToken.js ***! + \**************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.CancellationError = exports.CancellationToken = void 0; +const events_1 = __webpack_require__(/*! events */ "events"); +class CancellationToken extends events_1.EventEmitter { + // babel cannot compile ... correctly for super calls + constructor(parent) { + super(); + this.parentCancelHandler = null; + this._parent = null; + this._cancelled = false; + if (parent != null) { + this.parent = parent; + } + } + get cancelled() { + return this._cancelled || (this._parent != null && this._parent.cancelled); + } + set parent(value) { + this.removeParentCancelHandler(); + this._parent = value; + this.parentCancelHandler = () => this.cancel(); + this._parent.onCancel(this.parentCancelHandler); + } + cancel() { + this._cancelled = true; + this.emit("cancel"); + } + onCancel(handler) { + if (this.cancelled) { + handler(); + } + else { + this.once("cancel", handler); + } + } + createPromise(callback) { + if (this.cancelled) { + return Promise.reject(new CancellationError()); + } + const finallyHandler = () => { + if (cancelHandler != null) { + try { + this.removeListener("cancel", cancelHandler); + cancelHandler = null; + } + catch (ignore) { + // ignore + } + } + }; + let cancelHandler = null; + return new Promise((resolve, reject) => { + let addedCancelHandler = null; + cancelHandler = () => { + try { + if (addedCancelHandler != null) { + addedCancelHandler(); + addedCancelHandler = null; + } + } + finally { + reject(new CancellationError()); + } + }; + if (this.cancelled) { + cancelHandler(); + return; + } + this.onCancel(cancelHandler); + callback(resolve, reject, (callback) => { + addedCancelHandler = callback; + }); + }) + .then(it => { + finallyHandler(); + return it; + }) + .catch(e => { + finallyHandler(); + throw e; + }); + } + removeParentCancelHandler() { + const parent = this._parent; + if (parent != null && this.parentCancelHandler != null) { + parent.removeListener("cancel", this.parentCancelHandler); + this.parentCancelHandler = null; + } + } + dispose() { + try { + this.removeParentCancelHandler(); + } + finally { + this.removeAllListeners(); + this._parent = null; + } + } +} +exports.CancellationToken = CancellationToken; +class CancellationError extends Error { + constructor() { + super("cancelled"); + } +} +exports.CancellationError = CancellationError; +//# sourceMappingURL=CancellationToken.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/ProgressCallbackTransform.js": +/*!**********************************************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/builder-util-runtime/out/ProgressCallbackTransform.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ProgressCallbackTransform = void 0; +const stream_1 = __webpack_require__(/*! stream */ "stream"); +class ProgressCallbackTransform extends stream_1.Transform { + constructor(total, cancellationToken, onProgress) { + super(); + this.total = total; + this.cancellationToken = cancellationToken; + this.onProgress = onProgress; + this.start = Date.now(); + this.transferred = 0; + this.delta = 0; + this.nextUpdate = this.start + 1000; + } + _transform(chunk, encoding, callback) { + if (this.cancellationToken.cancelled) { + callback(new Error("cancelled"), null); + return; + } + this.transferred += chunk.length; + this.delta += chunk.length; + const now = Date.now(); + if (now >= this.nextUpdate && this.transferred !== this.total /* will be emitted on _flush */) { + this.nextUpdate = now + 1000; + this.onProgress({ + total: this.total, + delta: this.delta, + transferred: this.transferred, + percent: (this.transferred / this.total) * 100, + bytesPerSecond: Math.round(this.transferred / ((now - this.start) / 1000)), + }); + this.delta = 0; + } + callback(null, chunk); + } + _flush(callback) { + if (this.cancellationToken.cancelled) { + callback(new Error("cancelled")); + return; + } + this.onProgress({ + total: this.total, + delta: this.delta, + transferred: this.total, + percent: 100, + bytesPerSecond: Math.round(this.transferred / ((Date.now() - this.start) / 1000)), + }); + this.delta = 0; + callback(null); + } +} +exports.ProgressCallbackTransform = ProgressCallbackTransform; +//# sourceMappingURL=ProgressCallbackTransform.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/bintray.js": +/*!****************************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/builder-util-runtime/out/bintray.js ***! + \****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BintrayClient = void 0; +const httpExecutor_1 = __webpack_require__(/*! ./httpExecutor */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/httpExecutor.js"); +class BintrayClient { + constructor(options, httpExecutor, cancellationToken, apiKey) { + this.httpExecutor = httpExecutor; + this.cancellationToken = cancellationToken; + this.requestHeaders = null; + if (options.owner == null) { + throw new Error("owner is not specified"); + } + if (options.package == null) { + throw new Error("package is not specified"); + } + this.repo = options.repo || "generic"; + this.packageName = options.package; + this.owner = options.owner; + this.user = options.user || options.owner; + this.component = options.component || null; + this.distribution = options.distribution || "stable"; + this.auth = apiKey == null ? null : `Basic ${Buffer.from(`${this.user}:${apiKey}`).toString("base64")}`; + this.basePath = `/packages/${this.owner}/${this.repo}/${this.packageName}`; + } + setRequestHeaders(value) { + this.requestHeaders = value; + } + bintrayRequest(path, auth, data = null, cancellationToken, method) { + return httpExecutor_1.parseJson(this.httpExecutor.request(httpExecutor_1.configureRequestOptions({ hostname: "api.bintray.com", path, headers: this.requestHeaders || undefined }, auth, method), cancellationToken, data)); + } + getVersion(version) { + return this.bintrayRequest(`${this.basePath}/versions/${version}`, this.auth, null, this.cancellationToken); + } + getVersionFiles(version) { + return this.bintrayRequest(`${this.basePath}/versions/${version}/files`, this.auth, null, this.cancellationToken); + } + createVersion(version) { + return this.bintrayRequest(`${this.basePath}/versions`, this.auth, { + name: version, + }, this.cancellationToken); + } + deleteVersion(version) { + return this.bintrayRequest(`${this.basePath}/versions/${version}`, this.auth, null, this.cancellationToken, "DELETE"); + } +} +exports.BintrayClient = BintrayClient; +//# sourceMappingURL=bintray.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/httpExecutor.js": +/*!*********************************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/builder-util-runtime/out/httpExecutor.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.safeStringifyJson = exports.configureRequestOptions = exports.safeGetHeader = exports.DigestTransform = exports.configureRequestUrl = exports.configureRequestOptionsFromUrl = exports.HttpExecutor = exports.parseJson = exports.HttpError = exports.createHttpError = void 0; +const crypto_1 = __webpack_require__(/*! crypto */ "crypto"); +const debug_1 = __webpack_require__(/*! debug */ "./node_modules/debug/src/index.js"); +const fs_1 = __webpack_require__(/*! fs */ "fs"); +const stream_1 = __webpack_require__(/*! stream */ "stream"); +const url_1 = __webpack_require__(/*! url */ "url"); +const CancellationToken_1 = __webpack_require__(/*! ./CancellationToken */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/CancellationToken.js"); +const index_1 = __webpack_require__(/*! ./index */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); +const ProgressCallbackTransform_1 = __webpack_require__(/*! ./ProgressCallbackTransform */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/ProgressCallbackTransform.js"); +const debug = debug_1.default("electron-builder"); +function createHttpError(response, description = null) { + return new HttpError(response.statusCode || -1, `${response.statusCode} ${response.statusMessage}` + + (description == null ? "" : "\n" + JSON.stringify(description, null, " ")) + + "\nHeaders: " + + safeStringifyJson(response.headers), description); +} +exports.createHttpError = createHttpError; +const HTTP_STATUS_CODES = new Map([ + [429, "Too many requests"], + [400, "Bad request"], + [403, "Forbidden"], + [404, "Not found"], + [405, "Method not allowed"], + [406, "Not acceptable"], + [408, "Request timeout"], + [413, "Request entity too large"], + [500, "Internal server error"], + [502, "Bad gateway"], + [503, "Service unavailable"], + [504, "Gateway timeout"], + [505, "HTTP version not supported"], +]); +class HttpError extends Error { + constructor(statusCode, message = `HTTP error: ${HTTP_STATUS_CODES.get(statusCode) || statusCode}`, description = null) { + super(message); + this.statusCode = statusCode; + this.description = description; + this.name = "HttpError"; + this.code = `HTTP_ERROR_${statusCode}`; + } +} +exports.HttpError = HttpError; +function parseJson(result) { + return result.then(it => (it == null || it.length === 0 ? null : JSON.parse(it))); +} +exports.parseJson = parseJson; +class HttpExecutor { + constructor() { + this.maxRedirects = 10; + } + request(options, cancellationToken = new CancellationToken_1.CancellationToken(), data) { + configureRequestOptions(options); + const encodedData = data == null ? undefined : Buffer.from(JSON.stringify(data)); + if (encodedData != null) { + options.method = "post"; + options.headers["Content-Type"] = "application/json"; + options.headers["Content-Length"] = encodedData.length; + } + return this.doApiRequest(options, cancellationToken, it => { + ; + it.end(encodedData); + }); + } + doApiRequest(options, cancellationToken, requestProcessor, redirectCount = 0) { + if (debug.enabled) { + debug(`Request: ${safeStringifyJson(options)}`); + } + return cancellationToken.createPromise((resolve, reject, onCancel) => { + const request = this.createRequest(options, (response) => { + try { + this.handleResponse(response, options, cancellationToken, resolve, reject, redirectCount, requestProcessor); + } + catch (e) { + reject(e); + } + }); + this.addErrorAndTimeoutHandlers(request, reject); + this.addRedirectHandlers(request, options, reject, redirectCount, options => { + this.doApiRequest(options, cancellationToken, requestProcessor, redirectCount).then(resolve).catch(reject); + }); + requestProcessor(request, reject); + onCancel(() => request.abort()); + }); + } + // noinspection JSUnusedLocalSymbols + // eslint-disable-next-line + addRedirectHandlers(request, options, reject, redirectCount, handler) { + // not required for NodeJS + } + addErrorAndTimeoutHandlers(request, reject) { + this.addTimeOutHandler(request, reject); + request.on("error", reject); + request.on("aborted", () => { + reject(new Error("Request has been aborted by the server")); + }); + } + handleResponse(response, options, cancellationToken, resolve, reject, redirectCount, requestProcessor) { + if (debug.enabled) { + debug(`Response: ${response.statusCode} ${response.statusMessage}, request options: ${safeStringifyJson(options)}`); + } + // we handle any other >= 400 error on request end (read detailed message in the response body) + if (response.statusCode === 404) { + // error is clear, we don't need to read detailed error description + reject(createHttpError(response, `method: ${options.method || "GET"} url: ${options.protocol || "https:"}//${options.hostname}${options.port ? `:${options.port}` : ""}${options.path} + +Please double check that your authentication token is correct. Due to security reasons actual status maybe not reported, but 404. +`)); + return; + } + else if (response.statusCode === 204) { + // on DELETE request + resolve(); + return; + } + const redirectUrl = safeGetHeader(response, "location"); + if (redirectUrl != null) { + if (redirectCount > this.maxRedirects) { + reject(this.createMaxRedirectError()); + return; + } + this.doApiRequest(HttpExecutor.prepareRedirectUrlOptions(redirectUrl, options), cancellationToken, requestProcessor, redirectCount).then(resolve).catch(reject); + return; + } + response.setEncoding("utf8"); + let data = ""; + response.on("error", reject); + response.on("data", (chunk) => (data += chunk)); + response.on("end", () => { + try { + if (response.statusCode != null && response.statusCode >= 400) { + const contentType = safeGetHeader(response, "content-type"); + const isJson = contentType != null && (Array.isArray(contentType) ? contentType.find(it => it.includes("json")) != null : contentType.includes("json")); + reject(createHttpError(response, isJson ? JSON.parse(data) : data)); + } + else { + resolve(data.length === 0 ? null : data); + } + } + catch (e) { + reject(e); + } + }); + } + async downloadToBuffer(url, options) { + return await options.cancellationToken.createPromise((resolve, reject, onCancel) => { + let result = null; + const requestOptions = { + headers: options.headers || undefined, + // because PrivateGitHubProvider requires HttpExecutor.prepareRedirectUrlOptions logic, so, we need to redirect manually + redirect: "manual", + }; + configureRequestUrl(url, requestOptions); + configureRequestOptions(requestOptions); + this.doDownload(requestOptions, { + destination: null, + options, + onCancel, + callback: error => { + if (error == null) { + resolve(result); + } + else { + reject(error); + } + }, + responseHandler: (response, callback) => { + const contentLength = safeGetHeader(response, "content-length"); + let position = -1; + if (contentLength != null) { + const size = parseInt(contentLength, 10); + if (size > 0) { + if (size > 524288000) { + callback(new Error("Maximum allowed size is 500 MB")); + return; + } + result = Buffer.alloc(size); + position = 0; + } + } + response.on("data", (chunk) => { + if (position !== -1) { + chunk.copy(result, position); + position += chunk.length; + } + else if (result == null) { + result = chunk; + } + else { + if (result.length > 524288000) { + callback(new Error("Maximum allowed size is 500 MB")); + return; + } + result = Buffer.concat([result, chunk]); + } + }); + response.on("end", () => { + if (result != null && position !== -1 && position !== result.length) { + callback(new Error(`Received data length ${position} is not equal to expected ${result.length}`)); + } + else { + callback(null); + } + }); + }, + }, 0); + }); + } + doDownload(requestOptions, options, redirectCount) { + const request = this.createRequest(requestOptions, (response) => { + if (response.statusCode >= 400) { + options.callback(new Error(`Cannot download "${requestOptions.protocol || "https:"}//${requestOptions.hostname}${requestOptions.path}", status ${response.statusCode}: ${response.statusMessage}`)); + return; + } + // It is possible for the response stream to fail, e.g. when a network is lost while + // response stream is in progress. Stop waiting and reject so consumer can catch the error. + response.on("error", options.callback); + // this code not relevant for Electron (redirect event instead handled) + const redirectUrl = safeGetHeader(response, "location"); + if (redirectUrl != null) { + if (redirectCount < this.maxRedirects) { + this.doDownload(HttpExecutor.prepareRedirectUrlOptions(redirectUrl, requestOptions), options, redirectCount++); + } + else { + options.callback(this.createMaxRedirectError()); + } + return; + } + if (options.responseHandler == null) { + configurePipes(options, response); + } + else { + options.responseHandler(response, options.callback); + } + }); + this.addErrorAndTimeoutHandlers(request, options.callback); + this.addRedirectHandlers(request, requestOptions, options.callback, redirectCount, requestOptions => { + this.doDownload(requestOptions, options, redirectCount++); + }); + request.end(); + } + createMaxRedirectError() { + return new Error(`Too many redirects (> ${this.maxRedirects})`); + } + addTimeOutHandler(request, callback) { + request.on("socket", (socket) => { + socket.setTimeout(60 * 1000, () => { + request.abort(); + callback(new Error("Request timed out")); + }); + }); + } + static prepareRedirectUrlOptions(redirectUrl, options) { + const newOptions = configureRequestOptionsFromUrl(redirectUrl, { ...options }); + const headers = newOptions.headers; + if (headers != null && headers.authorization != null && headers.authorization.startsWith("token")) { + const parsedNewUrl = new url_1.URL(redirectUrl); + if (parsedNewUrl.hostname.endsWith(".amazonaws.com") || parsedNewUrl.searchParams.has("X-Amz-Credential")) { + delete headers.authorization; + } + } + return newOptions; + } +} +exports.HttpExecutor = HttpExecutor; +function configureRequestOptionsFromUrl(url, options) { + const result = configureRequestOptions(options); + configureRequestUrl(new url_1.URL(url), result); + return result; +} +exports.configureRequestOptionsFromUrl = configureRequestOptionsFromUrl; +function configureRequestUrl(url, options) { + options.protocol = url.protocol; + options.hostname = url.hostname; + if (url.port) { + options.port = url.port; + } + else if (options.port) { + delete options.port; + } + options.path = url.pathname + url.search; +} +exports.configureRequestUrl = configureRequestUrl; +class DigestTransform extends stream_1.Transform { + constructor(expected, algorithm = "sha512", encoding = "base64") { + super(); + this.expected = expected; + this.algorithm = algorithm; + this.encoding = encoding; + this._actual = null; + this.isValidateOnEnd = true; + this.digester = crypto_1.createHash(algorithm); + } + // noinspection JSUnusedGlobalSymbols + get actual() { + return this._actual; + } + // noinspection JSUnusedGlobalSymbols + _transform(chunk, encoding, callback) { + this.digester.update(chunk); + callback(null, chunk); + } + // noinspection JSUnusedGlobalSymbols + _flush(callback) { + this._actual = this.digester.digest(this.encoding); + if (this.isValidateOnEnd) { + try { + this.validate(); + } + catch (e) { + callback(e); + return; + } + } + callback(null); + } + validate() { + if (this._actual == null) { + throw index_1.newError("Not finished yet", "ERR_STREAM_NOT_FINISHED"); + } + if (this._actual !== this.expected) { + throw index_1.newError(`${this.algorithm} checksum mismatch, expected ${this.expected}, got ${this._actual}`, "ERR_CHECKSUM_MISMATCH"); + } + return null; + } +} +exports.DigestTransform = DigestTransform; +function checkSha2(sha2Header, sha2, callback) { + if (sha2Header != null && sha2 != null && sha2Header !== sha2) { + callback(new Error(`checksum mismatch: expected ${sha2} but got ${sha2Header} (X-Checksum-Sha2 header)`)); + return false; + } + return true; +} +function safeGetHeader(response, headerKey) { + const value = response.headers[headerKey]; + if (value == null) { + return null; + } + else if (Array.isArray(value)) { + // electron API + return value.length === 0 ? null : value[value.length - 1]; + } + else { + return value; + } +} +exports.safeGetHeader = safeGetHeader; +function configurePipes(options, response) { + if (!checkSha2(safeGetHeader(response, "X-Checksum-Sha2"), options.options.sha2, options.callback)) { + return; + } + const streams = []; + if (options.options.onProgress != null) { + const contentLength = safeGetHeader(response, "content-length"); + if (contentLength != null) { + streams.push(new ProgressCallbackTransform_1.ProgressCallbackTransform(parseInt(contentLength, 10), options.options.cancellationToken, options.options.onProgress)); + } + } + const sha512 = options.options.sha512; + if (sha512 != null) { + streams.push(new DigestTransform(sha512, "sha512", sha512.length === 128 && !sha512.includes("+") && !sha512.includes("Z") && !sha512.includes("=") ? "hex" : "base64")); + } + else if (options.options.sha2 != null) { + streams.push(new DigestTransform(options.options.sha2, "sha256", "hex")); + } + const fileOut = fs_1.createWriteStream(options.destination); + streams.push(fileOut); + let lastStream = response; + for (const stream of streams) { + stream.on("error", (error) => { + if (!options.options.cancellationToken.cancelled) { + options.callback(error); + } + }); + lastStream = lastStream.pipe(stream); + } + fileOut.on("finish", () => { + ; + fileOut.close(options.callback); + }); +} +function configureRequestOptions(options, token, method) { + if (method != null) { + options.method = method; + } + options.headers = { ...options.headers }; + const headers = options.headers; + if (token != null) { + ; + headers.authorization = token.startsWith("Basic") ? token : `token ${token}`; + } + if (headers["User-Agent"] == null) { + headers["User-Agent"] = "electron-builder"; + } + if (method == null || method === "GET" || headers["Cache-Control"] == null) { + headers["Cache-Control"] = "no-cache"; + } + // do not specify for node (in any case we use https module) + if (options.protocol == null && process.versions.electron != null) { + options.protocol = "https:"; + } + return options; +} +exports.configureRequestOptions = configureRequestOptions; +function safeStringifyJson(data, skippedNames) { + return JSON.stringify(data, (name, value) => { + if (name.endsWith("authorization") || + name.endsWith("Password") || + name.endsWith("PASSWORD") || + name.endsWith("Token") || + name.includes("password") || + name.includes("token") || + (skippedNames != null && skippedNames.has(name))) { + return ""; + } + return value; + }, 2); +} +exports.safeStringifyJson = safeStringifyJson; +//# sourceMappingURL=httpExecutor.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js": +/*!**************************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js ***! + \**************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.newError = exports.asArray = exports.CURRENT_APP_PACKAGE_FILE_NAME = exports.CURRENT_APP_INSTALLER_FILE_NAME = exports.XElement = exports.parseXml = exports.ProgressCallbackTransform = exports.UUID = exports.parseDn = exports.githubUrl = exports.getS3LikeProviderBaseUrl = exports.configureRequestUrl = exports.parseJson = exports.safeStringifyJson = exports.configureRequestOptionsFromUrl = exports.configureRequestOptions = exports.safeGetHeader = exports.DigestTransform = exports.HttpExecutor = exports.createHttpError = exports.HttpError = exports.CancellationError = exports.CancellationToken = void 0; +var CancellationToken_1 = __webpack_require__(/*! ./CancellationToken */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/CancellationToken.js"); +Object.defineProperty(exports, "CancellationToken", { enumerable: true, get: function () { return CancellationToken_1.CancellationToken; } }); +Object.defineProperty(exports, "CancellationError", { enumerable: true, get: function () { return CancellationToken_1.CancellationError; } }); +var httpExecutor_1 = __webpack_require__(/*! ./httpExecutor */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/httpExecutor.js"); +Object.defineProperty(exports, "HttpError", { enumerable: true, get: function () { return httpExecutor_1.HttpError; } }); +Object.defineProperty(exports, "createHttpError", { enumerable: true, get: function () { return httpExecutor_1.createHttpError; } }); +Object.defineProperty(exports, "HttpExecutor", { enumerable: true, get: function () { return httpExecutor_1.HttpExecutor; } }); +Object.defineProperty(exports, "DigestTransform", { enumerable: true, get: function () { return httpExecutor_1.DigestTransform; } }); +Object.defineProperty(exports, "safeGetHeader", { enumerable: true, get: function () { return httpExecutor_1.safeGetHeader; } }); +Object.defineProperty(exports, "configureRequestOptions", { enumerable: true, get: function () { return httpExecutor_1.configureRequestOptions; } }); +Object.defineProperty(exports, "configureRequestOptionsFromUrl", { enumerable: true, get: function () { return httpExecutor_1.configureRequestOptionsFromUrl; } }); +Object.defineProperty(exports, "safeStringifyJson", { enumerable: true, get: function () { return httpExecutor_1.safeStringifyJson; } }); +Object.defineProperty(exports, "parseJson", { enumerable: true, get: function () { return httpExecutor_1.parseJson; } }); +Object.defineProperty(exports, "configureRequestUrl", { enumerable: true, get: function () { return httpExecutor_1.configureRequestUrl; } }); +var publishOptions_1 = __webpack_require__(/*! ./publishOptions */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/publishOptions.js"); +Object.defineProperty(exports, "getS3LikeProviderBaseUrl", { enumerable: true, get: function () { return publishOptions_1.getS3LikeProviderBaseUrl; } }); +Object.defineProperty(exports, "githubUrl", { enumerable: true, get: function () { return publishOptions_1.githubUrl; } }); +var rfc2253Parser_1 = __webpack_require__(/*! ./rfc2253Parser */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/rfc2253Parser.js"); +Object.defineProperty(exports, "parseDn", { enumerable: true, get: function () { return rfc2253Parser_1.parseDn; } }); +var uuid_1 = __webpack_require__(/*! ./uuid */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/uuid.js"); +Object.defineProperty(exports, "UUID", { enumerable: true, get: function () { return uuid_1.UUID; } }); +var ProgressCallbackTransform_1 = __webpack_require__(/*! ./ProgressCallbackTransform */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/ProgressCallbackTransform.js"); +Object.defineProperty(exports, "ProgressCallbackTransform", { enumerable: true, get: function () { return ProgressCallbackTransform_1.ProgressCallbackTransform; } }); +var xml_1 = __webpack_require__(/*! ./xml */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/xml.js"); +Object.defineProperty(exports, "parseXml", { enumerable: true, get: function () { return xml_1.parseXml; } }); +Object.defineProperty(exports, "XElement", { enumerable: true, get: function () { return xml_1.XElement; } }); +// nsis +exports.CURRENT_APP_INSTALLER_FILE_NAME = "installer.exe"; +// nsis-web +exports.CURRENT_APP_PACKAGE_FILE_NAME = "package.7z"; +function asArray(v) { + if (v == null) { + return []; + } + else if (Array.isArray(v)) { + return v; + } + else { + return [v]; + } +} +exports.asArray = asArray; +function newError(message, code) { + const error = new Error(message); + error.code = code; + return error; +} +exports.newError = newError; +//# sourceMappingURL=index.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/publishOptions.js": +/*!***********************************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/builder-util-runtime/out/publishOptions.js ***! + \***********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getS3LikeProviderBaseUrl = exports.githubUrl = void 0; +/** @private */ +function githubUrl(options, defaultHost = "github.com") { + return `${options.protocol || "https"}://${options.host || defaultHost}`; +} +exports.githubUrl = githubUrl; +function getS3LikeProviderBaseUrl(configuration) { + const provider = configuration.provider; + if (provider === "s3") { + return s3Url(configuration); + } + if (provider === "spaces") { + return spacesUrl(configuration); + } + throw new Error(`Not supported provider: ${provider}`); +} +exports.getS3LikeProviderBaseUrl = getS3LikeProviderBaseUrl; +function s3Url(options) { + let url; + if (options.endpoint != null) { + url = `${options.endpoint}/${options.bucket}`; + } + else if (options.bucket.includes(".")) { + if (options.region == null) { + throw new Error(`Bucket name "${options.bucket}" includes a dot, but S3 region is missing`); + } + // special case, see http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro + if (options.region === "us-east-1") { + url = `https://s3.amazonaws.com/${options.bucket}`; + } + else { + url = `https://s3-${options.region}.amazonaws.com/${options.bucket}`; + } + } + else if (options.region === "cn-north-1") { + url = `https://${options.bucket}.s3.${options.region}.amazonaws.com.cn`; + } + else { + url = `https://${options.bucket}.s3.amazonaws.com`; + } + return appendPath(url, options.path); +} +function appendPath(url, p) { + if (p != null && p.length > 0) { + if (!p.startsWith("/")) { + url += "/"; + } + url += p; + } + return url; +} +function spacesUrl(options) { + if (options.name == null) { + throw new Error(`name is missing`); + } + if (options.region == null) { + throw new Error(`region is missing`); + } + return appendPath(`https://${options.name}.${options.region}.digitaloceanspaces.com`, options.path); +} +//# sourceMappingURL=publishOptions.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/rfc2253Parser.js": +/*!**********************************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/builder-util-runtime/out/rfc2253Parser.js ***! + \**********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseDn = void 0; +function parseDn(seq) { + let quoted = false; + let key = null; + let token = ""; + let nextNonSpace = 0; + seq = seq.trim(); + const result = new Map(); + for (let i = 0; i <= seq.length; i++) { + if (i === seq.length) { + if (key !== null) { + result.set(key, token); + } + break; + } + const ch = seq[i]; + if (quoted) { + if (ch === '"') { + quoted = false; + continue; + } + } + else { + if (ch === '"') { + quoted = true; + continue; + } + if (ch === "\\") { + i++; + const ord = parseInt(seq.slice(i, i + 2), 16); + if (Number.isNaN(ord)) { + token += seq[i]; + } + else { + i++; + token += String.fromCharCode(ord); + } + continue; + } + if (key === null && ch === "=") { + key = token; + token = ""; + continue; + } + if (ch === "," || ch === ";" || ch === "+") { + if (key !== null) { + result.set(key, token); + } + key = null; + token = ""; + continue; + } + } + if (ch === " " && !quoted) { + if (token.length === 0) { + continue; + } + if (i > nextNonSpace) { + let j = i; + while (seq[j] === " ") { + j++; + } + nextNonSpace = j; + } + if (nextNonSpace >= seq.length || + seq[nextNonSpace] === "," || + seq[nextNonSpace] === ";" || + (key === null && seq[nextNonSpace] === "=") || + (key !== null && seq[nextNonSpace] === "+")) { + i = nextNonSpace - 1; + continue; + } + } + token += ch; + } + return result; +} +exports.parseDn = parseDn; +//# sourceMappingURL=rfc2253Parser.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/uuid.js": +/*!*************************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/builder-util-runtime/out/uuid.js ***! + \*************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.nil = exports.UUID = void 0; +const crypto_1 = __webpack_require__(/*! crypto */ "crypto"); +const index_1 = __webpack_require__(/*! ./index */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); +const invalidName = "options.name must be either a string or a Buffer"; +// Node ID according to rfc4122#section-4.5 +const randomHost = crypto_1.randomBytes(16); +randomHost[0] = randomHost[0] | 0x01; +// lookup table hex to byte +const hex2byte = {}; +// lookup table byte to hex +const byte2hex = []; +// populate lookup tables +for (let i = 0; i < 256; i++) { + const hex = (i + 0x100).toString(16).substr(1); + hex2byte[hex] = i; + byte2hex[i] = hex; +} +// UUID class +class UUID { + constructor(uuid) { + this.ascii = null; + this.binary = null; + const check = UUID.check(uuid); + if (!check) { + throw new Error("not a UUID"); + } + this.version = check.version; + if (check.format === "ascii") { + this.ascii = uuid; + } + else { + this.binary = uuid; + } + } + static v5(name, namespace) { + return uuidNamed(name, "sha1", 0x50, namespace); + } + toString() { + if (this.ascii == null) { + this.ascii = stringify(this.binary); + } + return this.ascii; + } + inspect() { + return `UUID v${this.version} ${this.toString()}`; + } + static check(uuid, offset = 0) { + if (typeof uuid === "string") { + uuid = uuid.toLowerCase(); + if (!/^[a-f0-9]{8}(-[a-f0-9]{4}){3}-([a-f0-9]{12})$/.test(uuid)) { + return false; + } + if (uuid === "00000000-0000-0000-0000-000000000000") { + return { version: undefined, variant: "nil", format: "ascii" }; + } + return { + version: (hex2byte[uuid[14] + uuid[15]] & 0xf0) >> 4, + variant: getVariant((hex2byte[uuid[19] + uuid[20]] & 0xe0) >> 5), + format: "ascii", + }; + } + if (Buffer.isBuffer(uuid)) { + if (uuid.length < offset + 16) { + return false; + } + let i = 0; + for (; i < 16; i++) { + if (uuid[offset + i] !== 0) { + break; + } + } + if (i === 16) { + return { version: undefined, variant: "nil", format: "binary" }; + } + return { + version: (uuid[offset + 6] & 0xf0) >> 4, + variant: getVariant((uuid[offset + 8] & 0xe0) >> 5), + format: "binary", + }; + } + throw index_1.newError("Unknown type of uuid", "ERR_UNKNOWN_UUID_TYPE"); + } + // read stringified uuid into a Buffer + static parse(input) { + const buffer = Buffer.allocUnsafe(16); + let j = 0; + for (let i = 0; i < 16; i++) { + buffer[i] = hex2byte[input[j++] + input[j++]]; + if (i === 3 || i === 5 || i === 7 || i === 9) { + j += 1; + } + } + return buffer; + } +} +exports.UUID = UUID; +// from rfc4122#appendix-C +UUID.OID = UUID.parse("6ba7b812-9dad-11d1-80b4-00c04fd430c8"); +// according to rfc4122#section-4.1.1 +function getVariant(bits) { + switch (bits) { + case 0: + case 1: + case 3: + return "ncs"; + case 4: + case 5: + return "rfc4122"; + case 6: + return "microsoft"; + default: + return "future"; + } +} +var UuidEncoding; +(function (UuidEncoding) { + UuidEncoding[UuidEncoding["ASCII"] = 0] = "ASCII"; + UuidEncoding[UuidEncoding["BINARY"] = 1] = "BINARY"; + UuidEncoding[UuidEncoding["OBJECT"] = 2] = "OBJECT"; +})(UuidEncoding || (UuidEncoding = {})); +// v3 + v5 +function uuidNamed(name, hashMethod, version, namespace, encoding = UuidEncoding.ASCII) { + const hash = crypto_1.createHash(hashMethod); + const nameIsNotAString = typeof name !== "string"; + if (nameIsNotAString && !Buffer.isBuffer(name)) { + throw index_1.newError(invalidName, "ERR_INVALID_UUID_NAME"); + } + hash.update(namespace); + hash.update(name); + const buffer = hash.digest(); + let result; + switch (encoding) { + case UuidEncoding.BINARY: + buffer[6] = (buffer[6] & 0x0f) | version; + buffer[8] = (buffer[8] & 0x3f) | 0x80; + result = buffer; + break; + case UuidEncoding.OBJECT: + buffer[6] = (buffer[6] & 0x0f) | version; + buffer[8] = (buffer[8] & 0x3f) | 0x80; + result = new UUID(buffer); + break; + default: + result = + byte2hex[buffer[0]] + + byte2hex[buffer[1]] + + byte2hex[buffer[2]] + + byte2hex[buffer[3]] + + "-" + + byte2hex[buffer[4]] + + byte2hex[buffer[5]] + + "-" + + byte2hex[(buffer[6] & 0x0f) | version] + + byte2hex[buffer[7]] + + "-" + + byte2hex[(buffer[8] & 0x3f) | 0x80] + + byte2hex[buffer[9]] + + "-" + + byte2hex[buffer[10]] + + byte2hex[buffer[11]] + + byte2hex[buffer[12]] + + byte2hex[buffer[13]] + + byte2hex[buffer[14]] + + byte2hex[buffer[15]]; + break; + } + return result; +} +function stringify(buffer) { + return (byte2hex[buffer[0]] + + byte2hex[buffer[1]] + + byte2hex[buffer[2]] + + byte2hex[buffer[3]] + + "-" + + byte2hex[buffer[4]] + + byte2hex[buffer[5]] + + "-" + + byte2hex[buffer[6]] + + byte2hex[buffer[7]] + + "-" + + byte2hex[buffer[8]] + + byte2hex[buffer[9]] + + "-" + + byte2hex[buffer[10]] + + byte2hex[buffer[11]] + + byte2hex[buffer[12]] + + byte2hex[buffer[13]] + + byte2hex[buffer[14]] + + byte2hex[buffer[15]]); +} +// according to rfc4122#section-4.1.7 +exports.nil = new UUID("00000000-0000-0000-0000-000000000000"); +// UUID.v4 = uuidRandom +// UUID.v4fast = uuidRandomFast +// UUID.v3 = function(options, callback) { +// return uuidNamed("md5", 0x30, options, callback) +// } +//# sourceMappingURL=uuid.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/xml.js": +/*!************************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/builder-util-runtime/out/xml.js ***! + \************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseXml = exports.XElement = void 0; +const sax = __webpack_require__(/*! sax */ "./node_modules/sax/lib/sax.js"); +const index_1 = __webpack_require__(/*! ./index */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); +class XElement { + constructor(name) { + this.name = name; + this.value = ""; + this.attributes = null; + this.isCData = false; + this.elements = null; + if (!name) { + throw index_1.newError("Element name cannot be empty", "ERR_XML_ELEMENT_NAME_EMPTY"); + } + if (!isValidName(name)) { + throw index_1.newError(`Invalid element name: ${name}`, "ERR_XML_ELEMENT_INVALID_NAME"); + } + } + attribute(name) { + const result = this.attributes === null ? null : this.attributes[name]; + if (result == null) { + throw index_1.newError(`No attribute "${name}"`, "ERR_XML_MISSED_ATTRIBUTE"); + } + return result; + } + removeAttribute(name) { + if (this.attributes !== null) { + delete this.attributes[name]; + } + } + element(name, ignoreCase = false, errorIfMissed = null) { + const result = this.elementOrNull(name, ignoreCase); + if (result === null) { + throw index_1.newError(errorIfMissed || `No element "${name}"`, "ERR_XML_MISSED_ELEMENT"); + } + return result; + } + elementOrNull(name, ignoreCase = false) { + if (this.elements === null) { + return null; + } + for (const element of this.elements) { + if (isNameEquals(element, name, ignoreCase)) { + return element; + } + } + return null; + } + getElements(name, ignoreCase = false) { + if (this.elements === null) { + return []; + } + return this.elements.filter(it => isNameEquals(it, name, ignoreCase)); + } + elementValueOrEmpty(name, ignoreCase = false) { + const element = this.elementOrNull(name, ignoreCase); + return element === null ? "" : element.value; + } +} +exports.XElement = XElement; +const NAME_REG_EXP = new RegExp(/^[A-Za-z_][:A-Za-z0-9_-]*$/i); +function isValidName(name) { + return NAME_REG_EXP.test(name); +} +function isNameEquals(element, name, ignoreCase) { + const elementName = element.name; + return elementName === name || (ignoreCase === true && elementName.length === name.length && elementName.toLowerCase() === name.toLowerCase()); +} +function parseXml(data) { + let rootElement = null; + const parser = sax.parser(true, {}); + const elements = []; + parser.onopentag = saxElement => { + const element = new XElement(saxElement.name); + element.attributes = saxElement.attributes; + if (rootElement === null) { + rootElement = element; + } + else { + const parent = elements[elements.length - 1]; + if (parent.elements == null) { + parent.elements = []; + } + parent.elements.push(element); + } + elements.push(element); + }; + parser.onclosetag = () => { + elements.pop(); + }; + parser.ontext = text => { + if (elements.length > 0) { + elements[elements.length - 1].value = text; + } + }; + parser.oncdata = cdata => { + const element = elements[elements.length - 1]; + element.value = cdata; + element.isCData = true; + }; + parser.onerror = err => { + throw err; + }; + parser.write(data); + return rootElement; +} +exports.parseXml = parseXml; +//# sourceMappingURL=xml.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/classes/comparator.js": +/*!*********************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/classes/comparator.js ***! + \*********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const ANY = Symbol('SemVer ANY') +// hoisted class for cyclic dependency +class Comparator { + static get ANY () { + return ANY + } + constructor (comp, options) { + options = parseOptions(options) + + if (comp instanceof Comparator) { + if (comp.loose === !!options.loose) { + return comp + } else { + comp = comp.value + } + } + + debug('comparator', comp, options) + this.options = options + this.loose = !!options.loose + this.parse(comp) + + if (this.semver === ANY) { + this.value = '' + } else { + this.value = this.operator + this.semver.version + } + + debug('comp', this) + } + + parse (comp) { + const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + const m = comp.match(r) + + if (!m) { + throw new TypeError(`Invalid comparator: ${comp}`) + } + + this.operator = m[1] !== undefined ? m[1] : '' + if (this.operator === '=') { + this.operator = '' + } + + // if it literally is just '>' or '' then allow anything. + if (!m[2]) { + this.semver = ANY + } else { + this.semver = new SemVer(m[2], this.options.loose) + } + } + + toString () { + return this.value + } + + test (version) { + debug('Comparator.test', version, this.options.loose) + + if (this.semver === ANY || version === ANY) { + return true + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + return cmp(version, this.operator, this.semver, this.options) + } + + intersects (comp, options) { + if (!(comp instanceof Comparator)) { + throw new TypeError('a Comparator is required') + } + + if (!options || typeof options !== 'object') { + options = { + loose: !!options, + includePrerelease: false + } + } + + if (this.operator === '') { + if (this.value === '') { + return true + } + return new Range(comp.value, options).test(this.value) + } else if (comp.operator === '') { + if (comp.value === '') { + return true + } + return new Range(this.value, options).test(comp.semver) + } + + const sameDirectionIncreasing = + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '>=' || comp.operator === '>') + const sameDirectionDecreasing = + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '<=' || comp.operator === '<') + const sameSemVer = this.semver.version === comp.semver.version + const differentDirectionsInclusive = + (this.operator === '>=' || this.operator === '<=') && + (comp.operator === '>=' || comp.operator === '<=') + const oppositeDirectionsLessThan = + cmp(this.semver, '<', comp.semver, options) && + (this.operator === '>=' || this.operator === '>') && + (comp.operator === '<=' || comp.operator === '<') + const oppositeDirectionsGreaterThan = + cmp(this.semver, '>', comp.semver, options) && + (this.operator === '<=' || this.operator === '<') && + (comp.operator === '>=' || comp.operator === '>') + + return ( + sameDirectionIncreasing || + sameDirectionDecreasing || + (sameSemVer && differentDirectionsInclusive) || + oppositeDirectionsLessThan || + oppositeDirectionsGreaterThan + ) + } +} + +module.exports = Comparator + +const parseOptions = __webpack_require__(/*! ../internal/parse-options */ "./node_modules/electron-updater/node_modules/semver/internal/parse-options.js") +const {re, t} = __webpack_require__(/*! ../internal/re */ "./node_modules/electron-updater/node_modules/semver/internal/re.js") +const cmp = __webpack_require__(/*! ../functions/cmp */ "./node_modules/electron-updater/node_modules/semver/functions/cmp.js") +const debug = __webpack_require__(/*! ../internal/debug */ "./node_modules/electron-updater/node_modules/semver/internal/debug.js") +const SemVer = __webpack_require__(/*! ./semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") +const Range = __webpack_require__(/*! ./range */ "./node_modules/electron-updater/node_modules/semver/classes/range.js") + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/classes/range.js": +/*!****************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/classes/range.js ***! + \****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// hoisted class for cyclic dependency +class Range { + constructor (range, options) { + options = parseOptions(options) + + if (range instanceof Range) { + if ( + range.loose === !!options.loose && + range.includePrerelease === !!options.includePrerelease + ) { + return range + } else { + return new Range(range.raw, options) + } + } + + if (range instanceof Comparator) { + // just put it in the set and return + this.raw = range.value + this.set = [[range]] + this.format() + return this + } + + this.options = options + this.loose = !!options.loose + this.includePrerelease = !!options.includePrerelease + + // First, split based on boolean or || + this.raw = range + this.set = range + .split(/\s*\|\|\s*/) + // map the range to a 2d array of comparators + .map(range => this.parseRange(range.trim())) + // throw out any comparator lists that are empty + // this generally means that it was not a valid range, which is allowed + // in loose mode, but will still throw if the WHOLE range is invalid. + .filter(c => c.length) + + if (!this.set.length) { + throw new TypeError(`Invalid SemVer Range: ${range}`) + } + + // if we have any that are not the null set, throw out null sets. + if (this.set.length > 1) { + // keep the first one, in case they're all null sets + const first = this.set[0] + this.set = this.set.filter(c => !isNullSet(c[0])) + if (this.set.length === 0) + this.set = [first] + else if (this.set.length > 1) { + // if we have any that are *, then the range is just * + for (const c of this.set) { + if (c.length === 1 && isAny(c[0])) { + this.set = [c] + break + } + } + } + } + + this.format() + } + + format () { + this.range = this.set + .map((comps) => { + return comps.join(' ').trim() + }) + .join('||') + .trim() + return this.range + } + + toString () { + return this.range + } + + parseRange (range) { + range = range.trim() + + // memoize range parsing for performance. + // this is a very hot path, and fully deterministic. + const memoOpts = Object.keys(this.options).join(',') + const memoKey = `parseRange:${memoOpts}:${range}` + const cached = cache.get(memoKey) + if (cached) + return cached + + const loose = this.options.loose + // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` + const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] + range = range.replace(hr, hyphenReplace(this.options.includePrerelease)) + debug('hyphen replace', range) + // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, re[t.COMPARATORTRIM]) + + // `~ 1.2.3` => `~1.2.3` + range = range.replace(re[t.TILDETRIM], tildeTrimReplace) + + // `^ 1.2.3` => `^1.2.3` + range = range.replace(re[t.CARETTRIM], caretTrimReplace) + + // normalize spaces + range = range.split(/\s+/).join(' ') + + // At this point, the range is completely trimmed and + // ready to be split into comparators. + + const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + const rangeList = range + .split(' ') + .map(comp => parseComparator(comp, this.options)) + .join(' ') + .split(/\s+/) + // >=0.0.0 is equivalent to * + .map(comp => replaceGTE0(comp, this.options)) + // in loose mode, throw out any that are not valid comparators + .filter(this.options.loose ? comp => !!comp.match(compRe) : () => true) + .map(comp => new Comparator(comp, this.options)) + + // if any comparators are the null set, then replace with JUST null set + // if more than one comparator, remove any * comparators + // also, don't include the same comparator more than once + const l = rangeList.length + const rangeMap = new Map() + for (const comp of rangeList) { + if (isNullSet(comp)) + return [comp] + rangeMap.set(comp.value, comp) + } + if (rangeMap.size > 1 && rangeMap.has('')) + rangeMap.delete('') + + const result = [...rangeMap.values()] + cache.set(memoKey, result) + return result + } + + intersects (range, options) { + if (!(range instanceof Range)) { + throw new TypeError('a Range is required') + } + + return this.set.some((thisComparators) => { + return ( + isSatisfiable(thisComparators, options) && + range.set.some((rangeComparators) => { + return ( + isSatisfiable(rangeComparators, options) && + thisComparators.every((thisComparator) => { + return rangeComparators.every((rangeComparator) => { + return thisComparator.intersects(rangeComparator, options) + }) + }) + ) + }) + ) + }) + } + + // if ANY of the sets match ALL of its comparators, then pass + test (version) { + if (!version) { + return false + } + + if (typeof version === 'string') { + try { + version = new SemVer(version, this.options) + } catch (er) { + return false + } + } + + for (let i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version, this.options)) { + return true + } + } + return false + } +} +module.exports = Range + +const LRU = __webpack_require__(/*! lru-cache */ "./node_modules/lru-cache/index.js") +const cache = new LRU({ max: 1000 }) + +const parseOptions = __webpack_require__(/*! ../internal/parse-options */ "./node_modules/electron-updater/node_modules/semver/internal/parse-options.js") +const Comparator = __webpack_require__(/*! ./comparator */ "./node_modules/electron-updater/node_modules/semver/classes/comparator.js") +const debug = __webpack_require__(/*! ../internal/debug */ "./node_modules/electron-updater/node_modules/semver/internal/debug.js") +const SemVer = __webpack_require__(/*! ./semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") +const { + re, + t, + comparatorTrimReplace, + tildeTrimReplace, + caretTrimReplace +} = __webpack_require__(/*! ../internal/re */ "./node_modules/electron-updater/node_modules/semver/internal/re.js") + +const isNullSet = c => c.value === '<0.0.0-0' +const isAny = c => c.value === '' + +// take a set of comparators and determine whether there +// exists a version which can satisfy it +const isSatisfiable = (comparators, options) => { + let result = true + const remainingComparators = comparators.slice() + let testComparator = remainingComparators.pop() + + while (result && remainingComparators.length) { + result = remainingComparators.every((otherComparator) => { + return testComparator.intersects(otherComparator, options) + }) + + testComparator = remainingComparators.pop() + } + + return result +} + +// comprised of xranges, tildes, stars, and gtlt's at this point. +// already replaced the hyphen ranges +// turn into a set of JUST comparators. +const parseComparator = (comp, options) => { + debug('comp', comp, options) + comp = replaceCarets(comp, options) + debug('caret', comp) + comp = replaceTildes(comp, options) + debug('tildes', comp) + comp = replaceXRanges(comp, options) + debug('xrange', comp) + comp = replaceStars(comp, options) + debug('stars', comp) + return comp +} + +const isX = id => !id || id.toLowerCase() === 'x' || id === '*' + +// ~, ~> --> * (any, kinda silly) +// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0 +// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0 +// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0 +// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0 +// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 +const replaceTildes = (comp, options) => + comp.trim().split(/\s+/).map((comp) => { + return replaceTilde(comp, options) + }).join(' ') + +const replaceTilde = (comp, options) => { + const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] + return comp.replace(r, (_, M, m, p, pr) => { + debug('tilde', comp, _, M, m, p, pr) + let ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = `>=${M}.0.0 <${+M + 1}.0.0-0` + } else if (isX(p)) { + // ~1.2 == >=1.2.0 <1.3.0-0 + ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0` + } else if (pr) { + debug('replaceTilde pr', pr) + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${+m + 1}.0-0` + } else { + // ~1.2.3 == >=1.2.3 <1.3.0-0 + ret = `>=${M}.${m}.${p + } <${M}.${+m + 1}.0-0` + } + + debug('tilde return', ret) + return ret + }) +} + +// ^ --> * (any, kinda silly) +// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0 +// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0 +// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0 +// ^1.2.3 --> >=1.2.3 <2.0.0-0 +// ^1.2.0 --> >=1.2.0 <2.0.0-0 +const replaceCarets = (comp, options) => + comp.trim().split(/\s+/).map((comp) => { + return replaceCaret(comp, options) + }).join(' ') + +const replaceCaret = (comp, options) => { + debug('caret', comp, options) + const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] + const z = options.includePrerelease ? '-0' : '' + return comp.replace(r, (_, M, m, p, pr) => { + debug('caret', comp, _, M, m, p, pr) + let ret + + if (isX(M)) { + ret = '' + } else if (isX(m)) { + ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0` + } else if (isX(p)) { + if (M === '0') { + ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0` + } else { + ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0` + } + } else if (pr) { + debug('replaceCaret pr', pr) + if (M === '0') { + if (m === '0') { + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${m}.${+p + 1}-0` + } else { + ret = `>=${M}.${m}.${p}-${pr + } <${M}.${+m + 1}.0-0` + } + } else { + ret = `>=${M}.${m}.${p}-${pr + } <${+M + 1}.0.0-0` + } + } else { + debug('no pr') + if (M === '0') { + if (m === '0') { + ret = `>=${M}.${m}.${p + }${z} <${M}.${m}.${+p + 1}-0` + } else { + ret = `>=${M}.${m}.${p + }${z} <${M}.${+m + 1}.0-0` + } + } else { + ret = `>=${M}.${m}.${p + } <${+M + 1}.0.0-0` + } + } + + debug('caret return', ret) + return ret + }) +} + +const replaceXRanges = (comp, options) => { + debug('replaceXRanges', comp, options) + return comp.split(/\s+/).map((comp) => { + return replaceXRange(comp, options) + }).join(' ') +} + +const replaceXRange = (comp, options) => { + comp = comp.trim() + const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] + return comp.replace(r, (ret, gtlt, M, m, p, pr) => { + debug('xRange', comp, ret, gtlt, M, m, p, pr) + const xM = isX(M) + const xm = xM || isX(m) + const xp = xm || isX(p) + const anyX = xp + + if (gtlt === '=' && anyX) { + gtlt = '' + } + + // if we're including prereleases in the match, then we need + // to fix this to -0, the lowest possible prerelease value + pr = options.includePrerelease ? '-0' : '' + + if (xM) { + if (gtlt === '>' || gtlt === '<') { + // nothing is allowed + ret = '<0.0.0-0' + } else { + // nothing is forbidden + ret = '*' + } + } else if (gtlt && anyX) { + // we know patch is an x, because we have any x at all. + // replace X with 0 + if (xm) { + m = 0 + } + p = 0 + + if (gtlt === '>') { + // >1 => >=2.0.0 + // >1.2 => >=1.3.0 + gtlt = '>=' + if (xm) { + M = +M + 1 + m = 0 + p = 0 + } else { + m = +m + 1 + p = 0 + } + } else if (gtlt === '<=') { + // <=0.7.x is actually <0.8.0, since any 0.7.x should + // pass. Similarly, <=7.x is actually <8.0.0, etc. + gtlt = '<' + if (xm) { + M = +M + 1 + } else { + m = +m + 1 + } + } + + if (gtlt === '<') + pr = '-0' + + ret = `${gtlt + M}.${m}.${p}${pr}` + } else if (xm) { + ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0` + } else if (xp) { + ret = `>=${M}.${m}.0${pr + } <${M}.${+m + 1}.0-0` + } + + debug('xRange return', ret) + + return ret + }) +} + +// Because * is AND-ed with everything else in the comparator, +// and '' means "any version", just remove the *s entirely. +const replaceStars = (comp, options) => { + debug('replaceStars', comp, options) + // Looseness is ignored here. star is always as loose as it gets! + return comp.trim().replace(re[t.STAR], '') +} + +const replaceGTE0 = (comp, options) => { + debug('replaceGTE0', comp, options) + return comp.trim() + .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') +} + +// This function is passed to string.replace(re[t.HYPHENRANGE]) +// M, m, patch, prerelease, build +// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 +// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do +// 1.2 - 3.4 => >=1.2.0 <3.5.0-0 +const hyphenReplace = incPr => ($0, + from, fM, fm, fp, fpr, fb, + to, tM, tm, tp, tpr, tb) => { + if (isX(fM)) { + from = '' + } else if (isX(fm)) { + from = `>=${fM}.0.0${incPr ? '-0' : ''}` + } else if (isX(fp)) { + from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}` + } else if (fpr) { + from = `>=${from}` + } else { + from = `>=${from}${incPr ? '-0' : ''}` + } + + if (isX(tM)) { + to = '' + } else if (isX(tm)) { + to = `<${+tM + 1}.0.0-0` + } else if (isX(tp)) { + to = `<${tM}.${+tm + 1}.0-0` + } else if (tpr) { + to = `<=${tM}.${tm}.${tp}-${tpr}` + } else if (incPr) { + to = `<${tM}.${tm}.${+tp + 1}-0` + } else { + to = `<=${to}` + } + + return (`${from} ${to}`).trim() +} + +const testSet = (set, version, options) => { + for (let i = 0; i < set.length; i++) { + if (!set[i].test(version)) { + return false + } + } + + if (version.prerelease.length && !options.includePrerelease) { + // Find the set of versions that are allowed to have prereleases + // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 + // That should allow `1.2.3-pr.2` to pass. + // However, `1.2.4-alpha.notready` should NOT be allowed, + // even though it's within the range set by the comparators. + for (let i = 0; i < set.length; i++) { + debug(set[i].semver) + if (set[i].semver === Comparator.ANY) { + continue + } + + if (set[i].semver.prerelease.length > 0) { + const allowed = set[i].semver + if (allowed.major === version.major && + allowed.minor === version.minor && + allowed.patch === version.patch) { + return true + } + } + } + + // Version has a -pre, but it's not one of the ones we like. + return false + } + + return true +} + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/classes/semver.js": +/*!*****************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/classes/semver.js ***! + \*****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const debug = __webpack_require__(/*! ../internal/debug */ "./node_modules/electron-updater/node_modules/semver/internal/debug.js") +const { MAX_LENGTH, MAX_SAFE_INTEGER } = __webpack_require__(/*! ../internal/constants */ "./node_modules/electron-updater/node_modules/semver/internal/constants.js") +const { re, t } = __webpack_require__(/*! ../internal/re */ "./node_modules/electron-updater/node_modules/semver/internal/re.js") + +const parseOptions = __webpack_require__(/*! ../internal/parse-options */ "./node_modules/electron-updater/node_modules/semver/internal/parse-options.js") +const { compareIdentifiers } = __webpack_require__(/*! ../internal/identifiers */ "./node_modules/electron-updater/node_modules/semver/internal/identifiers.js") +class SemVer { + constructor (version, options) { + options = parseOptions(options) + + if (version instanceof SemVer) { + if (version.loose === !!options.loose && + version.includePrerelease === !!options.includePrerelease) { + return version + } else { + version = version.version + } + } else if (typeof version !== 'string') { + throw new TypeError(`Invalid Version: ${version}`) + } + + if (version.length > MAX_LENGTH) { + throw new TypeError( + `version is longer than ${MAX_LENGTH} characters` + ) + } + + debug('SemVer', version, options) + this.options = options + this.loose = !!options.loose + // this isn't actually relevant for versions, but keep it so that we + // don't run into trouble passing this.options around. + this.includePrerelease = !!options.includePrerelease + + const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) + + if (!m) { + throw new TypeError(`Invalid Version: ${version}`) + } + + this.raw = version + + // these are actually numbers + this.major = +m[1] + this.minor = +m[2] + this.patch = +m[3] + + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError('Invalid major version') + } + + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError('Invalid minor version') + } + + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError('Invalid patch version') + } + + // numberify any prerelease numeric ids + if (!m[4]) { + this.prerelease = [] + } else { + this.prerelease = m[4].split('.').map((id) => { + if (/^[0-9]+$/.test(id)) { + const num = +id + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num + } + } + return id + }) + } + + this.build = m[5] ? m[5].split('.') : [] + this.format() + } + + format () { + this.version = `${this.major}.${this.minor}.${this.patch}` + if (this.prerelease.length) { + this.version += `-${this.prerelease.join('.')}` + } + return this.version + } + + toString () { + return this.version + } + + compare (other) { + debug('SemVer.compare', this.version, this.options, other) + if (!(other instanceof SemVer)) { + if (typeof other === 'string' && other === this.version) { + return 0 + } + other = new SemVer(other, this.options) + } + + if (other.version === this.version) { + return 0 + } + + return this.compareMain(other) || this.comparePre(other) + } + + compareMain (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + return ( + compareIdentifiers(this.major, other.major) || + compareIdentifiers(this.minor, other.minor) || + compareIdentifiers(this.patch, other.patch) + ) + } + + comparePre (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + // NOT having a prerelease is > having one + if (this.prerelease.length && !other.prerelease.length) { + return -1 + } else if (!this.prerelease.length && other.prerelease.length) { + return 1 + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0 + } + + let i = 0 + do { + const a = this.prerelease[i] + const b = other.prerelease[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) + } + + compareBuild (other) { + if (!(other instanceof SemVer)) { + other = new SemVer(other, this.options) + } + + let i = 0 + do { + const a = this.build[i] + const b = other.build[i] + debug('prerelease compare', i, a, b) + if (a === undefined && b === undefined) { + return 0 + } else if (b === undefined) { + return 1 + } else if (a === undefined) { + return -1 + } else if (a === b) { + continue + } else { + return compareIdentifiers(a, b) + } + } while (++i) + } + + // preminor will bump the version up to the next minor release, and immediately + // down to pre-release. premajor and prepatch work the same way. + inc (release, identifier) { + switch (release) { + case 'premajor': + this.prerelease.length = 0 + this.patch = 0 + this.minor = 0 + this.major++ + this.inc('pre', identifier) + break + case 'preminor': + this.prerelease.length = 0 + this.patch = 0 + this.minor++ + this.inc('pre', identifier) + break + case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 + this.inc('patch', identifier) + this.inc('pre', identifier) + break + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case 'prerelease': + if (this.prerelease.length === 0) { + this.inc('patch', identifier) + } + this.inc('pre', identifier) + break + + case 'major': + // If this is a pre-major version, bump up to the same major version. + // Otherwise increment major. + // 1.0.0-5 bumps to 1.0.0 + // 1.1.0 bumps to 2.0.0 + if ( + this.minor !== 0 || + this.patch !== 0 || + this.prerelease.length === 0 + ) { + this.major++ + } + this.minor = 0 + this.patch = 0 + this.prerelease = [] + break + case 'minor': + // If this is a pre-minor version, bump up to the same minor version. + // Otherwise increment minor. + // 1.2.0-5 bumps to 1.2.0 + // 1.2.1 bumps to 1.3.0 + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++ + } + this.patch = 0 + this.prerelease = [] + break + case 'patch': + // If this is not a pre-release version, it will increment the patch. + // If it is a pre-release it will bump up to the same patch version. + // 1.2.0-5 patches to 1.2.0 + // 1.2.0 patches to 1.2.1 + if (this.prerelease.length === 0) { + this.patch++ + } + this.prerelease = [] + break + // This probably shouldn't be used publicly. + // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. + case 'pre': + if (this.prerelease.length === 0) { + this.prerelease = [0] + } else { + let i = this.prerelease.length + while (--i >= 0) { + if (typeof this.prerelease[i] === 'number') { + this.prerelease[i]++ + i = -2 + } + } + if (i === -1) { + // didn't increment anything + this.prerelease.push(0) + } + } + if (identifier) { + // 1.2.0-beta.1 bumps to 1.2.0-beta.2, + // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 + if (this.prerelease[0] === identifier) { + if (isNaN(this.prerelease[1])) { + this.prerelease = [identifier, 0] + } + } else { + this.prerelease = [identifier, 0] + } + } + break + + default: + throw new Error(`invalid increment argument: ${release}`) + } + this.format() + this.raw = this.version + return this + } +} + +module.exports = SemVer + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/functions/clean.js": +/*!******************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/functions/clean.js ***! + \******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const parse = __webpack_require__(/*! ./parse */ "./node_modules/electron-updater/node_modules/semver/functions/parse.js") +const clean = (version, options) => { + const s = parse(version.trim().replace(/^[=v]+/, ''), options) + return s ? s.version : null +} +module.exports = clean + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/functions/cmp.js": +/*!****************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/functions/cmp.js ***! + \****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const eq = __webpack_require__(/*! ./eq */ "./node_modules/electron-updater/node_modules/semver/functions/eq.js") +const neq = __webpack_require__(/*! ./neq */ "./node_modules/electron-updater/node_modules/semver/functions/neq.js") +const gt = __webpack_require__(/*! ./gt */ "./node_modules/electron-updater/node_modules/semver/functions/gt.js") +const gte = __webpack_require__(/*! ./gte */ "./node_modules/electron-updater/node_modules/semver/functions/gte.js") +const lt = __webpack_require__(/*! ./lt */ "./node_modules/electron-updater/node_modules/semver/functions/lt.js") +const lte = __webpack_require__(/*! ./lte */ "./node_modules/electron-updater/node_modules/semver/functions/lte.js") + +const cmp = (a, op, b, loose) => { + switch (op) { + case '===': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a === b + + case '!==': + if (typeof a === 'object') + a = a.version + if (typeof b === 'object') + b = b.version + return a !== b + + case '': + case '=': + case '==': + return eq(a, b, loose) + + case '!=': + return neq(a, b, loose) + + case '>': + return gt(a, b, loose) + + case '>=': + return gte(a, b, loose) + + case '<': + return lt(a, b, loose) + + case '<=': + return lte(a, b, loose) + + default: + throw new TypeError(`Invalid operator: ${op}`) + } +} +module.exports = cmp + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/functions/coerce.js": +/*!*******************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/functions/coerce.js ***! + \*******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") +const parse = __webpack_require__(/*! ./parse */ "./node_modules/electron-updater/node_modules/semver/functions/parse.js") +const {re, t} = __webpack_require__(/*! ../internal/re */ "./node_modules/electron-updater/node_modules/semver/internal/re.js") + +const coerce = (version, options) => { + if (version instanceof SemVer) { + return version + } + + if (typeof version === 'number') { + version = String(version) + } + + if (typeof version !== 'string') { + return null + } + + options = options || {} + + let match = null + if (!options.rtl) { + match = version.match(re[t.COERCE]) + } else { + // Find the right-most coercible string that does not share + // a terminus with a more left-ward coercible string. + // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4' + // + // Walk through the string checking with a /g regexp + // Manually set the index so as to pick up overlapping matches. + // Stop when we get a match that ends at the string end, since no + // coercible string can be more right-ward without the same terminus. + let next + while ((next = re[t.COERCERTL].exec(version)) && + (!match || match.index + match[0].length !== version.length) + ) { + if (!match || + next.index + next[0].length !== match.index + match[0].length) { + match = next + } + re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length + } + // leave it in a clean state + re[t.COERCERTL].lastIndex = -1 + } + + if (match === null) + return null + + return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options) +} +module.exports = coerce + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/functions/compare-build.js": +/*!**************************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/functions/compare-build.js ***! + \**************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") +const compareBuild = (a, b, loose) => { + const versionA = new SemVer(a, loose) + const versionB = new SemVer(b, loose) + return versionA.compare(versionB) || versionA.compareBuild(versionB) +} +module.exports = compareBuild + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/functions/compare-loose.js": +/*!**************************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/functions/compare-loose.js ***! + \**************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-updater/node_modules/semver/functions/compare.js") +const compareLoose = (a, b) => compare(a, b, true) +module.exports = compareLoose + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/functions/compare.js": +/*!********************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/functions/compare.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") +const compare = (a, b, loose) => + new SemVer(a, loose).compare(new SemVer(b, loose)) + +module.exports = compare + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/functions/diff.js": +/*!*****************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/functions/diff.js ***! + \*****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const parse = __webpack_require__(/*! ./parse */ "./node_modules/electron-updater/node_modules/semver/functions/parse.js") +const eq = __webpack_require__(/*! ./eq */ "./node_modules/electron-updater/node_modules/semver/functions/eq.js") + +const diff = (version1, version2) => { + if (eq(version1, version2)) { + return null + } else { + const v1 = parse(version1) + const v2 = parse(version2) + const hasPre = v1.prerelease.length || v2.prerelease.length + const prefix = hasPre ? 'pre' : '' + const defaultResult = hasPre ? 'prerelease' : '' + for (const key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return prefix + key + } + } + } + return defaultResult // may be undefined + } +} +module.exports = diff + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/functions/eq.js": +/*!***************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/functions/eq.js ***! + \***************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-updater/node_modules/semver/functions/compare.js") +const eq = (a, b, loose) => compare(a, b, loose) === 0 +module.exports = eq + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/functions/gt.js": +/*!***************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/functions/gt.js ***! + \***************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-updater/node_modules/semver/functions/compare.js") +const gt = (a, b, loose) => compare(a, b, loose) > 0 +module.exports = gt + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/functions/gte.js": +/*!****************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/functions/gte.js ***! + \****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-updater/node_modules/semver/functions/compare.js") +const gte = (a, b, loose) => compare(a, b, loose) >= 0 +module.exports = gte + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/functions/inc.js": +/*!****************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/functions/inc.js ***! + \****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") + +const inc = (version, release, options, identifier) => { + if (typeof (options) === 'string') { + identifier = options + options = undefined + } + + try { + return new SemVer(version, options).inc(release, identifier).version + } catch (er) { + return null + } +} +module.exports = inc + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/functions/lt.js": +/*!***************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/functions/lt.js ***! + \***************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-updater/node_modules/semver/functions/compare.js") +const lt = (a, b, loose) => compare(a, b, loose) < 0 +module.exports = lt + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/functions/lte.js": +/*!****************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/functions/lte.js ***! + \****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-updater/node_modules/semver/functions/compare.js") +const lte = (a, b, loose) => compare(a, b, loose) <= 0 +module.exports = lte + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/functions/major.js": +/*!******************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/functions/major.js ***! + \******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") +const major = (a, loose) => new SemVer(a, loose).major +module.exports = major + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/functions/minor.js": +/*!******************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/functions/minor.js ***! + \******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") +const minor = (a, loose) => new SemVer(a, loose).minor +module.exports = minor + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/functions/neq.js": +/*!****************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/functions/neq.js ***! + \****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-updater/node_modules/semver/functions/compare.js") +const neq = (a, b, loose) => compare(a, b, loose) !== 0 +module.exports = neq + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/functions/parse.js": +/*!******************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/functions/parse.js ***! + \******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const {MAX_LENGTH} = __webpack_require__(/*! ../internal/constants */ "./node_modules/electron-updater/node_modules/semver/internal/constants.js") +const { re, t } = __webpack_require__(/*! ../internal/re */ "./node_modules/electron-updater/node_modules/semver/internal/re.js") +const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") + +const parseOptions = __webpack_require__(/*! ../internal/parse-options */ "./node_modules/electron-updater/node_modules/semver/internal/parse-options.js") +const parse = (version, options) => { + options = parseOptions(options) + + if (version instanceof SemVer) { + return version + } + + if (typeof version !== 'string') { + return null + } + + if (version.length > MAX_LENGTH) { + return null + } + + const r = options.loose ? re[t.LOOSE] : re[t.FULL] + if (!r.test(version)) { + return null + } + + try { + return new SemVer(version, options) + } catch (er) { + return null + } +} + +module.exports = parse + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/functions/patch.js": +/*!******************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/functions/patch.js ***! + \******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") +const patch = (a, loose) => new SemVer(a, loose).patch +module.exports = patch + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/functions/prerelease.js": +/*!***********************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/functions/prerelease.js ***! + \***********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const parse = __webpack_require__(/*! ./parse */ "./node_modules/electron-updater/node_modules/semver/functions/parse.js") +const prerelease = (version, options) => { + const parsed = parse(version, options) + return (parsed && parsed.prerelease.length) ? parsed.prerelease : null +} +module.exports = prerelease + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/functions/rcompare.js": +/*!*********************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/functions/rcompare.js ***! + \*********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const compare = __webpack_require__(/*! ./compare */ "./node_modules/electron-updater/node_modules/semver/functions/compare.js") +const rcompare = (a, b, loose) => compare(b, a, loose) +module.exports = rcompare + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/functions/rsort.js": +/*!******************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/functions/rsort.js ***! + \******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const compareBuild = __webpack_require__(/*! ./compare-build */ "./node_modules/electron-updater/node_modules/semver/functions/compare-build.js") +const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)) +module.exports = rsort + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/functions/satisfies.js": +/*!**********************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/functions/satisfies.js ***! + \**********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-updater/node_modules/semver/classes/range.js") +const satisfies = (version, range, options) => { + try { + range = new Range(range, options) + } catch (er) { + return false + } + return range.test(version) +} +module.exports = satisfies + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/functions/sort.js": +/*!*****************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/functions/sort.js ***! + \*****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const compareBuild = __webpack_require__(/*! ./compare-build */ "./node_modules/electron-updater/node_modules/semver/functions/compare-build.js") +const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)) +module.exports = sort + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/functions/valid.js": +/*!******************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/functions/valid.js ***! + \******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const parse = __webpack_require__(/*! ./parse */ "./node_modules/electron-updater/node_modules/semver/functions/parse.js") +const valid = (version, options) => { + const v = parse(version, options) + return v ? v.version : null +} +module.exports = valid + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/index.js": +/*!********************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/index.js ***! + \********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// just pre-load all the stuff that index.js lazily exports +const internalRe = __webpack_require__(/*! ./internal/re */ "./node_modules/electron-updater/node_modules/semver/internal/re.js") +module.exports = { + re: internalRe.re, + src: internalRe.src, + tokens: internalRe.t, + SEMVER_SPEC_VERSION: __webpack_require__(/*! ./internal/constants */ "./node_modules/electron-updater/node_modules/semver/internal/constants.js").SEMVER_SPEC_VERSION, + SemVer: __webpack_require__(/*! ./classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js"), + compareIdentifiers: __webpack_require__(/*! ./internal/identifiers */ "./node_modules/electron-updater/node_modules/semver/internal/identifiers.js").compareIdentifiers, + rcompareIdentifiers: __webpack_require__(/*! ./internal/identifiers */ "./node_modules/electron-updater/node_modules/semver/internal/identifiers.js").rcompareIdentifiers, + parse: __webpack_require__(/*! ./functions/parse */ "./node_modules/electron-updater/node_modules/semver/functions/parse.js"), + valid: __webpack_require__(/*! ./functions/valid */ "./node_modules/electron-updater/node_modules/semver/functions/valid.js"), + clean: __webpack_require__(/*! ./functions/clean */ "./node_modules/electron-updater/node_modules/semver/functions/clean.js"), + inc: __webpack_require__(/*! ./functions/inc */ "./node_modules/electron-updater/node_modules/semver/functions/inc.js"), + diff: __webpack_require__(/*! ./functions/diff */ "./node_modules/electron-updater/node_modules/semver/functions/diff.js"), + major: __webpack_require__(/*! ./functions/major */ "./node_modules/electron-updater/node_modules/semver/functions/major.js"), + minor: __webpack_require__(/*! ./functions/minor */ "./node_modules/electron-updater/node_modules/semver/functions/minor.js"), + patch: __webpack_require__(/*! ./functions/patch */ "./node_modules/electron-updater/node_modules/semver/functions/patch.js"), + prerelease: __webpack_require__(/*! ./functions/prerelease */ "./node_modules/electron-updater/node_modules/semver/functions/prerelease.js"), + compare: __webpack_require__(/*! ./functions/compare */ "./node_modules/electron-updater/node_modules/semver/functions/compare.js"), + rcompare: __webpack_require__(/*! ./functions/rcompare */ "./node_modules/electron-updater/node_modules/semver/functions/rcompare.js"), + compareLoose: __webpack_require__(/*! ./functions/compare-loose */ "./node_modules/electron-updater/node_modules/semver/functions/compare-loose.js"), + compareBuild: __webpack_require__(/*! ./functions/compare-build */ "./node_modules/electron-updater/node_modules/semver/functions/compare-build.js"), + sort: __webpack_require__(/*! ./functions/sort */ "./node_modules/electron-updater/node_modules/semver/functions/sort.js"), + rsort: __webpack_require__(/*! ./functions/rsort */ "./node_modules/electron-updater/node_modules/semver/functions/rsort.js"), + gt: __webpack_require__(/*! ./functions/gt */ "./node_modules/electron-updater/node_modules/semver/functions/gt.js"), + lt: __webpack_require__(/*! ./functions/lt */ "./node_modules/electron-updater/node_modules/semver/functions/lt.js"), + eq: __webpack_require__(/*! ./functions/eq */ "./node_modules/electron-updater/node_modules/semver/functions/eq.js"), + neq: __webpack_require__(/*! ./functions/neq */ "./node_modules/electron-updater/node_modules/semver/functions/neq.js"), + gte: __webpack_require__(/*! ./functions/gte */ "./node_modules/electron-updater/node_modules/semver/functions/gte.js"), + lte: __webpack_require__(/*! ./functions/lte */ "./node_modules/electron-updater/node_modules/semver/functions/lte.js"), + cmp: __webpack_require__(/*! ./functions/cmp */ "./node_modules/electron-updater/node_modules/semver/functions/cmp.js"), + coerce: __webpack_require__(/*! ./functions/coerce */ "./node_modules/electron-updater/node_modules/semver/functions/coerce.js"), + Comparator: __webpack_require__(/*! ./classes/comparator */ "./node_modules/electron-updater/node_modules/semver/classes/comparator.js"), + Range: __webpack_require__(/*! ./classes/range */ "./node_modules/electron-updater/node_modules/semver/classes/range.js"), + satisfies: __webpack_require__(/*! ./functions/satisfies */ "./node_modules/electron-updater/node_modules/semver/functions/satisfies.js"), + toComparators: __webpack_require__(/*! ./ranges/to-comparators */ "./node_modules/electron-updater/node_modules/semver/ranges/to-comparators.js"), + maxSatisfying: __webpack_require__(/*! ./ranges/max-satisfying */ "./node_modules/electron-updater/node_modules/semver/ranges/max-satisfying.js"), + minSatisfying: __webpack_require__(/*! ./ranges/min-satisfying */ "./node_modules/electron-updater/node_modules/semver/ranges/min-satisfying.js"), + minVersion: __webpack_require__(/*! ./ranges/min-version */ "./node_modules/electron-updater/node_modules/semver/ranges/min-version.js"), + validRange: __webpack_require__(/*! ./ranges/valid */ "./node_modules/electron-updater/node_modules/semver/ranges/valid.js"), + outside: __webpack_require__(/*! ./ranges/outside */ "./node_modules/electron-updater/node_modules/semver/ranges/outside.js"), + gtr: __webpack_require__(/*! ./ranges/gtr */ "./node_modules/electron-updater/node_modules/semver/ranges/gtr.js"), + ltr: __webpack_require__(/*! ./ranges/ltr */ "./node_modules/electron-updater/node_modules/semver/ranges/ltr.js"), + intersects: __webpack_require__(/*! ./ranges/intersects */ "./node_modules/electron-updater/node_modules/semver/ranges/intersects.js"), + simplifyRange: __webpack_require__(/*! ./ranges/simplify */ "./node_modules/electron-updater/node_modules/semver/ranges/simplify.js"), + subset: __webpack_require__(/*! ./ranges/subset */ "./node_modules/electron-updater/node_modules/semver/ranges/subset.js"), +} + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/internal/constants.js": +/*!*********************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/internal/constants.js ***! + \*********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +// Note: this is the semver.org version of the spec that it implements +// Not necessarily the package version of this code. +const SEMVER_SPEC_VERSION = '2.0.0' + +const MAX_LENGTH = 256 +const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || + /* istanbul ignore next */ 9007199254740991 + +// Max safe segment length for coercion. +const MAX_SAFE_COMPONENT_LENGTH = 16 + +module.exports = { + SEMVER_SPEC_VERSION, + MAX_LENGTH, + MAX_SAFE_INTEGER, + MAX_SAFE_COMPONENT_LENGTH +} + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/internal/debug.js": +/*!*****************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/internal/debug.js ***! + \*****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +const debug = ( + typeof process === 'object' && + process.env && + process.env.NODE_DEBUG && + /\bsemver\b/i.test(process.env.NODE_DEBUG) +) ? (...args) => console.error('SEMVER', ...args) + : () => {} + +module.exports = debug + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/internal/identifiers.js": +/*!***********************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/internal/identifiers.js ***! + \***********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +const numeric = /^[0-9]+$/ +const compareIdentifiers = (a, b) => { + const anum = numeric.test(a) + const bnum = numeric.test(b) + + if (anum && bnum) { + a = +a + b = +b + } + + return a === b ? 0 + : (anum && !bnum) ? -1 + : (bnum && !anum) ? 1 + : a < b ? -1 + : 1 +} + +const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a) + +module.exports = { + compareIdentifiers, + rcompareIdentifiers +} + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/internal/parse-options.js": +/*!*************************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/internal/parse-options.js ***! + \*************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +// parse out just the options we care about so we always get a consistent +// obj with keys in a consistent order. +const opts = ['includePrerelease', 'loose', 'rtl'] +const parseOptions = options => + !options ? {} + : typeof options !== 'object' ? { loose: true } + : opts.filter(k => options[k]).reduce((options, k) => { + options[k] = true + return options + }, {}) +module.exports = parseOptions + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/internal/re.js": +/*!**************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/internal/re.js ***! + \**************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const { MAX_SAFE_COMPONENT_LENGTH } = __webpack_require__(/*! ./constants */ "./node_modules/electron-updater/node_modules/semver/internal/constants.js") +const debug = __webpack_require__(/*! ./debug */ "./node_modules/electron-updater/node_modules/semver/internal/debug.js") +exports = module.exports = {} + +// The actual regexps go on exports.re +const re = exports.re = [] +const src = exports.src = [] +const t = exports.t = {} +let R = 0 + +const createToken = (name, value, isGlobal) => { + const index = R++ + debug(index, value) + t[name] = index + src[index] = value + re[index] = new RegExp(value, isGlobal ? 'g' : undefined) +} + +// The following Regular Expressions can be used for tokenizing, +// validating, and parsing SemVer version strings. + +// ## Numeric Identifier +// A single `0`, or a non-zero digit followed by zero or more digits. + +createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') +createToken('NUMERICIDENTIFIERLOOSE', '[0-9]+') + +// ## Non-numeric Identifier +// Zero or more digits, followed by a letter or hyphen, and then zero or +// more letters, digits, or hyphens. + +createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*') + +// ## Main Version +// Three dot-separated numeric identifiers. + +createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + + `(${src[t.NUMERICIDENTIFIER]})\\.` + + `(${src[t.NUMERICIDENTIFIER]})`) + +createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + + `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + + `(${src[t.NUMERICIDENTIFIERLOOSE]})`) + +// ## Pre-release Version Identifier +// A numeric identifier, or a non-numeric identifier. + +createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER] +}|${src[t.NONNUMERICIDENTIFIER]})`) + +createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE] +}|${src[t.NONNUMERICIDENTIFIER]})`) + +// ## Pre-release Version +// Hyphen, followed by one or more dot-separated pre-release version +// identifiers. + +createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER] +}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`) + +createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] +}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`) + +// ## Build Metadata Identifier +// Any combination of digits, letters, or hyphens. + +createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+') + +// ## Build Metadata +// Plus sign, followed by one or more period-separated build metadata +// identifiers. + +createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER] +}(?:\\.${src[t.BUILDIDENTIFIER]})*))`) + +// ## Full Version String +// A main version, followed optionally by a pre-release version and +// build metadata. + +// Note that the only major, minor, patch, and pre-release sections of +// the version string are capturing groups. The build metadata is not a +// capturing group, because it should not ever be used in version +// comparison. + +createToken('FULLPLAIN', `v?${src[t.MAINVERSION] +}${src[t.PRERELEASE]}?${ + src[t.BUILD]}?`) + +createToken('FULL', `^${src[t.FULLPLAIN]}$`) + +// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. +// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty +// common in the npm registry. +createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE] +}${src[t.PRERELEASELOOSE]}?${ + src[t.BUILD]}?`) + +createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`) + +createToken('GTLT', '((?:<|>)?=?)') + +// Something like "2.*" or "1.2.x". +// Note that "x.x" is a valid xRange identifer, meaning "any version" +// Only the first item is strictly required. +createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`) +createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`) + +createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + + `(?:${src[t.PRERELEASE]})?${ + src[t.BUILD]}?` + + `)?)?`) + +createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + + `(?:${src[t.PRERELEASELOOSE]})?${ + src[t.BUILD]}?` + + `)?)?`) + +createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`) +createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`) + +// Coercion. +// Extract anything that could conceivably be a part of a valid semver +createToken('COERCE', `${'(^|[^\\d])' + + '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + + `(?:$|[^\\d])`) +createToken('COERCERTL', src[t.COERCE], true) + +// Tilde ranges. +// Meaning is "reasonably at or greater than" +createToken('LONETILDE', '(?:~>?)') + +createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true) +exports.tildeTrimReplace = '$1~' + +createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`) +createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`) + +// Caret ranges. +// Meaning is "at least and backwards compatible with" +createToken('LONECARET', '(?:\\^)') + +createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true) +exports.caretTrimReplace = '$1^' + +createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`) +createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`) + +// A simple gt/lt/eq thing, or just "" to indicate "any version" +createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`) +createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`) + +// An expression to strip any whitespace between the gtlt and the thing +// it modifies, so that `> 1.2.3` ==> `>1.2.3` +createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT] +}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true) +exports.comparatorTrimReplace = '$1$2$3' + +// Something like `1.2.3 - 1.2.4` +// Note that these all use the loose form, because they'll be +// checked against either the strict or loose comparator form +// later. +createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + + `\\s+-\\s+` + + `(${src[t.XRANGEPLAIN]})` + + `\\s*$`) + +createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + + `\\s+-\\s+` + + `(${src[t.XRANGEPLAINLOOSE]})` + + `\\s*$`) + +// Star ranges basically just allow anything at all. +createToken('STAR', '(<|>)?=?\\s*\\*') +// >=0.0.0 is like a star +createToken('GTE0', '^\\s*>=\\s*0\.0\.0\\s*$') +createToken('GTE0PRE', '^\\s*>=\\s*0\.0\.0-0\\s*$') + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/ranges/gtr.js": +/*!*************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/ranges/gtr.js ***! + \*************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// Determine if version is greater than all the versions possible in the range. +const outside = __webpack_require__(/*! ./outside */ "./node_modules/electron-updater/node_modules/semver/ranges/outside.js") +const gtr = (version, range, options) => outside(version, range, '>', options) +module.exports = gtr + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/ranges/intersects.js": +/*!********************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/ranges/intersects.js ***! + \********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-updater/node_modules/semver/classes/range.js") +const intersects = (r1, r2, options) => { + r1 = new Range(r1, options) + r2 = new Range(r2, options) + return r1.intersects(r2) +} +module.exports = intersects + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/ranges/ltr.js": +/*!*************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/ranges/ltr.js ***! + \*************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const outside = __webpack_require__(/*! ./outside */ "./node_modules/electron-updater/node_modules/semver/ranges/outside.js") +// Determine if version is less than all the versions possible in the range +const ltr = (version, range, options) => outside(version, range, '<', options) +module.exports = ltr + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/ranges/max-satisfying.js": +/*!************************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/ranges/max-satisfying.js ***! + \************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") +const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-updater/node_modules/semver/classes/range.js") + +const maxSatisfying = (versions, range, options) => { + let max = null + let maxSV = null + let rangeObj = null + try { + rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!max || maxSV.compare(v) === -1) { + // compare(max, v, true) + max = v + maxSV = new SemVer(max, options) + } + } + }) + return max +} +module.exports = maxSatisfying + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/ranges/min-satisfying.js": +/*!************************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/ranges/min-satisfying.js ***! + \************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") +const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-updater/node_modules/semver/classes/range.js") +const minSatisfying = (versions, range, options) => { + let min = null + let minSV = null + let rangeObj = null + try { + rangeObj = new Range(range, options) + } catch (er) { + return null + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + // satisfies(v, range, options) + if (!min || minSV.compare(v) === 1) { + // compare(min, v, true) + min = v + minSV = new SemVer(min, options) + } + } + }) + return min +} +module.exports = minSatisfying + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/ranges/min-version.js": +/*!*********************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/ranges/min-version.js ***! + \*********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") +const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-updater/node_modules/semver/classes/range.js") +const gt = __webpack_require__(/*! ../functions/gt */ "./node_modules/electron-updater/node_modules/semver/functions/gt.js") + +const minVersion = (range, loose) => { + range = new Range(range, loose) + + let minver = new SemVer('0.0.0') + if (range.test(minver)) { + return minver + } + + minver = new SemVer('0.0.0-0') + if (range.test(minver)) { + return minver + } + + minver = null + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i] + + let setMin = null + comparators.forEach((comparator) => { + // Clone to avoid manipulating the comparator's semver object. + const compver = new SemVer(comparator.semver.version) + switch (comparator.operator) { + case '>': + if (compver.prerelease.length === 0) { + compver.patch++ + } else { + compver.prerelease.push(0) + } + compver.raw = compver.format() + /* fallthrough */ + case '': + case '>=': + if (!setMin || gt(compver, setMin)) { + setMin = compver + } + break + case '<': + case '<=': + /* Ignore maximum versions */ + break + /* istanbul ignore next */ + default: + throw new Error(`Unexpected operation: ${comparator.operator}`) + } + }) + if (setMin && (!minver || gt(minver, setMin))) + minver = setMin + } + + if (minver && range.test(minver)) { + return minver + } + + return null +} +module.exports = minVersion + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/ranges/outside.js": +/*!*****************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/ranges/outside.js ***! + \*****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const SemVer = __webpack_require__(/*! ../classes/semver */ "./node_modules/electron-updater/node_modules/semver/classes/semver.js") +const Comparator = __webpack_require__(/*! ../classes/comparator */ "./node_modules/electron-updater/node_modules/semver/classes/comparator.js") +const {ANY} = Comparator +const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-updater/node_modules/semver/classes/range.js") +const satisfies = __webpack_require__(/*! ../functions/satisfies */ "./node_modules/electron-updater/node_modules/semver/functions/satisfies.js") +const gt = __webpack_require__(/*! ../functions/gt */ "./node_modules/electron-updater/node_modules/semver/functions/gt.js") +const lt = __webpack_require__(/*! ../functions/lt */ "./node_modules/electron-updater/node_modules/semver/functions/lt.js") +const lte = __webpack_require__(/*! ../functions/lte */ "./node_modules/electron-updater/node_modules/semver/functions/lte.js") +const gte = __webpack_require__(/*! ../functions/gte */ "./node_modules/electron-updater/node_modules/semver/functions/gte.js") + +const outside = (version, range, hilo, options) => { + version = new SemVer(version, options) + range = new Range(range, options) + + let gtfn, ltefn, ltfn, comp, ecomp + switch (hilo) { + case '>': + gtfn = gt + ltefn = lte + ltfn = lt + comp = '>' + ecomp = '>=' + break + case '<': + gtfn = lt + ltefn = gte + ltfn = gt + comp = '<' + ecomp = '<=' + break + default: + throw new TypeError('Must provide a hilo val of "<" or ">"') + } + + // If it satisfies the range it is not outside + if (satisfies(version, range, options)) { + return false + } + + // From now on, variable terms are as if we're in "gtr" mode. + // but note that everything is flipped for the "ltr" function. + + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i] + + let high = null + let low = null + + comparators.forEach((comparator) => { + if (comparator.semver === ANY) { + comparator = new Comparator('>=0.0.0') + } + high = high || comparator + low = low || comparator + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator + } + }) + + // If the edge version comparator has a operator then our version + // isn't outside it + if (high.operator === comp || high.operator === ecomp) { + return false + } + + // If the lowest version comparator has an operator and our version + // is less than it then it isn't higher than the range + if ((!low.operator || low.operator === comp) && + ltefn(version, low.semver)) { + return false + } else if (low.operator === ecomp && ltfn(version, low.semver)) { + return false + } + } + return true +} + +module.exports = outside + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/ranges/simplify.js": +/*!******************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/ranges/simplify.js ***! + \******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// given a set of versions and a range, create a "simplified" range +// that includes the same versions that the original range does +// If the original range is shorter than the simplified one, return that. +const satisfies = __webpack_require__(/*! ../functions/satisfies.js */ "./node_modules/electron-updater/node_modules/semver/functions/satisfies.js") +const compare = __webpack_require__(/*! ../functions/compare.js */ "./node_modules/electron-updater/node_modules/semver/functions/compare.js") +module.exports = (versions, range, options) => { + const set = [] + let min = null + let prev = null + const v = versions.sort((a, b) => compare(a, b, options)) + for (const version of v) { + const included = satisfies(version, range, options) + if (included) { + prev = version + if (!min) + min = version + } else { + if (prev) { + set.push([min, prev]) + } + prev = null + min = null + } + } + if (min) + set.push([min, null]) + + const ranges = [] + for (const [min, max] of set) { + if (min === max) + ranges.push(min) + else if (!max && min === v[0]) + ranges.push('*') + else if (!max) + ranges.push(`>=${min}`) + else if (min === v[0]) + ranges.push(`<=${max}`) + else + ranges.push(`${min} - ${max}`) + } + const simplified = ranges.join(' || ') + const original = typeof range.raw === 'string' ? range.raw : String(range) + return simplified.length < original.length ? simplified : range +} + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/ranges/subset.js": +/*!****************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/ranges/subset.js ***! + \****************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const Range = __webpack_require__(/*! ../classes/range.js */ "./node_modules/electron-updater/node_modules/semver/classes/range.js") +const Comparator = __webpack_require__(/*! ../classes/comparator.js */ "./node_modules/electron-updater/node_modules/semver/classes/comparator.js") +const { ANY } = Comparator +const satisfies = __webpack_require__(/*! ../functions/satisfies.js */ "./node_modules/electron-updater/node_modules/semver/functions/satisfies.js") +const compare = __webpack_require__(/*! ../functions/compare.js */ "./node_modules/electron-updater/node_modules/semver/functions/compare.js") + +// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff: +// - Every simple range `r1, r2, ...` is a null set, OR +// - Every simple range `r1, r2, ...` which is not a null set is a subset of +// some `R1, R2, ...` +// +// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff: +// - If c is only the ANY comparator +// - If C is only the ANY comparator, return true +// - Else if in prerelease mode, return false +// - else replace c with `[>=0.0.0]` +// - If C is only the ANY comparator +// - if in prerelease mode, return true +// - else replace C with `[>=0.0.0]` +// - Let EQ be the set of = comparators in c +// - If EQ is more than one, return true (null set) +// - Let GT be the highest > or >= comparator in c +// - Let LT be the lowest < or <= comparator in c +// - If GT and LT, and GT.semver > LT.semver, return true (null set) +// - If any C is a = range, and GT or LT are set, return false +// - If EQ +// - If GT, and EQ does not satisfy GT, return true (null set) +// - If LT, and EQ does not satisfy LT, return true (null set) +// - If EQ satisfies every C, return true +// - Else return false +// - If GT +// - If GT.semver is lower than any > or >= comp in C, return false +// - If GT is >=, and GT.semver does not satisfy every C, return false +// - If GT.semver has a prerelease, and not in prerelease mode +// - If no C has a prerelease and the GT.semver tuple, return false +// - If LT +// - If LT.semver is greater than any < or <= comp in C, return false +// - If LT is <=, and LT.semver does not satisfy every C, return false +// - If GT.semver has a prerelease, and not in prerelease mode +// - If no C has a prerelease and the LT.semver tuple, return false +// - Else return true + +const subset = (sub, dom, options = {}) => { + if (sub === dom) + return true + + sub = new Range(sub, options) + dom = new Range(dom, options) + let sawNonNull = false + + OUTER: for (const simpleSub of sub.set) { + for (const simpleDom of dom.set) { + const isSub = simpleSubset(simpleSub, simpleDom, options) + sawNonNull = sawNonNull || isSub !== null + if (isSub) + continue OUTER + } + // the null set is a subset of everything, but null simple ranges in + // a complex range should be ignored. so if we saw a non-null range, + // then we know this isn't a subset, but if EVERY simple range was null, + // then it is a subset. + if (sawNonNull) + return false + } + return true +} + +const simpleSubset = (sub, dom, options) => { + if (sub === dom) + return true + + if (sub.length === 1 && sub[0].semver === ANY) { + if (dom.length === 1 && dom[0].semver === ANY) + return true + else if (options.includePrerelease) + sub = [ new Comparator('>=0.0.0-0') ] + else + sub = [ new Comparator('>=0.0.0') ] + } + + if (dom.length === 1 && dom[0].semver === ANY) { + if (options.includePrerelease) + return true + else + dom = [ new Comparator('>=0.0.0') ] + } + + const eqSet = new Set() + let gt, lt + for (const c of sub) { + if (c.operator === '>' || c.operator === '>=') + gt = higherGT(gt, c, options) + else if (c.operator === '<' || c.operator === '<=') + lt = lowerLT(lt, c, options) + else + eqSet.add(c.semver) + } + + if (eqSet.size > 1) + return null + + let gtltComp + if (gt && lt) { + gtltComp = compare(gt.semver, lt.semver, options) + if (gtltComp > 0) + return null + else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) + return null + } + + // will iterate one or zero times + for (const eq of eqSet) { + if (gt && !satisfies(eq, String(gt), options)) + return null + + if (lt && !satisfies(eq, String(lt), options)) + return null + + for (const c of dom) { + if (!satisfies(eq, String(c), options)) + return false + } + + return true + } + + let higher, lower + let hasDomLT, hasDomGT + // if the subset has a prerelease, we need a comparator in the superset + // with the same tuple and a prerelease, or it's not a subset + let needDomLTPre = lt && + !options.includePrerelease && + lt.semver.prerelease.length ? lt.semver : false + let needDomGTPre = gt && + !options.includePrerelease && + gt.semver.prerelease.length ? gt.semver : false + // exception: <1.2.3-0 is the same as <1.2.3 + if (needDomLTPre && needDomLTPre.prerelease.length === 1 && + lt.operator === '<' && needDomLTPre.prerelease[0] === 0) { + needDomLTPre = false + } + + for (const c of dom) { + hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=' + hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=' + if (gt) { + if (needDomGTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && + c.semver.major === needDomGTPre.major && + c.semver.minor === needDomGTPre.minor && + c.semver.patch === needDomGTPre.patch) { + needDomGTPre = false + } + } + if (c.operator === '>' || c.operator === '>=') { + higher = higherGT(gt, c, options) + if (higher === c && higher !== gt) + return false + } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) + return false + } + if (lt) { + if (needDomLTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && + c.semver.major === needDomLTPre.major && + c.semver.minor === needDomLTPre.minor && + c.semver.patch === needDomLTPre.patch) { + needDomLTPre = false + } + } + if (c.operator === '<' || c.operator === '<=') { + lower = lowerLT(lt, c, options) + if (lower === c && lower !== lt) + return false + } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) + return false + } + if (!c.operator && (lt || gt) && gtltComp !== 0) + return false + } + + // if there was a < or >, and nothing in the dom, then must be false + // UNLESS it was limited by another range in the other direction. + // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0 + if (gt && hasDomLT && !lt && gtltComp !== 0) + return false + + if (lt && hasDomGT && !gt && gtltComp !== 0) + return false + + // we needed a prerelease range in a specific tuple, but didn't get one + // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0, + // because it includes prereleases in the 1.2.3 tuple + if (needDomGTPre || needDomLTPre) + return false + + return true +} + +// >=1.2.3 is lower than >1.2.3 +const higherGT = (a, b, options) => { + if (!a) + return b + const comp = compare(a.semver, b.semver, options) + return comp > 0 ? a + : comp < 0 ? b + : b.operator === '>' && a.operator === '>=' ? b + : a +} + +// <=1.2.3 is higher than <1.2.3 +const lowerLT = (a, b, options) => { + if (!a) + return b + const comp = compare(a.semver, b.semver, options) + return comp < 0 ? a + : comp > 0 ? b + : b.operator === '<' && a.operator === '<=' ? b + : a +} + +module.exports = subset + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/ranges/to-comparators.js": +/*!************************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/ranges/to-comparators.js ***! + \************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-updater/node_modules/semver/classes/range.js") + +// Mostly just for testing and legacy API reasons +const toComparators = (range, options) => + new Range(range, options).set + .map(comp => comp.map(c => c.value).join(' ').trim().split(' ')) + +module.exports = toComparators + + +/***/ }), + +/***/ "./node_modules/electron-updater/node_modules/semver/ranges/valid.js": +/*!***************************************************************************!*\ + !*** ./node_modules/electron-updater/node_modules/semver/ranges/valid.js ***! + \***************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +const Range = __webpack_require__(/*! ../classes/range */ "./node_modules/electron-updater/node_modules/semver/classes/range.js") +const validRange = (range, options) => { + try { + // Return '*' instead of '' so that truthiness works. + // This will throw if it's invalid anyway + return new Range(range, options).range || '*' + } catch (er) { + return null + } +} +module.exports = validRange + + +/***/ }), + +/***/ "./node_modules/electron-updater/out/AppAdapter.js": +/*!*********************************************************!*\ + !*** ./node_modules/electron-updater/out/AppAdapter.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getAppCacheDir = void 0; +const path = __webpack_require__(/*! path */ "path"); +const os_1 = __webpack_require__(/*! os */ "os"); +function getAppCacheDir() { + const homedir = os_1.homedir(); + // https://github.com/electron/electron/issues/1404#issuecomment-194391247 + let result; + if (process.platform === "win32") { + result = process.env.LOCALAPPDATA || path.join(homedir, "AppData", "Local"); + } + else if (process.platform === "darwin") { + result = path.join(homedir, "Library", "Application Support", "Caches"); + } + else { + result = process.env.XDG_CACHE_HOME || path.join(homedir, ".cache"); + } + return result; +} +exports.getAppCacheDir = getAppCacheDir; +//# sourceMappingURL=AppAdapter.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/out/AppImageUpdater.js": +/*!**************************************************************!*\ + !*** ./node_modules/electron-updater/out/AppImageUpdater.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AppImageUpdater = void 0; +const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); +const child_process_1 = __webpack_require__(/*! child_process */ "child_process"); +const fs_extra_1 = __webpack_require__(/*! fs-extra */ "./node_modules/fs-extra/lib/index.js"); +const fs_1 = __webpack_require__(/*! fs */ "fs"); +const path = __webpack_require__(/*! path */ "path"); +const BaseUpdater_1 = __webpack_require__(/*! ./BaseUpdater */ "./node_modules/electron-updater/out/BaseUpdater.js"); +const FileWithEmbeddedBlockMapDifferentialDownloader_1 = __webpack_require__(/*! ./differentialDownloader/FileWithEmbeddedBlockMapDifferentialDownloader */ "./node_modules/electron-updater/out/differentialDownloader/FileWithEmbeddedBlockMapDifferentialDownloader.js"); +const main_1 = __webpack_require__(/*! ./main */ "./node_modules/electron-updater/out/main.js"); +const Provider_1 = __webpack_require__(/*! ./providers/Provider */ "./node_modules/electron-updater/out/providers/Provider.js"); +class AppImageUpdater extends BaseUpdater_1.BaseUpdater { + constructor(options, app) { + super(options, app); + } + isUpdaterActive() { + if (process.env.APPIMAGE == null) { + if (process.env.SNAP == null) { + this._logger.warn("APPIMAGE env is not defined, current application is not an AppImage"); + } + else { + this._logger.info("SNAP env is defined, updater is disabled"); + } + return false; + } + return super.isUpdaterActive(); + } + /*** @private */ + doDownloadUpdate(downloadUpdateOptions) { + const provider = downloadUpdateOptions.updateInfoAndProvider.provider; + const fileInfo = Provider_1.findFile(provider.resolveFiles(downloadUpdateOptions.updateInfoAndProvider.info), "AppImage"); + return this.executeDownload({ + fileExtension: "AppImage", + fileInfo, + downloadUpdateOptions, + task: async (updateFile, downloadOptions) => { + const oldFile = process.env.APPIMAGE; + if (oldFile == null) { + throw builder_util_runtime_1.newError("APPIMAGE env is not defined", "ERR_UPDATER_OLD_FILE_NOT_FOUND"); + } + let isDownloadFull = false; + try { + const downloadOptions = { + newUrl: fileInfo.url, + oldFile, + logger: this._logger, + newFile: updateFile, + isUseMultipleRangeRequest: provider.isUseMultipleRangeRequest, + requestHeaders: downloadUpdateOptions.requestHeaders, + cancellationToken: downloadUpdateOptions.cancellationToken, + }; + if (this.listenerCount(main_1.DOWNLOAD_PROGRESS) > 0) { + downloadOptions.onProgress = it => this.emit(main_1.DOWNLOAD_PROGRESS, it); + } + await new FileWithEmbeddedBlockMapDifferentialDownloader_1.FileWithEmbeddedBlockMapDifferentialDownloader(fileInfo.info, this.httpExecutor, downloadOptions).download(); + } + catch (e) { + this._logger.error(`Cannot download differentially, fallback to full download: ${e.stack || e}`); + // during test (developer machine mac) we must throw error + isDownloadFull = process.platform === "linux"; + } + if (isDownloadFull) { + await this.httpExecutor.download(fileInfo.url, updateFile, downloadOptions); + } + await fs_extra_1.chmod(updateFile, 0o755); + }, + }); + } + doInstall(options) { + const appImageFile = process.env.APPIMAGE; + if (appImageFile == null) { + throw builder_util_runtime_1.newError("APPIMAGE env is not defined", "ERR_UPDATER_OLD_FILE_NOT_FOUND"); + } + // https://stackoverflow.com/a/1712051/1910191 + fs_1.unlinkSync(appImageFile); + let destination; + const existingBaseName = path.basename(appImageFile); + // https://github.com/electron-userland/electron-builder/issues/2964 + // if no version in existing file name, it means that user wants to preserve current custom name + if (path.basename(options.installerPath) === existingBaseName || !/\d+\.\d+\.\d+/.test(existingBaseName)) { + // no version in the file name, overwrite existing + destination = appImageFile; + } + else { + destination = path.join(path.dirname(appImageFile), path.basename(options.installerPath)); + } + child_process_1.execFileSync("mv", ["-f", options.installerPath, destination]); + if (destination !== appImageFile) { + this.emit("appimage-filename-updated", destination); + } + const env = { + ...process.env, + APPIMAGE_SILENT_INSTALL: "true", + }; + if (options.isForceRunAfter) { + child_process_1.spawn(destination, [], { + detached: true, + stdio: "ignore", + env, + }).unref(); + } + else { + env.APPIMAGE_EXIT_AFTER_INSTALL = "true"; + child_process_1.execFileSync(destination, [], { env }); + } + return true; + } +} +exports.AppImageUpdater = AppImageUpdater; +//# sourceMappingURL=AppImageUpdater.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/out/AppUpdater.js": +/*!*********************************************************!*\ + !*** ./node_modules/electron-updater/out/AppUpdater.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.NoOpLogger = exports.AppUpdater = void 0; +const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); +const crypto_1 = __webpack_require__(/*! crypto */ "crypto"); +const events_1 = __webpack_require__(/*! events */ "events"); +const fs_extra_1 = __webpack_require__(/*! fs-extra */ "./node_modules/fs-extra/lib/index.js"); +const js_yaml_1 = __webpack_require__(/*! js-yaml */ "./node_modules/js-yaml/dist/js-yaml.mjs"); +const lazy_val_1 = __webpack_require__(/*! lazy-val */ "./node_modules/lazy-val/out/main.js"); +const path = __webpack_require__(/*! path */ "path"); +const semver_1 = __webpack_require__(/*! semver */ "./node_modules/electron-updater/node_modules/semver/index.js"); +const DownloadedUpdateHelper_1 = __webpack_require__(/*! ./DownloadedUpdateHelper */ "./node_modules/electron-updater/out/DownloadedUpdateHelper.js"); +const ElectronAppAdapter_1 = __webpack_require__(/*! ./ElectronAppAdapter */ "./node_modules/electron-updater/out/ElectronAppAdapter.js"); +const electronHttpExecutor_1 = __webpack_require__(/*! ./electronHttpExecutor */ "./node_modules/electron-updater/out/electronHttpExecutor.js"); +const GenericProvider_1 = __webpack_require__(/*! ./providers/GenericProvider */ "./node_modules/electron-updater/out/providers/GenericProvider.js"); +const main_1 = __webpack_require__(/*! ./main */ "./node_modules/electron-updater/out/main.js"); +const providerFactory_1 = __webpack_require__(/*! ./providerFactory */ "./node_modules/electron-updater/out/providerFactory.js"); +class AppUpdater extends events_1.EventEmitter { + constructor(options, app) { + super(); + /** + * Whether to automatically download an update when it is found. + */ + this.autoDownload = true; + /** + * Whether to automatically install a downloaded update on app quit (if `quitAndInstall` was not called before). + */ + this.autoInstallOnAppQuit = true; + /** + * *GitHub provider only.* Whether to allow update to pre-release versions. Defaults to `true` if application version contains prerelease components (e.g. `0.12.1-alpha.1`, here `alpha` is a prerelease component), otherwise `false`. + * + * If `true`, downgrade will be allowed (`allowDowngrade` will be set to `true`). + */ + this.allowPrerelease = false; + /** + * *GitHub provider only.* Get all release notes (from current version to latest), not just the latest. + * @default false + */ + this.fullChangelog = false; + /** + * Whether to allow version downgrade (when a user from the beta channel wants to go back to the stable channel). + * + * Taken in account only if channel differs (pre-release version component in terms of semantic versioning). + * + * @default false + */ + this.allowDowngrade = false; + this._channel = null; + this.downloadedUpdateHelper = null; + /** + * The request headers. + */ + this.requestHeaders = null; + this._logger = console; + // noinspection JSUnusedGlobalSymbols + /** + * For type safety you can use signals, e.g. `autoUpdater.signals.updateDownloaded(() => {})` instead of `autoUpdater.on('update-available', () => {})` + */ + this.signals = new main_1.UpdaterSignal(this); + this._appUpdateConfigPath = null; + this.clientPromise = null; + this.stagingUserIdPromise = new lazy_val_1.Lazy(() => this.getOrCreateStagingUserId()); + // public, allow to read old config for anyone + /** @internal */ + this.configOnDisk = new lazy_val_1.Lazy(() => this.loadUpdateConfig()); + this.checkForUpdatesPromise = null; + this.updateInfoAndProvider = null; + /** + * @private + * @internal + */ + this._testOnlyOptions = null; + this.on("error", (error) => { + this._logger.error(`Error: ${error.stack || error.message}`); + }); + if (app == null) { + this.app = new ElectronAppAdapter_1.ElectronAppAdapter(); + this.httpExecutor = new electronHttpExecutor_1.ElectronHttpExecutor((authInfo, callback) => this.emit("login", authInfo, callback)); + } + else { + this.app = app; + this.httpExecutor = null; + } + const currentVersionString = this.app.version; + const currentVersion = semver_1.parse(currentVersionString); + if (currentVersion == null) { + throw builder_util_runtime_1.newError(`App version is not a valid semver version: "${currentVersionString}"`, "ERR_UPDATER_INVALID_VERSION"); + } + this.currentVersion = currentVersion; + this.allowPrerelease = hasPrereleaseComponents(currentVersion); + if (options != null) { + this.setFeedURL(options); + if (typeof options !== "string" && options.requestHeaders) { + this.requestHeaders = options.requestHeaders; + } + } + } + /** + * Get the update channel. Not applicable for GitHub. Doesn't return `channel` from the update configuration, only if was previously set. + */ + get channel() { + return this._channel; + } + /** + * Set the update channel. Not applicable for GitHub. Overrides `channel` in the update configuration. + * + * `allowDowngrade` will be automatically set to `true`. If this behavior is not suitable for you, simple set `allowDowngrade` explicitly after. + */ + set channel(value) { + if (this._channel != null) { + // noinspection SuspiciousTypeOfGuard + if (typeof value !== "string") { + throw builder_util_runtime_1.newError(`Channel must be a string, but got: ${value}`, "ERR_UPDATER_INVALID_CHANNEL"); + } + else if (value.length === 0) { + throw builder_util_runtime_1.newError(`Channel must be not an empty string`, "ERR_UPDATER_INVALID_CHANNEL"); + } + } + this._channel = value; + this.allowDowngrade = true; + } + // noinspection JSMethodCanBeStatic,JSUnusedGlobalSymbols + get netSession() { + return electronHttpExecutor_1.getNetSession(); + } + /** + * The logger. You can pass [electron-log](https://github.com/megahertz/electron-log), [winston](https://github.com/winstonjs/winston) or another logger with the following interface: `{ info(), warn(), error() }`. + * Set it to `null` if you would like to disable a logging feature. + */ + get logger() { + return this._logger; + } + set logger(value) { + this._logger = value == null ? new NoOpLogger() : value; + } + // noinspection JSUnusedGlobalSymbols + /** + * test only + * @private + */ + set updateConfigPath(value) { + this.clientPromise = null; + this._appUpdateConfigPath = value; + this.configOnDisk = new lazy_val_1.Lazy(() => this.loadUpdateConfig()); + } + //noinspection JSMethodCanBeStatic,JSUnusedGlobalSymbols + getFeedURL() { + return "Deprecated. Do not use it."; + } + /** + * Configure update provider. If value is `string`, [GenericServerOptions](/configuration/publish#genericserveroptions) will be set with value as `url`. + * @param options If you want to override configuration in the `app-update.yml`. + */ + setFeedURL(options) { + const runtimeOptions = this.createProviderRuntimeOptions(); + // https://github.com/electron-userland/electron-builder/issues/1105 + let provider; + if (typeof options === "string") { + provider = new GenericProvider_1.GenericProvider({ provider: "generic", url: options }, this, { + ...runtimeOptions, + isUseMultipleRangeRequest: providerFactory_1.isUrlProbablySupportMultiRangeRequests(options), + }); + } + else { + provider = providerFactory_1.createClient(options, this, runtimeOptions); + } + this.clientPromise = Promise.resolve(provider); + } + /** + * Asks the server whether there is an update. + */ + checkForUpdates() { + let checkForUpdatesPromise = this.checkForUpdatesPromise; + if (checkForUpdatesPromise != null) { + this._logger.info("Checking for update (already in progress)"); + return checkForUpdatesPromise; + } + const nullizePromise = () => (this.checkForUpdatesPromise = null); + this._logger.info("Checking for update"); + checkForUpdatesPromise = this.doCheckForUpdates() + .then(it => { + nullizePromise(); + return it; + }) + .catch(e => { + nullizePromise(); + this.emit("error", e, `Cannot check for updates: ${(e.stack || e).toString()}`); + throw e; + }); + this.checkForUpdatesPromise = checkForUpdatesPromise; + return checkForUpdatesPromise; + } + isUpdaterActive() { + if (!this.app.isPackaged) { + this._logger.info("Skip checkForUpdatesAndNotify because application is not packed"); + return false; + } + return true; + } + // noinspection JSUnusedGlobalSymbols + checkForUpdatesAndNotify(downloadNotification) { + if (!this.isUpdaterActive()) { + return Promise.resolve(null); + } + return this.checkForUpdates().then(it => { + const downloadPromise = it.downloadPromise; + if (downloadPromise == null) { + if (this._logger.debug != null) { + this._logger.debug("checkForUpdatesAndNotify called, downloadPromise is null"); + } + return it; + } + void downloadPromise.then(() => { + const notificationContent = AppUpdater.formatDownloadNotification(it.updateInfo.version, this.app.name, downloadNotification); + new (__webpack_require__(/*! electron */ "electron").Notification)(notificationContent).show(); + }); + return it; + }); + } + static formatDownloadNotification(version, appName, downloadNotification) { + if (downloadNotification == null) { + downloadNotification = { + title: "A new update is ready to install", + body: `{appName} version {version} has been downloaded and will be automatically installed on exit`, + }; + } + downloadNotification = { + title: downloadNotification.title.replace("{appName}", appName).replace("{version}", version), + body: downloadNotification.body.replace("{appName}", appName).replace("{version}", version), + }; + return downloadNotification; + } + async isStagingMatch(updateInfo) { + const rawStagingPercentage = updateInfo.stagingPercentage; + let stagingPercentage = rawStagingPercentage; + if (stagingPercentage == null) { + return true; + } + stagingPercentage = parseInt(stagingPercentage, 10); + if (isNaN(stagingPercentage)) { + this._logger.warn(`Staging percentage is NaN: ${rawStagingPercentage}`); + return true; + } + // convert from user 0-100 to internal 0-1 + stagingPercentage = stagingPercentage / 100; + const stagingUserId = await this.stagingUserIdPromise.value; + const val = builder_util_runtime_1.UUID.parse(stagingUserId).readUInt32BE(12); + const percentage = val / 0xffffffff; + this._logger.info(`Staging percentage: ${stagingPercentage}, percentage: ${percentage}, user id: ${stagingUserId}`); + return percentage < stagingPercentage; + } + computeFinalHeaders(headers) { + if (this.requestHeaders != null) { + Object.assign(headers, this.requestHeaders); + } + return headers; + } + async isUpdateAvailable(updateInfo) { + const latestVersion = semver_1.parse(updateInfo.version); + if (latestVersion == null) { + throw builder_util_runtime_1.newError(`This file could not be downloaded, or the latest version (from update server) does not have a valid semver version: "${updateInfo.version}"`, "ERR_UPDATER_INVALID_VERSION"); + } + const currentVersion = this.currentVersion; + if (semver_1.eq(latestVersion, currentVersion)) { + return false; + } + const isStagingMatch = await this.isStagingMatch(updateInfo); + if (!isStagingMatch) { + return false; + } + // https://github.com/electron-userland/electron-builder/pull/3111#issuecomment-405033227 + // https://github.com/electron-userland/electron-builder/pull/3111#issuecomment-405030797 + const isLatestVersionNewer = semver_1.gt(latestVersion, currentVersion); + const isLatestVersionOlder = semver_1.lt(latestVersion, currentVersion); + if (isLatestVersionNewer) { + return true; + } + return this.allowDowngrade && isLatestVersionOlder; + } + async getUpdateInfoAndProvider() { + await this.app.whenReady(); + if (this.clientPromise == null) { + this.clientPromise = this.configOnDisk.value.then(it => providerFactory_1.createClient(it, this, this.createProviderRuntimeOptions())); + } + const client = await this.clientPromise; + const stagingUserId = await this.stagingUserIdPromise.value; + client.setRequestHeaders(this.computeFinalHeaders({ "x-user-staging-id": stagingUserId })); + return { + info: await client.getLatestVersion(), + provider: client, + }; + } + // eslint-disable-next-line @typescript-eslint/explicit-function-return-type + createProviderRuntimeOptions() { + return { + isUseMultipleRangeRequest: true, + platform: this._testOnlyOptions == null ? process.platform : this._testOnlyOptions.platform, + executor: this.httpExecutor, + }; + } + async doCheckForUpdates() { + this.emit("checking-for-update"); + const result = await this.getUpdateInfoAndProvider(); + const updateInfo = result.info; + if (!(await this.isUpdateAvailable(updateInfo))) { + this._logger.info(`Update for version ${this.currentVersion} is not available (latest version: ${updateInfo.version}, downgrade is ${this.allowDowngrade ? "allowed" : "disallowed"}).`); + this.emit("update-not-available", updateInfo); + return { + versionInfo: updateInfo, + updateInfo, + }; + } + this.updateInfoAndProvider = result; + this.onUpdateAvailable(updateInfo); + const cancellationToken = new builder_util_runtime_1.CancellationToken(); + //noinspection ES6MissingAwait + return { + versionInfo: updateInfo, + updateInfo, + cancellationToken, + downloadPromise: this.autoDownload ? this.downloadUpdate(cancellationToken) : null, + }; + } + onUpdateAvailable(updateInfo) { + this._logger.info(`Found version ${updateInfo.version} (url: ${builder_util_runtime_1.asArray(updateInfo.files) + .map(it => it.url) + .join(", ")})`); + this.emit("update-available", updateInfo); + } + /** + * Start downloading update manually. You can use this method if `autoDownload` option is set to `false`. + * @returns {Promise} Path to downloaded file. + */ + downloadUpdate(cancellationToken = new builder_util_runtime_1.CancellationToken()) { + const updateInfoAndProvider = this.updateInfoAndProvider; + if (updateInfoAndProvider == null) { + const error = new Error("Please check update first"); + this.dispatchError(error); + return Promise.reject(error); + } + this._logger.info(`Downloading update from ${builder_util_runtime_1.asArray(updateInfoAndProvider.info.files) + .map(it => it.url) + .join(", ")}`); + const errorHandler = (e) => { + // https://github.com/electron-userland/electron-builder/issues/1150#issuecomment-436891159 + if (!(e instanceof builder_util_runtime_1.CancellationError)) { + try { + this.dispatchError(e); + } + catch (nestedError) { + this._logger.warn(`Cannot dispatch error event: ${nestedError.stack || nestedError}`); + } + } + return e; + }; + try { + return this.doDownloadUpdate({ + updateInfoAndProvider, + requestHeaders: this.computeRequestHeaders(updateInfoAndProvider.provider), + cancellationToken, + }).catch(e => { + throw errorHandler(e); + }); + } + catch (e) { + return Promise.reject(errorHandler(e)); + } + } + dispatchError(e) { + this.emit("error", e, (e.stack || e).toString()); + } + dispatchUpdateDownloaded(event) { + this.emit(main_1.UPDATE_DOWNLOADED, event); + } + async loadUpdateConfig() { + if (this._appUpdateConfigPath == null) { + this._appUpdateConfigPath = this.app.appUpdateConfigPath; + } + return js_yaml_1.load(await fs_extra_1.readFile(this._appUpdateConfigPath, "utf-8")); + } + computeRequestHeaders(provider) { + const fileExtraDownloadHeaders = provider.fileExtraDownloadHeaders; + if (fileExtraDownloadHeaders != null) { + const requestHeaders = this.requestHeaders; + return requestHeaders == null + ? fileExtraDownloadHeaders + : { + ...fileExtraDownloadHeaders, + ...requestHeaders, + }; + } + return this.computeFinalHeaders({ accept: "*/*" }); + } + async getOrCreateStagingUserId() { + const file = path.join(this.app.userDataPath, ".updaterId"); + try { + const id = await fs_extra_1.readFile(file, "utf-8"); + if (builder_util_runtime_1.UUID.check(id)) { + return id; + } + else { + this._logger.warn(`Staging user id file exists, but content was invalid: ${id}`); + } + } + catch (e) { + if (e.code !== "ENOENT") { + this._logger.warn(`Couldn't read staging user ID, creating a blank one: ${e}`); + } + } + const id = builder_util_runtime_1.UUID.v5(crypto_1.randomBytes(4096), builder_util_runtime_1.UUID.OID); + this._logger.info(`Generated new staging user ID: ${id}`); + try { + await fs_extra_1.outputFile(file, id); + } + catch (e) { + this._logger.warn(`Couldn't write out staging user ID: ${e}`); + } + return id; + } + /** @internal */ + get isAddNoCacheQuery() { + const headers = this.requestHeaders; + // https://github.com/electron-userland/electron-builder/issues/3021 + if (headers == null) { + return true; + } + for (const headerName of Object.keys(headers)) { + const s = headerName.toLowerCase(); + if (s === "authorization" || s === "private-token") { + return false; + } + } + return true; + } + async getOrCreateDownloadHelper() { + let result = this.downloadedUpdateHelper; + if (result == null) { + const dirName = (await this.configOnDisk.value).updaterCacheDirName; + const logger = this._logger; + if (dirName == null) { + logger.error("updaterCacheDirName is not specified in app-update.yml Was app build using at least electron-builder 20.34.0?"); + } + const cacheDir = path.join(this.app.baseCachePath, dirName || this.app.name); + if (logger.debug != null) { + logger.debug(`updater cache dir: ${cacheDir}`); + } + result = new DownloadedUpdateHelper_1.DownloadedUpdateHelper(cacheDir); + this.downloadedUpdateHelper = result; + } + return result; + } + async executeDownload(taskOptions) { + const fileInfo = taskOptions.fileInfo; + const downloadOptions = { + headers: taskOptions.downloadUpdateOptions.requestHeaders, + cancellationToken: taskOptions.downloadUpdateOptions.cancellationToken, + sha2: fileInfo.info.sha2, + sha512: fileInfo.info.sha512, + }; + if (this.listenerCount(main_1.DOWNLOAD_PROGRESS) > 0) { + downloadOptions.onProgress = it => this.emit(main_1.DOWNLOAD_PROGRESS, it); + } + const updateInfo = taskOptions.downloadUpdateOptions.updateInfoAndProvider.info; + const version = updateInfo.version; + const packageInfo = fileInfo.packageInfo; + function getCacheUpdateFileName() { + // NodeJS URL doesn't decode automatically + const urlPath = decodeURIComponent(taskOptions.fileInfo.url.pathname); + if (urlPath.endsWith(`.${taskOptions.fileExtension}`)) { + return path.posix.basename(urlPath); + } + else { + // url like /latest, generate name + return `update.${taskOptions.fileExtension}`; + } + } + const downloadedUpdateHelper = await this.getOrCreateDownloadHelper(); + const cacheDir = downloadedUpdateHelper.cacheDirForPendingUpdate; + await fs_extra_1.ensureDir(cacheDir); + const updateFileName = getCacheUpdateFileName(); + let updateFile = path.join(cacheDir, updateFileName); + const packageFile = packageInfo == null ? null : path.join(cacheDir, `package-${version}${path.extname(packageInfo.path) || ".7z"}`); + const done = async (isSaveCache) => { + await downloadedUpdateHelper.setDownloadedFile(updateFile, packageFile, updateInfo, fileInfo, updateFileName, isSaveCache); + await taskOptions.done({ + ...updateInfo, + downloadedFile: updateFile, + }); + return packageFile == null ? [updateFile] : [updateFile, packageFile]; + }; + const log = this._logger; + const cachedUpdateFile = await downloadedUpdateHelper.validateDownloadedPath(updateFile, updateInfo, fileInfo, log); + if (cachedUpdateFile != null) { + updateFile = cachedUpdateFile; + return await done(false); + } + const removeFileIfAny = async () => { + await downloadedUpdateHelper.clear().catch(() => { + // ignore + }); + return await fs_extra_1.unlink(updateFile).catch(() => { + // ignore + }); + }; + const tempUpdateFile = await DownloadedUpdateHelper_1.createTempUpdateFile(`temp-${updateFileName}`, cacheDir, log); + try { + await taskOptions.task(tempUpdateFile, downloadOptions, packageFile, removeFileIfAny); + await fs_extra_1.rename(tempUpdateFile, updateFile); + } + catch (e) { + await removeFileIfAny(); + if (e instanceof builder_util_runtime_1.CancellationError) { + log.info("cancelled"); + this.emit("update-cancelled", updateInfo); + } + throw e; + } + log.info(`New version ${version} has been downloaded to ${updateFile}`); + return await done(true); + } +} +exports.AppUpdater = AppUpdater; +function hasPrereleaseComponents(version) { + const versionPrereleaseComponent = semver_1.prerelease(version); + return versionPrereleaseComponent != null && versionPrereleaseComponent.length > 0; +} +/** @private */ +class NoOpLogger { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + info(message) { + // ignore + } + // eslint-disable-next-line @typescript-eslint/no-unused-vars + warn(message) { + // ignore + } + // eslint-disable-next-line @typescript-eslint/no-unused-vars + error(message) { + // ignore + } +} +exports.NoOpLogger = NoOpLogger; +//# sourceMappingURL=AppUpdater.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/out/BaseUpdater.js": +/*!**********************************************************!*\ + !*** ./node_modules/electron-updater/out/BaseUpdater.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BaseUpdater = void 0; +const AppUpdater_1 = __webpack_require__(/*! ./AppUpdater */ "./node_modules/electron-updater/out/AppUpdater.js"); +class BaseUpdater extends AppUpdater_1.AppUpdater { + constructor(options, app) { + super(options, app); + this.quitAndInstallCalled = false; + this.quitHandlerAdded = false; + } + quitAndInstall(isSilent = false, isForceRunAfter = false) { + this._logger.info(`Install on explicit quitAndInstall`); + const isInstalled = this.install(isSilent, isSilent ? isForceRunAfter : true); + if (isInstalled) { + setImmediate(() => { + this.app.quit(); + }); + } + else { + this.quitAndInstallCalled = false; + } + } + executeDownload(taskOptions) { + return super.executeDownload({ + ...taskOptions, + done: event => { + this.dispatchUpdateDownloaded(event); + this.addQuitHandler(); + return Promise.resolve(); + }, + }); + } + // must be sync (because quit even handler is not async) + install(isSilent, isForceRunAfter) { + if (this.quitAndInstallCalled) { + this._logger.warn("install call ignored: quitAndInstallCalled is set to true"); + return false; + } + const downloadedUpdateHelper = this.downloadedUpdateHelper; + const installerPath = downloadedUpdateHelper == null ? null : downloadedUpdateHelper.file; + const downloadedFileInfo = downloadedUpdateHelper == null ? null : downloadedUpdateHelper.downloadedFileInfo; + if (installerPath == null || downloadedFileInfo == null) { + this.dispatchError(new Error("No valid update available, can't quit and install")); + return false; + } + // prevent calling several times + this.quitAndInstallCalled = true; + try { + this._logger.info(`Install: isSilent: ${isSilent}, isForceRunAfter: ${isForceRunAfter}`); + return this.doInstall({ + installerPath, + isSilent, + isForceRunAfter, + isAdminRightsRequired: downloadedFileInfo.isAdminRightsRequired, + }); + } + catch (e) { + this.dispatchError(e); + return false; + } + } + addQuitHandler() { + if (this.quitHandlerAdded || !this.autoInstallOnAppQuit) { + return; + } + this.quitHandlerAdded = true; + this.app.onQuit(exitCode => { + if (this.quitAndInstallCalled) { + this._logger.info("Update installer has already been triggered. Quitting application."); + return; + } + if (!this.autoInstallOnAppQuit) { + this._logger.info("Update will not be installed on quit because autoInstallOnAppQuit is set to false."); + return; + } + if (exitCode !== 0) { + this._logger.info(`Update will be not installed on quit because application is quitting with exit code ${exitCode}`); + return; + } + this._logger.info("Auto install update on quit"); + this.install(true, false); + }); + } +} +exports.BaseUpdater = BaseUpdater; +//# sourceMappingURL=BaseUpdater.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/out/DownloadedUpdateHelper.js": +/*!*********************************************************************!*\ + !*** ./node_modules/electron-updater/out/DownloadedUpdateHelper.js ***! + \*********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createTempUpdateFile = exports.DownloadedUpdateHelper = void 0; +const crypto_1 = __webpack_require__(/*! crypto */ "crypto"); +const fs_1 = __webpack_require__(/*! fs */ "fs"); +// @ts-ignore +const isEqual = __webpack_require__(/*! lodash.isequal */ "./node_modules/lodash.isequal/index.js"); +const fs_extra_1 = __webpack_require__(/*! fs-extra */ "./node_modules/fs-extra/lib/index.js"); +const path = __webpack_require__(/*! path */ "path"); +/** @private **/ +class DownloadedUpdateHelper { + constructor(cacheDir) { + this.cacheDir = cacheDir; + this._file = null; + this._packageFile = null; + this.versionInfo = null; + this.fileInfo = null; + this._downloadedFileInfo = null; + } + get downloadedFileInfo() { + return this._downloadedFileInfo; + } + get file() { + return this._file; + } + get packageFile() { + return this._packageFile; + } + get cacheDirForPendingUpdate() { + return path.join(this.cacheDir, "pending"); + } + async validateDownloadedPath(updateFile, updateInfo, fileInfo, logger) { + if (this.versionInfo != null && this.file === updateFile && this.fileInfo != null) { + // update has already been downloaded from this running instance + // check here only existence, not checksum + if (isEqual(this.versionInfo, updateInfo) && isEqual(this.fileInfo.info, fileInfo.info) && (await fs_extra_1.pathExists(updateFile))) { + return updateFile; + } + else { + return null; + } + } + // update has already been downloaded from some previous app launch + const cachedUpdateFile = await this.getValidCachedUpdateFile(fileInfo, logger); + if (cachedUpdateFile === null) { + return null; + } + logger.info(`Update has already been downloaded to ${updateFile}).`); + this._file = cachedUpdateFile; + return cachedUpdateFile; + } + async setDownloadedFile(downloadedFile, packageFile, versionInfo, fileInfo, updateFileName, isSaveCache) { + this._file = downloadedFile; + this._packageFile = packageFile; + this.versionInfo = versionInfo; + this.fileInfo = fileInfo; + this._downloadedFileInfo = { + fileName: updateFileName, + sha512: fileInfo.info.sha512, + isAdminRightsRequired: fileInfo.info.isAdminRightsRequired === true, + }; + if (isSaveCache) { + await fs_extra_1.outputJson(this.getUpdateInfoFile(), this._downloadedFileInfo); + } + } + async clear() { + this._file = null; + this._packageFile = null; + this.versionInfo = null; + this.fileInfo = null; + await this.cleanCacheDirForPendingUpdate(); + } + async cleanCacheDirForPendingUpdate() { + try { + // remove stale data + await fs_extra_1.emptyDir(this.cacheDirForPendingUpdate); + } + catch (ignore) { + // ignore + } + } + /** + * Returns "update-info.json" which is created in the update cache directory's "pending" subfolder after the first update is downloaded. If the update file does not exist then the cache is cleared and recreated. If the update file exists then its properties are validated. + * @param fileInfo + * @param logger + */ + async getValidCachedUpdateFile(fileInfo, logger) { + var _a; + const updateInfoFilePath = this.getUpdateInfoFile(); + const doesUpdateInfoFileExist = await fs_extra_1.pathExists(updateInfoFilePath); + if (!doesUpdateInfoFileExist) { + return null; + } + let cachedInfo; + try { + cachedInfo = await fs_extra_1.readJson(updateInfoFilePath); + } + catch (error) { + let message = `No cached update info available`; + if (error.code !== "ENOENT") { + await this.cleanCacheDirForPendingUpdate(); + message += ` (error on read: ${error.message})`; + } + logger.info(message); + return null; + } + const isCachedInfoFileNameValid = (_a = (cachedInfo === null || cachedInfo === void 0 ? void 0 : cachedInfo.fileName) !== null) !== null && _a !== void 0 ? _a : false; + if (!isCachedInfoFileNameValid) { + logger.warn(`Cached update info is corrupted: no fileName, directory for cached update will be cleaned`); + await this.cleanCacheDirForPendingUpdate(); + return null; + } + if (fileInfo.info.sha512 !== cachedInfo.sha512) { + logger.info(`Cached update sha512 checksum doesn't match the latest available update. New update must be downloaded. Cached: ${cachedInfo.sha512}, expected: ${fileInfo.info.sha512}. Directory for cached update will be cleaned`); + await this.cleanCacheDirForPendingUpdate(); + return null; + } + const updateFile = path.join(this.cacheDirForPendingUpdate, cachedInfo.fileName); + if (!(await fs_extra_1.pathExists(updateFile))) { + logger.info("Cached update file doesn't exist"); + return null; + } + const sha512 = await hashFile(updateFile); + if (fileInfo.info.sha512 !== sha512) { + logger.warn(`Sha512 checksum doesn't match the latest available update. New update must be downloaded. Cached: ${sha512}, expected: ${fileInfo.info.sha512}`); + await this.cleanCacheDirForPendingUpdate(); + return null; + } + this._downloadedFileInfo = cachedInfo; + return updateFile; + } + getUpdateInfoFile() { + return path.join(this.cacheDirForPendingUpdate, "update-info.json"); + } +} +exports.DownloadedUpdateHelper = DownloadedUpdateHelper; +function hashFile(file, algorithm = "sha512", encoding = "base64", options) { + return new Promise((resolve, reject) => { + const hash = crypto_1.createHash(algorithm); + hash.on("error", reject).setEncoding(encoding); + fs_1.createReadStream(file, { ...options, highWaterMark: 1024 * 1024 /* better to use more memory but hash faster */ }) + .on("error", reject) + .on("end", () => { + hash.end(); + resolve(hash.read()); + }) + .pipe(hash, { end: false }); + }); +} +async function createTempUpdateFile(name, cacheDir, log) { + // https://github.com/electron-userland/electron-builder/pull/2474#issuecomment-366481912 + let nameCounter = 0; + let result = path.join(cacheDir, name); + for (let i = 0; i < 3; i++) { + try { + await fs_extra_1.unlink(result); + return result; + } + catch (e) { + if (e.code === "ENOENT") { + return result; + } + log.warn(`Error on remove temp update file: ${e}`); + result = path.join(cacheDir, `${nameCounter++}-${name}`); + } + } + return result; +} +exports.createTempUpdateFile = createTempUpdateFile; +//# sourceMappingURL=DownloadedUpdateHelper.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/out/ElectronAppAdapter.js": +/*!*****************************************************************!*\ + !*** ./node_modules/electron-updater/out/ElectronAppAdapter.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ElectronAppAdapter = void 0; +const path = __webpack_require__(/*! path */ "path"); +const AppAdapter_1 = __webpack_require__(/*! ./AppAdapter */ "./node_modules/electron-updater/out/AppAdapter.js"); +class ElectronAppAdapter { + constructor(app = __webpack_require__(/*! electron */ "electron").app) { + this.app = app; + } + whenReady() { + return this.app.whenReady(); + } + get version() { + return this.app.getVersion(); + } + get name() { + return this.app.getName(); + } + get isPackaged() { + return this.app.isPackaged === true; + } + get appUpdateConfigPath() { + return this.isPackaged ? path.join(process.resourcesPath, "app-update.yml") : path.join(this.app.getAppPath(), "dev-app-update.yml"); + } + get userDataPath() { + return this.app.getPath("userData"); + } + get baseCachePath() { + return AppAdapter_1.getAppCacheDir(); + } + quit() { + this.app.quit(); + } + onQuit(handler) { + this.app.once("quit", (_, exitCode) => handler(exitCode)); + } +} +exports.ElectronAppAdapter = ElectronAppAdapter; +//# sourceMappingURL=ElectronAppAdapter.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/out/MacUpdater.js": +/*!*********************************************************!*\ + !*** ./node_modules/electron-updater/out/MacUpdater.js ***! + \*********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MacUpdater = void 0; +const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); +const fs_extra_1 = __webpack_require__(/*! fs-extra */ "./node_modules/fs-extra/lib/index.js"); +const fs_1 = __webpack_require__(/*! fs */ "fs"); +const http_1 = __webpack_require__(/*! http */ "http"); +const AppUpdater_1 = __webpack_require__(/*! ./AppUpdater */ "./node_modules/electron-updater/out/AppUpdater.js"); +const Provider_1 = __webpack_require__(/*! ./providers/Provider */ "./node_modules/electron-updater/out/providers/Provider.js"); +class MacUpdater extends AppUpdater_1.AppUpdater { + constructor(options, app) { + super(options, app); + this.nativeUpdater = __webpack_require__(/*! electron */ "electron").autoUpdater; + this.squirrelDownloadedUpdate = false; + this.nativeUpdater.on("error", it => { + this._logger.warn(it); + this.emit("error", it); + }); + this.nativeUpdater.on("update-downloaded", () => { + this.squirrelDownloadedUpdate = true; + }); + } + doDownloadUpdate(downloadUpdateOptions) { + let files = downloadUpdateOptions.updateInfoAndProvider.provider.resolveFiles(downloadUpdateOptions.updateInfoAndProvider.info); + // Allow arm64 macs to install universal or rosetta2(x64) - https://github.com/electron-userland/electron-builder/pull/5524 + const isArm64 = (file) => file.url.pathname.includes("arm64"); + if (files.some(isArm64)) { + files = files.filter(file => (process.arch === "arm64") === isArm64(file)); + } + const zipFileInfo = Provider_1.findFile(files, "zip", ["pkg", "dmg"]); + if (zipFileInfo == null) { + throw builder_util_runtime_1.newError(`ZIP file not provided: ${builder_util_runtime_1.safeStringifyJson(files)}`, "ERR_UPDATER_ZIP_FILE_NOT_FOUND"); + } + const server = http_1.createServer(); + server.on("close", () => { + this._logger.info(`Proxy server for native Squirrel.Mac is closed (was started to download ${zipFileInfo.url.href})`); + }); + function getServerUrl() { + const address = server.address(); + return `http://127.0.0.1:${address.port}`; + } + return this.executeDownload({ + fileExtension: "zip", + fileInfo: zipFileInfo, + downloadUpdateOptions, + task: (destinationFile, downloadOptions) => { + return this.httpExecutor.download(zipFileInfo.url, destinationFile, downloadOptions); + }, + done: async (event) => { + const downloadedFile = event.downloadedFile; + let updateFileSize = zipFileInfo.info.size; + if (updateFileSize == null) { + updateFileSize = (await fs_extra_1.stat(downloadedFile)).size; + } + return await new Promise((resolve, reject) => { + // insecure random is ok + const fileUrl = `/${Date.now()}-${Math.floor(Math.random() * 9999)}.zip`; + server.on("request", (request, response) => { + const requestUrl = request.url; + this._logger.info(`${requestUrl} requested`); + if (requestUrl === "/") { + const data = Buffer.from(`{ "url": "${getServerUrl()}${fileUrl}" }`); + response.writeHead(200, { "Content-Type": "application/json", "Content-Length": data.length }); + response.end(data); + return; + } + if (!requestUrl.startsWith(fileUrl)) { + this._logger.warn(`${requestUrl} requested, but not supported`); + response.writeHead(404); + response.end(); + return; + } + this._logger.info(`${fileUrl} requested by Squirrel.Mac, pipe ${downloadedFile}`); + let errorOccurred = false; + response.on("finish", () => { + try { + setImmediate(() => server.close()); + } + finally { + if (!errorOccurred) { + this.nativeUpdater.removeListener("error", reject); + resolve([]); + } + } + }); + const readStream = fs_1.createReadStream(downloadedFile); + readStream.on("error", error => { + try { + response.end(); + } + catch (e) { + this._logger.warn(`cannot end response: ${e}`); + } + errorOccurred = true; + this.nativeUpdater.removeListener("error", reject); + reject(new Error(`Cannot pipe "${downloadedFile}": ${error}`)); + }); + response.writeHead(200, { + "Content-Type": "application/zip", + "Content-Length": updateFileSize, + }); + readStream.pipe(response); + }); + server.listen(0, "127.0.0.1", () => { + this.nativeUpdater.setFeedURL({ + url: getServerUrl(), + headers: { "Cache-Control": "no-cache" }, + }); + // The update has been downloaded and is ready to be served to Squirrel + this.dispatchUpdateDownloaded(event); + if (this.autoInstallOnAppQuit) { + this.nativeUpdater.once("error", reject); + // This will trigger fetching and installing the file on Squirrel side + this.nativeUpdater.checkForUpdates(); + } + else { + resolve([]); + } + }); + }); + }, + }); + } + quitAndInstall() { + if (this.squirrelDownloadedUpdate) { + // Update already fetched by Squirrel, it's ready to install + this.nativeUpdater.quitAndInstall(); + } + else { + // Quit and install as soon as Squirrel get the update + this.nativeUpdater.on("update-downloaded", () => { + this.nativeUpdater.quitAndInstall(); + }); + // And trigger the update + this.nativeUpdater.checkForUpdates(); + } + } +} +exports.MacUpdater = MacUpdater; +//# sourceMappingURL=MacUpdater.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/out/NsisUpdater.js": +/*!**********************************************************!*\ + !*** ./node_modules/electron-updater/out/NsisUpdater.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.NsisUpdater = void 0; +const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); +const child_process_1 = __webpack_require__(/*! child_process */ "child_process"); +const path = __webpack_require__(/*! path */ "path"); +const BaseUpdater_1 = __webpack_require__(/*! ./BaseUpdater */ "./node_modules/electron-updater/out/BaseUpdater.js"); +const FileWithEmbeddedBlockMapDifferentialDownloader_1 = __webpack_require__(/*! ./differentialDownloader/FileWithEmbeddedBlockMapDifferentialDownloader */ "./node_modules/electron-updater/out/differentialDownloader/FileWithEmbeddedBlockMapDifferentialDownloader.js"); +const GenericDifferentialDownloader_1 = __webpack_require__(/*! ./differentialDownloader/GenericDifferentialDownloader */ "./node_modules/electron-updater/out/differentialDownloader/GenericDifferentialDownloader.js"); +const main_1 = __webpack_require__(/*! ./main */ "./node_modules/electron-updater/out/main.js"); +const util_1 = __webpack_require__(/*! ./util */ "./node_modules/electron-updater/out/util.js"); +const Provider_1 = __webpack_require__(/*! ./providers/Provider */ "./node_modules/electron-updater/out/providers/Provider.js"); +const fs_extra_1 = __webpack_require__(/*! fs-extra */ "./node_modules/fs-extra/lib/index.js"); +const windowsExecutableCodeSignatureVerifier_1 = __webpack_require__(/*! ./windowsExecutableCodeSignatureVerifier */ "./node_modules/electron-updater/out/windowsExecutableCodeSignatureVerifier.js"); +const url_1 = __webpack_require__(/*! url */ "url"); +const zlib_1 = __webpack_require__(/*! zlib */ "zlib"); +class NsisUpdater extends BaseUpdater_1.BaseUpdater { + constructor(options, app) { + super(options, app); + } + /*** @private */ + doDownloadUpdate(downloadUpdateOptions) { + const provider = downloadUpdateOptions.updateInfoAndProvider.provider; + const fileInfo = Provider_1.findFile(provider.resolveFiles(downloadUpdateOptions.updateInfoAndProvider.info), "exe"); + return this.executeDownload({ + fileExtension: "exe", + downloadUpdateOptions, + fileInfo, + task: async (destinationFile, downloadOptions, packageFile, removeTempDirIfAny) => { + const packageInfo = fileInfo.packageInfo; + const isWebInstaller = packageInfo != null && packageFile != null; + if (isWebInstaller || (await this.differentialDownloadInstaller(fileInfo, downloadUpdateOptions, destinationFile, provider))) { + await this.httpExecutor.download(fileInfo.url, destinationFile, downloadOptions); + } + const signatureVerificationStatus = await this.verifySignature(destinationFile); + if (signatureVerificationStatus != null) { + await removeTempDirIfAny(); + // noinspection ThrowInsideFinallyBlockJS + throw builder_util_runtime_1.newError(`New version ${downloadUpdateOptions.updateInfoAndProvider.info.version} is not signed by the application owner: ${signatureVerificationStatus}`, "ERR_UPDATER_INVALID_SIGNATURE"); + } + if (isWebInstaller) { + if (await this.differentialDownloadWebPackage(downloadUpdateOptions, packageInfo, packageFile, provider)) { + try { + await this.httpExecutor.download(new url_1.URL(packageInfo.path), packageFile, { + headers: downloadUpdateOptions.requestHeaders, + cancellationToken: downloadUpdateOptions.cancellationToken, + sha512: packageInfo.sha512, + }); + } + catch (e) { + try { + await fs_extra_1.unlink(packageFile); + } + catch (ignored) { + // ignore + } + throw e; + } + } + } + }, + }); + } + // $certificateInfo = (Get-AuthenticodeSignature 'xxx\yyy.exe' + // | where {$_.Status.Equals([System.Management.Automation.SignatureStatus]::Valid) -and $_.SignerCertificate.Subject.Contains("CN=siemens.com")}) + // | Out-String ; if ($certificateInfo) { exit 0 } else { exit 1 } + async verifySignature(tempUpdateFile) { + let publisherName; + try { + publisherName = (await this.configOnDisk.value).publisherName; + if (publisherName == null) { + return null; + } + } + catch (e) { + if (e.code === "ENOENT") { + // no app-update.yml + return null; + } + throw e; + } + return await windowsExecutableCodeSignatureVerifier_1.verifySignature(Array.isArray(publisherName) ? publisherName : [publisherName], tempUpdateFile, this._logger); + } + doInstall(options) { + const args = ["--updated"]; + if (options.isSilent) { + args.push("/S"); + } + if (options.isForceRunAfter) { + args.push("--force-run"); + } + const packagePath = this.downloadedUpdateHelper == null ? null : this.downloadedUpdateHelper.packageFile; + if (packagePath != null) { + // only = form is supported + args.push(`--package-file=${packagePath}`); + } + const callUsingElevation = () => { + _spawn(path.join(process.resourcesPath, "elevate.exe"), [options.installerPath].concat(args)).catch(e => this.dispatchError(e)); + }; + if (options.isAdminRightsRequired) { + this._logger.info("isAdminRightsRequired is set to true, run installer using elevate.exe"); + callUsingElevation(); + return true; + } + _spawn(options.installerPath, args).catch((e) => { + // https://github.com/electron-userland/electron-builder/issues/1129 + // Node 8 sends errors: https://nodejs.org/dist/latest-v8.x/docs/api/errors.html#errors_common_system_errors + const errorCode = e.code; + this._logger.info(`Cannot run installer: error code: ${errorCode}, error message: "${e.message}", will be executed again using elevate if EACCES"`); + if (errorCode === "UNKNOWN" || errorCode === "EACCES") { + callUsingElevation(); + } + else { + this.dispatchError(e); + } + }); + return true; + } + async differentialDownloadInstaller(fileInfo, downloadUpdateOptions, installerPath, provider) { + try { + if (this._testOnlyOptions != null && !this._testOnlyOptions.isUseDifferentialDownload) { + return true; + } + const blockmapFileUrls = util_1.blockmapFiles(fileInfo.url, downloadUpdateOptions.updateInfoAndProvider.info.version, this.app.version); + this._logger.info(`Download block maps (old: "${blockmapFileUrls[0]}", new: ${blockmapFileUrls[1]})`); + const downloadBlockMap = async (url) => { + const data = await this.httpExecutor.downloadToBuffer(url, { + headers: downloadUpdateOptions.requestHeaders, + cancellationToken: downloadUpdateOptions.cancellationToken, + }); + if (data == null || data.length === 0) { + throw new Error(`Blockmap "${url.href}" is empty`); + } + try { + return JSON.parse(zlib_1.gunzipSync(data).toString()); + } + catch (e) { + throw new Error(`Cannot parse blockmap "${url.href}", error: ${e}, raw data: ${data}`); + } + }; + const downloadOptions = { + newUrl: fileInfo.url, + oldFile: path.join(this.downloadedUpdateHelper.cacheDir, builder_util_runtime_1.CURRENT_APP_INSTALLER_FILE_NAME), + logger: this._logger, + newFile: installerPath, + isUseMultipleRangeRequest: provider.isUseMultipleRangeRequest, + requestHeaders: downloadUpdateOptions.requestHeaders, + cancellationToken: downloadUpdateOptions.cancellationToken, + }; + if (this.listenerCount(main_1.DOWNLOAD_PROGRESS) > 0) { + downloadOptions.onProgress = it => this.emit(main_1.DOWNLOAD_PROGRESS, it); + } + const blockMapDataList = await Promise.all(blockmapFileUrls.map(u => downloadBlockMap(u))); + await new GenericDifferentialDownloader_1.GenericDifferentialDownloader(fileInfo.info, this.httpExecutor, downloadOptions).download(blockMapDataList[0], blockMapDataList[1]); + return false; + } + catch (e) { + this._logger.error(`Cannot download differentially, fallback to full download: ${e.stack || e}`); + if (this._testOnlyOptions != null) { + // test mode + throw e; + } + return true; + } + } + async differentialDownloadWebPackage(downloadUpdateOptions, packageInfo, packagePath, provider) { + if (packageInfo.blockMapSize == null) { + return true; + } + try { + const downloadOptions = { + newUrl: new url_1.URL(packageInfo.path), + oldFile: path.join(this.downloadedUpdateHelper.cacheDir, builder_util_runtime_1.CURRENT_APP_PACKAGE_FILE_NAME), + logger: this._logger, + newFile: packagePath, + requestHeaders: this.requestHeaders, + isUseMultipleRangeRequest: provider.isUseMultipleRangeRequest, + cancellationToken: downloadUpdateOptions.cancellationToken, + }; + if (this.listenerCount(main_1.DOWNLOAD_PROGRESS) > 0) { + downloadOptions.onProgress = it => this.emit(main_1.DOWNLOAD_PROGRESS, it); + } + await new FileWithEmbeddedBlockMapDifferentialDownloader_1.FileWithEmbeddedBlockMapDifferentialDownloader(packageInfo, this.httpExecutor, downloadOptions).download(); + } + catch (e) { + this._logger.error(`Cannot download differentially, fallback to full download: ${e.stack || e}`); + // during test (developer machine mac or linux) we must throw error + return process.platform === "win32"; + } + return false; + } +} +exports.NsisUpdater = NsisUpdater; +/** + * This handles both node 8 and node 10 way of emitting error when spawning a process + * - node 8: Throws the error + * - node 10: Emit the error(Need to listen with on) */ -e.exports=r(175)},function(e){e.exports=JSON.parse('{"application/1d-interleaved-parityfec":{"source":"iana"},"application/3gpdash-qoe-report+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/3gpp-ims+xml":{"source":"iana","compressible":true},"application/3gpphal+json":{"source":"iana","compressible":true},"application/3gpphalforms+json":{"source":"iana","compressible":true},"application/a2l":{"source":"iana"},"application/ace+cbor":{"source":"iana"},"application/activemessage":{"source":"iana"},"application/activity+json":{"source":"iana","compressible":true},"application/alto-costmap+json":{"source":"iana","compressible":true},"application/alto-costmapfilter+json":{"source":"iana","compressible":true},"application/alto-directory+json":{"source":"iana","compressible":true},"application/alto-endpointcost+json":{"source":"iana","compressible":true},"application/alto-endpointcostparams+json":{"source":"iana","compressible":true},"application/alto-endpointprop+json":{"source":"iana","compressible":true},"application/alto-endpointpropparams+json":{"source":"iana","compressible":true},"application/alto-error+json":{"source":"iana","compressible":true},"application/alto-networkmap+json":{"source":"iana","compressible":true},"application/alto-networkmapfilter+json":{"source":"iana","compressible":true},"application/alto-updatestreamcontrol+json":{"source":"iana","compressible":true},"application/alto-updatestreamparams+json":{"source":"iana","compressible":true},"application/aml":{"source":"iana"},"application/andrew-inset":{"source":"iana","extensions":["ez"]},"application/applefile":{"source":"iana"},"application/applixware":{"source":"apache","extensions":["aw"]},"application/at+jwt":{"source":"iana"},"application/atf":{"source":"iana"},"application/atfx":{"source":"iana"},"application/atom+xml":{"source":"iana","compressible":true,"extensions":["atom"]},"application/atomcat+xml":{"source":"iana","compressible":true,"extensions":["atomcat"]},"application/atomdeleted+xml":{"source":"iana","compressible":true,"extensions":["atomdeleted"]},"application/atomicmail":{"source":"iana"},"application/atomsvc+xml":{"source":"iana","compressible":true,"extensions":["atomsvc"]},"application/atsc-dwd+xml":{"source":"iana","compressible":true,"extensions":["dwd"]},"application/atsc-dynamic-event-message":{"source":"iana"},"application/atsc-held+xml":{"source":"iana","compressible":true,"extensions":["held"]},"application/atsc-rdt+json":{"source":"iana","compressible":true},"application/atsc-rsat+xml":{"source":"iana","compressible":true,"extensions":["rsat"]},"application/atxml":{"source":"iana"},"application/auth-policy+xml":{"source":"iana","compressible":true},"application/bacnet-xdd+zip":{"source":"iana","compressible":false},"application/batch-smtp":{"source":"iana"},"application/bdoc":{"compressible":false,"extensions":["bdoc"]},"application/beep+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/calendar+json":{"source":"iana","compressible":true},"application/calendar+xml":{"source":"iana","compressible":true,"extensions":["xcs"]},"application/call-completion":{"source":"iana"},"application/cals-1840":{"source":"iana"},"application/captive+json":{"source":"iana","compressible":true},"application/cbor":{"source":"iana"},"application/cbor-seq":{"source":"iana"},"application/cccex":{"source":"iana"},"application/ccmp+xml":{"source":"iana","compressible":true},"application/ccxml+xml":{"source":"iana","compressible":true,"extensions":["ccxml"]},"application/cdfx+xml":{"source":"iana","compressible":true,"extensions":["cdfx"]},"application/cdmi-capability":{"source":"iana","extensions":["cdmia"]},"application/cdmi-container":{"source":"iana","extensions":["cdmic"]},"application/cdmi-domain":{"source":"iana","extensions":["cdmid"]},"application/cdmi-object":{"source":"iana","extensions":["cdmio"]},"application/cdmi-queue":{"source":"iana","extensions":["cdmiq"]},"application/cdni":{"source":"iana"},"application/cea":{"source":"iana"},"application/cea-2018+xml":{"source":"iana","compressible":true},"application/cellml+xml":{"source":"iana","compressible":true},"application/cfw":{"source":"iana"},"application/clr":{"source":"iana"},"application/clue+xml":{"source":"iana","compressible":true},"application/clue_info+xml":{"source":"iana","compressible":true},"application/cms":{"source":"iana"},"application/cnrp+xml":{"source":"iana","compressible":true},"application/coap-group+json":{"source":"iana","compressible":true},"application/coap-payload":{"source":"iana"},"application/commonground":{"source":"iana"},"application/conference-info+xml":{"source":"iana","compressible":true},"application/cose":{"source":"iana"},"application/cose-key":{"source":"iana"},"application/cose-key-set":{"source":"iana"},"application/cpl+xml":{"source":"iana","compressible":true},"application/csrattrs":{"source":"iana"},"application/csta+xml":{"source":"iana","compressible":true},"application/cstadata+xml":{"source":"iana","compressible":true},"application/csvm+json":{"source":"iana","compressible":true},"application/cu-seeme":{"source":"apache","extensions":["cu"]},"application/cwt":{"source":"iana"},"application/cybercash":{"source":"iana"},"application/dart":{"compressible":true},"application/dash+xml":{"source":"iana","compressible":true,"extensions":["mpd"]},"application/dashdelta":{"source":"iana"},"application/davmount+xml":{"source":"iana","compressible":true,"extensions":["davmount"]},"application/dca-rft":{"source":"iana"},"application/dcd":{"source":"iana"},"application/dec-dx":{"source":"iana"},"application/dialog-info+xml":{"source":"iana","compressible":true},"application/dicom":{"source":"iana"},"application/dicom+json":{"source":"iana","compressible":true},"application/dicom+xml":{"source":"iana","compressible":true},"application/dii":{"source":"iana"},"application/dit":{"source":"iana"},"application/dns":{"source":"iana"},"application/dns+json":{"source":"iana","compressible":true},"application/dns-message":{"source":"iana"},"application/docbook+xml":{"source":"apache","compressible":true,"extensions":["dbk"]},"application/dots+cbor":{"source":"iana"},"application/dskpp+xml":{"source":"iana","compressible":true},"application/dssc+der":{"source":"iana","extensions":["dssc"]},"application/dssc+xml":{"source":"iana","compressible":true,"extensions":["xdssc"]},"application/dvcs":{"source":"iana"},"application/ecmascript":{"source":"iana","compressible":true,"extensions":["es","ecma"]},"application/edi-consent":{"source":"iana"},"application/edi-x12":{"source":"iana","compressible":false},"application/edifact":{"source":"iana","compressible":false},"application/efi":{"source":"iana"},"application/elm+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/elm+xml":{"source":"iana","compressible":true},"application/emergencycalldata.cap+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/emergencycalldata.comment+xml":{"source":"iana","compressible":true},"application/emergencycalldata.control+xml":{"source":"iana","compressible":true},"application/emergencycalldata.deviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.ecall.msd":{"source":"iana"},"application/emergencycalldata.providerinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.serviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.subscriberinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.veds+xml":{"source":"iana","compressible":true},"application/emma+xml":{"source":"iana","compressible":true,"extensions":["emma"]},"application/emotionml+xml":{"source":"iana","compressible":true,"extensions":["emotionml"]},"application/encaprtp":{"source":"iana"},"application/epp+xml":{"source":"iana","compressible":true},"application/epub+zip":{"source":"iana","compressible":false,"extensions":["epub"]},"application/eshop":{"source":"iana"},"application/exi":{"source":"iana","extensions":["exi"]},"application/expect-ct-report+json":{"source":"iana","compressible":true},"application/express":{"source":"iana","extensions":["exp"]},"application/fastinfoset":{"source":"iana"},"application/fastsoap":{"source":"iana"},"application/fdt+xml":{"source":"iana","compressible":true,"extensions":["fdt"]},"application/fhir+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/fhir+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/fido.trusted-apps+json":{"compressible":true},"application/fits":{"source":"iana"},"application/flexfec":{"source":"iana"},"application/font-sfnt":{"source":"iana"},"application/font-tdpfr":{"source":"iana","extensions":["pfr"]},"application/font-woff":{"source":"iana","compressible":false},"application/framework-attributes+xml":{"source":"iana","compressible":true},"application/geo+json":{"source":"iana","compressible":true,"extensions":["geojson"]},"application/geo+json-seq":{"source":"iana"},"application/geopackage+sqlite3":{"source":"iana"},"application/geoxacml+xml":{"source":"iana","compressible":true},"application/gltf-buffer":{"source":"iana"},"application/gml+xml":{"source":"iana","compressible":true,"extensions":["gml"]},"application/gpx+xml":{"source":"apache","compressible":true,"extensions":["gpx"]},"application/gxf":{"source":"apache","extensions":["gxf"]},"application/gzip":{"source":"iana","compressible":false,"extensions":["gz"]},"application/h224":{"source":"iana"},"application/held+xml":{"source":"iana","compressible":true},"application/hjson":{"extensions":["hjson"]},"application/http":{"source":"iana"},"application/hyperstudio":{"source":"iana","extensions":["stk"]},"application/ibe-key-request+xml":{"source":"iana","compressible":true},"application/ibe-pkg-reply+xml":{"source":"iana","compressible":true},"application/ibe-pp-data":{"source":"iana"},"application/iges":{"source":"iana"},"application/im-iscomposing+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/index":{"source":"iana"},"application/index.cmd":{"source":"iana"},"application/index.obj":{"source":"iana"},"application/index.response":{"source":"iana"},"application/index.vnd":{"source":"iana"},"application/inkml+xml":{"source":"iana","compressible":true,"extensions":["ink","inkml"]},"application/iotp":{"source":"iana"},"application/ipfix":{"source":"iana","extensions":["ipfix"]},"application/ipp":{"source":"iana"},"application/isup":{"source":"iana"},"application/its+xml":{"source":"iana","compressible":true,"extensions":["its"]},"application/java-archive":{"source":"apache","compressible":false,"extensions":["jar","war","ear"]},"application/java-serialized-object":{"source":"apache","compressible":false,"extensions":["ser"]},"application/java-vm":{"source":"apache","compressible":false,"extensions":["class"]},"application/javascript":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["js","mjs"]},"application/jf2feed+json":{"source":"iana","compressible":true},"application/jose":{"source":"iana"},"application/jose+json":{"source":"iana","compressible":true},"application/jrd+json":{"source":"iana","compressible":true},"application/jscalendar+json":{"source":"iana","compressible":true},"application/json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["json","map"]},"application/json-patch+json":{"source":"iana","compressible":true},"application/json-seq":{"source":"iana"},"application/json5":{"extensions":["json5"]},"application/jsonml+json":{"source":"apache","compressible":true,"extensions":["jsonml"]},"application/jwk+json":{"source":"iana","compressible":true},"application/jwk-set+json":{"source":"iana","compressible":true},"application/jwt":{"source":"iana"},"application/kpml-request+xml":{"source":"iana","compressible":true},"application/kpml-response+xml":{"source":"iana","compressible":true},"application/ld+json":{"source":"iana","compressible":true,"extensions":["jsonld"]},"application/lgr+xml":{"source":"iana","compressible":true,"extensions":["lgr"]},"application/link-format":{"source":"iana"},"application/load-control+xml":{"source":"iana","compressible":true},"application/lost+xml":{"source":"iana","compressible":true,"extensions":["lostxml"]},"application/lostsync+xml":{"source":"iana","compressible":true},"application/lpf+zip":{"source":"iana","compressible":false},"application/lxf":{"source":"iana"},"application/mac-binhex40":{"source":"iana","extensions":["hqx"]},"application/mac-compactpro":{"source":"apache","extensions":["cpt"]},"application/macwriteii":{"source":"iana"},"application/mads+xml":{"source":"iana","compressible":true,"extensions":["mads"]},"application/manifest+json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["webmanifest"]},"application/marc":{"source":"iana","extensions":["mrc"]},"application/marcxml+xml":{"source":"iana","compressible":true,"extensions":["mrcx"]},"application/mathematica":{"source":"iana","extensions":["ma","nb","mb"]},"application/mathml+xml":{"source":"iana","compressible":true,"extensions":["mathml"]},"application/mathml-content+xml":{"source":"iana","compressible":true},"application/mathml-presentation+xml":{"source":"iana","compressible":true},"application/mbms-associated-procedure-description+xml":{"source":"iana","compressible":true},"application/mbms-deregister+xml":{"source":"iana","compressible":true},"application/mbms-envelope+xml":{"source":"iana","compressible":true},"application/mbms-msk+xml":{"source":"iana","compressible":true},"application/mbms-msk-response+xml":{"source":"iana","compressible":true},"application/mbms-protection-description+xml":{"source":"iana","compressible":true},"application/mbms-reception-report+xml":{"source":"iana","compressible":true},"application/mbms-register+xml":{"source":"iana","compressible":true},"application/mbms-register-response+xml":{"source":"iana","compressible":true},"application/mbms-schedule+xml":{"source":"iana","compressible":true},"application/mbms-user-service-description+xml":{"source":"iana","compressible":true},"application/mbox":{"source":"iana","extensions":["mbox"]},"application/media-policy-dataset+xml":{"source":"iana","compressible":true},"application/media_control+xml":{"source":"iana","compressible":true},"application/mediaservercontrol+xml":{"source":"iana","compressible":true,"extensions":["mscml"]},"application/merge-patch+json":{"source":"iana","compressible":true},"application/metalink+xml":{"source":"apache","compressible":true,"extensions":["metalink"]},"application/metalink4+xml":{"source":"iana","compressible":true,"extensions":["meta4"]},"application/mets+xml":{"source":"iana","compressible":true,"extensions":["mets"]},"application/mf4":{"source":"iana"},"application/mikey":{"source":"iana"},"application/mipc":{"source":"iana"},"application/missing-blocks+cbor-seq":{"source":"iana"},"application/mmt-aei+xml":{"source":"iana","compressible":true,"extensions":["maei"]},"application/mmt-usd+xml":{"source":"iana","compressible":true,"extensions":["musd"]},"application/mods+xml":{"source":"iana","compressible":true,"extensions":["mods"]},"application/moss-keys":{"source":"iana"},"application/moss-signature":{"source":"iana"},"application/mosskey-data":{"source":"iana"},"application/mosskey-request":{"source":"iana"},"application/mp21":{"source":"iana","extensions":["m21","mp21"]},"application/mp4":{"source":"iana","extensions":["mp4s","m4p"]},"application/mpeg4-generic":{"source":"iana"},"application/mpeg4-iod":{"source":"iana"},"application/mpeg4-iod-xmt":{"source":"iana"},"application/mrb-consumer+xml":{"source":"iana","compressible":true},"application/mrb-publish+xml":{"source":"iana","compressible":true},"application/msc-ivr+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msc-mixer+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msword":{"source":"iana","compressible":false,"extensions":["doc","dot"]},"application/mud+json":{"source":"iana","compressible":true},"application/multipart-core":{"source":"iana"},"application/mxf":{"source":"iana","extensions":["mxf"]},"application/n-quads":{"source":"iana","extensions":["nq"]},"application/n-triples":{"source":"iana","extensions":["nt"]},"application/nasdata":{"source":"iana"},"application/news-checkgroups":{"source":"iana","charset":"US-ASCII"},"application/news-groupinfo":{"source":"iana","charset":"US-ASCII"},"application/news-transmission":{"source":"iana"},"application/nlsml+xml":{"source":"iana","compressible":true},"application/node":{"source":"iana","extensions":["cjs"]},"application/nss":{"source":"iana"},"application/oauth-authz-req+jwt":{"source":"iana"},"application/ocsp-request":{"source":"iana"},"application/ocsp-response":{"source":"iana"},"application/octet-stream":{"source":"iana","compressible":false,"extensions":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{"source":"iana","extensions":["oda"]},"application/odm+xml":{"source":"iana","compressible":true},"application/odx":{"source":"iana"},"application/oebps-package+xml":{"source":"iana","compressible":true,"extensions":["opf"]},"application/ogg":{"source":"iana","compressible":false,"extensions":["ogx"]},"application/omdoc+xml":{"source":"apache","compressible":true,"extensions":["omdoc"]},"application/onenote":{"source":"apache","extensions":["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{"source":"iana","compressible":true},"application/oscore":{"source":"iana"},"application/oxps":{"source":"iana","extensions":["oxps"]},"application/p21":{"source":"iana"},"application/p21+zip":{"source":"iana","compressible":false},"application/p2p-overlay+xml":{"source":"iana","compressible":true,"extensions":["relo"]},"application/parityfec":{"source":"iana"},"application/passport":{"source":"iana"},"application/patch-ops-error+xml":{"source":"iana","compressible":true,"extensions":["xer"]},"application/pdf":{"source":"iana","compressible":false,"extensions":["pdf"]},"application/pdx":{"source":"iana"},"application/pem-certificate-chain":{"source":"iana"},"application/pgp-encrypted":{"source":"iana","compressible":false,"extensions":["pgp"]},"application/pgp-keys":{"source":"iana"},"application/pgp-signature":{"source":"iana","extensions":["asc","sig"]},"application/pics-rules":{"source":"apache","extensions":["prf"]},"application/pidf+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pidf-diff+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pkcs10":{"source":"iana","extensions":["p10"]},"application/pkcs12":{"source":"iana"},"application/pkcs7-mime":{"source":"iana","extensions":["p7m","p7c"]},"application/pkcs7-signature":{"source":"iana","extensions":["p7s"]},"application/pkcs8":{"source":"iana","extensions":["p8"]},"application/pkcs8-encrypted":{"source":"iana"},"application/pkix-attr-cert":{"source":"iana","extensions":["ac"]},"application/pkix-cert":{"source":"iana","extensions":["cer"]},"application/pkix-crl":{"source":"iana","extensions":["crl"]},"application/pkix-pkipath":{"source":"iana","extensions":["pkipath"]},"application/pkixcmp":{"source":"iana","extensions":["pki"]},"application/pls+xml":{"source":"iana","compressible":true,"extensions":["pls"]},"application/poc-settings+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/postscript":{"source":"iana","compressible":true,"extensions":["ai","eps","ps"]},"application/ppsp-tracker+json":{"source":"iana","compressible":true},"application/problem+json":{"source":"iana","compressible":true},"application/problem+xml":{"source":"iana","compressible":true},"application/provenance+xml":{"source":"iana","compressible":true,"extensions":["provx"]},"application/prs.alvestrand.titrax-sheet":{"source":"iana"},"application/prs.cww":{"source":"iana","extensions":["cww"]},"application/prs.cyn":{"source":"iana","charset":"7-BIT"},"application/prs.hpub+zip":{"source":"iana","compressible":false},"application/prs.nprend":{"source":"iana"},"application/prs.plucker":{"source":"iana"},"application/prs.rdf-xml-crypt":{"source":"iana"},"application/prs.xsf+xml":{"source":"iana","compressible":true},"application/pskc+xml":{"source":"iana","compressible":true,"extensions":["pskcxml"]},"application/pvd+json":{"source":"iana","compressible":true},"application/qsig":{"source":"iana"},"application/raml+yaml":{"compressible":true,"extensions":["raml"]},"application/raptorfec":{"source":"iana"},"application/rdap+json":{"source":"iana","compressible":true},"application/rdf+xml":{"source":"iana","compressible":true,"extensions":["rdf","owl"]},"application/reginfo+xml":{"source":"iana","compressible":true,"extensions":["rif"]},"application/relax-ng-compact-syntax":{"source":"iana","extensions":["rnc"]},"application/remote-printing":{"source":"iana"},"application/reputon+json":{"source":"iana","compressible":true},"application/resource-lists+xml":{"source":"iana","compressible":true,"extensions":["rl"]},"application/resource-lists-diff+xml":{"source":"iana","compressible":true,"extensions":["rld"]},"application/rfc+xml":{"source":"iana","compressible":true},"application/riscos":{"source":"iana"},"application/rlmi+xml":{"source":"iana","compressible":true},"application/rls-services+xml":{"source":"iana","compressible":true,"extensions":["rs"]},"application/route-apd+xml":{"source":"iana","compressible":true,"extensions":["rapd"]},"application/route-s-tsid+xml":{"source":"iana","compressible":true,"extensions":["sls"]},"application/route-usd+xml":{"source":"iana","compressible":true,"extensions":["rusd"]},"application/rpki-ghostbusters":{"source":"iana","extensions":["gbr"]},"application/rpki-manifest":{"source":"iana","extensions":["mft"]},"application/rpki-publication":{"source":"iana"},"application/rpki-roa":{"source":"iana","extensions":["roa"]},"application/rpki-updown":{"source":"iana"},"application/rsd+xml":{"source":"apache","compressible":true,"extensions":["rsd"]},"application/rss+xml":{"source":"apache","compressible":true,"extensions":["rss"]},"application/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"application/rtploopback":{"source":"iana"},"application/rtx":{"source":"iana"},"application/samlassertion+xml":{"source":"iana","compressible":true},"application/samlmetadata+xml":{"source":"iana","compressible":true},"application/sarif+json":{"source":"iana","compressible":true},"application/sarif-external-properties+json":{"source":"iana","compressible":true},"application/sbe":{"source":"iana"},"application/sbml+xml":{"source":"iana","compressible":true,"extensions":["sbml"]},"application/scaip+xml":{"source":"iana","compressible":true},"application/scim+json":{"source":"iana","compressible":true},"application/scvp-cv-request":{"source":"iana","extensions":["scq"]},"application/scvp-cv-response":{"source":"iana","extensions":["scs"]},"application/scvp-vp-request":{"source":"iana","extensions":["spq"]},"application/scvp-vp-response":{"source":"iana","extensions":["spp"]},"application/sdp":{"source":"iana","extensions":["sdp"]},"application/secevent+jwt":{"source":"iana"},"application/senml+cbor":{"source":"iana"},"application/senml+json":{"source":"iana","compressible":true},"application/senml+xml":{"source":"iana","compressible":true,"extensions":["senmlx"]},"application/senml-etch+cbor":{"source":"iana"},"application/senml-etch+json":{"source":"iana","compressible":true},"application/senml-exi":{"source":"iana"},"application/sensml+cbor":{"source":"iana"},"application/sensml+json":{"source":"iana","compressible":true},"application/sensml+xml":{"source":"iana","compressible":true,"extensions":["sensmlx"]},"application/sensml-exi":{"source":"iana"},"application/sep+xml":{"source":"iana","compressible":true},"application/sep-exi":{"source":"iana"},"application/session-info":{"source":"iana"},"application/set-payment":{"source":"iana"},"application/set-payment-initiation":{"source":"iana","extensions":["setpay"]},"application/set-registration":{"source":"iana"},"application/set-registration-initiation":{"source":"iana","extensions":["setreg"]},"application/sgml":{"source":"iana"},"application/sgml-open-catalog":{"source":"iana"},"application/shf+xml":{"source":"iana","compressible":true,"extensions":["shf"]},"application/sieve":{"source":"iana","extensions":["siv","sieve"]},"application/simple-filter+xml":{"source":"iana","compressible":true},"application/simple-message-summary":{"source":"iana"},"application/simplesymbolcontainer":{"source":"iana"},"application/sipc":{"source":"iana"},"application/slate":{"source":"iana"},"application/smil":{"source":"iana"},"application/smil+xml":{"source":"iana","compressible":true,"extensions":["smi","smil"]},"application/smpte336m":{"source":"iana"},"application/soap+fastinfoset":{"source":"iana"},"application/soap+xml":{"source":"iana","compressible":true},"application/sparql-query":{"source":"iana","extensions":["rq"]},"application/sparql-results+xml":{"source":"iana","compressible":true,"extensions":["srx"]},"application/spdx+json":{"source":"iana","compressible":true},"application/spirits-event+xml":{"source":"iana","compressible":true},"application/sql":{"source":"iana"},"application/srgs":{"source":"iana","extensions":["gram"]},"application/srgs+xml":{"source":"iana","compressible":true,"extensions":["grxml"]},"application/sru+xml":{"source":"iana","compressible":true,"extensions":["sru"]},"application/ssdl+xml":{"source":"apache","compressible":true,"extensions":["ssdl"]},"application/ssml+xml":{"source":"iana","compressible":true,"extensions":["ssml"]},"application/stix+json":{"source":"iana","compressible":true},"application/swid+xml":{"source":"iana","compressible":true,"extensions":["swidtag"]},"application/tamp-apex-update":{"source":"iana"},"application/tamp-apex-update-confirm":{"source":"iana"},"application/tamp-community-update":{"source":"iana"},"application/tamp-community-update-confirm":{"source":"iana"},"application/tamp-error":{"source":"iana"},"application/tamp-sequence-adjust":{"source":"iana"},"application/tamp-sequence-adjust-confirm":{"source":"iana"},"application/tamp-status-query":{"source":"iana"},"application/tamp-status-response":{"source":"iana"},"application/tamp-update":{"source":"iana"},"application/tamp-update-confirm":{"source":"iana"},"application/tar":{"compressible":true},"application/taxii+json":{"source":"iana","compressible":true},"application/td+json":{"source":"iana","compressible":true},"application/tei+xml":{"source":"iana","compressible":true,"extensions":["tei","teicorpus"]},"application/tetra_isi":{"source":"iana"},"application/thraud+xml":{"source":"iana","compressible":true,"extensions":["tfi"]},"application/timestamp-query":{"source":"iana"},"application/timestamp-reply":{"source":"iana"},"application/timestamped-data":{"source":"iana","extensions":["tsd"]},"application/tlsrpt+gzip":{"source":"iana"},"application/tlsrpt+json":{"source":"iana","compressible":true},"application/tnauthlist":{"source":"iana"},"application/token-introspection+jwt":{"source":"iana"},"application/toml":{"compressible":true,"extensions":["toml"]},"application/trickle-ice-sdpfrag":{"source":"iana"},"application/trig":{"source":"iana","extensions":["trig"]},"application/ttml+xml":{"source":"iana","compressible":true,"extensions":["ttml"]},"application/tve-trigger":{"source":"iana"},"application/tzif":{"source":"iana"},"application/tzif-leap":{"source":"iana"},"application/ubjson":{"compressible":false,"extensions":["ubj"]},"application/ulpfec":{"source":"iana"},"application/urc-grpsheet+xml":{"source":"iana","compressible":true},"application/urc-ressheet+xml":{"source":"iana","compressible":true,"extensions":["rsheet"]},"application/urc-targetdesc+xml":{"source":"iana","compressible":true,"extensions":["td"]},"application/urc-uisocketdesc+xml":{"source":"iana","compressible":true},"application/vcard+json":{"source":"iana","compressible":true},"application/vcard+xml":{"source":"iana","compressible":true},"application/vemmi":{"source":"iana"},"application/vividence.scriptfile":{"source":"apache"},"application/vnd.1000minds.decision-model+xml":{"source":"iana","compressible":true,"extensions":["1km"]},"application/vnd.3gpp-prose+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc3ch+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-v2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.5gnas":{"source":"iana"},"application/vnd.3gpp.access-transfer-events+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.bsf+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gmop+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gtpc":{"source":"iana"},"application/vnd.3gpp.interworking-data":{"source":"iana"},"application/vnd.3gpp.lpp":{"source":"iana"},"application/vnd.3gpp.mc-signalling-ear":{"source":"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-payload":{"source":"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-signalling":{"source":"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-floor-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-signed+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-init-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-transmission-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mid-call+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ngap":{"source":"iana"},"application/vnd.3gpp.pfcp":{"source":"iana"},"application/vnd.3gpp.pic-bw-large":{"source":"iana","extensions":["plb"]},"application/vnd.3gpp.pic-bw-small":{"source":"iana","extensions":["psb"]},"application/vnd.3gpp.pic-bw-var":{"source":"iana","extensions":["pvb"]},"application/vnd.3gpp.s1ap":{"source":"iana"},"application/vnd.3gpp.sms":{"source":"iana"},"application/vnd.3gpp.sms+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-ext+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.state-and-event-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ussd+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.bcmcsinfo+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.sms":{"source":"iana"},"application/vnd.3gpp2.tcap":{"source":"iana","extensions":["tcap"]},"application/vnd.3lightssoftware.imagescal":{"source":"iana"},"application/vnd.3m.post-it-notes":{"source":"iana","extensions":["pwn"]},"application/vnd.accpac.simply.aso":{"source":"iana","extensions":["aso"]},"application/vnd.accpac.simply.imp":{"source":"iana","extensions":["imp"]},"application/vnd.acucobol":{"source":"iana","extensions":["acu"]},"application/vnd.acucorp":{"source":"iana","extensions":["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{"source":"apache","compressible":false,"extensions":["air"]},"application/vnd.adobe.flash.movie":{"source":"iana"},"application/vnd.adobe.formscentral.fcdt":{"source":"iana","extensions":["fcdt"]},"application/vnd.adobe.fxp":{"source":"iana","extensions":["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{"source":"iana"},"application/vnd.adobe.xdp+xml":{"source":"iana","compressible":true,"extensions":["xdp"]},"application/vnd.adobe.xfdf":{"source":"iana","extensions":["xfdf"]},"application/vnd.aether.imp":{"source":"iana"},"application/vnd.afpc.afplinedata":{"source":"iana"},"application/vnd.afpc.afplinedata-pagedef":{"source":"iana"},"application/vnd.afpc.cmoca-cmresource":{"source":"iana"},"application/vnd.afpc.foca-charset":{"source":"iana"},"application/vnd.afpc.foca-codedfont":{"source":"iana"},"application/vnd.afpc.foca-codepage":{"source":"iana"},"application/vnd.afpc.modca":{"source":"iana"},"application/vnd.afpc.modca-cmtable":{"source":"iana"},"application/vnd.afpc.modca-formdef":{"source":"iana"},"application/vnd.afpc.modca-mediummap":{"source":"iana"},"application/vnd.afpc.modca-objectcontainer":{"source":"iana"},"application/vnd.afpc.modca-overlay":{"source":"iana"},"application/vnd.afpc.modca-pagesegment":{"source":"iana"},"application/vnd.age":{"source":"iana","extensions":["age"]},"application/vnd.ah-barcode":{"source":"iana"},"application/vnd.ahead.space":{"source":"iana","extensions":["ahead"]},"application/vnd.airzip.filesecure.azf":{"source":"iana","extensions":["azf"]},"application/vnd.airzip.filesecure.azs":{"source":"iana","extensions":["azs"]},"application/vnd.amadeus+json":{"source":"iana","compressible":true},"application/vnd.amazon.ebook":{"source":"apache","extensions":["azw"]},"application/vnd.amazon.mobi8-ebook":{"source":"iana"},"application/vnd.americandynamics.acc":{"source":"iana","extensions":["acc"]},"application/vnd.amiga.ami":{"source":"iana","extensions":["ami"]},"application/vnd.amundsen.maze+xml":{"source":"iana","compressible":true},"application/vnd.android.ota":{"source":"iana"},"application/vnd.android.package-archive":{"source":"apache","compressible":false,"extensions":["apk"]},"application/vnd.anki":{"source":"iana"},"application/vnd.anser-web-certificate-issue-initiation":{"source":"iana","extensions":["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{"source":"apache","extensions":["fti"]},"application/vnd.antix.game-component":{"source":"iana","extensions":["atx"]},"application/vnd.apache.arrow.file":{"source":"iana"},"application/vnd.apache.arrow.stream":{"source":"iana"},"application/vnd.apache.thrift.binary":{"source":"iana"},"application/vnd.apache.thrift.compact":{"source":"iana"},"application/vnd.apache.thrift.json":{"source":"iana"},"application/vnd.api+json":{"source":"iana","compressible":true},"application/vnd.aplextor.warrp+json":{"source":"iana","compressible":true},"application/vnd.apothekende.reservation+json":{"source":"iana","compressible":true},"application/vnd.apple.installer+xml":{"source":"iana","compressible":true,"extensions":["mpkg"]},"application/vnd.apple.keynote":{"source":"iana","extensions":["key"]},"application/vnd.apple.mpegurl":{"source":"iana","extensions":["m3u8"]},"application/vnd.apple.numbers":{"source":"iana","extensions":["numbers"]},"application/vnd.apple.pages":{"source":"iana","extensions":["pages"]},"application/vnd.apple.pkpass":{"compressible":false,"extensions":["pkpass"]},"application/vnd.arastra.swi":{"source":"iana"},"application/vnd.aristanetworks.swi":{"source":"iana","extensions":["swi"]},"application/vnd.artisan+json":{"source":"iana","compressible":true},"application/vnd.artsquare":{"source":"iana"},"application/vnd.astraea-software.iota":{"source":"iana","extensions":["iota"]},"application/vnd.audiograph":{"source":"iana","extensions":["aep"]},"application/vnd.autopackage":{"source":"iana"},"application/vnd.avalon+json":{"source":"iana","compressible":true},"application/vnd.avistar+xml":{"source":"iana","compressible":true},"application/vnd.balsamiq.bmml+xml":{"source":"iana","compressible":true,"extensions":["bmml"]},"application/vnd.balsamiq.bmpr":{"source":"iana"},"application/vnd.banana-accounting":{"source":"iana"},"application/vnd.bbf.usp.error":{"source":"iana"},"application/vnd.bbf.usp.msg":{"source":"iana"},"application/vnd.bbf.usp.msg+json":{"source":"iana","compressible":true},"application/vnd.bekitzur-stech+json":{"source":"iana","compressible":true},"application/vnd.bint.med-content":{"source":"iana"},"application/vnd.biopax.rdf+xml":{"source":"iana","compressible":true},"application/vnd.blink-idb-value-wrapper":{"source":"iana"},"application/vnd.blueice.multipass":{"source":"iana","extensions":["mpm"]},"application/vnd.bluetooth.ep.oob":{"source":"iana"},"application/vnd.bluetooth.le.oob":{"source":"iana"},"application/vnd.bmi":{"source":"iana","extensions":["bmi"]},"application/vnd.bpf":{"source":"iana"},"application/vnd.bpf3":{"source":"iana"},"application/vnd.businessobjects":{"source":"iana","extensions":["rep"]},"application/vnd.byu.uapi+json":{"source":"iana","compressible":true},"application/vnd.cab-jscript":{"source":"iana"},"application/vnd.canon-cpdl":{"source":"iana"},"application/vnd.canon-lips":{"source":"iana"},"application/vnd.capasystems-pg+json":{"source":"iana","compressible":true},"application/vnd.cendio.thinlinc.clientconf":{"source":"iana"},"application/vnd.century-systems.tcp_stream":{"source":"iana"},"application/vnd.chemdraw+xml":{"source":"iana","compressible":true,"extensions":["cdxml"]},"application/vnd.chess-pgn":{"source":"iana"},"application/vnd.chipnuts.karaoke-mmd":{"source":"iana","extensions":["mmd"]},"application/vnd.ciedi":{"source":"iana"},"application/vnd.cinderella":{"source":"iana","extensions":["cdy"]},"application/vnd.cirpack.isdn-ext":{"source":"iana"},"application/vnd.citationstyles.style+xml":{"source":"iana","compressible":true,"extensions":["csl"]},"application/vnd.claymore":{"source":"iana","extensions":["cla"]},"application/vnd.cloanto.rp9":{"source":"iana","extensions":["rp9"]},"application/vnd.clonk.c4group":{"source":"iana","extensions":["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{"source":"iana","extensions":["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{"source":"iana","extensions":["c11amz"]},"application/vnd.coffeescript":{"source":"iana"},"application/vnd.collabio.xodocuments.document":{"source":"iana"},"application/vnd.collabio.xodocuments.document-template":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation-template":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{"source":"iana"},"application/vnd.collection+json":{"source":"iana","compressible":true},"application/vnd.collection.doc+json":{"source":"iana","compressible":true},"application/vnd.collection.next+json":{"source":"iana","compressible":true},"application/vnd.comicbook+zip":{"source":"iana","compressible":false},"application/vnd.comicbook-rar":{"source":"iana"},"application/vnd.commerce-battelle":{"source":"iana"},"application/vnd.commonspace":{"source":"iana","extensions":["csp"]},"application/vnd.contact.cmsg":{"source":"iana","extensions":["cdbcmsg"]},"application/vnd.coreos.ignition+json":{"source":"iana","compressible":true},"application/vnd.cosmocaller":{"source":"iana","extensions":["cmc"]},"application/vnd.crick.clicker":{"source":"iana","extensions":["clkx"]},"application/vnd.crick.clicker.keyboard":{"source":"iana","extensions":["clkk"]},"application/vnd.crick.clicker.palette":{"source":"iana","extensions":["clkp"]},"application/vnd.crick.clicker.template":{"source":"iana","extensions":["clkt"]},"application/vnd.crick.clicker.wordbank":{"source":"iana","extensions":["clkw"]},"application/vnd.criticaltools.wbs+xml":{"source":"iana","compressible":true,"extensions":["wbs"]},"application/vnd.cryptii.pipe+json":{"source":"iana","compressible":true},"application/vnd.crypto-shade-file":{"source":"iana"},"application/vnd.cryptomator.encrypted":{"source":"iana"},"application/vnd.cryptomator.vault":{"source":"iana"},"application/vnd.ctc-posml":{"source":"iana","extensions":["pml"]},"application/vnd.ctct.ws+xml":{"source":"iana","compressible":true},"application/vnd.cups-pdf":{"source":"iana"},"application/vnd.cups-postscript":{"source":"iana"},"application/vnd.cups-ppd":{"source":"iana","extensions":["ppd"]},"application/vnd.cups-raster":{"source":"iana"},"application/vnd.cups-raw":{"source":"iana"},"application/vnd.curl":{"source":"iana"},"application/vnd.curl.car":{"source":"apache","extensions":["car"]},"application/vnd.curl.pcurl":{"source":"apache","extensions":["pcurl"]},"application/vnd.cyan.dean.root+xml":{"source":"iana","compressible":true},"application/vnd.cybank":{"source":"iana"},"application/vnd.cyclonedx+json":{"source":"iana","compressible":true},"application/vnd.cyclonedx+xml":{"source":"iana","compressible":true},"application/vnd.d2l.coursepackage1p0+zip":{"source":"iana","compressible":false},"application/vnd.d3m-dataset":{"source":"iana"},"application/vnd.d3m-problem":{"source":"iana"},"application/vnd.dart":{"source":"iana","compressible":true,"extensions":["dart"]},"application/vnd.data-vision.rdz":{"source":"iana","extensions":["rdz"]},"application/vnd.datapackage+json":{"source":"iana","compressible":true},"application/vnd.dataresource+json":{"source":"iana","compressible":true},"application/vnd.dbf":{"source":"iana","extensions":["dbf"]},"application/vnd.debian.binary-package":{"source":"iana"},"application/vnd.dece.data":{"source":"iana","extensions":["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{"source":"iana","compressible":true,"extensions":["uvt","uvvt"]},"application/vnd.dece.unspecified":{"source":"iana","extensions":["uvx","uvvx"]},"application/vnd.dece.zip":{"source":"iana","extensions":["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{"source":"iana","extensions":["fe_launch"]},"application/vnd.desmume.movie":{"source":"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{"source":"iana"},"application/vnd.dm.delegation+xml":{"source":"iana","compressible":true},"application/vnd.dna":{"source":"iana","extensions":["dna"]},"application/vnd.document+json":{"source":"iana","compressible":true},"application/vnd.dolby.mlp":{"source":"apache","extensions":["mlp"]},"application/vnd.dolby.mobile.1":{"source":"iana"},"application/vnd.dolby.mobile.2":{"source":"iana"},"application/vnd.doremir.scorecloud-binary-document":{"source":"iana"},"application/vnd.dpgraph":{"source":"iana","extensions":["dpg"]},"application/vnd.dreamfactory":{"source":"iana","extensions":["dfac"]},"application/vnd.drive+json":{"source":"iana","compressible":true},"application/vnd.ds-keypoint":{"source":"apache","extensions":["kpxx"]},"application/vnd.dtg.local":{"source":"iana"},"application/vnd.dtg.local.flash":{"source":"iana"},"application/vnd.dtg.local.html":{"source":"iana"},"application/vnd.dvb.ait":{"source":"iana","extensions":["ait"]},"application/vnd.dvb.dvbisl+xml":{"source":"iana","compressible":true},"application/vnd.dvb.dvbj":{"source":"iana"},"application/vnd.dvb.esgcontainer":{"source":"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess2":{"source":"iana"},"application/vnd.dvb.ipdcesgpdd":{"source":"iana"},"application/vnd.dvb.ipdcroaming":{"source":"iana"},"application/vnd.dvb.iptv.alfec-base":{"source":"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{"source":"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-container+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-generic+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-msglist+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-request+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-response+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-init+xml":{"source":"iana","compressible":true},"application/vnd.dvb.pfr":{"source":"iana"},"application/vnd.dvb.service":{"source":"iana","extensions":["svc"]},"application/vnd.dxr":{"source":"iana"},"application/vnd.dynageo":{"source":"iana","extensions":["geo"]},"application/vnd.dzr":{"source":"iana"},"application/vnd.easykaraoke.cdgdownload":{"source":"iana"},"application/vnd.ecdis-update":{"source":"iana"},"application/vnd.ecip.rlp":{"source":"iana"},"application/vnd.ecowin.chart":{"source":"iana","extensions":["mag"]},"application/vnd.ecowin.filerequest":{"source":"iana"},"application/vnd.ecowin.fileupdate":{"source":"iana"},"application/vnd.ecowin.series":{"source":"iana"},"application/vnd.ecowin.seriesrequest":{"source":"iana"},"application/vnd.ecowin.seriesupdate":{"source":"iana"},"application/vnd.efi.img":{"source":"iana"},"application/vnd.efi.iso":{"source":"iana"},"application/vnd.emclient.accessrequest+xml":{"source":"iana","compressible":true},"application/vnd.enliven":{"source":"iana","extensions":["nml"]},"application/vnd.enphase.envoy":{"source":"iana"},"application/vnd.eprints.data+xml":{"source":"iana","compressible":true},"application/vnd.epson.esf":{"source":"iana","extensions":["esf"]},"application/vnd.epson.msf":{"source":"iana","extensions":["msf"]},"application/vnd.epson.quickanime":{"source":"iana","extensions":["qam"]},"application/vnd.epson.salt":{"source":"iana","extensions":["slt"]},"application/vnd.epson.ssf":{"source":"iana","extensions":["ssf"]},"application/vnd.ericsson.quickcall":{"source":"iana"},"application/vnd.espass-espass+zip":{"source":"iana","compressible":false},"application/vnd.eszigno3+xml":{"source":"iana","compressible":true,"extensions":["es3","et3"]},"application/vnd.etsi.aoc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.asic-e+zip":{"source":"iana","compressible":false},"application/vnd.etsi.asic-s+zip":{"source":"iana","compressible":false},"application/vnd.etsi.cug+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvcommand+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-bc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-cod+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-npvr+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvservice+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsync+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvueprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mcid+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mheg5":{"source":"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{"source":"iana","compressible":true},"application/vnd.etsi.pstn+xml":{"source":"iana","compressible":true},"application/vnd.etsi.sci+xml":{"source":"iana","compressible":true},"application/vnd.etsi.simservs+xml":{"source":"iana","compressible":true},"application/vnd.etsi.timestamp-token":{"source":"iana"},"application/vnd.etsi.tsl+xml":{"source":"iana","compressible":true},"application/vnd.etsi.tsl.der":{"source":"iana"},"application/vnd.eudora.data":{"source":"iana"},"application/vnd.evolv.ecig.profile":{"source":"iana"},"application/vnd.evolv.ecig.settings":{"source":"iana"},"application/vnd.evolv.ecig.theme":{"source":"iana"},"application/vnd.exstream-empower+zip":{"source":"iana","compressible":false},"application/vnd.exstream-package":{"source":"iana"},"application/vnd.ezpix-album":{"source":"iana","extensions":["ez2"]},"application/vnd.ezpix-package":{"source":"iana","extensions":["ez3"]},"application/vnd.f-secure.mobile":{"source":"iana"},"application/vnd.fastcopy-disk-image":{"source":"iana"},"application/vnd.fdf":{"source":"iana","extensions":["fdf"]},"application/vnd.fdsn.mseed":{"source":"iana","extensions":["mseed"]},"application/vnd.fdsn.seed":{"source":"iana","extensions":["seed","dataless"]},"application/vnd.ffsns":{"source":"iana"},"application/vnd.ficlab.flb+zip":{"source":"iana","compressible":false},"application/vnd.filmit.zfc":{"source":"iana"},"application/vnd.fints":{"source":"iana"},"application/vnd.firemonkeys.cloudcell":{"source":"iana"},"application/vnd.flographit":{"source":"iana","extensions":["gph"]},"application/vnd.fluxtime.clip":{"source":"iana","extensions":["ftc"]},"application/vnd.font-fontforge-sfd":{"source":"iana"},"application/vnd.framemaker":{"source":"iana","extensions":["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{"source":"iana","extensions":["fnc"]},"application/vnd.frogans.ltf":{"source":"iana","extensions":["ltf"]},"application/vnd.fsc.weblaunch":{"source":"iana","extensions":["fsc"]},"application/vnd.fujifilm.fb.docuworks":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.container":{"source":"iana"},"application/vnd.fujifilm.fb.jfi+xml":{"source":"iana","compressible":true},"application/vnd.fujitsu.oasys":{"source":"iana","extensions":["oas"]},"application/vnd.fujitsu.oasys2":{"source":"iana","extensions":["oa2"]},"application/vnd.fujitsu.oasys3":{"source":"iana","extensions":["oa3"]},"application/vnd.fujitsu.oasysgp":{"source":"iana","extensions":["fg5"]},"application/vnd.fujitsu.oasysprs":{"source":"iana","extensions":["bh2"]},"application/vnd.fujixerox.art-ex":{"source":"iana"},"application/vnd.fujixerox.art4":{"source":"iana"},"application/vnd.fujixerox.ddd":{"source":"iana","extensions":["ddd"]},"application/vnd.fujixerox.docuworks":{"source":"iana","extensions":["xdw"]},"application/vnd.fujixerox.docuworks.binder":{"source":"iana","extensions":["xbd"]},"application/vnd.fujixerox.docuworks.container":{"source":"iana"},"application/vnd.fujixerox.hbpl":{"source":"iana"},"application/vnd.fut-misnet":{"source":"iana"},"application/vnd.futoin+cbor":{"source":"iana"},"application/vnd.futoin+json":{"source":"iana","compressible":true},"application/vnd.fuzzysheet":{"source":"iana","extensions":["fzs"]},"application/vnd.genomatix.tuxedo":{"source":"iana","extensions":["txd"]},"application/vnd.gentics.grd+json":{"source":"iana","compressible":true},"application/vnd.geo+json":{"source":"iana","compressible":true},"application/vnd.geocube+xml":{"source":"iana","compressible":true},"application/vnd.geogebra.file":{"source":"iana","extensions":["ggb"]},"application/vnd.geogebra.slides":{"source":"iana"},"application/vnd.geogebra.tool":{"source":"iana","extensions":["ggt"]},"application/vnd.geometry-explorer":{"source":"iana","extensions":["gex","gre"]},"application/vnd.geonext":{"source":"iana","extensions":["gxt"]},"application/vnd.geoplan":{"source":"iana","extensions":["g2w"]},"application/vnd.geospace":{"source":"iana","extensions":["g3w"]},"application/vnd.gerber":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt-response":{"source":"iana"},"application/vnd.gmx":{"source":"iana","extensions":["gmx"]},"application/vnd.google-apps.document":{"compressible":false,"extensions":["gdoc"]},"application/vnd.google-apps.presentation":{"compressible":false,"extensions":["gslides"]},"application/vnd.google-apps.spreadsheet":{"compressible":false,"extensions":["gsheet"]},"application/vnd.google-earth.kml+xml":{"source":"iana","compressible":true,"extensions":["kml"]},"application/vnd.google-earth.kmz":{"source":"iana","compressible":false,"extensions":["kmz"]},"application/vnd.gov.sk.e-form+xml":{"source":"iana","compressible":true},"application/vnd.gov.sk.e-form+zip":{"source":"iana","compressible":false},"application/vnd.gov.sk.xmldatacontainer+xml":{"source":"iana","compressible":true},"application/vnd.grafeq":{"source":"iana","extensions":["gqf","gqs"]},"application/vnd.gridmp":{"source":"iana"},"application/vnd.groove-account":{"source":"iana","extensions":["gac"]},"application/vnd.groove-help":{"source":"iana","extensions":["ghf"]},"application/vnd.groove-identity-message":{"source":"iana","extensions":["gim"]},"application/vnd.groove-injector":{"source":"iana","extensions":["grv"]},"application/vnd.groove-tool-message":{"source":"iana","extensions":["gtm"]},"application/vnd.groove-tool-template":{"source":"iana","extensions":["tpl"]},"application/vnd.groove-vcard":{"source":"iana","extensions":["vcg"]},"application/vnd.hal+json":{"source":"iana","compressible":true},"application/vnd.hal+xml":{"source":"iana","compressible":true,"extensions":["hal"]},"application/vnd.handheld-entertainment+xml":{"source":"iana","compressible":true,"extensions":["zmm"]},"application/vnd.hbci":{"source":"iana","extensions":["hbci"]},"application/vnd.hc+json":{"source":"iana","compressible":true},"application/vnd.hcl-bireports":{"source":"iana"},"application/vnd.hdt":{"source":"iana"},"application/vnd.heroku+json":{"source":"iana","compressible":true},"application/vnd.hhe.lesson-player":{"source":"iana","extensions":["les"]},"application/vnd.hp-hpgl":{"source":"iana","extensions":["hpgl"]},"application/vnd.hp-hpid":{"source":"iana","extensions":["hpid"]},"application/vnd.hp-hps":{"source":"iana","extensions":["hps"]},"application/vnd.hp-jlyt":{"source":"iana","extensions":["jlt"]},"application/vnd.hp-pcl":{"source":"iana","extensions":["pcl"]},"application/vnd.hp-pclxl":{"source":"iana","extensions":["pclxl"]},"application/vnd.httphone":{"source":"iana"},"application/vnd.hydrostatix.sof-data":{"source":"iana","extensions":["sfd-hdstx"]},"application/vnd.hyper+json":{"source":"iana","compressible":true},"application/vnd.hyper-item+json":{"source":"iana","compressible":true},"application/vnd.hyperdrive+json":{"source":"iana","compressible":true},"application/vnd.hzn-3d-crossword":{"source":"iana"},"application/vnd.ibm.afplinedata":{"source":"iana"},"application/vnd.ibm.electronic-media":{"source":"iana"},"application/vnd.ibm.minipay":{"source":"iana","extensions":["mpy"]},"application/vnd.ibm.modcap":{"source":"iana","extensions":["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{"source":"iana","extensions":["irm"]},"application/vnd.ibm.secure-container":{"source":"iana","extensions":["sc"]},"application/vnd.iccprofile":{"source":"iana","extensions":["icc","icm"]},"application/vnd.ieee.1905":{"source":"iana"},"application/vnd.igloader":{"source":"iana","extensions":["igl"]},"application/vnd.imagemeter.folder+zip":{"source":"iana","compressible":false},"application/vnd.imagemeter.image+zip":{"source":"iana","compressible":false},"application/vnd.immervision-ivp":{"source":"iana","extensions":["ivp"]},"application/vnd.immervision-ivu":{"source":"iana","extensions":["ivu"]},"application/vnd.ims.imsccv1p1":{"source":"iana"},"application/vnd.ims.imsccv1p2":{"source":"iana"},"application/vnd.ims.imsccv1p3":{"source":"iana"},"application/vnd.ims.lis.v2.result+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy.id+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{"source":"iana","compressible":true},"application/vnd.informedcontrol.rms+xml":{"source":"iana","compressible":true},"application/vnd.informix-visionary":{"source":"iana"},"application/vnd.infotech.project":{"source":"iana"},"application/vnd.infotech.project+xml":{"source":"iana","compressible":true},"application/vnd.innopath.wamp.notification":{"source":"iana"},"application/vnd.insors.igm":{"source":"iana","extensions":["igm"]},"application/vnd.intercon.formnet":{"source":"iana","extensions":["xpw","xpx"]},"application/vnd.intergeo":{"source":"iana","extensions":["i2g"]},"application/vnd.intertrust.digibox":{"source":"iana"},"application/vnd.intertrust.nncp":{"source":"iana"},"application/vnd.intu.qbo":{"source":"iana","extensions":["qbo"]},"application/vnd.intu.qfx":{"source":"iana","extensions":["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.conceptitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.knowledgeitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsmessage+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.packageitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.planningitem+xml":{"source":"iana","compressible":true},"application/vnd.ipunplugged.rcprofile":{"source":"iana","extensions":["rcprofile"]},"application/vnd.irepository.package+xml":{"source":"iana","compressible":true,"extensions":["irp"]},"application/vnd.is-xpr":{"source":"iana","extensions":["xpr"]},"application/vnd.isac.fcs":{"source":"iana","extensions":["fcs"]},"application/vnd.iso11783-10+zip":{"source":"iana","compressible":false},"application/vnd.jam":{"source":"iana","extensions":["jam"]},"application/vnd.japannet-directory-service":{"source":"iana"},"application/vnd.japannet-jpnstore-wakeup":{"source":"iana"},"application/vnd.japannet-payment-wakeup":{"source":"iana"},"application/vnd.japannet-registration":{"source":"iana"},"application/vnd.japannet-registration-wakeup":{"source":"iana"},"application/vnd.japannet-setstore-wakeup":{"source":"iana"},"application/vnd.japannet-verification":{"source":"iana"},"application/vnd.japannet-verification-wakeup":{"source":"iana"},"application/vnd.jcp.javame.midlet-rms":{"source":"iana","extensions":["rms"]},"application/vnd.jisp":{"source":"iana","extensions":["jisp"]},"application/vnd.joost.joda-archive":{"source":"iana","extensions":["joda"]},"application/vnd.jsk.isdn-ngn":{"source":"iana"},"application/vnd.kahootz":{"source":"iana","extensions":["ktz","ktr"]},"application/vnd.kde.karbon":{"source":"iana","extensions":["karbon"]},"application/vnd.kde.kchart":{"source":"iana","extensions":["chrt"]},"application/vnd.kde.kformula":{"source":"iana","extensions":["kfo"]},"application/vnd.kde.kivio":{"source":"iana","extensions":["flw"]},"application/vnd.kde.kontour":{"source":"iana","extensions":["kon"]},"application/vnd.kde.kpresenter":{"source":"iana","extensions":["kpr","kpt"]},"application/vnd.kde.kspread":{"source":"iana","extensions":["ksp"]},"application/vnd.kde.kword":{"source":"iana","extensions":["kwd","kwt"]},"application/vnd.kenameaapp":{"source":"iana","extensions":["htke"]},"application/vnd.kidspiration":{"source":"iana","extensions":["kia"]},"application/vnd.kinar":{"source":"iana","extensions":["kne","knp"]},"application/vnd.koan":{"source":"iana","extensions":["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{"source":"iana","extensions":["sse"]},"application/vnd.las":{"source":"iana"},"application/vnd.las.las+json":{"source":"iana","compressible":true},"application/vnd.las.las+xml":{"source":"iana","compressible":true,"extensions":["lasxml"]},"application/vnd.laszip":{"source":"iana"},"application/vnd.leap+json":{"source":"iana","compressible":true},"application/vnd.liberty-request+xml":{"source":"iana","compressible":true},"application/vnd.llamagraphics.life-balance.desktop":{"source":"iana","extensions":["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{"source":"iana","compressible":true,"extensions":["lbe"]},"application/vnd.logipipe.circuit+zip":{"source":"iana","compressible":false},"application/vnd.loom":{"source":"iana"},"application/vnd.lotus-1-2-3":{"source":"iana","extensions":["123"]},"application/vnd.lotus-approach":{"source":"iana","extensions":["apr"]},"application/vnd.lotus-freelance":{"source":"iana","extensions":["pre"]},"application/vnd.lotus-notes":{"source":"iana","extensions":["nsf"]},"application/vnd.lotus-organizer":{"source":"iana","extensions":["org"]},"application/vnd.lotus-screencam":{"source":"iana","extensions":["scm"]},"application/vnd.lotus-wordpro":{"source":"iana","extensions":["lwp"]},"application/vnd.macports.portpkg":{"source":"iana","extensions":["portpkg"]},"application/vnd.mapbox-vector-tile":{"source":"iana","extensions":["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.conftoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.license+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.mdcf":{"source":"iana"},"application/vnd.mason+json":{"source":"iana","compressible":true},"application/vnd.maxmind.maxmind-db":{"source":"iana"},"application/vnd.mcd":{"source":"iana","extensions":["mcd"]},"application/vnd.medcalcdata":{"source":"iana","extensions":["mc1"]},"application/vnd.mediastation.cdkey":{"source":"iana","extensions":["cdkey"]},"application/vnd.meridian-slingshot":{"source":"iana"},"application/vnd.mfer":{"source":"iana","extensions":["mwf"]},"application/vnd.mfmp":{"source":"iana","extensions":["mfm"]},"application/vnd.micro+json":{"source":"iana","compressible":true},"application/vnd.micrografx.flo":{"source":"iana","extensions":["flo"]},"application/vnd.micrografx.igx":{"source":"iana","extensions":["igx"]},"application/vnd.microsoft.portable-executable":{"source":"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{"source":"iana"},"application/vnd.miele+json":{"source":"iana","compressible":true},"application/vnd.mif":{"source":"iana","extensions":["mif"]},"application/vnd.minisoft-hp3000-save":{"source":"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{"source":"iana"},"application/vnd.mobius.daf":{"source":"iana","extensions":["daf"]},"application/vnd.mobius.dis":{"source":"iana","extensions":["dis"]},"application/vnd.mobius.mbk":{"source":"iana","extensions":["mbk"]},"application/vnd.mobius.mqy":{"source":"iana","extensions":["mqy"]},"application/vnd.mobius.msl":{"source":"iana","extensions":["msl"]},"application/vnd.mobius.plc":{"source":"iana","extensions":["plc"]},"application/vnd.mobius.txf":{"source":"iana","extensions":["txf"]},"application/vnd.mophun.application":{"source":"iana","extensions":["mpn"]},"application/vnd.mophun.certificate":{"source":"iana","extensions":["mpc"]},"application/vnd.motorola.flexsuite":{"source":"iana"},"application/vnd.motorola.flexsuite.adsi":{"source":"iana"},"application/vnd.motorola.flexsuite.fis":{"source":"iana"},"application/vnd.motorola.flexsuite.gotap":{"source":"iana"},"application/vnd.motorola.flexsuite.kmr":{"source":"iana"},"application/vnd.motorola.flexsuite.ttc":{"source":"iana"},"application/vnd.motorola.flexsuite.wem":{"source":"iana"},"application/vnd.motorola.iprm":{"source":"iana"},"application/vnd.mozilla.xul+xml":{"source":"iana","compressible":true,"extensions":["xul"]},"application/vnd.ms-3mfdocument":{"source":"iana"},"application/vnd.ms-artgalry":{"source":"iana","extensions":["cil"]},"application/vnd.ms-asf":{"source":"iana"},"application/vnd.ms-cab-compressed":{"source":"iana","extensions":["cab"]},"application/vnd.ms-color.iccprofile":{"source":"apache"},"application/vnd.ms-excel":{"source":"iana","compressible":false,"extensions":["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{"source":"iana","extensions":["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{"source":"iana","extensions":["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{"source":"iana","extensions":["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{"source":"iana","extensions":["xltm"]},"application/vnd.ms-fontobject":{"source":"iana","compressible":true,"extensions":["eot"]},"application/vnd.ms-htmlhelp":{"source":"iana","extensions":["chm"]},"application/vnd.ms-ims":{"source":"iana","extensions":["ims"]},"application/vnd.ms-lrm":{"source":"iana","extensions":["lrm"]},"application/vnd.ms-office.activex+xml":{"source":"iana","compressible":true},"application/vnd.ms-officetheme":{"source":"iana","extensions":["thmx"]},"application/vnd.ms-opentype":{"source":"apache","compressible":true},"application/vnd.ms-outlook":{"compressible":false,"extensions":["msg"]},"application/vnd.ms-package.obfuscated-opentype":{"source":"apache"},"application/vnd.ms-pki.seccat":{"source":"apache","extensions":["cat"]},"application/vnd.ms-pki.stl":{"source":"apache","extensions":["stl"]},"application/vnd.ms-playready.initiator+xml":{"source":"iana","compressible":true},"application/vnd.ms-powerpoint":{"source":"iana","compressible":false,"extensions":["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{"source":"iana","extensions":["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{"source":"iana","extensions":["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{"source":"iana","extensions":["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{"source":"iana","extensions":["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{"source":"iana","extensions":["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{"source":"iana","compressible":true},"application/vnd.ms-printing.printticket+xml":{"source":"apache","compressible":true},"application/vnd.ms-printschematicket+xml":{"source":"iana","compressible":true},"application/vnd.ms-project":{"source":"iana","extensions":["mpp","mpt"]},"application/vnd.ms-tnef":{"source":"iana"},"application/vnd.ms-windows.devicepairing":{"source":"iana"},"application/vnd.ms-windows.nwprinting.oob":{"source":"iana"},"application/vnd.ms-windows.printerpairing":{"source":"iana"},"application/vnd.ms-windows.wsd.oob":{"source":"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.lic-resp":{"source":"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.meter-resp":{"source":"iana"},"application/vnd.ms-word.document.macroenabled.12":{"source":"iana","extensions":["docm"]},"application/vnd.ms-word.template.macroenabled.12":{"source":"iana","extensions":["dotm"]},"application/vnd.ms-works":{"source":"iana","extensions":["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{"source":"iana","extensions":["wpl"]},"application/vnd.ms-xpsdocument":{"source":"iana","compressible":false,"extensions":["xps"]},"application/vnd.msa-disk-image":{"source":"iana"},"application/vnd.mseq":{"source":"iana","extensions":["mseq"]},"application/vnd.msign":{"source":"iana"},"application/vnd.multiad.creator":{"source":"iana"},"application/vnd.multiad.creator.cif":{"source":"iana"},"application/vnd.music-niff":{"source":"iana"},"application/vnd.musician":{"source":"iana","extensions":["mus"]},"application/vnd.muvee.style":{"source":"iana","extensions":["msty"]},"application/vnd.mynfc":{"source":"iana","extensions":["taglet"]},"application/vnd.nacamar.ybrid+json":{"source":"iana","compressible":true},"application/vnd.ncd.control":{"source":"iana"},"application/vnd.ncd.reference":{"source":"iana"},"application/vnd.nearst.inv+json":{"source":"iana","compressible":true},"application/vnd.nebumind.line":{"source":"iana"},"application/vnd.nervana":{"source":"iana"},"application/vnd.netfpx":{"source":"iana"},"application/vnd.neurolanguage.nlu":{"source":"iana","extensions":["nlu"]},"application/vnd.nimn":{"source":"iana"},"application/vnd.nintendo.nitro.rom":{"source":"iana"},"application/vnd.nintendo.snes.rom":{"source":"iana"},"application/vnd.nitf":{"source":"iana","extensions":["ntf","nitf"]},"application/vnd.noblenet-directory":{"source":"iana","extensions":["nnd"]},"application/vnd.noblenet-sealer":{"source":"iana","extensions":["nns"]},"application/vnd.noblenet-web":{"source":"iana","extensions":["nnw"]},"application/vnd.nokia.catalogs":{"source":"iana"},"application/vnd.nokia.conml+wbxml":{"source":"iana"},"application/vnd.nokia.conml+xml":{"source":"iana","compressible":true},"application/vnd.nokia.iptv.config+xml":{"source":"iana","compressible":true},"application/vnd.nokia.isds-radio-presets":{"source":"iana"},"application/vnd.nokia.landmark+wbxml":{"source":"iana"},"application/vnd.nokia.landmark+xml":{"source":"iana","compressible":true},"application/vnd.nokia.landmarkcollection+xml":{"source":"iana","compressible":true},"application/vnd.nokia.n-gage.ac+xml":{"source":"iana","compressible":true,"extensions":["ac"]},"application/vnd.nokia.n-gage.data":{"source":"iana","extensions":["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{"source":"iana","extensions":["n-gage"]},"application/vnd.nokia.ncd":{"source":"iana"},"application/vnd.nokia.pcd+wbxml":{"source":"iana"},"application/vnd.nokia.pcd+xml":{"source":"iana","compressible":true},"application/vnd.nokia.radio-preset":{"source":"iana","extensions":["rpst"]},"application/vnd.nokia.radio-presets":{"source":"iana","extensions":["rpss"]},"application/vnd.novadigm.edm":{"source":"iana","extensions":["edm"]},"application/vnd.novadigm.edx":{"source":"iana","extensions":["edx"]},"application/vnd.novadigm.ext":{"source":"iana","extensions":["ext"]},"application/vnd.ntt-local.content-share":{"source":"iana"},"application/vnd.ntt-local.file-transfer":{"source":"iana"},"application/vnd.ntt-local.ogw_remote-access":{"source":"iana"},"application/vnd.ntt-local.sip-ta_remote":{"source":"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{"source":"iana"},"application/vnd.oasis.opendocument.chart":{"source":"iana","extensions":["odc"]},"application/vnd.oasis.opendocument.chart-template":{"source":"iana","extensions":["otc"]},"application/vnd.oasis.opendocument.database":{"source":"iana","extensions":["odb"]},"application/vnd.oasis.opendocument.formula":{"source":"iana","extensions":["odf"]},"application/vnd.oasis.opendocument.formula-template":{"source":"iana","extensions":["odft"]},"application/vnd.oasis.opendocument.graphics":{"source":"iana","compressible":false,"extensions":["odg"]},"application/vnd.oasis.opendocument.graphics-template":{"source":"iana","extensions":["otg"]},"application/vnd.oasis.opendocument.image":{"source":"iana","extensions":["odi"]},"application/vnd.oasis.opendocument.image-template":{"source":"iana","extensions":["oti"]},"application/vnd.oasis.opendocument.presentation":{"source":"iana","compressible":false,"extensions":["odp"]},"application/vnd.oasis.opendocument.presentation-template":{"source":"iana","extensions":["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{"source":"iana","compressible":false,"extensions":["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{"source":"iana","extensions":["ots"]},"application/vnd.oasis.opendocument.text":{"source":"iana","compressible":false,"extensions":["odt"]},"application/vnd.oasis.opendocument.text-master":{"source":"iana","extensions":["odm"]},"application/vnd.oasis.opendocument.text-template":{"source":"iana","extensions":["ott"]},"application/vnd.oasis.opendocument.text-web":{"source":"iana","extensions":["oth"]},"application/vnd.obn":{"source":"iana"},"application/vnd.ocf+cbor":{"source":"iana"},"application/vnd.oci.image.manifest.v1+json":{"source":"iana","compressible":true},"application/vnd.oftn.l10n+json":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessdownload+xml":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessstreaming+xml":{"source":"iana","compressible":true},"application/vnd.oipf.cspg-hexbinary":{"source":"iana"},"application/vnd.oipf.dae.svg+xml":{"source":"iana","compressible":true},"application/vnd.oipf.dae.xhtml+xml":{"source":"iana","compressible":true},"application/vnd.oipf.mippvcontrolmessage+xml":{"source":"iana","compressible":true},"application/vnd.oipf.pae.gem":{"source":"iana"},"application/vnd.oipf.spdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.oipf.spdlist+xml":{"source":"iana","compressible":true},"application/vnd.oipf.ueprofile+xml":{"source":"iana","compressible":true},"application/vnd.oipf.userprofile+xml":{"source":"iana","compressible":true},"application/vnd.olpc-sugar":{"source":"iana","extensions":["xo"]},"application/vnd.oma-scws-config":{"source":"iana"},"application/vnd.oma-scws-http-request":{"source":"iana"},"application/vnd.oma-scws-http-response":{"source":"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.drm-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.imd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.ltkm":{"source":"iana"},"application/vnd.oma.bcast.notification+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.provisioningtrigger":{"source":"iana"},"application/vnd.oma.bcast.sgboot":{"source":"iana"},"application/vnd.oma.bcast.sgdd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sgdu":{"source":"iana"},"application/vnd.oma.bcast.simple-symbol-container":{"source":"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sprov+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.stkm":{"source":"iana"},"application/vnd.oma.cab-address-book+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-feature-handler+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-pcc+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-subs-invite+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-user-prefs+xml":{"source":"iana","compressible":true},"application/vnd.oma.dcd":{"source":"iana"},"application/vnd.oma.dcdc":{"source":"iana"},"application/vnd.oma.dd2+xml":{"source":"iana","compressible":true,"extensions":["dd2"]},"application/vnd.oma.drm.risd+xml":{"source":"iana","compressible":true},"application/vnd.oma.group-usage-list+xml":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+cbor":{"source":"iana"},"application/vnd.oma.lwm2m+json":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+tlv":{"source":"iana"},"application/vnd.oma.pal+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.detailed-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.final-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.groups+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.invocation-descriptor+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.optimized-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.push":{"source":"iana"},"application/vnd.oma.scidm.messages+xml":{"source":"iana","compressible":true},"application/vnd.oma.xcap-directory+xml":{"source":"iana","compressible":true},"application/vnd.omads-email+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-file+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-folder+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omaloc-supl-init":{"source":"iana"},"application/vnd.onepager":{"source":"iana"},"application/vnd.onepagertamp":{"source":"iana"},"application/vnd.onepagertamx":{"source":"iana"},"application/vnd.onepagertat":{"source":"iana"},"application/vnd.onepagertatp":{"source":"iana"},"application/vnd.onepagertatx":{"source":"iana"},"application/vnd.openblox.game+xml":{"source":"iana","compressible":true,"extensions":["obgx"]},"application/vnd.openblox.game-binary":{"source":"iana"},"application/vnd.openeye.oeb":{"source":"iana"},"application/vnd.openofficeorg.extension":{"source":"apache","extensions":["oxt"]},"application/vnd.openstreetmap.data+xml":{"source":"iana","compressible":true,"extensions":["osm"]},"application/vnd.opentimestamps.ots":{"source":"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawing+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"source":"iana","compressible":false,"extensions":["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slide":{"source":"iana","extensions":["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{"source":"iana","extensions":["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.template":{"source":"iana","extensions":["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"source":"iana","compressible":false,"extensions":["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{"source":"iana","extensions":["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.theme+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.vmldrawing":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"source":"iana","compressible":false,"extensions":["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{"source":"iana","extensions":["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.core-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.relationships+xml":{"source":"iana","compressible":true},"application/vnd.oracle.resource+json":{"source":"iana","compressible":true},"application/vnd.orange.indata":{"source":"iana"},"application/vnd.osa.netdeploy":{"source":"iana"},"application/vnd.osgeo.mapguide.package":{"source":"iana","extensions":["mgp"]},"application/vnd.osgi.bundle":{"source":"iana"},"application/vnd.osgi.dp":{"source":"iana","extensions":["dp"]},"application/vnd.osgi.subsystem":{"source":"iana","extensions":["esa"]},"application/vnd.otps.ct-kip+xml":{"source":"iana","compressible":true},"application/vnd.oxli.countgraph":{"source":"iana"},"application/vnd.pagerduty+json":{"source":"iana","compressible":true},"application/vnd.palm":{"source":"iana","extensions":["pdb","pqa","oprc"]},"application/vnd.panoply":{"source":"iana"},"application/vnd.paos.xml":{"source":"iana"},"application/vnd.patentdive":{"source":"iana"},"application/vnd.patientecommsdoc":{"source":"iana"},"application/vnd.pawaafile":{"source":"iana","extensions":["paw"]},"application/vnd.pcos":{"source":"iana"},"application/vnd.pg.format":{"source":"iana","extensions":["str"]},"application/vnd.pg.osasli":{"source":"iana","extensions":["ei6"]},"application/vnd.piaccess.application-licence":{"source":"iana"},"application/vnd.picsel":{"source":"iana","extensions":["efif"]},"application/vnd.pmi.widget":{"source":"iana","extensions":["wg"]},"application/vnd.poc.group-advertisement+xml":{"source":"iana","compressible":true},"application/vnd.pocketlearn":{"source":"iana","extensions":["plf"]},"application/vnd.powerbuilder6":{"source":"iana","extensions":["pbd"]},"application/vnd.powerbuilder6-s":{"source":"iana"},"application/vnd.powerbuilder7":{"source":"iana"},"application/vnd.powerbuilder7-s":{"source":"iana"},"application/vnd.powerbuilder75":{"source":"iana"},"application/vnd.powerbuilder75-s":{"source":"iana"},"application/vnd.preminet":{"source":"iana"},"application/vnd.previewsystems.box":{"source":"iana","extensions":["box"]},"application/vnd.proteus.magazine":{"source":"iana","extensions":["mgz"]},"application/vnd.psfs":{"source":"iana"},"application/vnd.publishare-delta-tree":{"source":"iana","extensions":["qps"]},"application/vnd.pvi.ptid1":{"source":"iana","extensions":["ptid"]},"application/vnd.pwg-multiplexed":{"source":"iana"},"application/vnd.pwg-xhtml-print+xml":{"source":"iana","compressible":true},"application/vnd.qualcomm.brew-app-res":{"source":"iana"},"application/vnd.quarantainenet":{"source":"iana"},"application/vnd.quark.quarkxpress":{"source":"iana","extensions":["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{"source":"iana"},"application/vnd.radisys.moml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conn+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-stream+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-base+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-detect+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-group+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-speech+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-transform+xml":{"source":"iana","compressible":true},"application/vnd.rainstor.data":{"source":"iana"},"application/vnd.rapid":{"source":"iana"},"application/vnd.rar":{"source":"iana","extensions":["rar"]},"application/vnd.realvnc.bed":{"source":"iana","extensions":["bed"]},"application/vnd.recordare.musicxml":{"source":"iana","extensions":["mxl"]},"application/vnd.recordare.musicxml+xml":{"source":"iana","compressible":true,"extensions":["musicxml"]},"application/vnd.renlearn.rlprint":{"source":"iana"},"application/vnd.resilient.logic":{"source":"iana"},"application/vnd.restful+json":{"source":"iana","compressible":true},"application/vnd.rig.cryptonote":{"source":"iana","extensions":["cryptonote"]},"application/vnd.rim.cod":{"source":"apache","extensions":["cod"]},"application/vnd.rn-realmedia":{"source":"apache","extensions":["rm"]},"application/vnd.rn-realmedia-vbr":{"source":"apache","extensions":["rmvb"]},"application/vnd.route66.link66+xml":{"source":"iana","compressible":true,"extensions":["link66"]},"application/vnd.rs-274x":{"source":"iana"},"application/vnd.ruckus.download":{"source":"iana"},"application/vnd.s3sms":{"source":"iana"},"application/vnd.sailingtracker.track":{"source":"iana","extensions":["st"]},"application/vnd.sar":{"source":"iana"},"application/vnd.sbm.cid":{"source":"iana"},"application/vnd.sbm.mid2":{"source":"iana"},"application/vnd.scribus":{"source":"iana"},"application/vnd.sealed.3df":{"source":"iana"},"application/vnd.sealed.csf":{"source":"iana"},"application/vnd.sealed.doc":{"source":"iana"},"application/vnd.sealed.eml":{"source":"iana"},"application/vnd.sealed.mht":{"source":"iana"},"application/vnd.sealed.net":{"source":"iana"},"application/vnd.sealed.ppt":{"source":"iana"},"application/vnd.sealed.tiff":{"source":"iana"},"application/vnd.sealed.xls":{"source":"iana"},"application/vnd.sealedmedia.softseal.html":{"source":"iana"},"application/vnd.sealedmedia.softseal.pdf":{"source":"iana"},"application/vnd.seemail":{"source":"iana","extensions":["see"]},"application/vnd.seis+json":{"source":"iana","compressible":true},"application/vnd.sema":{"source":"iana","extensions":["sema"]},"application/vnd.semd":{"source":"iana","extensions":["semd"]},"application/vnd.semf":{"source":"iana","extensions":["semf"]},"application/vnd.shade-save-file":{"source":"iana"},"application/vnd.shana.informed.formdata":{"source":"iana","extensions":["ifm"]},"application/vnd.shana.informed.formtemplate":{"source":"iana","extensions":["itp"]},"application/vnd.shana.informed.interchange":{"source":"iana","extensions":["iif"]},"application/vnd.shana.informed.package":{"source":"iana","extensions":["ipk"]},"application/vnd.shootproof+json":{"source":"iana","compressible":true},"application/vnd.shopkick+json":{"source":"iana","compressible":true},"application/vnd.shp":{"source":"iana"},"application/vnd.shx":{"source":"iana"},"application/vnd.sigrok.session":{"source":"iana"},"application/vnd.simtech-mindmapper":{"source":"iana","extensions":["twd","twds"]},"application/vnd.siren+json":{"source":"iana","compressible":true},"application/vnd.smaf":{"source":"iana","extensions":["mmf"]},"application/vnd.smart.notebook":{"source":"iana"},"application/vnd.smart.teacher":{"source":"iana","extensions":["teacher"]},"application/vnd.snesdev-page-table":{"source":"iana"},"application/vnd.software602.filler.form+xml":{"source":"iana","compressible":true,"extensions":["fo"]},"application/vnd.software602.filler.form-xml-zip":{"source":"iana"},"application/vnd.solent.sdkm+xml":{"source":"iana","compressible":true,"extensions":["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{"source":"iana","extensions":["dxp"]},"application/vnd.spotfire.sfs":{"source":"iana","extensions":["sfs"]},"application/vnd.sqlite3":{"source":"iana"},"application/vnd.sss-cod":{"source":"iana"},"application/vnd.sss-dtf":{"source":"iana"},"application/vnd.sss-ntf":{"source":"iana"},"application/vnd.stardivision.calc":{"source":"apache","extensions":["sdc"]},"application/vnd.stardivision.draw":{"source":"apache","extensions":["sda"]},"application/vnd.stardivision.impress":{"source":"apache","extensions":["sdd"]},"application/vnd.stardivision.math":{"source":"apache","extensions":["smf"]},"application/vnd.stardivision.writer":{"source":"apache","extensions":["sdw","vor"]},"application/vnd.stardivision.writer-global":{"source":"apache","extensions":["sgl"]},"application/vnd.stepmania.package":{"source":"iana","extensions":["smzip"]},"application/vnd.stepmania.stepchart":{"source":"iana","extensions":["sm"]},"application/vnd.street-stream":{"source":"iana"},"application/vnd.sun.wadl+xml":{"source":"iana","compressible":true,"extensions":["wadl"]},"application/vnd.sun.xml.calc":{"source":"apache","extensions":["sxc"]},"application/vnd.sun.xml.calc.template":{"source":"apache","extensions":["stc"]},"application/vnd.sun.xml.draw":{"source":"apache","extensions":["sxd"]},"application/vnd.sun.xml.draw.template":{"source":"apache","extensions":["std"]},"application/vnd.sun.xml.impress":{"source":"apache","extensions":["sxi"]},"application/vnd.sun.xml.impress.template":{"source":"apache","extensions":["sti"]},"application/vnd.sun.xml.math":{"source":"apache","extensions":["sxm"]},"application/vnd.sun.xml.writer":{"source":"apache","extensions":["sxw"]},"application/vnd.sun.xml.writer.global":{"source":"apache","extensions":["sxg"]},"application/vnd.sun.xml.writer.template":{"source":"apache","extensions":["stw"]},"application/vnd.sus-calendar":{"source":"iana","extensions":["sus","susp"]},"application/vnd.svd":{"source":"iana","extensions":["svd"]},"application/vnd.swiftview-ics":{"source":"iana"},"application/vnd.sycle+xml":{"source":"iana","compressible":true},"application/vnd.symbian.install":{"source":"apache","extensions":["sis","sisx"]},"application/vnd.syncml+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xsm"]},"application/vnd.syncml.dm+wbxml":{"source":"iana","charset":"UTF-8","extensions":["bdm"]},"application/vnd.syncml.dm+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xdm"]},"application/vnd.syncml.dm.notification":{"source":"iana"},"application/vnd.syncml.dmddf+wbxml":{"source":"iana"},"application/vnd.syncml.dmddf+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{"source":"iana"},"application/vnd.syncml.dmtnds+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.syncml.ds.notification":{"source":"iana"},"application/vnd.tableschema+json":{"source":"iana","compressible":true},"application/vnd.tao.intent-module-archive":{"source":"iana","extensions":["tao"]},"application/vnd.tcpdump.pcap":{"source":"iana","extensions":["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{"source":"iana","compressible":true},"application/vnd.tmd.mediaflex.api+xml":{"source":"iana","compressible":true},"application/vnd.tml":{"source":"iana"},"application/vnd.tmobile-livetv":{"source":"iana","extensions":["tmo"]},"application/vnd.tri.onesource":{"source":"iana"},"application/vnd.trid.tpt":{"source":"iana","extensions":["tpt"]},"application/vnd.triscape.mxs":{"source":"iana","extensions":["mxs"]},"application/vnd.trueapp":{"source":"iana","extensions":["tra"]},"application/vnd.truedoc":{"source":"iana"},"application/vnd.ubisoft.webplayer":{"source":"iana"},"application/vnd.ufdl":{"source":"iana","extensions":["ufd","ufdl"]},"application/vnd.uiq.theme":{"source":"iana","extensions":["utz"]},"application/vnd.umajin":{"source":"iana","extensions":["umj"]},"application/vnd.unity":{"source":"iana","extensions":["unityweb"]},"application/vnd.uoml+xml":{"source":"iana","compressible":true,"extensions":["uoml"]},"application/vnd.uplanet.alert":{"source":"iana"},"application/vnd.uplanet.alert-wbxml":{"source":"iana"},"application/vnd.uplanet.bearer-choice":{"source":"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{"source":"iana"},"application/vnd.uplanet.cacheop":{"source":"iana"},"application/vnd.uplanet.cacheop-wbxml":{"source":"iana"},"application/vnd.uplanet.channel":{"source":"iana"},"application/vnd.uplanet.channel-wbxml":{"source":"iana"},"application/vnd.uplanet.list":{"source":"iana"},"application/vnd.uplanet.list-wbxml":{"source":"iana"},"application/vnd.uplanet.listcmd":{"source":"iana"},"application/vnd.uplanet.listcmd-wbxml":{"source":"iana"},"application/vnd.uplanet.signal":{"source":"iana"},"application/vnd.uri-map":{"source":"iana"},"application/vnd.valve.source.material":{"source":"iana"},"application/vnd.vcx":{"source":"iana","extensions":["vcx"]},"application/vnd.vd-study":{"source":"iana"},"application/vnd.vectorworks":{"source":"iana"},"application/vnd.vel+json":{"source":"iana","compressible":true},"application/vnd.verimatrix.vcas":{"source":"iana"},"application/vnd.veritone.aion+json":{"source":"iana","compressible":true},"application/vnd.veryant.thin":{"source":"iana"},"application/vnd.ves.encrypted":{"source":"iana"},"application/vnd.vidsoft.vidconference":{"source":"iana"},"application/vnd.visio":{"source":"iana","extensions":["vsd","vst","vss","vsw"]},"application/vnd.visionary":{"source":"iana","extensions":["vis"]},"application/vnd.vividence.scriptfile":{"source":"iana"},"application/vnd.vsf":{"source":"iana","extensions":["vsf"]},"application/vnd.wap.sic":{"source":"iana"},"application/vnd.wap.slc":{"source":"iana"},"application/vnd.wap.wbxml":{"source":"iana","charset":"UTF-8","extensions":["wbxml"]},"application/vnd.wap.wmlc":{"source":"iana","extensions":["wmlc"]},"application/vnd.wap.wmlscriptc":{"source":"iana","extensions":["wmlsc"]},"application/vnd.webturbo":{"source":"iana","extensions":["wtb"]},"application/vnd.wfa.dpp":{"source":"iana"},"application/vnd.wfa.p2p":{"source":"iana"},"application/vnd.wfa.wsc":{"source":"iana"},"application/vnd.windows.devicepairing":{"source":"iana"},"application/vnd.wmc":{"source":"iana"},"application/vnd.wmf.bootstrap":{"source":"iana"},"application/vnd.wolfram.mathematica":{"source":"iana"},"application/vnd.wolfram.mathematica.package":{"source":"iana"},"application/vnd.wolfram.player":{"source":"iana","extensions":["nbp"]},"application/vnd.wordperfect":{"source":"iana","extensions":["wpd"]},"application/vnd.wqd":{"source":"iana","extensions":["wqd"]},"application/vnd.wrq-hp3000-labelled":{"source":"iana"},"application/vnd.wt.stf":{"source":"iana","extensions":["stf"]},"application/vnd.wv.csp+wbxml":{"source":"iana"},"application/vnd.wv.csp+xml":{"source":"iana","compressible":true},"application/vnd.wv.ssp+xml":{"source":"iana","compressible":true},"application/vnd.xacml+json":{"source":"iana","compressible":true},"application/vnd.xara":{"source":"iana","extensions":["xar"]},"application/vnd.xfdl":{"source":"iana","extensions":["xfdl"]},"application/vnd.xfdl.webform":{"source":"iana"},"application/vnd.xmi+xml":{"source":"iana","compressible":true},"application/vnd.xmpie.cpkg":{"source":"iana"},"application/vnd.xmpie.dpkg":{"source":"iana"},"application/vnd.xmpie.plan":{"source":"iana"},"application/vnd.xmpie.ppkg":{"source":"iana"},"application/vnd.xmpie.xlim":{"source":"iana"},"application/vnd.yamaha.hv-dic":{"source":"iana","extensions":["hvd"]},"application/vnd.yamaha.hv-script":{"source":"iana","extensions":["hvs"]},"application/vnd.yamaha.hv-voice":{"source":"iana","extensions":["hvp"]},"application/vnd.yamaha.openscoreformat":{"source":"iana","extensions":["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{"source":"iana","compressible":true,"extensions":["osfpvg"]},"application/vnd.yamaha.remote-setup":{"source":"iana"},"application/vnd.yamaha.smaf-audio":{"source":"iana","extensions":["saf"]},"application/vnd.yamaha.smaf-phrase":{"source":"iana","extensions":["spf"]},"application/vnd.yamaha.through-ngn":{"source":"iana"},"application/vnd.yamaha.tunnel-udpencap":{"source":"iana"},"application/vnd.yaoweme":{"source":"iana"},"application/vnd.yellowriver-custom-menu":{"source":"iana","extensions":["cmp"]},"application/vnd.youtube.yt":{"source":"iana"},"application/vnd.zul":{"source":"iana","extensions":["zir","zirz"]},"application/vnd.zzazz.deck+xml":{"source":"iana","compressible":true,"extensions":["zaz"]},"application/voicexml+xml":{"source":"iana","compressible":true,"extensions":["vxml"]},"application/voucher-cms+json":{"source":"iana","compressible":true},"application/vq-rtcpxr":{"source":"iana"},"application/wasm":{"source":"iana","compressible":true,"extensions":["wasm"]},"application/watcherinfo+xml":{"source":"iana","compressible":true},"application/webpush-options+json":{"source":"iana","compressible":true},"application/whoispp-query":{"source":"iana"},"application/whoispp-response":{"source":"iana"},"application/widget":{"source":"iana","extensions":["wgt"]},"application/winhlp":{"source":"apache","extensions":["hlp"]},"application/wita":{"source":"iana"},"application/wordperfect5.1":{"source":"iana"},"application/wsdl+xml":{"source":"iana","compressible":true,"extensions":["wsdl"]},"application/wspolicy+xml":{"source":"iana","compressible":true,"extensions":["wspolicy"]},"application/x-7z-compressed":{"source":"apache","compressible":false,"extensions":["7z"]},"application/x-abiword":{"source":"apache","extensions":["abw"]},"application/x-ace-compressed":{"source":"apache","extensions":["ace"]},"application/x-amf":{"source":"apache"},"application/x-apple-diskimage":{"source":"apache","extensions":["dmg"]},"application/x-arj":{"compressible":false,"extensions":["arj"]},"application/x-authorware-bin":{"source":"apache","extensions":["aab","x32","u32","vox"]},"application/x-authorware-map":{"source":"apache","extensions":["aam"]},"application/x-authorware-seg":{"source":"apache","extensions":["aas"]},"application/x-bcpio":{"source":"apache","extensions":["bcpio"]},"application/x-bdoc":{"compressible":false,"extensions":["bdoc"]},"application/x-bittorrent":{"source":"apache","extensions":["torrent"]},"application/x-blorb":{"source":"apache","extensions":["blb","blorb"]},"application/x-bzip":{"source":"apache","compressible":false,"extensions":["bz"]},"application/x-bzip2":{"source":"apache","compressible":false,"extensions":["bz2","boz"]},"application/x-cbr":{"source":"apache","extensions":["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{"source":"apache","extensions":["vcd"]},"application/x-cfs-compressed":{"source":"apache","extensions":["cfs"]},"application/x-chat":{"source":"apache","extensions":["chat"]},"application/x-chess-pgn":{"source":"apache","extensions":["pgn"]},"application/x-chrome-extension":{"extensions":["crx"]},"application/x-cocoa":{"source":"nginx","extensions":["cco"]},"application/x-compress":{"source":"apache"},"application/x-conference":{"source":"apache","extensions":["nsc"]},"application/x-cpio":{"source":"apache","extensions":["cpio"]},"application/x-csh":{"source":"apache","extensions":["csh"]},"application/x-deb":{"compressible":false},"application/x-debian-package":{"source":"apache","extensions":["deb","udeb"]},"application/x-dgc-compressed":{"source":"apache","extensions":["dgc"]},"application/x-director":{"source":"apache","extensions":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{"source":"apache","extensions":["wad"]},"application/x-dtbncx+xml":{"source":"apache","compressible":true,"extensions":["ncx"]},"application/x-dtbook+xml":{"source":"apache","compressible":true,"extensions":["dtb"]},"application/x-dtbresource+xml":{"source":"apache","compressible":true,"extensions":["res"]},"application/x-dvi":{"source":"apache","compressible":false,"extensions":["dvi"]},"application/x-envoy":{"source":"apache","extensions":["evy"]},"application/x-eva":{"source":"apache","extensions":["eva"]},"application/x-font-bdf":{"source":"apache","extensions":["bdf"]},"application/x-font-dos":{"source":"apache"},"application/x-font-framemaker":{"source":"apache"},"application/x-font-ghostscript":{"source":"apache","extensions":["gsf"]},"application/x-font-libgrx":{"source":"apache"},"application/x-font-linux-psf":{"source":"apache","extensions":["psf"]},"application/x-font-pcf":{"source":"apache","extensions":["pcf"]},"application/x-font-snf":{"source":"apache","extensions":["snf"]},"application/x-font-speedo":{"source":"apache"},"application/x-font-sunos-news":{"source":"apache"},"application/x-font-type1":{"source":"apache","extensions":["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{"source":"apache"},"application/x-freearc":{"source":"apache","extensions":["arc"]},"application/x-futuresplash":{"source":"apache","extensions":["spl"]},"application/x-gca-compressed":{"source":"apache","extensions":["gca"]},"application/x-glulx":{"source":"apache","extensions":["ulx"]},"application/x-gnumeric":{"source":"apache","extensions":["gnumeric"]},"application/x-gramps-xml":{"source":"apache","extensions":["gramps"]},"application/x-gtar":{"source":"apache","extensions":["gtar"]},"application/x-gzip":{"source":"apache"},"application/x-hdf":{"source":"apache","extensions":["hdf"]},"application/x-httpd-php":{"compressible":true,"extensions":["php"]},"application/x-install-instructions":{"source":"apache","extensions":["install"]},"application/x-iso9660-image":{"source":"apache","extensions":["iso"]},"application/x-iwork-keynote-sffkey":{"extensions":["key"]},"application/x-iwork-numbers-sffnumbers":{"extensions":["numbers"]},"application/x-iwork-pages-sffpages":{"extensions":["pages"]},"application/x-java-archive-diff":{"source":"nginx","extensions":["jardiff"]},"application/x-java-jnlp-file":{"source":"apache","compressible":false,"extensions":["jnlp"]},"application/x-javascript":{"compressible":true},"application/x-keepass2":{"extensions":["kdbx"]},"application/x-latex":{"source":"apache","compressible":false,"extensions":["latex"]},"application/x-lua-bytecode":{"extensions":["luac"]},"application/x-lzh-compressed":{"source":"apache","extensions":["lzh","lha"]},"application/x-makeself":{"source":"nginx","extensions":["run"]},"application/x-mie":{"source":"apache","extensions":["mie"]},"application/x-mobipocket-ebook":{"source":"apache","extensions":["prc","mobi"]},"application/x-mpegurl":{"compressible":false},"application/x-ms-application":{"source":"apache","extensions":["application"]},"application/x-ms-shortcut":{"source":"apache","extensions":["lnk"]},"application/x-ms-wmd":{"source":"apache","extensions":["wmd"]},"application/x-ms-wmz":{"source":"apache","extensions":["wmz"]},"application/x-ms-xbap":{"source":"apache","extensions":["xbap"]},"application/x-msaccess":{"source":"apache","extensions":["mdb"]},"application/x-msbinder":{"source":"apache","extensions":["obd"]},"application/x-mscardfile":{"source":"apache","extensions":["crd"]},"application/x-msclip":{"source":"apache","extensions":["clp"]},"application/x-msdos-program":{"extensions":["exe"]},"application/x-msdownload":{"source":"apache","extensions":["exe","dll","com","bat","msi"]},"application/x-msmediaview":{"source":"apache","extensions":["mvb","m13","m14"]},"application/x-msmetafile":{"source":"apache","extensions":["wmf","wmz","emf","emz"]},"application/x-msmoney":{"source":"apache","extensions":["mny"]},"application/x-mspublisher":{"source":"apache","extensions":["pub"]},"application/x-msschedule":{"source":"apache","extensions":["scd"]},"application/x-msterminal":{"source":"apache","extensions":["trm"]},"application/x-mswrite":{"source":"apache","extensions":["wri"]},"application/x-netcdf":{"source":"apache","extensions":["nc","cdf"]},"application/x-ns-proxy-autoconfig":{"compressible":true,"extensions":["pac"]},"application/x-nzb":{"source":"apache","extensions":["nzb"]},"application/x-perl":{"source":"nginx","extensions":["pl","pm"]},"application/x-pilot":{"source":"nginx","extensions":["prc","pdb"]},"application/x-pkcs12":{"source":"apache","compressible":false,"extensions":["p12","pfx"]},"application/x-pkcs7-certificates":{"source":"apache","extensions":["p7b","spc"]},"application/x-pkcs7-certreqresp":{"source":"apache","extensions":["p7r"]},"application/x-pki-message":{"source":"iana"},"application/x-rar-compressed":{"source":"apache","compressible":false,"extensions":["rar"]},"application/x-redhat-package-manager":{"source":"nginx","extensions":["rpm"]},"application/x-research-info-systems":{"source":"apache","extensions":["ris"]},"application/x-sea":{"source":"nginx","extensions":["sea"]},"application/x-sh":{"source":"apache","compressible":true,"extensions":["sh"]},"application/x-shar":{"source":"apache","extensions":["shar"]},"application/x-shockwave-flash":{"source":"apache","compressible":false,"extensions":["swf"]},"application/x-silverlight-app":{"source":"apache","extensions":["xap"]},"application/x-sql":{"source":"apache","extensions":["sql"]},"application/x-stuffit":{"source":"apache","compressible":false,"extensions":["sit"]},"application/x-stuffitx":{"source":"apache","extensions":["sitx"]},"application/x-subrip":{"source":"apache","extensions":["srt"]},"application/x-sv4cpio":{"source":"apache","extensions":["sv4cpio"]},"application/x-sv4crc":{"source":"apache","extensions":["sv4crc"]},"application/x-t3vm-image":{"source":"apache","extensions":["t3"]},"application/x-tads":{"source":"apache","extensions":["gam"]},"application/x-tar":{"source":"apache","compressible":true,"extensions":["tar"]},"application/x-tcl":{"source":"apache","extensions":["tcl","tk"]},"application/x-tex":{"source":"apache","extensions":["tex"]},"application/x-tex-tfm":{"source":"apache","extensions":["tfm"]},"application/x-texinfo":{"source":"apache","extensions":["texinfo","texi"]},"application/x-tgif":{"source":"apache","extensions":["obj"]},"application/x-ustar":{"source":"apache","extensions":["ustar"]},"application/x-virtualbox-hdd":{"compressible":true,"extensions":["hdd"]},"application/x-virtualbox-ova":{"compressible":true,"extensions":["ova"]},"application/x-virtualbox-ovf":{"compressible":true,"extensions":["ovf"]},"application/x-virtualbox-vbox":{"compressible":true,"extensions":["vbox"]},"application/x-virtualbox-vbox-extpack":{"compressible":false,"extensions":["vbox-extpack"]},"application/x-virtualbox-vdi":{"compressible":true,"extensions":["vdi"]},"application/x-virtualbox-vhd":{"compressible":true,"extensions":["vhd"]},"application/x-virtualbox-vmdk":{"compressible":true,"extensions":["vmdk"]},"application/x-wais-source":{"source":"apache","extensions":["src"]},"application/x-web-app-manifest+json":{"compressible":true,"extensions":["webapp"]},"application/x-www-form-urlencoded":{"source":"iana","compressible":true},"application/x-x509-ca-cert":{"source":"iana","extensions":["der","crt","pem"]},"application/x-x509-ca-ra-cert":{"source":"iana"},"application/x-x509-next-ca-cert":{"source":"iana"},"application/x-xfig":{"source":"apache","extensions":["fig"]},"application/x-xliff+xml":{"source":"apache","compressible":true,"extensions":["xlf"]},"application/x-xpinstall":{"source":"apache","compressible":false,"extensions":["xpi"]},"application/x-xz":{"source":"apache","extensions":["xz"]},"application/x-zmachine":{"source":"apache","extensions":["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{"source":"iana"},"application/xacml+xml":{"source":"iana","compressible":true},"application/xaml+xml":{"source":"apache","compressible":true,"extensions":["xaml"]},"application/xcap-att+xml":{"source":"iana","compressible":true,"extensions":["xav"]},"application/xcap-caps+xml":{"source":"iana","compressible":true,"extensions":["xca"]},"application/xcap-diff+xml":{"source":"iana","compressible":true,"extensions":["xdf"]},"application/xcap-el+xml":{"source":"iana","compressible":true,"extensions":["xel"]},"application/xcap-error+xml":{"source":"iana","compressible":true},"application/xcap-ns+xml":{"source":"iana","compressible":true,"extensions":["xns"]},"application/xcon-conference-info+xml":{"source":"iana","compressible":true},"application/xcon-conference-info-diff+xml":{"source":"iana","compressible":true},"application/xenc+xml":{"source":"iana","compressible":true,"extensions":["xenc"]},"application/xhtml+xml":{"source":"iana","compressible":true,"extensions":["xhtml","xht"]},"application/xhtml-voice+xml":{"source":"apache","compressible":true},"application/xliff+xml":{"source":"iana","compressible":true,"extensions":["xlf"]},"application/xml":{"source":"iana","compressible":true,"extensions":["xml","xsl","xsd","rng"]},"application/xml-dtd":{"source":"iana","compressible":true,"extensions":["dtd"]},"application/xml-external-parsed-entity":{"source":"iana"},"application/xml-patch+xml":{"source":"iana","compressible":true},"application/xmpp+xml":{"source":"iana","compressible":true},"application/xop+xml":{"source":"iana","compressible":true,"extensions":["xop"]},"application/xproc+xml":{"source":"apache","compressible":true,"extensions":["xpl"]},"application/xslt+xml":{"source":"iana","compressible":true,"extensions":["xsl","xslt"]},"application/xspf+xml":{"source":"apache","compressible":true,"extensions":["xspf"]},"application/xv+xml":{"source":"iana","compressible":true,"extensions":["mxml","xhvml","xvml","xvm"]},"application/yang":{"source":"iana","extensions":["yang"]},"application/yang-data+json":{"source":"iana","compressible":true},"application/yang-data+xml":{"source":"iana","compressible":true},"application/yang-patch+json":{"source":"iana","compressible":true},"application/yang-patch+xml":{"source":"iana","compressible":true},"application/yin+xml":{"source":"iana","compressible":true,"extensions":["yin"]},"application/zip":{"source":"iana","compressible":false,"extensions":["zip"]},"application/zlib":{"source":"iana"},"application/zstd":{"source":"iana"},"audio/1d-interleaved-parityfec":{"source":"iana"},"audio/32kadpcm":{"source":"iana"},"audio/3gpp":{"source":"iana","compressible":false,"extensions":["3gpp"]},"audio/3gpp2":{"source":"iana"},"audio/aac":{"source":"iana"},"audio/ac3":{"source":"iana"},"audio/adpcm":{"source":"apache","extensions":["adp"]},"audio/amr":{"source":"iana","extensions":["amr"]},"audio/amr-wb":{"source":"iana"},"audio/amr-wb+":{"source":"iana"},"audio/aptx":{"source":"iana"},"audio/asc":{"source":"iana"},"audio/atrac-advanced-lossless":{"source":"iana"},"audio/atrac-x":{"source":"iana"},"audio/atrac3":{"source":"iana"},"audio/basic":{"source":"iana","compressible":false,"extensions":["au","snd"]},"audio/bv16":{"source":"iana"},"audio/bv32":{"source":"iana"},"audio/clearmode":{"source":"iana"},"audio/cn":{"source":"iana"},"audio/dat12":{"source":"iana"},"audio/dls":{"source":"iana"},"audio/dsr-es201108":{"source":"iana"},"audio/dsr-es202050":{"source":"iana"},"audio/dsr-es202211":{"source":"iana"},"audio/dsr-es202212":{"source":"iana"},"audio/dv":{"source":"iana"},"audio/dvi4":{"source":"iana"},"audio/eac3":{"source":"iana"},"audio/encaprtp":{"source":"iana"},"audio/evrc":{"source":"iana"},"audio/evrc-qcp":{"source":"iana"},"audio/evrc0":{"source":"iana"},"audio/evrc1":{"source":"iana"},"audio/evrcb":{"source":"iana"},"audio/evrcb0":{"source":"iana"},"audio/evrcb1":{"source":"iana"},"audio/evrcnw":{"source":"iana"},"audio/evrcnw0":{"source":"iana"},"audio/evrcnw1":{"source":"iana"},"audio/evrcwb":{"source":"iana"},"audio/evrcwb0":{"source":"iana"},"audio/evrcwb1":{"source":"iana"},"audio/evs":{"source":"iana"},"audio/flexfec":{"source":"iana"},"audio/fwdred":{"source":"iana"},"audio/g711-0":{"source":"iana"},"audio/g719":{"source":"iana"},"audio/g722":{"source":"iana"},"audio/g7221":{"source":"iana"},"audio/g723":{"source":"iana"},"audio/g726-16":{"source":"iana"},"audio/g726-24":{"source":"iana"},"audio/g726-32":{"source":"iana"},"audio/g726-40":{"source":"iana"},"audio/g728":{"source":"iana"},"audio/g729":{"source":"iana"},"audio/g7291":{"source":"iana"},"audio/g729d":{"source":"iana"},"audio/g729e":{"source":"iana"},"audio/gsm":{"source":"iana"},"audio/gsm-efr":{"source":"iana"},"audio/gsm-hr-08":{"source":"iana"},"audio/ilbc":{"source":"iana"},"audio/ip-mr_v2.5":{"source":"iana"},"audio/isac":{"source":"apache"},"audio/l16":{"source":"iana"},"audio/l20":{"source":"iana"},"audio/l24":{"source":"iana","compressible":false},"audio/l8":{"source":"iana"},"audio/lpc":{"source":"iana"},"audio/melp":{"source":"iana"},"audio/melp1200":{"source":"iana"},"audio/melp2400":{"source":"iana"},"audio/melp600":{"source":"iana"},"audio/mhas":{"source":"iana"},"audio/midi":{"source":"apache","extensions":["mid","midi","kar","rmi"]},"audio/mobile-xmf":{"source":"iana","extensions":["mxmf"]},"audio/mp3":{"compressible":false,"extensions":["mp3"]},"audio/mp4":{"source":"iana","compressible":false,"extensions":["m4a","mp4a"]},"audio/mp4a-latm":{"source":"iana"},"audio/mpa":{"source":"iana"},"audio/mpa-robust":{"source":"iana"},"audio/mpeg":{"source":"iana","compressible":false,"extensions":["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{"source":"iana"},"audio/musepack":{"source":"apache"},"audio/ogg":{"source":"iana","compressible":false,"extensions":["oga","ogg","spx","opus"]},"audio/opus":{"source":"iana"},"audio/parityfec":{"source":"iana"},"audio/pcma":{"source":"iana"},"audio/pcma-wb":{"source":"iana"},"audio/pcmu":{"source":"iana"},"audio/pcmu-wb":{"source":"iana"},"audio/prs.sid":{"source":"iana"},"audio/qcelp":{"source":"iana"},"audio/raptorfec":{"source":"iana"},"audio/red":{"source":"iana"},"audio/rtp-enc-aescm128":{"source":"iana"},"audio/rtp-midi":{"source":"iana"},"audio/rtploopback":{"source":"iana"},"audio/rtx":{"source":"iana"},"audio/s3m":{"source":"apache","extensions":["s3m"]},"audio/scip":{"source":"iana"},"audio/silk":{"source":"apache","extensions":["sil"]},"audio/smv":{"source":"iana"},"audio/smv-qcp":{"source":"iana"},"audio/smv0":{"source":"iana"},"audio/sofa":{"source":"iana"},"audio/sp-midi":{"source":"iana"},"audio/speex":{"source":"iana"},"audio/t140c":{"source":"iana"},"audio/t38":{"source":"iana"},"audio/telephone-event":{"source":"iana"},"audio/tetra_acelp":{"source":"iana"},"audio/tetra_acelp_bb":{"source":"iana"},"audio/tone":{"source":"iana"},"audio/tsvcis":{"source":"iana"},"audio/uemclip":{"source":"iana"},"audio/ulpfec":{"source":"iana"},"audio/usac":{"source":"iana"},"audio/vdvi":{"source":"iana"},"audio/vmr-wb":{"source":"iana"},"audio/vnd.3gpp.iufp":{"source":"iana"},"audio/vnd.4sb":{"source":"iana"},"audio/vnd.audiokoz":{"source":"iana"},"audio/vnd.celp":{"source":"iana"},"audio/vnd.cisco.nse":{"source":"iana"},"audio/vnd.cmles.radio-events":{"source":"iana"},"audio/vnd.cns.anp1":{"source":"iana"},"audio/vnd.cns.inf1":{"source":"iana"},"audio/vnd.dece.audio":{"source":"iana","extensions":["uva","uvva"]},"audio/vnd.digital-winds":{"source":"iana","extensions":["eol"]},"audio/vnd.dlna.adts":{"source":"iana"},"audio/vnd.dolby.heaac.1":{"source":"iana"},"audio/vnd.dolby.heaac.2":{"source":"iana"},"audio/vnd.dolby.mlp":{"source":"iana"},"audio/vnd.dolby.mps":{"source":"iana"},"audio/vnd.dolby.pl2":{"source":"iana"},"audio/vnd.dolby.pl2x":{"source":"iana"},"audio/vnd.dolby.pl2z":{"source":"iana"},"audio/vnd.dolby.pulse.1":{"source":"iana"},"audio/vnd.dra":{"source":"iana","extensions":["dra"]},"audio/vnd.dts":{"source":"iana","extensions":["dts"]},"audio/vnd.dts.hd":{"source":"iana","extensions":["dtshd"]},"audio/vnd.dts.uhd":{"source":"iana"},"audio/vnd.dvb.file":{"source":"iana"},"audio/vnd.everad.plj":{"source":"iana"},"audio/vnd.hns.audio":{"source":"iana"},"audio/vnd.lucent.voice":{"source":"iana","extensions":["lvp"]},"audio/vnd.ms-playready.media.pya":{"source":"iana","extensions":["pya"]},"audio/vnd.nokia.mobile-xmf":{"source":"iana"},"audio/vnd.nortel.vbk":{"source":"iana"},"audio/vnd.nuera.ecelp4800":{"source":"iana","extensions":["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{"source":"iana","extensions":["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{"source":"iana","extensions":["ecelp9600"]},"audio/vnd.octel.sbc":{"source":"iana"},"audio/vnd.presonus.multitrack":{"source":"iana"},"audio/vnd.qcelp":{"source":"iana"},"audio/vnd.rhetorex.32kadpcm":{"source":"iana"},"audio/vnd.rip":{"source":"iana","extensions":["rip"]},"audio/vnd.rn-realaudio":{"compressible":false},"audio/vnd.sealedmedia.softseal.mpeg":{"source":"iana"},"audio/vnd.vmx.cvsd":{"source":"iana"},"audio/vnd.wave":{"compressible":false},"audio/vorbis":{"source":"iana","compressible":false},"audio/vorbis-config":{"source":"iana"},"audio/wav":{"compressible":false,"extensions":["wav"]},"audio/wave":{"compressible":false,"extensions":["wav"]},"audio/webm":{"source":"apache","compressible":false,"extensions":["weba"]},"audio/x-aac":{"source":"apache","compressible":false,"extensions":["aac"]},"audio/x-aiff":{"source":"apache","extensions":["aif","aiff","aifc"]},"audio/x-caf":{"source":"apache","compressible":false,"extensions":["caf"]},"audio/x-flac":{"source":"apache","extensions":["flac"]},"audio/x-m4a":{"source":"nginx","extensions":["m4a"]},"audio/x-matroska":{"source":"apache","extensions":["mka"]},"audio/x-mpegurl":{"source":"apache","extensions":["m3u"]},"audio/x-ms-wax":{"source":"apache","extensions":["wax"]},"audio/x-ms-wma":{"source":"apache","extensions":["wma"]},"audio/x-pn-realaudio":{"source":"apache","extensions":["ram","ra"]},"audio/x-pn-realaudio-plugin":{"source":"apache","extensions":["rmp"]},"audio/x-realaudio":{"source":"nginx","extensions":["ra"]},"audio/x-tta":{"source":"apache"},"audio/x-wav":{"source":"apache","extensions":["wav"]},"audio/xm":{"source":"apache","extensions":["xm"]},"chemical/x-cdx":{"source":"apache","extensions":["cdx"]},"chemical/x-cif":{"source":"apache","extensions":["cif"]},"chemical/x-cmdf":{"source":"apache","extensions":["cmdf"]},"chemical/x-cml":{"source":"apache","extensions":["cml"]},"chemical/x-csml":{"source":"apache","extensions":["csml"]},"chemical/x-pdb":{"source":"apache"},"chemical/x-xyz":{"source":"apache","extensions":["xyz"]},"font/collection":{"source":"iana","extensions":["ttc"]},"font/otf":{"source":"iana","compressible":true,"extensions":["otf"]},"font/sfnt":{"source":"iana"},"font/ttf":{"source":"iana","compressible":true,"extensions":["ttf"]},"font/woff":{"source":"iana","extensions":["woff"]},"font/woff2":{"source":"iana","extensions":["woff2"]},"image/aces":{"source":"iana","extensions":["exr"]},"image/apng":{"compressible":false,"extensions":["apng"]},"image/avci":{"source":"iana"},"image/avcs":{"source":"iana"},"image/avif":{"source":"iana","compressible":false,"extensions":["avif"]},"image/bmp":{"source":"iana","compressible":true,"extensions":["bmp"]},"image/cgm":{"source":"iana","extensions":["cgm"]},"image/dicom-rle":{"source":"iana","extensions":["drle"]},"image/emf":{"source":"iana","extensions":["emf"]},"image/fits":{"source":"iana","extensions":["fits"]},"image/g3fax":{"source":"iana","extensions":["g3"]},"image/gif":{"source":"iana","compressible":false,"extensions":["gif"]},"image/heic":{"source":"iana","extensions":["heic"]},"image/heic-sequence":{"source":"iana","extensions":["heics"]},"image/heif":{"source":"iana","extensions":["heif"]},"image/heif-sequence":{"source":"iana","extensions":["heifs"]},"image/hej2k":{"source":"iana","extensions":["hej2"]},"image/hsj2":{"source":"iana","extensions":["hsj2"]},"image/ief":{"source":"iana","extensions":["ief"]},"image/jls":{"source":"iana","extensions":["jls"]},"image/jp2":{"source":"iana","compressible":false,"extensions":["jp2","jpg2"]},"image/jpeg":{"source":"iana","compressible":false,"extensions":["jpeg","jpg","jpe"]},"image/jph":{"source":"iana","extensions":["jph"]},"image/jphc":{"source":"iana","extensions":["jhc"]},"image/jpm":{"source":"iana","compressible":false,"extensions":["jpm"]},"image/jpx":{"source":"iana","compressible":false,"extensions":["jpx","jpf"]},"image/jxr":{"source":"iana","extensions":["jxr"]},"image/jxra":{"source":"iana","extensions":["jxra"]},"image/jxrs":{"source":"iana","extensions":["jxrs"]},"image/jxs":{"source":"iana","extensions":["jxs"]},"image/jxsc":{"source":"iana","extensions":["jxsc"]},"image/jxsi":{"source":"iana","extensions":["jxsi"]},"image/jxss":{"source":"iana","extensions":["jxss"]},"image/ktx":{"source":"iana","extensions":["ktx"]},"image/ktx2":{"source":"iana","extensions":["ktx2"]},"image/naplps":{"source":"iana"},"image/pjpeg":{"compressible":false},"image/png":{"source":"iana","compressible":false,"extensions":["png"]},"image/prs.btif":{"source":"iana","extensions":["btif"]},"image/prs.pti":{"source":"iana","extensions":["pti"]},"image/pwg-raster":{"source":"iana"},"image/sgi":{"source":"apache","extensions":["sgi"]},"image/svg+xml":{"source":"iana","compressible":true,"extensions":["svg","svgz"]},"image/t38":{"source":"iana","extensions":["t38"]},"image/tiff":{"source":"iana","compressible":false,"extensions":["tif","tiff"]},"image/tiff-fx":{"source":"iana","extensions":["tfx"]},"image/vnd.adobe.photoshop":{"source":"iana","compressible":true,"extensions":["psd"]},"image/vnd.airzip.accelerator.azv":{"source":"iana","extensions":["azv"]},"image/vnd.cns.inf2":{"source":"iana"},"image/vnd.dece.graphic":{"source":"iana","extensions":["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{"source":"iana","extensions":["djvu","djv"]},"image/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"image/vnd.dwg":{"source":"iana","extensions":["dwg"]},"image/vnd.dxf":{"source":"iana","extensions":["dxf"]},"image/vnd.fastbidsheet":{"source":"iana","extensions":["fbs"]},"image/vnd.fpx":{"source":"iana","extensions":["fpx"]},"image/vnd.fst":{"source":"iana","extensions":["fst"]},"image/vnd.fujixerox.edmics-mmr":{"source":"iana","extensions":["mmr"]},"image/vnd.fujixerox.edmics-rlc":{"source":"iana","extensions":["rlc"]},"image/vnd.globalgraphics.pgb":{"source":"iana"},"image/vnd.microsoft.icon":{"source":"iana","compressible":true,"extensions":["ico"]},"image/vnd.mix":{"source":"iana"},"image/vnd.mozilla.apng":{"source":"iana"},"image/vnd.ms-dds":{"compressible":true,"extensions":["dds"]},"image/vnd.ms-modi":{"source":"iana","extensions":["mdi"]},"image/vnd.ms-photo":{"source":"apache","extensions":["wdp"]},"image/vnd.net-fpx":{"source":"iana","extensions":["npx"]},"image/vnd.pco.b16":{"source":"iana","extensions":["b16"]},"image/vnd.radiance":{"source":"iana"},"image/vnd.sealed.png":{"source":"iana"},"image/vnd.sealedmedia.softseal.gif":{"source":"iana"},"image/vnd.sealedmedia.softseal.jpg":{"source":"iana"},"image/vnd.svf":{"source":"iana"},"image/vnd.tencent.tap":{"source":"iana","extensions":["tap"]},"image/vnd.valve.source.texture":{"source":"iana","extensions":["vtf"]},"image/vnd.wap.wbmp":{"source":"iana","extensions":["wbmp"]},"image/vnd.xiff":{"source":"iana","extensions":["xif"]},"image/vnd.zbrush.pcx":{"source":"iana","extensions":["pcx"]},"image/webp":{"source":"apache","extensions":["webp"]},"image/wmf":{"source":"iana","extensions":["wmf"]},"image/x-3ds":{"source":"apache","extensions":["3ds"]},"image/x-cmu-raster":{"source":"apache","extensions":["ras"]},"image/x-cmx":{"source":"apache","extensions":["cmx"]},"image/x-freehand":{"source":"apache","extensions":["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{"source":"apache","compressible":true,"extensions":["ico"]},"image/x-jng":{"source":"nginx","extensions":["jng"]},"image/x-mrsid-image":{"source":"apache","extensions":["sid"]},"image/x-ms-bmp":{"source":"nginx","compressible":true,"extensions":["bmp"]},"image/x-pcx":{"source":"apache","extensions":["pcx"]},"image/x-pict":{"source":"apache","extensions":["pic","pct"]},"image/x-portable-anymap":{"source":"apache","extensions":["pnm"]},"image/x-portable-bitmap":{"source":"apache","extensions":["pbm"]},"image/x-portable-graymap":{"source":"apache","extensions":["pgm"]},"image/x-portable-pixmap":{"source":"apache","extensions":["ppm"]},"image/x-rgb":{"source":"apache","extensions":["rgb"]},"image/x-tga":{"source":"apache","extensions":["tga"]},"image/x-xbitmap":{"source":"apache","extensions":["xbm"]},"image/x-xcf":{"compressible":false},"image/x-xpixmap":{"source":"apache","extensions":["xpm"]},"image/x-xwindowdump":{"source":"apache","extensions":["xwd"]},"message/cpim":{"source":"iana"},"message/delivery-status":{"source":"iana"},"message/disposition-notification":{"source":"iana","extensions":["disposition-notification"]},"message/external-body":{"source":"iana"},"message/feedback-report":{"source":"iana"},"message/global":{"source":"iana","extensions":["u8msg"]},"message/global-delivery-status":{"source":"iana","extensions":["u8dsn"]},"message/global-disposition-notification":{"source":"iana","extensions":["u8mdn"]},"message/global-headers":{"source":"iana","extensions":["u8hdr"]},"message/http":{"source":"iana","compressible":false},"message/imdn+xml":{"source":"iana","compressible":true},"message/news":{"source":"iana"},"message/partial":{"source":"iana","compressible":false},"message/rfc822":{"source":"iana","compressible":true,"extensions":["eml","mime"]},"message/s-http":{"source":"iana"},"message/sip":{"source":"iana"},"message/sipfrag":{"source":"iana"},"message/tracking-status":{"source":"iana"},"message/vnd.si.simp":{"source":"iana"},"message/vnd.wfa.wsc":{"source":"iana","extensions":["wsc"]},"model/3mf":{"source":"iana","extensions":["3mf"]},"model/e57":{"source":"iana"},"model/gltf+json":{"source":"iana","compressible":true,"extensions":["gltf"]},"model/gltf-binary":{"source":"iana","compressible":true,"extensions":["glb"]},"model/iges":{"source":"iana","compressible":false,"extensions":["igs","iges"]},"model/mesh":{"source":"iana","compressible":false,"extensions":["msh","mesh","silo"]},"model/mtl":{"source":"iana","extensions":["mtl"]},"model/obj":{"source":"iana","extensions":["obj"]},"model/step":{"source":"iana"},"model/step+xml":{"source":"iana","compressible":true,"extensions":["stpx"]},"model/step+zip":{"source":"iana","compressible":false,"extensions":["stpz"]},"model/step-xml+zip":{"source":"iana","compressible":false,"extensions":["stpxz"]},"model/stl":{"source":"iana","extensions":["stl"]},"model/vnd.collada+xml":{"source":"iana","compressible":true,"extensions":["dae"]},"model/vnd.dwf":{"source":"iana","extensions":["dwf"]},"model/vnd.flatland.3dml":{"source":"iana"},"model/vnd.gdl":{"source":"iana","extensions":["gdl"]},"model/vnd.gs-gdl":{"source":"apache"},"model/vnd.gs.gdl":{"source":"iana"},"model/vnd.gtw":{"source":"iana","extensions":["gtw"]},"model/vnd.moml+xml":{"source":"iana","compressible":true},"model/vnd.mts":{"source":"iana","extensions":["mts"]},"model/vnd.opengex":{"source":"iana","extensions":["ogex"]},"model/vnd.parasolid.transmit.binary":{"source":"iana","extensions":["x_b"]},"model/vnd.parasolid.transmit.text":{"source":"iana","extensions":["x_t"]},"model/vnd.pytha.pyox":{"source":"iana"},"model/vnd.rosette.annotated-data-model":{"source":"iana"},"model/vnd.sap.vds":{"source":"iana","extensions":["vds"]},"model/vnd.usdz+zip":{"source":"iana","compressible":false,"extensions":["usdz"]},"model/vnd.valve.source.compiled-map":{"source":"iana","extensions":["bsp"]},"model/vnd.vtu":{"source":"iana","extensions":["vtu"]},"model/vrml":{"source":"iana","compressible":false,"extensions":["wrl","vrml"]},"model/x3d+binary":{"source":"apache","compressible":false,"extensions":["x3db","x3dbz"]},"model/x3d+fastinfoset":{"source":"iana","extensions":["x3db"]},"model/x3d+vrml":{"source":"apache","compressible":false,"extensions":["x3dv","x3dvz"]},"model/x3d+xml":{"source":"iana","compressible":true,"extensions":["x3d","x3dz"]},"model/x3d-vrml":{"source":"iana","extensions":["x3dv"]},"multipart/alternative":{"source":"iana","compressible":false},"multipart/appledouble":{"source":"iana"},"multipart/byteranges":{"source":"iana"},"multipart/digest":{"source":"iana"},"multipart/encrypted":{"source":"iana","compressible":false},"multipart/form-data":{"source":"iana","compressible":false},"multipart/header-set":{"source":"iana"},"multipart/mixed":{"source":"iana"},"multipart/multilingual":{"source":"iana"},"multipart/parallel":{"source":"iana"},"multipart/related":{"source":"iana","compressible":false},"multipart/report":{"source":"iana"},"multipart/signed":{"source":"iana","compressible":false},"multipart/vnd.bint.med-plus":{"source":"iana"},"multipart/voice-message":{"source":"iana"},"multipart/x-mixed-replace":{"source":"iana"},"text/1d-interleaved-parityfec":{"source":"iana"},"text/cache-manifest":{"source":"iana","compressible":true,"extensions":["appcache","manifest"]},"text/calendar":{"source":"iana","extensions":["ics","ifb"]},"text/calender":{"compressible":true},"text/cmd":{"compressible":true},"text/coffeescript":{"extensions":["coffee","litcoffee"]},"text/cql":{"source":"iana"},"text/cql-expression":{"source":"iana"},"text/cql-identifier":{"source":"iana"},"text/css":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["css"]},"text/csv":{"source":"iana","compressible":true,"extensions":["csv"]},"text/csv-schema":{"source":"iana"},"text/directory":{"source":"iana"},"text/dns":{"source":"iana"},"text/ecmascript":{"source":"iana"},"text/encaprtp":{"source":"iana"},"text/enriched":{"source":"iana"},"text/fhirpath":{"source":"iana"},"text/flexfec":{"source":"iana"},"text/fwdred":{"source":"iana"},"text/gff3":{"source":"iana"},"text/grammar-ref-list":{"source":"iana"},"text/html":{"source":"iana","compressible":true,"extensions":["html","htm","shtml"]},"text/jade":{"extensions":["jade"]},"text/javascript":{"source":"iana","compressible":true},"text/jcr-cnd":{"source":"iana"},"text/jsx":{"compressible":true,"extensions":["jsx"]},"text/less":{"compressible":true,"extensions":["less"]},"text/markdown":{"source":"iana","compressible":true,"extensions":["markdown","md"]},"text/mathml":{"source":"nginx","extensions":["mml"]},"text/mdx":{"compressible":true,"extensions":["mdx"]},"text/mizar":{"source":"iana"},"text/n3":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["n3"]},"text/parameters":{"source":"iana","charset":"UTF-8"},"text/parityfec":{"source":"iana"},"text/plain":{"source":"iana","compressible":true,"extensions":["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{"source":"iana","charset":"UTF-8"},"text/prs.fallenstein.rst":{"source":"iana"},"text/prs.lines.tag":{"source":"iana","extensions":["dsc"]},"text/prs.prop.logic":{"source":"iana"},"text/raptorfec":{"source":"iana"},"text/red":{"source":"iana"},"text/rfc822-headers":{"source":"iana"},"text/richtext":{"source":"iana","compressible":true,"extensions":["rtx"]},"text/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"text/rtp-enc-aescm128":{"source":"iana"},"text/rtploopback":{"source":"iana"},"text/rtx":{"source":"iana"},"text/sgml":{"source":"iana","extensions":["sgml","sgm"]},"text/shaclc":{"source":"iana"},"text/shex":{"source":"iana","extensions":["shex"]},"text/slim":{"extensions":["slim","slm"]},"text/spdx":{"source":"iana","extensions":["spdx"]},"text/strings":{"source":"iana"},"text/stylus":{"extensions":["stylus","styl"]},"text/t140":{"source":"iana"},"text/tab-separated-values":{"source":"iana","compressible":true,"extensions":["tsv"]},"text/troff":{"source":"iana","extensions":["t","tr","roff","man","me","ms"]},"text/turtle":{"source":"iana","charset":"UTF-8","extensions":["ttl"]},"text/ulpfec":{"source":"iana"},"text/uri-list":{"source":"iana","compressible":true,"extensions":["uri","uris","urls"]},"text/vcard":{"source":"iana","compressible":true,"extensions":["vcard"]},"text/vnd.a":{"source":"iana"},"text/vnd.abc":{"source":"iana"},"text/vnd.ascii-art":{"source":"iana"},"text/vnd.curl":{"source":"iana","extensions":["curl"]},"text/vnd.curl.dcurl":{"source":"apache","extensions":["dcurl"]},"text/vnd.curl.mcurl":{"source":"apache","extensions":["mcurl"]},"text/vnd.curl.scurl":{"source":"apache","extensions":["scurl"]},"text/vnd.debian.copyright":{"source":"iana","charset":"UTF-8"},"text/vnd.dmclientscript":{"source":"iana"},"text/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"text/vnd.esmertec.theme-descriptor":{"source":"iana","charset":"UTF-8"},"text/vnd.familysearch.gedcom":{"source":"iana","extensions":["ged"]},"text/vnd.ficlab.flt":{"source":"iana"},"text/vnd.fly":{"source":"iana","extensions":["fly"]},"text/vnd.fmi.flexstor":{"source":"iana","extensions":["flx"]},"text/vnd.gml":{"source":"iana"},"text/vnd.graphviz":{"source":"iana","extensions":["gv"]},"text/vnd.hans":{"source":"iana"},"text/vnd.hgl":{"source":"iana"},"text/vnd.in3d.3dml":{"source":"iana","extensions":["3dml"]},"text/vnd.in3d.spot":{"source":"iana","extensions":["spot"]},"text/vnd.iptc.newsml":{"source":"iana"},"text/vnd.iptc.nitf":{"source":"iana"},"text/vnd.latex-z":{"source":"iana"},"text/vnd.motorola.reflex":{"source":"iana"},"text/vnd.ms-mediapackage":{"source":"iana"},"text/vnd.net2phone.commcenter.command":{"source":"iana"},"text/vnd.radisys.msml-basic-layout":{"source":"iana"},"text/vnd.senx.warpscript":{"source":"iana"},"text/vnd.si.uricatalogue":{"source":"iana"},"text/vnd.sosi":{"source":"iana"},"text/vnd.sun.j2me.app-descriptor":{"source":"iana","charset":"UTF-8","extensions":["jad"]},"text/vnd.trolltech.linguist":{"source":"iana","charset":"UTF-8"},"text/vnd.wap.si":{"source":"iana"},"text/vnd.wap.sl":{"source":"iana"},"text/vnd.wap.wml":{"source":"iana","extensions":["wml"]},"text/vnd.wap.wmlscript":{"source":"iana","extensions":["wmls"]},"text/vtt":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["vtt"]},"text/x-asm":{"source":"apache","extensions":["s","asm"]},"text/x-c":{"source":"apache","extensions":["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{"source":"nginx","extensions":["htc"]},"text/x-fortran":{"source":"apache","extensions":["f","for","f77","f90"]},"text/x-gwt-rpc":{"compressible":true},"text/x-handlebars-template":{"extensions":["hbs"]},"text/x-java-source":{"source":"apache","extensions":["java"]},"text/x-jquery-tmpl":{"compressible":true},"text/x-lua":{"extensions":["lua"]},"text/x-markdown":{"compressible":true,"extensions":["mkd"]},"text/x-nfo":{"source":"apache","extensions":["nfo"]},"text/x-opml":{"source":"apache","extensions":["opml"]},"text/x-org":{"compressible":true,"extensions":["org"]},"text/x-pascal":{"source":"apache","extensions":["p","pas"]},"text/x-processing":{"compressible":true,"extensions":["pde"]},"text/x-sass":{"extensions":["sass"]},"text/x-scss":{"extensions":["scss"]},"text/x-setext":{"source":"apache","extensions":["etx"]},"text/x-sfv":{"source":"apache","extensions":["sfv"]},"text/x-suse-ymp":{"compressible":true,"extensions":["ymp"]},"text/x-uuencode":{"source":"apache","extensions":["uu"]},"text/x-vcalendar":{"source":"apache","extensions":["vcs"]},"text/x-vcard":{"source":"apache","extensions":["vcf"]},"text/xml":{"source":"iana","compressible":true,"extensions":["xml"]},"text/xml-external-parsed-entity":{"source":"iana"},"text/yaml":{"compressible":true,"extensions":["yaml","yml"]},"video/1d-interleaved-parityfec":{"source":"iana"},"video/3gpp":{"source":"iana","extensions":["3gp","3gpp"]},"video/3gpp-tt":{"source":"iana"},"video/3gpp2":{"source":"iana","extensions":["3g2"]},"video/av1":{"source":"iana"},"video/bmpeg":{"source":"iana"},"video/bt656":{"source":"iana"},"video/celb":{"source":"iana"},"video/dv":{"source":"iana"},"video/encaprtp":{"source":"iana"},"video/ffv1":{"source":"iana"},"video/flexfec":{"source":"iana"},"video/h261":{"source":"iana","extensions":["h261"]},"video/h263":{"source":"iana","extensions":["h263"]},"video/h263-1998":{"source":"iana"},"video/h263-2000":{"source":"iana"},"video/h264":{"source":"iana","extensions":["h264"]},"video/h264-rcdo":{"source":"iana"},"video/h264-svc":{"source":"iana"},"video/h265":{"source":"iana"},"video/iso.segment":{"source":"iana","extensions":["m4s"]},"video/jpeg":{"source":"iana","extensions":["jpgv"]},"video/jpeg2000":{"source":"iana"},"video/jpm":{"source":"apache","extensions":["jpm","jpgm"]},"video/jxsv":{"source":"iana"},"video/mj2":{"source":"iana","extensions":["mj2","mjp2"]},"video/mp1s":{"source":"iana"},"video/mp2p":{"source":"iana"},"video/mp2t":{"source":"iana","extensions":["ts"]},"video/mp4":{"source":"iana","compressible":false,"extensions":["mp4","mp4v","mpg4"]},"video/mp4v-es":{"source":"iana"},"video/mpeg":{"source":"iana","compressible":false,"extensions":["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{"source":"iana"},"video/mpv":{"source":"iana"},"video/nv":{"source":"iana"},"video/ogg":{"source":"iana","compressible":false,"extensions":["ogv"]},"video/parityfec":{"source":"iana"},"video/pointer":{"source":"iana"},"video/quicktime":{"source":"iana","compressible":false,"extensions":["qt","mov"]},"video/raptorfec":{"source":"iana"},"video/raw":{"source":"iana"},"video/rtp-enc-aescm128":{"source":"iana"},"video/rtploopback":{"source":"iana"},"video/rtx":{"source":"iana"},"video/scip":{"source":"iana"},"video/smpte291":{"source":"iana"},"video/smpte292m":{"source":"iana"},"video/ulpfec":{"source":"iana"},"video/vc1":{"source":"iana"},"video/vc2":{"source":"iana"},"video/vnd.cctv":{"source":"iana"},"video/vnd.dece.hd":{"source":"iana","extensions":["uvh","uvvh"]},"video/vnd.dece.mobile":{"source":"iana","extensions":["uvm","uvvm"]},"video/vnd.dece.mp4":{"source":"iana"},"video/vnd.dece.pd":{"source":"iana","extensions":["uvp","uvvp"]},"video/vnd.dece.sd":{"source":"iana","extensions":["uvs","uvvs"]},"video/vnd.dece.video":{"source":"iana","extensions":["uvv","uvvv"]},"video/vnd.directv.mpeg":{"source":"iana"},"video/vnd.directv.mpeg-tts":{"source":"iana"},"video/vnd.dlna.mpeg-tts":{"source":"iana"},"video/vnd.dvb.file":{"source":"iana","extensions":["dvb"]},"video/vnd.fvt":{"source":"iana","extensions":["fvt"]},"video/vnd.hns.video":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.ttsavc":{"source":"iana"},"video/vnd.iptvforum.ttsmpeg2":{"source":"iana"},"video/vnd.motorola.video":{"source":"iana"},"video/vnd.motorola.videop":{"source":"iana"},"video/vnd.mpegurl":{"source":"iana","extensions":["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{"source":"iana","extensions":["pyv"]},"video/vnd.nokia.interleaved-multimedia":{"source":"iana"},"video/vnd.nokia.mp4vr":{"source":"iana"},"video/vnd.nokia.videovoip":{"source":"iana"},"video/vnd.objectvideo":{"source":"iana"},"video/vnd.radgamettools.bink":{"source":"iana"},"video/vnd.radgamettools.smacker":{"source":"iana"},"video/vnd.sealed.mpeg1":{"source":"iana"},"video/vnd.sealed.mpeg4":{"source":"iana"},"video/vnd.sealed.swf":{"source":"iana"},"video/vnd.sealedmedia.softseal.mov":{"source":"iana"},"video/vnd.uvvu.mp4":{"source":"iana","extensions":["uvu","uvvu"]},"video/vnd.vivo":{"source":"iana","extensions":["viv"]},"video/vnd.youtube.yt":{"source":"iana"},"video/vp8":{"source":"iana"},"video/vp9":{"source":"iana"},"video/webm":{"source":"apache","compressible":false,"extensions":["webm"]},"video/x-f4v":{"source":"apache","extensions":["f4v"]},"video/x-fli":{"source":"apache","extensions":["fli"]},"video/x-flv":{"source":"apache","compressible":false,"extensions":["flv"]},"video/x-m4v":{"source":"apache","extensions":["m4v"]},"video/x-matroska":{"source":"apache","compressible":false,"extensions":["mkv","mk3d","mks"]},"video/x-mng":{"source":"apache","extensions":["mng"]},"video/x-ms-asf":{"source":"apache","extensions":["asf","asx"]},"video/x-ms-vob":{"source":"apache","extensions":["vob"]},"video/x-ms-wm":{"source":"apache","extensions":["wm"]},"video/x-ms-wmv":{"source":"apache","compressible":false,"extensions":["wmv"]},"video/x-ms-wmx":{"source":"apache","extensions":["wmx"]},"video/x-ms-wvx":{"source":"apache","extensions":["wvx"]},"video/x-msvideo":{"source":"apache","extensions":["avi"]},"video/x-sgi-movie":{"source":"apache","extensions":["movie"]},"video/x-smv":{"source":"apache","extensions":["smv"]},"x-conference/x-cooltalk":{"source":"apache","extensions":["ice"]},"x-shader/x-fragment":{"compressible":true},"x-shader/x-vertex":{"compressible":true}}')},function(e,t,r){"use strict";var n=r(177);e.exports.desc=function(e){return n(e,(function(e,t){return t.length-e.length}))},e.exports.asc=function(e){return n(e,(function(e,t){return e.length-t.length}))}},function(e,t,r){"use strict";var n=r(178);e.exports=function(e,t){if(!n(e))throw new TypeError("Expected a plain object");"function"==typeof(t=t||{})&&(t={compare:t});var r=t.deep,i=[],a=[],o=function(e){var s=i.indexOf(e);if(-1!==s)return a[s];var c={},l=Object.keys(e).sort(t.compare);i.push(e),a.push(c);for(var u=0;u{const r=n(e,t);return r?r.version:null}},function(e,t,r){const n=r(26);e.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},function(e,t,r){const n=r(5);e.exports=(e,t,r,i)=>{"string"==typeof r&&(i=r,r=void 0);try{return new n(e,r).inc(t,i).version}catch(e){return null}}},function(e,t,r){const n=r(26),i=r(60);e.exports=(e,t)=>{if(i(e,t))return null;{const r=n(e),i=n(t),a=r.prerelease.length||i.prerelease.length,o=a?"pre":"",s=a?"prerelease":"";for(const e in r)if(("major"===e||"minor"===e||"patch"===e)&&r[e]!==i[e])return o+e;return s}}},function(e,t,r){const n=r(5);e.exports=(e,t)=>new n(e,t).major},function(e,t,r){const n=r(5);e.exports=(e,t)=>new n(e,t).minor},function(e,t,r){const n=r(5);e.exports=(e,t)=>new n(e,t).patch},function(e,t,r){const n=r(26);e.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},function(e,t,r){const n=r(11);e.exports=(e,t,r)=>n(t,e,r)},function(e,t,r){const n=r(11);e.exports=(e,t)=>n(e,t,!0)},function(e,t,r){const n=r(61);e.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))},function(e,t,r){const n=r(61);e.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))},function(e,t,r){const n=r(5),i=r(26),{re:a,t:o}=r(25);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let t;for(;(t=a[o.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&t.index+t[0].length===r.index+r[0].length||(r=t),a[o.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;a[o.COERCERTL].lastIndex=-1}else r=e.match(a[o.COERCE]);return null===r?null:i(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)}},function(e,t,r){"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(tthis.length&&(t=this.length);for(var i=0,a=this.head;null!==a&&ithis.length&&(t=this.length);for(var i=this.length,a=this.tail;null!==a&&i>t;i--)a=a.prev;for(;null!==a&&i>e;i--,a=a.prev)r.push(a.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,a=this.head;null!==a&&nnew n(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},function(e,t,r){const n=r(5),i=r(12);e.exports=(e,t,r)=>{let a=null,o=null,s=null;try{s=new i(t,r)}catch(e){return null}return e.forEach(e=>{s.test(e)&&(a&&-1!==o.compare(e)||(a=e,o=new n(a,r)))}),a}},function(e,t,r){const n=r(5),i=r(12);e.exports=(e,t,r)=>{let a=null,o=null,s=null;try{s=new i(t,r)}catch(e){return null}return e.forEach(e=>{s.test(e)&&(a&&1!==o.compare(e)||(a=e,o=new n(a,r)))}),a}},function(e,t,r){const n=r(5),i=r(12),a=r(44);e.exports=(e,t)=>{e=new i(e,t);let r=new n("0.0.0");if(e.test(r))return r;if(r=new n("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":o&&!a(t,o)||(o=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}),!o||r&&!a(r,o)||(r=o)}return r&&e.test(r)?r:null}},function(e,t,r){const n=r(12);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},function(e,t,r){const n=r(65);e.exports=(e,t,r)=>n(e,t,">",r)},function(e,t,r){const n=r(65);e.exports=(e,t,r)=>n(e,t,"<",r)},function(e,t,r){const n=r(12);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t))},function(e,t,r){const n=r(46),i=r(11);e.exports=(e,t,r)=>{const a=[];let o=null,s=null;const c=e.sort((e,t)=>i(e,t,r));for(const e of c){n(e,t,r)?(s=e,o||(o=e)):(s&&a.push([o,s]),s=null,o=null)}o&&a.push([o,null]);const l=[];for(const[e,t]of a)e===t?l.push(e):t||e!==c[0]?t?e===c[0]?l.push("<="+t):l.push(`${e} - ${t}`):l.push(">="+e):l.push("*");const u=l.join(" || "),p="string"==typeof t.raw?t.raw:String(t);return u.length{if(e===t)return!0;if(1===e.length&&e[0].semver===a){if(1===t.length&&t[0].semver===a)return!0;e=r.includePrerelease?[new i(">=0.0.0-0")]:[new i(">=0.0.0")]}if(1===t.length&&t[0].semver===a){if(r.includePrerelease)return!0;t=[new i(">=0.0.0")]}const n=new Set;let c,p,d,h,f,m,v;for(const t of e)">"===t.operator||">="===t.operator?c=l(c,t,r):"<"===t.operator||"<="===t.operator?p=u(p,t,r):n.add(t.semver);if(n.size>1)return null;if(c&&p){if(d=s(c.semver,p.semver,r),d>0)return null;if(0===d&&(">="!==c.operator||"<="!==p.operator))return null}for(const e of n){if(c&&!o(e,String(c),r))return null;if(p&&!o(e,String(p),r))return null;for(const n of t)if(!o(e,String(n),r))return!1;return!0}let g=!(!p||r.includePrerelease||!p.semver.prerelease.length)&&p.semver,b=!(!c||r.includePrerelease||!c.semver.prerelease.length)&&c.semver;g&&1===g.prerelease.length&&"<"===p.operator&&0===g.prerelease[0]&&(g=!1);for(const e of t){if(v=v||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,c)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),">"===e.operator||">="===e.operator){if(h=l(c,e,r),h===e&&h!==c)return!1}else if(">="===c.operator&&!o(c.semver,String(e),r))return!1;if(p)if(g&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===g.major&&e.semver.minor===g.minor&&e.semver.patch===g.patch&&(g=!1),"<"===e.operator||"<="===e.operator){if(f=u(p,e,r),f===e&&f!==p)return!1}else if("<="===p.operator&&!o(p.semver,String(e),r))return!1;if(!e.operator&&(p||c)&&0!==d)return!1}return!(c&&m&&!p&&0!==d)&&(!(p&&v&&!c&&0!==d)&&(!b&&!g))},l=(e,t,r)=>{if(!e)return t;const n=s(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},u=(e,t,r)=>{if(!e)return t;const n=s(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;e:for(const n of e.set){for(const e of t.set){const t=c(n,e,r);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2),i=r(0),a=r(207),o=r(98),s=r(216),c=(e,t,r=5)=>{const l=o.getPath();n.existsSync(l)||n.mkdirSync(l,{recursive:!0});const u=i.resolve(`${l}/${e}`);return new Promise((l,p)=>{if(!n.existsSync(u)||t){n.existsSync(u)&&a.sync(u);const d=`https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&x=id%3D${e}%26uc&prodversion=32`,h=i.resolve(u+".crx");o.downloadFile(d,h).then(()=>{s(h,u).then(()=>{o.changePermissions(u,755),l(u)}).catch(e=>{if(!n.existsSync(i.resolve(u,"manifest.json")))return p(e)})}).catch(n=>{if(console.log(`Failed to fetch extension, trying ${r-1} more times`),r<=1)return p(n);setTimeout(()=>{c(e,t,r-1).then(l).catch(p)},200)})}else l(u)})};t.default=c},function(e,t,r){const n=r(22),i=r(0),a=r(2);let o=void 0;try{o=r(93)}catch(e){}const s={nosort:!0,silent:!0};let c=0;const l="win32"===process.platform,u=e=>{if(["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(t=>{e[t]=e[t]||a[t],e[t+="Sync"]=e[t]||a[t]}),e.maxBusyTries=e.maxBusyTries||3,e.emfileWait=e.emfileWait||1e3,!1===e.glob&&(e.disableGlob=!0),!0!==e.disableGlob&&void 0===o)throw Error("glob dependency not found, set `options.disableGlob = true` if intentional");e.disableGlob=e.disableGlob||!1,e.glob=e.glob||s},p=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),n(e,"rimraf: missing path"),n.equal(typeof e,"string","rimraf: path should be a string"),n.equal(typeof r,"function","rimraf: callback function required"),n(t,"rimraf: invalid options argument provided"),n.equal(typeof t,"object","rimraf: options should be object"),u(t);let i=0,a=null,s=0;const l=(e,n)=>e?r(e):(s=n.length,0===s?r():void n.forEach(e=>{const n=o=>{if(o){if(("EBUSY"===o.code||"ENOTEMPTY"===o.code||"EPERM"===o.code)&&id(e,t,n),100*i);if("EMFILE"===o.code&&cd(e,t,n),c++);"ENOENT"===o.code&&(o=null)}c=0,(e=>{a=a||e,0==--s&&r(a)})(o)};d(e,t,n)}));if(t.disableGlob||!o.hasMagic(e))return l(null,[e]);t.lstat(e,(r,n)=>{if(!r)return l(null,[e]);o(e,t.glob,l)})},d=(e,t,r)=>{n(e),n(t),n("function"==typeof r),t.lstat(e,(n,i)=>n&&"ENOENT"===n.code?r(null):(n&&"EPERM"===n.code&&l&&h(e,t,n,r),i&&i.isDirectory()?m(e,t,n,r):void t.unlink(e,n=>{if(n){if("ENOENT"===n.code)return r(null);if("EPERM"===n.code)return l?h(e,t,n,r):m(e,t,n,r);if("EISDIR"===n.code)return m(e,t,n,r)}return r(n)})))},h=(e,t,r,i)=>{n(e),n(t),n("function"==typeof i),t.chmod(e,438,n=>{n?i("ENOENT"===n.code?null:r):t.stat(e,(n,a)=>{n?i("ENOENT"===n.code?null:r):a.isDirectory()?m(e,t,r,i):t.unlink(e,i)})})},f=(e,t,r)=>{n(e),n(t);try{t.chmodSync(e,438)}catch(e){if("ENOENT"===e.code)return;throw r}let i;try{i=t.statSync(e)}catch(e){if("ENOENT"===e.code)return;throw r}i.isDirectory()?b(e,t,r):t.unlinkSync(e)},m=(e,t,r,i)=>{n(e),n(t),n("function"==typeof i),t.rmdir(e,n=>{!n||"ENOTEMPTY"!==n.code&&"EEXIST"!==n.code&&"EPERM"!==n.code?n&&"ENOTDIR"===n.code?i(r):i(n):v(e,t,i)})},v=(e,t,r)=>{n(e),n(t),n("function"==typeof r),t.readdir(e,(n,a)=>{if(n)return r(n);let o,s=a.length;if(0===s)return t.rmdir(e,r);a.forEach(n=>{p(i.join(e,n),t,n=>{if(!o)return n?r(o=n):void(0==--s&&t.rmdir(e,r))})})})},g=(e,t)=>{let r;if(u(t=t||{}),n(e,"rimraf: missing path"),n.equal(typeof e,"string","rimraf: path should be a string"),n(t,"rimraf: missing options"),n.equal(typeof t,"object","rimraf: options should be object"),t.disableGlob||!o.hasMagic(e))r=[e];else try{t.lstatSync(e),r=[e]}catch(n){r=o.sync(e,t.glob)}if(r.length)for(let e=0;e{n(e),n(t);try{t.rmdirSync(e)}catch(n){if("ENOENT"===n.code)return;if("ENOTDIR"===n.code)throw r;"ENOTEMPTY"!==n.code&&"EEXIST"!==n.code&&"EPERM"!==n.code||y(e,t)}},y=(e,t)=>{n(e),n(t),t.readdirSync(e).forEach(r=>g(i.join(e,r),t));const r=l?100:1;let a=0;for(;;){let n=!0;try{const i=t.rmdirSync(e,t);return n=!1,i}finally{if(++a=e.length)return t&&(t[h]=e),r(null,e);c.lastIndex=o;var n=c.exec(e);return d=u,u+=n[0],p=d+n[1],o=c.lastIndex,m[p]||t&&t[p]===p?process.nextTick(g):t&&Object.prototype.hasOwnProperty.call(t,p)?x(t[p]):a.lstat(p,b)}function b(e,n){if(e)return r(e);if(!n.isSymbolicLink())return m[p]=!0,t&&(t[p]=p),process.nextTick(g);if(!i){var o=n.dev.toString(32)+":"+n.ino.toString(32);if(f.hasOwnProperty(o))return y(null,f[o],p)}a.stat(p,(function(e){if(e)return r(e);a.readlink(p,(function(e,t){i||(f[o]=t),y(e,t)}))}))}function y(e,i,a){if(e)return r(e);var o=n.resolve(d,i);t&&(t[a]=o),x(o)}function x(t){e=n.resolve(t,e.slice(o)),v()}v()}},function(e,t,r){var n=r(210),i=r(211);e.exports=function(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return function e(t,r){var a=[],o=i("{","}",t);if(!o||/\$$/.test(o.pre))return[t];var c,l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),p=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),v=l||p,g=o.body.indexOf(",")>=0;if(!v&&!g)return o.post.match(/,.*\}/)?(t=o.pre+"{"+o.body+s+o.post,e(t)):[t];if(v)c=o.body.split(/\.\./);else{if(1===(c=function e(t){if(!t)return[""];var r=[],n=i("{","}",t);if(!n)return t.split(",");var a=n.pre,o=n.body,s=n.post,c=a.split(",");c[c.length-1]+="{"+o+"}";var l=e(s);s.length&&(c[c.length-1]+=l.shift(),c.push.apply(c,l));return r.push.apply(r,c),r}(o.body)).length)if(1===(c=e(c[0],!1).map(d)).length)return(x=o.post.length?e(o.post,!1):[""]).map((function(e){return o.pre+c[0]+e}))}var b,y=o.pre,x=o.post.length?e(o.post,!1):[""];if(v){var w=u(c[0]),E=u(c[1]),D=Math.max(c[0].length,c[1].length),_=3==c.length?Math.abs(u(c[2])):1,S=f;E0){var I=new Array(O+1).join("0");A=C<0?"-"+I+A.slice(1):I+A}}b.push(A)}}else b=n(c,(function(t){return e(t,!1)}));for(var R=0;R=t}},function(e,t){e.exports=function(e,t){for(var n=[],i=0;i=0&&l>0){if(e===t)return[c,l];for(n=[],a=r.length;u>=0&&!s;)u==c?(n.push(u),c=r.indexOf(e,u+1)):1==n.length?s=[n.pop(),l]:((i=n.pop())=0?c:l;n.length&&(s=[a,o])}return s}e.exports=n,n.range=a},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},function(e,t,r){e.exports=h,h.GlobSync=f;var n=r(94),i=r(66),a=(i.Minimatch,r(93).Glob,r(9),r(0)),o=r(22),s=r(67),c=r(95),l=c.setopts,u=c.ownProp,p=c.childrenIgnored,d=c.isIgnored;function h(e,t){if("function"==typeof t||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");return new f(e,t).found}function f(e,t){if(!e)throw new Error("must provide pattern");if("function"==typeof t||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof f))return new f(e,t);if(l(this,e,t),this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var n=0;nthis.maxLength)return!1;if(!this.stat&&u(this.cache,t)){var n=this.cache[t];if(Array.isArray(n)&&(n="DIR"),!r||"DIR"===n)return n;if(r&&"FILE"===n)return!1}var i=this.statCache[t];if(!i){var a;try{a=this.fs.lstatSync(t)}catch(e){if(e&&("ENOENT"===e.code||"ENOTDIR"===e.code))return this.statCache[t]=!1,!1}if(a&&a.isSymbolicLink())try{i=this.fs.statSync(t)}catch(e){i=a}else i=a}this.statCache[t]=i;n=!0;return i&&(n=i.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||n,(!r||"FILE"!==n)&&n},f.prototype._mark=function(e){return c.mark(this,e)},f.prototype._makeAbs=function(e){return c.makeAbs(this,e)}},function(e,t,r){var n=r(96),i=Object.create(null),a=r(97);function o(e){for(var t=e.length,r=[],n=0;nn?(r.splice(0,n),process.nextTick((function(){t.apply(null,a)}))):delete i[e]}}))}(e))}))},function(e,t){e.exports=require("https")},function(e,t,r){"use strict";var n=r(2),i=r(0),a=r(217),o=r(248),s=r(249),c=s(n.writeFile),l=s(n.readFile),u=s(o);e.exports=function(e,t){var r=i.resolve(e),n=i.extname(e),o=i.basename(e,n),s=i.dirname(e);return t=t||i.resolve(s,o),l(r).then((function(e){return a.loadAsync(function(e){function t(e,t,r,n){var i=0;return i+=e,i+=t<<8,i+=r<<16,i+=n<<24}if(80===e[0]&&75===e[1]&&3===e[2]&&4===e[3])return e;if(67!==e[0]||114!==e[1]||50!==e[2]||52!==e[3])throw new Error("Invalid header: Does not start with Cr24");var r=3===e[4],n=2===e[4];if(!n&&!r||e[5]||e[6]||e[7])throw new Error("Unexpected crx format version number.");if(n){var i=16+t(e[8],e[9],e[10],e[11])+t(e[12],e[13],e[14],e[15]);return e.slice(i,e.length)}var a=12+t(e[8],e[9],e[10],e[11]);return e.slice(a,e.length)}(e))})).then((function(e){var r=Object.keys(e.files);return Promise.all(r.map((function(r){var n=!e.files[r].dir,a=i.join(t,r),o=n&&i.dirname(a)||a,s=e.files[r].async("nodebuffer");return u(o).then((function(){return!!n&&s})).then((function(e){return!e||c(a,e)}))})))}))}},function(e,t,r){"use strict";function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new n;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}n.prototype=r(218),n.prototype.loadAsync=r(243),n.support=r(18),n.defaults=r(109),n.version="3.7.1",n.loadAsync=function(e,t){return(new n).loadAsync(e,t)},n.external=r(39),e.exports=n},function(e,t,r){"use strict";var n=r(29),i=r(3),a=r(10),o=r(108),s=r(109),c=r(68),l=r(229),u=r(230),p=r(49),d=r(242),h=function(e,t,r){var n,o=i.getTypeOf(t),u=i.extend(r||{},s);u.date=u.date||new Date,null!==u.compression&&(u.compression=u.compression.toUpperCase()),"string"==typeof u.unixPermissions&&(u.unixPermissions=parseInt(u.unixPermissions,8)),u.unixPermissions&&16384&u.unixPermissions&&(u.dir=!0),u.dosPermissions&&16&u.dosPermissions&&(u.dir=!0),u.dir&&(e=m(e)),u.createFolders&&(n=f(e))&&v.call(this,n,!0);var h="string"===o&&!1===u.binary&&!1===u.base64;r&&void 0!==r.binary||(u.binary=!h),(t instanceof c&&0===t.uncompressedSize||u.dir||!t||0===t.length)&&(u.base64=!1,u.binary=!0,t="",u.compression="STORE",o="string");var g=null;g=t instanceof c||t instanceof a?t:p.isNode&&p.isStream(t)?new d(e,t):i.prepareContent(e,t,u.binary,u.optimizedBinaryString,u.base64);var b=new l(e,g,u);this.files[e]=b},f=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},m=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},v=function(e,t){return t=void 0!==t?t:s.createFolders,e=m(e),this.files[e]||h.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function g(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var b={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,n;for(t in this.files)n=this.files[t],(r=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(r,n)},filter:function(e){var t=[];return this.forEach((function(r,n){e(r,n)&&t.push(n)})),t},file:function(e,t,r){if(1===arguments.length){if(g(e)){var n=e;return this.filter((function(e,t){return!t.dir&&n.test(e)}))}var i=this.files[this.root+e];return i&&!i.dir?i:null}return e=this.root+e,h.call(this,e,t,r),this},folder:function(e){if(!e)return this;if(g(e))return this.filter((function(t,r){return r.dir&&e.test(t)}));var t=this.root+e,r=v.call(this,t),n=this.clone();return n.root=r.name,n},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter((function(t,r){return r.name.slice(0,e.length)===e})),n=0;n0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var t,r,i,a=n.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=a,i=s,t.copy(r,i),s+=o.data.length,o=o.next;return a},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t,r){e.exports=r(9).deprecate},function(e,t,r){"use strict";e.exports=a;var n=r(106),i=Object.create(r(38));function a(e){if(!(this instanceof a))return new a(e);n.call(this,e)}i.inherits=r(27),i.inherits(a,n),a.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){"use strict";e.exports="function"==typeof setImmediate?setImmediate:function(){var e=[].slice.apply(arguments);e.splice(1,0,0),setTimeout.apply(null,e)}},function(e,t,r){"use strict";var n=r(225);function i(){}var a={},o=["REJECTED"],s=["FULFILLED"],c=["PENDING"];if(!process.browser)var l=["UNHANDLED"];function u(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=c,this.queue=[],this.outcome=void 0,process.browser||(this.handled=l),e!==i&&f(this,e)}function p(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function d(e,t,r){n((function(){var n;try{n=t(r)}catch(t){return a.reject(e,t)}n===e?a.reject(e,new TypeError("Cannot resolve promise with itself")):a.resolve(e,n)}))}function h(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function f(e,t){var r=!1;function n(t){r||(r=!0,a.reject(e,t))}function i(t){r||(r=!0,a.resolve(e,t))}var o=m((function(){t(i,n)}));"error"===o.status&&n(o.value)}function m(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}e.exports=u,u.prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then((function(r){return t.resolve(e()).then((function(){return r}))}),(function(r){return t.resolve(e()).then((function(){throw r}))}))},u.prototype.catch=function(e){return this.then(null,e)},u.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===o)return this;var r=new this.constructor(i);(process.browser||this.handled===l&&(this.handled=null),this.state!==c)?d(r,this.state===s?e:t,this.outcome):this.queue.push(new p(r,e,t));return r},p.prototype.callFulfilled=function(e){a.resolve(this.promise,e)},p.prototype.otherCallFulfilled=function(e){d(this.promise,this.onFulfilled,e)},p.prototype.callRejected=function(e){a.reject(this.promise,e)},p.prototype.otherCallRejected=function(e){d(this.promise,this.onRejected,e)},a.resolve=function(e,t){var r=m(h,t);if("error"===r.status)return a.reject(e,r.value);var n=r.value;if(n)f(e,n);else{e.state=s,e.outcome=t;for(var i=-1,o=e.queue.length;++i0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==r)throw new Error(o[r]);if(t.header&&n.deflateSetHeader(this.strm,t.header),t.dictionary){var u;if(u="string"==typeof t.dictionary?a.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(r=n.deflateSetDictionary(this.strm,u)))throw new Error(o[r]);this._dict_set=!0}}function u(e,t){var r=new l(t);if(r.push(e,!0),r.err)throw r.msg||o[r.err];return r.result}l.prototype.push=function(e,t){var r,o,s=this.strm,l=this.options.chunkSize;if(this.ended)return!1;o=t===~~t?t:!0===t?4:0,"string"==typeof e?s.input=a.string2buf(e):"[object ArrayBuffer]"===c.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new i.Buf8(l),s.next_out=0,s.avail_out=l),1!==(r=n.deflate(s,o))&&0!==r)return this.onEnd(r),this.ended=!0,!1;0!==s.avail_out&&(0!==s.avail_in||4!==o&&2!==o)||("string"===this.options.to?this.onData(a.buf2binstring(i.shrinkBuf(s.output,s.next_out))):this.onData(i.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==r);return 4===o?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==o||(this.onEnd(0),s.avail_out=0,!0)},l.prototype.onData=function(e){this.chunks.push(e)},l.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=l,t.deflate=u,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,u(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,u(e,t)}},function(e,t,r){"use strict";var n,i=r(20),a=r(235),o=r(113),s=r(114),c=r(70);function l(e,t){return e.msg=c[t],t}function u(e){return(e<<1)-(e>4?9:0)}function p(e){for(var t=e.length;--t>=0;)e[t]=0}function d(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function h(e,t){a._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,d(e.strm)}function f(e,t){e.pending_buf[e.pending++]=t}function m(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function v(e,t){var r,n,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,l=e.window,u=e.w_mask,p=e.prev,d=e.strstart+258,h=l[a+o-1],f=l[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(l[(r=t)+o]===f&&l[r+o-1]===h&&l[r]===l[a]&&l[++r]===l[a+1]){a+=2,r++;do{}while(l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&ao){if(e.match_start=t,o=n,n>=s)break;h=l[a+o-1],f=l[a+o]}}}while((t=p[t&u])>c&&0!=--i);return o<=e.lookahead?o:e.lookahead}function g(e){var t,r,n,a,c,l,u,p,d,h,f=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-262)){i.arraySet(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=f?n-f:0}while(--r);t=r=f;do{n=e.prev[--t],e.prev[t]=n>=f?n-f:0}while(--r);a+=f}if(0===e.strm.avail_in)break;if(l=e.strm,u=e.window,p=e.strstart+e.lookahead,d=a,h=void 0,(h=l.avail_in)>d&&(h=d),r=0===h?0:(l.avail_in-=h,i.arraySet(u,l.input,l.next_in,h,p),1===l.state.wrap?l.adler=o(l.adler,u,h,p):2===l.state.wrap&&(l.adler=s(l.adler,u,h,p)),l.next_in+=h,l.total_in+=h,h),e.lookahead+=r,e.lookahead+e.insert>=3)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3)if(n=a._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,n=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<15&&(s=2,n-=16),a<1||a>9||8!==r||n<8||n>15||t<0||t>9||o<0||o>4)return l(e,-2);8===n&&(n=9);var c=new w;return e.state=c,c.strm=e,c.wrap=s,c.gzhead=null,c.w_bits=n,c.w_size=1<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(g(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,h(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(h(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(h(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(h(e,!1),e.strm.avail_out),1)})),new x(4,4,8,4,b),new x(4,5,16,8,b),new x(4,6,32,32,b),new x(4,4,16,16,y),new x(8,16,32,32,y),new x(8,16,128,128,y),new x(8,32,128,256,y),new x(32,128,258,1024,y),new x(32,258,258,4096,y)],t.deflateInit=function(e,t){return _(e,t,8,15,8,0)},t.deflateInit2=_,t.deflateReset=D,t.deflateResetKeep=E,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?-2:(e.state.gzhead=t,0):-2},t.deflate=function(e,t){var r,i,o,c;if(!e||!e.state||t>5||t<0)return e?l(e,-2):-2;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||666===i.status&&4!==t)return l(e,0===e.avail_out?-5:-2);if(i.strm=e,r=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,f(i,31),f(i,139),f(i,8),i.gzhead?(f(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),f(i,255&i.gzhead.time),f(i,i.gzhead.time>>8&255),f(i,i.gzhead.time>>16&255),f(i,i.gzhead.time>>24&255),f(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),f(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(f(i,255&i.gzhead.extra.length),f(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(f(i,0),f(i,0),f(i,0),f(i,0),f(i,0),f(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),f(i,3),i.status=113);else{var v=8+(i.w_bits-8<<4)<<8;v|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(v|=32),v+=31-v%31,i.status=113,m(i,v),0!==i.strstart&&(m(i,e.adler>>>16),m(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),d(e),o=i.pending,i.pending!==i.pending_buf_size));)f(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),d(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),0===c&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),d(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),0===c&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&d(e),i.pending+2<=i.pending_buf_size&&(f(i,255&e.adler),f(i,e.adler>>8&255),e.adler=0,i.status=113)):i.status=113),0!==i.pending){if(d(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&u(t)<=u(r)&&4!==t)return l(e,-5);if(666===i.status&&0!==e.avail_in)return l(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&666!==i.status){var b=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(g(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(h(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(h(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(h(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var r,n,i,o,s=e.window;;){if(e.lookahead<=258){if(g(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(n=s[i=e.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){o=e.strstart+258;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=a._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(h(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(h(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(h(e,!1),0===e.strm.avail_out)?1:2}(i,t):n[i.level].func(i,t);if(3!==b&&4!==b||(i.status=666),1===b||3===b)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===b&&(1===t?a._tr_align(i):5!==t&&(a._tr_stored_block(i,0,0,!1),3===t&&(p(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),d(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(f(i,255&e.adler),f(i,e.adler>>8&255),f(i,e.adler>>16&255),f(i,e.adler>>24&255),f(i,255&e.total_in),f(i,e.total_in>>8&255),f(i,e.total_in>>16&255),f(i,e.total_in>>24&255)):(m(i,e.adler>>>16),m(i,65535&e.adler)),d(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?l(e,-2):(e.state=null,113===t?l(e,-3):0):-2},t.deflateSetDictionary=function(e,t){var r,n,a,s,c,l,u,d,h=t.length;if(!e||!e.state)return-2;if(2===(s=(r=e.state).wrap)||1===s&&42!==r.status||r.lookahead)return-2;for(1===s&&(e.adler=o(e.adler,t,h,0)),r.wrap=0,h>=r.w_size&&(0===s&&(p(r.head),r.strstart=0,r.block_start=0,r.insert=0),d=new i.Buf8(r.w_size),i.arraySet(d,t,h-r.w_size,r.w_size,0),t=d,h=r.w_size),c=e.avail_in,l=e.next_in,u=e.input,e.avail_in=h,e.next_in=0,e.input=t,g(r);r.lookahead>=3;){n=r.strstart,a=r.lookahead-2;do{r.ins_h=(r.ins_h<=0;)e[t]=0}var a=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],o=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],c=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],l=new Array(576);i(l);var u=new Array(60);i(u);var p=new Array(512);i(p);var d=new Array(256);i(d);var h=new Array(29);i(h);var f,m,v,g=new Array(30);function b(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function y(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function x(e){return e<256?p[e]:p[256+(e>>>7)]}function w(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function E(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<>>=1,r<<=1}while(--t>0);return r>>>1}function S(e,t,r){var n,i,a=new Array(16),o=0;for(n=1;n<=15;n++)a[n]=o=o+r[n-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=_(a[s]++,s))}}function k(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function C(e){e.bi_valid>8?w(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function A(e,t,r,n){var i=2*t,a=2*r;return e[i]>1;r>=1;r--)O(e,a,r);i=c;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],O(e,a,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,a[2*i]=a[2*r]+a[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,a[2*r+1]=a[2*n+1]=i,e.heap[1]=i++,O(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,a,o,s,c=t.dyn_tree,l=t.max_code,u=t.stat_desc.static_tree,p=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,f=t.stat_desc.max_length,m=0;for(a=0;a<=15;a++)e.bl_count[a]=0;for(c[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(a=c[2*c[2*(n=e.heap[r])+1]+1]+1)>f&&(a=f,m++),c[2*n+1]=a,n>l||(e.bl_count[a]++,o=0,n>=h&&(o=d[n-h]),s=c[2*n],e.opt_len+=s*(a+o),p&&(e.static_len+=s*(u[2*n+1]+o)));if(0!==m){do{for(a=f-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[f]--,m-=2}while(m>0);for(a=f;0!==a;a--)for(n=e.bl_count[a];0!==n;)(i=e.heap[--r])>l||(c[2*i+1]!==a&&(e.opt_len+=(a-c[2*i+1])*c[2*i],c[2*i+1]=a),n--)}}(e,t),S(a,l,e.bl_count)}function P(e,t,r){var n,i,a=-1,o=t[1],s=0,c=7,l=4;for(0===o&&(c=138,l=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=o,o=t[2*(n+1)+1],++s>=7;n<30;n++)for(g[n]=i<<7,e=0;e<1<0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),R(e,e.l_desc),R(e,e.d_desc),o=function(e){var t;for(P(e,e.dyn_ltree,e.l_desc.max_code),P(e,e.dyn_dtree,e.d_desc.max_code),R(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*c[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=r+5,r+4<=i&&-1!==t?N(e,t,r,n):4===e.strategy||a===i?(E(e,2+(n?1:0),3),I(e,l,u)):(E(e,4+(n?1:0),3),function(e,t,r,n){var i;for(E(e,t-257,5),E(e,r-1,5),E(e,n-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(d[r]+256+1)]++,e.dyn_dtree[2*x(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){E(e,2,3),D(e,256,l),function(e){16===e.bi_valid?(w(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},function(e,t,r){"use strict";var n=r(237),i=r(20),a=r(115),o=r(117),s=r(70),c=r(116),l=r(240),u=Object.prototype.toString;function p(e){if(!(this instanceof p))return new p(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,t.windowBits);if(r!==o.Z_OK)throw new Error(s[r]);if(this.header=new l,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=a.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary))!==o.Z_OK))throw new Error(s[r])}function d(e,t){var r=new p(t);if(r.push(e,!0),r.err)throw r.msg||s[r.err];return r.result}p.prototype.push=function(e,t){var r,s,c,l,p,d=this.strm,h=this.options.chunkSize,f=this.options.dictionary,m=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?o.Z_FINISH:o.Z_NO_FLUSH,"string"==typeof e?d.input=a.binstring2buf(e):"[object ArrayBuffer]"===u.call(e)?d.input=new Uint8Array(e):d.input=e,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new i.Buf8(h),d.next_out=0,d.avail_out=h),(r=n.inflate(d,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&f&&(r=n.inflateSetDictionary(this.strm,f)),r===o.Z_BUF_ERROR&&!0===m&&(r=o.Z_OK,m=!1),r!==o.Z_STREAM_END&&r!==o.Z_OK)return this.onEnd(r),this.ended=!0,!1;d.next_out&&(0!==d.avail_out&&r!==o.Z_STREAM_END&&(0!==d.avail_in||s!==o.Z_FINISH&&s!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(c=a.utf8border(d.output,d.next_out),l=d.next_out-c,p=a.buf2string(d.output,c),d.next_out=l,d.avail_out=h-l,l&&i.arraySet(d.output,d.output,c,l,0),this.onData(p)):this.onData(i.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(m=!0)}while((d.avail_in>0||0===d.avail_out)&&r!==o.Z_STREAM_END);return r===o.Z_STREAM_END&&(s=o.Z_FINISH),s===o.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===o.Z_OK):s!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),d.avail_out=0,!0)},p.prototype.onData=function(e){this.chunks.push(e)},p.prototype.onEnd=function(e){e===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=p,t.inflate=d,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,d(e,t)},t.ungzip=d},function(e,t,r){"use strict";var n=r(20),i=r(113),a=r(114),o=r(238),s=r(239);function c(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function l(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function u(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):-2}function p(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,u(e)):-2}function d(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,p(e))):-2}function h(e,t){var r,n;return e?(n=new l,e.state=n,n.window=null,0!==(r=d(e,t))&&(e.state=null),r):-2}var f,m,v=!0;function g(e){if(v){var t;for(f=new n.Buf32(512),m=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,f,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,m,0,e.work,{bits:5}),v=!1}e.lencode=f,e.lenbits=9,e.distcode=m,e.distbits=5}function b(e,t,r,i){var a,o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(n.arraySet(o.window,t,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((a=o.wsize-o.wnext)>i&&(a=i),n.arraySet(o.window,t,r-i,a,o.wnext),(i-=a)?(n.arraySet(o.window,t,r-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,r.check=a(r.check,N,2,0),m=0,v=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&m)<<8)+(m>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&m)){e.msg="unknown compression method",r.mode=30;break}if(v-=4,I=8+(15&(m>>>=4)),0===r.wbits)r.wbits=I;else if(I>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(N[0]=255&m,N[1]=m>>>8&255,r.check=a(r.check,N,2,0)),m=0,v=0,r.mode=3;case 3:for(;v<32;){if(0===h)break e;h--,m+=l[p++]<>>8&255,N[2]=m>>>16&255,N[3]=m>>>24&255,r.check=a(r.check,N,4,0)),m=0,v=0,r.mode=4;case 4:for(;v<16;){if(0===h)break e;h--,m+=l[p++]<>8),512&r.flags&&(N[0]=255&m,N[1]=m>>>8&255,r.check=a(r.check,N,2,0)),m=0,v=0,r.mode=5;case 5:if(1024&r.flags){for(;v<16;){if(0===h)break e;h--,m+=l[p++]<>>8&255,r.check=a(r.check,N,2,0)),m=0,v=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((w=r.length)>h&&(w=h),w&&(r.head&&(I=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,l,p,w,I)),512&r.flags&&(r.check=a(r.check,l,w,p)),h-=w,p+=w,r.length-=w),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===h)break e;w=0;do{I=l[p+w++],r.head&&I&&r.length<65536&&(r.head.name+=String.fromCharCode(I))}while(I&&w>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;v<32;){if(0===h)break e;h--,m+=l[p++]<>>=7&v,v-=7&v,r.mode=27;break}for(;v<3;){if(0===h)break e;h--,m+=l[p++]<>>=1)){case 0:r.mode=14;break;case 1:if(g(r),r.mode=20,6===t){m>>>=2,v-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}m>>>=2,v-=2;break;case 14:for(m>>>=7&v,v-=7&v;v<32;){if(0===h)break e;h--,m+=l[p++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&m,m=0,v=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(w=r.length){if(w>h&&(w=h),w>f&&(w=f),0===w)break e;n.arraySet(u,l,p,w,d),h-=w,p+=w,f-=w,d+=w,r.length-=w;break}r.mode=12;break;case 17:for(;v<14;){if(0===h)break e;h--,m+=l[p++]<>>=5,v-=5,r.ndist=1+(31&m),m>>>=5,v-=5,r.ncode=4+(15&m),m>>>=4,v-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,v-=3}for(;r.have<19;)r.lens[j[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,P={bits:r.lenbits},R=s(0,r.lens,0,19,r.lencode,0,r.work,P),r.lenbits=P.bits,R){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,k=65535&T,!((_=T>>>24)<=v);){if(0===h)break e;h--,m+=l[p++]<>>=_,v-=_,r.lens[r.have++]=k;else{if(16===k){for(F=_+2;v>>=_,v-=_,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}I=r.lens[r.have-1],w=3+(3&m),m>>>=2,v-=2}else if(17===k){for(F=_+3;v>>=_)),m>>>=3,v-=3}else{for(F=_+7;v>>=_)),m>>>=7,v-=7}if(r.have+w>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;w--;)r.lens[r.have++]=I}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,P={bits:r.lenbits},R=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,P),r.lenbits=P.bits,R){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,P={bits:r.distbits},R=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,P),r.distbits=P.bits,R){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(h>=6&&f>=258){e.next_out=d,e.avail_out=f,e.next_in=p,e.avail_in=h,r.hold=m,r.bits=v,o(e,x),d=e.next_out,u=e.output,f=e.avail_out,p=e.next_in,l=e.input,h=e.avail_in,m=r.hold,v=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;S=(T=r.lencode[m&(1<>>16&255,k=65535&T,!((_=T>>>24)<=v);){if(0===h)break e;h--,m+=l[p++]<>C)])>>>16&255,k=65535&T,!(C+(_=T>>>24)<=v);){if(0===h)break e;h--,m+=l[p++]<>>=C,v-=C,r.back+=C}if(m>>>=_,v-=_,r.back+=_,r.length=k,0===S){r.mode=26;break}if(32&S){r.back=-1,r.mode=12;break}if(64&S){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&S,r.mode=22;case 22:if(r.extra){for(F=r.extra;v>>=r.extra,v-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;S=(T=r.distcode[m&(1<>>16&255,k=65535&T,!((_=T>>>24)<=v);){if(0===h)break e;h--,m+=l[p++]<>C)])>>>16&255,k=65535&T,!(C+(_=T>>>24)<=v);){if(0===h)break e;h--,m+=l[p++]<>>=C,v-=C,r.back+=C}if(m>>>=_,v-=_,r.back+=_,64&S){e.msg="invalid distance code",r.mode=30;break}r.offset=k,r.extra=15&S,r.mode=24;case 24:if(r.extra){for(F=r.extra;v>>=r.extra,v-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===f)break e;if(w=x-f,r.offset>w){if((w=r.offset-w)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}w>r.wnext?(w-=r.wnext,E=r.wsize-w):E=r.wnext-w,w>r.length&&(w=r.length),D=r.window}else D=u,E=d-r.offset,w=r.length;w>f&&(w=f),f-=w,r.length-=w;do{u[d++]=D[E++]}while(--w);0===r.length&&(r.mode=21);break;case 26:if(0===f)break e;u[d++]=r.length,f--,r.mode=21;break;case 27:if(r.wrap){for(;v<32;){if(0===h)break e;h--,m|=l[p++]<>>=x=y>>>24,f-=x,0===(x=y>>>16&255))k[a++]=65535&y;else{if(!(16&x)){if(0==(64&x)){y=m[(65535&y)+(h&(1<>>=x,f-=x),f<15&&(h+=S[n++]<>>=x=y>>>24,f-=x,!(16&(x=y>>>16&255))){if(0==(64&x)){y=v[(65535&y)+(h&(1<c){e.msg="invalid distance too far back",r.mode=30;break e}if(h>>>=x,f-=x,E>(x=a-o)){if((x=E-x)>u&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(D=0,_=d,0===p){if(D+=l-x,x2;)k[a++]=_[D++],k[a++]=_[D++],k[a++]=_[D++],w-=3;w&&(k[a++]=_[D++],w>1&&(k[a++]=_[D++]))}else{D=a-E;do{k[a++]=k[D++],k[a++]=k[D++],k[a++]=k[D++],w-=3}while(w>2);w&&(k[a++]=k[D++],w>1&&(k[a++]=k[D++]))}break}}break}}while(n>3,h&=(1<<(f-=w<<3))-1,e.next_in=n,e.next_out=a,e.avail_in=n=1&&0===N[k];k--);if(C>k&&(C=k),0===k)return l[u++]=20971520,l[u++]=20971520,d.bits=1,0;for(S=1;S0&&(0===e||1!==k))return-1;for(j[1]=0,D=1;D<15;D++)j[D+1]=j[D]+N[D];for(_=0;_852||2===e&&R>592)return 1;for(;;){y=D-O,p[_]b?(x=L[$+p[_]],w=F[T+p[_]]):(x=96,w=0),h=1<>O)+(f-=h)]=y<<24|x<<16|w|0}while(0!==f);for(h=1<>=1;if(0!==h?(P&=h-1,P+=h):P=0,_++,0==--N[D]){if(D===k)break;D=t[r+p[_]]}if(D>C&&(P&v)!==m){for(0===O&&(O=C),g+=S,I=1<<(A=D-O);A+O852||2===e&&R>592)return 1;l[m=P&v]=C<<24|A<<16|g-u|0}}return 0!==P&&(l[g+P]=D-O<<24|64<<16|0),d.bits=C,0}},function(e,t,r){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},function(e,t,r){"use strict";var n=r(3),i=r(10),a=r(29),o=r(69),s=r(118),c=function(e,t){var r,n="";for(r=0;r>>=8;return n},l=function(e,t,r,i,l,u){var p,d,h=e.file,f=e.compression,m=u!==a.utf8encode,v=n.transformTo("string",u(h.name)),g=n.transformTo("string",a.utf8encode(h.name)),b=h.comment,y=n.transformTo("string",u(b)),x=n.transformTo("string",a.utf8encode(b)),w=g.length!==h.name.length,E=x.length!==b.length,D="",_="",S="",k=h.dir,C=h.date,A={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(A.crc32=e.crc32,A.compressedSize=e.compressedSize,A.uncompressedSize=e.uncompressedSize);var O=0;t&&(O|=8),m||!w&&!E||(O|=2048);var I,R,P,F=0,T=0;k&&(F|=16),"UNIX"===l?(T=798,F|=(I=h.unixPermissions,R=k,P=I,I||(P=R?16893:33204),(65535&P)<<16)):(T=20,F|=63&(h.dosPermissions||0)),p=C.getUTCHours(),p<<=6,p|=C.getUTCMinutes(),p<<=5,p|=C.getUTCSeconds()/2,d=C.getUTCFullYear()-1980,d<<=4,d|=C.getUTCMonth()+1,d<<=5,d|=C.getUTCDate(),w&&(_=c(1,1)+c(o(v),4)+g,D+="up"+c(_.length,2)+_),E&&(S=c(1,1)+c(o(y),4)+x,D+="uc"+c(S.length,2)+S);var N="";return N+="\n\0",N+=c(O,2),N+=f.magic,N+=c(p,2),N+=c(d,2),N+=c(A.crc32,4),N+=c(A.compressedSize,4),N+=c(A.uncompressedSize,4),N+=c(v.length,2),N+=c(D.length,2),{fileRecord:s.LOCAL_FILE_HEADER+N+v+D,dirRecord:s.CENTRAL_FILE_HEADER+c(T,2)+N+c(y.length,2)+"\0\0\0\0"+c(F,4)+c(i,4)+v+D+y}},u=function(e){return s.DATA_DESCRIPTOR+c(e.crc32,4)+c(e.compressedSize,4)+c(e.uncompressedSize,4)};function p(e,t,r,n){i.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(p,i),p.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,i.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},p.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=l(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},p.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=l(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:u(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},p.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e0)this.isSignature(t,a.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=n(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=c},function(e,t,r){"use strict";var n=r(121);function i(e){n.call(this,e)}r(3).inherits(i,n),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=i},function(e,t,r){"use strict";var n=r(122);function i(e){n.call(this,e)}r(3).inherits(i,n),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},e.exports=i},function(e,t,r){"use strict";var n=r(119),i=r(3),a=r(68),o=r(69),s=r(29),c=r(112),l=r(18);function u(e,t){this.options=e,this.loadOptions=t}u.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in c)if(c.hasOwnProperty(t)&&c[t].magic===e)return c[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===e&&(this.dosPermissions=63&this.externalFileAttributes),3===e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,r,n,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4e&&(r.length=e)}return function(e,t){r[n++]=e,r[n++]=t,2===n&&p.nextTick(i)}}function x(e,t){var r,n,i,a,s=0;if(!e)throw w("Invalid argument");var l=e[p.Symbol.iterator];if(f(l))n=l.call(e);else{if(!f(e.next)){if(m(e,o)){for(r=e.length;sObject.create(null);delete r.c[__filename];const g=n.dirname(e.parent&&e.parent.filename||"."),b="__internal__.migrations.version";class y{constructor(e){e={configName:"config",fileExtension:"json",projectSuffix:"nodejs",clearInvalidConfig:!0,serialize:e=>JSON.stringify(e,null,"\t"),deserialize:JSON.parse,accessPropertiesByDotNotation:!0,...e};const r=m(()=>{const e=l.sync({cwd:g});return e&&JSON.parse(t.readFileSync(e,"utf8"))||{}});if(!e.cwd){if(e.projectName||(e.projectName=r().name),!e.projectName)throw new Error("Project name could not be inferred. Please specify the `projectName` option.");e.cwd=u(e.projectName,{suffix:e.projectSuffix}).config}if(this._options=e,this._defaultValues={},e.schema){if("object"!=typeof e.schema)throw new TypeError("The `schema` option must be an object.");const t=new d({allErrors:!0,format:"full",useDefaults:!0,errorDataPath:"property"}),r={type:"object",properties:e.schema};this._validator=t.compile(r);for(const[t,r]of Object.entries(e.schema))r&&r.default&&(this._defaultValues[t]=r.default)}e.defaults&&(this._defaultValues={...this._defaultValues,...e.defaults}),this.events=new o,this.encryptionKey=e.encryptionKey,this.serialize=e.serialize,this.deserialize=e.deserialize;const i=e.fileExtension?"."+e.fileExtension:"";this.path=n.resolve(e.cwd,`${e.configName}${i}`);const s=this.store,c=Object.assign(v(),e.defaults,s);this._validate(c);try{a.deepEqual(s,c)}catch(e){this.store=c}if(e.watch&&this._watch(),e.migrations){if(e.projectVersion||(e.projectVersion=r().version),!e.projectVersion)throw new Error("Project version could not be inferred. Please specify the `projectVersion` option.");this._migrate(e.migrations,e.projectVersion)}}_validate(e){if(!this._validator)return;if(!this._validator(e)){const e=this._validator.errors.reduce((e,{dataPath:t,message:r})=>e+` \`${t.slice(1)}\` ${r};`,"");throw new Error("Config schema violation:"+e.slice(0,-1))}}_ensureDirectory(){c.sync(n.dirname(this.path))}_write(e){let r=this.serialize(e);if(this.encryptionKey){const e=i.randomBytes(16),t=i.pbkdf2Sync(this.encryptionKey,e.toString(),1e4,32,"sha512"),n=i.createCipheriv("aes-256-cbc",t,e);r=Buffer.concat([e,Buffer.from(":"),n.update(Buffer.from(r)),n.final()])}if(process.env.SNAP)t.writeFileSync(this.path,r);else try{p.sync(this.path,r)}catch(e){if("EXDEV"===e.code)return void t.writeFileSync(this.path,r);throw e}}_watch(){this._ensureDirectory(),t.existsSync(this.path)||this._write({}),t.watch(this.path,{persistent:!1},h(()=>{this.events.emit("change")},{wait:100}))}_migrate(e,t){let r=this._get(b,"0.0.0");const n=Object.keys(e).filter(e=>this._shouldPerformMigration(e,r,t));let i={...this.store};for(const t of n)try{(0,e[t])(this),this._set(b,t),r=t,i={...this.store}}catch(e){throw this.store=i,new Error("Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. "+e)}!this._isVersionInRangeFormat(r)&&f.eq(r,t)||this._set(b,t)}_containsReservedKey(e){if("object"==typeof e){if("__internal__"===Object.keys(e)[0])return!0}return"string"==typeof e&&(!!this._options.accessPropertiesByDotNotation&&!!e.startsWith("__internal__."))}_isVersionInRangeFormat(e){return null===f.clean(e)}_shouldPerformMigration(e,t,r){return this._isVersionInRangeFormat(e)?("0.0.0"===t||!f.satisfies(t,e))&&f.satisfies(r,e):!f.lte(e,t)&&!f.gt(e,r)}_get(e,t){return s.get(this.store,e,t)}_set(e,t){const{store:r}=this;s.set(r,e,t),this.store=r}get(e,t){return this._options.accessPropertiesByDotNotation?s.get(this.store,e,t):e in this.store?this.store[e]:t}set(e,t){if("string"!=typeof e&&"object"!=typeof e)throw new TypeError("Expected `key` to be of type `string` or `object`, got "+typeof e);if("object"!=typeof e&&void 0===t)throw new TypeError("Use `delete()` to clear values");if(this._containsReservedKey(e))throw new TypeError("Please don't use the __internal__ key, as it's used to manage this module internal operations.");const{store:r}=this,n=(e,t)=>{((e,t)=>{const r=typeof t;if(["undefined","symbol","function"].includes(r))throw new TypeError(`Setting a value of type \`${r}\` for key \`${e}\` is not allowed as it's not supported by JSON`)})(e,t),this._options.accessPropertiesByDotNotation?s.set(r,e,t):r[e]=t};if("object"==typeof e){const t=e;for(const[e,r]of Object.entries(t))n(e,r)}else n(e,t);this.store=r}has(e){return this._options.accessPropertiesByDotNotation?s.has(this.store,e):e in this.store}reset(...e){for(const t of e)this._defaultValues[t]&&this.set(t,this._defaultValues[t])}delete(e){const{store:t}=this;this._options.accessPropertiesByDotNotation?s.delete(t,e):delete t[e],this.store=t}clear(){this.store=v()}onDidChange(e,t){if("string"!=typeof e)throw new TypeError("Expected `key` to be of type `string`, got "+typeof e);if("function"!=typeof t)throw new TypeError("Expected `callback` to be of type `function`, got "+typeof t);return this.handleChange(()=>this.get(e),t)}onDidAnyChange(e){if("function"!=typeof e)throw new TypeError("Expected `callback` to be of type `function`, got "+typeof e);return this.handleChange(()=>this.store,e)}handleChange(e,t){let r=e();const n=()=>{const n=r,i=e();try{a.deepEqual(i,n)}catch(e){r=i,t.call(this,i,n)}};return this.events.on("change",n),()=>this.events.removeListener("change",n)}get size(){return Object.keys(this.store).length}get store(){try{let e=t.readFileSync(this.path,this.encryptionKey?null:"utf8");if(this.encryptionKey)try{if(":"===e.slice(16,17).toString()){const t=e.slice(0,16),r=i.pbkdf2Sync(this.encryptionKey,t.toString(),1e4,32,"sha512"),n=i.createDecipheriv("aes-256-cbc",r,t);e=Buffer.concat([n.update(e.slice(17)),n.final()])}else{const t=i.createDecipher("aes-256-cbc",this.encryptionKey);e=Buffer.concat([t.update(e),t.final()])}}catch(e){}return e=this.deserialize(e),this._validate(e),Object.assign(v(),e)}catch(e){if("ENOENT"===e.code)return this._ensureDirectory(),v();if(this._options.clearInvalidConfig&&"SyntaxError"===e.name)return v();throw e}}set store(e){this._ensureDirectory(),this._validate(e),this._write(e),this.events.emit("change")}*[Symbol.iterator](){for(const[e,t]of Object.entries(this.store))yield[e,t]}}e.exports=y}).call(this,r(58)(e))},function(e,t,r){"use strict";const n=r(254),i=["__proto__","prototype","constructor"];function a(e){const t=e.split("."),r=[];for(let e=0;ei.includes(e))?[]:r}e.exports={get(e,t,r){if(!n(e)||"string"!=typeof t)return void 0===r?e:r;const i=a(t);if(0!==i.length){for(let t=0;t{const t=typeof e;return null!==e&&("object"===t||"function"===t)}},function(e,t,r){"use strict";const n=r(2),i=r(0),{promisify:a}=r(9),o=r(123).satisfies(process.version,">=10.12.0"),s=e=>{if("win32"===process.platform){if(/[<>:"|?*]/.test(e.replace(i.parse(e).root,""))){const t=new Error("Path contains invalid characters: "+e);throw t.code="EINVAL",t}}},c=e=>({...{mode:511,fs:n},...e}),l=e=>{const t=new Error(`operation not permitted, mkdir '${e}'`);return t.code="EPERM",t.errno=-4048,t.path=e,t.syscall="mkdir",t};e.exports=async(e,t)=>{s(e),t=c(t);const r=a(t.fs.mkdir),u=a(t.fs.stat);if(o&&t.fs.mkdir===n.mkdir){const n=i.resolve(e);return await r(n,{mode:t.mode,recursive:!0}),n}const p=async e=>{try{return await r(e,t.mode),e}catch(t){if("EPERM"===t.code)throw t;if("ENOENT"===t.code){if(i.dirname(e)===e)throw l(e);if(t.message.includes("null bytes"))throw t;return await p(i.dirname(e)),p(e)}try{if(!(await u(e)).isDirectory())throw new Error("The path is not a directory")}catch(e){throw t}return e}};return p(i.resolve(e))},e.exports.sync=(e,t)=>{if(s(e),t=c(t),o&&t.fs.mkdirSync===n.mkdirSync){const r=i.resolve(e);return n.mkdirSync(r,{mode:t.mode,recursive:!0}),r}const r=e=>{try{t.fs.mkdirSync(e,t.mode)}catch(n){if("EPERM"===n.code)throw n;if("ENOENT"===n.code){if(i.dirname(e)===e)throw l(e);if(n.message.includes("null bytes"))throw n;return r(i.dirname(e)),r(e)}try{if(!t.fs.statSync(e).isDirectory())throw new Error("The path is not a directory")}catch(e){throw n}}return e};return r(i.resolve(e))}},function(e,t,r){"use strict";const n=r(257);e.exports=async({cwd:e}={})=>n("package.json",{cwd:e}),e.exports.sync=({cwd:e}={})=>n.sync("package.json",{cwd:e})},function(e,t,r){"use strict";const n=r(0),i=r(258);e.exports=(e,t={})=>{const r=n.resolve(t.cwd||""),{root:a}=n.parse(r),o=[].concat(e);return new Promise(e=>{!function t(r){i(o,{cwd:r}).then(i=>{i?e(n.join(r,i)):r===a?e(null):t(n.dirname(r))})}(r)})},e.exports.sync=(e,t={})=>{let r=n.resolve(t.cwd||"");const{root:a}=n.parse(r),o=[].concat(e);for(;;){const e=i.sync(o,{cwd:r});if(e)return n.join(r,e);if(r===a)return null;r=n.dirname(r)}}},function(e,t,r){"use strict";const n=r(0),i=r(259),a=r(260);e.exports=(e,t)=>(t=Object.assign({cwd:process.cwd()},t),a(e,e=>i(n.resolve(t.cwd,e)),t)),e.exports.sync=(e,t)=>{t=Object.assign({cwd:process.cwd()},t);for(const r of e)if(i.sync(n.resolve(t.cwd,r)))return r}},function(e,t,r){"use strict";const n=r(2);e.exports=e=>new Promise(t=>{n.access(e,e=>{t(!e)})}),e.exports.sync=e=>{try{return n.accessSync(e),!0}catch(e){return!1}}},function(e,t,r){"use strict";const n=r(261);class i extends Error{constructor(e){super(),this.value=e}}const a=(e,t)=>Promise.resolve(e).then(t),o=e=>Promise.all(e).then(e=>!0===e[1]&&Promise.reject(new i(e[0])));e.exports=(e,t,r)=>{r=Object.assign({concurrency:1/0,preserveOrder:!0},r);const s=n(r.concurrency),c=[...e].map(e=>[e,s(a,e,t)]),l=n(r.preserveOrder?1:1/0);return Promise.all(c.map(e=>l(o,e))).then(()=>{}).catch(e=>e instanceof i?e.value:Promise.reject(e))}},function(e,t,r){"use strict";const n=r(262),i=e=>{if(!Number.isInteger(e)&&e!==1/0||!(e>0))return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));const t=[];let r=0;const i=()=>{r--,t.length>0&&t.shift()()},a=(e,t,...a)=>{r++;const o=n(e,...a);t(o),o.then(i,i)},o=(n,...i)=>new Promise(o=>((n,i,...o)=>{rr},pendingCount:{get:()=>t.length},clearQueue:{value:()=>{t.length=0}}}),o};e.exports=i,e.exports.default=i},function(e,t,r){"use strict";const n=(e,...t)=>new Promise(r=>{r(e(...t))});e.exports=n,e.exports.default=n},function(e,t,r){"use strict";const n=r(0),i=r(37),a=i.homedir(),o=i.tmpdir(),{env:s}=process,c=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected string, got "+typeof e);return(t=Object.assign({suffix:"nodejs"},t)).suffix&&(e+="-"+t.suffix),"darwin"===process.platform?(e=>{const t=n.join(a,"Library");return{data:n.join(t,"Application Support",e),config:n.join(t,"Preferences",e),cache:n.join(t,"Caches",e),log:n.join(t,"Logs",e),temp:n.join(o,e)}})(e):"win32"===process.platform?(e=>{const t=s.APPDATA||n.join(a,"AppData","Roaming"),r=s.LOCALAPPDATA||n.join(a,"AppData","Local");return{data:n.join(r,e,"Data"),config:n.join(t,e,"Config"),cache:n.join(r,e,"Cache"),log:n.join(r,e,"Log"),temp:n.join(o,e)}})(e):(e=>{const t=n.basename(a);return{data:n.join(s.XDG_DATA_HOME||n.join(a,".local","share"),e),config:n.join(s.XDG_CONFIG_HOME||n.join(a,".config"),e),cache:n.join(s.XDG_CACHE_HOME||n.join(a,".cache"),e),log:n.join(s.XDG_STATE_HOME||n.join(a,".local","state"),e),temp:n.join(o,t,e)}})(e)};e.exports=c,e.exports.default=c},function(e,t,r){"use strict";e.exports=function(e,t,r,i){r instanceof Function&&(i=r,r={});const p=async function(e,t,r={}){"string"==typeof r&&(r={encoding:r});let i,p;const d=a(f(()=>p)),v=o.resolve(e);try{await function(e){return new Promise(t=>{u[e]||(u[e]=[]),u[e].push(t),1===u[e].length&&t()})}(v);const a=await l(n.realpath)(e).catch(()=>e);if(p=h(a),!r.mode||!r.chown){const e=await l(n.stat)(a).catch(()=>{});e&&(null==r.mode&&(r.mode=e.mode),null==r.chown&&process.getuid&&(r.chown={uid:e.uid,gid:e.gid}))}i=await l(n.open)(p,"w",r.mode),r.tmpfileCreated&&await r.tmpfileCreated(p),s(t)&&(t=c(t)),Buffer.isBuffer(t)?await l(n.write)(i,t,0,t.length,0):null!=t&&await l(n.write)(i,String(t),0,String(r.encoding||"utf8")),!1!==r.fsync&&await l(n.fsync)(i),await l(n.close)(i),i=null,r.chown&&await l(n.chown)(p,r.chown.uid,r.chown.gid).catch(e=>{if(!m(e))throw e}),r.mode&&await l(n.chmod)(p,r.mode).catch(e=>{if(!m(e))throw e}),await l(n.rename)(p,a)}finally{i&&await l(n.close)(i).catch(()=>{}),d(),await l(n.unlink)(p).catch(()=>{}),u[v].shift(),u[v].length>0?u[v][0]():delete u[v]}}(e,t,r);i&&p.then(i,i);return p},e.exports.sync=function(e,t,r){"string"==typeof r?r={encoding:r}:r||(r={});try{e=n.realpathSync(e)}catch(e){}const i=h(e);if(!r.mode||!r.chown)try{const t=n.statSync(e);(r=Object.assign({},r)).mode||(r.mode=t.mode),!r.chown&&process.getuid&&(r.chown={uid:t.uid,gid:t.gid})}catch(e){}let o;const l=f(i),u=a(l);let p=!0;try{if(o=n.openSync(i,"w",r.mode||438),r.tmpfileCreated&&r.tmpfileCreated(i),s(t)&&(t=c(t)),Buffer.isBuffer(t)?n.writeSync(o,t,0,t.length,0):null!=t&&n.writeSync(o,String(t),0,String(r.encoding||"utf8")),!1!==r.fsync&&n.fsyncSync(o),n.closeSync(o),o=null,r.chown)try{n.chownSync(i,r.chown.uid,r.chown.gid)}catch(e){if(!m(e))throw e}if(r.mode)try{n.chmodSync(i,r.mode)}catch(e){if(!m(e))throw e}n.renameSync(i,e),p=!1}finally{if(o)try{n.closeSync(o)}catch(e){}u(),p&&l()}},e.exports._getTmpname=h,e.exports._cleanupOnExit=f;const n=r(2),i=r(265),a=r(266),o=r(0),s=r(124),c=r(268),{promisify:l}=r(9),u={},p=function(){try{return r(269).threadId}catch(e){return 0}}();let d=0;function h(e){return e+"."+i(__filename).hash(String(process.pid)).hash(String(p)).hash(String(++d)).result()}function f(e){return()=>{try{n.unlinkSync("function"==typeof e?e():e)}catch(e){}}}function m(e){if("ENOSYS"===e.code)return!0;return!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code)}},function(e,t,r){ +async function _spawn(exe, args) { + return new Promise((resolve, reject) => { + try { + const process = child_process_1.spawn(exe, args, { + detached: true, + stdio: "ignore", + }); + process.on("error", error => { + reject(error); + }); + process.unref(); + if (process.pid !== undefined) { + resolve(true); + } + } + catch (error) { + reject(error); + } + }); +} +//# sourceMappingURL=NsisUpdater.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/out/differentialDownloader/DataSplitter.js": +/*!**********************************************************************************!*\ + !*** ./node_modules/electron-updater/out/differentialDownloader/DataSplitter.js ***! + \**********************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DataSplitter = exports.copyData = void 0; +const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); +const fs_1 = __webpack_require__(/*! fs */ "fs"); +const stream_1 = __webpack_require__(/*! stream */ "stream"); +const downloadPlanBuilder_1 = __webpack_require__(/*! ./downloadPlanBuilder */ "./node_modules/electron-updater/out/differentialDownloader/downloadPlanBuilder.js"); +const DOUBLE_CRLF = Buffer.from("\r\n\r\n"); +var ReadState; +(function (ReadState) { + ReadState[ReadState["INIT"] = 0] = "INIT"; + ReadState[ReadState["HEADER"] = 1] = "HEADER"; + ReadState[ReadState["BODY"] = 2] = "BODY"; +})(ReadState || (ReadState = {})); +function copyData(task, out, oldFileFd, reject, resolve) { + const readStream = fs_1.createReadStream("", { + fd: oldFileFd, + autoClose: false, + start: task.start, + // end is inclusive + end: task.end - 1, + }); + readStream.on("error", reject); + readStream.once("end", resolve); + readStream.pipe(out, { + end: false, + }); +} +exports.copyData = copyData; +class DataSplitter extends stream_1.Writable { + constructor(out, options, partIndexToTaskIndex, boundary, partIndexToLength, finishHandler) { + super(); + this.out = out; + this.options = options; + this.partIndexToTaskIndex = partIndexToTaskIndex; + this.partIndexToLength = partIndexToLength; + this.finishHandler = finishHandler; + this.partIndex = -1; + this.headerListBuffer = null; + this.readState = ReadState.INIT; + this.ignoreByteCount = 0; + this.remainingPartDataCount = 0; + this.actualPartLength = 0; + this.boundaryLength = boundary.length + 4; /* size of \r\n-- */ + // first chunk doesn't start with \r\n + this.ignoreByteCount = this.boundaryLength - 2; + } + get isFinished() { + return this.partIndex === this.partIndexToLength.length; + } + // noinspection JSUnusedGlobalSymbols + _write(data, encoding, callback) { + if (this.isFinished) { + console.error(`Trailing ignored data: ${data.length} bytes`); + return; + } + this.handleData(data).then(callback).catch(callback); + } + async handleData(chunk) { + let start = 0; + if (this.ignoreByteCount !== 0 && this.remainingPartDataCount !== 0) { + throw builder_util_runtime_1.newError("Internal error", "ERR_DATA_SPLITTER_BYTE_COUNT_MISMATCH"); + } + if (this.ignoreByteCount > 0) { + const toIgnore = Math.min(this.ignoreByteCount, chunk.length); + this.ignoreByteCount -= toIgnore; + start = toIgnore; + } + else if (this.remainingPartDataCount > 0) { + const toRead = Math.min(this.remainingPartDataCount, chunk.length); + this.remainingPartDataCount -= toRead; + await this.processPartData(chunk, 0, toRead); + start = toRead; + } + if (start === chunk.length) { + return; + } + if (this.readState === ReadState.HEADER) { + const headerListEnd = this.searchHeaderListEnd(chunk, start); + if (headerListEnd === -1) { + return; + } + start = headerListEnd; + this.readState = ReadState.BODY; + // header list is ignored, we don't need it + this.headerListBuffer = null; + } + while (true) { + if (this.readState === ReadState.BODY) { + this.readState = ReadState.INIT; + } + else { + this.partIndex++; + let taskIndex = this.partIndexToTaskIndex.get(this.partIndex); + if (taskIndex == null) { + if (this.isFinished) { + taskIndex = this.options.end; + } + else { + throw builder_util_runtime_1.newError("taskIndex is null", "ERR_DATA_SPLITTER_TASK_INDEX_IS_NULL"); + } + } + const prevTaskIndex = this.partIndex === 0 ? this.options.start : this.partIndexToTaskIndex.get(this.partIndex - 1) + 1; /* prev part is download, next maybe copy */ + if (prevTaskIndex < taskIndex) { + await this.copyExistingData(prevTaskIndex, taskIndex); + } + else if (prevTaskIndex > taskIndex) { + throw builder_util_runtime_1.newError("prevTaskIndex must be < taskIndex", "ERR_DATA_SPLITTER_TASK_INDEX_ASSERT_FAILED"); + } + if (this.isFinished) { + this.onPartEnd(); + this.finishHandler(); + return; + } + start = this.searchHeaderListEnd(chunk, start); + if (start === -1) { + this.readState = ReadState.HEADER; + return; + } + } + const partLength = this.partIndexToLength[this.partIndex]; + const end = start + partLength; + const effectiveEnd = Math.min(end, chunk.length); + await this.processPartStarted(chunk, start, effectiveEnd); + this.remainingPartDataCount = partLength - (effectiveEnd - start); + if (this.remainingPartDataCount > 0) { + return; + } + start = end + this.boundaryLength; + if (start >= chunk.length) { + this.ignoreByteCount = this.boundaryLength - (chunk.length - end); + return; + } + } + } + copyExistingData(index, end) { + return new Promise((resolve, reject) => { + const w = () => { + if (index === end) { + resolve(); + return; + } + const task = this.options.tasks[index]; + if (task.kind !== downloadPlanBuilder_1.OperationKind.COPY) { + reject(new Error("Task kind must be COPY")); + return; + } + copyData(task, this.out, this.options.oldFileFd, reject, () => { + index++; + w(); + }); + }; + w(); + }); + } + searchHeaderListEnd(chunk, readOffset) { + const headerListEnd = chunk.indexOf(DOUBLE_CRLF, readOffset); + if (headerListEnd !== -1) { + return headerListEnd + DOUBLE_CRLF.length; + } + // not all headers data were received, save to buffer + const partialChunk = readOffset === 0 ? chunk : chunk.slice(readOffset); + if (this.headerListBuffer == null) { + this.headerListBuffer = partialChunk; + } + else { + this.headerListBuffer = Buffer.concat([this.headerListBuffer, partialChunk]); + } + return -1; + } + onPartEnd() { + const expectedLength = this.partIndexToLength[this.partIndex - 1]; + if (this.actualPartLength !== expectedLength) { + throw builder_util_runtime_1.newError(`Expected length: ${expectedLength} differs from actual: ${this.actualPartLength}`, "ERR_DATA_SPLITTER_LENGTH_MISMATCH"); + } + this.actualPartLength = 0; + } + processPartStarted(data, start, end) { + if (this.partIndex !== 0) { + this.onPartEnd(); + } + return this.processPartData(data, start, end); + } + processPartData(data, start, end) { + this.actualPartLength += end - start; + const out = this.out; + if (out.write(start === 0 && data.length === end ? data : data.slice(start, end))) { + return Promise.resolve(); + } + else { + return new Promise((resolve, reject) => { + out.on("error", reject); + out.once("drain", () => { + out.removeListener("error", reject); + resolve(); + }); + }); + } + } +} +exports.DataSplitter = DataSplitter; +//# sourceMappingURL=DataSplitter.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/out/differentialDownloader/DifferentialDownloader.js": +/*!********************************************************************************************!*\ + !*** ./node_modules/electron-updater/out/differentialDownloader/DifferentialDownloader.js ***! + \********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.DifferentialDownloader = void 0; +const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); +const fs_extra_1 = __webpack_require__(/*! fs-extra */ "./node_modules/fs-extra/lib/index.js"); +const fs_1 = __webpack_require__(/*! fs */ "fs"); +const DataSplitter_1 = __webpack_require__(/*! ./DataSplitter */ "./node_modules/electron-updater/out/differentialDownloader/DataSplitter.js"); +const url_1 = __webpack_require__(/*! url */ "url"); +const downloadPlanBuilder_1 = __webpack_require__(/*! ./downloadPlanBuilder */ "./node_modules/electron-updater/out/differentialDownloader/downloadPlanBuilder.js"); +const multipleRangeDownloader_1 = __webpack_require__(/*! ./multipleRangeDownloader */ "./node_modules/electron-updater/out/differentialDownloader/multipleRangeDownloader.js"); +const ProgressDifferentialDownloadCallbackTransform_1 = __webpack_require__(/*! ./ProgressDifferentialDownloadCallbackTransform */ "./node_modules/electron-updater/out/differentialDownloader/ProgressDifferentialDownloadCallbackTransform.js"); +class DifferentialDownloader { + // noinspection TypeScriptAbstractClassConstructorCanBeMadeProtected + constructor(blockAwareFileInfo, httpExecutor, options) { + this.blockAwareFileInfo = blockAwareFileInfo; + this.httpExecutor = httpExecutor; + this.options = options; + this.fileMetadataBuffer = null; + this.logger = options.logger; + } + createRequestOptions() { + const result = { + headers: { + ...this.options.requestHeaders, + accept: "*/*", + }, + }; + builder_util_runtime_1.configureRequestUrl(this.options.newUrl, result); + // user-agent, cache-control and other common options + builder_util_runtime_1.configureRequestOptions(result); + return result; + } + doDownload(oldBlockMap, newBlockMap) { + // we don't check other metadata like compressionMethod - generic check that it is make sense to differentially update is suitable for it + if (oldBlockMap.version !== newBlockMap.version) { + throw new Error(`version is different (${oldBlockMap.version} - ${newBlockMap.version}), full download is required`); + } + const logger = this.logger; + const operations = downloadPlanBuilder_1.computeOperations(oldBlockMap, newBlockMap, logger); + if (logger.debug != null) { + logger.debug(JSON.stringify(operations, null, 2)); + } + let downloadSize = 0; + let copySize = 0; + for (const operation of operations) { + const length = operation.end - operation.start; + if (operation.kind === downloadPlanBuilder_1.OperationKind.DOWNLOAD) { + downloadSize += length; + } + else { + copySize += length; + } + } + const newSize = this.blockAwareFileInfo.size; + if (downloadSize + copySize + (this.fileMetadataBuffer == null ? 0 : this.fileMetadataBuffer.length) !== newSize) { + throw new Error(`Internal error, size mismatch: downloadSize: ${downloadSize}, copySize: ${copySize}, newSize: ${newSize}`); + } + logger.info(`Full: ${formatBytes(newSize)}, To download: ${formatBytes(downloadSize)} (${Math.round(downloadSize / (newSize / 100))}%)`); + return this.downloadFile(operations); + } + downloadFile(tasks) { + const fdList = []; + const closeFiles = () => { + return Promise.all(fdList.map(openedFile => { + return fs_extra_1.close(openedFile.descriptor).catch(e => { + this.logger.error(`cannot close file "${openedFile.path}": ${e}`); + }); + })); + }; + return this.doDownloadFile(tasks, fdList) + .then(closeFiles) + .catch(e => { + // then must be after catch here (since then always throws error) + return closeFiles() + .catch(closeFilesError => { + // closeFiles never throw error, but just to be sure + try { + this.logger.error(`cannot close files: ${closeFilesError}`); + } + catch (errorOnLog) { + try { + console.error(errorOnLog); + } + catch (ignored) { + // ok, give up and ignore error + } + } + throw e; + }) + .then(() => { + throw e; + }); + }); + } + async doDownloadFile(tasks, fdList) { + const oldFileFd = await fs_extra_1.open(this.options.oldFile, "r"); + fdList.push({ descriptor: oldFileFd, path: this.options.oldFile }); + const newFileFd = await fs_extra_1.open(this.options.newFile, "w"); + fdList.push({ descriptor: newFileFd, path: this.options.newFile }); + const fileOut = fs_1.createWriteStream(this.options.newFile, { fd: newFileFd }); + await new Promise((resolve, reject) => { + const streams = []; + // Create our download info transformer if we have one + let downloadInfoTransform = undefined; + if (!this.options.isUseMultipleRangeRequest && this.options.onProgress) { + // TODO: Does not support multiple ranges (someone feel free to PR this!) + const expectedByteCounts = []; + let grandTotalBytes = 0; + for (const task of tasks) { + if (task.kind === downloadPlanBuilder_1.OperationKind.DOWNLOAD) { + expectedByteCounts.push(task.end - task.start); + grandTotalBytes += task.end - task.start; + } + } + const progressDifferentialDownloadInfo = { + expectedByteCounts: expectedByteCounts, + grandTotal: grandTotalBytes, + }; + downloadInfoTransform = new ProgressDifferentialDownloadCallbackTransform_1.ProgressDifferentialDownloadCallbackTransform(progressDifferentialDownloadInfo, this.options.cancellationToken, this.options.onProgress); + streams.push(downloadInfoTransform); + } + const digestTransform = new builder_util_runtime_1.DigestTransform(this.blockAwareFileInfo.sha512); + // to simply debug, do manual validation to allow file to be fully written + digestTransform.isValidateOnEnd = false; + streams.push(digestTransform); + // noinspection JSArrowFunctionCanBeReplacedWithShorthand + fileOut.on("finish", () => { + ; + fileOut.close(() => { + // remove from fd list because closed successfully + fdList.splice(1, 1); + try { + digestTransform.validate(); + } + catch (e) { + reject(e); + return; + } + resolve(undefined); + }); + }); + streams.push(fileOut); + let lastStream = null; + for (const stream of streams) { + stream.on("error", reject); + if (lastStream == null) { + lastStream = stream; + } + else { + lastStream = lastStream.pipe(stream); + } + } + const firstStream = streams[0]; + let w; + if (this.options.isUseMultipleRangeRequest) { + w = multipleRangeDownloader_1.executeTasksUsingMultipleRangeRequests(this, tasks, firstStream, oldFileFd, reject); + w(0); + return; + } + let downloadOperationCount = 0; + let actualUrl = null; + this.logger.info(`Differential download: ${this.options.newUrl}`); + const requestOptions = this.createRequestOptions(); + requestOptions.redirect = "manual"; + w = (index) => { + var _a, _b; + if (index >= tasks.length) { + if (this.fileMetadataBuffer != null) { + firstStream.write(this.fileMetadataBuffer); + } + firstStream.end(); + return; + } + const operation = tasks[index++]; + if (operation.kind === downloadPlanBuilder_1.OperationKind.COPY) { + // We are copying, let's not send status updates to the UI + if (downloadInfoTransform) { + downloadInfoTransform.beginFileCopy(); + } + DataSplitter_1.copyData(operation, firstStream, oldFileFd, reject, () => w(index)); + return; + } + const range = `bytes=${operation.start}-${operation.end - 1}`; + requestOptions.headers.range = range; + (_b = (_a = this.logger) === null || _a === void 0 ? void 0 : _a.debug) === null || _b === void 0 ? void 0 : _b.call(_a, `download range: ${range}`); + // We are starting to download + if (downloadInfoTransform) { + downloadInfoTransform.beginRangeDownload(); + } + const request = this.httpExecutor.createRequest(requestOptions, response => { + // Electron net handles redirects automatically, our NodeJS test server doesn't use redirects - so, we don't check 3xx codes. + if (response.statusCode >= 400) { + reject(builder_util_runtime_1.createHttpError(response)); + } + response.pipe(firstStream, { + end: false, + }); + response.once("end", () => { + // Pass on that we are downloading a segment + if (downloadInfoTransform) { + downloadInfoTransform.endRangeDownload(); + } + if (++downloadOperationCount === 100) { + downloadOperationCount = 0; + setTimeout(() => w(index), 1000); + } + else { + w(index); + } + }); + }); + request.on("redirect", (statusCode, method, redirectUrl) => { + this.logger.info(`Redirect to ${removeQuery(redirectUrl)}`); + actualUrl = redirectUrl; + builder_util_runtime_1.configureRequestUrl(new url_1.URL(actualUrl), requestOptions); + request.followRedirect(); + }); + this.httpExecutor.addErrorAndTimeoutHandlers(request, reject); + request.end(); + }; + w(0); + }); + } + async readRemoteBytes(start, endInclusive) { + const buffer = Buffer.allocUnsafe(endInclusive + 1 - start); + const requestOptions = this.createRequestOptions(); + requestOptions.headers.range = `bytes=${start}-${endInclusive}`; + let position = 0; + await this.request(requestOptions, chunk => { + chunk.copy(buffer, position); + position += chunk.length; + }); + if (position !== buffer.length) { + throw new Error(`Received data length ${position} is not equal to expected ${buffer.length}`); + } + return buffer; + } + request(requestOptions, dataHandler) { + return new Promise((resolve, reject) => { + const request = this.httpExecutor.createRequest(requestOptions, response => { + if (!multipleRangeDownloader_1.checkIsRangesSupported(response, reject)) { + return; + } + response.on("data", dataHandler); + response.on("end", () => resolve()); + }); + this.httpExecutor.addErrorAndTimeoutHandlers(request, reject); + request.end(); + }); + } +} +exports.DifferentialDownloader = DifferentialDownloader; +function formatBytes(value, symbol = " KB") { + return new Intl.NumberFormat("en").format((value / 1024).toFixed(2)) + symbol; +} +// safety +function removeQuery(url) { + const index = url.indexOf("?"); + return index < 0 ? url : url.substring(0, index); +} +//# sourceMappingURL=DifferentialDownloader.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/out/differentialDownloader/FileWithEmbeddedBlockMapDifferentialDownloader.js": +/*!********************************************************************************************************************!*\ + !*** ./node_modules/electron-updater/out/differentialDownloader/FileWithEmbeddedBlockMapDifferentialDownloader.js ***! + \********************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FileWithEmbeddedBlockMapDifferentialDownloader = void 0; +const fs_extra_1 = __webpack_require__(/*! fs-extra */ "./node_modules/fs-extra/lib/index.js"); +const DifferentialDownloader_1 = __webpack_require__(/*! ./DifferentialDownloader */ "./node_modules/electron-updater/out/differentialDownloader/DifferentialDownloader.js"); +const zlib_1 = __webpack_require__(/*! zlib */ "zlib"); +class FileWithEmbeddedBlockMapDifferentialDownloader extends DifferentialDownloader_1.DifferentialDownloader { + async download() { + const packageInfo = this.blockAwareFileInfo; + const fileSize = packageInfo.size; + const offset = fileSize - (packageInfo.blockMapSize + 4); + this.fileMetadataBuffer = await this.readRemoteBytes(offset, fileSize - 1); + const newBlockMap = readBlockMap(this.fileMetadataBuffer.slice(0, this.fileMetadataBuffer.length - 4)); + await this.doDownload(await readEmbeddedBlockMapData(this.options.oldFile), newBlockMap); + } +} +exports.FileWithEmbeddedBlockMapDifferentialDownloader = FileWithEmbeddedBlockMapDifferentialDownloader; +function readBlockMap(data) { + return JSON.parse(zlib_1.inflateRawSync(data).toString()); +} +async function readEmbeddedBlockMapData(file) { + const fd = await fs_extra_1.open(file, "r"); + try { + const fileSize = (await fs_extra_1.fstat(fd)).size; + const sizeBuffer = Buffer.allocUnsafe(4); + await fs_extra_1.read(fd, sizeBuffer, 0, sizeBuffer.length, fileSize - sizeBuffer.length); + const dataBuffer = Buffer.allocUnsafe(sizeBuffer.readUInt32BE(0)); + await fs_extra_1.read(fd, dataBuffer, 0, dataBuffer.length, fileSize - sizeBuffer.length - dataBuffer.length); + await fs_extra_1.close(fd); + return readBlockMap(dataBuffer); + } + catch (e) { + await fs_extra_1.close(fd); + throw e; + } +} +//# sourceMappingURL=FileWithEmbeddedBlockMapDifferentialDownloader.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/out/differentialDownloader/GenericDifferentialDownloader.js": +/*!***************************************************************************************************!*\ + !*** ./node_modules/electron-updater/out/differentialDownloader/GenericDifferentialDownloader.js ***! + \***************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GenericDifferentialDownloader = void 0; +const DifferentialDownloader_1 = __webpack_require__(/*! ./DifferentialDownloader */ "./node_modules/electron-updater/out/differentialDownloader/DifferentialDownloader.js"); +class GenericDifferentialDownloader extends DifferentialDownloader_1.DifferentialDownloader { + download(oldBlockMap, newBlockMap) { + return this.doDownload(oldBlockMap, newBlockMap); + } +} +exports.GenericDifferentialDownloader = GenericDifferentialDownloader; +//# sourceMappingURL=GenericDifferentialDownloader.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/out/differentialDownloader/ProgressDifferentialDownloadCallbackTransform.js": +/*!*******************************************************************************************************************!*\ + !*** ./node_modules/electron-updater/out/differentialDownloader/ProgressDifferentialDownloadCallbackTransform.js ***! + \*******************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ProgressDifferentialDownloadCallbackTransform = void 0; +const stream_1 = __webpack_require__(/*! stream */ "stream"); +var OperationKind; +(function (OperationKind) { + OperationKind[OperationKind["COPY"] = 0] = "COPY"; + OperationKind[OperationKind["DOWNLOAD"] = 1] = "DOWNLOAD"; +})(OperationKind || (OperationKind = {})); +class ProgressDifferentialDownloadCallbackTransform extends stream_1.Transform { + constructor(progressDifferentialDownloadInfo, cancellationToken, onProgress) { + super(); + this.progressDifferentialDownloadInfo = progressDifferentialDownloadInfo; + this.cancellationToken = cancellationToken; + this.onProgress = onProgress; + this.start = Date.now(); + this.transferred = 0; + this.delta = 0; + this.expectedBytes = 0; + this.index = 0; + this.operationType = OperationKind.COPY; + this.nextUpdate = this.start + 1000; + } + _transform(chunk, encoding, callback) { + if (this.cancellationToken.cancelled) { + callback(new Error("cancelled"), null); + return; + } + // Don't send progress update when copying from disk + if (this.operationType == OperationKind.COPY) { + callback(null, chunk); + return; + } + this.transferred += chunk.length; + this.delta += chunk.length; + const now = Date.now(); + if (now >= this.nextUpdate && + this.transferred !== this.expectedBytes /* will be emitted by endRangeDownload() */ && + this.transferred !== this.progressDifferentialDownloadInfo.grandTotal /* will be emitted on _flush */) { + this.nextUpdate = now + 1000; + this.onProgress({ + total: this.progressDifferentialDownloadInfo.grandTotal, + delta: this.delta, + transferred: this.transferred, + percent: (this.transferred / this.progressDifferentialDownloadInfo.grandTotal) * 100, + bytesPerSecond: Math.round(this.transferred / ((now - this.start) / 1000)), + }); + this.delta = 0; + } + callback(null, chunk); + } + beginFileCopy() { + this.operationType = OperationKind.COPY; + } + beginRangeDownload() { + this.operationType = OperationKind.DOWNLOAD; + this.expectedBytes += this.progressDifferentialDownloadInfo.expectedByteCounts[this.index++]; + } + endRangeDownload() { + // _flush() will doour final 100% + if (this.transferred !== this.progressDifferentialDownloadInfo.grandTotal) { + this.onProgress({ + total: this.progressDifferentialDownloadInfo.grandTotal, + delta: this.delta, + transferred: this.transferred, + percent: (this.transferred / this.progressDifferentialDownloadInfo.grandTotal) * 100, + bytesPerSecond: Math.round(this.transferred / ((Date.now() - this.start) / 1000)), + }); + } + } + // Called when we are 100% done with the connection/download + _flush(callback) { + if (this.cancellationToken.cancelled) { + callback(new Error("cancelled")); + return; + } + this.onProgress({ + total: this.progressDifferentialDownloadInfo.grandTotal, + delta: this.delta, + transferred: this.transferred, + percent: 100, + bytesPerSecond: Math.round(this.transferred / ((Date.now() - this.start) / 1000)), + }); + this.delta = 0; + this.transferred = 0; + callback(null); + } +} +exports.ProgressDifferentialDownloadCallbackTransform = ProgressDifferentialDownloadCallbackTransform; +//# sourceMappingURL=ProgressDifferentialDownloadCallbackTransform.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/out/differentialDownloader/downloadPlanBuilder.js": +/*!*****************************************************************************************!*\ + !*** ./node_modules/electron-updater/out/differentialDownloader/downloadPlanBuilder.js ***! + \*****************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.computeOperations = exports.OperationKind = void 0; +var OperationKind; +(function (OperationKind) { + OperationKind[OperationKind["COPY"] = 0] = "COPY"; + OperationKind[OperationKind["DOWNLOAD"] = 1] = "DOWNLOAD"; +})(OperationKind = exports.OperationKind || (exports.OperationKind = {})); +function computeOperations(oldBlockMap, newBlockMap, logger) { + const nameToOldBlocks = buildBlockFileMap(oldBlockMap.files); + const nameToNewBlocks = buildBlockFileMap(newBlockMap.files); + let lastOperation = null; + // for now only one file is supported in block map + const blockMapFile = newBlockMap.files[0]; + const operations = []; + const name = blockMapFile.name; + const oldEntry = nameToOldBlocks.get(name); + if (oldEntry == null) { + // new file (unrealistic case for now, because in any case both blockmap contain the only file named as "file") + throw new Error(`no file ${name} in old blockmap`); + } + const newFile = nameToNewBlocks.get(name); + let changedBlockCount = 0; + const { checksumToOffset: checksumToOldOffset, checksumToOldSize } = buildChecksumMap(nameToOldBlocks.get(name), oldEntry.offset, logger); + let newOffset = blockMapFile.offset; + for (let i = 0; i < newFile.checksums.length; newOffset += newFile.sizes[i], i++) { + const blockSize = newFile.sizes[i]; + const checksum = newFile.checksums[i]; + let oldOffset = checksumToOldOffset.get(checksum); + if (oldOffset != null && checksumToOldSize.get(checksum) !== blockSize) { + logger.warn(`Checksum ("${checksum}") matches, but size differs (old: ${checksumToOldSize.get(checksum)}, new: ${blockSize})`); + oldOffset = undefined; + } + if (oldOffset === undefined) { + // download data from new file + changedBlockCount++; + if (lastOperation != null && lastOperation.kind === OperationKind.DOWNLOAD && lastOperation.end === newOffset) { + lastOperation.end += blockSize; + } + else { + lastOperation = { + kind: OperationKind.DOWNLOAD, + start: newOffset, + end: newOffset + blockSize, + // oldBlocks: null, + }; + validateAndAdd(lastOperation, operations, checksum, i); + } + } + else { + // reuse data from old file + if (lastOperation != null && lastOperation.kind === OperationKind.COPY && lastOperation.end === oldOffset) { + lastOperation.end += blockSize; + // lastOperation.oldBlocks!!.push(checksum) + } + else { + lastOperation = { + kind: OperationKind.COPY, + start: oldOffset, + end: oldOffset + blockSize, + // oldBlocks: [checksum] + }; + validateAndAdd(lastOperation, operations, checksum, i); + } + } + } + if (changedBlockCount > 0) { + logger.info(`File${blockMapFile.name === "file" ? "" : " " + blockMapFile.name} has ${changedBlockCount} changed blocks`); + } + return operations; +} +exports.computeOperations = computeOperations; +const isValidateOperationRange = process.env.DIFFERENTIAL_DOWNLOAD_PLAN_BUILDER_VALIDATE_RANGES === "true"; +function validateAndAdd(operation, operations, checksum, index) { + if (isValidateOperationRange && operations.length !== 0) { + const lastOperation = operations[operations.length - 1]; + if (lastOperation.kind === operation.kind && operation.start < lastOperation.end && operation.start > lastOperation.start) { + const min = [lastOperation.start, lastOperation.end, operation.start, operation.end].reduce((p, v) => (p < v ? p : v)); + throw new Error(`operation (block index: ${index}, checksum: ${checksum}, kind: ${OperationKind[operation.kind]}) overlaps previous operation (checksum: ${checksum}):\n` + + `abs: ${lastOperation.start} until ${lastOperation.end} and ${operation.start} until ${operation.end}\n` + + `rel: ${lastOperation.start - min} until ${lastOperation.end - min} and ${operation.start - min} until ${operation.end - min}`); + } + } + operations.push(operation); +} +// eslint-disable-next-line @typescript-eslint/explicit-function-return-type +function buildChecksumMap(file, fileOffset, logger) { + const checksumToOffset = new Map(); + const checksumToSize = new Map(); + let offset = fileOffset; + for (let i = 0; i < file.checksums.length; i++) { + const checksum = file.checksums[i]; + const size = file.sizes[i]; + const existing = checksumToSize.get(checksum); + if (existing === undefined) { + checksumToOffset.set(checksum, offset); + checksumToSize.set(checksum, size); + } + else if (logger.debug != null) { + const sizeExplanation = existing === size ? "(same size)" : `(size: ${existing}, this size: ${size})`; + logger.debug(`${checksum} duplicated in blockmap ${sizeExplanation}, it doesn't lead to broken differential downloader, just corresponding block will be skipped)`); + } + offset += size; + } + return { checksumToOffset, checksumToOldSize: checksumToSize }; +} +function buildBlockFileMap(list) { + const result = new Map(); + for (const item of list) { + result.set(item.name, item); + } + return result; +} +//# sourceMappingURL=downloadPlanBuilder.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/out/differentialDownloader/multipleRangeDownloader.js": +/*!*********************************************************************************************!*\ + !*** ./node_modules/electron-updater/out/differentialDownloader/multipleRangeDownloader.js ***! + \*********************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.checkIsRangesSupported = exports.executeTasksUsingMultipleRangeRequests = void 0; +const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); +const DataSplitter_1 = __webpack_require__(/*! ./DataSplitter */ "./node_modules/electron-updater/out/differentialDownloader/DataSplitter.js"); +const downloadPlanBuilder_1 = __webpack_require__(/*! ./downloadPlanBuilder */ "./node_modules/electron-updater/out/differentialDownloader/downloadPlanBuilder.js"); +function executeTasksUsingMultipleRangeRequests(differentialDownloader, tasks, out, oldFileFd, reject) { + const w = (taskOffset) => { + if (taskOffset >= tasks.length) { + if (differentialDownloader.fileMetadataBuffer != null) { + out.write(differentialDownloader.fileMetadataBuffer); + } + out.end(); + return; + } + const nextOffset = taskOffset + 1000; + doExecuteTasks(differentialDownloader, { + tasks, + start: taskOffset, + end: Math.min(tasks.length, nextOffset), + oldFileFd, + }, out, () => w(nextOffset), reject); + }; + return w; +} +exports.executeTasksUsingMultipleRangeRequests = executeTasksUsingMultipleRangeRequests; +function doExecuteTasks(differentialDownloader, options, out, resolve, reject) { + let ranges = "bytes="; + let partCount = 0; + const partIndexToTaskIndex = new Map(); + const partIndexToLength = []; + for (let i = options.start; i < options.end; i++) { + const task = options.tasks[i]; + if (task.kind === downloadPlanBuilder_1.OperationKind.DOWNLOAD) { + ranges += `${task.start}-${task.end - 1}, `; + partIndexToTaskIndex.set(partCount, i); + partCount++; + partIndexToLength.push(task.end - task.start); + } + } + if (partCount <= 1) { + // the only remote range - copy + const w = (index) => { + if (index >= options.end) { + resolve(); + return; + } + const task = options.tasks[index++]; + if (task.kind === downloadPlanBuilder_1.OperationKind.COPY) { + DataSplitter_1.copyData(task, out, options.oldFileFd, reject, () => w(index)); + } + else { + const requestOptions = differentialDownloader.createRequestOptions(); + requestOptions.headers.Range = `bytes=${task.start}-${task.end - 1}`; + const request = differentialDownloader.httpExecutor.createRequest(requestOptions, response => { + if (!checkIsRangesSupported(response, reject)) { + return; + } + response.pipe(out, { + end: false, + }); + response.once("end", () => w(index)); + }); + differentialDownloader.httpExecutor.addErrorAndTimeoutHandlers(request, reject); + request.end(); + } + }; + w(options.start); + return; + } + const requestOptions = differentialDownloader.createRequestOptions(); + requestOptions.headers.Range = ranges.substring(0, ranges.length - 2); + const request = differentialDownloader.httpExecutor.createRequest(requestOptions, response => { + if (!checkIsRangesSupported(response, reject)) { + return; + } + const contentType = builder_util_runtime_1.safeGetHeader(response, "content-type"); + const m = /^multipart\/.+?(?:; boundary=(?:(?:"(.+)")|(?:([^\s]+))))$/i.exec(contentType); + if (m == null) { + reject(new Error(`Content-Type "multipart/byteranges" is expected, but got "${contentType}"`)); + return; + } + const dicer = new DataSplitter_1.DataSplitter(out, options, partIndexToTaskIndex, m[1] || m[2], partIndexToLength, resolve); + dicer.on("error", reject); + response.pipe(dicer); + response.on("end", () => { + setTimeout(() => { + request.abort(); + reject(new Error("Response ends without calling any handlers")); + }, 10000); + }); + }); + differentialDownloader.httpExecutor.addErrorAndTimeoutHandlers(request, reject); + request.end(); +} +function checkIsRangesSupported(response, reject) { + // Electron net handles redirects automatically, our NodeJS test server doesn't use redirects - so, we don't check 3xx codes. + if (response.statusCode >= 400) { + reject(builder_util_runtime_1.createHttpError(response)); + return false; + } + if (response.statusCode !== 206) { + const acceptRanges = builder_util_runtime_1.safeGetHeader(response, "accept-ranges"); + if (acceptRanges == null || acceptRanges === "none") { + reject(new Error(`Server doesn't support Accept-Ranges (response code ${response.statusCode})`)); + return false; + } + } + return true; +} +exports.checkIsRangesSupported = checkIsRangesSupported; +//# sourceMappingURL=multipleRangeDownloader.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/out/electronHttpExecutor.js": +/*!*******************************************************************!*\ + !*** ./node_modules/electron-updater/out/electronHttpExecutor.js ***! + \*******************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ElectronHttpExecutor = exports.getNetSession = exports.NET_SESSION_NAME = void 0; +const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); +exports.NET_SESSION_NAME = "electron-updater"; +function getNetSession() { + return __webpack_require__(/*! electron */ "electron").session.fromPartition(exports.NET_SESSION_NAME, { + cache: false, + }); +} +exports.getNetSession = getNetSession; +class ElectronHttpExecutor extends builder_util_runtime_1.HttpExecutor { + constructor(proxyLoginCallback) { + super(); + this.proxyLoginCallback = proxyLoginCallback; + this.cachedSession = null; + } + async download(url, destination, options) { + return await options.cancellationToken.createPromise((resolve, reject, onCancel) => { + const requestOptions = { + headers: options.headers || undefined, + redirect: "manual", + }; + builder_util_runtime_1.configureRequestUrl(url, requestOptions); + builder_util_runtime_1.configureRequestOptions(requestOptions); + this.doDownload(requestOptions, { + destination, + options, + onCancel, + callback: error => { + if (error == null) { + resolve(destination); + } + else { + reject(error); + } + }, + responseHandler: null, + }, 0); + }); + } + createRequest(options, callback) { + // fix (node 7+) for making electron updater work when using AWS private buckets, check if headers contain Host property + if (options.headers && options.headers.Host) { + // set host value from headers.Host + options.host = options.headers.Host; + // remove header property 'Host', if not removed causes net::ERR_INVALID_ARGUMENT exception + delete options.headers.Host; + } + // differential downloader can call this method very often, so, better to cache session + if (this.cachedSession == null) { + this.cachedSession = getNetSession(); + } + const request = __webpack_require__(/*! electron */ "electron").net.request({ + ...options, + session: this.cachedSession, + }); + request.on("response", callback); + if (this.proxyLoginCallback != null) { + request.on("login", this.proxyLoginCallback); + } + return request; + } + addRedirectHandlers(request, options, reject, redirectCount, handler) { + request.on("redirect", (statusCode, method, redirectUrl) => { + // no way to modify request options, abort old and make a new one + // https://github.com/electron/electron/issues/11505 + request.abort(); + if (redirectCount > this.maxRedirects) { + reject(this.createMaxRedirectError()); + } + else { + handler(builder_util_runtime_1.HttpExecutor.prepareRedirectUrlOptions(redirectUrl, options)); + } + }); + } +} +exports.ElectronHttpExecutor = ElectronHttpExecutor; +//# sourceMappingURL=electronHttpExecutor.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/out/main.js": +/*!***************************************************!*\ + !*** ./node_modules/electron-updater/out/main.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.UpdaterSignal = exports.UPDATE_DOWNLOADED = exports.DOWNLOAD_PROGRESS = exports.NsisUpdater = exports.MacUpdater = exports.AppImageUpdater = exports.Provider = exports.CancellationToken = exports.NoOpLogger = exports.AppUpdater = void 0; +const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); +Object.defineProperty(exports, "CancellationToken", { enumerable: true, get: function () { return builder_util_runtime_1.CancellationToken; } }); +var AppUpdater_1 = __webpack_require__(/*! ./AppUpdater */ "./node_modules/electron-updater/out/AppUpdater.js"); +Object.defineProperty(exports, "AppUpdater", { enumerable: true, get: function () { return AppUpdater_1.AppUpdater; } }); +Object.defineProperty(exports, "NoOpLogger", { enumerable: true, get: function () { return AppUpdater_1.NoOpLogger; } }); +var Provider_1 = __webpack_require__(/*! ./providers/Provider */ "./node_modules/electron-updater/out/providers/Provider.js"); +Object.defineProperty(exports, "Provider", { enumerable: true, get: function () { return Provider_1.Provider; } }); +var AppImageUpdater_1 = __webpack_require__(/*! ./AppImageUpdater */ "./node_modules/electron-updater/out/AppImageUpdater.js"); +Object.defineProperty(exports, "AppImageUpdater", { enumerable: true, get: function () { return AppImageUpdater_1.AppImageUpdater; } }); +var MacUpdater_1 = __webpack_require__(/*! ./MacUpdater */ "./node_modules/electron-updater/out/MacUpdater.js"); +Object.defineProperty(exports, "MacUpdater", { enumerable: true, get: function () { return MacUpdater_1.MacUpdater; } }); +var NsisUpdater_1 = __webpack_require__(/*! ./NsisUpdater */ "./node_modules/electron-updater/out/NsisUpdater.js"); +Object.defineProperty(exports, "NsisUpdater", { enumerable: true, get: function () { return NsisUpdater_1.NsisUpdater; } }); +// autoUpdater to mimic electron bundled autoUpdater +let _autoUpdater; +function doLoadAutoUpdater() { + // tslint:disable:prefer-conditional-expression + if (process.platform === "win32") { + _autoUpdater = new (__webpack_require__(/*! ./NsisUpdater */ "./node_modules/electron-updater/out/NsisUpdater.js").NsisUpdater)(); + } + else if (process.platform === "darwin") { + _autoUpdater = new (__webpack_require__(/*! ./MacUpdater */ "./node_modules/electron-updater/out/MacUpdater.js").MacUpdater)(); + } + else { + _autoUpdater = new (__webpack_require__(/*! ./AppImageUpdater */ "./node_modules/electron-updater/out/AppImageUpdater.js").AppImageUpdater)(); + } + return _autoUpdater; +} +Object.defineProperty(exports, "autoUpdater", { + enumerable: true, + get: () => { + return _autoUpdater || doLoadAutoUpdater(); + }, +}); +exports.DOWNLOAD_PROGRESS = "download-progress"; +exports.UPDATE_DOWNLOADED = "update-downloaded"; +class UpdaterSignal { + constructor(emitter) { + this.emitter = emitter; + } + /** + * Emitted when an authenticating proxy is [asking for user credentials](https://github.com/electron/electron/blob/master/docs/api/client-request.md#event-login). + */ + login(handler) { + addHandler(this.emitter, "login", handler); + } + progress(handler) { + addHandler(this.emitter, exports.DOWNLOAD_PROGRESS, handler); + } + updateDownloaded(handler) { + addHandler(this.emitter, exports.UPDATE_DOWNLOADED, handler); + } + updateCancelled(handler) { + addHandler(this.emitter, "update-cancelled", handler); + } +} +exports.UpdaterSignal = UpdaterSignal; +const isLogEvent = false; +function addHandler(emitter, event, handler) { + if (isLogEvent) { + emitter.on(event, (...args) => { + console.log("%s %s", event, args); + handler(...args); + }); + } + else { + emitter.on(event, handler); + } +} +//# sourceMappingURL=main.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/out/providerFactory.js": +/*!**************************************************************!*\ + !*** ./node_modules/electron-updater/out/providerFactory.js ***! + \**************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createClient = exports.isUrlProbablySupportMultiRangeRequests = void 0; +const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); +const BintrayProvider_1 = __webpack_require__(/*! ./providers/BintrayProvider */ "./node_modules/electron-updater/out/providers/BintrayProvider.js"); +const GenericProvider_1 = __webpack_require__(/*! ./providers/GenericProvider */ "./node_modules/electron-updater/out/providers/GenericProvider.js"); +const GitHubProvider_1 = __webpack_require__(/*! ./providers/GitHubProvider */ "./node_modules/electron-updater/out/providers/GitHubProvider.js"); +const PrivateGitHubProvider_1 = __webpack_require__(/*! ./providers/PrivateGitHubProvider */ "./node_modules/electron-updater/out/providers/PrivateGitHubProvider.js"); +function isUrlProbablySupportMultiRangeRequests(url) { + return !url.includes("s3.amazonaws.com"); +} +exports.isUrlProbablySupportMultiRangeRequests = isUrlProbablySupportMultiRangeRequests; +function createClient(data, updater, runtimeOptions) { + // noinspection SuspiciousTypeOfGuard + if (typeof data === "string") { + throw builder_util_runtime_1.newError("Please pass PublishConfiguration object", "ERR_UPDATER_INVALID_PROVIDER_CONFIGURATION"); + } + const provider = data.provider; + switch (provider) { + case "github": { + const githubOptions = data; + const token = (githubOptions.private ? process.env.GH_TOKEN || process.env.GITHUB_TOKEN : null) || githubOptions.token; + if (token == null) { + return new GitHubProvider_1.GitHubProvider(githubOptions, updater, runtimeOptions); + } + else { + return new PrivateGitHubProvider_1.PrivateGitHubProvider(githubOptions, updater, token, runtimeOptions); + } + } + case "s3": + case "spaces": + return new GenericProvider_1.GenericProvider({ + provider: "generic", + url: builder_util_runtime_1.getS3LikeProviderBaseUrl(data), + channel: data.channel || null, + }, updater, { + ...runtimeOptions, + // https://github.com/minio/minio/issues/5285#issuecomment-350428955 + isUseMultipleRangeRequest: false, + }); + case "generic": { + const options = data; + return new GenericProvider_1.GenericProvider(options, updater, { + ...runtimeOptions, + isUseMultipleRangeRequest: options.useMultipleRangeRequest !== false && isUrlProbablySupportMultiRangeRequests(options.url), + }); + } + case "bintray": + return new BintrayProvider_1.BintrayProvider(data, runtimeOptions); + default: + throw builder_util_runtime_1.newError(`Unsupported provider: ${provider}`, "ERR_UPDATER_UNSUPPORTED_PROVIDER"); + } +} +exports.createClient = createClient; +//# sourceMappingURL=providerFactory.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/out/providers/BintrayProvider.js": +/*!************************************************************************!*\ + !*** ./node_modules/electron-updater/out/providers/BintrayProvider.js ***! + \************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BintrayProvider = void 0; +const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); +const bintray_1 = __webpack_require__(/*! builder-util-runtime/out/bintray */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/bintray.js"); +const url_1 = __webpack_require__(/*! url */ "url"); +const util_1 = __webpack_require__(/*! ../util */ "./node_modules/electron-updater/out/util.js"); +const Provider_1 = __webpack_require__(/*! ./Provider */ "./node_modules/electron-updater/out/providers/Provider.js"); +class BintrayProvider extends Provider_1.Provider { + constructor(configuration, runtimeOptions) { + super(runtimeOptions); + this.client = new bintray_1.BintrayClient(configuration, runtimeOptions.executor, new builder_util_runtime_1.CancellationToken()); + this.baseUrl = util_1.newBaseUrl(`https://dl.bintray.com/${this.client.owner}/${this.client.repo}`); + } + setRequestHeaders(value) { + super.setRequestHeaders(value); + this.client.setRequestHeaders(value); + } + async getLatestVersion() { + try { + const data = await this.client.getVersion("_latest"); + const channelFilename = util_1.getChannelFilename(this.getDefaultChannelName()); + const files = await this.client.getVersionFiles(data.name); + const channelFile = files.find(it => it.name.endsWith(`_${channelFilename}`) || it.name.endsWith(`-${channelFilename}`)); + if (channelFile == null) { + // noinspection ExceptionCaughtLocallyJS + throw builder_util_runtime_1.newError(`Cannot find channel file "${channelFilename}", existing files:\n${files.map(it => JSON.stringify(it, null, 2)).join(",\n")}`, "ERR_UPDATER_CHANNEL_FILE_NOT_FOUND"); + } + const channelFileUrl = new url_1.URL(`https://dl.bintray.com/${this.client.owner}/${this.client.repo}/${channelFile.name}`); + return Provider_1.parseUpdateInfo(await this.httpRequest(channelFileUrl), channelFilename, channelFileUrl); + } + catch (e) { + if ("statusCode" in e && e.statusCode === 404) { + throw builder_util_runtime_1.newError(`No latest version, please ensure that user, package and repository correctly configured. Or at least one version is published. ${e.stack || e.message}`, "ERR_UPDATER_LATEST_VERSION_NOT_FOUND"); + } + throw e; + } + } + resolveFiles(updateInfo) { + return Provider_1.resolveFiles(updateInfo, this.baseUrl); + } +} +exports.BintrayProvider = BintrayProvider; +//# sourceMappingURL=BintrayProvider.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/out/providers/GenericProvider.js": +/*!************************************************************************!*\ + !*** ./node_modules/electron-updater/out/providers/GenericProvider.js ***! + \************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GenericProvider = void 0; +const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); +const util_1 = __webpack_require__(/*! ../util */ "./node_modules/electron-updater/out/util.js"); +const Provider_1 = __webpack_require__(/*! ./Provider */ "./node_modules/electron-updater/out/providers/Provider.js"); +class GenericProvider extends Provider_1.Provider { + constructor(configuration, updater, runtimeOptions) { + super(runtimeOptions); + this.configuration = configuration; + this.updater = updater; + this.baseUrl = util_1.newBaseUrl(this.configuration.url); + } + get channel() { + const result = this.updater.channel || this.configuration.channel; + return result == null ? this.getDefaultChannelName() : this.getCustomChannelName(result); + } + async getLatestVersion() { + const channelFile = util_1.getChannelFilename(this.channel); + const channelUrl = util_1.newUrlFromBase(channelFile, this.baseUrl, this.updater.isAddNoCacheQuery); + for (let attemptNumber = 0;; attemptNumber++) { + try { + return Provider_1.parseUpdateInfo(await this.httpRequest(channelUrl), channelFile, channelUrl); + } + catch (e) { + if (e instanceof builder_util_runtime_1.HttpError && e.statusCode === 404) { + throw builder_util_runtime_1.newError(`Cannot find channel "${channelFile}" update info: ${e.stack || e.message}`, "ERR_UPDATER_CHANNEL_FILE_NOT_FOUND"); + } + else if (e.code === "ECONNREFUSED") { + if (attemptNumber < 3) { + await new Promise((resolve, reject) => { + try { + setTimeout(resolve, 1000 * attemptNumber); + } + catch (e) { + reject(e); + } + }); + continue; + } + } + throw e; + } + } + } + resolveFiles(updateInfo) { + return Provider_1.resolveFiles(updateInfo, this.baseUrl); + } +} +exports.GenericProvider = GenericProvider; +//# sourceMappingURL=GenericProvider.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/out/providers/GitHubProvider.js": +/*!***********************************************************************!*\ + !*** ./node_modules/electron-updater/out/providers/GitHubProvider.js ***! + \***********************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.computeReleaseNotes = exports.GitHubProvider = exports.BaseGitHubProvider = void 0; +const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); +const semver = __webpack_require__(/*! semver */ "./node_modules/electron-updater/node_modules/semver/index.js"); +const url_1 = __webpack_require__(/*! url */ "url"); +const util_1 = __webpack_require__(/*! ../util */ "./node_modules/electron-updater/out/util.js"); +const Provider_1 = __webpack_require__(/*! ./Provider */ "./node_modules/electron-updater/out/providers/Provider.js"); +const hrefRegExp = /\/tag\/v?([^/]+)$/; +class BaseGitHubProvider extends Provider_1.Provider { + constructor(options, defaultHost, runtimeOptions) { + super({ + ...runtimeOptions, + /* because GitHib uses S3 */ + isUseMultipleRangeRequest: false, + }); + this.options = options; + this.baseUrl = util_1.newBaseUrl(builder_util_runtime_1.githubUrl(options, defaultHost)); + const apiHost = defaultHost === "github.com" ? "api.github.com" : defaultHost; + this.baseApiUrl = util_1.newBaseUrl(builder_util_runtime_1.githubUrl(options, apiHost)); + } + computeGithubBasePath(result) { + // https://github.com/electron-userland/electron-builder/issues/1903#issuecomment-320881211 + const host = this.options.host; + return host != null && host !== "github.com" && host !== "api.github.com" ? `/api/v3${result}` : result; + } +} +exports.BaseGitHubProvider = BaseGitHubProvider; +class GitHubProvider extends BaseGitHubProvider { + constructor(options, updater, runtimeOptions) { + super(options, "github.com", runtimeOptions); + this.options = options; + this.updater = updater; + } + async getLatestVersion() { + const cancellationToken = new builder_util_runtime_1.CancellationToken(); + const feedXml = (await this.httpRequest(util_1.newUrlFromBase(`${this.basePath}.atom`, this.baseUrl), { + accept: "application/xml, application/atom+xml, text/xml, */*", + }, cancellationToken)); + const feed = builder_util_runtime_1.parseXml(feedXml); + // noinspection TypeScriptValidateJSTypes + let latestRelease = feed.element("entry", false, `No published versions on GitHub`); + let version; + try { + if (this.updater.allowPrerelease) { + // noinspection TypeScriptValidateJSTypes + version = hrefRegExp.exec(latestRelease.element("link").attribute("href"))[1]; + } + else { + version = await this.getLatestVersionString(cancellationToken); + for (const element of feed.getElements("entry")) { + // noinspection TypeScriptValidateJSTypes + if (hrefRegExp.exec(element.element("link").attribute("href"))[1] === version) { + latestRelease = element; + break; + } + } + } + } + catch (e) { + throw builder_util_runtime_1.newError(`Cannot parse releases feed: ${e.stack || e.message},\nXML:\n${feedXml}`, "ERR_UPDATER_INVALID_RELEASE_FEED"); + } + if (version == null) { + throw builder_util_runtime_1.newError(`No published versions on GitHub`, "ERR_UPDATER_NO_PUBLISHED_VERSIONS"); + } + const channelFile = util_1.getChannelFilename(this.getDefaultChannelName()); + const channelFileUrl = util_1.newUrlFromBase(this.getBaseDownloadPath(version, channelFile), this.baseUrl); + const requestOptions = this.createRequestOptions(channelFileUrl); + let rawData; + try { + rawData = (await this.executor.request(requestOptions, cancellationToken)); + } + catch (e) { + if (!this.updater.allowPrerelease && e instanceof builder_util_runtime_1.HttpError && e.statusCode === 404) { + throw builder_util_runtime_1.newError(`Cannot find ${channelFile} in the latest release artifacts (${channelFileUrl}): ${e.stack || e.message}`, "ERR_UPDATER_CHANNEL_FILE_NOT_FOUND"); + } + throw e; + } + const result = Provider_1.parseUpdateInfo(rawData, channelFile, channelFileUrl); + if (result.releaseName == null) { + result.releaseName = latestRelease.elementValueOrEmpty("title"); + } + if (result.releaseNotes == null) { + result.releaseNotes = computeReleaseNotes(this.updater.currentVersion, this.updater.fullChangelog, feed, latestRelease); + } + return result; + } + async getLatestVersionString(cancellationToken) { + const options = this.options; + // do not use API for GitHub to avoid limit, only for custom host or GitHub Enterprise + const url = options.host == null || options.host === "github.com" + ? util_1.newUrlFromBase(`${this.basePath}/latest`, this.baseUrl) + : new url_1.URL(`${this.computeGithubBasePath(`/repos/${options.owner}/${options.repo}/releases`)}/latest`, this.baseApiUrl); + try { + const rawData = await this.httpRequest(url, { Accept: "application/json" }, cancellationToken); + if (rawData == null) { + return null; + } + const releaseInfo = JSON.parse(rawData); + return releaseInfo.tag_name.startsWith("v") ? releaseInfo.tag_name.substring(1) : releaseInfo.tag_name; + } + catch (e) { + throw builder_util_runtime_1.newError(`Unable to find latest version on GitHub (${url}), please ensure a production release exists: ${e.stack || e.message}`, "ERR_UPDATER_LATEST_VERSION_NOT_FOUND"); + } + } + get basePath() { + return `/${this.options.owner}/${this.options.repo}/releases`; + } + resolveFiles(updateInfo) { + // still replace space to - due to backward compatibility + return Provider_1.resolveFiles(updateInfo, this.baseUrl, p => this.getBaseDownloadPath(updateInfo.version, p.replace(/ /g, "-"))); + } + getBaseDownloadPath(version, fileName) { + return `${this.basePath}/download/${this.options.vPrefixedTagName === false ? "" : "v"}${version}/${fileName}`; + } +} +exports.GitHubProvider = GitHubProvider; +function getNoteValue(parent) { + const result = parent.elementValueOrEmpty("content"); + // GitHub reports empty notes as No content. + return result === "No content." ? "" : result; +} +function computeReleaseNotes(currentVersion, isFullChangelog, feed, latestRelease) { + if (!isFullChangelog) { + return getNoteValue(latestRelease); + } + const releaseNotes = []; + for (const release of feed.getElements("entry")) { + // noinspection TypeScriptValidateJSTypes + const versionRelease = /\/tag\/v?([^/]+)$/.exec(release.element("link").attribute("href"))[1]; + if (semver.lt(currentVersion, versionRelease)) { + releaseNotes.push({ + version: versionRelease, + note: getNoteValue(release), + }); + } + } + return releaseNotes.sort((a, b) => semver.rcompare(a.version, b.version)); +} +exports.computeReleaseNotes = computeReleaseNotes; +//# sourceMappingURL=GitHubProvider.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/out/providers/PrivateGitHubProvider.js": +/*!******************************************************************************!*\ + !*** ./node_modules/electron-updater/out/providers/PrivateGitHubProvider.js ***! + \******************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PrivateGitHubProvider = void 0; +const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); +const js_yaml_1 = __webpack_require__(/*! js-yaml */ "./node_modules/js-yaml/dist/js-yaml.mjs"); +const path = __webpack_require__(/*! path */ "path"); +const url_1 = __webpack_require__(/*! url */ "url"); +const util_1 = __webpack_require__(/*! ../util */ "./node_modules/electron-updater/out/util.js"); +const GitHubProvider_1 = __webpack_require__(/*! ./GitHubProvider */ "./node_modules/electron-updater/out/providers/GitHubProvider.js"); +const Provider_1 = __webpack_require__(/*! ./Provider */ "./node_modules/electron-updater/out/providers/Provider.js"); +class PrivateGitHubProvider extends GitHubProvider_1.BaseGitHubProvider { + constructor(options, updater, token, runtimeOptions) { + super(options, "api.github.com", runtimeOptions); + this.updater = updater; + this.token = token; + } + createRequestOptions(url, headers) { + const result = super.createRequestOptions(url, headers); + result.redirect = "manual"; + return result; + } + async getLatestVersion() { + const cancellationToken = new builder_util_runtime_1.CancellationToken(); + const channelFile = util_1.getChannelFilename(this.getDefaultChannelName()); + const releaseInfo = await this.getLatestVersionInfo(cancellationToken); + const asset = releaseInfo.assets.find(it => it.name === channelFile); + if (asset == null) { + // html_url must be always, but just to be sure + throw builder_util_runtime_1.newError(`Cannot find ${channelFile} in the release ${releaseInfo.html_url || releaseInfo.name}`, "ERR_UPDATER_CHANNEL_FILE_NOT_FOUND"); + } + const url = new url_1.URL(asset.url); + let result; + try { + result = js_yaml_1.load((await this.httpRequest(url, this.configureHeaders("application/octet-stream"), cancellationToken))); + } + catch (e) { + if (e instanceof builder_util_runtime_1.HttpError && e.statusCode === 404) { + throw builder_util_runtime_1.newError(`Cannot find ${channelFile} in the latest release artifacts (${url}): ${e.stack || e.message}`, "ERR_UPDATER_CHANNEL_FILE_NOT_FOUND"); + } + throw e; + } + ; + result.assets = releaseInfo.assets; + return result; + } + get fileExtraDownloadHeaders() { + return this.configureHeaders("application/octet-stream"); + } + // eslint-disable-next-line @typescript-eslint/explicit-function-return-type + configureHeaders(accept) { + return { + accept, + authorization: `token ${this.token}`, + }; + } + async getLatestVersionInfo(cancellationToken) { + const allowPrerelease = this.updater.allowPrerelease; + let basePath = this.basePath; + if (!allowPrerelease) { + basePath = `${basePath}/latest`; + } + const url = util_1.newUrlFromBase(basePath, this.baseUrl); + try { + const version = JSON.parse((await this.httpRequest(url, this.configureHeaders("application/vnd.github.v3+json"), cancellationToken))); + if (allowPrerelease) { + return version.find(it => it.prerelease) || version[0]; + } + else { + return version; + } + } + catch (e) { + throw builder_util_runtime_1.newError(`Unable to find latest version on GitHub (${url}), please ensure a production release exists: ${e.stack || e.message}`, "ERR_UPDATER_LATEST_VERSION_NOT_FOUND"); + } + } + get basePath() { + return this.computeGithubBasePath(`/repos/${this.options.owner}/${this.options.repo}/releases`); + } + resolveFiles(updateInfo) { + return Provider_1.getFileList(updateInfo).map(it => { + const name = path.posix.basename(it.url).replace(/ /g, "-"); + const asset = updateInfo.assets.find(it => it != null && it.name === name); + if (asset == null) { + throw builder_util_runtime_1.newError(`Cannot find asset "${name}" in: ${JSON.stringify(updateInfo.assets, null, 2)}`, "ERR_UPDATER_ASSET_NOT_FOUND"); + } + return { + url: new url_1.URL(asset.url), + info: it, + }; + }); + } +} +exports.PrivateGitHubProvider = PrivateGitHubProvider; +//# sourceMappingURL=PrivateGitHubProvider.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/out/providers/Provider.js": +/*!*****************************************************************!*\ + !*** ./node_modules/electron-updater/out/providers/Provider.js ***! + \*****************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.resolveFiles = exports.getFileList = exports.parseUpdateInfo = exports.findFile = exports.Provider = void 0; +const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); +const js_yaml_1 = __webpack_require__(/*! js-yaml */ "./node_modules/js-yaml/dist/js-yaml.mjs"); +const util_1 = __webpack_require__(/*! ../util */ "./node_modules/electron-updater/out/util.js"); +class Provider { + constructor(runtimeOptions) { + this.runtimeOptions = runtimeOptions; + this.requestHeaders = null; + this.executor = runtimeOptions.executor; + } + get isUseMultipleRangeRequest() { + return this.runtimeOptions.isUseMultipleRangeRequest !== false; + } + getChannelFilePrefix() { + if (this.runtimeOptions.platform === "linux") { + const arch = process.env.TEST_UPDATER_ARCH || process.arch; + const archSuffix = arch === "x64" ? "" : `-${arch}`; + return "-linux" + archSuffix; + } + else { + return this.runtimeOptions.platform === "darwin" ? "-mac" : ""; + } + } + // due to historical reasons for windows we use channel name without platform specifier + getDefaultChannelName() { + return this.getCustomChannelName("latest"); + } + getCustomChannelName(channel) { + return `${channel}${this.getChannelFilePrefix()}`; + } + get fileExtraDownloadHeaders() { + return null; + } + setRequestHeaders(value) { + this.requestHeaders = value; + } + /** + * Method to perform API request only to resolve update info, but not to download update. + */ + httpRequest(url, headers, cancellationToken) { + return this.executor.request(this.createRequestOptions(url, headers), cancellationToken); + } + createRequestOptions(url, headers) { + const result = {}; + if (this.requestHeaders == null) { + if (headers != null) { + result.headers = headers; + } + } + else { + result.headers = headers == null ? this.requestHeaders : { ...this.requestHeaders, ...headers }; + } + builder_util_runtime_1.configureRequestUrl(url, result); + return result; + } +} +exports.Provider = Provider; +function findFile(files, extension, not) { + if (files.length === 0) { + throw builder_util_runtime_1.newError("No files provided", "ERR_UPDATER_NO_FILES_PROVIDED"); + } + const result = files.find(it => it.url.pathname.toLowerCase().endsWith(`.${extension}`)); + if (result != null) { + return result; + } + else if (not == null) { + return files[0]; + } + else { + return files.find(fileInfo => !not.some(ext => fileInfo.url.pathname.toLowerCase().endsWith(`.${ext}`))); + } +} +exports.findFile = findFile; +function parseUpdateInfo(rawData, channelFile, channelFileUrl) { + if (rawData == null) { + throw builder_util_runtime_1.newError(`Cannot parse update info from ${channelFile} in the latest release artifacts (${channelFileUrl}): rawData: null`, "ERR_UPDATER_INVALID_UPDATE_INFO"); + } + let result; + try { + result = js_yaml_1.load(rawData); + } + catch (e) { + throw builder_util_runtime_1.newError(`Cannot parse update info from ${channelFile} in the latest release artifacts (${channelFileUrl}): ${e.stack || e.message}, rawData: ${rawData}`, "ERR_UPDATER_INVALID_UPDATE_INFO"); + } + return result; +} +exports.parseUpdateInfo = parseUpdateInfo; +function getFileList(updateInfo) { + const files = updateInfo.files; + if (files != null && files.length > 0) { + return files; + } + // noinspection JSDeprecatedSymbols + if (updateInfo.path != null) { + // noinspection JSDeprecatedSymbols + return [ + { + url: updateInfo.path, + sha2: updateInfo.sha2, + sha512: updateInfo.sha512, + }, + ]; + } + else { + throw builder_util_runtime_1.newError(`No files provided: ${builder_util_runtime_1.safeStringifyJson(updateInfo)}`, "ERR_UPDATER_NO_FILES_PROVIDED"); + } +} +exports.getFileList = getFileList; +function resolveFiles(updateInfo, baseUrl, pathTransformer = (p) => p) { + const files = getFileList(updateInfo); + const result = files.map(fileInfo => { + if (fileInfo.sha2 == null && fileInfo.sha512 == null) { + throw builder_util_runtime_1.newError(`Update info doesn't contain nor sha256 neither sha512 checksum: ${builder_util_runtime_1.safeStringifyJson(fileInfo)}`, "ERR_UPDATER_NO_CHECKSUM"); + } + return { + url: util_1.newUrlFromBase(pathTransformer(fileInfo.url), baseUrl), + info: fileInfo, + }; + }); + const packages = updateInfo.packages; + const packageInfo = packages == null ? null : packages[process.arch] || packages.ia32; + if (packageInfo != null) { + ; + result[0].packageInfo = { + ...packageInfo, + path: util_1.newUrlFromBase(pathTransformer(packageInfo.path), baseUrl).href, + }; + } + return result; +} +exports.resolveFiles = resolveFiles; +//# sourceMappingURL=Provider.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/out/util.js": +/*!***************************************************!*\ + !*** ./node_modules/electron-updater/out/util.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.blockmapFiles = exports.getChannelFilename = exports.newUrlFromBase = exports.newBaseUrl = void 0; +// if baseUrl path doesn't ends with /, this path will be not prepended to passed pathname for new URL(input, base) +const url_1 = __webpack_require__(/*! url */ "url"); +// @ts-ignore +const escapeRegExp = __webpack_require__(/*! lodash.escaperegexp */ "./node_modules/lodash.escaperegexp/index.js"); +/** @internal */ +function newBaseUrl(url) { + const result = new url_1.URL(url); + if (!result.pathname.endsWith("/")) { + result.pathname += "/"; + } + return result; +} +exports.newBaseUrl = newBaseUrl; +// addRandomQueryToAvoidCaching is false by default because in most cases URL already contains version number, +// so, it makes sense only for Generic Provider for channel files +function newUrlFromBase(pathname, baseUrl, addRandomQueryToAvoidCaching = false) { + const result = new url_1.URL(pathname, baseUrl); + // search is not propagated (search is an empty string if not specified) + const search = baseUrl.search; + if (search != null && search.length !== 0) { + result.search = search; + } + else if (addRandomQueryToAvoidCaching) { + result.search = `noCache=${Date.now().toString(32)}`; + } + return result; +} +exports.newUrlFromBase = newUrlFromBase; +function getChannelFilename(channel) { + return `${channel}.yml`; +} +exports.getChannelFilename = getChannelFilename; +function blockmapFiles(baseUrl, oldVersion, newVersion) { + const newBlockMapUrl = newUrlFromBase(`${baseUrl.pathname}.blockmap`, baseUrl); + const oldBlockMapUrl = newUrlFromBase(`${baseUrl.pathname.replace(new RegExp(escapeRegExp(newVersion), "g"), oldVersion)}.blockmap`, baseUrl); + return [oldBlockMapUrl, newBlockMapUrl]; +} +exports.blockmapFiles = blockmapFiles; +//# sourceMappingURL=util.js.map + +/***/ }), + +/***/ "./node_modules/electron-updater/out/windowsExecutableCodeSignatureVerifier.js": +/*!*************************************************************************************!*\ + !*** ./node_modules/electron-updater/out/windowsExecutableCodeSignatureVerifier.js ***! + \*************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.verifySignature = void 0; +const builder_util_runtime_1 = __webpack_require__(/*! builder-util-runtime */ "./node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js"); +const child_process_1 = __webpack_require__(/*! child_process */ "child_process"); +const os = __webpack_require__(/*! os */ "os"); +// $certificateInfo = (Get-AuthenticodeSignature 'xxx\yyy.exe' +// | where {$_.Status.Equals([System.Management.Automation.SignatureStatus]::Valid) -and $_.SignerCertificate.Subject.Contains("CN=siemens.com")}) +// | Out-String ; if ($certificateInfo) { exit 0 } else { exit 1 } +function verifySignature(publisherNames, unescapedTempUpdateFile, logger) { + return new Promise(resolve => { + // Escape quotes and backticks in filenames to prevent user from breaking the + // arguments and perform a remote command injection. + // + // Consider example powershell command: + // ```powershell + // Get-AuthenticodeSignature 'C:\\path\\my-bad-';calc;'filename.exe' + // ``` + // The above would work expected and find the file name, however, it will also execute `;calc;` + // command and start the calculator app. + // + // From Powershell quoting rules: + // https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_quoting_rules?view=powershell-7 + // * Double quotes `"` are treated literally within single-quoted strings; + // * Single quotes can be escaped by doubling them: 'don''t' -> don't; + // * Backticks can be escaped by doubling them: 'A backtick (``) character'; + // + // Also note that at this point the file has already been written to the disk, thus we are + // guaranteed that the path will not contains any illegal characters like <>:"/\|?* + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + const tempUpdateFile = unescapedTempUpdateFile.replace(/'/g, "''").replace(/`/g, "``"); + // https://github.com/electron-userland/electron-builder/issues/2421 + // https://github.com/electron-userland/electron-builder/issues/2535 + child_process_1.execFile("powershell.exe", [ + "-NoProfile", + "-NonInteractive", + "-InputFormat", + "None", + "-Command", + `Get-AuthenticodeSignature '${tempUpdateFile}' | ConvertTo-Json -Compress | ForEach-Object { [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($_)) }`, + ], { + timeout: 20 * 1000, + }, (error, stdout, stderr) => { + try { + if (error != null || stderr) { + handleError(logger, error, stderr); + resolve(null); + return; + } + const data = parseOut(Buffer.from(stdout, "base64").toString("utf-8")); + if (data.Status === 0) { + const name = builder_util_runtime_1.parseDn(data.SignerCertificate.Subject).get("CN"); + if (publisherNames.includes(name)) { + resolve(null); + return; + } + } + const result = `publisherNames: ${publisherNames.join(" | ")}, raw info: ` + JSON.stringify(data, (name, value) => (name === "RawData" ? undefined : value), 2); + logger.warn(`Sign verification failed, installer signed with incorrect certificate: ${result}`); + resolve(result); + } + catch (e) { + logger.warn(`Cannot execute Get-AuthenticodeSignature: ${error}. Ignoring signature validation due to unknown error.`); + resolve(null); + return; + } + }); + }); +} +exports.verifySignature = verifySignature; +function parseOut(out) { + const data = JSON.parse(out); + delete data.PrivateKey; + delete data.IsOSBinary; + delete data.SignatureType; + const signerCertificate = data.SignerCertificate; + if (signerCertificate != null) { + delete signerCertificate.Archived; + delete signerCertificate.Extensions; + delete signerCertificate.Handle; + delete signerCertificate.HasPrivateKey; + // duplicates data.SignerCertificate (contains RawData) + delete signerCertificate.SubjectName; + } + delete data.Path; + return data; +} +function handleError(logger, error, stderr) { + if (isOldWin6()) { + logger.warn(`Cannot execute Get-AuthenticodeSignature: ${error || stderr}. Ignoring signature validation due to unsupported powershell version. Please upgrade to powershell 3 or higher.`); + return; + } + try { + child_process_1.execFileSync("powershell.exe", ["-NoProfile", "-NonInteractive", "-Command", "ConvertTo-Json test"], { timeout: 10 * 1000 }); + } + catch (testError) { + logger.warn(`Cannot execute ConvertTo-Json: ${testError.message}. Ignoring signature validation due to unsupported powershell version. Please upgrade to powershell 3 or higher.`); + return; + } + if (error != null) { + throw error; + } + if (stderr) { + logger.warn(`Cannot execute Get-AuthenticodeSignature, stderr: ${stderr}. Ignoring signature validation due to unknown stderr.`); + return; + } +} +function isOldWin6() { + const winVersion = os.release(); + return winVersion.startsWith("6.") && !winVersion.startsWith("6.3"); +} +//# sourceMappingURL=windowsExecutableCodeSignatureVerifier.js.map + +/***/ }), + +/***/ "./node_modules/emoji-regex/index.js": +/*!*******************************************!*\ + !*** ./node_modules/emoji-regex/index.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function () { + // https://mths.be/emoji + return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; +}; + + +/***/ }), + +/***/ "./node_modules/env-paths/index.js": +/*!*****************************************!*\ + !*** ./node_modules/env-paths/index.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const path = __webpack_require__(/*! path */ "path"); +const os = __webpack_require__(/*! os */ "os"); + +const homedir = os.homedir(); +const tmpdir = os.tmpdir(); +const {env} = process; + +const macos = name => { + const library = path.join(homedir, 'Library'); + + return { + data: path.join(library, 'Application Support', name), + config: path.join(library, 'Preferences', name), + cache: path.join(library, 'Caches', name), + log: path.join(library, 'Logs', name), + temp: path.join(tmpdir, name) + }; +}; + +const windows = name => { + const appData = env.APPDATA || path.join(homedir, 'AppData', 'Roaming'); + const localAppData = env.LOCALAPPDATA || path.join(homedir, 'AppData', 'Local'); + + return { + // Data/config/cache/log are invented by me as Windows isn't opinionated about this + data: path.join(localAppData, name, 'Data'), + config: path.join(appData, name, 'Config'), + cache: path.join(localAppData, name, 'Cache'), + log: path.join(localAppData, name, 'Log'), + temp: path.join(tmpdir, name) + }; +}; + +// https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html +const linux = name => { + const username = path.basename(homedir); + + return { + data: path.join(env.XDG_DATA_HOME || path.join(homedir, '.local', 'share'), name), + config: path.join(env.XDG_CONFIG_HOME || path.join(homedir, '.config'), name), + cache: path.join(env.XDG_CACHE_HOME || path.join(homedir, '.cache'), name), + // https://wiki.debian.org/XDGBaseDirectorySpecification#state + log: path.join(env.XDG_STATE_HOME || path.join(homedir, '.local', 'state'), name), + temp: path.join(tmpdir, username, name) + }; +}; + +const envPaths = (name, options) => { + if (typeof name !== 'string') { + throw new TypeError(`Expected string, got ${typeof name}`); + } + + options = Object.assign({suffix: 'nodejs'}, options); + + if (options.suffix) { + // Add suffix to prevent possible conflict with native apps + name += `-${options.suffix}`; + } + + if (process.platform === 'darwin') { + return macos(name); + } + + if (process.platform === 'win32') { + return windows(name); + } + + return linux(name); +}; + +module.exports = envPaths; +// TODO: Remove this for the next major release +module.exports.default = envPaths; + + +/***/ }), + +/***/ "./node_modules/escape-goat/index.js": +/*!*******************************************!*\ + !*** ./node_modules/escape-goat/index.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.htmlEscape = string => string + .replace(/&/g, '&') + .replace(/"/g, '"') + .replace(/'/g, ''') + .replace(//g, '>'); + +exports.htmlUnescape = htmlString => htmlString + .replace(/>/g, '>') + .replace(/</g, '<') + .replace(/�?39;/g, '\'') + .replace(/"/g, '"') + .replace(/&/g, '&'); + +exports.htmlEscapeTag = (strings, ...values) => { + let output = strings[0]; + for (let i = 0; i < values.length; i++) { + output = output + exports.htmlEscape(String(values[i])) + strings[i + 1]; + } + + return output; +}; + +exports.htmlUnescapeTag = (strings, ...values) => { + let output = strings[0]; + for (let i = 0; i < values.length; i++) { + output = output + exports.htmlUnescape(String(values[i])) + strings[i + 1]; + } + + return output; +}; + + +/***/ }), + +/***/ "./node_modules/ext-list/index.js": +/*!****************************************!*\ + !*** ./node_modules/ext-list/index.js ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var mimeDb = __webpack_require__(/*! mime-db */ "./node_modules/mime-db/index.js"); + +module.exports = function () { + var ret = {}; + + Object.keys(mimeDb).forEach(function (x) { + var val = mimeDb[x]; + + if (val.extensions && val.extensions.length > 0) { + val.extensions.forEach(function (y) { + ret[y] = x; + }); + } + }); + + return ret; +}; + + +/***/ }), + +/***/ "./node_modules/ext-name/index.js": +/*!****************************************!*\ + !*** ./node_modules/ext-name/index.js ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const extList = __webpack_require__(/*! ext-list */ "./node_modules/ext-list/index.js"); +const sortKeysLength = __webpack_require__(/*! sort-keys-length */ "./node_modules/sort-keys-length/index.js"); + +module.exports = str => { + const obj = sortKeysLength.desc(extList()); + const exts = Object.keys(obj).filter(x => str.endsWith(x)); + + if (exts.length === 0) { + return []; + } + + return exts.map(x => ({ + ext: x, + mime: obj[x] + })); +}; + +module.exports.mime = str => { + const obj = sortKeysLength.desc(extList()); + const exts = Object.keys(obj).filter(x => obj[x] === str); + + if (exts.length === 0) { + return []; + } + + return exts.map(x => ({ + ext: x, + mime: obj[x] + })); +}; + + +/***/ }), + +/***/ "./node_modules/fast-deep-equal/index.js": +/*!***********************************************!*\ + !*** ./node_modules/fast-deep-equal/index.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// do not edit .js files directly - edit src/index.jst + + + +module.exports = function equal(a, b) { + if (a === b) return true; + + if (a && b && typeof a == 'object' && typeof b == 'object') { + if (a.constructor !== b.constructor) return false; + + var length, i, keys; + if (Array.isArray(a)) { + length = a.length; + if (length != b.length) return false; + for (i = length; i-- !== 0;) + if (!equal(a[i], b[i])) return false; + return true; + } + + + + if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags; + if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf(); + if (a.toString !== Object.prototype.toString) return a.toString() === b.toString(); + + keys = Object.keys(a); + length = keys.length; + if (length !== Object.keys(b).length) return false; + + for (i = length; i-- !== 0;) + if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; + + for (i = length; i-- !== 0;) { + var key = keys[i]; + + if (!equal(a[key], b[key])) return false; + } + + return true; + } + + // true if both NaN, false otherwise + return a!==a && b!==b; +}; + + +/***/ }), + +/***/ "./node_modules/fast-json-stable-stringify/index.js": +/*!**********************************************************!*\ + !*** ./node_modules/fast-json-stable-stringify/index.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = function (data, opts) { + if (!opts) opts = {}; + if (typeof opts === 'function') opts = { cmp: opts }; + var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false; + + var cmp = opts.cmp && (function (f) { + return function (node) { + return function (a, b) { + var aobj = { key: a, value: node[a] }; + var bobj = { key: b, value: node[b] }; + return f(aobj, bobj); + }; + }; + })(opts.cmp); + + var seen = []; + return (function stringify (node) { + if (node && node.toJSON && typeof node.toJSON === 'function') { + node = node.toJSON(); + } + + if (node === undefined) return; + if (typeof node == 'number') return isFinite(node) ? '' + node : 'null'; + if (typeof node !== 'object') return JSON.stringify(node); + + var i, out; + if (Array.isArray(node)) { + out = '['; + for (i = 0; i < node.length; i++) { + if (i) out += ','; + out += stringify(node[i]) || 'null'; + } + return out + ']'; + } + + if (node === null) return 'null'; + + if (seen.indexOf(node) !== -1) { + if (cycles) return JSON.stringify('__cycle__'); + throw new TypeError('Converting circular structure to JSON'); + } + + var seenIndex = seen.push(node) - 1; + var keys = Object.keys(node).sort(cmp && cmp(node)); + out = ''; + for (i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = stringify(node[key]); + + if (!value) continue; + if (out) out += ','; + out += JSON.stringify(key) + ':' + value; + } + seen.splice(seenIndex, 1); + return '{' + out + '}'; + })(data); +}; + + +/***/ }), + +/***/ "./node_modules/find-up/index.js": +/*!***************************************!*\ + !*** ./node_modules/find-up/index.js ***! + \***************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const path = __webpack_require__(/*! path */ "path"); +const locatePath = __webpack_require__(/*! locate-path */ "./node_modules/locate-path/index.js"); + +module.exports = (filename, opts = {}) => { + const startDir = path.resolve(opts.cwd || ''); + const {root} = path.parse(startDir); + + const filenames = [].concat(filename); + + return new Promise(resolve => { + (function find(dir) { + locatePath(filenames, {cwd: dir}).then(file => { + if (file) { + resolve(path.join(dir, file)); + } else if (dir === root) { + resolve(null); + } else { + find(path.dirname(dir)); + } + }); + })(startDir); + }); +}; + +module.exports.sync = (filename, opts = {}) => { + let dir = path.resolve(opts.cwd || ''); + const {root} = path.parse(dir); + + const filenames = [].concat(filename); + + // eslint-disable-next-line no-constant-condition + while (true) { + const file = locatePath.sync(filenames, {cwd: dir}); + + if (file) { + return path.join(dir, file); + } + + if (dir === root) { + return null; + } + + dir = path.dirname(dir); + } +}; + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/copy-sync/copy-sync.js": +/*!**********************************************************!*\ + !*** ./node_modules/fs-extra/lib/copy-sync/copy-sync.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") +const path = __webpack_require__(/*! path */ "path") +const mkdirsSync = __webpack_require__(/*! ../mkdirs */ "./node_modules/fs-extra/lib/mkdirs/index.js").mkdirsSync +const utimesMillisSync = __webpack_require__(/*! ../util/utimes */ "./node_modules/fs-extra/lib/util/utimes.js").utimesMillisSync +const stat = __webpack_require__(/*! ../util/stat */ "./node_modules/fs-extra/lib/util/stat.js") + +function copySync (src, dest, opts) { + if (typeof opts === 'function') { + opts = { filter: opts } + } + + opts = opts || {} + opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now + opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber + + // Warn about using preserveTimestamps on 32-bit node + if (opts.preserveTimestamps && process.arch === 'ia32') { + console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n + see https://github.com/jprichardson/node-fs-extra/issues/269`) + } + + const { srcStat, destStat } = stat.checkPathsSync(src, dest, 'copy', opts) + stat.checkParentPathsSync(src, srcStat, dest, 'copy') + return handleFilterAndCopy(destStat, src, dest, opts) +} + +function handleFilterAndCopy (destStat, src, dest, opts) { + if (opts.filter && !opts.filter(src, dest)) return + const destParent = path.dirname(dest) + if (!fs.existsSync(destParent)) mkdirsSync(destParent) + return getStats(destStat, src, dest, opts) +} + +function startCopy (destStat, src, dest, opts) { + if (opts.filter && !opts.filter(src, dest)) return + return getStats(destStat, src, dest, opts) +} + +function getStats (destStat, src, dest, opts) { + const statSync = opts.dereference ? fs.statSync : fs.lstatSync + const srcStat = statSync(src) + + if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts) + else if (srcStat.isFile() || + srcStat.isCharacterDevice() || + srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts) + else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts) + else if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`) + else if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`) + throw new Error(`Unknown file: ${src}`) +} + +function onFile (srcStat, destStat, src, dest, opts) { + if (!destStat) return copyFile(srcStat, src, dest, opts) + return mayCopyFile(srcStat, src, dest, opts) +} + +function mayCopyFile (srcStat, src, dest, opts) { + if (opts.overwrite) { + fs.unlinkSync(dest) + return copyFile(srcStat, src, dest, opts) + } else if (opts.errorOnExist) { + throw new Error(`'${dest}' already exists`) + } +} + +function copyFile (srcStat, src, dest, opts) { + fs.copyFileSync(src, dest) + if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest) + return setDestMode(dest, srcStat.mode) +} + +function handleTimestamps (srcMode, src, dest) { + // Make sure the file is writable before setting the timestamp + // otherwise open fails with EPERM when invoked with 'r+' + // (through utimes call) + if (fileIsNotWritable(srcMode)) makeFileWritable(dest, srcMode) + return setDestTimestamps(src, dest) +} + +function fileIsNotWritable (srcMode) { + return (srcMode & 0o200) === 0 +} + +function makeFileWritable (dest, srcMode) { + return setDestMode(dest, srcMode | 0o200) +} + +function setDestMode (dest, srcMode) { + return fs.chmodSync(dest, srcMode) +} + +function setDestTimestamps (src, dest) { + // The initial srcStat.atime cannot be trusted + // because it is modified by the read(2) system call + // (See https://nodejs.org/api/fs.html#fs_stat_time_values) + const updatedSrcStat = fs.statSync(src) + return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime) +} + +function onDir (srcStat, destStat, src, dest, opts) { + if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts) + return copyDir(src, dest, opts) +} + +function mkDirAndCopy (srcMode, src, dest, opts) { + fs.mkdirSync(dest) + copyDir(src, dest, opts) + return setDestMode(dest, srcMode) +} + +function copyDir (src, dest, opts) { + fs.readdirSync(src).forEach(item => copyDirItem(item, src, dest, opts)) +} + +function copyDirItem (item, src, dest, opts) { + const srcItem = path.join(src, item) + const destItem = path.join(dest, item) + const { destStat } = stat.checkPathsSync(srcItem, destItem, 'copy', opts) + return startCopy(destStat, srcItem, destItem, opts) +} + +function onLink (destStat, src, dest, opts) { + let resolvedSrc = fs.readlinkSync(src) + if (opts.dereference) { + resolvedSrc = path.resolve(process.cwd(), resolvedSrc) + } + + if (!destStat) { + return fs.symlinkSync(resolvedSrc, dest) + } else { + let resolvedDest + try { + resolvedDest = fs.readlinkSync(dest) + } catch (err) { + // dest exists and is a regular file or directory, + // Windows may throw UNKNOWN error. If dest already exists, + // fs throws error anyway, so no need to guard against it here. + if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlinkSync(resolvedSrc, dest) + throw err + } + if (opts.dereference) { + resolvedDest = path.resolve(process.cwd(), resolvedDest) + } + if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) { + throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`) + } + + // prevent copy if src is a subdir of dest since unlinking + // dest in this case would result in removing src contents + // and therefore a broken symlink would be created. + if (fs.statSync(dest).isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) { + throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`) + } + return copyLink(resolvedSrc, dest) + } +} + +function copyLink (resolvedSrc, dest) { + fs.unlinkSync(dest) + return fs.symlinkSync(resolvedSrc, dest) +} + +module.exports = copySync + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/copy-sync/index.js": +/*!******************************************************!*\ + !*** ./node_modules/fs-extra/lib/copy-sync/index.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = { + copySync: __webpack_require__(/*! ./copy-sync */ "./node_modules/fs-extra/lib/copy-sync/copy-sync.js") +} + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/copy/copy.js": +/*!************************************************!*\ + !*** ./node_modules/fs-extra/lib/copy/copy.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") +const path = __webpack_require__(/*! path */ "path") +const mkdirs = __webpack_require__(/*! ../mkdirs */ "./node_modules/fs-extra/lib/mkdirs/index.js").mkdirs +const pathExists = __webpack_require__(/*! ../path-exists */ "./node_modules/fs-extra/lib/path-exists/index.js").pathExists +const utimesMillis = __webpack_require__(/*! ../util/utimes */ "./node_modules/fs-extra/lib/util/utimes.js").utimesMillis +const stat = __webpack_require__(/*! ../util/stat */ "./node_modules/fs-extra/lib/util/stat.js") + +function copy (src, dest, opts, cb) { + if (typeof opts === 'function' && !cb) { + cb = opts + opts = {} + } else if (typeof opts === 'function') { + opts = { filter: opts } + } + + cb = cb || function () {} + opts = opts || {} + + opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now + opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber + + // Warn about using preserveTimestamps on 32-bit node + if (opts.preserveTimestamps && process.arch === 'ia32') { + console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n + see https://github.com/jprichardson/node-fs-extra/issues/269`) + } + + stat.checkPaths(src, dest, 'copy', opts, (err, stats) => { + if (err) return cb(err) + const { srcStat, destStat } = stats + stat.checkParentPaths(src, srcStat, dest, 'copy', err => { + if (err) return cb(err) + if (opts.filter) return handleFilter(checkParentDir, destStat, src, dest, opts, cb) + return checkParentDir(destStat, src, dest, opts, cb) + }) + }) +} + +function checkParentDir (destStat, src, dest, opts, cb) { + const destParent = path.dirname(dest) + pathExists(destParent, (err, dirExists) => { + if (err) return cb(err) + if (dirExists) return getStats(destStat, src, dest, opts, cb) + mkdirs(destParent, err => { + if (err) return cb(err) + return getStats(destStat, src, dest, opts, cb) + }) + }) +} + +function handleFilter (onInclude, destStat, src, dest, opts, cb) { + Promise.resolve(opts.filter(src, dest)).then(include => { + if (include) return onInclude(destStat, src, dest, opts, cb) + return cb() + }, error => cb(error)) +} + +function startCopy (destStat, src, dest, opts, cb) { + if (opts.filter) return handleFilter(getStats, destStat, src, dest, opts, cb) + return getStats(destStat, src, dest, opts, cb) +} + +function getStats (destStat, src, dest, opts, cb) { + const stat = opts.dereference ? fs.stat : fs.lstat + stat(src, (err, srcStat) => { + if (err) return cb(err) + + if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb) + else if (srcStat.isFile() || + srcStat.isCharacterDevice() || + srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb) + else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb) + else if (srcStat.isSocket()) return cb(new Error(`Cannot copy a socket file: ${src}`)) + else if (srcStat.isFIFO()) return cb(new Error(`Cannot copy a FIFO pipe: ${src}`)) + return cb(new Error(`Unknown file: ${src}`)) + }) +} + +function onFile (srcStat, destStat, src, dest, opts, cb) { + if (!destStat) return copyFile(srcStat, src, dest, opts, cb) + return mayCopyFile(srcStat, src, dest, opts, cb) +} + +function mayCopyFile (srcStat, src, dest, opts, cb) { + if (opts.overwrite) { + fs.unlink(dest, err => { + if (err) return cb(err) + return copyFile(srcStat, src, dest, opts, cb) + }) + } else if (opts.errorOnExist) { + return cb(new Error(`'${dest}' already exists`)) + } else return cb() +} + +function copyFile (srcStat, src, dest, opts, cb) { + fs.copyFile(src, dest, err => { + if (err) return cb(err) + if (opts.preserveTimestamps) return handleTimestampsAndMode(srcStat.mode, src, dest, cb) + return setDestMode(dest, srcStat.mode, cb) + }) +} + +function handleTimestampsAndMode (srcMode, src, dest, cb) { + // Make sure the file is writable before setting the timestamp + // otherwise open fails with EPERM when invoked with 'r+' + // (through utimes call) + if (fileIsNotWritable(srcMode)) { + return makeFileWritable(dest, srcMode, err => { + if (err) return cb(err) + return setDestTimestampsAndMode(srcMode, src, dest, cb) + }) + } + return setDestTimestampsAndMode(srcMode, src, dest, cb) +} + +function fileIsNotWritable (srcMode) { + return (srcMode & 0o200) === 0 +} + +function makeFileWritable (dest, srcMode, cb) { + return setDestMode(dest, srcMode | 0o200, cb) +} + +function setDestTimestampsAndMode (srcMode, src, dest, cb) { + setDestTimestamps(src, dest, err => { + if (err) return cb(err) + return setDestMode(dest, srcMode, cb) + }) +} + +function setDestMode (dest, srcMode, cb) { + return fs.chmod(dest, srcMode, cb) +} + +function setDestTimestamps (src, dest, cb) { + // The initial srcStat.atime cannot be trusted + // because it is modified by the read(2) system call + // (See https://nodejs.org/api/fs.html#fs_stat_time_values) + fs.stat(src, (err, updatedSrcStat) => { + if (err) return cb(err) + return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb) + }) +} + +function onDir (srcStat, destStat, src, dest, opts, cb) { + if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts, cb) + return copyDir(src, dest, opts, cb) +} + +function mkDirAndCopy (srcMode, src, dest, opts, cb) { + fs.mkdir(dest, err => { + if (err) return cb(err) + copyDir(src, dest, opts, err => { + if (err) return cb(err) + return setDestMode(dest, srcMode, cb) + }) + }) +} + +function copyDir (src, dest, opts, cb) { + fs.readdir(src, (err, items) => { + if (err) return cb(err) + return copyDirItems(items, src, dest, opts, cb) + }) +} + +function copyDirItems (items, src, dest, opts, cb) { + const item = items.pop() + if (!item) return cb() + return copyDirItem(items, item, src, dest, opts, cb) +} + +function copyDirItem (items, item, src, dest, opts, cb) { + const srcItem = path.join(src, item) + const destItem = path.join(dest, item) + stat.checkPaths(srcItem, destItem, 'copy', opts, (err, stats) => { + if (err) return cb(err) + const { destStat } = stats + startCopy(destStat, srcItem, destItem, opts, err => { + if (err) return cb(err) + return copyDirItems(items, src, dest, opts, cb) + }) + }) +} + +function onLink (destStat, src, dest, opts, cb) { + fs.readlink(src, (err, resolvedSrc) => { + if (err) return cb(err) + if (opts.dereference) { + resolvedSrc = path.resolve(process.cwd(), resolvedSrc) + } + + if (!destStat) { + return fs.symlink(resolvedSrc, dest, cb) + } else { + fs.readlink(dest, (err, resolvedDest) => { + if (err) { + // dest exists and is a regular file or directory, + // Windows may throw UNKNOWN error. If dest already exists, + // fs throws error anyway, so no need to guard against it here. + if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlink(resolvedSrc, dest, cb) + return cb(err) + } + if (opts.dereference) { + resolvedDest = path.resolve(process.cwd(), resolvedDest) + } + if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) { + return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)) + } + + // do not copy if src is a subdir of dest since unlinking + // dest in this case would result in removing src contents + // and therefore a broken symlink would be created. + if (destStat.isDirectory() && stat.isSrcSubdir(resolvedDest, resolvedSrc)) { + return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)) + } + return copyLink(resolvedSrc, dest, cb) + }) + } + }) +} + +function copyLink (resolvedSrc, dest, cb) { + fs.unlink(dest, err => { + if (err) return cb(err) + return fs.symlink(resolvedSrc, dest, cb) + }) +} + +module.exports = copy + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/copy/index.js": +/*!*************************************************!*\ + !*** ./node_modules/fs-extra/lib/copy/index.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const u = __webpack_require__(/*! universalify */ "./node_modules/universalify/index.js").fromCallback +module.exports = { + copy: u(__webpack_require__(/*! ./copy */ "./node_modules/fs-extra/lib/copy/copy.js")) +} + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/empty/index.js": +/*!**************************************************!*\ + !*** ./node_modules/fs-extra/lib/empty/index.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const u = __webpack_require__(/*! universalify */ "./node_modules/universalify/index.js").fromPromise +const fs = __webpack_require__(/*! ../fs */ "./node_modules/fs-extra/lib/fs/index.js") +const path = __webpack_require__(/*! path */ "path") +const mkdir = __webpack_require__(/*! ../mkdirs */ "./node_modules/fs-extra/lib/mkdirs/index.js") +const remove = __webpack_require__(/*! ../remove */ "./node_modules/fs-extra/lib/remove/index.js") + +const emptyDir = u(async function emptyDir (dir) { + let items + try { + items = await fs.readdir(dir) + } catch { + return mkdir.mkdirs(dir) + } + + return Promise.all(items.map(item => remove.remove(path.join(dir, item)))) +}) + +function emptyDirSync (dir) { + let items + try { + items = fs.readdirSync(dir) + } catch { + return mkdir.mkdirsSync(dir) + } + + items.forEach(item => { + item = path.join(dir, item) + remove.removeSync(item) + }) +} + +module.exports = { + emptyDirSync, + emptydirSync: emptyDirSync, + emptyDir, + emptydir: emptyDir +} + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/ensure/file.js": +/*!**************************************************!*\ + !*** ./node_modules/fs-extra/lib/ensure/file.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const u = __webpack_require__(/*! universalify */ "./node_modules/universalify/index.js").fromCallback +const path = __webpack_require__(/*! path */ "path") +const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") +const mkdir = __webpack_require__(/*! ../mkdirs */ "./node_modules/fs-extra/lib/mkdirs/index.js") + +function createFile (file, callback) { + function makeFile () { + fs.writeFile(file, '', err => { + if (err) return callback(err) + callback() + }) + } + + fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err + if (!err && stats.isFile()) return callback() + const dir = path.dirname(file) + fs.stat(dir, (err, stats) => { + if (err) { + // if the directory doesn't exist, make it + if (err.code === 'ENOENT') { + return mkdir.mkdirs(dir, err => { + if (err) return callback(err) + makeFile() + }) + } + return callback(err) + } + + if (stats.isDirectory()) makeFile() + else { + // parent is not a directory + // This is just to cause an internal ENOTDIR error to be thrown + fs.readdir(dir, err => { + if (err) return callback(err) + }) + } + }) + }) +} + +function createFileSync (file) { + let stats + try { + stats = fs.statSync(file) + } catch {} + if (stats && stats.isFile()) return + + const dir = path.dirname(file) + try { + if (!fs.statSync(dir).isDirectory()) { + // parent is not a directory + // This is just to cause an internal ENOTDIR error to be thrown + fs.readdirSync(dir) + } + } catch (err) { + // If the stat call above failed because the directory doesn't exist, create it + if (err && err.code === 'ENOENT') mkdir.mkdirsSync(dir) + else throw err + } + + fs.writeFileSync(file, '') +} + +module.exports = { + createFile: u(createFile), + createFileSync +} + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/ensure/index.js": +/*!***************************************************!*\ + !*** ./node_modules/fs-extra/lib/ensure/index.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const file = __webpack_require__(/*! ./file */ "./node_modules/fs-extra/lib/ensure/file.js") +const link = __webpack_require__(/*! ./link */ "./node_modules/fs-extra/lib/ensure/link.js") +const symlink = __webpack_require__(/*! ./symlink */ "./node_modules/fs-extra/lib/ensure/symlink.js") + +module.exports = { + // file + createFile: file.createFile, + createFileSync: file.createFileSync, + ensureFile: file.createFile, + ensureFileSync: file.createFileSync, + // link + createLink: link.createLink, + createLinkSync: link.createLinkSync, + ensureLink: link.createLink, + ensureLinkSync: link.createLinkSync, + // symlink + createSymlink: symlink.createSymlink, + createSymlinkSync: symlink.createSymlinkSync, + ensureSymlink: symlink.createSymlink, + ensureSymlinkSync: symlink.createSymlinkSync +} + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/ensure/link.js": +/*!**************************************************!*\ + !*** ./node_modules/fs-extra/lib/ensure/link.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const u = __webpack_require__(/*! universalify */ "./node_modules/universalify/index.js").fromCallback +const path = __webpack_require__(/*! path */ "path") +const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") +const mkdir = __webpack_require__(/*! ../mkdirs */ "./node_modules/fs-extra/lib/mkdirs/index.js") +const pathExists = __webpack_require__(/*! ../path-exists */ "./node_modules/fs-extra/lib/path-exists/index.js").pathExists +const { areIdentical } = __webpack_require__(/*! ../util/stat */ "./node_modules/fs-extra/lib/util/stat.js") + +function createLink (srcpath, dstpath, callback) { + function makeLink (srcpath, dstpath) { + fs.link(srcpath, dstpath, err => { + if (err) return callback(err) + callback(null) + }) + } + + fs.lstat(dstpath, (_, dstStat) => { + fs.lstat(srcpath, (err, srcStat) => { + if (err) { + err.message = err.message.replace('lstat', 'ensureLink') + return callback(err) + } + if (dstStat && areIdentical(srcStat, dstStat)) return callback(null) + + const dir = path.dirname(dstpath) + pathExists(dir, (err, dirExists) => { + if (err) return callback(err) + if (dirExists) return makeLink(srcpath, dstpath) + mkdir.mkdirs(dir, err => { + if (err) return callback(err) + makeLink(srcpath, dstpath) + }) + }) + }) + }) +} + +function createLinkSync (srcpath, dstpath) { + let dstStat + try { + dstStat = fs.lstatSync(dstpath) + } catch {} + + try { + const srcStat = fs.lstatSync(srcpath) + if (dstStat && areIdentical(srcStat, dstStat)) return + } catch (err) { + err.message = err.message.replace('lstat', 'ensureLink') + throw err + } + + const dir = path.dirname(dstpath) + const dirExists = fs.existsSync(dir) + if (dirExists) return fs.linkSync(srcpath, dstpath) + mkdir.mkdirsSync(dir) + + return fs.linkSync(srcpath, dstpath) +} + +module.exports = { + createLink: u(createLink), + createLinkSync +} + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/ensure/symlink-paths.js": +/*!***********************************************************!*\ + !*** ./node_modules/fs-extra/lib/ensure/symlink-paths.js ***! + \***********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const path = __webpack_require__(/*! path */ "path") +const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") +const pathExists = __webpack_require__(/*! ../path-exists */ "./node_modules/fs-extra/lib/path-exists/index.js").pathExists + +/** + * Function that returns two types of paths, one relative to symlink, and one + * relative to the current working directory. Checks if path is absolute or + * relative. If the path is relative, this function checks if the path is + * relative to symlink or relative to current working directory. This is an + * initiative to find a smarter `srcpath` to supply when building symlinks. + * This allows you to determine which path to use out of one of three possible + * types of source paths. The first is an absolute path. This is detected by + * `path.isAbsolute()`. When an absolute path is provided, it is checked to + * see if it exists. If it does it's used, if not an error is returned + * (callback)/ thrown (sync). The other two options for `srcpath` are a + * relative url. By default Node's `fs.symlink` works by creating a symlink + * using `dstpath` and expects the `srcpath` to be relative to the newly + * created symlink. If you provide a `srcpath` that does not exist on the file + * system it results in a broken symlink. To minimize this, the function + * checks to see if the 'relative to symlink' source file exists, and if it + * does it will use it. If it does not, it checks if there's a file that + * exists that is relative to the current working directory, if does its used. + * This preserves the expectations of the original fs.symlink spec and adds + * the ability to pass in `relative to current working direcotry` paths. + */ + +function symlinkPaths (srcpath, dstpath, callback) { + if (path.isAbsolute(srcpath)) { + return fs.lstat(srcpath, (err) => { + if (err) { + err.message = err.message.replace('lstat', 'ensureSymlink') + return callback(err) + } + return callback(null, { + toCwd: srcpath, + toDst: srcpath + }) + }) + } else { + const dstdir = path.dirname(dstpath) + const relativeToDst = path.join(dstdir, srcpath) + return pathExists(relativeToDst, (err, exists) => { + if (err) return callback(err) + if (exists) { + return callback(null, { + toCwd: relativeToDst, + toDst: srcpath + }) + } else { + return fs.lstat(srcpath, (err) => { + if (err) { + err.message = err.message.replace('lstat', 'ensureSymlink') + return callback(err) + } + return callback(null, { + toCwd: srcpath, + toDst: path.relative(dstdir, srcpath) + }) + }) + } + }) + } +} + +function symlinkPathsSync (srcpath, dstpath) { + let exists + if (path.isAbsolute(srcpath)) { + exists = fs.existsSync(srcpath) + if (!exists) throw new Error('absolute srcpath does not exist') + return { + toCwd: srcpath, + toDst: srcpath + } + } else { + const dstdir = path.dirname(dstpath) + const relativeToDst = path.join(dstdir, srcpath) + exists = fs.existsSync(relativeToDst) + if (exists) { + return { + toCwd: relativeToDst, + toDst: srcpath + } + } else { + exists = fs.existsSync(srcpath) + if (!exists) throw new Error('relative srcpath does not exist') + return { + toCwd: srcpath, + toDst: path.relative(dstdir, srcpath) + } + } + } +} + +module.exports = { + symlinkPaths, + symlinkPathsSync +} + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/ensure/symlink-type.js": +/*!**********************************************************!*\ + !*** ./node_modules/fs-extra/lib/ensure/symlink-type.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") + +function symlinkType (srcpath, type, callback) { + callback = (typeof type === 'function') ? type : callback + type = (typeof type === 'function') ? false : type + if (type) return callback(null, type) + fs.lstat(srcpath, (err, stats) => { + if (err) return callback(null, 'file') + type = (stats && stats.isDirectory()) ? 'dir' : 'file' + callback(null, type) + }) +} + +function symlinkTypeSync (srcpath, type) { + let stats + + if (type) return type + try { + stats = fs.lstatSync(srcpath) + } catch { + return 'file' + } + return (stats && stats.isDirectory()) ? 'dir' : 'file' +} + +module.exports = { + symlinkType, + symlinkTypeSync +} + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/ensure/symlink.js": +/*!*****************************************************!*\ + !*** ./node_modules/fs-extra/lib/ensure/symlink.js ***! + \*****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const u = __webpack_require__(/*! universalify */ "./node_modules/universalify/index.js").fromCallback +const path = __webpack_require__(/*! path */ "path") +const fs = __webpack_require__(/*! ../fs */ "./node_modules/fs-extra/lib/fs/index.js") +const _mkdirs = __webpack_require__(/*! ../mkdirs */ "./node_modules/fs-extra/lib/mkdirs/index.js") +const mkdirs = _mkdirs.mkdirs +const mkdirsSync = _mkdirs.mkdirsSync + +const _symlinkPaths = __webpack_require__(/*! ./symlink-paths */ "./node_modules/fs-extra/lib/ensure/symlink-paths.js") +const symlinkPaths = _symlinkPaths.symlinkPaths +const symlinkPathsSync = _symlinkPaths.symlinkPathsSync + +const _symlinkType = __webpack_require__(/*! ./symlink-type */ "./node_modules/fs-extra/lib/ensure/symlink-type.js") +const symlinkType = _symlinkType.symlinkType +const symlinkTypeSync = _symlinkType.symlinkTypeSync + +const pathExists = __webpack_require__(/*! ../path-exists */ "./node_modules/fs-extra/lib/path-exists/index.js").pathExists + +const { areIdentical } = __webpack_require__(/*! ../util/stat */ "./node_modules/fs-extra/lib/util/stat.js") + +function createSymlink (srcpath, dstpath, type, callback) { + callback = (typeof type === 'function') ? type : callback + type = (typeof type === 'function') ? false : type + + fs.lstat(dstpath, (err, stats) => { + if (!err && stats.isSymbolicLink()) { + Promise.all([ + fs.stat(srcpath), + fs.stat(dstpath) + ]).then(([srcStat, dstStat]) => { + if (areIdentical(srcStat, dstStat)) return callback(null) + _createSymlink(srcpath, dstpath, type, callback) + }) + } else _createSymlink(srcpath, dstpath, type, callback) + }) +} + +function _createSymlink (srcpath, dstpath, type, callback) { + symlinkPaths(srcpath, dstpath, (err, relative) => { + if (err) return callback(err) + srcpath = relative.toDst + symlinkType(relative.toCwd, type, (err, type) => { + if (err) return callback(err) + const dir = path.dirname(dstpath) + pathExists(dir, (err, dirExists) => { + if (err) return callback(err) + if (dirExists) return fs.symlink(srcpath, dstpath, type, callback) + mkdirs(dir, err => { + if (err) return callback(err) + fs.symlink(srcpath, dstpath, type, callback) + }) + }) + }) + }) +} + +function createSymlinkSync (srcpath, dstpath, type) { + let stats + try { + stats = fs.lstatSync(dstpath) + } catch {} + if (stats && stats.isSymbolicLink()) { + const srcStat = fs.statSync(srcpath) + const dstStat = fs.statSync(dstpath) + if (areIdentical(srcStat, dstStat)) return + } + + const relative = symlinkPathsSync(srcpath, dstpath) + srcpath = relative.toDst + type = symlinkTypeSync(relative.toCwd, type) + const dir = path.dirname(dstpath) + const exists = fs.existsSync(dir) + if (exists) return fs.symlinkSync(srcpath, dstpath, type) + mkdirsSync(dir) + return fs.symlinkSync(srcpath, dstpath, type) +} + +module.exports = { + createSymlink: u(createSymlink), + createSymlinkSync +} + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/fs/index.js": +/*!***********************************************!*\ + !*** ./node_modules/fs-extra/lib/fs/index.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// This is adapted from https://github.com/normalize/mz +// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors +const u = __webpack_require__(/*! universalify */ "./node_modules/universalify/index.js").fromCallback +const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") + +const api = [ + 'access', + 'appendFile', + 'chmod', + 'chown', + 'close', + 'copyFile', + 'fchmod', + 'fchown', + 'fdatasync', + 'fstat', + 'fsync', + 'ftruncate', + 'futimes', + 'lchmod', + 'lchown', + 'link', + 'lstat', + 'mkdir', + 'mkdtemp', + 'open', + 'opendir', + 'readdir', + 'readFile', + 'readlink', + 'realpath', + 'rename', + 'rm', + 'rmdir', + 'stat', + 'symlink', + 'truncate', + 'unlink', + 'utimes', + 'writeFile' +].filter(key => { + // Some commands are not available on some systems. Ex: + // fs.opendir was added in Node.js v12.12.0 + // fs.rm was added in Node.js v14.14.0 + // fs.lchown is not available on at least some Linux + return typeof fs[key] === 'function' +}) + +// Export cloned fs: +Object.assign(exports, fs) + +// Universalify async methods: +api.forEach(method => { + exports[method] = u(fs[method]) +}) +exports.realpath.native = u(fs.realpath.native) + +// We differ from mz/fs in that we still ship the old, broken, fs.exists() +// since we are a drop-in replacement for the native module +exports.exists = function (filename, callback) { + if (typeof callback === 'function') { + return fs.exists(filename, callback) + } + return new Promise(resolve => { + return fs.exists(filename, resolve) + }) +} + +// fs.read(), fs.write(), & fs.writev() need special treatment due to multiple callback args + +exports.read = function (fd, buffer, offset, length, position, callback) { + if (typeof callback === 'function') { + return fs.read(fd, buffer, offset, length, position, callback) + } + return new Promise((resolve, reject) => { + fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => { + if (err) return reject(err) + resolve({ bytesRead, buffer }) + }) + }) +} + +// Function signature can be +// fs.write(fd, buffer[, offset[, length[, position]]], callback) +// OR +// fs.write(fd, string[, position[, encoding]], callback) +// We need to handle both cases, so we use ...args +exports.write = function (fd, buffer, ...args) { + if (typeof args[args.length - 1] === 'function') { + return fs.write(fd, buffer, ...args) + } + + return new Promise((resolve, reject) => { + fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => { + if (err) return reject(err) + resolve({ bytesWritten, buffer }) + }) + }) +} + +// fs.writev only available in Node v12.9.0+ +if (typeof fs.writev === 'function') { + // Function signature is + // s.writev(fd, buffers[, position], callback) + // We need to handle the optional arg, so we use ...args + exports.writev = function (fd, buffers, ...args) { + if (typeof args[args.length - 1] === 'function') { + return fs.writev(fd, buffers, ...args) + } + + return new Promise((resolve, reject) => { + fs.writev(fd, buffers, ...args, (err, bytesWritten, buffers) => { + if (err) return reject(err) + resolve({ bytesWritten, buffers }) + }) + }) + } +} + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/index.js": +/*!********************************************!*\ + !*** ./node_modules/fs-extra/lib/index.js ***! + \********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = { + // Export promiseified graceful-fs: + ...__webpack_require__(/*! ./fs */ "./node_modules/fs-extra/lib/fs/index.js"), + // Export extra methods: + ...__webpack_require__(/*! ./copy-sync */ "./node_modules/fs-extra/lib/copy-sync/index.js"), + ...__webpack_require__(/*! ./copy */ "./node_modules/fs-extra/lib/copy/index.js"), + ...__webpack_require__(/*! ./empty */ "./node_modules/fs-extra/lib/empty/index.js"), + ...__webpack_require__(/*! ./ensure */ "./node_modules/fs-extra/lib/ensure/index.js"), + ...__webpack_require__(/*! ./json */ "./node_modules/fs-extra/lib/json/index.js"), + ...__webpack_require__(/*! ./mkdirs */ "./node_modules/fs-extra/lib/mkdirs/index.js"), + ...__webpack_require__(/*! ./move-sync */ "./node_modules/fs-extra/lib/move-sync/index.js"), + ...__webpack_require__(/*! ./move */ "./node_modules/fs-extra/lib/move/index.js"), + ...__webpack_require__(/*! ./output */ "./node_modules/fs-extra/lib/output/index.js"), + ...__webpack_require__(/*! ./path-exists */ "./node_modules/fs-extra/lib/path-exists/index.js"), + ...__webpack_require__(/*! ./remove */ "./node_modules/fs-extra/lib/remove/index.js") +} + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/json/index.js": +/*!*************************************************!*\ + !*** ./node_modules/fs-extra/lib/json/index.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const u = __webpack_require__(/*! universalify */ "./node_modules/universalify/index.js").fromPromise +const jsonFile = __webpack_require__(/*! ./jsonfile */ "./node_modules/fs-extra/lib/json/jsonfile.js") + +jsonFile.outputJson = u(__webpack_require__(/*! ./output-json */ "./node_modules/fs-extra/lib/json/output-json.js")) +jsonFile.outputJsonSync = __webpack_require__(/*! ./output-json-sync */ "./node_modules/fs-extra/lib/json/output-json-sync.js") +// aliases +jsonFile.outputJSON = jsonFile.outputJson +jsonFile.outputJSONSync = jsonFile.outputJsonSync +jsonFile.writeJSON = jsonFile.writeJson +jsonFile.writeJSONSync = jsonFile.writeJsonSync +jsonFile.readJSON = jsonFile.readJson +jsonFile.readJSONSync = jsonFile.readJsonSync + +module.exports = jsonFile + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/json/jsonfile.js": +/*!****************************************************!*\ + !*** ./node_modules/fs-extra/lib/json/jsonfile.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const jsonFile = __webpack_require__(/*! jsonfile */ "./node_modules/jsonfile/index.js") + +module.exports = { + // jsonfile exports + readJson: jsonFile.readFile, + readJsonSync: jsonFile.readFileSync, + writeJson: jsonFile.writeFile, + writeJsonSync: jsonFile.writeFileSync +} + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/json/output-json-sync.js": +/*!************************************************************!*\ + !*** ./node_modules/fs-extra/lib/json/output-json-sync.js ***! + \************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const { stringify } = __webpack_require__(/*! jsonfile/utils */ "./node_modules/jsonfile/utils.js") +const { outputFileSync } = __webpack_require__(/*! ../output */ "./node_modules/fs-extra/lib/output/index.js") + +function outputJsonSync (file, data, options) { + const str = stringify(data, options) + + outputFileSync(file, str, options) +} + +module.exports = outputJsonSync + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/json/output-json.js": +/*!*******************************************************!*\ + !*** ./node_modules/fs-extra/lib/json/output-json.js ***! + \*******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const { stringify } = __webpack_require__(/*! jsonfile/utils */ "./node_modules/jsonfile/utils.js") +const { outputFile } = __webpack_require__(/*! ../output */ "./node_modules/fs-extra/lib/output/index.js") + +async function outputJson (file, data, options = {}) { + const str = stringify(data, options) + + await outputFile(file, str, options) +} + +module.exports = outputJson + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/mkdirs/index.js": +/*!***************************************************!*\ + !*** ./node_modules/fs-extra/lib/mkdirs/index.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const u = __webpack_require__(/*! universalify */ "./node_modules/universalify/index.js").fromPromise +const { makeDir: _makeDir, makeDirSync } = __webpack_require__(/*! ./make-dir */ "./node_modules/fs-extra/lib/mkdirs/make-dir.js") +const makeDir = u(_makeDir) + +module.exports = { + mkdirs: makeDir, + mkdirsSync: makeDirSync, + // alias + mkdirp: makeDir, + mkdirpSync: makeDirSync, + ensureDir: makeDir, + ensureDirSync: makeDirSync +} + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/mkdirs/make-dir.js": +/*!******************************************************!*\ + !*** ./node_modules/fs-extra/lib/mkdirs/make-dir.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const fs = __webpack_require__(/*! ../fs */ "./node_modules/fs-extra/lib/fs/index.js") +const { checkPath } = __webpack_require__(/*! ./utils */ "./node_modules/fs-extra/lib/mkdirs/utils.js") + +const getMode = options => { + const defaults = { mode: 0o777 } + if (typeof options === 'number') return options + return ({ ...defaults, ...options }).mode +} + +module.exports.makeDir = async (dir, options) => { + checkPath(dir) + + return fs.mkdir(dir, { + mode: getMode(options), + recursive: true + }) +} + +module.exports.makeDirSync = (dir, options) => { + checkPath(dir) + + return fs.mkdirSync(dir, { + mode: getMode(options), + recursive: true + }) +} + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/mkdirs/utils.js": +/*!***************************************************!*\ + !*** ./node_modules/fs-extra/lib/mkdirs/utils.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +// Adapted from https://github.com/sindresorhus/make-dir +// Copyright (c) Sindre Sorhus (sindresorhus.com) +// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +const path = __webpack_require__(/*! path */ "path") + +// https://github.com/nodejs/node/issues/8987 +// https://github.com/libuv/libuv/pull/1088 +module.exports.checkPath = function checkPath (pth) { + if (process.platform === 'win32') { + const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, '')) + + if (pathHasInvalidWinCharacters) { + const error = new Error(`Path contains invalid characters: ${pth}`) + error.code = 'EINVAL' + throw error + } + } +} + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/move-sync/index.js": +/*!******************************************************!*\ + !*** ./node_modules/fs-extra/lib/move-sync/index.js ***! + \******************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = { + moveSync: __webpack_require__(/*! ./move-sync */ "./node_modules/fs-extra/lib/move-sync/move-sync.js") +} + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/move-sync/move-sync.js": +/*!**********************************************************!*\ + !*** ./node_modules/fs-extra/lib/move-sync/move-sync.js ***! + \**********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") +const path = __webpack_require__(/*! path */ "path") +const copySync = __webpack_require__(/*! ../copy-sync */ "./node_modules/fs-extra/lib/copy-sync/index.js").copySync +const removeSync = __webpack_require__(/*! ../remove */ "./node_modules/fs-extra/lib/remove/index.js").removeSync +const mkdirpSync = __webpack_require__(/*! ../mkdirs */ "./node_modules/fs-extra/lib/mkdirs/index.js").mkdirpSync +const stat = __webpack_require__(/*! ../util/stat */ "./node_modules/fs-extra/lib/util/stat.js") + +function moveSync (src, dest, opts) { + opts = opts || {} + const overwrite = opts.overwrite || opts.clobber || false + + const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, 'move', opts) + stat.checkParentPathsSync(src, srcStat, dest, 'move') + if (!isParentRoot(dest)) mkdirpSync(path.dirname(dest)) + return doRename(src, dest, overwrite, isChangingCase) +} + +function isParentRoot (dest) { + const parent = path.dirname(dest) + const parsedPath = path.parse(parent) + return parsedPath.root === parent +} + +function doRename (src, dest, overwrite, isChangingCase) { + if (isChangingCase) return rename(src, dest, overwrite) + if (overwrite) { + removeSync(dest) + return rename(src, dest, overwrite) + } + if (fs.existsSync(dest)) throw new Error('dest already exists.') + return rename(src, dest, overwrite) +} + +function rename (src, dest, overwrite) { + try { + fs.renameSync(src, dest) + } catch (err) { + if (err.code !== 'EXDEV') throw err + return moveAcrossDevice(src, dest, overwrite) + } +} + +function moveAcrossDevice (src, dest, overwrite) { + const opts = { + overwrite, + errorOnExist: true + } + copySync(src, dest, opts) + return removeSync(src) +} + +module.exports = moveSync + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/move/index.js": +/*!*************************************************!*\ + !*** ./node_modules/fs-extra/lib/move/index.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const u = __webpack_require__(/*! universalify */ "./node_modules/universalify/index.js").fromCallback +module.exports = { + move: u(__webpack_require__(/*! ./move */ "./node_modules/fs-extra/lib/move/move.js")) +} + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/move/move.js": +/*!************************************************!*\ + !*** ./node_modules/fs-extra/lib/move/move.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") +const path = __webpack_require__(/*! path */ "path") +const copy = __webpack_require__(/*! ../copy */ "./node_modules/fs-extra/lib/copy/index.js").copy +const remove = __webpack_require__(/*! ../remove */ "./node_modules/fs-extra/lib/remove/index.js").remove +const mkdirp = __webpack_require__(/*! ../mkdirs */ "./node_modules/fs-extra/lib/mkdirs/index.js").mkdirp +const pathExists = __webpack_require__(/*! ../path-exists */ "./node_modules/fs-extra/lib/path-exists/index.js").pathExists +const stat = __webpack_require__(/*! ../util/stat */ "./node_modules/fs-extra/lib/util/stat.js") + +function move (src, dest, opts, cb) { + if (typeof opts === 'function') { + cb = opts + opts = {} + } + + const overwrite = opts.overwrite || opts.clobber || false + + stat.checkPaths(src, dest, 'move', opts, (err, stats) => { + if (err) return cb(err) + const { srcStat, isChangingCase = false } = stats + stat.checkParentPaths(src, srcStat, dest, 'move', err => { + if (err) return cb(err) + if (isParentRoot(dest)) return doRename(src, dest, overwrite, isChangingCase, cb) + mkdirp(path.dirname(dest), err => { + if (err) return cb(err) + return doRename(src, dest, overwrite, isChangingCase, cb) + }) + }) + }) +} + +function isParentRoot (dest) { + const parent = path.dirname(dest) + const parsedPath = path.parse(parent) + return parsedPath.root === parent +} + +function doRename (src, dest, overwrite, isChangingCase, cb) { + if (isChangingCase) return rename(src, dest, overwrite, cb) + if (overwrite) { + return remove(dest, err => { + if (err) return cb(err) + return rename(src, dest, overwrite, cb) + }) + } + pathExists(dest, (err, destExists) => { + if (err) return cb(err) + if (destExists) return cb(new Error('dest already exists.')) + return rename(src, dest, overwrite, cb) + }) +} + +function rename (src, dest, overwrite, cb) { + fs.rename(src, dest, err => { + if (!err) return cb() + if (err.code !== 'EXDEV') return cb(err) + return moveAcrossDevice(src, dest, overwrite, cb) + }) +} + +function moveAcrossDevice (src, dest, overwrite, cb) { + const opts = { + overwrite, + errorOnExist: true + } + copy(src, dest, opts, err => { + if (err) return cb(err) + return remove(src, cb) + }) +} + +module.exports = move + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/output/index.js": +/*!***************************************************!*\ + !*** ./node_modules/fs-extra/lib/output/index.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const u = __webpack_require__(/*! universalify */ "./node_modules/universalify/index.js").fromCallback +const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") +const path = __webpack_require__(/*! path */ "path") +const mkdir = __webpack_require__(/*! ../mkdirs */ "./node_modules/fs-extra/lib/mkdirs/index.js") +const pathExists = __webpack_require__(/*! ../path-exists */ "./node_modules/fs-extra/lib/path-exists/index.js").pathExists + +function outputFile (file, data, encoding, callback) { + if (typeof encoding === 'function') { + callback = encoding + encoding = 'utf8' + } + + const dir = path.dirname(file) + pathExists(dir, (err, itDoes) => { + if (err) return callback(err) + if (itDoes) return fs.writeFile(file, data, encoding, callback) + + mkdir.mkdirs(dir, err => { + if (err) return callback(err) + + fs.writeFile(file, data, encoding, callback) + }) + }) +} + +function outputFileSync (file, ...args) { + const dir = path.dirname(file) + if (fs.existsSync(dir)) { + return fs.writeFileSync(file, ...args) + } + mkdir.mkdirsSync(dir) + fs.writeFileSync(file, ...args) +} + +module.exports = { + outputFile: u(outputFile), + outputFileSync +} + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/path-exists/index.js": +/*!********************************************************!*\ + !*** ./node_modules/fs-extra/lib/path-exists/index.js ***! + \********************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const u = __webpack_require__(/*! universalify */ "./node_modules/universalify/index.js").fromPromise +const fs = __webpack_require__(/*! ../fs */ "./node_modules/fs-extra/lib/fs/index.js") + +function pathExists (path) { + return fs.access(path).then(() => true).catch(() => false) +} + +module.exports = { + pathExists: u(pathExists), + pathExistsSync: fs.existsSync +} + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/remove/index.js": +/*!***************************************************!*\ + !*** ./node_modules/fs-extra/lib/remove/index.js ***! + \***************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") +const u = __webpack_require__(/*! universalify */ "./node_modules/universalify/index.js").fromCallback +const rimraf = __webpack_require__(/*! ./rimraf */ "./node_modules/fs-extra/lib/remove/rimraf.js") + +function remove (path, callback) { + // Node 14.14.0+ + if (fs.rm) return fs.rm(path, { recursive: true, force: true }, callback) + rimraf(path, callback) +} + +function removeSync (path) { + // Node 14.14.0+ + if (fs.rmSync) return fs.rmSync(path, { recursive: true, force: true }) + rimraf.sync(path) +} + +module.exports = { + remove: u(remove), + removeSync +} + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/remove/rimraf.js": +/*!****************************************************!*\ + !*** ./node_modules/fs-extra/lib/remove/rimraf.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") +const path = __webpack_require__(/*! path */ "path") +const assert = __webpack_require__(/*! assert */ "assert") + +const isWindows = (process.platform === 'win32') + +function defaults (options) { + const methods = [ + 'unlink', + 'chmod', + 'stat', + 'lstat', + 'rmdir', + 'readdir' + ] + methods.forEach(m => { + options[m] = options[m] || fs[m] + m = m + 'Sync' + options[m] = options[m] || fs[m] + }) + + options.maxBusyTries = options.maxBusyTries || 3 +} + +function rimraf (p, options, cb) { + let busyTries = 0 + + if (typeof options === 'function') { + cb = options + options = {} + } + + assert(p, 'rimraf: missing path') + assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string') + assert.strictEqual(typeof cb, 'function', 'rimraf: callback function required') + assert(options, 'rimraf: invalid options argument provided') + assert.strictEqual(typeof options, 'object', 'rimraf: options should be object') + + defaults(options) + + rimraf_(p, options, function CB (er) { + if (er) { + if ((er.code === 'EBUSY' || er.code === 'ENOTEMPTY' || er.code === 'EPERM') && + busyTries < options.maxBusyTries) { + busyTries++ + const time = busyTries * 100 + // try again, with the same exact callback as this one. + return setTimeout(() => rimraf_(p, options, CB), time) + } + + // already gone + if (er.code === 'ENOENT') er = null + } + + cb(er) + }) +} + +// Two possible strategies. +// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR +// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR +// +// Both result in an extra syscall when you guess wrong. However, there +// are likely far more normal files in the world than directories. This +// is based on the assumption that a the average number of files per +// directory is >= 1. +// +// If anyone ever complains about this, then I guess the strategy could +// be made configurable somehow. But until then, YAGNI. +function rimraf_ (p, options, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + + // sunos lets the root user unlink directories, which is... weird. + // so we have to lstat here and make sure it's not a dir. + options.lstat(p, (er, st) => { + if (er && er.code === 'ENOENT') { + return cb(null) + } + + // Windows can EPERM on stat. Life is suffering. + if (er && er.code === 'EPERM' && isWindows) { + return fixWinEPERM(p, options, er, cb) + } + + if (st && st.isDirectory()) { + return rmdir(p, options, er, cb) + } + + options.unlink(p, er => { + if (er) { + if (er.code === 'ENOENT') { + return cb(null) + } + if (er.code === 'EPERM') { + return (isWindows) + ? fixWinEPERM(p, options, er, cb) + : rmdir(p, options, er, cb) + } + if (er.code === 'EISDIR') { + return rmdir(p, options, er, cb) + } + } + return cb(er) + }) + }) +} + +function fixWinEPERM (p, options, er, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + + options.chmod(p, 0o666, er2 => { + if (er2) { + cb(er2.code === 'ENOENT' ? null : er) + } else { + options.stat(p, (er3, stats) => { + if (er3) { + cb(er3.code === 'ENOENT' ? null : er) + } else if (stats.isDirectory()) { + rmdir(p, options, er, cb) + } else { + options.unlink(p, cb) + } + }) + } + }) +} + +function fixWinEPERMSync (p, options, er) { + let stats + + assert(p) + assert(options) + + try { + options.chmodSync(p, 0o666) + } catch (er2) { + if (er2.code === 'ENOENT') { + return + } else { + throw er + } + } + + try { + stats = options.statSync(p) + } catch (er3) { + if (er3.code === 'ENOENT') { + return + } else { + throw er + } + } + + if (stats.isDirectory()) { + rmdirSync(p, options, er) + } else { + options.unlinkSync(p) + } +} + +function rmdir (p, options, originalEr, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + + // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) + // if we guessed wrong, and it's not a directory, then + // raise the original error. + options.rmdir(p, er => { + if (er && (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM')) { + rmkids(p, options, cb) + } else if (er && er.code === 'ENOTDIR') { + cb(originalEr) + } else { + cb(er) + } + }) +} + +function rmkids (p, options, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + + options.readdir(p, (er, files) => { + if (er) return cb(er) + + let n = files.length + let errState + + if (n === 0) return options.rmdir(p, cb) + + files.forEach(f => { + rimraf(path.join(p, f), options, er => { + if (errState) { + return + } + if (er) return cb(errState = er) + if (--n === 0) { + options.rmdir(p, cb) + } + }) + }) + }) +} + +// this looks simpler, and is strictly *faster*, but will +// tie up the JavaScript thread and fail on excessively +// deep directory trees. +function rimrafSync (p, options) { + let st + + options = options || {} + defaults(options) + + assert(p, 'rimraf: missing path') + assert.strictEqual(typeof p, 'string', 'rimraf: path should be a string') + assert(options, 'rimraf: missing options') + assert.strictEqual(typeof options, 'object', 'rimraf: options should be object') + + try { + st = options.lstatSync(p) + } catch (er) { + if (er.code === 'ENOENT') { + return + } + + // Windows can EPERM on stat. Life is suffering. + if (er.code === 'EPERM' && isWindows) { + fixWinEPERMSync(p, options, er) + } + } + + try { + // sunos lets the root user unlink directories, which is... weird. + if (st && st.isDirectory()) { + rmdirSync(p, options, null) + } else { + options.unlinkSync(p) + } + } catch (er) { + if (er.code === 'ENOENT') { + return + } else if (er.code === 'EPERM') { + return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er) + } else if (er.code !== 'EISDIR') { + throw er + } + rmdirSync(p, options, er) + } +} + +function rmdirSync (p, options, originalEr) { + assert(p) + assert(options) + + try { + options.rmdirSync(p) + } catch (er) { + if (er.code === 'ENOTDIR') { + throw originalEr + } else if (er.code === 'ENOTEMPTY' || er.code === 'EEXIST' || er.code === 'EPERM') { + rmkidsSync(p, options) + } else if (er.code !== 'ENOENT') { + throw er + } + } +} + +function rmkidsSync (p, options) { + assert(p) + assert(options) + options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options)) + + if (isWindows) { + // We only end up here once we got ENOTEMPTY at least once, and + // at this point, we are guaranteed to have removed all the kids. + // So, we know that it won't be ENOENT or ENOTDIR or anything else. + // try really hard to delete stuff on windows, because it has a + // PROFOUNDLY annoying habit of not closing handles promptly when + // files are deleted, resulting in spurious ENOTEMPTY errors. + const startTime = Date.now() + do { + try { + const ret = options.rmdirSync(p, options) + return ret + } catch {} + } while (Date.now() - startTime < 500) // give up after 500ms + } else { + const ret = options.rmdirSync(p, options) + return ret + } +} + +module.exports = rimraf +rimraf.sync = rimrafSync + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/util/stat.js": +/*!************************************************!*\ + !*** ./node_modules/fs-extra/lib/util/stat.js ***! + \************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const fs = __webpack_require__(/*! ../fs */ "./node_modules/fs-extra/lib/fs/index.js") +const path = __webpack_require__(/*! path */ "path") +const util = __webpack_require__(/*! util */ "util") + +function getStats (src, dest, opts) { + const statFunc = opts.dereference + ? (file) => fs.stat(file, { bigint: true }) + : (file) => fs.lstat(file, { bigint: true }) + return Promise.all([ + statFunc(src), + statFunc(dest).catch(err => { + if (err.code === 'ENOENT') return null + throw err + }) + ]).then(([srcStat, destStat]) => ({ srcStat, destStat })) +} + +function getStatsSync (src, dest, opts) { + let destStat + const statFunc = opts.dereference + ? (file) => fs.statSync(file, { bigint: true }) + : (file) => fs.lstatSync(file, { bigint: true }) + const srcStat = statFunc(src) + try { + destStat = statFunc(dest) + } catch (err) { + if (err.code === 'ENOENT') return { srcStat, destStat: null } + throw err + } + return { srcStat, destStat } +} + +function checkPaths (src, dest, funcName, opts, cb) { + util.callbackify(getStats)(src, dest, opts, (err, stats) => { + if (err) return cb(err) + const { srcStat, destStat } = stats + + if (destStat) { + if (areIdentical(srcStat, destStat)) { + const srcBaseName = path.basename(src) + const destBaseName = path.basename(dest) + if (funcName === 'move' && + srcBaseName !== destBaseName && + srcBaseName.toLowerCase() === destBaseName.toLowerCase()) { + return cb(null, { srcStat, destStat, isChangingCase: true }) + } + return cb(new Error('Source and destination must not be the same.')) + } + if (srcStat.isDirectory() && !destStat.isDirectory()) { + return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)) + } + if (!srcStat.isDirectory() && destStat.isDirectory()) { + return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`)) + } + } + + if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { + return cb(new Error(errMsg(src, dest, funcName))) + } + return cb(null, { srcStat, destStat }) + }) +} + +function checkPathsSync (src, dest, funcName, opts) { + const { srcStat, destStat } = getStatsSync(src, dest, opts) + + if (destStat) { + if (areIdentical(srcStat, destStat)) { + const srcBaseName = path.basename(src) + const destBaseName = path.basename(dest) + if (funcName === 'move' && + srcBaseName !== destBaseName && + srcBaseName.toLowerCase() === destBaseName.toLowerCase()) { + return { srcStat, destStat, isChangingCase: true } + } + throw new Error('Source and destination must not be the same.') + } + if (srcStat.isDirectory() && !destStat.isDirectory()) { + throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`) + } + if (!srcStat.isDirectory() && destStat.isDirectory()) { + throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`) + } + } + + if (srcStat.isDirectory() && isSrcSubdir(src, dest)) { + throw new Error(errMsg(src, dest, funcName)) + } + return { srcStat, destStat } +} + +// recursively check if dest parent is a subdirectory of src. +// It works for all file types including symlinks since it +// checks the src and dest inodes. It starts from the deepest +// parent and stops once it reaches the src parent or the root path. +function checkParentPaths (src, srcStat, dest, funcName, cb) { + const srcParent = path.resolve(path.dirname(src)) + const destParent = path.resolve(path.dirname(dest)) + if (destParent === srcParent || destParent === path.parse(destParent).root) return cb() + fs.stat(destParent, { bigint: true }, (err, destStat) => { + if (err) { + if (err.code === 'ENOENT') return cb() + return cb(err) + } + if (areIdentical(srcStat, destStat)) { + return cb(new Error(errMsg(src, dest, funcName))) + } + return checkParentPaths(src, srcStat, destParent, funcName, cb) + }) +} + +function checkParentPathsSync (src, srcStat, dest, funcName) { + const srcParent = path.resolve(path.dirname(src)) + const destParent = path.resolve(path.dirname(dest)) + if (destParent === srcParent || destParent === path.parse(destParent).root) return + let destStat + try { + destStat = fs.statSync(destParent, { bigint: true }) + } catch (err) { + if (err.code === 'ENOENT') return + throw err + } + if (areIdentical(srcStat, destStat)) { + throw new Error(errMsg(src, dest, funcName)) + } + return checkParentPathsSync(src, srcStat, destParent, funcName) +} + +function areIdentical (srcStat, destStat) { + return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev +} + +// return true if dest is a subdir of src, otherwise false. +// It only checks the path strings. +function isSrcSubdir (src, dest) { + const srcArr = path.resolve(src).split(path.sep).filter(i => i) + const destArr = path.resolve(dest).split(path.sep).filter(i => i) + return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true) +} + +function errMsg (src, dest, funcName) { + return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.` +} + +module.exports = { + checkPaths, + checkPathsSync, + checkParentPaths, + checkParentPathsSync, + isSrcSubdir, + areIdentical +} + + +/***/ }), + +/***/ "./node_modules/fs-extra/lib/util/utimes.js": +/*!**************************************************!*\ + !*** ./node_modules/fs-extra/lib/util/utimes.js ***! + \**************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +const fs = __webpack_require__(/*! graceful-fs */ "./node_modules/graceful-fs/graceful-fs.js") + +function utimesMillis (path, atime, mtime, callback) { + // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback) + fs.open(path, 'r+', (err, fd) => { + if (err) return callback(err) + fs.futimes(fd, atime, mtime, futimesErr => { + fs.close(fd, closeErr => { + if (callback) callback(futimesErr || closeErr) + }) + }) + }) +} + +function utimesMillisSync (path, atime, mtime) { + const fd = fs.openSync(path, 'r+') + fs.futimesSync(fd, atime, mtime) + return fs.closeSync(fd) +} + +module.exports = { + utimesMillis, + utimesMillisSync +} + + +/***/ }), + +/***/ "./node_modules/fs.realpath/index.js": +/*!*******************************************!*\ + !*** ./node_modules/fs.realpath/index.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = realpath +realpath.realpath = realpath +realpath.sync = realpathSync +realpath.realpathSync = realpathSync +realpath.monkeypatch = monkeypatch +realpath.unmonkeypatch = unmonkeypatch + +var fs = __webpack_require__(/*! fs */ "fs") +var origRealpath = fs.realpath +var origRealpathSync = fs.realpathSync + +var version = process.version +var ok = /^v[0-5]\./.test(version) +var old = __webpack_require__(/*! ./old.js */ "./node_modules/fs.realpath/old.js") + +function newError (er) { + return er && er.syscall === 'realpath' && ( + er.code === 'ELOOP' || + er.code === 'ENOMEM' || + er.code === 'ENAMETOOLONG' + ) +} + +function realpath (p, cache, cb) { + if (ok) { + return origRealpath(p, cache, cb) + } + + if (typeof cache === 'function') { + cb = cache + cache = null + } + origRealpath(p, cache, function (er, result) { + if (newError(er)) { + old.realpath(p, cache, cb) + } else { + cb(er, result) + } + }) +} + +function realpathSync (p, cache) { + if (ok) { + return origRealpathSync(p, cache) + } + + try { + return origRealpathSync(p, cache) + } catch (er) { + if (newError(er)) { + return old.realpathSync(p, cache) + } else { + throw er + } + } +} + +function monkeypatch () { + fs.realpath = realpath + fs.realpathSync = realpathSync +} + +function unmonkeypatch () { + fs.realpath = origRealpath + fs.realpathSync = origRealpathSync +} + + +/***/ }), + +/***/ "./node_modules/fs.realpath/old.js": +/*!*****************************************!*\ + !*** ./node_modules/fs.realpath/old.js ***! + \*****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +var pathModule = __webpack_require__(/*! path */ "path"); +var isWindows = process.platform === 'win32'; +var fs = __webpack_require__(/*! fs */ "fs"); + +// JavaScript implementation of realpath, ported from node pre-v6 + +var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); + +function rethrow() { + // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and + // is fairly slow to generate. + var callback; + if (DEBUG) { + var backtrace = new Error; + callback = debugCallback; + } else + callback = missingCallback; + + return callback; + + function debugCallback(err) { + if (err) { + backtrace.message = err.message; + err = backtrace; + missingCallback(err); + } + } + + function missingCallback(err) { + if (err) { + if (process.throwDeprecation) + throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs + else if (!process.noDeprecation) { + var msg = 'fs: missing callback ' + (err.stack || err.message); + if (process.traceDeprecation) + console.trace(msg); + else + console.error(msg); + } + } + } +} + +function maybeCallback(cb) { + return typeof cb === 'function' ? cb : rethrow(); +} + +var normalize = pathModule.normalize; + +// Regexp that finds the next partion of a (partial) path +// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] +if (isWindows) { + var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; +} else { + var nextPartRe = /(.*?)(?:[\/]+|$)/g; +} + +// Regex to find the device root, including trailing slash. E.g. 'c:\\'. +if (isWindows) { + var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; +} else { + var splitRootRe = /^[\/]*/; +} + +exports.realpathSync = function realpathSync(p, cache) { + // make p is absolute + p = pathModule.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return cache[p]; + } + + var original = p, + seenLinks = {}, + knownHard = {}; + + // current character position in p + var pos; + // the partial path so far, including a trailing slash if any + var current; + // the partial path without a trailing slash (except when pointing at a root) + var base; + // the partial path scanned in the previous round, with slash + var previous; + + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstatSync(base); + knownHard[base] = true; + } + } + + // walk down the path, swapping out linked pathparts for their real + // values + // NB: p.length changes. + while (pos < p.length) { + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + + // continue if not a symlink + if (knownHard[base] || (cache && cache[base] === base)) { + continue; + } + + var resolvedLink; + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // some known symbolic link. no need to stat again. + resolvedLink = cache[base]; + } else { + var stat = fs.lstatSync(base); + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + continue; + } + + // read the link if it wasn't read before + // dev/ino always return 0 on windows, so skip the check. + var linkTarget = null; + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + linkTarget = seenLinks[id]; + } + } + if (linkTarget === null) { + fs.statSync(base); + linkTarget = fs.readlinkSync(base); + } + resolvedLink = pathModule.resolve(previous, linkTarget); + // track this, if given a cache. + if (cache) cache[base] = resolvedLink; + if (!isWindows) seenLinks[id] = linkTarget; + } + + // resolve the link, then start over + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } + + if (cache) cache[original] = p; + + return p; +}; + + +exports.realpath = function realpath(p, cache, cb) { + if (typeof cb !== 'function') { + cb = maybeCallback(cache); + cache = null; + } + + // make p is absolute + p = pathModule.resolve(p); + + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return process.nextTick(cb.bind(null, null, cache[p])); + } + + var original = p, + seenLinks = {}, + knownHard = {}; + + // current character position in p + var pos; + // the partial path so far, including a trailing slash if any + var current; + // the partial path without a trailing slash (except when pointing at a root) + var base; + // the partial path scanned in the previous round, with slash + var previous; + + start(); + + function start() { + // Skip over roots + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ''; + + // On windows, check that the root exists. On unix there is no need. + if (isWindows && !knownHard[base]) { + fs.lstat(base, function(err) { + if (err) return cb(err); + knownHard[base] = true; + LOOP(); + }); + } else { + process.nextTick(LOOP); + } + } + + // walk down the path, swapping out linked pathparts for their real + // values + function LOOP() { + // stop if scanned past end of path + if (pos >= p.length) { + if (cache) cache[original] = p; + return cb(null, p); + } + + // find the next part + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + + // continue if not a symlink + if (knownHard[base] || (cache && cache[base] === base)) { + return process.nextTick(LOOP); + } + + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + // known symbolic link. no need to stat again. + return gotResolvedLink(cache[base]); + } + + return fs.lstat(base, gotStat); + } + + function gotStat(err, stat) { + if (err) return cb(err); + + // if not a symlink, skip to the next path part + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + return process.nextTick(LOOP); + } + + // stat & read the link if not read before + // call gotTarget as soon as the link target is known + // dev/ino always return 0 on windows, so skip the check. + if (!isWindows) { + var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + return gotTarget(null, seenLinks[id], base); + } + } + fs.stat(base, function(err) { + if (err) return cb(err); + + fs.readlink(base, function(err, target) { + if (!isWindows) seenLinks[id] = target; + gotTarget(err, target); + }); + }); + } + + function gotTarget(err, target, base) { + if (err) return cb(err); + + var resolvedLink = pathModule.resolve(previous, target); + if (cache) cache[base] = resolvedLink; + gotResolvedLink(resolvedLink); + } + + function gotResolvedLink(resolvedLink) { + // resolve the link, then start over + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } +}; + + +/***/ }), + +/***/ "./node_modules/glob/common.js": +/*!*************************************!*\ + !*** ./node_modules/glob/common.js ***! + \*************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +exports.setopts = setopts +exports.ownProp = ownProp +exports.makeAbs = makeAbs +exports.finish = finish +exports.mark = mark +exports.isIgnored = isIgnored +exports.childrenIgnored = childrenIgnored + +function ownProp (obj, field) { + return Object.prototype.hasOwnProperty.call(obj, field) +} + +var fs = __webpack_require__(/*! fs */ "fs") +var path = __webpack_require__(/*! path */ "path") +var minimatch = __webpack_require__(/*! minimatch */ "./node_modules/minimatch/minimatch.js") +var isAbsolute = __webpack_require__(/*! path-is-absolute */ "./node_modules/path-is-absolute/index.js") +var Minimatch = minimatch.Minimatch + +function alphasort (a, b) { + return a.localeCompare(b, 'en') +} + +function setupIgnores (self, options) { + self.ignore = options.ignore || [] + + if (!Array.isArray(self.ignore)) + self.ignore = [self.ignore] + + if (self.ignore.length) { + self.ignore = self.ignore.map(ignoreMap) + } +} + +// ignore patterns are always in dot:true mode. +function ignoreMap (pattern) { + var gmatcher = null + if (pattern.slice(-3) === '/**') { + var gpattern = pattern.replace(/(\/\*\*)+$/, '') + gmatcher = new Minimatch(gpattern, { dot: true }) + } + + return { + matcher: new Minimatch(pattern, { dot: true }), + gmatcher: gmatcher + } +} + +function setopts (self, pattern, options) { + if (!options) + options = {} + + // base-matching: just use globstar for that. + if (options.matchBase && -1 === pattern.indexOf("/")) { + if (options.noglobstar) { + throw new Error("base matching requires globstar") + } + pattern = "**/" + pattern + } + + self.silent = !!options.silent + self.pattern = pattern + self.strict = options.strict !== false + self.realpath = !!options.realpath + self.realpathCache = options.realpathCache || Object.create(null) + self.follow = !!options.follow + self.dot = !!options.dot + self.mark = !!options.mark + self.nodir = !!options.nodir + if (self.nodir) + self.mark = true + self.sync = !!options.sync + self.nounique = !!options.nounique + self.nonull = !!options.nonull + self.nosort = !!options.nosort + self.nocase = !!options.nocase + self.stat = !!options.stat + self.noprocess = !!options.noprocess + self.absolute = !!options.absolute + self.fs = options.fs || fs + + self.maxLength = options.maxLength || Infinity + self.cache = options.cache || Object.create(null) + self.statCache = options.statCache || Object.create(null) + self.symlinks = options.symlinks || Object.create(null) + + setupIgnores(self, options) + + self.changedCwd = false + var cwd = process.cwd() + if (!ownProp(options, "cwd")) + self.cwd = cwd + else { + self.cwd = path.resolve(options.cwd) + self.changedCwd = self.cwd !== cwd + } + + self.root = options.root || path.resolve(self.cwd, "/") + self.root = path.resolve(self.root) + if (process.platform === "win32") + self.root = self.root.replace(/\\/g, "/") + + // TODO: is an absolute `cwd` supposed to be resolved against `root`? + // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test') + self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd) + if (process.platform === "win32") + self.cwdAbs = self.cwdAbs.replace(/\\/g, "/") + self.nomount = !!options.nomount + + // disable comments and negation in Minimatch. + // Note that they are not supported in Glob itself anyway. + options.nonegate = true + options.nocomment = true + + self.minimatch = new Minimatch(pattern, options) + self.options = self.minimatch.options +} + +function finish (self) { + var nou = self.nounique + var all = nou ? [] : Object.create(null) + + for (var i = 0, l = self.matches.length; i < l; i ++) { + var matches = self.matches[i] + if (!matches || Object.keys(matches).length === 0) { + if (self.nonull) { + // do like the shell, and spit out the literal glob + var literal = self.minimatch.globSet[i] + if (nou) + all.push(literal) + else + all[literal] = true + } + } else { + // had matches + var m = Object.keys(matches) + if (nou) + all.push.apply(all, m) + else + m.forEach(function (m) { + all[m] = true + }) + } + } + + if (!nou) + all = Object.keys(all) + + if (!self.nosort) + all = all.sort(alphasort) + + // at *some* point we statted all of these + if (self.mark) { + for (var i = 0; i < all.length; i++) { + all[i] = self._mark(all[i]) + } + if (self.nodir) { + all = all.filter(function (e) { + var notDir = !(/\/$/.test(e)) + var c = self.cache[e] || self.cache[makeAbs(self, e)] + if (notDir && c) + notDir = c !== 'DIR' && !Array.isArray(c) + return notDir + }) + } + } + + if (self.ignore.length) + all = all.filter(function(m) { + return !isIgnored(self, m) + }) + + self.found = all +} + +function mark (self, p) { + var abs = makeAbs(self, p) + var c = self.cache[abs] + var m = p + if (c) { + var isDir = c === 'DIR' || Array.isArray(c) + var slash = p.slice(-1) === '/' + + if (isDir && !slash) + m += '/' + else if (!isDir && slash) + m = m.slice(0, -1) + + if (m !== p) { + var mabs = makeAbs(self, m) + self.statCache[mabs] = self.statCache[abs] + self.cache[mabs] = self.cache[abs] + } + } + + return m +} + +// lotta situps... +function makeAbs (self, f) { + var abs = f + if (f.charAt(0) === '/') { + abs = path.join(self.root, f) + } else if (isAbsolute(f) || f === '') { + abs = f + } else if (self.changedCwd) { + abs = path.resolve(self.cwd, f) + } else { + abs = path.resolve(f) + } + + if (process.platform === 'win32') + abs = abs.replace(/\\/g, '/') + + return abs +} + + +// Return true, if pattern ends with globstar '**', for the accompanying parent directory. +// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents +function isIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) + }) +} + +function childrenIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return !!(item.gmatcher && item.gmatcher.match(path)) + }) +} + + +/***/ }), + +/***/ "./node_modules/glob/glob.js": +/*!***********************************!*\ + !*** ./node_modules/glob/glob.js ***! + \***********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +// Approach: +// +// 1. Get the minimatch set +// 2. For each pattern in the set, PROCESS(pattern, false) +// 3. Store matches per-set, then uniq them +// +// PROCESS(pattern, inGlobStar) +// Get the first [n] items from pattern that are all strings +// Join these together. This is PREFIX. +// If there is no more remaining, then stat(PREFIX) and +// add to matches if it succeeds. END. +// +// If inGlobStar and PREFIX is symlink and points to dir +// set ENTRIES = [] +// else readdir(PREFIX) as ENTRIES +// If fail, END +// +// with ENTRIES +// If pattern[n] is GLOBSTAR +// // handle the case where the globstar match is empty +// // by pruning it out, and testing the resulting pattern +// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) +// // handle other cases. +// for ENTRY in ENTRIES (not dotfiles) +// // attach globstar + tail onto the entry +// // Mark that this entry is a globstar match +// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) +// +// else // not globstar +// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) +// Test ENTRY against pattern[n] +// If fails, continue +// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) +// +// Caveat: +// Cache all stats and readdirs results to minimize syscall. Since all +// we ever care about is existence and directory-ness, we can just keep +// `true` for files, and [children,...] for directories, or `false` for +// things that don't exist. + +module.exports = glob + +var rp = __webpack_require__(/*! fs.realpath */ "./node_modules/fs.realpath/index.js") +var minimatch = __webpack_require__(/*! minimatch */ "./node_modules/minimatch/minimatch.js") +var Minimatch = minimatch.Minimatch +var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits.js") +var EE = __webpack_require__(/*! events */ "events").EventEmitter +var path = __webpack_require__(/*! path */ "path") +var assert = __webpack_require__(/*! assert */ "assert") +var isAbsolute = __webpack_require__(/*! path-is-absolute */ "./node_modules/path-is-absolute/index.js") +var globSync = __webpack_require__(/*! ./sync.js */ "./node_modules/glob/sync.js") +var common = __webpack_require__(/*! ./common.js */ "./node_modules/glob/common.js") +var setopts = common.setopts +var ownProp = common.ownProp +var inflight = __webpack_require__(/*! inflight */ "./node_modules/inflight/inflight.js") +var util = __webpack_require__(/*! util */ "util") +var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored + +var once = __webpack_require__(/*! once */ "./node_modules/once/once.js") + +function glob (pattern, options, cb) { + if (typeof options === 'function') cb = options, options = {} + if (!options) options = {} + + if (options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return globSync(pattern, options) + } + + return new Glob(pattern, options, cb) +} + +glob.sync = globSync +var GlobSync = glob.GlobSync = globSync.GlobSync + +// old api surface +glob.glob = glob + +function extend (origin, add) { + if (add === null || typeof add !== 'object') { + return origin + } + + var keys = Object.keys(add) + var i = keys.length + while (i--) { + origin[keys[i]] = add[keys[i]] + } + return origin +} + +glob.hasMagic = function (pattern, options_) { + var options = extend({}, options_) + options.noprocess = true + + var g = new Glob(pattern, options) + var set = g.minimatch.set + + if (!pattern) + return false + + if (set.length > 1) + return true + + for (var j = 0; j < set[0].length; j++) { + if (typeof set[0][j] !== 'string') + return true + } + + return false +} + +glob.Glob = Glob +inherits(Glob, EE) +function Glob (pattern, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + + if (options && options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return new GlobSync(pattern, options) + } + + if (!(this instanceof Glob)) + return new Glob(pattern, options, cb) + + setopts(this, pattern, options) + this._didRealPath = false + + // process each pattern in the minimatch set + var n = this.minimatch.set.length + + // The matches are stored as {: true,...} so that + // duplicates are automagically pruned. + // Later, we do an Object.keys() on these. + // Keep them as a list so we can fill in when nonull is set. + this.matches = new Array(n) + + if (typeof cb === 'function') { + cb = once(cb) + this.on('error', cb) + this.on('end', function (matches) { + cb(null, matches) + }) + } + + var self = this + this._processing = 0 + + this._emitQueue = [] + this._processQueue = [] + this.paused = false + + if (this.noprocess) + return this + + if (n === 0) + return done() + + var sync = true + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false, done) + } + sync = false + + function done () { + --self._processing + if (self._processing <= 0) { + if (sync) { + process.nextTick(function () { + self._finish() + }) + } else { + self._finish() + } + } + } +} + +Glob.prototype._finish = function () { + assert(this instanceof Glob) + if (this.aborted) + return + + if (this.realpath && !this._didRealpath) + return this._realpath() + + common.finish(this) + this.emit('end', this.found) +} + +Glob.prototype._realpath = function () { + if (this._didRealpath) + return + + this._didRealpath = true + + var n = this.matches.length + if (n === 0) + return this._finish() + + var self = this + for (var i = 0; i < this.matches.length; i++) + this._realpathSet(i, next) + + function next () { + if (--n === 0) + self._finish() + } +} + +Glob.prototype._realpathSet = function (index, cb) { + var matchset = this.matches[index] + if (!matchset) + return cb() + + var found = Object.keys(matchset) + var self = this + var n = found.length + + if (n === 0) + return cb() + + var set = this.matches[index] = Object.create(null) + found.forEach(function (p, i) { + // If there's a problem with the stat, then it means that + // one or more of the links in the realpath couldn't be + // resolved. just return the abs value in that case. + p = self._makeAbs(p) + rp.realpath(p, self.realpathCache, function (er, real) { + if (!er) + set[real] = true + else if (er.syscall === 'stat') + set[p] = true + else + self.emit('error', er) // srsly wtf right here + + if (--n === 0) { + self.matches[index] = set + cb() + } + }) + }) +} + +Glob.prototype._mark = function (p) { + return common.mark(this, p) +} + +Glob.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} + +Glob.prototype.abort = function () { + this.aborted = true + this.emit('abort') +} + +Glob.prototype.pause = function () { + if (!this.paused) { + this.paused = true + this.emit('pause') + } +} + +Glob.prototype.resume = function () { + if (this.paused) { + this.emit('resume') + this.paused = false + if (this._emitQueue.length) { + var eq = this._emitQueue.slice(0) + this._emitQueue.length = 0 + for (var i = 0; i < eq.length; i ++) { + var e = eq[i] + this._emitMatch(e[0], e[1]) + } + } + if (this._processQueue.length) { + var pq = this._processQueue.slice(0) + this._processQueue.length = 0 + for (var i = 0; i < pq.length; i ++) { + var p = pq[i] + this._processing-- + this._process(p[0], p[1], p[2], p[3]) + } + } + } +} + +Glob.prototype._process = function (pattern, index, inGlobStar, cb) { + assert(this instanceof Glob) + assert(typeof cb === 'function') + + if (this.aborted) + return + + this._processing++ + if (this.paused) { + this._processQueue.push([pattern, index, inGlobStar, cb]) + return + } + + //console.error('PROCESS %d', this._processing, pattern) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // see if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index, cb) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip _processing + if (childrenIgnored(this, read)) + return cb() + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) +} + +Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + +Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return cb() + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return cb() + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this._emitMatch(index, e) + } + // This was the last one, and no stats were needed + return cb() + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + this._process([e].concat(remain), index, inGlobStar, cb) + } + cb() +} + +Glob.prototype._emitMatch = function (index, e) { + if (this.aborted) + return + + if (isIgnored(this, e)) + return + + if (this.paused) { + this._emitQueue.push([index, e]) + return + } + + var abs = isAbsolute(e) ? e : this._makeAbs(e) + + if (this.mark) + e = this._mark(e) + + if (this.absolute) + e = abs + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[abs] + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true + + var st = this.statCache[abs] + if (st) + this.emit('stat', e, st) + + this.emit('match', e) +} + +Glob.prototype._readdirInGlobStar = function (abs, cb) { + if (this.aborted) + return + + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false, cb) + + var lstatkey = 'lstat\0' + abs + var self = this + var lstatcb = inflight(lstatkey, lstatcb_) + + if (lstatcb) + self.fs.lstat(abs, lstatcb) + + function lstatcb_ (er, lstat) { + if (er && er.code === 'ENOENT') + return cb() + + var isSym = lstat && lstat.isSymbolicLink() + self.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && lstat && !lstat.isDirectory()) { + self.cache[abs] = 'FILE' + cb() + } else + self._readdir(abs, false, cb) + } +} + +Glob.prototype._readdir = function (abs, inGlobStar, cb) { + if (this.aborted) + return + + cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) + if (!cb) + return + + //console.error('RD %j %j', +inGlobStar, abs) + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs, cb) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return cb() + + if (Array.isArray(c)) + return cb(null, c) + } + + var self = this + self.fs.readdir(abs, readdirCb(this, abs, cb)) +} + +function readdirCb (self, abs, cb) { + return function (er, entries) { + if (er) + self._readdirError(abs, er, cb) + else + self._readdirEntries(abs, entries, cb) + } +} + +Glob.prototype._readdirEntries = function (abs, entries, cb) { + if (this.aborted) + return + + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + return cb(null, entries) +} + +Glob.prototype._readdirError = function (f, er, cb) { + if (this.aborted) + return + + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + var abs = this._makeAbs(f) + this.cache[abs] = 'FILE' + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd) + error.path = this.cwd + error.code = er.code + this.emit('error', error) + this.abort() + } + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) { + this.emit('error', er) + // If the error is handled, then we abort + // if not, we threw out of here + this.abort() + } + if (!this.silent) + console.error('glob error', er) + break + } + + return cb() +} + +Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + + +Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + //console.error('pgs2', prefix, remain[0], entries) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return cb() + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false, cb) + + var isSym = this.symlinks[abs] + var len = entries.length + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return cb() + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true, cb) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true, cb) + } + + cb() +} + +Glob.prototype._processSimple = function (prefix, index, cb) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var self = this + this._stat(prefix, function (er, exists) { + self._processSimple2(prefix, index, er, exists, cb) + }) +} +Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { + + //console.error('ps2', prefix, exists) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return cb() + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this._emitMatch(index, prefix) + cb() +} + +// Returns either 'DIR', 'FILE', or false +Glob.prototype._stat = function (f, cb) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return cb() + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return cb(null, c) + + if (needDir && c === 'FILE') + return cb() + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (stat !== undefined) { + if (stat === false) + return cb(null, stat) + else { + var type = stat.isDirectory() ? 'DIR' : 'FILE' + if (needDir && type === 'FILE') + return cb() + else + return cb(null, type, stat) + } + } + + var self = this + var statcb = inflight('stat\0' + abs, lstatcb_) + if (statcb) + self.fs.lstat(abs, statcb) + + function lstatcb_ (er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + // If it's a symlink, then treat it as the target, unless + // the target does not exist, then treat it as a file. + return self.fs.stat(abs, function (er, stat) { + if (er) + self._stat2(f, abs, null, lstat, cb) + else + self._stat2(f, abs, er, stat, cb) + }) + } else { + self._stat2(f, abs, er, lstat, cb) + } + } +} + +Glob.prototype._stat2 = function (f, abs, er, stat, cb) { + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { + this.statCache[abs] = false + return cb() + } + + var needDir = f.slice(-1) === '/' + this.statCache[abs] = stat + + if (abs.slice(-1) === '/' && stat && !stat.isDirectory()) + return cb(null, false, stat) + + var c = true + if (stat) + c = stat.isDirectory() ? 'DIR' : 'FILE' + this.cache[abs] = this.cache[abs] || c + + if (needDir && c === 'FILE') + return cb() + + return cb(null, c, stat) +} + + +/***/ }), + +/***/ "./node_modules/glob/sync.js": +/*!***********************************!*\ + !*** ./node_modules/glob/sync.js ***! + \***********************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = globSync +globSync.GlobSync = GlobSync + +var rp = __webpack_require__(/*! fs.realpath */ "./node_modules/fs.realpath/index.js") +var minimatch = __webpack_require__(/*! minimatch */ "./node_modules/minimatch/minimatch.js") +var Minimatch = minimatch.Minimatch +var Glob = __webpack_require__(/*! ./glob.js */ "./node_modules/glob/glob.js").Glob +var util = __webpack_require__(/*! util */ "util") +var path = __webpack_require__(/*! path */ "path") +var assert = __webpack_require__(/*! assert */ "assert") +var isAbsolute = __webpack_require__(/*! path-is-absolute */ "./node_modules/path-is-absolute/index.js") +var common = __webpack_require__(/*! ./common.js */ "./node_modules/glob/common.js") +var setopts = common.setopts +var ownProp = common.ownProp +var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored + +function globSync (pattern, options) { + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + return new GlobSync(pattern, options).found +} + +function GlobSync (pattern, options) { + if (!pattern) + throw new Error('must provide pattern') + + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + if (!(this instanceof GlobSync)) + return new GlobSync(pattern, options) + + setopts(this, pattern, options) + + if (this.noprocess) + return this + + var n = this.minimatch.set.length + this.matches = new Array(n) + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false) + } + this._finish() +} + +GlobSync.prototype._finish = function () { + assert(this instanceof GlobSync) + if (this.realpath) { + var self = this + this.matches.forEach(function (matchset, index) { + var set = self.matches[index] = Object.create(null) + for (var p in matchset) { + try { + p = self._makeAbs(p) + var real = rp.realpathSync(p, self.realpathCache) + set[real] = true + } catch (er) { + if (er.syscall === 'stat') + set[self._makeAbs(p)] = true + else + throw er + } + } + }) + } + common.finish(this) +} + + +GlobSync.prototype._process = function (pattern, index, inGlobStar) { + assert(this instanceof GlobSync) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // See if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip processing + if (childrenIgnored(this, read)) + return + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar) +} + + +GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar) + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix.slice(-1) !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this._emitMatch(index, e) + } + // This was the last one, and no stats were needed + return + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) + newPattern = [prefix, e] + else + newPattern = [e] + this._process(newPattern.concat(remain), index, inGlobStar) + } +} + + +GlobSync.prototype._emitMatch = function (index, e) { + if (isIgnored(this, e)) + return + + var abs = this._makeAbs(e) + + if (this.mark) + e = this._mark(e) + + if (this.absolute) { + e = abs + } + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[abs] + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true + + if (this.stat) + this._stat(e) +} + + +GlobSync.prototype._readdirInGlobStar = function (abs) { + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false) + + var entries + var lstat + var stat + try { + lstat = this.fs.lstatSync(abs) + } catch (er) { + if (er.code === 'ENOENT') { + // lstat failed, doesn't exist + return null + } + } + + var isSym = lstat && lstat.isSymbolicLink() + this.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && lstat && !lstat.isDirectory()) + this.cache[abs] = 'FILE' + else + entries = this._readdir(abs, false) + + return entries +} + +GlobSync.prototype._readdir = function (abs, inGlobStar) { + var entries + + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return null + + if (Array.isArray(c)) + return c + } + + try { + return this._readdirEntries(abs, this.fs.readdirSync(abs)) + } catch (er) { + this._readdirError(abs, er) + return null + } +} + +GlobSync.prototype._readdirEntries = function (abs, entries) { + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + + // mark and cache dir-ness + return entries +} + +GlobSync.prototype._readdirError = function (f, er) { + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + var abs = this._makeAbs(f) + this.cache[abs] = 'FILE' + if (abs === this.cwdAbs) { + var error = new Error(er.code + ' invalid cwd ' + this.cwd) + error.path = this.cwd + error.code = er.code + throw error + } + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) + throw er + if (!this.silent) + console.error('glob error', er) + break + } +} + +GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { + + var entries = this._readdir(abs, inGlobStar) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false) + + var len = entries.length + var isSym = this.symlinks[abs] + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true) + } +} + +GlobSync.prototype._processSimple = function (prefix, index) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var exists = this._stat(prefix) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this._emitMatch(index, prefix) +} + +// Returns either 'DIR', 'FILE', or false +GlobSync.prototype._stat = function (f) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return false + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return c + + if (needDir && c === 'FILE') + return false + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (!stat) { + var lstat + try { + lstat = this.fs.lstatSync(abs) + } catch (er) { + if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) { + this.statCache[abs] = false + return false + } + } + + if (lstat && lstat.isSymbolicLink()) { + try { + stat = this.fs.statSync(abs) + } catch (er) { + stat = lstat + } + } else { + stat = lstat + } + } + + this.statCache[abs] = stat + + var c = true + if (stat) + c = stat.isDirectory() ? 'DIR' : 'FILE' + + this.cache[abs] = this.cache[abs] || c + + if (needDir && c === 'FILE') + return false + + return c +} + +GlobSync.prototype._mark = function (p) { + return common.mark(this, p) +} + +GlobSync.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} + + +/***/ }), + +/***/ "./node_modules/graceful-fs/clone.js": +/*!*******************************************!*\ + !*** ./node_modules/graceful-fs/clone.js ***! + \*******************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +module.exports = clone + +var getPrototypeOf = Object.getPrototypeOf || function (obj) { + return obj.__proto__ +} + +function clone (obj) { + if (obj === null || typeof obj !== 'object') + return obj + + if (obj instanceof Object) + var copy = { __proto__: getPrototypeOf(obj) } + else + var copy = Object.create(null) + + Object.getOwnPropertyNames(obj).forEach(function (key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) + }) + + return copy +} + + +/***/ }), + +/***/ "./node_modules/graceful-fs/graceful-fs.js": +/*!*************************************************!*\ + !*** ./node_modules/graceful-fs/graceful-fs.js ***! + \*************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var fs = __webpack_require__(/*! fs */ "fs") +var polyfills = __webpack_require__(/*! ./polyfills.js */ "./node_modules/graceful-fs/polyfills.js") +var legacy = __webpack_require__(/*! ./legacy-streams.js */ "./node_modules/graceful-fs/legacy-streams.js") +var clone = __webpack_require__(/*! ./clone.js */ "./node_modules/graceful-fs/clone.js") + +var util = __webpack_require__(/*! util */ "util") + +/* istanbul ignore next - node 0.x polyfill */ +var gracefulQueue +var previousSymbol + +/* istanbul ignore else - node 0.x polyfill */ +if (typeof Symbol === 'function' && typeof Symbol.for === 'function') { + gracefulQueue = Symbol.for('graceful-fs.queue') + // This is used in testing by future versions + previousSymbol = Symbol.for('graceful-fs.previous') +} else { + gracefulQueue = '___graceful-fs.queue' + previousSymbol = '___graceful-fs.previous' +} + +function noop () {} + +function publishQueue(context, queue) { + Object.defineProperty(context, gracefulQueue, { + get: function() { + return queue + } + }) +} + +var debug = noop +if (util.debuglog) + debug = util.debuglog('gfs4') +else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) + debug = function() { + var m = util.format.apply(util, arguments) + m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') + console.error(m) + } + +// Once time initialization +if (!fs[gracefulQueue]) { + // This queue can be shared by multiple loaded instances + var queue = global[gracefulQueue] || [] + publishQueue(fs, queue) + + // Patch fs.close/closeSync to shared queue version, because we need + // to retry() whenever a close happens *anywhere* in the program. + // This is essential when multiple graceful-fs instances are + // in play at the same time. + fs.close = (function (fs$close) { + function close (fd, cb) { + return fs$close.call(fs, fd, function (err) { + // This function uses the graceful-fs shared queue + if (!err) { + resetQueue() + } + + if (typeof cb === 'function') + cb.apply(this, arguments) + }) + } + + Object.defineProperty(close, previousSymbol, { + value: fs$close + }) + return close + })(fs.close) + + fs.closeSync = (function (fs$closeSync) { + function closeSync (fd) { + // This function uses the graceful-fs shared queue + fs$closeSync.apply(fs, arguments) + resetQueue() + } + + Object.defineProperty(closeSync, previousSymbol, { + value: fs$closeSync + }) + return closeSync + })(fs.closeSync) + + if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { + process.on('exit', function() { + debug(fs[gracefulQueue]) + __webpack_require__(/*! assert */ "assert").equal(fs[gracefulQueue].length, 0) + }) + } +} + +if (!global[gracefulQueue]) { + publishQueue(global, fs[gracefulQueue]); +} + +module.exports = patch(clone(fs)) +if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { + module.exports = patch(fs) + fs.__patched = true; +} + +function patch (fs) { + // Everything that references the open() function needs to be in here + polyfills(fs) + fs.gracefulify = patch + + fs.createReadStream = createReadStream + fs.createWriteStream = createWriteStream + var fs$readFile = fs.readFile + fs.readFile = readFile + function readFile (path, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$readFile(path, options, cb) + + function go$readFile (path, options, cb, startTime) { + return fs$readFile(path, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + var fs$writeFile = fs.writeFile + fs.writeFile = writeFile + function writeFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$writeFile(path, data, options, cb) + + function go$writeFile (path, data, options, cb, startTime) { + return fs$writeFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + var fs$appendFile = fs.appendFile + if (fs$appendFile) + fs.appendFile = appendFile + function appendFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$appendFile(path, data, options, cb) + + function go$appendFile (path, data, options, cb, startTime) { + return fs$appendFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + var fs$copyFile = fs.copyFile + if (fs$copyFile) + fs.copyFile = copyFile + function copyFile (src, dest, flags, cb) { + if (typeof flags === 'function') { + cb = flags + flags = 0 + } + return go$copyFile(src, dest, flags, cb) + + function go$copyFile (src, dest, flags, cb, startTime) { + return fs$copyFile(src, dest, flags, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + var fs$readdir = fs.readdir + fs.readdir = readdir + function readdir (path, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$readdir(path, options, cb) + + function go$readdir (path, options, cb, startTime) { + return fs$readdir(path, options, function (err, files) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readdir, [path, options, cb], err, startTime || Date.now(), Date.now()]) + else { + if (files && files.sort) + files.sort() + + if (typeof cb === 'function') + cb.call(this, err, files) + } + }) + } + } + + if (process.version.substr(0, 4) === 'v0.8') { + var legStreams = legacy(fs) + ReadStream = legStreams.ReadStream + WriteStream = legStreams.WriteStream + } + + var fs$ReadStream = fs.ReadStream + if (fs$ReadStream) { + ReadStream.prototype = Object.create(fs$ReadStream.prototype) + ReadStream.prototype.open = ReadStream$open + } + + var fs$WriteStream = fs.WriteStream + if (fs$WriteStream) { + WriteStream.prototype = Object.create(fs$WriteStream.prototype) + WriteStream.prototype.open = WriteStream$open + } + + Object.defineProperty(fs, 'ReadStream', { + get: function () { + return ReadStream + }, + set: function (val) { + ReadStream = val + }, + enumerable: true, + configurable: true + }) + Object.defineProperty(fs, 'WriteStream', { + get: function () { + return WriteStream + }, + set: function (val) { + WriteStream = val + }, + enumerable: true, + configurable: true + }) + + // legacy names + var FileReadStream = ReadStream + Object.defineProperty(fs, 'FileReadStream', { + get: function () { + return FileReadStream + }, + set: function (val) { + FileReadStream = val + }, + enumerable: true, + configurable: true + }) + var FileWriteStream = WriteStream + Object.defineProperty(fs, 'FileWriteStream', { + get: function () { + return FileWriteStream + }, + set: function (val) { + FileWriteStream = val + }, + enumerable: true, + configurable: true + }) + + function ReadStream (path, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments) + } + + function ReadStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + if (that.autoClose) + that.destroy() + + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + that.read() + } + }) + } + + function WriteStream (path, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments) + } + + function WriteStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + that.destroy() + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + } + }) + } + + function createReadStream (path, options) { + return new fs.ReadStream(path, options) + } + + function createWriteStream (path, options) { + return new fs.WriteStream(path, options) + } + + var fs$open = fs.open + fs.open = open + function open (path, flags, mode, cb) { + if (typeof mode === 'function') + cb = mode, mode = null + + return go$open(path, flags, mode, cb) + + function go$open (path, flags, mode, cb, startTime) { + return fs$open(path, flags, mode, function (err, fd) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + return fs +} + +function enqueue (elem) { + debug('ENQUEUE', elem[0].name, elem[1]) + fs[gracefulQueue].push(elem) + retry() +} + +// keep track of the timeout between retry() calls +var retryTimer + +// reset the startTime and lastTime to now +// this resets the start of the 60 second overall timeout as well as the +// delay between attempts so that we'll retry these jobs sooner +function resetQueue () { + var now = Date.now() + for (var i = 0; i < fs[gracefulQueue].length; ++i) { + // entries that are only a length of 2 are from an older version, don't + // bother modifying those since they'll be retried anyway. + if (fs[gracefulQueue][i].length > 2) { + fs[gracefulQueue][i][3] = now // startTime + fs[gracefulQueue][i][4] = now // lastTime + } + } + // call retry to make sure we're actively processing the queue + retry() +} + +function retry () { + // clear the timer and remove it to help prevent unintended concurrency + clearTimeout(retryTimer) + retryTimer = undefined + + if (fs[gracefulQueue].length === 0) + return + + var elem = fs[gracefulQueue].shift() + var fn = elem[0] + var args = elem[1] + // these items may be unset if they were added by an older graceful-fs + var err = elem[2] + var startTime = elem[3] + var lastTime = elem[4] + + // if we don't have a startTime we have no way of knowing if we've waited + // long enough, so go ahead and retry this item now + if (startTime === undefined) { + debug('RETRY', fn.name, args) + fn.apply(null, args) + } else if (Date.now() - startTime >= 60000) { + // it's been more than 60 seconds total, bail now + debug('TIMEOUT', fn.name, args) + var cb = args.pop() + if (typeof cb === 'function') + cb.call(null, err) + } else { + // the amount of time between the last attempt and right now + var sinceAttempt = Date.now() - lastTime + // the amount of time between when we first tried, and when we last tried + // rounded up to at least 1 + var sinceStart = Math.max(lastTime - startTime, 1) + // backoff. wait longer than the total time we've been retrying, but only + // up to a maximum of 100ms + var desiredDelay = Math.min(sinceStart * 1.2, 100) + // it's been long enough since the last retry, do it again + if (sinceAttempt >= desiredDelay) { + debug('RETRY', fn.name, args) + fn.apply(null, args.concat([startTime])) + } else { + // if we can't do this job yet, push it to the end of the queue + // and let the next iteration check again + fs[gracefulQueue].push(elem) + } + } + + // schedule our next run if one isn't already scheduled + if (retryTimer === undefined) { + retryTimer = setTimeout(retry, 0) + } +} + + +/***/ }), + +/***/ "./node_modules/graceful-fs/legacy-streams.js": +/*!****************************************************!*\ + !*** ./node_modules/graceful-fs/legacy-streams.js ***! + \****************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var Stream = __webpack_require__(/*! stream */ "stream").Stream + +module.exports = legacy + +function legacy (fs) { + return { + ReadStream: ReadStream, + WriteStream: WriteStream + } + + function ReadStream (path, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path, options); + + Stream.call(this); + + var self = this; + + this.path = path; + this.fd = null; + this.readable = true; + this.paused = false; + + this.flags = 'r'; + this.mode = 438; /*=0666*/ + this.bufferSize = 64 * 1024; + + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + + if (this.encoding) this.setEncoding(this.encoding); + + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.end === undefined) { + this.end = Infinity; + } else if ('number' !== typeof this.end) { + throw TypeError('end must be a Number'); + } + + if (this.start > this.end) { + throw new Error('start must be <= end'); + } + + this.pos = this.start; + } + + if (this.fd !== null) { + process.nextTick(function() { + self._read(); + }); + return; + } + + fs.open(this.path, this.flags, this.mode, function (err, fd) { + if (err) { + self.emit('error', err); + self.readable = false; + return; + } + + self.fd = fd; + self.emit('open', fd); + self._read(); + }) + } + + function WriteStream (path, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path, options); + + Stream.call(this); + + this.path = path; + this.fd = null; + this.writable = true; + + this.flags = 'w'; + this.encoding = 'binary'; + this.mode = 438; /*=0666*/ + this.bytesWritten = 0; + + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.start < 0) { + throw new Error('start must be >= zero'); + } + + this.pos = this.start; + } + + this.busy = false; + this._queue = []; + + if (this.fd === null) { + this._open = fs.open; + this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); + this.flush(); + } + } +} + + +/***/ }), + +/***/ "./node_modules/graceful-fs/polyfills.js": +/*!***********************************************!*\ + !*** ./node_modules/graceful-fs/polyfills.js ***! + \***********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +var constants = __webpack_require__(/*! constants */ "constants") + +var origCwd = process.cwd +var cwd = null + +var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform + +process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process) + return cwd +} +try { + process.cwd() +} catch (er) {} + +// This check is needed until node.js 12 is required +if (typeof process.chdir === 'function') { + var chdir = process.chdir + process.chdir = function (d) { + cwd = null + chdir.call(process, d) + } + if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir) +} + +module.exports = patch + +function patch (fs) { + // (re-)implement some things that are known busted or missing. + + // lchmod, broken prior to 0.6.2 + // back-port the fix here. + if (constants.hasOwnProperty('O_SYMLINK') && + process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs) + } + + // lutimes implementation, or no-op + if (!fs.lutimes) { + patchLutimes(fs) + } + + // https://github.com/isaacs/node-graceful-fs/issues/4 + // Chown should not fail on einval or eperm if non-root. + // It should not fail on enosys ever, as this just indicates + // that a fs doesn't support the intended operation. + + fs.chown = chownFix(fs.chown) + fs.fchown = chownFix(fs.fchown) + fs.lchown = chownFix(fs.lchown) + + fs.chmod = chmodFix(fs.chmod) + fs.fchmod = chmodFix(fs.fchmod) + fs.lchmod = chmodFix(fs.lchmod) + + fs.chownSync = chownFixSync(fs.chownSync) + fs.fchownSync = chownFixSync(fs.fchownSync) + fs.lchownSync = chownFixSync(fs.lchownSync) + + fs.chmodSync = chmodFixSync(fs.chmodSync) + fs.fchmodSync = chmodFixSync(fs.fchmodSync) + fs.lchmodSync = chmodFixSync(fs.lchmodSync) + + fs.stat = statFix(fs.stat) + fs.fstat = statFix(fs.fstat) + fs.lstat = statFix(fs.lstat) + + fs.statSync = statFixSync(fs.statSync) + fs.fstatSync = statFixSync(fs.fstatSync) + fs.lstatSync = statFixSync(fs.lstatSync) + + // if lchmod/lchown do not exist, then make them no-ops + if (!fs.lchmod) { + fs.lchmod = function (path, mode, cb) { + if (cb) process.nextTick(cb) + } + fs.lchmodSync = function () {} + } + if (!fs.lchown) { + fs.lchown = function (path, uid, gid, cb) { + if (cb) process.nextTick(cb) + } + fs.lchownSync = function () {} + } + + // on Windows, A/V software can lock the directory, causing this + // to fail with an EACCES or EPERM if the directory contains newly + // created files. Try again on failure, for up to 60 seconds. + + // Set the timeout this long because some Windows Anti-Virus, such as Parity + // bit9, may lock files for up to a minute, causing npm package install + // failures. Also, take care to yield the scheduler. Windows scheduling gives + // CPU to a busy looping process, which can cause the program causing the lock + // contention to be starved of CPU by node, so the contention doesn't resolve. + if (platform === "win32") { + fs.rename = (function (fs$rename) { return function (from, to, cb) { + var start = Date.now() + var backoff = 0; + fs$rename(from, to, function CB (er) { + if (er + && (er.code === "EACCES" || er.code === "EPERM") + && Date.now() - start < 60000) { + setTimeout(function() { + fs.stat(to, function (stater, st) { + if (stater && stater.code === "ENOENT") + fs$rename(from, to, CB); + else + cb(er) + }) + }, backoff) + if (backoff < 100) + backoff += 10; + return; + } + if (cb) cb(er) + }) + }})(fs.rename) + } + + // if read() returns EAGAIN, then just try it again. + fs.read = (function (fs$read) { + function read (fd, buffer, offset, length, position, callback_) { + var callback + if (callback_ && typeof callback_ === 'function') { + var eagCounter = 0 + callback = function (er, _, __) { + if (er && er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + } + callback_.apply(this, arguments) + } + } + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + } + + // This ensures `util.promisify` works as it does for native `fs.read`. + if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read) + return read + })(fs.read) + + fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) { + var eagCounter = 0 + while (true) { + try { + return fs$readSync.call(fs, fd, buffer, offset, length, position) + } catch (er) { + if (er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + continue + } + throw er + } + } + }})(fs.readSync) + + function patchLchmod (fs) { + fs.lchmod = function (path, mode, callback) { + fs.open( path + , constants.O_WRONLY | constants.O_SYMLINK + , mode + , function (err, fd) { + if (err) { + if (callback) callback(err) + return + } + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + fs.fchmod(fd, mode, function (err) { + fs.close(fd, function(err2) { + if (callback) callback(err || err2) + }) + }) + }) + } + + fs.lchmodSync = function (path, mode) { + var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) + + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + var threw = true + var ret + try { + ret = fs.fchmodSync(fd, mode) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } + } + + function patchLutimes (fs) { + if (constants.hasOwnProperty("O_SYMLINK")) { + fs.lutimes = function (path, at, mt, cb) { + fs.open(path, constants.O_SYMLINK, function (er, fd) { + if (er) { + if (cb) cb(er) + return + } + fs.futimes(fd, at, mt, function (er) { + fs.close(fd, function (er2) { + if (cb) cb(er || er2) + }) + }) + }) + } + + fs.lutimesSync = function (path, at, mt) { + var fd = fs.openSync(path, constants.O_SYMLINK) + var ret + var threw = true + try { + ret = fs.futimesSync(fd, at, mt) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } + + } else { + fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } + fs.lutimesSync = function () {} + } + } + + function chmodFix (orig) { + if (!orig) return orig + return function (target, mode, cb) { + return orig.call(fs, target, mode, function (er) { + if (chownErOk(er)) er = null + if (cb) cb.apply(this, arguments) + }) + } + } + + function chmodFixSync (orig) { + if (!orig) return orig + return function (target, mode) { + try { + return orig.call(fs, target, mode) + } catch (er) { + if (!chownErOk(er)) throw er + } + } + } + + + function chownFix (orig) { + if (!orig) return orig + return function (target, uid, gid, cb) { + return orig.call(fs, target, uid, gid, function (er) { + if (chownErOk(er)) er = null + if (cb) cb.apply(this, arguments) + }) + } + } + + function chownFixSync (orig) { + if (!orig) return orig + return function (target, uid, gid) { + try { + return orig.call(fs, target, uid, gid) + } catch (er) { + if (!chownErOk(er)) throw er + } + } + } + + function statFix (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + function callback (er, stats) { + if (stats) { + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + } + if (cb) cb.apply(this, arguments) + } + return options ? orig.call(fs, target, options, callback) + : orig.call(fs, target, callback) + } + } + + function statFixSync (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target, options) { + var stats = options ? orig.call(fs, target, options) + : orig.call(fs, target) + if (stats) { + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + } + return stats; + } + } + + // ENOSYS means that the fs doesn't support the op. Just ignore + // that, because it doesn't matter. + // + // if there's no getuid, or if getuid() is something other + // than 0, and the error is EINVAL or EPERM, then just ignore + // it. + // + // This specific case is a silent failure in cp, install, tar, + // and most other unix tools that manage permissions. + // + // When running as root, or if other types of errors are + // encountered, then it's strict. + function chownErOk (er) { + if (!er) + return true + + if (er.code === "ENOSYS") + return true + + var nonroot = !process.getuid || process.getuid() !== 0 + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true + } + + return false + } +} + + +/***/ }), + +/***/ "./node_modules/has-flag/index.js": +/*!****************************************!*\ + !*** ./node_modules/has-flag/index.js ***! + \****************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +module.exports = (flag, argv) => { + argv = argv || process.argv; + const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); + const pos = argv.indexOf(prefix + flag); + const terminatorPos = argv.indexOf('--'); + return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); +}; + + +/***/ }), + +/***/ "./node_modules/immediate/lib/index.js": +/*!*********************************************!*\ + !*** ./node_modules/immediate/lib/index.js ***! + \*********************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +var Mutation = global.MutationObserver || global.WebKitMutationObserver; + +var scheduleDrain; + +if (process.browser) { + if (Mutation) { + var called = 0; + var observer = new Mutation(nextTick); + var element = global.document.createTextNode(''); + observer.observe(element, { + characterData: true + }); + scheduleDrain = function () { + element.data = (called = ++called % 2); + }; + } else if (!global.setImmediate && typeof global.MessageChannel !== 'undefined') { + var channel = new global.MessageChannel(); + channel.port1.onmessage = nextTick; + scheduleDrain = function () { + channel.port2.postMessage(0); + }; + } else if ('document' in global && 'onreadystatechange' in global.document.createElement('script')) { + scheduleDrain = function () { + + // Create a