forked from photostructure/photostructure-for-servers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphotostructure
executable file
·3 lines (3 loc) · 20.4 KB
/
photostructure
1
2
3
#!/usr/bin/env node
/* Copyright © 2020, PhotoStructure Inc. <https://photostructure.com/eula> */
module.exports=(()=>{var t={8565:()=>{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"0.9.1+20201108224104"}},2041:(t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.gitDate=n.gitSha=n.release=n.version=void 0,n.version="0.9.1",n.release="0.9.1+20201108224104",n.gitSha="898282d1a1216079a70415b6c374720931272d0a",n.gitDate=new Date(1604875264e3)},1944:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.commaList=n.last=n.diff=n.stepRange=n.range=n.anneal=n.commonPrefixLength=n.firstMatch=n.sum=n.count=n.clear=n.uniqBy2=n.uniqBy=n.uniq=n.compactBlanks=n.compactBlankish=n.compact=n.insertUniq=n.insertAt=n.pushUniqBy=n.pushUniq=n.includesAll=n.indexOf=n.includes=n.move=n.filterInPlace=n.startsWith=n.arrayEql=n.deepSortBy=n.sortBy=n.sortedBy=n.sorted=n.sortUniqByInPlace=n.sortByInPlace=n.copyArrayTo=n.sort=n.flatten=n.mapNotEmptyOr=n.mapNotEmpty=n.mapArray=n.isEmpty=n.isNotEmpty=void 0;const r=e(9938),i=e(4603),o=e(810),u=e(7748),l=e(1682),s=e(1040),c=e(6776),a=e(8199),f=e(3175),p=e(957),m=e(9784),d=e(2798);function h(t){return l.isList(t)&&t.length>0&&t.some((t=>null!=t))}function y(t){return!h(t)}function g(t){return a.isPrimitive(t)||a.isPrimitiveArray(t)?t:t.valueOf()}function b(t,n){for(let e=0;e<t.length;e++)n[e]=t[e];return n.length=t.length,n}function v(t,n){return b(O(t,n),t)}function O(t,n){return m.toA(t).filter((t=>null!=t)).map(((t,e)=>({item:t,cmp:c.map(n(t,e),(t=>[t,e]))}))).filter((t=>null!=t.cmp)).sort(((t,n)=>a.cmp(t.cmp,n.cmp))).map((t=>t.item))}function M(t,n){return null!=t&&null!=n&&t.length===n.length&&t.every(((t,e)=>t===n[e]))}function P(t,n,e){if(n===e||n<0||e<0||n>=t.length||e>=t.length)return t;const r=t[n];return t.splice(n,1),t.splice(e,0,r),t}function S(t,n){if(null==t)return!1;for(const e of t)if(n.valueOf()===e.valueOf())return!0;return!1}function j(t){if(null==t)return[];const n=m.toA(t);return n.every(c.defined)?n:n.filter(c.defined)}function x(t,n=(t=>u.stringify(t))){if(y(t))return[];const e=new Map;for(const r of t)if(null!=r){const t=n(r);null!=t&&s.getOrSet(e,t,(()=>r))}return[...e.values()]}function A(t,n,e=1,r=(t=>t)){const i=[];if(t<n)for(let o=t;o<n;o+=e)i.push(r(o));else for(let o=t;o>n;o-=e)i.push(r(o));return i}n.isNotEmpty=h,n.isEmpty=y,n.mapArray=function(t,n){return Array.isArray(t)?n(t):void 0},n.mapNotEmpty=function(t,n){return h(t)?n(t):void 0},n.mapNotEmptyOr=function(t,n,e){return h(t)?n(t):p.tot(e)},n.flatten=function(t,n=[]){if(null==t)return n;for(const e of t)if(null!=e)if(Array.isArray(e))for(const t of e)null!=t&&n.push(t);else n.push(e);return n},n.sort=function(t){return v(j(t),g)},n.copyArrayTo=b,n.sortByInPlace=v,n.sortUniqByInPlace=function(t,n){const e=new Map;for(const r of t)s.getOrSet(e,u.stringify(n(r)),(()=>r));return b(O(e.values(),n),t)},n.sorted=function(t){return t.every(((n,e)=>0===e||n>t[e-1]))},n.sortedBy=function(t,n){return t.every(((e,r)=>0===r||n(e)>n(t[r-1])))},n.sortBy=O,n.deepSortBy=function t(n,e){return O(n,e).map((n=>o.isIterable(n)?t(n,e):n))},n.arrayEql=M,n.startsWith=function(t,n){return M(t.slice(0,n.length),n)},n.filterInPlace=function(t,n){for(let e=0;e<t.length;)n(t[e],e,t)?e++:t.splice(e,1);return t},n.move=P,n.includes=S,n.indexOf=function(t,n){if(null==t)return;let e=0;for(const r of t){if(n(r,e))return e;e++}},n.includesAll=function(t,n){return null!=t&&null!=n&&n.every((n=>S(t,n)))},n.pushUniq=function(t,...n){for(const e of n)t.some((t=>i.eql(t,e)))||t.push(e);return t},n.pushUniqBy=function(t,n,e){const r=t.map(e);for(const i of n){const n=e(i);r.includes(n)||(t.push(i),r.push(n))}return t},n.insertAt=function(t,n,...e){return t.splice(n,0,...e),t},n.insertUniq=function(t,n,e){for(let n=0;n<t.length-1;n++)if(e(t[n],t[n+1])>0)throw new Error("badly sorted array: "+t);for(let r=0;r<t.length;r++){const i=e(t[r],n);if(0===i)return t;if(i>0)return t.splice(r,0,n),t}return t.push(n),t},n.compact=j,n.compactBlankish=function(t){return m.toA(t).filter((t=>!r.blankish(d.toS(t))))},n.compactBlanks=function(t){return m.toA(t).map((t=>d.toS(t).trim())).filter((t=>t.length>0))},n.uniq=function(t){return x(j(t),(t=>u.stringify(t)))},n.uniqBy=x,n.uniqBy2=function(t,n){if(y(t))return[];const e=[];for(const r of t)null!=r&&e.every((t=>!n(r,t)))&&e.push(r);return e},n.clear=function(t){return t.length=0,t},n.count=function(t,n){return t.reduce(((t,e,r)=>t+(n(e,r)?1:0)),0)},n.sum=function(t,n){return t.reduce(((t,e,r)=>t+n(e,r)),0)},n.firstMatch=function(t,n){for(const e of j(n)){const n=t.exec(e);if(null!=n)return n}},n.commonPrefixLength=function(t,n){if(null==t||null==n)return 0;if(t===n)return t.length;if("string"==typeof t&&(t=t.split("")),"string"==typeof n&&(n=n.split("")),M(t,n))return t.length;let e=0;for(;t[e]===n[e];)e++;return e},n.anneal=function({array:t,expense:n,allowedDelta:e}){const r=Math.round(e);if(r<2)return t;for(let e=0;e<t.length-1;e++){const i=f.randomInt(Math.max(0,e-r),Math.min(t.length,e+r),[e]);if(null==i)continue;const o=Math.max(0,Math.min(i,e)-1),u=Math.min(t.length,Math.max(i,e)+1),l=n(t,o,u);P(t,e,i);const s=n(t,o,u);a.lt(l,s)&&P(t,i,e)}return t},n.range=function(t,n,e=(t=>t)){return A(t,n,1,e)},n.stepRange=A,n.diff=function(t,n){const e=new Set(n);return t.filter((t=>!e.has(t)))},n.last=function(t){return null!=t?t[t.length-1]:void 0},n.commaList=function(t,n="or"){return t.length<=1?t.join(""):2===t.length?t.join(" "+n+" "):t.slice(0,-1).join(", ")+", "+n+" "+t[t.length-1]}},9938:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.firstNotBlank=n.mapNotBlankOr=n.mapNotBlank=n.notBlankAnd=n.notBlankOr=n.ifNotBlank=n.notBlank=n.blankish=n.blank=void 0;const r=e(6776),i=e(957),o=e(2798);function u(t){if(null==t)return!0;const n=o.toS(t);return 0===n.length||0===n.trim().length}n.blank=u;const l=["","null","undefined"];function s(t){return!u(t)}function c(t,n){if(!1===t||null==t||""===t)return;const e=o.toS(t);return s(e)?n(e):void 0}n.blankish=function(t){return null==t||l.includes(o.toS(t).trim())},n.notBlank=s,n.ifNotBlank=function(t){if(null==t)return;const n=o.toS(t);return 0===n.length||0===n.trim().length?void 0:n},n.notBlankOr=function(t,n){if(null==t)return i.tot(n);const e=o.toS(t).trim();return e.length>0?e:i.tot(n)},n.notBlankAnd=function(t,n){return!u(t)&&n(t)},n.mapNotBlank=c,n.mapNotBlankOr=function(t,n,e){return r.orElse(c(t,n),e)},n.firstNotBlank=function(...t){for(const n of t)if(s(n))return n}},4603:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.eql=void 0;const r=e(7748);n.eql=function(t,n){return r.stringify(t)===r.stringify(n)}},810:(t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isIterable=void 0,n.isIterable=function(t){return null!=t&&"string"!=typeof t&&"function"==typeof t[Symbol.iterator]}},7748:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.stringify=void 0;const r=e(6776);n.stringify=function(t,n,e,i){return JSON.stringify(t,function(t,n){const e=[],r=[],i=null!=n?n:(t,n)=>e[0]===n?"[Circular ~]":"[Circular ~."+r.slice(0,e.indexOf(n)).join(".")+"]";return function(n,o){if(e.length>0){const t=e.indexOf(this);t>=0?(e.splice(t+1),r.splice(t,1/0,n)):(e.push(this),r.push(n)),e.indexOf(o)>=0&&(o=i.call(this,n,o))}else e.push(o);return null==t?o:t.call(this,n,o)}}(n,i),r.denull(e))}},1682:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isList=void 0;const r=e(4601);n.isList=function(t){return null!=t&&(Array.isArray(t)||isFinite(t.length)&&r.isFunction(t[Symbol.iterator])&&r.isFunction(t.push)&&r.isFunction(t.pop)&&r.isFunction(t.forEach)&&r.isFunction(t.some))}},1040:(t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.deleteIf=n.getOrSet=void 0,n.getOrSet=function(t,n,e){if(null==n)throw new Error("null key");if(t.has(n))return t.get(n);{const r=e();return null!=r&&t.set(n,r),r}},n.deleteIf=function(t,n){for(const[e,r]of t.entries())n(e,r)&&t.delete(e)}},6776:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.nulled=n.denull=n.firstDefined=n.allDefined=n.defined=n.map2Or=n.mapOr=n.orElse=n.map3=n.map2=n.mapTry=n.map=void 0;const r=e(957),i=e(2798);function o(t,n){return null==t?void 0:n(t)}function u(t,n,e){return null==t||null==n?void 0:e(t,n)}function l(t,n){return null!=t?t:r.tot(n)}function s(t){return null!=t}n.map=o,n.mapTry=function(t,n){try{return o(t(),n)}catch{return}},n.map2=u,n.map3=function(t,n,e,r){return null==t||null==n||null==e?void 0:r(t,n,e)},n.orElse=l,n.mapOr=function(t,n,e){return null!=t?n(t):r.tot(e)},n.map2Or=function(t,n,e,r){return l(u(t,n,e),r)},n.defined=s,n.allDefined=function(t){return null!=t&&t.every(s)},n.firstDefined=function(...t){return t.find(s)},n.denull=function(t){return null==t||"null"===i.toS(t)?void 0:t},n.nulled=function(t){return null==t?null:t}},5556:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.times=n.clamp=n.base10Ceil=n.base2Ceil=n.sigFigs=n.toPrecision=n.toFixed=n.toPrecisionMaybe=n.round=n.numericOr=n.mapNumericOr=n.map2Numeric=n.mapNumeric=n.mapIntOr=n.id=n.mapFloat=n.mapInt=n.gte0=n.lte0=n.gtOrElse=n.gt0=n.lt0=n.toGt0=n.toFloat=n.toInt=n.isToNumber=n.trunc=n.closeTo=n.absdiff=n.diff=n.finiteOrElse=n.gte=n.gt=n.lte=n.lt=n.mapFinite=n.isNumber=void 0;const r=e(9938),i=e(6776),o=e(4601),u=e(8510),l=e(957),s=e(2798);function c(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function a(t,n){return c(t)?n(t):void 0}n.isNumber=c,n.mapFinite=a;const f=t=>(n,e)=>c(n)&&c(e)&&t(n,e);function p(t){if(!c(t))return;const n=Math.trunc(t);return 0===n?Math.abs(n):n}function m(t){return o.isFunction(t.toNumber)}function d(t,n){if(r.blank(t))return n.defaultValue;if(c(t))return n.nton(t);if(m(t))return n.nton(t.toNumber());try{const e=n.ston(s.toS(t));return c(e)?n.nton(e):n.defaultValue}catch{return n.defaultValue}}function h(t,n){return d(t,{defaultValue:void 0,nton:t=>p(t),ston:parseInt,...n})}function y(t,n){return d(t,{defaultValue:void 0,nton:t=>t,ston:parseFloat,...n})}function g(t){return c(t)&&t>0}function b(t,n){return u.opt(t).flatMap((t=>h(t))).flatMap(n).get()}function v(t,n){return c(t)?n(t):void 0}function O(t){return t<0?-Math.round(-t):Math.round(t)}function M(t,n){if(null==t)return 0;const e=Math.pow(10,n);return O(t*e)/e}n.lt=f(((t,n)=>t<n)),n.lte=f(((t,n)=>t<=n)),n.gt=f(((t,n)=>t>n)),n.gte=f(((t,n)=>t>=n)),n.finiteOrElse=function(t,n){return c(t)?t:n},n.diff=function(t,n){return c(t)&&c(n)?t-n:void 0},n.absdiff=function(t,n){return c(t)&&c(n)?Math.abs(t-n):void 0},n.closeTo=function(t,n,e){return null!=t&&null!=n&&Math.abs(t-n)<e},n.trunc=p,n.isToNumber=m,n.toInt=h,n.toFloat=y,n.toGt0=function(t){const n=h(t);return null!=n&&n>0?n:void 0},n.lt0=function(t){return c(t)&&t<0},n.gt0=g,n.gtOrElse=function(t,n){return c(t)&&c(n)&&t>n?t:void 0},n.lte0=function(t){return c(t)&&t<=0},n.gte0=function(t){return c(t)&&t>=0},n.mapInt=b,n.mapFloat=function(t,n){return u.opt(t).flatMap((t=>y(t))).flatMap(n).get()},n.id=function(t){const n=h(t);return g(n)?String(n):void 0},n.mapIntOr=function(t,n,e){return i.orElse(b(t,n),e)},n.mapNumeric=v,n.map2Numeric=function(t,n,e){return v(t,(t=>v(n,(n=>e(t,n)))))},n.mapNumericOr=function(t,n,e){return c(t)?n(t):e},n.numericOr=function(t,n){return c(t)?t:l.tot(n)},n.round=O,n.toPrecisionMaybe=function(t,n){return a(t,(t=>M(t,n)))},n.toFixed=function(t,n){try{return v(t,(t=>O(t*10**n)/10**n))}catch(t){return}},n.toPrecision=M,n.sigFigs=function(t,n){if(0===t||0===n)return 0;const e=n-O(Math.ceil(Math.log10(Math.abs(t)))),r=Math.pow(10,Math.abs(e));return e<0?O(t/r)*r:O(t*r)/r},n.base2Ceil=function(t){return Math.pow(2,Math.ceil(Math.log2(t)))},n.base10Ceil=function(t){return Math.pow(10,Math.ceil(Math.log10(t)))},n.clamp=function(t,n,e){if(t>n||!c(t)||!c(n))throw new Error(`invalid clamp(${t}, ${n}, ${e})`);return c(e)?e<t?t:e>n?n:e:O((t+n)/2)},n.times=function(t,n){if(!g(t))return[];const e=Math.round(t);return e<=0?[]:[...Array(e)].map(((t,e)=>n(e)))}},4601:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.objectType=n.isObject=n.isFunction=n.isSymbol=n.ObjectType=void 0;const r=e(810),i=e(8199);var o;function u(t){return"symbol"==typeof t}function l(t){return"function"==typeof t}function s(t){return null==t?o.Empty:u(t)?o.Symbol:i.isPrimitive(t)?o.Primitive:Array.isArray(t)?o.Array:r.isIterable(t)?o.Iterable:l(t)?o.Function:"object"==typeof t?null!=t.constructor&&"Object"===t.constructor.name?o.Object:o.Instance:o.Unknown}!function(t){t[t.Empty=0]="Empty",t[t.Primitive=1]="Primitive",t[t.Symbol=2]="Symbol",t[t.Object=3]="Object",t[t.Array=4]="Array",t[t.Iterable=5]="Iterable",t[t.Instance=6]="Instance",t[t.Function=7]="Function",t[t.Unknown=8]="Unknown"}(o=n.ObjectType||(n.ObjectType={})),n.isSymbol=u,n.isFunction=l,n.isObject=function(t){return s(t)===o.Object},n.objectType=s},8510:(t,n)=>{"use strict";var e;Object.defineProperty(n,"__esModule",{value:!0}),n.opt=n.isOpt=n.Some=n.None=void 0,function(t){t.isDefined=!1,t.isEmpty=!0,t.get=()=>{},t.exists=()=>!1;const n=()=>t;t.map=n,t.flatMap=n,t.filter=n,t.forEach=n,t.getOrElse=t=>t(),t.orElse=t=>o(t()),t.zip1=n,t.zip2=n,t.zip3=n}(e||(e={})),n.None=e;class r{constructor(t){this.a=t,this.isDefined=!0,this.isEmpty=!1}get(){return this.a}exists(t){return t(this.a)}map(t){return new r(t(this.a))}flatMap(t){const n=t(this.a);return i(n)?n:o(n)}filter(t){return o(t(this.a)?this.a:void 0)}forEach(t){return t(this.a),this}getOrElse(){return this.a}orElse(){return this}zip1(t,n){return o(t).flatMap((t=>n(this.a,t)))}zip2(t,n,e){return o(t).flatMap((t=>o(n).flatMap((n=>e(this.a,t,n)))))}zip3(t,n,e,r){return o(t).flatMap((t=>o(n).flatMap((n=>o(e).flatMap((e=>r(this.a,t,n,e)))))))}}function i(t){return t instanceof r||t===n.None}function o(t){return i(t)?t:null!=t?new r(t):n.None}n.Some=r,n.isOpt=i,n.opt=o},8199:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.cmpArr=n.gt=n.gte=n.lte=n.lt=n.cmp=n.isPrimitiveArray=n.mapPrimitiveOr=n.mapPrimitive=n.isPrimitive=void 0;const r=e(1944),i=e(2798),o=["number","string","boolean"];function u(t){return-1!==o.indexOf(typeof t)}n.isPrimitive=u,n.mapPrimitive=function(t,n){return u(t)?n(t):void 0},n.mapPrimitiveOr=function(t,n,e){return u(t)?n(t):e()},n.isPrimitiveArray=function(t){return Array.isArray(t)&&t.every(u)};const l=["boolean","number","bigint","symbol","string","object","function"];function s(t,n){if(null==t&&null==n)return 0;if(null==t)return-1;if(null==n)return 1;const e=typeof t,r=typeof n;return"string"!==e&&"symbol"!==e||"string"!==r&&"symbol"!==r?Array.isArray(t)&&Array.isArray(n)?c(t,n):e!==r?l.indexOf(e)-l.indexOf(r):t>n?1:t<n?-1:0:i.toS(t).localeCompare(i.toS(n))}function c(t,n){if(r.isEmpty(t)&&r.isEmpty(n))return 0;const e=Math.min(t.length,n.length);for(let r=0;r<e;r++){const e=s(t[r],n[r]);if(0!==e)return e}return s(t.length,n.length)}n.cmp=s,n.lt=function(t,n){return s(t,n)<0},n.lte=function(t,n){return s(t,n)<=0},n.gte=function(t,n){return s(t,n)>=0},n.gt=function(t,n){return s(t,n)>0},n.cmpArr=c},3175:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.pickWeightedRandom=n.sample=n.shuffle=n.pickRandom=n.randomChar=n.randomChars=n.RandomChars=n.randomFloat=n.randomInts=n.randomInt=void 0;const r=e(1944),i=e(5556);function o(t,n,e=[]){if(t=Math.ceil(t),(n=Math.floor(n))<t)return t;if(r.isNotEmpty(e)&&e.length+10>n-t){const i=r.range(t,n).filter((t=>!e.includes(t)));return r.mapNotEmpty(i,(t=>t[o(0,i.length)]))}const i=Math.floor(Math.random()*(n-t))+t;return e.includes(i)?o(t,n,e):i}function u(t,n){return Math.random()*(n-t)+t}function l(t=n.RandomChars){return t[o(0,t.length)]}function s(t){const n=[...t];for(let t=n.length-1;t>0;t-=1){const e=Math.floor(Math.random()*(t+1));t!==e&&([n[t],n[e]]=[n[e],n[t]])}return n}n.randomInt=o,n.randomInts=function(t,n,e){const r=[];for(;r.length<e;)r.push(o(t,n,r));return r},n.randomFloat=u,n.RandomChars="0123456789abcdefghijkmnopqrstuvwxyz",n.randomChars=function(t,e=n.RandomChars){let r="";for(let n=0;n<t;n++)r+=l(e);return r},n.randomChar=l,n.pickRandom=function(t){return t[o(0,t.length)]},n.shuffle=s,n.sample=function(t,n){if(n<t.length/10){const e=new Set;for(;e.size<n;)e.add(o(0,t.length));return[...e.keys()].map((n=>t[n]))}return s([...t]).slice(0,n)},n.pickWeightedRandom=function(t){if(r.isEmpty(t))return;const n=t.filter((t=>i.gt0(t.priority)));let e=u(0,r.sum(n,(t=>t.priority)));return n.find((t=>(e-=t.priority,e<=0)))}},4726:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.compressWhitespace=n.replaceAll=n.eqlStrings=n.wrap=n.leftIndexOf=n.newlineRe=n.ellipsize=n.ensureSuffix=n.ensurePrefix=void 0;const r=e(1944),i=e(2798);function o(t,n){return t=i.toS(t),n=i.toS(n),t.startsWith(n)?t:n+t}function u(t,n,e){null==e&&(e=t.length);for(let r=e;r>=0;r--)if(t.substr(r).startsWith(n))return r;return-1}n.ensurePrefix=o,n.ensureSuffix=function(t,n){return t=i.toS(t),n=i.toS(n),t.endsWith(n)?t:t+n},n.ellipsize=function(t,n=80){if(null==t)return"";const e=i.toS(t);return e.length<=n?e:e.slice(0,n-1)+"…"},n.newlineRe=/\r?\n/gm,n.leftIndexOf=u,n.wrap=function t(e,l={maxLineLen:75,prefix:""}){if(e.includes("\n"))return r.flatten(e.split(n.newlineRe).map((n=>t(n,l))));if((e=o(i.toS(e),l.prefix).trim()).length<=l.maxLineLen)return[e];const s=u(e," ",l.maxLineLen);if(s>l.prefix.length)return[e.slice(0,s),...t(e.slice(s+1),l)];{const n=e.indexOf(" ",l.prefix.length+1);return n>0&&n<e.length-1?[e.slice(0,n),...t(e.slice(n+1),l)]:[e]}},n.eqlStrings=function(t,n){return null!=t&&null!=n&&t.normalize()===n.normalize()},n.replaceAll=function(t,n,e){return t.split(n).join(e)},n.compressWhitespace=function(...t){return t.join(" ").replace(/\s+/g," ").trim()}},957:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.NoOp=n.firstDefinedThunk=n.tot=void 0;const r=e(4601);n.tot=function(t){return r.isFunction(t)?t():t},n.firstDefinedThunk=function(t){for(const n of t){const t=n();if(null!=t)return t}},n.NoOp=()=>{}},9784:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.toA=void 0;const r=e(810);n.toA=function(t){return null==t?[]:Array.isArray(t)?t:r.isIterable(t)?Array.from(t):[t]}},2798:(t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.toS=void 0,n.toS=function t(n){return null==n?"":"string"==typeof n?n:Array.isArray(n)?n.map(t).join(","):n.toString()}},7941:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.addFooter=n.CliDesc=n.descriptionFooter=void 0;const r=e(1765),i=e(4726),o=(new Date).getFullYear();n.descriptionFooter=`Please visit <https://photostructure.com/support/> for detailed usage and configuration instructions.\n\nCopyright © 2017-${o}, PhotoStructure Inc.\n\nRunning this software indicates your agreement to all the terms of this license: <https://photostructure.com/eula/>`,n.CliDesc={main:"PhotoStructure's main process manager. Runs and manages web and sync services.",info:"Configuration, file metadata and import diagnostics tool. ",list:"List all paths in a Library.",logcat:"Chronologically sort and pretty-print PhotoStructure logfiles.",logtail:"View the log messages of currently-running PhotoStructure processes. (Like `tail -f`).",web:"PhotoStructure's web service. Automatically started by main.",sync:"PhotoStructure's directory synchronization service. Automatically started by main.","sync-file":"PhotoStructure's file synchronization service. Automatically started by sync."},n.addFooter=function(t){return t.on("--help",(()=>{var t;console.log("\n"+i.wrap(n.descriptionFooter,{maxLineLen:null!==(t=r.stdout.columns)&&void 0!==t?t:78,prefix:""}).join("\n")+"\n")}))}},7978:(t,n,e)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e(647),i=e(1765),o=e(2041),u=e(7941);r.program.version(o.version),r.program.description("Welcome to PhotoStructure, your new home for all your photos and videos."),u.addFooter(r.program).command("main",u.CliDesc.main+" (default)",{isDefault:!0,executableFile:"bin/main.js"}).command("info",u.CliDesc.info,{executableFile:"bin/info.js"}).command("list",u.CliDesc.list,{executableFile:"bin/list.js"}).command("logcat",u.CliDesc.logcat,{executableFile:"bin/logcat.js"}).command("logtail",u.CliDesc.logtail,{executableFile:"bin/logtail.js"}).command("web",u.CliDesc.web,{executableFile:"bin/web.js"}).command("sync",u.CliDesc.sync,{executableFile:"bin/sync.js"}).command("sync-file",u.CliDesc["sync-file"],{executableFile:"bin/sync-file.js"}).parse(i.argv)},647:t=>{"use strict";t.exports=require("commander")},1765:t=>{"use strict";t.exports=require("process")}},n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{}};return t[r](i,i.exports,e),i.exports}return e(8565),e(7978)})();