@syncify/cli 0.1.3-beta → 0.2.1-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs.js CHANGED
@@ -1,190 +1,221 @@
1
1
  'use strict';
2
2
 
3
- var jo = require('node-notifier');
4
- var la = require('axios');
3
+ var Ds = require('process');
4
+ var fl = require('axios');
5
5
  var events = require('events');
6
6
  var module$1 = require('module');
7
- var da = require('zlib');
8
- var perf_hooks = require('perf_hooks');
9
- var ha = require('os');
10
- var ao = require('readline');
7
+ var yl = require('zlib');
11
8
  var stream = require('stream');
12
9
  var console$1 = require('console');
13
- var vo = require('process');
10
+ var perf_hooks = require('perf_hooks');
11
+ var Fl = require('os');
12
+ var Xo = require('readline');
13
+ var child_process = require('child_process');
14
14
  var path = require('path');
15
- var ll = require('cross-spawn');
16
- var Mn = require('fast-glob');
15
+ var url = require('url');
16
+ var vu = require('node-notifier');
17
+ var Wa = require('fast-glob');
17
18
  var fsExtra = require('fs-extra');
18
19
  require('prompts');
19
- var Vu = require('anymatch');
20
+ var za = require('anymatch');
20
21
  var htmlMinifierTerser = require('html-minifier-terser');
21
- var pc = require('gray-matter');
22
+ var kp = require('gray-matter');
22
23
  require('turndown');
23
24
  require('turndown-plugin-gfm');
24
- var Dc = require('markdown-it');
25
- var Wc = require('chokidar');
26
- var ws$1 = require('ws');
27
- var Ic = require('serve-static');
28
- var jc = require('finalhandler');
29
- var Nc = require('http');
30
- var xf = require('dotenv');
31
- var url = require('url');
32
- var esbuild = require('esbuild');
25
+ var Op = require('markdown-it');
26
+ var ws = require('ws');
27
+ var Xp = require('serve-static');
28
+ var Zp = require('finalhandler');
29
+ var ef = require('http');
30
+ var chokidar = require('chokidar');
31
+ var If = require('dotenv');
32
+ var of = require('cross-spawn');
33
33
  var loadTsconfig = require('load-tsconfig');
34
+ var esbuild = require('esbuild');
34
35
 
35
- var Zu=Object.create;var Bs=Object.defineProperty;var ea=Object.getOwnPropertyDescriptor;var ta=Object.getOwnPropertyNames;var ra=Object.getPrototypeOf,sa=Object.prototype.hasOwnProperty;var ei=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,s)=>(typeof require<"u"?require:t)[s]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var Ne=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Wt=(e,t)=>{for(var s in t)Bs(e,s,{get:t[s],enumerable:!0});},na=(e,t,s,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ta(t))!sa.call(e,n)&&n!==s&&Bs(e,n,{get:()=>t[n],enumerable:!(r=ea(t,n))||r.enumerable});return e};var Et=(e,t,s)=>(s=e!=null?Zu(ra(e)):{},na(t||!e||!e.__esModule?Bs(s,"default",{value:e,enumerable:!0}):s,e));var pi=Ne((Bp,Ts)=>{var oa=Object.prototype.hasOwnProperty,ce="~";function Vt(){}Object.create&&(Vt.prototype=Object.create(null),new Vt().__proto__||(ce=!1));function ua(e,t,s){this.fn=e,this.context=t,this.once=s||!1;}function fi(e,t,s,r,n){if(typeof s!="function")throw new TypeError("The listener must be a function");var i=new ua(s,r||e,n),o=ce?ce+t:t;return e._events[o]?e._events[o].fn?e._events[o]=[e._events[o],i]:e._events[o].push(i):(e._events[o]=i,e._eventsCount++),e}function Sr(e,t){--e._eventsCount===0?e._events=new Vt:delete e._events[t];}function le(){this._events=new Vt,this._eventsCount=0;}le.prototype.eventNames=function(){var t=[],s,r;if(this._eventsCount===0)return t;for(r in s=this._events)oa.call(s,r)&&t.push(ce?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(s)):t};le.prototype.listeners=function(t){var s=ce?ce+t:t,r=this._events[s];if(!r)return [];if(r.fn)return [r.fn];for(var n=0,i=r.length,o=new Array(i);n<i;n++)o[n]=r[n].fn;return o};le.prototype.listenerCount=function(t){var s=ce?ce+t:t,r=this._events[s];return r?r.fn?1:r.length:0};le.prototype.emit=function(t,s,r,n,i,o){var a=ce?ce+t:t;if(!this._events[a])return !1;var u=this._events[a],c=arguments.length,f,d;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),c){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,s),!0;case 3:return u.fn.call(u.context,s,r),!0;case 4:return u.fn.call(u.context,s,r,n),!0;case 5:return u.fn.call(u.context,s,r,n,i),!0;case 6:return u.fn.call(u.context,s,r,n,i,o),!0}for(d=1,f=new Array(c-1);d<c;d++)f[d-1]=arguments[d];u.fn.apply(u.context,f);}else {var h=u.length,w;for(d=0;d<h;d++)switch(u[d].once&&this.removeListener(t,u[d].fn,void 0,!0),c){case 1:u[d].fn.call(u[d].context);break;case 2:u[d].fn.call(u[d].context,s);break;case 3:u[d].fn.call(u[d].context,s,r);break;case 4:u[d].fn.call(u[d].context,s,r,n);break;default:if(!f)for(w=1,f=new Array(c-1);w<c;w++)f[w-1]=arguments[w];u[d].fn.apply(u[d].context,f);}}return !0};le.prototype.on=function(t,s,r){return fi(this,t,s,r,!1)};le.prototype.once=function(t,s,r){return fi(this,t,s,r,!0)};le.prototype.removeListener=function(t,s,r,n){var i=ce?ce+t:t;if(!this._events[i])return this;if(!s)return Sr(this,i),this;var o=this._events[i];if(o.fn)o.fn===s&&(!n||o.once)&&(!r||o.context===r)&&Sr(this,i);else {for(var a=0,u=[],c=o.length;a<c;a++)(o[a].fn!==s||n&&!o[a].once||r&&o[a].context!==r)&&u.push(o[a]);u.length?this._events[i]=u.length===1?u[0]:u:Sr(this,i);}return this};le.prototype.removeAllListeners=function(t){var s;return t?(s=ce?ce+t:t,this._events[s]&&Sr(this,s)):(this._events=new Vt,this._eventsCount=0),this};le.prototype.off=le.prototype.removeListener;le.prototype.addListener=le.prototype.on;le.prefixed=ce;le.EventEmitter=le;typeof Ts<"u"&&(Ts.exports=le);});var qi=Ne((rD,Qs)=>{var Ze={};typeof Qs>"u"?window.eastasianwidth=Ze:Qs.exports=Ze;Ze.eastAsianWidth=function(e){var t=e.charCodeAt(0),s=e.length==2?e.charCodeAt(1):0,r=t;return 55296<=t&&t<=56319&&56320<=s&&s<=57343&&(t&=1023,s&=1023,r=t<<10|s,r+=65536),r==12288||65281<=r&&r<=65376||65504<=r&&r<=65510?"F":r==8361||65377<=r&&r<=65470||65474<=r&&r<=65479||65482<=r&&r<=65487||65490<=r&&r<=65495||65498<=r&&r<=65500||65512<=r&&r<=65518?"H":4352<=r&&r<=4447||4515<=r&&r<=4519||4602<=r&&r<=4607||9001<=r&&r<=9002||11904<=r&&r<=11929||11931<=r&&r<=12019||12032<=r&&r<=12245||12272<=r&&r<=12283||12289<=r&&r<=12350||12353<=r&&r<=12438||12441<=r&&r<=12543||12549<=r&&r<=12589||12593<=r&&r<=12686||12688<=r&&r<=12730||12736<=r&&r<=12771||12784<=r&&r<=12830||12832<=r&&r<=12871||12880<=r&&r<=13054||13056<=r&&r<=19903||19968<=r&&r<=42124||42128<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||55216<=r&&r<=55238||55243<=r&&r<=55291||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65106||65108<=r&&r<=65126||65128<=r&&r<=65131||110592<=r&&r<=110593||127488<=r&&r<=127490||127504<=r&&r<=127546||127552<=r&&r<=127560||127568<=r&&r<=127569||131072<=r&&r<=194367||177984<=r&&r<=196605||196608<=r&&r<=262141?"W":32<=r&&r<=126||162<=r&&r<=163||165<=r&&r<=166||r==172||r==175||10214<=r&&r<=10221||10629<=r&&r<=10630?"Na":r==161||r==164||167<=r&&r<=168||r==170||173<=r&&r<=174||176<=r&&r<=180||182<=r&&r<=186||188<=r&&r<=191||r==198||r==208||215<=r&&r<=216||222<=r&&r<=225||r==230||232<=r&&r<=234||236<=r&&r<=237||r==240||242<=r&&r<=243||247<=r&&r<=250||r==252||r==254||r==257||r==273||r==275||r==283||294<=r&&r<=295||r==299||305<=r&&r<=307||r==312||319<=r&&r<=322||r==324||328<=r&&r<=331||r==333||338<=r&&r<=339||358<=r&&r<=359||r==363||r==462||r==464||r==466||r==468||r==470||r==472||r==474||r==476||r==593||r==609||r==708||r==711||713<=r&&r<=715||r==717||r==720||728<=r&&r<=731||r==733||r==735||768<=r&&r<=879||913<=r&&r<=929||931<=r&&r<=937||945<=r&&r<=961||963<=r&&r<=969||r==1025||1040<=r&&r<=1103||r==1105||r==8208||8211<=r&&r<=8214||8216<=r&&r<=8217||8220<=r&&r<=8221||8224<=r&&r<=8226||8228<=r&&r<=8231||r==8240||8242<=r&&r<=8243||r==8245||r==8251||r==8254||r==8308||r==8319||8321<=r&&r<=8324||r==8364||r==8451||r==8453||r==8457||r==8467||r==8470||8481<=r&&r<=8482||r==8486||r==8491||8531<=r&&r<=8532||8539<=r&&r<=8542||8544<=r&&r<=8555||8560<=r&&r<=8569||r==8585||8592<=r&&r<=8601||8632<=r&&r<=8633||r==8658||r==8660||r==8679||r==8704||8706<=r&&r<=8707||8711<=r&&r<=8712||r==8715||r==8719||r==8721||r==8725||r==8730||8733<=r&&r<=8736||r==8739||r==8741||8743<=r&&r<=8748||r==8750||8756<=r&&r<=8759||8764<=r&&r<=8765||r==8776||r==8780||r==8786||8800<=r&&r<=8801||8804<=r&&r<=8807||8810<=r&&r<=8811||8814<=r&&r<=8815||8834<=r&&r<=8835||8838<=r&&r<=8839||r==8853||r==8857||r==8869||r==8895||r==8978||9312<=r&&r<=9449||9451<=r&&r<=9547||9552<=r&&r<=9587||9600<=r&&r<=9615||9618<=r&&r<=9621||9632<=r&&r<=9633||9635<=r&&r<=9641||9650<=r&&r<=9651||9654<=r&&r<=9655||9660<=r&&r<=9661||9664<=r&&r<=9665||9670<=r&&r<=9672||r==9675||9678<=r&&r<=9681||9698<=r&&r<=9701||r==9711||9733<=r&&r<=9734||r==9737||9742<=r&&r<=9743||9748<=r&&r<=9749||r==9756||r==9758||r==9792||r==9794||9824<=r&&r<=9825||9827<=r&&r<=9829||9831<=r&&r<=9834||9836<=r&&r<=9837||r==9839||9886<=r&&r<=9887||9918<=r&&r<=9919||9924<=r&&r<=9933||9935<=r&&r<=9953||r==9955||9960<=r&&r<=9983||r==10045||r==10071||10102<=r&&r<=10111||11093<=r&&r<=11097||12872<=r&&r<=12879||57344<=r&&r<=63743||65024<=r&&r<=65039||r==65533||127232<=r&&r<=127242||127248<=r&&r<=127277||127280<=r&&r<=127337||127344<=r&&r<=127386||917760<=r&&r<=917999||983040<=r&&r<=1048573||1048576<=r&&r<=1114109?"A":"N"};Ze.characterLength=function(e){var t=this.eastAsianWidth(e);return t=="F"||t=="W"||t=="A"?2:1};function Mi(e){return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}Ze.length=function(e){for(var t=Mi(e),s=0,r=0;r<t.length;r++)s=s+this.characterLength(t[r]);return s};Ze.slice=function(e,t,s){textLen=Ze.length(e),t=t||0,s=s||1,t<0&&(t=textLen+t),s<0&&(s=textLen+s);for(var r="",n=0,i=Mi(e),o=0;o<i.length;o++){var a=i[o],u=Ze.length(a);if(n>=t-(u==2?1:0))if(n+u<=s)r+=a;else break;n+=u;}return r};});var Gi=Ne((sD,Li)=>{Li.exports=function(){return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\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])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\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\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\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-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*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\u26A7\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-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\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[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};});var no=Ne(Mr=>{Object.defineProperty(Mr,"__esModule",{value:!0});var en=e=>{let[,t]=/([a-f\d]{3,6})/i.exec(e)||[],s=t?t.length:0;if(s===3)t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2];else if(s!==6)return [0,0,0];let r=parseInt(t,16);return [r>>16&255,r>>8&255,255&r]},et=(e,t,s)=>t>e?t:e>s?s:e,Aa=(e,t,s)=>{if(t==="")return e;let r=e.indexOf(t);if(r<0)return e;let n=t.length,i=0,o="";for(;~r;)o+=e.slice(i,r)+s,i=r+n,r=e.indexOf(t,i);return o+e.slice(i)},eo={open:"",close:""},C=(e=>{let t=w=>!!o.find(B=>w.test(B)),s=e||(typeof process<"u"?process:{}),{stdout:r,platform:n}=s,i=s.env||{},o=s.argv||[],a="FORCE_COLOR"in i,u=i.FORCE_COLOR,c=u==="true"||parseInt(u)>0,f="NO_COLOR"in i||a&&!c||t(/^-{1,2}(no-color|color=false|color=never)$/),d=a&&c||t(/^-{1,2}(color|color=true|color=always)$/),h=r&&"isTTY"in r&&/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM);return !f&&(d||h||n==="win32"||"CI"in i)})()?(e,t)=>({open:`\x1B[${e}m`,close:`\x1B[${t}m`}):()=>eo,tn=(e,t,s)=>C(`38;2;${e};${t};${s}`,39),Xi=(e,t,s)=>C(`48;2;${e};${t};${s}`,49),$a={visible:eo,reset:C(0,0),inverse:C(7,27),hidden:C(8,28),bold:C(1,22),dim:C(2,22),faint:C(2,22),italic:C(3,23),underline:C(4,24),doubleUnderline:C(21,24),strikethrough:C(9,29),strike:C(9,29),frame:C(51,54),encircle:C(52,54),overline:C(53,55),black:C(30,39),red:C(31,39),green:C(32,39),yellow:C(33,39),blue:C(34,39),magenta:C(35,39),cyan:C(36,39),white:C(37,39),grey:C(90,39),gray:C(90,39),blackBright:C(90,39),redBright:C(91,39),greenBright:C(92,39),yellowBright:C(93,39),blueBright:C(94,39),magentaBright:C(95,39),cyanBright:C(96,39),whiteBright:C(97,39),bgBlack:C(40,49),bgRed:C(41,49),bgGreen:C(42,49),bgYellow:C(43,49),bgBlue:C(44,49),bgMagenta:C(45,49),bgCyan:C(46,49),bgWhite:C(47,49),bgBlackBright:C(100,49),bgRedBright:C(101,49),bgGreenBright:C(102,49),bgYellowBright:C(103,49),bgBlueBright:C(104,49),bgMagentaBright:C(105,49),bgCyanBright:C(106,49),bgWhiteBright:C(107,49)},{defineProperty:Ta,defineProperties:_a,setPrototypeOf:to}=Object,ka=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,Ra=/(\r*\n)/g,ro=function(){let e=t=>t;return e.strip=t=>t.replace(ka,""),e.extend=t=>{for(let s in t){let r=t[s],n=r.open!=null?r:tn(...en(r));We[s]={get(){let i=so(this,n);return Ta(this,s,{value:i}),i}};}rn=_a(()=>{},We),to(e,rn);},e.extend($a),e},so=({props:e},{open:t,close:s})=>{let r=(o,...a)=>Pa(o,a,r.props),n=t,i=s;return e!==void 0&&(n=e.openStack+t,i=s+e.closeStack),to(r,rn),r.props={open:t,close:s,openStack:n,closeStack:i,parent:e},r.open=n,r.close=i,r},Pa=(e,t,s)=>{if(!e)return "";let{openStack:r,closeStack:n}=s,i=e.raw!=null?String.raw(e,...t):e;if(~i.indexOf("\x1B"))for(;s!==void 0;)i=Aa(i,s.close,s.open),s=s.parent;return ~i.indexOf(`
36
- `)&&(i=i.replace(Ra,n+"$1"+r)),r+i+n},Zi={ansi:e=>(t=>C(`38;5;${t}`,39))(et(e,0,255)),bgAnsi:e=>(t=>C(`48;5;${t}`,49))(et(e,0,255)),hex:e=>tn(...en(e)),bgHex:e=>Xi(...en(e)),rgb:(e,t,s)=>tn(et(e,0,255),et(t,0,255),et(s,0,255)),bgRgb:(e,t,s)=>Xi(et(e,0,255),et(t,0,255),et(s,0,255))},We={},rn;for(let e in Zi)We[e]={get(){return (...t)=>so(this,Zi[e](...t))}};We.ansi256=We.fg=We.ansi,We.bgAnsi256=We.bg=We.bgAnsi;var Oa=new ro;Mr.Ansis=ro,Mr.default=Oa;});var oo=Ne((mD,sn)=>{var io=no();sn.exports=io.default;sn.exports.Ansis=io.Ansis;});var mo=Ne((RD,mn)=>{var Do=(e,t)=>{for(let s of Reflect.ownKeys(t))Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(t,s));return e};mn.exports=Do;mn.exports.default=Do;});var go=Ne((PD,Jr)=>{var rl=mo(),Hr=new WeakMap,ho=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let s,r=0,n=e.displayName||e.name||"<anonymous>",i=function(...o){if(Hr.set(i,++r),r===1)s=e.apply(this,o),e=null;else if(t.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return s};return rl(i,e),Hr.set(i,r),i};Jr.exports=ho;Jr.exports.default=ho;Jr.exports.callCount=e=>{if(!Hr.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Hr.get(e)};});var yo=Ne((OD,Yr)=>{Yr.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Yr.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Yr.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");});var wo=Ne((ID,Tt)=>{var H=global.process,dt=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};dt(H)?(Fo=ei("assert"),At=yo(),xo=/^win/i.test(H.platform),lr=ei("events"),typeof lr!="function"&&(lr=lr.EventEmitter),H.__signal_exit_emitter__?ue=H.__signal_exit_emitter__:(ue=H.__signal_exit_emitter__=new lr,ue.count=0,ue.emitted={}),ue.infinite||(ue.setMaxListeners(1/0),ue.infinite=!0),Tt.exports=function(e,t){if(!dt(global.process))return function(){};Fo.equal(typeof e,"function","a callback must be provided for exit handler"),$t===!1&&dn();var s="exit";t&&t.alwaysLast&&(s="afterexit");var r=function(){ue.removeListener(s,e),ue.listeners("exit").length===0&&ue.listeners("afterexit").length===0&&Qr();};return ue.on(s,e),r},Qr=function(){!$t||!dt(global.process)||($t=!1,At.forEach(function(t){try{H.removeListener(t,Kr[t]);}catch{}}),H.emit=Xr,H.reallyExit=hn,ue.count-=1);},Tt.exports.unload=Qr,ht=function(t,s,r){ue.emitted[t]||(ue.emitted[t]=!0,ue.emit(t,s,r));},Kr={},At.forEach(function(e){Kr[e]=function(){if(!!dt(global.process)){var s=H.listeners(e);s.length===ue.count&&(Qr(),ht("exit",null,e),ht("afterexit",null,e),xo&&e==="SIGHUP"&&(e="SIGINT"),H.kill(H.pid,e));}};}),Tt.exports.signals=function(){return At},$t=!1,dn=function(){$t||!dt(global.process)||($t=!0,ue.count+=1,At=At.filter(function(t){try{return H.on(t,Kr[t]),!0}catch{return !1}}),H.emit=Eo,H.reallyExit=Co);},Tt.exports.load=dn,hn=H.reallyExit,Co=function(t){!dt(global.process)||(H.exitCode=t||0,ht("exit",H.exitCode,null),ht("afterexit",H.exitCode,null),hn.call(H,H.exitCode));},Xr=H.emit,Eo=function(t,s){if(t==="exit"&&dt(global.process)){s!==void 0&&(H.exitCode=s);var r=Xr.apply(this,arguments);return ht("exit",H.exitCode,null),ht("afterexit",H.exitCode,null),r}else return Xr.apply(this,arguments)}):Tt.exports=function(){return function(){}};var Fo,At,xo,lr,ue,Qr,ht,Kr,$t,dn,hn,Co,Xr,Eo;});function oe(e){if(e===null)return "Null";if(e===void 0)return "Undefined";if(Number.isNaN(e))return "NaN";let t=Object.prototype.toString.call(e).slice(8,-1);return t==="AsyncFunction"?"Promise":t}var{isArray:ze}=Array;function wt(e){return ze(e)?e.length>0:oe(e)==="Object"?Object.keys(e).length>0:Boolean(e)}function St(...e){let t=0;for(;t<e.length;){let s=e[t];if(oe(s)==="Function"){if(wt(s()))return !1}else if(wt(s))return !1;t++;}return !0}function De(...e){let t=0;for(;t<e.length;){let s=e[t];if(oe(s)==="Function"){if(wt(s()))return !0}else if(wt(s))return !0;t++;}return !1}function Fr(e,t="."){return typeof e=="string"?e.split(t):e}function bs(e,t){if(arguments.length===1)return i=>bs(e,i);if(t==null)return;let s=t,r=0,n=Fr(e);for(;r<n.length;){if(s==null||s[n[r]]===null)return;s=s[n[r]],r++;}return s}function Ut(e,t){if(!ze(t))throw new Error(`Cannot read property 'indexOf' of ${t}`);let s=oe(e);if(!["Object","Array","NaN","RegExp"].includes(s))return t.indexOf(e);let r=-1,n=-1,{length:i}=t;for(;++r<i&&n===-1;)xr(t[r],e)&&(n=r);return n}function ti(e){let t=[],s;for(;!(s=e.next()).done;)t.push(s.value);return t}function ia(e,t){if(e.size!==t.size)return !1;let s=ti(e.values()),r=ti(t.values());return s.filter(i=>Ut(i,r)===-1).length===0}function ri(e){let t=e.__proto__.toString();return ["Error","TypeError"].includes(t)?[t,e.message]:[]}function si(e){return e.toDateString?[!0,e.getTime()]:[!1]}function ni(e){return e.constructor!==RegExp?[!1]:[!0,e.toString()]}function xr(e,t){if(arguments.length===1)return c=>xr(e,c);let s=oe(e);if(s!==oe(t))return !1;if(s==="Function")return e.name===void 0?!1:e.name===t.name;if(["NaN","Undefined","Null"].includes(s))return !0;if(s==="Number")return Object.is(-0,e)!==Object.is(-0,t)?!1:e.toString()===t.toString();if(["String","Boolean"].includes(s))return e.toString()===t.toString();if(s==="Array"){let c=Array.from(e),f=Array.from(t);if(c.toString()!==f.toString())return !1;let d=!0;return c.forEach((h,w)=>{d&&h!==f[w]&&!xr(h,f[w])&&(d=!1);}),d}let r=ni(e),n=ni(t);if(r[0])return n[0]?r[1]===n[1]:!1;if(n[0])return !1;let i=si(e),o=si(t);if(i[0])return o[0]?i[1]===o[1]:!1;if(o[0])return !1;let a=ri(e),u=ri(t);if(a[0])return u[0]?a[0]===u[0]&&a[1]===u[1]:!1;if(s==="Set")return ia(e,t);if(s==="Object"){let c=Object.keys(e);if(c.length!==Object.keys(t).length)return !1;let f=!0;return c.forEach(d=>{if(f){let h=e[d],w=t[d];h!==w&&!xr(h,w)&&(f=!1);}}),f}return !1}function vs(e,t){if(arguments.length===1)return s=>vs(e,s);if(typeof t=="string")return t.includes(e);if(!t)throw new TypeError(`Cannot read property 'indexOf' of ${t}`);return ze(t)?Ut(e,t)>-1:!1}async function ii(e,t){if(ze(t)){let r=[],n=0;for(let i of t)r.push(await e(i,n++));return r}let s={};for(let r in t)s[r]=await e(t[r],r);return s}function He(e,t){return arguments.length===1?async s=>ii(e,s):new Promise((s,r)=>{ii(e,t).then(s).catch(r);})}function X(e,t){return arguments.length===1?s=>X(e,s):oe(t)===e}async function oi(e,t){let s=t.map((r,n)=>e(r,n));return Promise.all(s)}function Je(e,t){return arguments.length===1?async s=>oi(e,s):new Promise((s,r)=>{oi(e,t).then(s).catch(r);})}function As(e,t){if(arguments.length===1)return n=>As(e,n);if(t==null)return;let s=Fr(e,","),r={};for(let n in t)s.includes(n)||(r[n]=t[n]);return r}var Cr=class{constructor(){this.set=new Set,this.items={};}checkUniqueness(t){let s=oe(t);if(["Null","Undefined","NaN"].includes(s))return s in this.items?!1:(this.items[s]=!0,!0);if(!["Object","Array"].includes(s)){let r=this.set.size;return this.set.add(t),this.set.size!==r}return s in this.items?Ut(t,this.items[s])===-1?(this.items[s].push(t),!0):!1:(this.items[s]=[t],!0)}};function Er(e){let t=new Cr,s=[];return e.forEach(r=>{t.checkUniqueness(r)&&s.push(r);}),s}function m(e,t){return arguments.length===1?s=>m(e,s):t?t.hasOwnProperty(e):!1}function Re(e,t){return arguments.length===1?s=>Re(e,s):bs(e,t)!==void 0}function me(e){let t=oe(e);return ["Undefined","NaN","Number","Null"].includes(t)?!1:e?t==="Object"?Object.keys(e).length===0:t==="Array"?e.length===0:!1:!0}function M(e){return e==null}function ui(e){return typeof e=="string"?e[e.length-1]||"":e[e.length-1]}var{error:Q,log:A,warn:ai}=console,E="",de=" ",Me=e=>de.repeat(e),y=`
37
- `,_=e=>y.repeat(e);var v=Object.assign,Ce=Object.defineProperty,we=Object.keys,$s=Object.values,Ye=Array.from;Buffer.from;var b=Array.isArray,he=Buffer.isBuffer,q=X("Undefined"),j=X("Object"),ge=X("Boolean"),li=X("RegExp"),wr=X("Number"),P=X("String"),fe=X("Function");X("Async");var D={};Wt(D,{build:()=>fl,changed:()=>gl,clear:()=>Dt,deleted:()=>El,err:()=>pl,external:()=>ml,failed:()=>Al,hook:()=>dl,ignored:()=>bl,invalid:()=>vl,minified:()=>wl,nwl:()=>No,out:()=>A,process:()=>Mo,reloaded:()=>Sl,retrying:()=>Cl,skipped:()=>Bl,spawn:()=>Tl,start:()=>Oo,syncing:()=>Fl,throws:()=>$l,transform:()=>xl,unhook:()=>hl,update:()=>ko,upload:()=>yl,write:()=>Dl});var pe={},re={current:null,count:0,process:{}},V={json:{assets:!0,config:!0,locales:!0,metafields:!0,templates:!0,exclude:[]},script:{minifySyntax:!0,minifyIdentifiers:!0,minifyWhitespace:!0,mangleProps:void 0,legalComments:"none",mangleQuoted:!1,keepNames:!1},liquid:{minifyScript:!0,minifyStyle:!0,minifySchema:!0,removeComments:!0,stripDashes:!0,exclude:[]},html:{caseSensitive:!1,collapseBooleanAttributes:!1,collapseInlineTagWhitespace:!1,conservativeCollapse:!1,keepClosingSlash:!1,noNewlinesBeforeTagClose:!1,preventAttributesEscaping:!1,removeEmptyAttributes:!1,removeEmptyElements:!1,removeOptionalTags:!1,removeRedundantAttributes:!0,removeScriptTypeAttributes:!0,removeStyleLinkTypeAttributes:!0,useShortDoctype:!0,collapseWhitespace:!0,continueOnParseError:!0,removeComments:!0,trimCustomFragments:!0,ignoreCustomFragments:[/(?<=\bstyle\b=["']\s?)[\s\S]*?(?="[\s\n>]?)/,/<style[\s\S]*?<\/style>/,/<script[\s\S]*?<\/script>/,/{%-?\s*liquid[\s\S]*?%}/,/{%[\s\S]*?%}/]}},L={json:{indent:2,useTab:!1,crlf:!1,exclude:null},postcss:{installed:!1,loaded:!1,file:!1,config:[]},sass:{installed:!1,loaded:!1,file:!1,config:{warnings:!0,style:"compressed",sourcemap:!0,include:["node_modules"]}},esbuild:{installed:!1,loaded:!1,file:!1,config:{bundle:!0,format:"esm",splitting:!1,sourcemap:!0,write:!1,logLevel:"silent",plugins:[]}},sharp:{installed:!1,required:!1,loaded:!1,file:!1,config:{}},sprite:{installed:!1,loaded:!1,file:!1,config:{mode:{inline:!0,symbol:{example:!1}},shape:{transform:["svgo"],id:{generator:"svg-%s"}},svg:{xmlDeclaration:!1,doctypeDeclaration:!1,dimensionAttributes:!1,namespaceClassnames:!1,namespaceIDs:!1}}},svgo:{installed:!1,loaded:!1,file:!1,config:{multipass:!0,datauri:"enc",js2svg:{indent:2,pretty:!0},plugins:["preset-default","prefixIds"]}}},te={input:"source",output:"theme",import:"import",export:"export",config:".",hot:!1,stores:null,spawn:{build:null,watch:null},logger:{clear:!0,silent:!1,stats:!0,warnings:!0},paths:{assets:"assets/*",config:"config/*.json",layout:"layout/*.liquid",locales:"locales/*.json",sections:"sections/**/*.liquid",snippets:"snippets/*.liquid",metafields:"metafields/**/*.json",redirects:"redirects.yaml",pages:["pages/*.html","pages/*.md"],templates:["templates/customers/*.liquid","templates/customers/*.json"],customers:["templates/customers/*.liquid","templates/customers/*.json"]},views:{sections:{prefixDir:!1,separator:"-",global:[]},snippets:{prefixDir:!1,separator:"-",global:[]},pages:{author:"",language:"html"}},transforms:{svg:null,style:null,script:null},minify:{json:!1,views:!1,script:!1}},Bt={onBuild:[],onChange:[],onReload:[],onTransform:[],onWatch:[]},l={version:null,cli:!1,cwd:null,silent:!1,prod:!1,dev:!0,hot:{inject:!0,server:3e3,socket:8089,method:"hot",scroll:"preserved",layouts:["theme.liquid"],label:"visible",renderer:"{% render 'hot.js', server: 3000, socket: 8089 %}",snippet:null,output:null,alive:{}},dirs:{},sync:{themes:[],stores:[]},mode:{build:!1,prompt:!1,watch:!1,clean:!1,upload:!1,download:!1,metafields:!1,minify:!1,hot:!1,pages:!1,pull:!1,push:!1,vsc:!1,script:!1,image:!1,style:!1,svg:!1,redirects:!1,export:!1},spawn:{paths:new Set,invoked:!1,commands:{}},watch:new Set,logger:{},paths:{transforms:new Map},section:{prefixDir:!1,separator:"-",global:[]},cmd:{},json:{},page:{export:{quotes:"\u201C\u201D\u2018\u2019",html:!0,linkify:!1,typographer:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-"},import:{codeBlockStyle:"fenced",emDelimiter:"_",fence:"```",headingStyle:"atx",hr:"***",linkReferenceStyle:"full",linkStyle:"inlined",strongDelimiter:"**",bulletListMarker:"-"}},image:[],style:[],script:[],svg:[],set config(e){v(te,e);},get config(){return te},get processor(){return L},minify:{json:!1,views:!1,script:!1,get options(){return V}}};var Ci=Et(pi(),1);var zt=class extends Error{constructor(t){super(t),this.name="TimeoutError";}},_s=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t;}},Di=e=>globalThis.DOMException===void 0?new _s(e):new DOMException(e),mi=e=>{let t=e.reason===void 0?Di("This operation was aborted."):e.reason;return t instanceof Error?t:Di(t)};function ks(e,t,s,r){let n,i=new Promise((o,a)=>{if(typeof t!="number"||Math.sign(t)!==1)throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${t}\``);if(t===Number.POSITIVE_INFINITY){o(e);return}if(r={customTimers:{setTimeout,clearTimeout},...r},r.signal){let{signal:u}=r;u.aborted&&a(mi(u)),u.addEventListener("abort",()=>{a(mi(u));});}n=r.customTimers.setTimeout.call(void 0,()=>{if(typeof s=="function"){try{o(s());}catch(f){a(f);}return}let u=typeof s=="string"?s:`Promise timed out after ${t} milliseconds`,c=s instanceof Error?s:new zt(u);typeof e.cancel=="function"&&e.cancel(),a(c);},t),(async()=>{try{o(await e);}catch(u){a(u);}finally{r.customTimers.clearTimeout.call(void 0,n);}})();});return i.clear=()=>{clearTimeout(n),n=void 0;},i}function Rs(e,t,s){let r=0,n=e.length;for(;n>0;){let i=Math.trunc(n/2),o=r+i;s(e[o],t)<=0?(r=++o,n-=i+1):n=i;}return r}var ut=function(e,t,s,r){if(s==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?r:s==="a"?r.call(e):r?r.value:t.get(e)},qe,Ht=class{constructor(){qe.set(this,[]);}enqueue(t,s){s={priority:0,...s};let r={priority:s.priority,run:t};if(this.size&&ut(this,qe,"f")[this.size-1].priority>=s.priority){ut(this,qe,"f").push(r);return}let n=Rs(ut(this,qe,"f"),r,(i,o)=>o.priority-i.priority);ut(this,qe,"f").splice(n,0,r);}dequeue(){let t=ut(this,qe,"f").shift();return t?.run}filter(t){return ut(this,qe,"f").filter(s=>s.priority===t.priority).map(s=>s.run)}get size(){return ut(this,qe,"f").length}};qe=new WeakMap;var J=function(e,t,s,r,n){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?n.call(e,s):n?n.value=s:t.set(e,s),s},F=function(e,t,s,r){if(s==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?r:s==="a"?r.call(e):r?r.value:t.get(e)},Z,Yt,Qt,Ke,Tr,Kt,Br,Se,Jt,ye,br,Fe,Xt,Qe,vr,di,hi,xi,gi,yi,Fi,Ar,Ps,Os,_r,$r,aa=new zt,Is=class extends Error{},Zt=class extends Ci.default{constructor(t){var s,r,n,i;if(super(),Z.add(this),Yt.set(this,void 0),Qt.set(this,void 0),Ke.set(this,0),Tr.set(this,void 0),Kt.set(this,void 0),Br.set(this,0),Se.set(this,void 0),Jt.set(this,void 0),ye.set(this,void 0),br.set(this,void 0),Fe.set(this,0),Xt.set(this,void 0),Qe.set(this,void 0),vr.set(this,void 0),Object.defineProperty(this,"timeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),t={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:Ht,...t},!(typeof t.intervalCap=="number"&&t.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(r=(s=t.intervalCap)===null||s===void 0?void 0:s.toString())!==null&&r!==void 0?r:""}\` (${typeof t.intervalCap})`);if(t.interval===void 0||!(Number.isFinite(t.interval)&&t.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(i=(n=t.interval)===null||n===void 0?void 0:n.toString())!==null&&i!==void 0?i:""}\` (${typeof t.interval})`);J(this,Yt,t.carryoverConcurrencyCount,"f"),J(this,Qt,t.intervalCap===Number.POSITIVE_INFINITY||t.interval===0,"f"),J(this,Tr,t.intervalCap,"f"),J(this,Kt,t.interval,"f"),J(this,ye,new t.queueClass,"f"),J(this,br,t.queueClass,"f"),this.concurrency=t.concurrency,this.timeout=t.timeout,J(this,vr,t.throwOnTimeout===!0,"f"),J(this,Qe,t.autoStart===!1,"f");}get concurrency(){return F(this,Xt,"f")}set concurrency(t){if(!(typeof t=="number"&&t>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${t}\` (${typeof t})`);J(this,Xt,t,"f"),F(this,Z,"m",_r).call(this);}async add(t,s={}){return new Promise((r,n)=>{let i=async()=>{var o,a,u;J(this,Fe,(a=F(this,Fe,"f"),a++,a),"f"),J(this,Ke,(u=F(this,Ke,"f"),u++,u),"f");try{if(!((o=s.signal)===null||o===void 0)&&o.aborted){n(new Is("The task was aborted."));return}let f=await(this.timeout===void 0&&s.timeout===void 0?t({signal:s.signal}):ks(Promise.resolve(t({signal:s.signal})),s.timeout===void 0?this.timeout:s.timeout,()=>{(s.throwOnTimeout===void 0?F(this,vr,"f"):s.throwOnTimeout)&&n(aa);}));r(f),this.emit("completed",f);}catch(c){n(c),this.emit("error",c);}F(this,Z,"m",xi).call(this);};F(this,ye,"f").enqueue(i,s),F(this,Z,"m",Ar).call(this),this.emit("add");})}async addAll(t,s){return Promise.all(t.map(async r=>this.add(r,s)))}start(){return F(this,Qe,"f")?(J(this,Qe,!1,"f"),F(this,Z,"m",_r).call(this),this):this}pause(){J(this,Qe,!0,"f");}clear(){J(this,ye,new(F(this,br,"f")),"f");}async onEmpty(){F(this,ye,"f").size!==0&&await F(this,Z,"m",$r).call(this,"empty");}async onSizeLessThan(t){F(this,ye,"f").size<t||await F(this,Z,"m",$r).call(this,"next",()=>F(this,ye,"f").size<t);}async onIdle(){F(this,Fe,"f")===0&&F(this,ye,"f").size===0||await F(this,Z,"m",$r).call(this,"idle");}get size(){return F(this,ye,"f").size}sizeBy(t){return F(this,ye,"f").filter(t).length}get pending(){return F(this,Fe,"f")}get isPaused(){return F(this,Qe,"f")}};Yt=new WeakMap,Qt=new WeakMap,Ke=new WeakMap,Tr=new WeakMap,Kt=new WeakMap,Br=new WeakMap,Se=new WeakMap,Jt=new WeakMap,ye=new WeakMap,br=new WeakMap,Fe=new WeakMap,Xt=new WeakMap,Qe=new WeakMap,vr=new WeakMap,Z=new WeakSet,di=function(){return F(this,Qt,"f")||F(this,Ke,"f")<F(this,Tr,"f")},hi=function(){return F(this,Fe,"f")<F(this,Xt,"f")},xi=function(){var t;J(this,Fe,(t=F(this,Fe,"f"),t--,t),"f"),F(this,Z,"m",Ar).call(this),this.emit("next");},gi=function(){this.emit("empty"),F(this,Fe,"f")===0&&this.emit("idle");},yi=function(){F(this,Z,"m",Os).call(this),F(this,Z,"m",Ps).call(this),J(this,Jt,void 0,"f");},Fi=function(){let t=Date.now();if(F(this,Se,"f")===void 0){let s=F(this,Br,"f")-t;if(s<0)J(this,Ke,F(this,Yt,"f")?F(this,Fe,"f"):0,"f");else return F(this,Jt,"f")===void 0&&J(this,Jt,setTimeout(()=>{F(this,Z,"m",yi).call(this);},s),"f"),!0}return !1},Ar=function(){if(F(this,ye,"f").size===0)return F(this,Se,"f")&&clearInterval(F(this,Se,"f")),J(this,Se,void 0,"f"),F(this,Z,"m",gi).call(this),!1;if(!F(this,Qe,"f")){let t=!F(this,Z,"a",Fi);if(F(this,Z,"a",di)&&F(this,Z,"a",hi)){let s=F(this,ye,"f").dequeue();return s?(this.emit("active"),s(),t&&F(this,Z,"m",Ps).call(this),!0):!1}}return !1},Ps=function(){F(this,Qt,"f")||F(this,Se,"f")!==void 0||(J(this,Se,setInterval(()=>{F(this,Z,"m",Os).call(this);},F(this,Kt,"f")),"f"),J(this,Br,Date.now()+F(this,Kt,"f"),"f"));},Os=function(){F(this,Ke,"f")===0&&F(this,Fe,"f")===0&&F(this,Se,"f")&&(clearInterval(F(this,Se,"f")),J(this,Se,void 0,"f")),J(this,Ke,F(this,Yt,"f")?F(this,Fe,"f"):0,"f"),F(this,Z,"m",_r).call(this);},_r=function(){for(;F(this,Z,"m",Ar).call(this););},$r=async function(t,s){return new Promise(r=>{let n=()=>{s&&!s()||(this.off(t,n),r());};this.on(t,n);})};var Le=la.create({responseType:"json",headers:{}}),O=new Zt({concurrency:5,interval:250,intervalCap:5});function kr(e){return e===429||e===500?!0:(O.isPaused||O.pause(),!1)}var js=Symbol("singleComment"),Ei=Symbol("multiComment"),ca=()=>"",fa=(e,t,s)=>e.slice(t,s).replace(/\S/g," "),pa=(e,t)=>{let s=t-1,r=0;for(;e[s]==="\\";)s-=1,r+=1;return Boolean(r%2)};function er(e,{whitespace:t=!0,trailingCommas:s=!1}={}){if(typeof e!="string")throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof e}\``);let r=t?fa:ca,n=!1,i=!1,o=0,a="",u="",c=-1;for(let f=0;f<e.length;f++){let d=e[f],h=e[f+1];if(!i&&d==='"'&&(pa(e,f)||(n=!n)),!n)if(!i&&d+h==="//")a+=e.slice(o,f),o=f,i=js,f++;else if(i===js&&d+h===`\r
38
- `){f++,i=!1,a+=r(e,o,f),o=f;continue}else if(i===js&&d===`
39
- `)i=!1,a+=r(e,o,f),o=f;else if(!i&&d+h==="/*"){a+=e.slice(o,f),o=f,i=Ei,f++;continue}else if(i===Ei&&d+h==="*/"){f++,i=!1,a+=r(e,o,f+1),o=f+1;continue}else s&&!i&&(c!==-1?d==="}"||d==="]"?(a+=e.slice(o,f),u+=r(a,0,1)+a.slice(1),a="",o=f,c=-1):d!==" "&&d!==" "&&d!=="\r"&&d!==`
40
- `&&(a+=e.slice(o,f),o=f,c=-1):d===","&&(u+=a+e.slice(o,f),a="",o=f,c=f));}return u+a+(i?r(e.slice(o)):e.slice(o))}var tr="hot.js.liquid",wi="hot.js";var Si=["style","script","svg","metafields","pages","sections","redirects","vscode"],Bi=[["input","source"],["output","theme"],["export","export"],["import","import"],["config","."]],bi=["assets","config","layout","customers","locales","sections","snippets","templates","metafields","pages","redirects"],vi=["templates","templates/customers","assets","config","layout","locales","sections","snippets"];var Ns=["b","kb","mb","gb","tb"],Ms=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],qs=["You cannot use script minification without esbuild installed","and configured as a processor. Install esbuild and configure Syncify","to apply transforms to leverage script minification."],Ls="__injected_dirname__",Gs="__injected_filename__",Ws="__injected_import_meta_url__",Rr=/\.(mjs|cjs|ts|js|tsx|jsx)$/,Ai=/(\()(line\s[0-9]+)(\))(:)/g,$i=/(['"][\w\s]+['"])/g,Ti=/({{2}-?)([a-zA-Z0-9_\-.'"[\]]+)(-?}{2})/g,_i=/((?:www|http:|https:)+[^\s]+[\w])/g,ki=/(\/)(.*?)(\/)/g,Us={404:"The requested resource was not found.",400:"The request was not understood by the server, generally due to bad syntax or because the Content-Type header was not correctly set to application / json. This status is also returned when the request provides an invalid code parameter during the OAuth token exchange process.",303:"The response to the request can be found under a different URL in the Location header and can be retrieved using a GET method on that resource.",401:"The necessary authentication credentials are not present in the request or are incorrect",402:"The requested shop is currently frozen. The shop owner needs to log in to the shop's admin, and pay the outstanding balance to unfreeze the shop.",406:"The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request.",423:"The requested shop is currently locked. Shops are locked if they repeatedly exceed their API request limit. or if there is an issue with the account, such as a detected compromise or fraud risk.",403:"The server is refusing to respond to the request. This is generally because you have not requested the appropriate scope for this action.",501:"The requested endpoint is not available on that particular shop, e.g. requesting access to a Shopify Plus\u2013only API on a non-Plus shop. This response may also indicate that this endpoint is reserved for future use.",503:"The server is currently unavailable. Check the Shopify status page for reported service outages. See https://www.shopifystatus.com"};var Pr=new events.EventEmitter;function Ri(e){try{return JSON.parse(er(e).trim())}catch(t){throw new Error(t)}}function Ge(e,t){return t>1?`${e}s`:e}function bt(e){return he(e)?e.toString():j(e)||b(e)?JSON.stringify(e):String(e)}async function Pi(e,{format:t}){return t==="esm"?s=>import(s):zs(e)}function Oi(e){return e===".mjs"||e===".cjs"?"js":e.slice(1)}function Or(e){return e.charAt(0).toUpperCase()+e.slice(1)}function xe(e){return P(e)?Buffer.from(e).toString().length:e.toString().length}function Pe(e){if(e===0)return "0b";let t=parseInt(`${Math.floor(Math.log(e)/Math.log(1024))}`,10);return t===0?`${x(String(e))}${Ns[t]}`:`${x((e/1024**t).toFixed(1))}${Ns[t]}`}function Be(e,t){let s=xe(e),r=Pe(da.gzipSync(e).length),n=Pe(t),i=Pe(s),o=Pe(t-s);return {isSmaller:s>t||s===t,gzip:r,before:n,after:i,saved:o}}function rr(){let e=new Date,t=e.getHours(),s=e.getMinutes(),r=e.getSeconds(),n=p(":");return (t<10?`0${t}`:t)+n+(s<10?`0${s}`:s)+n+(r<10?`0${r}`:r)}function Vs(e){let t=e%10,s=e%100;return e+(t===1&&s!==11?"st":t===2&&s!==12?"nd":t===3&&s!==13?"rd":"th")}function zs(e){return fe(globalThis.require)?globalThis.require(e):module$1.createRequire((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('out.js', document.baseURI).href)))(e)}function Xe(){return Math.random().toString(36).slice(2)}var Ir=[],jr=()=>U(!0),W=()=>{Ir.push(perf_hooks.performance.now());};function U(e=!1){let t=e?Ir[Ir.length-2]:Ir.pop(),s=perf_hooks.performance.now()-t;if(s<1e3)return `${s.toFixed(0)}ms`;let r=s/1e3;if(r<60)return `${r.toFixed(0)}s ${+s.toFixed(0).slice(1)}ms`;let n=(r/60).toFixed(0);return `${n}m ${r-60*Number(n)}s ${+s.toFixed(0).slice(1)}ms`}var R={};Wt(R,{esbuild:()=>Za,postcss:()=>el,request:()=>Qa,sass:()=>Xa,spawn:()=>fn,write:()=>Ka});function Hs(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var ga=()=>ha.homedir().replace(/\\/g,"/"),ji=ga;var Ni=/\s+at.*[(\s](.*)\)?/,ya=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/;function Js(e,{pretty:t=!1,basePath:s}={}){let r=s&&new RegExp(`(file://)?${Hs(s.replace(/\\/g,"/"))}/?`,"g"),n=t?ji():"";if(typeof e=="string")return e.replace(/\\/g,"/").split(`
41
- `).filter(i=>{let o=i.match(Ni);if(o===null||!o[1])return !0;let a=o[1];return a.includes(".app/Contents/Resources/electron.asar")||a.includes(".app/Contents/Resources/default_app.asar")||a.includes("node_modules/electron/dist/resources/electron.asar")||a.includes("node_modules/electron/dist/resources/default_app.asar")?!1:!ya.test(a)}).filter(i=>i.trim()!=="").map(i=>(r&&(i=i.replace(r,"")),t&&(i=i.replace(Ni,(o,a)=>o.replace(a,a.replace(n,"~")))),i)).join(`
42
- `)}function Ys({onlyFirst:e=!1}={}){let 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 at(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Ys(),"")}var Wi=Et(qi(),1),Ui=Et(Gi(),1);function lt(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=at(e),e.length===0))return 0;e=e.replace((0, Ui.default)()," ");let s=t.ambiguousIsNarrow?1:2,r=0;for(let n of e){let i=n.codePointAt(0);if(i<=31||i>=127&&i<=159||i>=768&&i<=879)continue;switch(Wi.default.eastAsianWidth(n)){case"F":case"W":r+=2;break;case"A":r+=s;break;default:r+=1;}}return r}var Vi=(e=0)=>t=>`\x1B[${t+e}m`,zi=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Hi=(e=0)=>(t,s,r)=>`\x1B[${38+e};2;${t};${s};${r}m`,z={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],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],gray:[90,39],grey:[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],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(z.modifier);var Fa=Object.keys(z.color),xa=Object.keys(z.bgColor);[...Fa,...xa];function Ca(){let e=new Map;for(let[t,s]of Object.entries(z)){for(let[r,n]of Object.entries(s))z[r]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},s[r]=z[r],e.set(n[0],n[1]);Object.defineProperty(z,t,{value:s,enumerable:!1});}return Object.defineProperty(z,"codes",{value:e,enumerable:!1}),z.color.close="\x1B[39m",z.bgColor.close="\x1B[49m",z.color.ansi=Vi(),z.color.ansi256=zi(),z.color.ansi16m=Hi(),z.bgColor.ansi=Vi(10),z.bgColor.ansi256=zi(10),z.bgColor.ansi16m=Hi(10),Object.defineProperties(z,{rgbToAnsi256:{value:(t,s,r)=>t===s&&s===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(s/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:t=>{let s=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!s)return [0,0,0];let[r]=s;r.length===3&&(r=[...r].map(i=>i+i).join(""));let n=Number.parseInt(r,16);return [n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>z.rgbToAnsi256(...z.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let s,r,n;if(t>=232)s=((t-232)*10+8)/255,r=s,n=s;else {t-=16;let a=t%36;s=Math.floor(t/36)/5,r=Math.floor(a/6)/5,n=a%6/5;}let i=Math.max(s,r,n)*2;if(i===0)return 30;let o=30+(Math.round(n)<<2|Math.round(r)<<1|Math.round(s));return i===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,s,r)=>z.ansi256ToAnsi(z.rgbToAnsi256(t,s,r)),enumerable:!1},hexToAnsi:{value:t=>z.ansi256ToAnsi(z.hexToAnsi256(t)),enumerable:!1}}),z}var Ea=Ca(),sr=Ea;var Nr=new Set(["\x1B","\x9B"]),wa=39,Xs="\x07",Qi="[",Sa="]",Ki="m",Zs=`${Sa}8;;`,Ji=e=>`${Nr.values().next().value}${Qi}${e}${Ki}`,Yi=e=>`${Nr.values().next().value}${Zs}${e}${Xs}`,Ba=e=>e.split(" ").map(t=>lt(t)),Ks=(e,t,s)=>{let r=[...t],n=!1,i=!1,o=lt(at(e[e.length-1]));for(let[a,u]of r.entries()){let c=lt(u);if(o+c<=s?e[e.length-1]+=u:(e.push(u),o=0),Nr.has(u)&&(n=!0,i=r.slice(a+1).join("").startsWith(Zs)),n){i?u===Xs&&(n=!1,i=!1):u===Ki&&(n=!1);continue}o+=c,o===s&&a<r.length-1&&(e.push(""),o=0);}!o&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop());},ba=e=>{let t=e.split(" "),s=t.length;for(;s>0&&!(lt(t[s-1])>0);)s--;return s===t.length?e:t.slice(0,s).join(" ")+t.slice(s).join("")},va=(e,t,s={})=>{if(s.trim!==!1&&e.trim()==="")return "";let r="",n,i,o=Ba(e),a=[""];for(let[c,f]of e.split(" ").entries()){s.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let d=lt(a[a.length-1]);if(c!==0&&(d>=t&&(s.wordWrap===!1||s.trim===!1)&&(a.push(""),d=0),(d>0||s.trim===!1)&&(a[a.length-1]+=" ",d++)),s.hard&&o[c]>t){let h=t-d,w=1+Math.floor((o[c]-h-1)/t);Math.floor((o[c]-1)/t)<w&&a.push(""),Ks(a,f,t);continue}if(d+o[c]>t&&d>0&&o[c]>0){if(s.wordWrap===!1&&d<t){Ks(a,f,t);continue}a.push("");}if(d+o[c]>t&&s.wordWrap===!1){Ks(a,f,t);continue}a[a.length-1]+=f;}s.trim!==!1&&(a=a.map(c=>ba(c)));let u=[...a.join(`
43
- `)];for(let[c,f]of u.entries()){if(r+=f,Nr.has(f)){let{groups:h}=new RegExp(`(?:\\${Qi}(?<code>\\d+)m|\\${Zs}(?<uri>.*)${Xs})`).exec(u.slice(c).join(""))||{groups:{}};if(h.code!==void 0){let w=Number.parseFloat(h.code);n=w===wa?void 0:w;}else h.uri!==void 0&&(i=h.uri.length===0?void 0:h.uri);}let d=sr.codes.get(Number(n));u[c+1]===`
44
- `?(i&&(r+=Yi("")),n&&d&&(r+=Ji(d))):f===`
45
- `&&(n&&d&&(r+=Ji(n)),i&&(r+=Yi(i)));}return r};function ct(e,t,s){return String(e).normalize().replace(/\r\n/g,`
36
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
37
+
38
+ var Ds__default = /*#__PURE__*/_interopDefault(Ds);
39
+ var fl__default = /*#__PURE__*/_interopDefault(fl);
40
+ var yl__default = /*#__PURE__*/_interopDefault(yl);
41
+ var Fl__default = /*#__PURE__*/_interopDefault(Fl);
42
+ var Xo__default = /*#__PURE__*/_interopDefault(Xo);
43
+ var vu__default = /*#__PURE__*/_interopDefault(vu);
44
+ var Wa__default = /*#__PURE__*/_interopDefault(Wa);
45
+ var za__default = /*#__PURE__*/_interopDefault(za);
46
+ var kp__default = /*#__PURE__*/_interopDefault(kp);
47
+ var Op__default = /*#__PURE__*/_interopDefault(Op);
48
+ var Xp__default = /*#__PURE__*/_interopDefault(Xp);
49
+ var Zp__default = /*#__PURE__*/_interopDefault(Zp);
50
+ var ef__default = /*#__PURE__*/_interopDefault(ef);
51
+ var If__default = /*#__PURE__*/_interopDefault(If);
52
+ var of__default = /*#__PURE__*/_interopDefault(of);
53
+
54
+ var tl=Object.create;var Xs=Object.defineProperty;var rl=Object.getOwnPropertyDescriptor;var sl=Object.getOwnPropertyNames;var nl=Object.getPrototypeOf,il=Object.prototype.hasOwnProperty;var Zs=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,s)=>(typeof require<"u"?require:t)[s]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Je=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ar=(e,t)=>{for(var s in t)Xs(e,s,{get:t[s],enumerable:!0});},ol=(e,t,s,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of sl(t))!il.call(e,n)&&n!==s&&Xs(e,n,{get:()=>t[n],enumerable:!(r=rl(t,n))||r.enumerable});return e};var Ot=(e,t,s)=>(s=e!=null?tl(nl(e)):{},ol(t||!e||!e.__esModule?Xs(s,"default",{value:e,enumerable:!0}):s,e));var Qi=Je((YD,nn)=>{var cl=Object.prototype.hasOwnProperty,Ce="~";function pr(){}Object.create&&(pr.prototype=Object.create(null),new pr().__proto__||(Ce=!1));function pl(e,t,s){this.fn=e,this.context=t,this.once=s||!1;}function Yi(e,t,s,r,n){if(typeof s!="function")throw new TypeError("The listener must be a function");var i=new pl(s,r||e,n),o=Ce?Ce+t:t;return e._events[o]?e._events[o].fn?e._events[o]=[e._events[o],i]:e._events[o].push(i):(e._events[o]=i,e._eventsCount++),e}function Yr(e,t){--e._eventsCount===0?e._events=new pr:delete e._events[t];}function xe(){this._events=new pr,this._eventsCount=0;}xe.prototype.eventNames=function(){var t=[],s,r;if(this._eventsCount===0)return t;for(r in s=this._events)cl.call(s,r)&&t.push(Ce?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(s)):t};xe.prototype.listeners=function(t){var s=Ce?Ce+t:t,r=this._events[s];if(!r)return [];if(r.fn)return [r.fn];for(var n=0,i=r.length,o=new Array(i);n<i;n++)o[n]=r[n].fn;return o};xe.prototype.listenerCount=function(t){var s=Ce?Ce+t:t,r=this._events[s];return r?r.fn?1:r.length:0};xe.prototype.emit=function(t,s,r,n,i,o){var a=Ce?Ce+t:t;if(!this._events[a])return !1;var l=this._events[a],d=arguments.length,p,c;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),d){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,s),!0;case 3:return l.fn.call(l.context,s,r),!0;case 4:return l.fn.call(l.context,s,r,n),!0;case 5:return l.fn.call(l.context,s,r,n,i),!0;case 6:return l.fn.call(l.context,s,r,n,i,o),!0}for(c=1,p=new Array(d-1);c<d;c++)p[c-1]=arguments[c];l.fn.apply(l.context,p);}else {var h=l.length,g;for(c=0;c<h;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),d){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,s);break;case 3:l[c].fn.call(l[c].context,s,r);break;case 4:l[c].fn.call(l[c].context,s,r,n);break;default:if(!p)for(g=1,p=new Array(d-1);g<d;g++)p[g-1]=arguments[g];l[c].fn.apply(l[c].context,p);}}return !0};xe.prototype.on=function(t,s,r){return Yi(this,t,s,r,!1)};xe.prototype.once=function(t,s,r){return Yi(this,t,s,r,!0)};xe.prototype.removeListener=function(t,s,r,n){var i=Ce?Ce+t:t;if(!this._events[i])return this;if(!s)return Yr(this,i),this;var o=this._events[i];if(o.fn)o.fn===s&&(!n||o.once)&&(!r||o.context===r)&&Yr(this,i);else {for(var a=0,l=[],d=o.length;a<d;a++)(o[a].fn!==s||n&&!o[a].once||r&&o[a].context!==r)&&l.push(o[a]);l.length?this._events[i]=l.length===1?l[0]:l:Yr(this,i);}return this};xe.prototype.removeAllListeners=function(t){var s;return t?(s=Ce?Ce+t:t,this._events[s]&&Yr(this,s)):(this._events=new pr,this._eventsCount=0),this};xe.prototype.off=xe.prototype.removeListener;xe.prototype.addListener=xe.prototype.on;xe.prefixed=Ce;xe.EventEmitter=xe;typeof nn<"u"&&(nn.exports=xe);});var Ao=Je((Tm,Bn)=>{var ct={};typeof Bn>"u"?window.eastasianwidth=ct:Bn.exports=ct;ct.eastAsianWidth=function(e){var t=e.charCodeAt(0),s=e.length==2?e.charCodeAt(1):0,r=t;return 55296<=t&&t<=56319&&56320<=s&&s<=57343&&(t&=1023,s&=1023,r=t<<10|s,r+=65536),r==12288||65281<=r&&r<=65376||65504<=r&&r<=65510?"F":r==8361||65377<=r&&r<=65470||65474<=r&&r<=65479||65482<=r&&r<=65487||65490<=r&&r<=65495||65498<=r&&r<=65500||65512<=r&&r<=65518?"H":4352<=r&&r<=4447||4515<=r&&r<=4519||4602<=r&&r<=4607||9001<=r&&r<=9002||11904<=r&&r<=11929||11931<=r&&r<=12019||12032<=r&&r<=12245||12272<=r&&r<=12283||12289<=r&&r<=12350||12353<=r&&r<=12438||12441<=r&&r<=12543||12549<=r&&r<=12589||12593<=r&&r<=12686||12688<=r&&r<=12730||12736<=r&&r<=12771||12784<=r&&r<=12830||12832<=r&&r<=12871||12880<=r&&r<=13054||13056<=r&&r<=19903||19968<=r&&r<=42124||42128<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||55216<=r&&r<=55238||55243<=r&&r<=55291||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65106||65108<=r&&r<=65126||65128<=r&&r<=65131||110592<=r&&r<=110593||127488<=r&&r<=127490||127504<=r&&r<=127546||127552<=r&&r<=127560||127568<=r&&r<=127569||131072<=r&&r<=194367||177984<=r&&r<=196605||196608<=r&&r<=262141?"W":32<=r&&r<=126||162<=r&&r<=163||165<=r&&r<=166||r==172||r==175||10214<=r&&r<=10221||10629<=r&&r<=10630?"Na":r==161||r==164||167<=r&&r<=168||r==170||173<=r&&r<=174||176<=r&&r<=180||182<=r&&r<=186||188<=r&&r<=191||r==198||r==208||215<=r&&r<=216||222<=r&&r<=225||r==230||232<=r&&r<=234||236<=r&&r<=237||r==240||242<=r&&r<=243||247<=r&&r<=250||r==252||r==254||r==257||r==273||r==275||r==283||294<=r&&r<=295||r==299||305<=r&&r<=307||r==312||319<=r&&r<=322||r==324||328<=r&&r<=331||r==333||338<=r&&r<=339||358<=r&&r<=359||r==363||r==462||r==464||r==466||r==468||r==470||r==472||r==474||r==476||r==593||r==609||r==708||r==711||713<=r&&r<=715||r==717||r==720||728<=r&&r<=731||r==733||r==735||768<=r&&r<=879||913<=r&&r<=929||931<=r&&r<=937||945<=r&&r<=961||963<=r&&r<=969||r==1025||1040<=r&&r<=1103||r==1105||r==8208||8211<=r&&r<=8214||8216<=r&&r<=8217||8220<=r&&r<=8221||8224<=r&&r<=8226||8228<=r&&r<=8231||r==8240||8242<=r&&r<=8243||r==8245||r==8251||r==8254||r==8308||r==8319||8321<=r&&r<=8324||r==8364||r==8451||r==8453||r==8457||r==8467||r==8470||8481<=r&&r<=8482||r==8486||r==8491||8531<=r&&r<=8532||8539<=r&&r<=8542||8544<=r&&r<=8555||8560<=r&&r<=8569||r==8585||8592<=r&&r<=8601||8632<=r&&r<=8633||r==8658||r==8660||r==8679||r==8704||8706<=r&&r<=8707||8711<=r&&r<=8712||r==8715||r==8719||r==8721||r==8725||r==8730||8733<=r&&r<=8736||r==8739||r==8741||8743<=r&&r<=8748||r==8750||8756<=r&&r<=8759||8764<=r&&r<=8765||r==8776||r==8780||r==8786||8800<=r&&r<=8801||8804<=r&&r<=8807||8810<=r&&r<=8811||8814<=r&&r<=8815||8834<=r&&r<=8835||8838<=r&&r<=8839||r==8853||r==8857||r==8869||r==8895||r==8978||9312<=r&&r<=9449||9451<=r&&r<=9547||9552<=r&&r<=9587||9600<=r&&r<=9615||9618<=r&&r<=9621||9632<=r&&r<=9633||9635<=r&&r<=9641||9650<=r&&r<=9651||9654<=r&&r<=9655||9660<=r&&r<=9661||9664<=r&&r<=9665||9670<=r&&r<=9672||r==9675||9678<=r&&r<=9681||9698<=r&&r<=9701||r==9711||9733<=r&&r<=9734||r==9737||9742<=r&&r<=9743||9748<=r&&r<=9749||r==9756||r==9758||r==9792||r==9794||9824<=r&&r<=9825||9827<=r&&r<=9829||9831<=r&&r<=9834||9836<=r&&r<=9837||r==9839||9886<=r&&r<=9887||9918<=r&&r<=9919||9924<=r&&r<=9933||9935<=r&&r<=9953||r==9955||9960<=r&&r<=9983||r==10045||r==10071||10102<=r&&r<=10111||11093<=r&&r<=11097||12872<=r&&r<=12879||57344<=r&&r<=63743||65024<=r&&r<=65039||r==65533||127232<=r&&r<=127242||127248<=r&&r<=127277||127280<=r&&r<=127337||127344<=r&&r<=127386||917760<=r&&r<=917999||983040<=r&&r<=1048573||1048576<=r&&r<=1114109?"A":"N"};ct.characterLength=function(e){var t=this.eastAsianWidth(e);return t=="F"||t=="W"||t=="A"?2:1};function $o(e){return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}ct.length=function(e){for(var t=$o(e),s=0,r=0;r<t.length;r++)s=s+this.characterLength(t[r]);return s};ct.slice=function(e,t,s){textLen=ct.length(e),t=t||0,s=s||1,t<0&&(t=textLen+t),s<0&&(s=textLen+s);for(var r="",n=0,i=$o(e),o=0;o<i.length;o++){var a=i[o],l=ct.length(a);if(n>=t-(l==2?1:0))if(n+l<=s)r+=a;else break;n+=l;}return r};});var Ro=Je((Rm,To)=>{To.exports=function(){return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\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])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\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\uDF7C\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\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\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\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\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-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*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\u26A7\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-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\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[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g};});var Ho=Je(fs=>{Object.defineProperty(fs,"__esModule",{value:!0});var Rn=e=>{let[,t]=/([a-f\d]{3,6})/i.exec(e)||[],s=t?t.length:0;if(s===3)t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2];else if(s!==6)return [0,0,0];let r=parseInt(t,16);return [r>>16&255,r>>8&255,255&r]},ft=(e,t,s)=>t>e?t:e>s?s:e,_l=(e,t,s)=>{if(t==="")return e;let r=e.indexOf(t);if(r<0)return e;let n=t.length,i=0,o="";for(;~r;)o+=e.slice(i,r)+s,i=r+n,r=e.indexOf(t,i);return o+e.slice(i)},Wo={open:"",close:""},b=(e=>{let t=g=>!!o.find(T=>g.test(T)),s=e||(typeof process<"u"?process:{}),{stdout:r,platform:n}=s,i=s.env||{},o=s.argv||[],a="FORCE_COLOR"in i,l=i.FORCE_COLOR,d=l==="true"||parseInt(l)>0,p="NO_COLOR"in i||a&&!d||t(/^-{1,2}(no-color|color=false|color=never)$/),c=a&&d||t(/^-{1,2}(color|color=true|color=always)$/),h=r&&"isTTY"in r&&/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM);return !p&&(c||h||n==="win32"||"CI"in i)})()?(e,t)=>({open:`\x1B[${e}m`,close:`\x1B[${t}m`}):()=>Wo,_n=(e,t,s)=>b(`38;2;${e};${t};${s}`,39),qo=(e,t,s)=>b(`48;2;${e};${t};${s}`,49),kl={visible:Wo,reset:b(0,0),inverse:b(7,27),hidden:b(8,28),bold:b(1,22),dim:b(2,22),faint:b(2,22),italic:b(3,23),underline:b(4,24),doubleUnderline:b(21,24),strikethrough:b(9,29),strike:b(9,29),frame:b(51,54),encircle:b(52,54),overline:b(53,55),black:b(30,39),red:b(31,39),green:b(32,39),yellow:b(33,39),blue:b(34,39),magenta:b(35,39),cyan:b(36,39),white:b(37,39),grey:b(90,39),gray:b(90,39),blackBright:b(90,39),redBright:b(91,39),greenBright:b(92,39),yellowBright:b(93,39),blueBright:b(94,39),magentaBright:b(95,39),cyanBright:b(96,39),whiteBright:b(97,39),bgBlack:b(40,49),bgRed:b(41,49),bgGreen:b(42,49),bgYellow:b(43,49),bgBlue:b(44,49),bgMagenta:b(45,49),bgCyan:b(46,49),bgWhite:b(47,49),bgBlackBright:b(100,49),bgRedBright:b(101,49),bgGreenBright:b(102,49),bgYellowBright:b(103,49),bgBlueBright:b(104,49),bgMagentaBright:b(105,49),bgCyanBright:b(106,49),bgWhiteBright:b(107,49)},{defineProperty:Ol,defineProperties:Pl,setPrototypeOf:zo}=Object,Il=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,jl=/(\r*\n)/g,Uo=function(){let e=t=>t;return e.strip=t=>t.replace(Il,""),e.extend=t=>{for(let s in t){let r=t[s],n=r.open!=null?r:_n(...Rn(r));Ze[s]={get(){let i=Vo(this,n);return Ol(this,s,{value:i}),i}};}kn=Pl(()=>{},Ze),zo(e,kn);},e.extend(kl),e},Vo=({props:e},{open:t,close:s})=>{let r=(o,...a)=>Nl(o,a,r.props),n=t,i=s;return e!==void 0&&(n=e.openStack+t,i=s+e.closeStack),zo(r,kn),r.props={open:t,close:s,openStack:n,closeStack:i,parent:e},r.open=n,r.close=i,r},Nl=(e,t,s)=>{if(!e)return "";let{openStack:r,closeStack:n}=s,i=e.raw!=null?String.raw(e,...t):e;if(~i.indexOf("\x1B"))for(;s!==void 0;)i=_l(i,s.close,s.open),s=s.parent;return ~i.indexOf(`
55
+ `)&&(i=i.replace(jl,n+"$1"+r)),r+i+n},Go={ansi:e=>(t=>b(`38;5;${t}`,39))(ft(e,0,255)),bgAnsi:e=>(t=>b(`48;5;${t}`,49))(ft(e,0,255)),hex:e=>_n(...Rn(e)),bgHex:e=>qo(...Rn(e)),rgb:(e,t,s)=>_n(ft(e,0,255),ft(t,0,255),ft(s,0,255)),bgRgb:(e,t,s)=>qo(ft(e,0,255),ft(t,0,255),ft(s,0,255))},Ze={},kn;for(let e in Go)Ze[e]={get(){return (...t)=>Vo(this,Go[e](...t))}};Ze.ansi256=Ze.fg=Ze.ansi,Ze.bgAnsi256=Ze.bg=Ze.bgAnsi;var Ll=new Uo;fs.Ansis=Uo,fs.default=Ll;});var Yo=Je((Gm,On)=>{var Jo=Ho();On.exports=Jo.default;On.exports.Ansis=Jo.Ansis;});var ru=Je((pd,Kn)=>{var tu=(e,t)=>{for(let s of Reflect.ownKeys(t))Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(t,s));return e};Kn.exports=tu;Kn.exports.default=tu;});var nu=Je((fd,Cs)=>{var mc=ru(),ws=new WeakMap,su=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let s,r=0,n=e.displayName||e.name||"<anonymous>",i=function(...o){if(ws.set(i,++r),r===1)s=e.apply(this,o),e=null;else if(t.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return s};return mc(i,e),ws.set(i,r),i};Cs.exports=su;Cs.exports.default=su;Cs.exports.callCount=e=>{if(!ws.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return ws.get(e)};});var iu=Je((Dd,Es)=>{Es.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Es.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Es.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");});var cu=Je((md,Ht)=>{var te=global.process,Bt=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};Bt(te)?(ou=Zs("assert"),Ut=iu(),uu=/^win/i.test(te.platform),Rr=Zs("events"),typeof Rr!="function"&&(Rr=Rr.EventEmitter),te.__signal_exit_emitter__?me=te.__signal_exit_emitter__:(me=te.__signal_exit_emitter__=new Rr,me.count=0,me.emitted={}),me.infinite||(me.setMaxListeners(1/0),me.infinite=!0),Ht.exports=function(e,t){if(!Bt(global.process))return function(){};ou.equal(typeof e,"function","a callback must be provided for exit handler"),Vt===!1&&Xn();var s="exit";t&&t.alwaysLast&&(s="afterexit");var r=function(){me.removeListener(s,e),me.listeners("exit").length===0&&me.listeners("afterexit").length===0&&bs();};return me.on(s,e),r},bs=function(){!Vt||!Bt(global.process)||(Vt=!1,Ut.forEach(function(t){try{te.removeListener(t,Ss[t]);}catch{}}),te.emit=vs,te.reallyExit=Zn,me.count-=1);},Ht.exports.unload=bs,$t=function(t,s,r){me.emitted[t]||(me.emitted[t]=!0,me.emit(t,s,r));},Ss={},Ut.forEach(function(e){Ss[e]=function(){if(Bt(global.process)){var s=te.listeners(e);s.length===me.count&&(bs(),$t("exit",null,e),$t("afterexit",null,e),uu&&e==="SIGHUP"&&(e="SIGINT"),te.kill(te.pid,e));}};}),Ht.exports.signals=function(){return Ut},Vt=!1,Xn=function(){Vt||!Bt(global.process)||(Vt=!0,me.count+=1,Ut=Ut.filter(function(t){try{return te.on(t,Ss[t]),!0}catch{return !1}}),te.emit=lu,te.reallyExit=au);},Ht.exports.load=Xn,Zn=te.reallyExit,au=function(t){Bt(global.process)&&(te.exitCode=t||0,$t("exit",te.exitCode,null),$t("afterexit",te.exitCode,null),Zn.call(te,te.exitCode));},vs=te.emit,lu=function(t,s){if(t==="exit"&&Bt(global.process)){s!==void 0&&(te.exitCode=s);var r=vs.apply(this,arguments);return $t("exit",te.exitCode,null),$t("afterexit",te.exitCode,null),r}else return vs.apply(this,arguments)}):Ht.exports=function(){return function(){}};var ou,Ut,uu,Rr,me,bs,$t,Ss,Vt,Xn,Zn,au,vs,lu;});function De(e){if(e===null)return "Null";if(e===void 0)return "Undefined";if(Number.isNaN(e))return "NaN";let t=Object.prototype.toString.call(e).slice(8,-1);return t==="AsyncFunction"?"Promise":t}var{isArray:nt}=Array;function Pt(e){return nt(e)?e.length>0:De(e)==="Object"?Object.keys(e).length>0:!!e}function it(...e){let t=0;for(;t<e.length;){let s=e[t];if(De(s)==="Function"){if(Pt(s()))return !1}else if(Pt(s))return !1;t++;}return !0}function he(...e){let t=0;for(;t<e.length;){let s=e[t];if(De(s)==="Function"){if(Pt(s()))return !0}else if(Pt(s))return !0;t++;}return !1}function qr(e,t="."){return typeof e=="string"?e.split(t):e}function en(e,t){if(arguments.length===1)return i=>en(e,i);if(t==null)return;let s=t,r=0,n=qr(e);for(;r<n.length;){if(s==null||s[n[r]]===null)return;s=s[n[r]],r++;}return s}function lr(e,t){if(!nt(t))throw new Error(`Cannot read property 'indexOf' of ${t}`);let s=De(e);if(!["Object","Array","NaN","RegExp"].includes(s))return t.indexOf(e);let r=-1,n=-1,{length:i}=t;for(;++r<i&&n===-1;)Gr(t[r],e)&&(n=r);return n}function qi(e){let t=[],s;for(;!(s=e.next()).done;)t.push(s.value);return t}function ul(e,t){if(e.size!==t.size)return !1;let s=qi(e.values()),r=qi(t.values());return s.filter(i=>lr(i,r)===-1).length===0}function Gi(e){let t=e.__proto__.toString();return ["Error","TypeError"].includes(t)?[t,e.message]:[]}function Wi(e){return e.toDateString?[!0,e.getTime()]:[!1]}function zi(e){return e.constructor!==RegExp?[!1]:[!0,e.toString()]}function Gr(e,t){if(arguments.length===1)return d=>Gr(e,d);let s=De(e);if(s!==De(t))return !1;if(s==="Function")return e.name===void 0?!1:e.name===t.name;if(["NaN","Undefined","Null"].includes(s))return !0;if(s==="Number")return Object.is(-0,e)!==Object.is(-0,t)?!1:e.toString()===t.toString();if(["String","Boolean"].includes(s))return e.toString()===t.toString();if(s==="Array"){let d=Array.from(e),p=Array.from(t);if(d.toString()!==p.toString())return !1;let c=!0;return d.forEach((h,g)=>{c&&h!==p[g]&&!Gr(h,p[g])&&(c=!1);}),c}let r=zi(e),n=zi(t);if(r[0])return n[0]?r[1]===n[1]:!1;if(n[0])return !1;let i=Wi(e),o=Wi(t);if(i[0])return o[0]?i[1]===o[1]:!1;if(o[0])return !1;let a=Gi(e),l=Gi(t);if(a[0])return l[0]?a[0]===l[0]&&a[1]===l[1]:!1;if(s==="Set")return ul(e,t);if(s==="Object"){let d=Object.keys(e);if(d.length!==Object.keys(t).length)return !1;let p=!0;return d.forEach(c=>{if(p){let h=e[c],g=t[c];h!==g&&!Gr(h,g)&&(p=!1);}}),p}return !1}function tn(e,t){if(arguments.length===1)return s=>tn(e,s);if(typeof t=="string")return t.includes(e);if(!t)throw new TypeError(`Cannot read property 'indexOf' of ${t}`);return nt(t)?lr(e,t)>-1:!1}async function Ui(e,t){if(nt(t)){let r=[],n=0;for(let i of t)r.push(await e(i,n++));return r}let s={};for(let r in t)s[r]=await e(t[r],r);return s}function qe(e,t){return arguments.length===1?async s=>Ui(e,s):new Promise((s,r)=>{Ui(e,t).then(s).catch(r);})}function It(e,t){return arguments.length===1?s=>It(e,s):Object.assign({},e||{},t||{})}function ce(e,t){return arguments.length===1?s=>ce(e,s):De(t)===e}async function Vi(e,t){let s=t.map((r,n)=>e(r,n));return Promise.all(s)}function rn(e,t){return arguments.length===1?async s=>Vi(e,s):new Promise((s,r)=>{Vi(e,t).then(s).catch(r);})}function sn(e,t){if(arguments.length===1)return n=>sn(e,n);if(t==null)return;let s=qr(e,","),r={};for(let n in t)s.includes(n)||(r[n]=t[n]);return r}var Wr=class{constructor(){this.set=new Set,this.items={};}checkUniqueness(t){let s=De(t);if(["Null","Undefined","NaN"].includes(s))return s in this.items?!1:(this.items[s]=!0,!0);if(!["Object","Array"].includes(s)){let r=this.set.size;return this.set.add(t),this.set.size!==r}return s in this.items?lr(t,this.items[s])===-1?(this.items[s].push(t),!0):!1:(this.items[s]=[t],!0)}};function zr(e){let t=new Wr,s=[];return e.forEach(r=>{t.checkUniqueness(r)&&s.push(r);}),s}function f(e,t){return arguments.length===1?s=>f(e,s):t?t.hasOwnProperty(e):!1}function ot(e,t){return arguments.length===1?s=>ot(e,s):en(e,t)!==void 0}function Z(e){let t=De(e);return ["Undefined","NaN","Number","Null"].includes(t)?!1:e?t==="Object"?Object.keys(e).length===0:t==="Array"?e.length===0:!1:!0}function N(e){return e==null}function Ur(e,t){return arguments.length===1?s=>Ur(e,s):t.join(e)}function Hi(e){return typeof e=="string"?e[e.length-1]||"":e[e.length-1]}var {error:Q,log:B,warn:Ji}=console,S="",ye=" ",x=`
56
+ `,Re=e=>ye.repeat(e),A=e=>x.repeat(e);Ur(x);var ke=Ur(S);var z=Object.assign,jt=Object.defineProperty,_e=Object.keys,Vr=Object.values,ut=Array.from;Buffer.from;var v=Array.isArray,we=Buffer.isBuffer,H=ce("Undefined"),G=ce("Object"),de=ce("Boolean"),cr=ce("RegExp"),Hr=ce("Number"),P=ce("String"),Ee=ce("Function");ce("Async");var m={};ar(m,{build:()=>Bc,changed:()=>Oc,clear:()=>rt,deleted:()=>qc,err:()=>$c,exported:()=>jc,external:()=>Tc,failed:()=>Hc,hline:()=>Un,hook:()=>Rc,ignored:()=>Uc,importer:()=>Nc,invalid:()=>Vc,minified:()=>Gc,newGroup:()=>kc,nwl:()=>Qt,out:()=>B,process:()=>Bu,progress:()=>bu,reloaded:()=>Wc,retrying:()=>Mc,skipped:()=>zc,spawn:()=>Yc,spinner:()=>ni,start:()=>Eu,syncing:()=>Ic,throws:()=>Jc,transform:()=>Lc,unhook:()=>_c,update:()=>At,upload:()=>Pc,write:()=>Ac});var be={},pe={current:null,count:0,process:{}},Oe={json:{assets:!0,config:!0,locales:!0,metafields:!0,sectionGroups:!0,templates:!0,exclude:[]},script:{minifySyntax:!0,minifyIdentifiers:!0,minifyWhitespace:!0,mangleProps:void 0,legalComments:"none",mangleQuoted:!1,keepNames:!1,exclude:[]},liquid:{minifyScript:!0,minifyStyle:!0,minifySchema:!0,removeComments:!0,stripDashes:!0,exclude:[]},style:{exclude:[],format:!1,inline:!1},html:{caseSensitive:!1,collapseBooleanAttributes:!1,collapseInlineTagWhitespace:!1,conservativeCollapse:!1,keepClosingSlash:!1,noNewlinesBeforeTagClose:!1,preventAttributesEscaping:!1,removeEmptyAttributes:!1,removeEmptyElements:!1,removeOptionalTags:!1,removeRedundantAttributes:!0,removeScriptTypeAttributes:!0,removeStyleLinkTypeAttributes:!0,useShortDoctype:!0,collapseWhitespace:!0,continueOnParseError:!0,removeComments:!0,trimCustomFragments:!0,ignoreCustomFragments:[/(?<=\bstyle\b=["']\s?)[\s\S]*?(?="[\s\n>]?)/,/<style[\s\S]*?<\/style>/,/<script[\s\S]*?<\/script>/,/{%-?\s*liquid[\s\S]*?%}/,/{%[\s\S]*?%}/]}},K={json:{indent:2,useTab:!1,crlf:!1,exclude:null},postcss:{installed:!1,loaded:!1,file:!1,config:[]},sass:{installed:!1,loaded:!1,file:!1,config:{warnings:!0,style:"compressed",sourcemap:!0,include:["node_modules"]}},esbuild:{installed:!1,loaded:!1,file:!1,config:{bundle:!0,format:"esm",globalName:void 0,target:"es2016",metafile:!0,external:[],platform:"browser",splitting:!1,sourcemap:"linked",write:!1,logLevel:"silent",plugins:[]}},sharp:{installed:!1,required:!1,loaded:!1,file:!1,config:{}},sprite:{installed:!1,loaded:!1,file:!1,config:{mode:{inline:!0,symbol:{example:!1}},shape:{transform:["svgo"],id:{generator:"svg-%s"}},svg:{xmlDeclaration:!1,doctypeDeclaration:!1,dimensionAttributes:!1,namespaceClassnames:!1,namespaceIDs:!1}}},svgo:{installed:!1,loaded:!1,file:!1,config:{multipass:!0,datauri:"enc",js2svg:{indent:2,pretty:!0},plugins:["preset-default",{name:"pluginName",fn:()=>({root:{enter:e=>{},exit:e=>{}},element:{enter:e=>{},exit:e=>{}},doctype:{enter:e=>{},exit:e=>{}},instruction:{enter:e=>{},exit:e=>{}},comment:{enter:e=>{},exit:e=>{}},cdata:{enter:e=>{},exit:e=>{}},text:{enter:e=>{},exit:e=>{}}})}]}}},ll={input:"source",output:"theme",import:"import",export:"export",config:".",hot:!1,stores:null,spawn:{build:null,watch:null},logger:{clear:!0,silent:!1,stats:!0,warnings:!0},paths:{assets:"assets/*",config:"config/*.json",layout:"layout/*.liquid",locales:"locales/*.json",snippets:"snippets/*.liquid",metafields:"metafields/**/*.json",redirects:"redirects.yaml",sections:["sections/**/*.json","sections/**/*.liquid"],pages:["pages/*.html","pages/*.md"],templates:["templates/customers/*.liquid","templates/customers/*.json"],customers:["templates/customers/*.liquid","templates/customers/*.json"]},views:{sections:{prefixDir:!1,separator:"-",global:[]},snippets:{prefixDir:!1,separator:"-",global:[]},pages:{author:"",language:"html"}},transforms:{svg:null,style:null,script:null},terser:{json:!1,views:!1,script:!1}},wt={onBuild:[],onChange:[],onReload:[],onTransform:[],onWatch:[]},u=new class Ge{static defaults=ll;static package={};static terser=Oe;wss=null;filters={};commands=null;version=null;cwd=null;argv=Ds.argv.slice(2).join(" ");errors=new Set;env={cli:!1,dev:!0,prod:!1,sync:0};hot={inject:!0,server:3e3,socket:8089,history:!1,method:"hot",scroll:"preserved",layouts:["theme.liquid"],label:"visible",renderer:"{% render 'hot.js', server: 3000, socket: 8089 %}",snippet:null,output:null,alive:{}};logger={clear:!0,silent:!1,stats:!0,warnings:!0};mode={build:!1,interactive:!1,watch:!1,clean:!1,upload:!1,download:!1,metafields:!1,terse:!1,hot:!1,pages:!1,pull:!1,force:!1,vsc:!1,script:!1,image:!1,style:!1,svg:!1,redirects:!1,export:!1};file={base:null,path:null,relative:null};dirs={};cmd={config:null,delete:null,filter:null,input:null,output:null};sync={themes:[],stores:[]};spawn={paths:new Set,streams:new Map,invoked:!1,commands:{}};section={prefixDir:!1,separator:"-",global:null};snippet={prefixDir:!1,separator:"-",global:null};watch=new Set;paths={transforms:new Map};page={export:{quotes:"\u201C\u201D\u2018\u2019",html:!0,linkify:!1,typographer:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-"},import:{codeBlockStyle:"fenced",emDelimiter:"_",fence:"```",headingStyle:"atx",hr:"***",linkReferenceStyle:"full",linkStyle:"inlined",strongDelimiter:"**",bulletListMarker:"-"}};script=[];style=[];svg=[];image;terse={json:!1,views:!1,style:!1,script:!1};get terser(){return Ge.terser}set terser(t){Ge.terser=It(Ge.terser,t);}get processor(){return K}set config(t){Ge.defaults=It(Ge.defaults,t);}get config(){return Ge.defaults}set pkg(t){Ge.package=It(Ge.package,t);}get pkg(){return Ge.package}get plugins(){return wt}};var io=Ot(Qi(),1);var fr=class extends Error{constructor(t){super(t),this.name="TimeoutError";}},on=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t;}},Ki=e=>globalThis.DOMException===void 0?new on(e):new DOMException(e),Xi=e=>{let t=e.reason===void 0?Ki("This operation was aborted."):e.reason;return t instanceof Error?t:Ki(t)};function un(e,t,s,r){let n,i=new Promise((o,a)=>{if(typeof t!="number"||Math.sign(t)!==1)throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${t}\``);if(t===Number.POSITIVE_INFINITY){o(e);return}if(r={customTimers:{setTimeout,clearTimeout},...r},r.signal){let{signal:l}=r;l.aborted&&a(Xi(l)),l.addEventListener("abort",()=>{a(Xi(l));});}n=r.customTimers.setTimeout.call(void 0,()=>{if(typeof s=="function"){try{o(s());}catch(p){a(p);}return}let l=typeof s=="string"?s:`Promise timed out after ${t} milliseconds`,d=s instanceof Error?s:new fr(l);typeof e.cancel=="function"&&e.cancel(),a(d);},t),(async()=>{try{o(await e);}catch(l){a(l);}finally{r.customTimers.clearTimeout.call(void 0,n);}})();});return i.clear=()=>{clearTimeout(n),n=void 0;},i}function an(e,t,s){let r=0,n=e.length;for(;n>0;){let i=Math.trunc(n/2),o=r+i;s(e[o],t)<=0?(r=++o,n-=i+1):n=i;}return r}var Ct=function(e,t,s,r){if(s==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?r:s==="a"?r.call(e):r?r.value:t.get(e)},Ye,Dr=class{constructor(){Ye.set(this,[]);}enqueue(t,s){s={priority:0,...s};let r={priority:s.priority,run:t};if(this.size&&Ct(this,Ye,"f")[this.size-1].priority>=s.priority){Ct(this,Ye,"f").push(r);return}let n=an(Ct(this,Ye,"f"),r,(i,o)=>o.priority-i.priority);Ct(this,Ye,"f").splice(n,0,r);}dequeue(){let t=Ct(this,Ye,"f").shift();return t?.run}filter(t){return Ct(this,Ye,"f").filter(s=>s.priority===t.priority).map(s=>s.run)}get size(){return Ct(this,Ye,"f").length}};Ye=new WeakMap;var re=function(e,t,s,r,n){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?n.call(e,s):n?n.value=s:t.set(e,s),s},w=function(e,t,s,r){if(s==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?r:s==="a"?r.call(e):r?r.value:t.get(e)},oe,dr,gr,lt,ts,hr,Qr,Pe,mr,ve,Kr,Be,yr,at,Xr,Zi,eo,so,to,ro,Zr,ln,cn,rs,no,es,ss=class extends Error{},xr=class extends io.default{constructor(t){var s,r,n,i;if(super(),oe.add(this),dr.set(this,void 0),gr.set(this,void 0),lt.set(this,0),ts.set(this,void 0),hr.set(this,void 0),Qr.set(this,0),Pe.set(this,void 0),mr.set(this,void 0),ve.set(this,void 0),Kr.set(this,void 0),Be.set(this,0),yr.set(this,void 0),at.set(this,void 0),Xr.set(this,void 0),Object.defineProperty(this,"timeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),t={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:Dr,...t},!(typeof t.intervalCap=="number"&&t.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(r=(s=t.intervalCap)===null||s===void 0?void 0:s.toString())!==null&&r!==void 0?r:""}\` (${typeof t.intervalCap})`);if(t.interval===void 0||!(Number.isFinite(t.interval)&&t.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(i=(n=t.interval)===null||n===void 0?void 0:n.toString())!==null&&i!==void 0?i:""}\` (${typeof t.interval})`);re(this,dr,t.carryoverConcurrencyCount,"f"),re(this,gr,t.intervalCap===Number.POSITIVE_INFINITY||t.interval===0,"f"),re(this,ts,t.intervalCap,"f"),re(this,hr,t.interval,"f"),re(this,ve,new t.queueClass,"f"),re(this,Kr,t.queueClass,"f"),this.concurrency=t.concurrency,this.timeout=t.timeout,re(this,Xr,t.throwOnTimeout===!0,"f"),re(this,at,t.autoStart===!1,"f");}get concurrency(){return w(this,yr,"f")}set concurrency(t){if(!(typeof t=="number"&&t>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${t}\` (${typeof t})`);re(this,yr,t,"f"),w(this,oe,"m",rs).call(this);}async add(t,s={}){return s={timeout:this.timeout,throwOnTimeout:w(this,Xr,"f"),...s},new Promise((r,n)=>{w(this,ve,"f").enqueue(async()=>{var i,o,a;re(this,Be,(o=w(this,Be,"f"),o++,o),"f"),re(this,lt,(a=w(this,lt,"f"),a++,a),"f");try{if(!((i=s.signal)===null||i===void 0)&&i.aborted)throw new ss("The task was aborted.");let l=t({signal:s.signal});s.timeout&&(l=un(Promise.resolve(l),s.timeout)),s.signal&&(l=Promise.race([l,w(this,oe,"m",no).call(this,s.signal)]));let d=await l;r(d),this.emit("completed",d);}catch(l){if(l instanceof fr&&!s.throwOnTimeout){r();return}n(l),this.emit("error",l);}finally{w(this,oe,"m",so).call(this);}},s),this.emit("add"),w(this,oe,"m",Zr).call(this);})}async addAll(t,s){return Promise.all(t.map(async r=>this.add(r,s)))}start(){return w(this,at,"f")?(re(this,at,!1,"f"),w(this,oe,"m",rs).call(this),this):this}pause(){re(this,at,!0,"f");}clear(){re(this,ve,new(w(this,Kr,"f")),"f");}async onEmpty(){w(this,ve,"f").size!==0&&await w(this,oe,"m",es).call(this,"empty");}async onSizeLessThan(t){w(this,ve,"f").size<t||await w(this,oe,"m",es).call(this,"next",()=>w(this,ve,"f").size<t);}async onIdle(){w(this,Be,"f")===0&&w(this,ve,"f").size===0||await w(this,oe,"m",es).call(this,"idle");}get size(){return w(this,ve,"f").size}sizeBy(t){return w(this,ve,"f").filter(t).length}get pending(){return w(this,Be,"f")}get isPaused(){return w(this,at,"f")}};dr=new WeakMap,gr=new WeakMap,lt=new WeakMap,ts=new WeakMap,hr=new WeakMap,Qr=new WeakMap,Pe=new WeakMap,mr=new WeakMap,ve=new WeakMap,Kr=new WeakMap,Be=new WeakMap,yr=new WeakMap,at=new WeakMap,Xr=new WeakMap,oe=new WeakSet,Zi=function(){return w(this,gr,"f")||w(this,lt,"f")<w(this,ts,"f")},eo=function(){return w(this,Be,"f")<w(this,yr,"f")},so=function(){var t;re(this,Be,(t=w(this,Be,"f"),t--,t),"f"),w(this,oe,"m",Zr).call(this),this.emit("next");},to=function(){w(this,oe,"m",cn).call(this),w(this,oe,"m",ln).call(this),re(this,mr,void 0,"f");},ro=function(){let t=Date.now();if(w(this,Pe,"f")===void 0){let s=w(this,Qr,"f")-t;if(s<0)re(this,lt,w(this,dr,"f")?w(this,Be,"f"):0,"f");else return w(this,mr,"f")===void 0&&re(this,mr,setTimeout(()=>{w(this,oe,"m",to).call(this);},s),"f"),!0}return !1},Zr=function(){if(w(this,ve,"f").size===0)return w(this,Pe,"f")&&clearInterval(w(this,Pe,"f")),re(this,Pe,void 0,"f"),this.emit("empty"),w(this,Be,"f")===0&&this.emit("idle"),!1;if(!w(this,at,"f")){let t=!w(this,oe,"a",ro);if(w(this,oe,"a",Zi)&&w(this,oe,"a",eo)){let s=w(this,ve,"f").dequeue();return s?(this.emit("active"),s(),t&&w(this,oe,"m",ln).call(this),!0):!1}}return !1},ln=function(){w(this,gr,"f")||w(this,Pe,"f")!==void 0||(re(this,Pe,setInterval(()=>{w(this,oe,"m",cn).call(this);},w(this,hr,"f")),"f"),re(this,Qr,Date.now()+w(this,hr,"f"),"f"));},cn=function(){w(this,lt,"f")===0&&w(this,Be,"f")===0&&w(this,Pe,"f")&&(clearInterval(w(this,Pe,"f")),re(this,Pe,void 0,"f")),re(this,lt,w(this,dr,"f")?w(this,Be,"f"):0,"f"),w(this,oe,"m",rs).call(this);},rs=function(){for(;w(this,oe,"m",Zr).call(this););},no=async function(t){return new Promise((s,r)=>{t.addEventListener("abort",()=>{r(new ss("The task was aborted."));},{once:!0});})},es=async function(t,s){return new Promise(r=>{let n=()=>{s&&!s()||(this.off(t,n),r());};this.on(t,n);})};var Qe=fl__default.default.create({responseType:"json",headers:{}}),W=new xr({concurrency:5,interval:250,intervalCap:2});function ns(e){return e===429||e===500?!0:(W.isPaused||W.pause(),!1)}var pn=Symbol("singleComment"),oo=Symbol("multiComment"),Dl=()=>"",ml=(e,t,s)=>e.slice(t,s).replace(/\S/g," "),dl=(e,t)=>{let s=t-1,r=0;for(;e[s]==="\\";)s-=1,r+=1;return !!(r%2)};function os(e,{whitespace:t=!0,trailingCommas:s=!1}={}){if(typeof e!="string")throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof e}\``);let r=t?ml:Dl,n=!1,i=!1,o=0,a="",l="",d=-1;for(let p=0;p<e.length;p++){let c=e[p],h=e[p+1];if(!i&&c==='"'&&(dl(e,p)||(n=!n)),!n)if(!i&&c+h==="//")a+=e.slice(o,p),o=p,i=pn,p++;else if(i===pn&&c+h===`\r
57
+ `){p++,i=!1,a+=r(e,o,p),o=p;continue}else if(i===pn&&c===`
58
+ `)i=!1,a+=r(e,o,p),o=p;else if(!i&&c+h==="/*"){a+=e.slice(o,p),o=p,i=oo,p++;continue}else if(i===oo&&c+h==="*/"){p++,i=!1,a+=r(e,o,p+1),o=p+1;continue}else s&&!i&&(d!==-1?c==="}"||c==="]"?(a+=e.slice(o,p),l+=r(a,0,1)+a.slice(1),a="",o=p,d=-1):c!==" "&&c!==" "&&c!=="\r"&&c!==`
59
+ `&&(a+=e.slice(o,p),o=p,d=-1):c===","&&(l+=a+e.slice(o,p),a="",o=p,d=p));}return l+a+(i?r(e.slice(o)):e.slice(o))}var Fr="hot.js.liquid",uo="hot.js",fn=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];var ao=["style","script","svg","metafields","pages","sections","redirects","vscode"],lo=[["input","source"],["output","theme"],["export","export"],["import","import"],["config","."]],co=["assets","config","layout","customers","locales","sections","snippets","templates","metafields","pages","redirects"],po=["templates","templates/customers","assets","config","layout","locales","sections","snippets"];var Dn=["b","kb","mb","gb","tb"],mn=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],fo=["You cannot use script minification without esbuild installed","and configured as a processor. Install esbuild and configure Syncify","to apply transforms to leverage script minification."],dn="__injected_dirname__",gn="__injected_filename__",hn="__injected_import_meta_url__",wr=/([|,])/g,us=/\.(mjs|cjs|ts|js|tsx|jsx)$/,Do=/(\()(line\s[0-9]+)(\))(:)/g,mo=/('[\w\s.-]*?'|"[\w\s.-]*?")/g,go=/({{2}-?)([a-zA-Z0-9_\-.'"[\]]+)(-?}{2})/g,ho=/((?:www|http:|https:)+[^\s]+[\w])/g,yo=/(\/)(.*?)(\/)/g,yn={404:"The requested resource was not found.",400:"The request was not understood by the server, generally due to bad syntax or because the Content-Type header was not correctly set to application / json. This status is also returned when the request provides an invalid code parameter during the OAuth token exchange process.",303:"The response to the request can be found under a different URL in the Location header and can be retrieved using a GET method on that resource.",401:"The necessary authentication credentials are not present in the request or are incorrect",402:"The requested shop is currently frozen. The shop owner needs to log in to the shop's admin, and pay the outstanding balance to unfreeze the shop.",406:"The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request.",423:"The requested shop is currently locked. Shops are locked if they repeatedly exceed their API request limit. or if there is an issue with the account, such as a detected compromise or fraud risk.",403:"The server is refusing to respond to the request. This is generally because you have not requested the appropriate scope for this action.",501:"The requested endpoint is not available on that particular shop, e.g. requesting access to a Shopify Plus\u2013only API on a non-Plus shop. This response may also indicate that this endpoint is reserved for future use.",503:"The server is currently unavailable. Check the Shopify status page for reported service outages. See https://www.shopifystatus.com"};var Cr=new events.EventEmitter;function xo(e){try{return JSON.parse(os(e).trim())}catch(t){throw new Error(t)}}function Fo(e){return /\[(?:file|dir|ext)\]/.test(e)}function Xe(e,t,s=!1){return t>1?`${e}s`:e}function Nt(e){return we(e)?e.toString():G(e)||v(e)?JSON.stringify(e):String(e)}async function wo(e,{format:t}){return t==="esm"?s=>import(s):Fn(e)}function Co(e){return e===".mjs"||e===".cjs"?"js":e.slice(1)}function as(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Er(e){return Ke(Se(e))}function Se(e){return P(e)?Buffer.from(e).toString().length:e.toString().length}function Ke(e){if(e===0)return "0b";let t=parseInt(`${Math.floor(Math.log(e)/Math.log(1024))}`,10);return t===0?`${F(String(e))}${Dn[t]}`:`${F((e/1024**t).toFixed(1))}${Dn[t]}`}function $e(e,t){let s=Se(e),r=Ke(yl__default.default.gzipSync(e).length),n=Ke(t),i=Ke(s),o=Ke(t-s);return {isSmaller:s>t||s===t,gzip:r,before:n,after:i,saved:o}}function br(){let e=new Date,t=e.getHours(),s=e.getMinutes(),r=e.getSeconds(),n=D(":");return (t<10?`0${t}`:t)+n+(s<10?`0${s}`:s)+n+(r<10?`0${r}`:r)}function xn(e){let t=e%10,s=e%100;return e+(t===1&&s!==11?"st":t===2&&s!==12?"nd":t===3&&s!==13?"rd":"th")}function Fn(e){return Ee(globalThis.require)?globalThis.require(e):module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('out.js', document.baseURI).href)))(e)}function We(){return Math.random().toString(36).slice(2)}function wn(){return new Promise(e=>{typeof setImmediate=="function"?setImmediate(e):setTimeout(e);})}var Cn=new Map;function bo(e){let t=new stream.PassThrough,s=new stream.PassThrough;t.write=n=>e("stdout",n),s.write=n=>e("stderr",n);let r=new console$1.Console(t,s);for(let n of mn)Cn.set(n,console[n]),console[n]=r[n];return ()=>{for(let n of mn)console[n]=Cn.get(n);Cn.clear();}}var ls=[],cs={},Lt=e=>X(e||!0),U=e=>{e?cs[e]=perf_hooks.performance.now():ls.push(perf_hooks.performance.now());};function X(e=!1,t=!1){let s;typeof e=="boolean"?s=e?ls[ls.length-1]:ls.pop():e&&(t?(s=cs[e],delete cs[e]):s=cs[e]);let r=perf_hooks.performance.now()-s;if(r<1e3)return `${r.toFixed(0)}ms`;let n=r/1e3;if(n<60)return `${n.toFixed(0)}s ${+r.toFixed(0).slice(1,4)}ms`;let i=(n/60).toFixed(0);return `${i}m ${(n-60*Number(i)).toFixed(0)}s ${+r.toFixed(0).slice(1,4)}ms`}var I={};ar(I,{errors:()=>Wt,esbuild:()=>fc,postcss:()=>Dc,request:()=>lc,sass:()=>pc,spawn:()=>Yn,write:()=>cc});function bn(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var wl=()=>Fl__default.default.homedir().replace(/\\/g,"/"),So=wl;var vo=/\s+at.*[(\s](.*)\)?/,Bo=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/;function Sn(e,{pretty:t=!1,basePath:s,pathFilter:r}={}){let n=s&&new RegExp(`(file://)?${bn(s.replace(/\\/g,"/"))}/?`,"g"),i=t?So():"";if(typeof e=="string")return e.replace(/\\/g,"/").split(`
60
+ `).filter(o=>{let a=o.match(vo);if(a===null||!a[1])return !0;let l=a[1];return l.includes(".app/Contents/Resources/electron.asar")||l.includes(".app/Contents/Resources/default_app.asar")||l.includes("node_modules/electron/dist/resources/electron.asar")||l.includes("node_modules/electron/dist/resources/default_app.asar")?!1:r?!Bo.test(l)&&r(l):!Bo.test(l)}).filter(o=>o.trim()!=="").map(o=>(n&&(o=o.replace(n,"")),t&&(o=o.replace(vo,(a,l)=>a.replace(l,l.replace(i,"~")))),o)).join(`
61
+ `)}function vn({onlyFirst:e=!1}={}){let 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")}var Cl=vn();function Et(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Cl,"")}var _o=Ot(Ao(),1),ko=Ot(Ro(),1);function bt(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=Et(e),e.length===0))return 0;e=e.replace((0, ko.default)()," ");let s=t.ambiguousIsNarrow?1:2,r=0;for(let n of e){let i=n.codePointAt(0);if(i<=31||i>=127&&i<=159||i>=768&&i<=879)continue;switch(_o.default.eastAsianWidth(n)){case"F":case"W":r+=2;break;case"A":r+=s;break;default:r+=1;}}return r}var Oo=(e=0)=>t=>`\x1B[${t+e}m`,Po=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Io=(e=0)=>(t,s,r)=>`\x1B[${38+e};2;${t};${s};${r}m`,ee={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],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],gray:[90,39],grey:[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],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};Object.keys(ee.modifier);var El=Object.keys(ee.color),bl=Object.keys(ee.bgColor);[...El,...bl];function Sl(){let e=new Map;for(let[t,s]of Object.entries(ee)){for(let[r,n]of Object.entries(s))ee[r]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},s[r]=ee[r],e.set(n[0],n[1]);Object.defineProperty(ee,t,{value:s,enumerable:!1});}return Object.defineProperty(ee,"codes",{value:e,enumerable:!1}),ee.color.close="\x1B[39m",ee.bgColor.close="\x1B[49m",ee.color.ansi=Oo(),ee.color.ansi256=Po(),ee.color.ansi16m=Io(),ee.bgColor.ansi=Oo(10),ee.bgColor.ansi256=Po(10),ee.bgColor.ansi16m=Io(10),Object.defineProperties(ee,{rgbToAnsi256:{value:(t,s,r)=>t===s&&s===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(s/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:t=>{let s=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!s)return [0,0,0];let[r]=s;r.length===3&&(r=[...r].map(i=>i+i).join(""));let n=Number.parseInt(r,16);return [n>>16&255,n>>8&255,n&255]},enumerable:!1},hexToAnsi256:{value:t=>ee.rgbToAnsi256(...ee.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let s,r,n;if(t>=232)s=((t-232)*10+8)/255,r=s,n=s;else {t-=16;let a=t%36;s=Math.floor(t/36)/5,r=Math.floor(a/6)/5,n=a%6/5;}let i=Math.max(s,r,n)*2;if(i===0)return 30;let o=30+(Math.round(n)<<2|Math.round(r)<<1|Math.round(s));return i===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,s,r)=>ee.ansi256ToAnsi(ee.rgbToAnsi256(t,s,r)),enumerable:!1},hexToAnsi:{value:t=>ee.ansi256ToAnsi(ee.hexToAnsi256(t)),enumerable:!1}}),ee}var vl=Sl(),Sr=vl;var ps=new Set(["\x1B","\x9B"]),Bl=39,An="\x07",Lo="[",$l="]",Mo="m",Tn=`${$l}8;;`,jo=e=>`${ps.values().next().value}${Lo}${e}${Mo}`,No=e=>`${ps.values().next().value}${Tn}${e}${An}`,Al=e=>e.split(" ").map(t=>bt(t)),$n=(e,t,s)=>{let r=[...t],n=!1,i=!1,o=bt(Et(e[e.length-1]));for(let[a,l]of r.entries()){let d=bt(l);if(o+d<=s?e[e.length-1]+=l:(e.push(l),o=0),ps.has(l)&&(n=!0,i=r.slice(a+1).join("").startsWith(Tn)),n){i?l===An&&(n=!1,i=!1):l===Mo&&(n=!1);continue}o+=d,o===s&&a<r.length-1&&(e.push(""),o=0);}!o&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop());},Tl=e=>{let t=e.split(" "),s=t.length;for(;s>0&&!(bt(t[s-1])>0);)s--;return s===t.length?e:t.slice(0,s).join(" ")+t.slice(s).join("")},Rl=(e,t,s={})=>{if(s.trim!==!1&&e.trim()==="")return "";let r="",n,i,o=Al(e),a=[""];for(let[d,p]of e.split(" ").entries()){s.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let c=bt(a[a.length-1]);if(d!==0&&(c>=t&&(s.wordWrap===!1||s.trim===!1)&&(a.push(""),c=0),(c>0||s.trim===!1)&&(a[a.length-1]+=" ",c++)),s.hard&&o[d]>t){let h=t-c,g=1+Math.floor((o[d]-h-1)/t);Math.floor((o[d]-1)/t)<g&&a.push(""),$n(a,p,t);continue}if(c+o[d]>t&&c>0&&o[d]>0){if(s.wordWrap===!1&&c<t){$n(a,p,t);continue}a.push("");}if(c+o[d]>t&&s.wordWrap===!1){$n(a,p,t);continue}a[a.length-1]+=p;}s.trim!==!1&&(a=a.map(d=>Tl(d)));let l=[...a.join(`
62
+ `)];for(let[d,p]of l.entries()){if(r+=p,ps.has(p)){let{groups:h}=new RegExp(`(?:\\${Lo}(?<code>\\d+)m|\\${Tn}(?<uri>.*)${An})`).exec(l.slice(d).join(""))||{groups:{}};if(h.code!==void 0){let g=Number.parseFloat(h.code);n=g===Bl?void 0:g;}else h.uri!==void 0&&(i=h.uri.length===0?void 0:h.uri);}let c=Sr.codes.get(Number(n));l[d+1]===`
63
+ `?(i&&(r+=No("")),n&&c&&(r+=jo(c))):p===`
64
+ `&&(n&&c&&(r+=jo(n)),i&&(r+=No(i)));}return r};function pt(e,t,s){return String(e).normalize().replace(/\r\n/g,`
46
65
  `).split(`
47
- `).map(r=>va(r,t,s)).join(`
48
- `)}var ae={};Wt(ae,{clear:()=>Dt,closer:()=>Ur,context:()=>Ae,indent:()=>st,message:()=>ln,multiline:()=>cn,opener:()=>Wr,sample:()=>mt,shopify:()=>Vr,stack:()=>lo,suffix:()=>Y});var ve={};Wt(ve,{arrow:()=>pt,blue:()=>be,blueBright:()=>nn,bold:()=>x,check:()=>Ha,clear:()=>Va,close:()=>an,colon:()=>S,cyan:()=>T,cyanBright:()=>Ia,gray:()=>p,green:()=>Na,greenBright:()=>Ma,italic:()=>La,lightGray:()=>ir,line:()=>g,lpr:()=>Ja,magenta:()=>Lr,magentaBright:()=>qa,neonCyan:()=>un,neonGreen:()=>uo,neonRouge:()=>Ua,newline:()=>ft,open:()=>or,orange:()=>Wa,pink:()=>Ue,purge:()=>za,red:()=>$,redBright:()=>ja,reset:()=>nr,rpr:()=>Ya,strike:()=>Ga,time:()=>ur,underline:()=>on,warning:()=>Gr,white:()=>se,whiteBright:()=>rt,yellow:()=>qr,yellowBright:()=>K});var tt=Et(oo());var{cyan:T,cyanBright:Ia,red:$,redBright:ja,green:Na,greenBright:Ma,yellow:qr,yellowBright:K,magenta:Lr,magentaBright:qa,blue:be,blueBright:nn,white:se,whiteBright:rt,gray:p,underline:on,bold:x,reset:nr,italic:La,strike:Ga}=tt.default,ir=tt.default.hex("#2a2a2e"),Ue=tt.default.hex("#ff75d1"),Wa=tt.default.hex("#FFAB40"),uo=tt.default.hex("#56ef83"),un=tt.default.hex("#69d5fd"),Ua=tt.default.hex("#D47179"),or=ir("\u250C\u2500 "),g={gray:ir("\u2502 "),red:$.dim("\u2502 "),yellow:qr.dim("\u2502 ")},ft=ir(`${y}\u2502${y}`),an=ir("\u2514\u2500 "),Va="\x1B[H\x1B[2J",za="\x1B[2J\x1B[3J\x1B[H\x1Bc",Ha=uo("\u2713 "),S=p(": "),pt=p(" \u2192 "),Ja=p("("),Ya=p(")"),Gr=K(` ~ Type ${x("w")} and press ${x("enter")} to view`),ur=e=>e?nr.gray(` ~ ${e}`):E;var lo=E;function Dt(){let e=process.stdout.rows-2,t=e>0?_(e):E;A(t),ao.cursorTo(process.stdout,0,0),ao.clearScreenDown(process.stdout);}function Y(e,t,s){return (t==="invalid"||t==="failed"?g.red:t==="warning"?g.yellow:g.gray)+ve[e](t)+Me(10-t.length)+pt+ve[e](s)}function Wr(e){return y+or+p(`${e} ~ ${rr()}`)}function Ur(e){return g.gray+y+an+p(`${e} ~ ${rr()}`)}function ln(e,t){return g.gray+ve[e](t)}function Vr(e){let t=b(e)?e.map(Vr).join(y):$(e).replace(Ai,p("$1")+se("$2")+p("$3")+se("$4")+_(2)).replace($i,K.bold("$1")).replace(Ti,T("$1")+rt("$2")+T("$3")).replace(_i,on("$1")).replace(ki,Lr("$1")+T("$2")+Lr("$3"));return st(t,{line:g.red})}function mt(e,t={}){let s=m("line",t)?t.line:g.gray;if(Re("span.start",t)){let r=m("end",t.span)?t.span.end:t.span.start+1,n=`${s}${be(`${t.span.start-1}`)}${S+y}${s}${be(`${t.span.start}`)}${S} ${e+y}${s}${be(`${r}`)}${S+y}`;return s+y+n}return s+y+s+e}function st(e,t={}){let s=b(e)?e:e.split(y),r=m("line",t)?t.line:g.gray,n=m("nwl",t)?`${r+y}`:E;for(;s.length!==0;){let i=s.shift();i.trim().length>0?i.trim().startsWith(r)?n+=(m("text",t)?t.text(i):i)+y:n+=r+(m("text",t)?t.text(i.trimStart()):i.trimStart())+y:n+=r+y;}return n}function Ae(e){let t=0,s=g.red+y;for(let r in e.entries)t<r.length&&(t=r.length);for(let r in e.entries)s+=g.red+$(r)+S+Me(t-r.length)+p(`${e.entries[r]}`)+y;return e.stack&&(lo=e.stack,s+=g.red+$("stack")+S+Me(t-5)+p(`Type ${x("s")} and press ${x("enter")} to view stack trace`)+y+g.gray),s}function cn(e,t){let s=g.gray,r=se;e==="error"?(s=g.red,r=$):e==="warning"&&(s=g.yellow,r=K);let n=[],i=process.stdout.columns-5,o=t.trim(),a=ct(o,i).split(y);for(;a.length!==0;){let u=a.shift();u.trim().length>0&&n.push(s+r(u));}return s+y+n.join(y)}function fn(e){let t=[],s=[g.red],r=e.search(/(?:\n {4}at .*)/),n=process.stdout.columns-5,i=[];if(/\berror\b:?/i.test(e)&&r>0){i=e.slice(0,r).split(y);let o=Js(e.slice(r),{pretty:!0,basePath:l.cwd}),a=ct(o,n).split(y);for(s.push(y);a.length!==0;){let u=a.shift();u.trim().length>0&&s.push(nr(g.red+u));}}for(i.length===0&&(i=e.split(y));i.length!==0;){let o=i.shift();o.trim().length>0&&t.push(nr(g.gray)+o);}Q(`${t.join(y)}${s.length>1?s.join(y):E}`);}function Qa(e,t){console.log(t);let s=Re("error.asset",t.data)?t.data.error.asset:Re("errors.asset",t.data)?t.data.errors.asset:null;t.status===422?Q(g.red+y+Vr(s)+Ae({stack:!1,entries:{source:`~${e}`,status:t.status,message:t.statusText,details:"Shopify has not accepted the request."}})):t.status in Us?Q(g.red+y+cn("error",Us[t.status])+Ae({stack:!1,entries:{source:`~${e}`,status:t.status,message:t.statusText}})):Q(g.red+y+$("Unknown error has occured")+Ae({stack:!1,entries:{source:`~${e}`,status:t.status,message:t.statusText}}));}var Ka=(e,t)=>s=>{Q(st(e,{nwl:!0,line:g.red,text:$.bold})+Ae({stack:s.stack,entries:{...t,code:s.code,name:s.name,details:s.message}}));};function Xa(e,t){Q(st(t.message,{nwl:!0,line:g.red,text:$})+Ae({stack:t.sassStack,entries:{input:e.relative,message:t.sassMessage}}));}function Za(e){Q(st(e.text,{nwl:!0,line:g.red,text:$})+mt(e.location.lineText,{line:g.red,span:{start:e.location.line,end:e.location.line+1}})+Ae({stack:!1,entries:{file:e.location.file,column:e.location.column,line:e.location.line,plugin:e.pluginName}}));}function el(e){}var pn=new Map;function fo(e){let t=new stream.PassThrough,s=new stream.PassThrough;t.write=n=>e("stdout",n),s.write=n=>e("stderr",n);let r=new console$1.Console(t,s);for(let n of Ms)pn.set(n,console[n]),console[n]=r[n];return ()=>{for(let n of Ms)console[n]=pn.get(n);pn.clear();}}var N="\x1B[",ar="\x1B]",vt="\x07",zr=";",po=process.env.TERM_PROGRAM==="Apple_Terminal",k={};k.cursorTo=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof t!="number"?N+(e+1)+"G":N+(t+1)+";"+(e+1)+"H"};k.cursorMove=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let s="";return e<0?s+=N+-e+"D":e>0&&(s+=N+e+"C"),t<0?s+=N+-t+"A":t>0&&(s+=N+t+"B"),s};k.cursorUp=(e=1)=>N+e+"A";k.cursorDown=(e=1)=>N+e+"B";k.cursorForward=(e=1)=>N+e+"C";k.cursorBackward=(e=1)=>N+e+"D";k.cursorLeft=N+"G";k.cursorSavePosition=po?"\x1B7":N+"s";k.cursorRestorePosition=po?"\x1B8":N+"u";k.cursorGetPosition=N+"6n";k.cursorNextLine=N+"E";k.cursorPrevLine=N+"F";k.cursorHide=N+"?25l";k.cursorShow=N+"?25h";k.eraseLines=e=>{let t="";for(let s=0;s<e;s++)t+=k.eraseLine+(s<e-1?k.cursorUp():"");return e&&(t+=k.cursorLeft),t};k.eraseEndLine=N+"K";k.eraseStartLine=N+"1K";k.eraseLine=N+"2K";k.eraseDown=N+"J";k.eraseUp=N+"1J";k.eraseScreen=N+"2J";k.scrollUp=N+"S";k.scrollDown=N+"T";k.clearScreen="\x1Bc";k.clearTerminal=process.platform==="win32"?`${k.eraseScreen}${N}0f`:`${k.eraseScreen}${N}3J${N}H`;k.beep=vt;k.link=(e,t)=>[ar,"8",zr,zr,t,vt,e,ar,"8",zr,zr,vt].join("");k.image=(e,t={})=>{let s=`${ar}1337;File=inline=1`;return t.width&&(s+=`;width=${t.width}`),t.height&&(s+=`;height=${t.height}`),t.preserveAspectRatio===!1&&(s+=";preserveAspectRatio=0"),s+":"+e.toString("base64")+vt};k.iTerm={setCwd:(e=process.cwd())=>`${ar}50;CurrentDir=${e}${vt}`,annotation:(e,t={})=>{let s=`${ar}1337;`,r=typeof t.x<"u",n=typeof t.y<"u";if((r||n)&&!(r&&n&&typeof t.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),s+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",t.length>0?s+=(r?[e,t.length,t.x,t.y]:[t.length,e]).join("|"):s+=e,s+vt}};var Dn=k;var So=Et(go(),1),Bo=Et(wo(),1);var nl=(0, So.default)(()=>{(0, Bo.default)(()=>{vo.stderr.write("\x1B[?25h");},{alwaysLast:!0});}),bo=nl;var Zr=!1,_t={};_t.show=(e=vo.stderr)=>{!e.isTTY||(Zr=!1,e.write("\x1B[?25h"));};_t.hide=(e=vo.stderr)=>{!e.isTTY||(bo(),Zr=!0,e.write("\x1B[?25l"));};_t.toggle=(e,t)=>{e!==void 0&&(Zr=e),Zr?_t.show(t):_t.hide(t);};var gn=_t;function yn(e){return Number.isInteger(e)?e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||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):!1}var il=/^[\uD800-\uDBFF][\uDC00-\uDFFF]$/,$o=["\x1B","\x9B"],es=e=>`${$o[0]}[${e}m`,Ao=(e,t,s)=>{let r=[];e=[...e];for(let n of e){let i=n;n.includes(";")&&(n=n.split(";")[0][0]+"0");let o=sr.codes.get(Number.parseInt(n,10));if(o){let a=e.indexOf(o.toString());a===-1?r.push(es(t?o:i)):e.splice(a,1);}else if(t){r.push(es(0));break}else r.push(es(i));}if(t&&(r=r.filter((n,i)=>r.indexOf(n)===i),s!==void 0)){let n=es(sr.codes.get(Number.parseInt(s,10)));r=r.reduce((i,o)=>o===n?[o,...i]:[...i,o],[]);}return r.join("")};function Fn(e,t,s){let r=[...e],n=[],i=typeof s=="number"?s:r.length,o=!1,a,u=0,c="";for(let[f,d]of r.entries()){let h=!1;if($o.includes(d)){let w=/\d[^m]*/.exec(e.slice(f,f+18));a=w&&w.length>0?w[0]:void 0,u<i&&(o=!0,a!==void 0&&n.push(a));}else o&&d==="m"&&(o=!1,h=!0);if(!o&&!h&&u++,!il.test(d)&&yn(d.codePointAt())&&(u++,typeof s!="number"&&i++),u>t&&u<=i)c+=d;else if(u===t&&!o&&a!==void 0)c=Ao(n);else if(u>=i){c+=Ao(n,!0,a);break}}return c}var ol=24,ts=e=>{let{columns:t}=e;return t||80},ul=(e,t)=>{let s=e.rows||ol,r=t.split(`
49
- `),n=r.length-s;return n<=0?t:Fn(t,at(r.slice(0,n).join(`
50
- `)).length+1)};function _o(e,{showCursor:t=!1}={}){let s=0,r=ts(e),n="",i=(...o)=>{t||gn.hide();let a=o.join(" ")+`
51
- `;a=ul(e,a);let u=ts(e);a===n&&r===u||(n=a,r=u,a=ct(a,u,{trim:!1,hard:!0,wordWrap:!1}),e.write(Dn.eraseLines(s)+a),s=a.split(`
52
- `).length);};return i.clear=()=>{e.write(Dn.eraseLines(s)),n="",r=ts(e),s=0;},i.done=()=>{n="",r=ts(e),s=0,t||gn.show();},i}var al=_o(vo.stdout),ko=al;_o(vo.stderr);var gt={};function $e(e){return m(e,gt)||(gt[e]=[]),(t,s)=>{q(s)?gt[e].push(g.yellow+K(t)):gt[e].push(g.yellow+K(t+S+de+x(s)));}}function I(e,t,s,r){Q(_(2),$(`${x(`Invalid ${T(e)} type value provided`)}`)+_(2),$(`The ${T(t)} option has an incorrect type value`)+_(2),$(`provided${S}${K(oe(s).toLowerCase())}`)+y,$(`expected${S}${be(r.replace(/([|,])/g,p("$1")))}`)+_(2),$(`at${S}${p.underline(l.file)}`)+_(2),se.bold("How to fix?")+S+y,`
53
- ${p("You need to change the option value to use the")} ${be("expected")} ${p("type.")}
54
- ${p(`Use the ${T("defineConfig")} named export for type checking`)}
55
- `),process.exit(0);}function Te(e){P(e)?Q(_(2),$(`${x(`Missing ${T(e)} dependency`)}`)+_(2),$(`You need to install ${T(e)} to use it as a processor`)+_(2),se.bold("How to fix?")+S+y,`
56
- $ ${be.bold("pnpm add "+e+" -D")}
57
-
58
- ${p("If you are using a different package manager (ie: Yarn or NPM) then")}
59
- ${p("please consider adopting pnpm. Pnpm is dope and does dope shit.")}
60
- `):Q(_(2),$(`${x(`Missing ${T(`${e.length}`)} dependencies`)}`)+_(2),$("You are attempting to use processors which are not yet installed!")+_(2),rt(p("-")+de+e.join(y+p(" -")+de))+_(2),se.bold("How to fix?")+S+y,`
61
- $ ${nn("pnpm add "+e.join(de)+" -D")}
62
-
63
- ${p("If you are using a different package manager (ie: Yarn or NPM) then")}
64
- ${p("please consider adopting pnpm. Pnpm is dope and does dope shit.")}
65
- `),process.exit(0);}function Ro(e,t,s,r){Q(_(2),$(`${x(`Missing ${T(e)} configuration option`)}`)+_(2),$(`The ${T(t)} option needs to be defined`)+_(2),$(`expects${S}${be(s.replace(/([|,])/g,p("$1")))}`)+_(2),$(`at${S}${p.underline(l.file)}`)+_(2),se.bold("Why?")+S+y,`
66
- ${p(r)}
67
- `),process.exit(0);}function ne(e,t,s,r){Q(_(2),$(`${x(`Invalid ${T(e)} configuration`)}`)+_(2),$(`The ${T(t)} option has an invalid or missing value`)+_(2),$(`provided${S}${K(s)}`)+y,$(`expected${S}${be(r.replace(/([|,])/g,p("$1")))}`)+_(2),se.bold("How to fix?")+S+y,`
68
- ${p("You need to update the option and use one of the expected values.")}
69
- ${p(`Use the ${T("defineConfig")} named export for type checking`)}
70
- `),process.exit(0);}function Po(e){Q(_(2),$(`${x(`Missing ${T("syncify.config.js")} configuration`)}`)+_(2),$("Unable to resolve a configuration file within the workspace")+_(2),$(`at${S+p.underline(e)}`)+_(2),se.bold("How to fix?")+S+y,`
71
- ${p("You need to add one the following files to your project"+S)}
72
-
73
- ${p("-")} ${se("syncify.config.ts")}
74
- ${p("-")} ${se("syncify.config.js")}
75
- ${p("-")} ${se("syncify.config.mjs")}
76
- ${p("-")} ${se("syncify.config.cjs")}
77
- ${p("-")} ${se("syncify.config.json")}
78
-
79
- ${p("You can also provide configuration in your")} ${se("package.json")}
80
- ${p("file using a")} ${K("syncify")} ${p("property.")}
81
- `),process.exit(0);}function ee(e,t){Q(_(2),$.bold(e)+_(2),se.bold("How to fix?")+S+y,p(b(t)?t.join(y).trimStart():t),_(2)),process.exit(0);}function Ie(e,t){Q(_(2),$.bold(`Unknown ${e} option`)+_(2),$(`The ${x(t)} option in invalid, remove it from the config`),_(2)),process.exit(0);}var kt=new Map,xn=(e,t,s)=>{let r=ll(t.cmd,t.args,{stdio:"pipe"});r.stdio[0].on("data",s),r.stdio[1].on("data",s),r.stdio[2].on("data",s),t.pid=r.pid,kt.set(e,r);};function Oo(e){let t=[];if(e.mode.metafields)return E;t.push(`${or}${p("Syncify")} ${p("~")} ${p(rr())}`,`${g.gray}`,`${g.gray}${rt.bold(`v${e.version}`)}`,`${g.gray}`);let s=e.sync.stores.length,r=we(e.sync.themes).length,n=we(e.spawn.commands).length,{mode:i}=e,o=T.bold(String(s))+(s>1?" stores":" store"),a=T.bold(String(r))+(r>1?" themes":" theme"),u=T.bold(`${e.dev?"development":"production"}`);i.build?t.push(`${g.gray}Running ${T.bold("build")} in ${u}`):i.watch?t.push(`${g.gray}Running ${T.bold("watch")} in ${u}`):i.upload?t.push(`${g.gray}Running ${T.bold("upload")} mode`):i.download?t.push(`${g.gray}Running ${T.bold("download")} mode`):i.vsc?t.push(`${g.gray}Generate ${T.bold("vscode")} schema`):i.clean?t.push(`${g.gray}Running ${T.bold("clean")} mode`):i.export&&t.push(`${g.gray}Running ${T.bold("export")} mode`),t.push(`${g.gray}${s>0&&r>0?`Syncing ${a} to ${o}`:E}`);let c=!1,f=path.basename(e.file);for(let d in gt){let h=gt[d];if(h.length>0){c||(c=!0,t.push(g.gray+y+g.yellow+K(`${x("Warnings")} in ${x(f)}`)+S));let w=qr.bold(`${h.length} ${d} ${Ge("warning",h.length)}`);t.push(g.yellow+y+g.yellow+w+y+g.yellow+y+h.join(y));}}if(De(i.build,i.watch)&&n>0?t.push(`Spawned ${T.bold(`${n}`)} child ${n>1?"processes":"process"}${y}`):t.push(g.gray),St(i.upload,i.download,i.build,i.clean,i.vsc)){if(n>0){let d=Ye(kt),h=d.reduce((B,[ie])=>ie.length>B?ie.length:B,0),w=d.map(([B,ie])=>g.gray+de.repeat(h-B.length)+rt(Or(B))+p(":")+de+p("PID")+" \u2192 "+p("#")+Ue(`${ie.pid}`));t.push(`${g.gray}${x("Processes:")}${ft}${w.join(y)}${r>0?y:E}`);}if(r>0){let d=$s(e.sync.themes),h=d.reduce((B,{target:ie})=>ie.length>B?ie.length:B,0),w=d.map(({id:B,store:ie,target:Gt})=>Me(h-Gt.length)+ft+g.gray+Ue(`${ie.slice(0,ie.indexOf("."))} \u2192 `)+Ue.bold(Gt)+Ue(" \u2192 ")+p.underline(`https://${ie}/admin/themes/${B}/editor`));t.push(`${g.gray}${x("Theme Editors:")}${w.join(y)}${y}${g.gray}`);}if(r>0){let d=$s(e.sync.themes),h=d.reduce((B,{target:ie})=>ie.length>B?ie.length:B,0),w=d.map(({id:B,store:ie,target:Gt})=>Me(h-Gt.length)+ft+g.gray+Ue(`${ie.slice(0,ie.indexOf("."))} \u2192 `)+Ue.bold(Gt)+Ue(" \u2192 ")+p.underline("https://"+ie+"?preview_theme_id="+B));t.push(`${g.gray}${x("Theme Previews:")}${w.join(y)}${y}${g.gray}`);}}A(t.join(y));}var Cn=new Set,wn=null,En=!1,yt="Syncify",rs=E,Io=E;function fl(e,{report:t}){for(let{name:s}of t)A(g.gray+" - "+un(s));}function No(e="gray"){me(e)?A(y):A(g[e]);}function pl(e){b(e)?Q($(e.map(t=>g.red+bt(t)).join(y))):Q(g.red+bt(e));}function Dl(e){b(e)?A(e.map(t=>g.gray+bt(t)).join(y)):A(g.gray+bt(e));}function ml(e){A(Y("cyan","external",e));}function dl(e){re.current!==e&&(re.current=e),m(e,re.process)||(re.current=e,re.process[e]=new Set),wn=fo((t,s)=>{if(s.charCodeAt(0)===9474)Mo[t].write(s);else {re.count+=1;let r=s.split(`
82
- `);for(;r.length!==0;)re.process[e].add(`${K(r.shift().trimStart())}`);}});}function hl(){wn(),wn=null;}function gl(e){let t=rs!==e.relative;W(),t&&A(Ur(yt)),yt!=="Syncify"&&t&&Dt(),yt=e.namespace,t&&(Dt(),A(Wr(e.kind)),rs=e.relative),m(e.relative,re)||(re[e.relative]=new Set),Io!==e.relative&&(Io=e.relative),l.mode.watch&&(No(),A(Y("neonCyan","changed",e.relative)));}function yl(e){Cn.add([e.target,e.store,U()]),!En&&(En=!0,O.onIdle().then(()=>{Cn.forEach(([t,s,r])=>{A(Y("neonGreen","uploaded",`${x(t)} \u2192 ${s}`+ur(r)));}),Cn.clear(),En=!1;}));}function Fl(e){re.count>0&&Y("yellowBright","warning",`${re.count} ${Ge("warning",re.count)}`),l.mode.hot?(A(Y("neonRouge","reloaded",`${x("HOT RELOAD")}${ur(jr())}`)),A(Y("magentaBright","syncing",e)),O.pending>2&&A(Y("orange","queued",`${e} ~ ${x(Vs(O.pending))} in queue`))):(A(Y("magentaBright","syncing",e)),O.pending>0&&A(Y("orange","queued",`${e} ~ ${x(Vs(O.pending))} in queue`)));}function Mo(e,t){l.mode.build||A(Y("whiteBright","process",e+ur(t)));}function xl(e){l.mode.build||A(Y("whiteBright","transform",e));}function Cl(e,t){A(Y("orange","retrying",`${e} \u2192 ${t.target} ${p(`~ ${t.store}`)}`));}function El(e,t){A(Y("blueBright","deleted",`${e} \u2192 ${t.target} ${p(`~ ${t.store}`)}`));}function wl(e,t,s,r){let n=`${x(e)} ${pt}${t} > ${s} ${p(`~ saved ${r}`)}`;A(Y("whiteBright","minified",n));}function Sl(e,t){A(Y("whiteBright","reloaded",e+t));}function Bl(e,t){l.mode.build||A(g.gray+p(`${e.key} ~ ${t}`));}function bl(e){A(Y("gray","ignored",e));}function vl(e){A(Y("red","invalid",e)),jo.notify({title:"Syncify Error",sound:"Pop",open:e,subtitle:e,message:"Invalid error"}).notify();}function Al(e){A(Y("red","failed",e)),jo.notify({title:"Syncify Error",sound:"Pop",open:e,subtitle:e,message:"Request failed"}).notify();}function $l(e){throw new Error(e)}function Tl(e){return (...t)=>{l.spawn.invoked||(l.spawn.invoked=!0),yt!=="Spawn"&&(A(Ur(yt)),yt!=="Syncify"&&Dt(),A(Wr("Spawn")),yt="Spawn"),rs!==e&&(A(ln("pink",e)),rs=e),fn(bt(t.shift()));}}var cr={};Wt(cr,{postcss:()=>kl,sass:()=>_l,warnings:()=>_e});var _e={},_l=e=>(t,s)=>{let r=E;m(e.input,_e)?_e[e.input].has("sass")||_e[e.input].set("sass",new Set):_e[e.input]=new Map([["sass",new Set]]);let n=_e[e.input].get("sass");if(r+=st(t,{nwl:!0,line:g.yellow,text:K.bold}),m("span",s)){let i=m("start",s.span)&&m("end",s.span)?{start:s.span.start.line,end:s.span.end.line}:null,o=m("context",s.span)?s.span.context:m("text",s.span)?s.span.text:null;o!==null&&(i!==null?r+=mt(o,{line:g.yellow,span:i}):r+=mt(o));}r+=Ae({stack:s.stack,entries:{file:e.relative,deprecated:s.deprecation?"Yes":"No"}}),n.has(r)?A(Y("yellowBright","warning",`${n.size} ${Ge("warning",n.size)+Gr}`)):(n.add(r),A(Y("yellowBright","warning",`${n.size} ${Ge("warning",n.size)+Gr}`)));},kl=(e,t)=>{let s=E;m(e.input,_e)?_e[e.input].has("postcss")||_e[e.input].set("postcss",new Set):_e[e.input]=new Map([["postcss",new Set]]);let r=_e[e.input].get("postcss");s+=mt(t.node.toString(),{line:g.yellow,span:wr(t.endLine)?{start:t.line,end:t.endLine}:{start:t.line,end:t.endLine}}),s+=Ae({stack:!1,entries:{column:t.column,file:e.relative,plugin:t.plugin}}),r.has(s)||(r.add(s),ai(s));};function qo(){D.nwl(E),D.out(p("SIGINT")),process.exit();}function Lo(e,t){D.nwl(),D.err(`Unhandled Promise Rejection at: ${t}`),D.nwl("red"),D.out(p(e));}function Go(e){D.nwl(),D.err(`Uncaught Exception: ${e.message}`),D.nwl("red"),D.err(`${e.stack}`);}async function Wo(e,t){return Le({...l.sync.stores[t.sidx].client,method:"get",url:t.url,params:{"asset[key]":e}}).then(({data:s})=>s.asset).catch(()=>!1)}async function Sn(e,t){let s=v({},l.sync.stores[t.theme.sidx].client,{method:"put",url:t.theme.url,data:{asset:{key:t.key,value:e}}});return Le(s).then(()=>!0).catch(r=>(D.failed(t.key),R.request(t.key,r.response),!1))}async function Bn(e,t){return Le.get(e,t).then(({data:s})=>s).catch(s=>{D.failed(e),R.request(e,s.response);})}var ss;async function bn(e,t,s){return O.isPaused?void 0:(O.concurrency>1?(ss>=20&&O.concurrency--,ss>=35&&O.concurrency--):O.concurrency<3&&ss<30&&O.concurrency++,W(),Le(s).then(({headers:n,data:i})=>{if(s.method==="get")return i;s.method==="delete"?D.deleted(t.relative,e):D.upload(e),ss=parseInt(n["x-shopify-shop-api-call-limit"].slice(0,2),10);}).catch(n=>{n.response&&(n.response.status===429||n.response.status===500)?(D.retrying(t.key,e),O.add(()=>bn(e,t,s))):(D.failed(t.key),R.request(t.relative,n.response));}))}var An=class{constructor(t=process.stdin){this.onKeypress=(s,r)=>{if(r.ctrl&&r.name==="c")return process.exit(0)},this.isBlocked=()=>this.blocked,this.block=()=>this.toggle(!0),this.unblock=()=>this.toggle(!1),this.toggle=(s=!this.blocked)=>{this.blocked=s,s?(this.stream.isTTY&&this.stream.setRawMode(!0),this.interface=ao.createInterface({input:this.stream,escapeCodeTimeout:50}),ao.emitKeypressEvents(this.stream,this.interface),this.stream.on("keypress",this.onKeypress)):(this.stream.isTTY&&this.stream.setRawMode(!1),this.interface&&this.interface.close(),this.stream.off("keypress",this.onKeypress));},this.stream=t,this.blocked=!1;}},Vo=An;new Vo;var Rl=globalThis.process?.env||{},Pl=globalThis.process?.argv||[];!("NO_COLOR"in Rl)&&!Pl.includes("--no-color");var Ho=process.platform==="linux",Jo=process.platform==="win32";var $n=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];Jo||$n.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");Ho&&$n.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");var Yo=$n;var Tn=class{constructor(){this.callbacks=new Set,this.exited=!1,this.hooked=!1,this.exit=t=>{if(!this.exited){this.exited=!0;for(let s of this.callbacks)s();t&&process.kill(process.pid,t);}},this.hook=()=>{if(!this.hooked){this.hooked=!0,process.once("exit",()=>this.exit());for(let t of Yo)process.once(t,()=>this.exit(t));}},this.register=t=>(this.hook(),this.callbacks.add(t),()=>{this.callbacks.delete(t);});}},Qo=new Tn;var Ol=Qo.register,Ko=Ol;var _n=class{constructor(t=process.stdout){this.has=()=>this.visible,this.hide=()=>this.toggle(!1),this.show=()=>this.toggle(!0),this.toggle=(s=!this.visible)=>{if(!this.stream.isTTY)return;this.visible=s;let r=s?"\x1B[?25h":"\x1B[?25l";this.stream.write(r);},this.stream=t,this.visible=!0,Ko(this.show);}},Xo=_n;new Xo;async function Zo(e,t){if(is(arguments.length,1))return s=>Zo(e,s);if(St(m("namespace",t),m("key",t))){D.error("invalid fields");return}return Le.get("metafields.json",e.client).then(({data:s})=>s.metafields.find(r=>t.namespace===r.namespace&&t.key===r.key)).catch(s=>{console.log(s);})}async function kn(e,t){return is(arguments.length,1)?s=>kn(e,s):(t.type="json",t.namespace="email",t.value_type="json_string",t.key="eng",Le.post("metafields.json",{metafield:t},e.client).then(({data:s})=>(console.log("created",s),s.metafield)).catch(s=>{if(console.log(s),!e.queue)return R(t.namespace,s.response);if(kr(s.response.status)){O.add(()=>kn(e,t));return}else return R(e.store,s.response)}))}async function Rn(e,t,s){return is(arguments.length,1)?(r,n)=>Rn(e,r,n):Le.put(`metafields/${t}.json`,{metafield:s},e.client).then(r=>(console.log("created"),r.data.metafield)).catch(r=>{if(!e.queue)return R(s.namespace,r.response);if(kr(r.response.status))O.add(()=>Rn(e,t,s));else return R(e.store,r.response)})}async function ns(e,t){if(is(arguments.length,1))return r=>ns(e,r);let s=await Zo(e,t);return s?Rn(e,s.id,v(t,{id:s.id,type:"json"})).catch(r=>{if(!e.queue)return R(t.namespace,r.response);if(kr(r.response.status))O.add(()=>ns(e,t));else return R(e.store,r.response)}):kn(e,t)}var os=({stores:e,themes:t})=>({assets:async(s,r,n)=>{let i=q(n)?{method:s,params:{"asset[key]":r.key}}:{method:s,data:{asset:{key:r.key,value:n}}};await O.add(()=>Je(async o=>{await bn(o,r,v({url:o.url},e[o.sidx].client,i));},t));},pages:s=>O.add(function(){return Je(async function(r){},e)}),metafields:s=>O.add(function(){return Je(async function(r){await ns(r,s);},e)})});function nt(e){return b(e)?e.filter(t=>/\*/.test(t)):/\*/.test(e)?e:null}function Ee(e){if(b(e))return e.map(Ee);if(e.indexOf("/")===-1)return e;let t=path.dirname(e),s=t.lastIndexOf("/")+1;return t.slice(s)}function us(e){if(b(e))return e.map(us);let t=e.lastIndexOf("/");if(t===-1)return e;let s=e.indexOf("*");return s===-1?e.slice(0,t):e.slice(0,s)}function Rt(e){let t=new RegExp(`^\\.?\\/?${e}\\/`);return function s(r){if(b(r))return r.map(s);let n=r.charCodeAt(0)===33;return n&&(r=r.slice(1)),t.test(r)?n?"!"+r:r:(r.charCodeAt(0)===46&&r.charCodeAt(1)===46&&r.charCodeAt(2)===47&&ee(`Invalid path defined at: ${S}${K(`"${r}"`)}`,"Paths must be relative to source"),(n?"!":"")+path.join(e,r))}}var tu=e=>t=>{if(t.indexOf("*")!==-1&&ee(`Base directory path cannot contain glob${S}${K(`"${t}"`)}`,"Ensure that path you are resolving is correctly formed"),t.charCodeAt(0)===46){if(t.length===1)return e+"/";t.charCodeAt(1)===47?t=t.slice(1):ee(`Directory path is invalid at${S}${K(`"${t}"`)}`,"Ensure that path you are resolving is correctly formed");}if(t.charCodeAt(0)===47){if(t.length===1)return e+"/";t=t.slice(1);}if(/^[a-zA-Z0-9_-]+/.test(t))return t=path.join(e,t),ui(t).charCodeAt(0)===47?t:t+"/";ee(`Directory path is invalid at${S}${K(`"${t}"`)}`,"Ensure that path you are resolving is correctly formed");};function su(e){let t=l.svg.filter(s=>s.input.has(e.input)?!0:s.match(e.input)?(s.input.add(e.input),!0):!1);return q(t)||Ce(e,"config",{get(){return t}}),e}function as(e){let t=l.style.find(s=>s.watch(e.input));return q(t)||(Ce(e,"config",{get(){return t}}),t.snippet?(e.namespace="snippets",e.key=path.join("snippets",t.rename)):e.key=path.join("assets",t.rename),e.config.rename!==path.basename(e.output)&&(t.snippet?e.output=path.join(l.dirs.output,e.key):e.output=path.join(us(e.output),e.config.rename))),e}function Ft(e){let t=l.script.find(s=>s.watch(e.input));return q(t)||(Ce(e,"config",{get(){return t}}),t.snippet?(e.namespace="snippets",/\.liquid$/.test(t.rename)?e.key=path.join("snippets",t.rename):e.key=path.join("snippets",t.rename+".liquid")):e.key=path.join("assets",t.rename),t.rename!==path.basename(e.output)&&(t.snippet?e.output=path.join(l.dirs.output,e.key):e.output=path.join(us(e.output),t.rename))),e}function Pn(e){if(l.section.prefixDir){if(li(l.section.global)&&l.section.global.test(e.input))return e;let t=Ee(e.input)+l.section.separator+e.base;e.name=t,e.key=path.join(e.namespace,t),e.output=path.join(path.dirname(e.output),t);}return e}function fr({name:e,dir:t,ext:s,namespace:r},n){let i=n;return /\[dir\]/.test(i)&&(i=i.replace(/\[dir\]/g,t)),/\[file\]/.test(i)&&(i=i.replace(/\[file\]/g,e)),/\[ext\]/.test(i)&&(i=i.replace(/\[ext\]/g,s)),r==="snippets"&&n.endsWith(".liquid")===!1?i+".liquid":!n.endsWith(".[ext]")||!n.endsWith(s)?/\.[a-z]+$/.test(n)?i:i+s:i}function iu(e,t,s){return (r,n,i)=>{let o;return n===13||n===14?(o=path.join(Ee(e.dir),e.base),s=null):(o=path.join(r,e.base),s=path.join(s,o)),v({},e,{type:n,input:t,output:s,key:o,namespace:r,kind:i,relative:path.relative(l.cwd,t),config:void 0,size:NaN})}}function ls(e,t){return s=>{let r=path.parse(s),n=iu(r,s,t);if(r.ext===".liquid"){if(e.sections(s))return Pn(n("sections",4,"Liquid"));if(e.snippets(s))return n("snippets",3,"Liquid");if(e.layout(s))return n("layout",2,"Liquid");if(e.templates(s))return n("templates",1,"Liquid");if(e.customers(s))return n("templates/customers",1,"Liquid");if(e.transforms.has(s))switch(e.transforms.get(s)){case 8:return Ft(n("snippets",8,"JavaScript"));case 7:return Ft(n("snippets",7,"CSS"))}}else {if(r.ext===".md"||r.ext===".html")return n("pages",14,r.ext===".html"?"HTML":"Markdown");if(r.ext===".json"){if(e.metafields(s))return n("metafields",13,"JSON");if(e.sections(s))return Pn(n("sections",4,"JSON"));if(e.templates(s))return n("templates",1,"JSON");if(e.config(s))return n("config",5,"JSON");if(e.locales(s))return n("locales",6,"JSON");if(e.customers(s))return n("templates/customers",1,"JSON")}else {if(r.ext===".svg")return su(n("assets",9,"SVG"));if(r.ext===".css")return as(n("assets",7,"CSS"));if(r.ext===".scss")return as(n("assets",7,"SCSS"));if(r.ext===".sass")return as(n("assets",7,"SASS"));if(r.ext===".js")return Ft(n("assets",8,"JavaScript"));if(r.ext===".ts")return Ft(n("assets",8,"TypeScript"));if(r.ext===".jsx")return Ft(n("assets",8,"JSX"));if(r.ext===".tsx")return Ft(n("assets",8,"TSK"));if(e.assets(s)){if(l.spawn.invoked)return n("assets",15);if(r.ext===".jpg"||r.ext===".png"||r.ext===".gif"||r.ext===".pjpg")return n("assets",12,"Image");if(r.ext===".mov"||r.ext===".mp4"||r.ext===".webm"||r.ext===".ogg")return n("assets",12,"Video");if(r.ext===".pdf")return n("assets",12,"PDF");if(r.ext===".eot"||r.ext===".ttf"||r.ext===".woff"||r.ext===".woff2")return n("assets",12,"Font")}}}}}var ou=e=>t=>{let s=path.parse(t),r=iu(s,t,e);switch(path.basename(s.dir)){case"sections":return r("sections",4);case"snippets":return r("snippets",3);case"layout":return r("layout",2);case"templates":return r("templates",1);case"customers":return r("templates/customers",1);case"config":return r("config",5);case"locales":return r("locales",6);case"assets":return r("assets",12)}};async function uu(e){W();let t=ou(l.dirs.output),s=Mn.sync(`${l.dirs.output}/**`).sort(),r=os(l.sync),n=fe(e);return await Je(async i=>{let o=t(i),a=await fsExtra.readFile(i);if(D.write(o.key),!n)return r.assets("put",o,a.toString());let u=e.apply({...o},a.toString());return q(u)||u===!1?r.assets("put",o,a.toString()):P(u)?r.assets("put",o,u):he(u)?r.assets("put",o,u.toString()):r.assets("put",o,a.toString())},s),O.onIdle().then(()=>D.write("Completed Upload"))}async function au(e){W();let t=fe(e);for(let s of l.sync.stores){let r=l.sync.themes[s.domain],{assets:n}=await Bn(r.url,s.client);for(let{key:i}of n)try{let o=v({},s.client,{params:{"asset[key]":i}}),{asset:a}=await Bn(r.url,o),u=path.join(l.dirs.import,s.domain,r.target,i),c=m("attachment",a)?Buffer.from(a.attachment,"base64"):Buffer.from(a.value||null,"utf8");if(t){let f=e.apply({asset:a,output:u},c);q(f)||f===!1?await fsExtra.writeFile(u,c):P(f)||he(f)?await fsExtra.writeFile(u,f):await fsExtra.writeFile(u,c);}else await fsExtra.writeFile(u,c);}catch(o){D.error(o);}}}var Jl=e=>async t=>(e.type!==15&&await fsExtra.writeFile(e.output,t).catch(R.write("Error writing asset to output",{file:e.relative,source:e.relative})),t);async function fs(e,t){let s=Jl(e),r=await fsExtra.readFile(e.input).catch(R.write("Error reading asset file",{file:e.relative,source:e.relative}));if(r){if(!fe(t))return s(r);let n=t.apply({...e},r);return q(n)||n===!1?s(r):X(n)?s(n):he(n)?s(n.toString()):s(r)}}var Kl=/{%-?\s*#[\s\S]+?%}/g,Xl=/{%-?\s*comment\s*-?%}[\s\S]+?{%-?\s*endcomment\s*-?%}/g,Zl=/{%-?\s*liquid[\s\S]+?%}/g,ec=/[^,:'"a-zA-Z0-9=] +[^'"a-zA-Z0-9=}{]/g;function ps(e){return V.liquid.removeComments?e.replace(Xl,E).replace(Kl,E):e}function tc(e){return e.replace(Zl,t=>`
83
- `+t.replace(/#.*?$/gm,E)+`
84
- `)}function rc(e,t){if(!V.liquid.minifySchema)return ps(t);let s=t.search(/{%-?\s*schema/);if(s>-1){let r=t.indexOf("%}",s+2)+2,n=t.slice(r),i=r+n.search(/{%-?\s*endschema/);if(i>-1){let o=JSON.parse(t.slice(r,i)),a=JSON.stringify(o,null,0),u=t.slice(0,r)+a+t.slice(i);return ps(u)}D.invalid(e.relative);}return ps(t)}function sc(e){return V.liquid.stripDashes,e}async function nc(e,t){try{return await htmlMinifierTerser.minify(t,V.html)}catch(s){return D.invalid(e.relative),console.error(s),null}}var ic=e=>async t=>{if(!l.mode.minify)return await fsExtra.writeFile(e.output,t),D.transform(`${e.namespace} \u2192 ${Pe(e.size)}`),t;let s;if(e.base.endsWith(".js.liquid"))s=t.replace(ec,E).replace(/(?<=[:,]) +(?=['"{[])/g,E).replace(/{{%/g,"{ {%").replace(/%}}/g,"%} }").replace(/(?<=[%}]})\s+(?=[\]}])/g," ").replace(/>\s+(?=[{[])/,">").replace(/(?<=[}\]])\s<\//g,"</");else if(e.base.endsWith(".json.liquid"))s=JSON.stringify(JSON.parse(t),null,0);else {let n=e.type===4?rc(e,t):ps(t),i=await nc(e,n);s=tc(i);}if(D.process("HTML Terser",jr()),M(s))return await fsExtra.writeFile(e.output,t),t;let r=sc(s).replace(/^\s+/gm,E);if(await fsExtra.writeFile(e.output,r),!l.mode.build){let n=Be(t,e.size);n.isSmaller?D.transform(`${e.namespace} ${n.before} \u2192 gzip ${n.gzip}`):D.minified("Liquid",n.before,n.after,n.saved);}return r};async function xt(e,t){l.mode.watch&&W();let s=await fsExtra.readFile(e.input);e.size=xe(s);let r=ic(e),n=s.toString();if(!X("Function",t))return r(n);let i=t.apply({...e},n);return X("Undefined",i)||i===!1?r(n):X("String",i)?r(i):Buffer.isBuffer(i)?r(i.toString()):r(n)}function jn(e){try{return JSON.parse(e)}catch(t){return console.log(t),null}}function ac(e,t=0){try{return JSON.stringify(e,null,t)}catch(s){return console.log(s),null}}async function Ot(e,t,s=0){let r=ac(t,s);if(M(r))return l.mode.watch&&U(),t;if(!l.mode.build)if(s===0){let n=Be(r,e.size);D.minified("JSON",n.before,n.after,n.saved);}else D.transform(`${e.namespace} \u2192 ${Pe(e.size)}`);return e.type===13||fsExtra.writeFile(e.output,r).catch(R.write("Error writing JSON",{file:e.relative})),r}async function Ct(e,t){l.mode.watch&&W();let s=await fsExtra.readFile(e.input).catch(R.write("Error reading JSON file",{file:e.relative}));if(he(s)){let r=s.toString();if(e.size=xe(r),r.trim().length===0)return D.skipped(e,"empty file"),null;let n=jn(r);if(me(n))return D.skipped(e,"empty file"),null;let i=l.processor.json.indent;if(l.mode.minify&&(e.type===12?V.json.assets&&(i=0):e.type===6?V.json.locales&&(i=0):e.type===1?V.json.templates&&(i=0):e.type===13?V.json.metafields&&(i=0):e.type===5&&V.json.config&&(i=0)),!fe(t))return Ot(e,n,i);let o=t.apply({...e},n);return q(o)?Ot(e,n,i):b(o)||j(o)?Ot(e,o,i):P(o)?Ot(e,jn(o),i):he(o)?Ot(e,jn(o.toString()),i):Ot(e,n,i)}}async function pr(e,t){let s=await fsExtra.readFile(e.input);if(me(s.toString()))return l.mode.watch&&D.skipped(e,"empty file"),null;let{data:r,content:n}=pc(s);m("title",r)||(r.title=""),m("html",r)&&(l.page.export.html=r.html),m("linkify",r)&&(l.page.export.linkify=r.linkify),m("breaks",r)&&(l.page.export.breaks=r.breaks);let i=Dc(l.page.export).render(n);return fsExtra.writeFile(path.join(pe.pages.uri,e.base),i).catch(R.write("Error writing Page reference",{file:e.relative})),l.mode.build?i:{title:r.title,body_html:i}}var Ds=new Set,ms={},It=null,qn=async e=>{if(j(e))m(e.uuid,ms)&&await ms[e.uuid].dispose(),l.minify.script===!0&&v(e.esbuild,V.script,{sourcemap:!1}),ms[e.uuid]=await It.context(e.esbuild);else return It=zs("esbuild"),M(It)?(It=null,!1):!0};function ds(e){let{compilerOptions:t}=L.esbuild.tsconfig;if(!m("paths",t))return;let s=we(t.paths),r=new RegExp(`^(${s.join("|")})`);return {name:"syncify-paths",setup(n){n.onResolve({filter:r},function(i){let o=s.find(c=>new RegExp(`^${c}`).test(i.path)),[a]=o.split("*"),u=i.path.replace(a,E);u===i.path&&(u=E);for(let c of t.paths[o]){let f=path.normalize(path.resolve(l.cwd,c).replace("*",u));if(!f.endsWith("*"))return Ds.has(i.path)||(L.esbuild.loaded?Pr.emit("script:watch",i.path):e.watch.push(f)),{path:f};let[d]=Mn.sync(`${f}.*`);if(!d){let[h]=Mn.sync(`${f}/index.*`);d=h;}if(d)return {path:d}}return {path:i.path}});}}}function Dr(e){let t=new Set;return {name:"syncify-watch",setup(s){s.onResolve({filter:/.*/},r=>{if(!/node_modules/.test(r.importer)&&/^[./]/.test(r.path)){if(t.has(r.resolveDir))return;if(r.importer!==E){t.add(r.resolveDir);let n=Mn.sync(path.join(r.resolveDir,"*"),{cwd:l.cwd});for(let i of n)!Ds.has(i)&&!i.endsWith(".liquid")&&(Ds.add(i),L.esbuild.loaded===!1?e.watch.push(i):Pr.emit("script:watch",i));}else Ds.has(r.path)||(L.esbuild.loaded?Pr.emit("script:watch",r.path):e.watch.push(r.path));}});}}}var gc=e=>"<script>"+e+"<\/script>";async function yc(e,t,s,r){let n=t.config,i=n.esbuild;for(let{text:o,path:a}of e)if(/\.map$/.test(a)){let u=path.join(pe.script.uri,t.base);fsExtra.writeFile(u,o).catch(R.write("Error writing JavaScript Source Map to cache",{file:path.relative(l.cwd,u),source:t.relative}));}else {l.mode.watch&&D.process(x("ESBuild"),U()),D.transform(`${x(i.format.toUpperCase())} bundle \u2192 ${x(Pe(xe(o)))}`);let u;if(n.snippet){if(u=gc(o),X("Function",r)){let c=r.apply({...t},u);if(c===!1){D.external("cancelled");continue}else X("String",c)?(D.external("augment"),u=c):Buffer.isBuffer(c)&&(D.external("augment"),u=c.toString());}await fsExtra.writeFile(t.output,u).catch(R.write("Error writing inline <script> snippet",{file:t.relative})),D.transform(`exported as ${x("snippet")}`),l.mode.build||(l.mode.hot?s("put",t,u):await s("put",t,u));}else {if(u=o,X("Function",r)){let c=r.apply({...t},o);if(c===!1){D.external("cancelled");continue}else X("String",c)?(D.external("augment"),u=c):Buffer.isBuffer(c)&&(D.external("augment"),u=c.toString());}await fsExtra.writeFile(t.output,o).catch(R.write("Error writing JavaScript asset",{file:t.relative})),l.mode.build||(l.mode.hot?s("put",t,o):await s("put",t,o));}}}async function hs(e,t,s){l.mode.watch&&W();try{let r=await ms[e.config.uuid].rebuild();await yc(r.outputFiles,e,t,s),l.mode.hot&&(D.syncing(e.key),this.script(e.key));}catch(r){if(D.invalid(e.relative),m("errors",r))for(let n of r.errors)r.esbuild(n);return null}}var gs=null,Ln=null;async function Gn(e){if(e==="postcss")return gs=(await import('postcss')).default,M(gs)===!1;if(e==="sass")return Ln=(await import('sass')).default,M(Ln)===!1}function Cc(e,t){let s=fe(t)?{...e}:!1;return async function(r){if(M(r))return null;let n;if(s!==!1){let o=t.apply({...e},Buffer.from(r));q(o)||o===!1?n=r:(P(o)||he(o))&&(n=o);}else n=r;fsExtra.writeFile(e.output,n).catch(R.write("Error writing stylesheet to output",{input:e.relative,output:path.relative(l.cwd,e.output)}));let i=Be(r,e.size);return i.isSmaller?D.transform(`${x("CSS")} ${i.before} \u2192 gzip ${i.gzip}`):D.minified("CSS",i.before,i.after,i.saved),n}}async function Ec(e){let{config:t}=e,s=t.sass===!0?L.sass.config:t.sass;if(e.ext===".scss"||e.ext===".sass"){l.mode.watch&&W();try{let{css:r,sourceMap:n}=Ln.compile(t.input,{loadPaths:s.include,sourceMapIncludeSources:!1,sourceMap:s.sourcemap,style:s.style,logger:{debug:i=>console.log("DEBUG",i),warn:cr.sass(e)}});if(s.sourcemap){let i=path.join(pe.style.uri,e.base+".map");fsExtra.writeFile(i,JSON.stringify(n)).catch(R.write("Error writing SASS Source Map file to the cache directory",{file:path.relative(l.cwd,i),source:e.relative}));}return l.mode.watch&&D.process(`${x("SASS Dart")}`,U()),e.size=xe(r),{css:r,map:n}}catch(r){return D.invalid(e.relative),R.sass(e,r),null}}try{let r=await fsExtra.readFile(e.input);return e.size=xe(r),{css:r.toString(),map:null}}catch(r){return D.invalid(e.relative),D.throws(r),null}}async function wc(e,t,s){let{config:r}=e;try{l.mode.watch&&W();let n=await gs(L.postcss.config).process(t,{from:r.rename,to:r.rename,map:s?{prev:s,inline:!1}:null});l.mode.watch&&D.process(`${x("PostCSS")}`,U());let i=n.warnings();if(i.length>0)for(let o of i)cr.postcss(e,o);return n.toString()}catch(n){return D.invalid(e.relative),console.log(n),null}}function cu(e){return `<style type="text/css">${y+Me(2)+e}</style>`}async function ys(e,t){l.mode.watch&&W();let s=Cc(e,t);try{let r=await Ec(e);if(r===null)return null;if(M(gs)||!e.config.postcss&&!e.config.snippet)return s(r.css);if(e.config.postcss){let n=await wc(e,r.css,r.map);if(n===null)return null;if(e.config.snippet)return s(cu(n))}return e.config.snippet?s(cu(r.css)):s(r.css)}catch(r){return console.log(r),null}}async function Du(e){W();let t=ls(l.paths,l.dirs.output),s=Vu(Ye(l.watch.values())),n=(await Mn("**",{onlyFiles:!0,absolute:!0,cwd:l.dirs.input})).filter(s).reduce((o,a)=>{let u=t(a);if(q(u))return o;switch(u.type){case 7:o.styles.files.push(u);break;case 8:o.scripts.files.push(u);break;case 4:o.sections.files.push(u);break;case 2:o.layouts.files.push(u);break;case 3:o.snippets.files.push(u);break;case 6:o.locales.files.push(u);break;case 5:o.configs.files.push(u);break;case 1:o.templates.files.push(u);break;case 14:o.pages.files.push(u);break;case 12:o.assets.files.push(u);break;case 13:o.metafields.files.push(u);break;case 9:o.svgs.files.push(u);break}return o},{styles:{time:E,files:[],report:null},scripts:{time:E,files:[],report:null},svgs:{time:E,files:[],report:null},sections:{time:E,files:[],report:null},layouts:{time:E,files:[],report:null},templates:{time:E,files:[],report:null},snippets:{time:E,files:[],report:null},locales:{time:E,files:[],report:null},configs:{time:E,files:[],report:null},pages:{time:E,files:[],report:null},metafields:{time:E,files:[],report:null},assets:{time:E,files:[],report:null}}),i=o=>async a=>{W();try{let u=await(a.ext===".json"?Ct(a,e):o(a,e));if(u===null||isNaN(a.size))return {name:a.base,time:U(),output:a.key,error:"Skipped File"};let{before:c,after:f,saved:d,gzip:h}=Be(u,a.size);return {name:a.base,time:U(),output:Ee(a.output),error:null,size:{before:c,after:f,saved:d,gzip:h}}}catch(u){return {name:a.base,time:U(),output:Ee(a.output),error:u.message}}};for(let o in n)D.write(x(`${ft+g.gray}${n[o].files.length} ${Or(o)}`)),W(),o==="styles"?(n[o].report=await He(i(ys),n[o].files),n[o].time=U(),D.build(o,n[o])):o==="scripts"?(n[o].report=await He(i(hs),n[o].files),n[o].time=U(),D.build(o,n[o])):o==="layouts"||o==="snippets"||o==="sections"||o==="templates"?(n[o].report=await He(i(xt),n[o].files),n[o].time=U(),D.build(o,n[o])):o==="locales"||o==="configs"||o==="metafields"?(n[o].report=await He(i(Ct),n[o].files),n[o].time=U(),D.build(o,n[o])):o==="pages"?(n[o].report=await He(i(pr),n[o].files),n[o].time=U(),D.build(o,n[o])):o==="assets"?(n[o].report=await He(i(fs),n[o].files),n[o].time=U(),D.build(o,n[o])):o==="svgs"&&(n[o].report=await He(i(pr),n[o].files),n[o].time=U(),D.build(o,n[o]));D.update(`${g.gray}Build Completed ${p(`~ ${U()}`)}`),process.exit(0);}var Fs=new RegExp(`{%-?\\s*render\\s+['"]${wi}['"][,\\slablsockvetr:0-9'"]+?-?%}\\s+`);async function du(){let e=`snippets/${tr}`,[t]=l.sync.themes,s=await fsExtra.readFile(l.hot.snippet),r=await Sn(s.toString(),{theme:t,key:e});return D.update(ae.message("gray",`${e} uploaded snippet injection`)),r}function hu(e){if(!Fs.test(e))return gu(e)}function $c(e){let t=e.search(Fs);if(t>-1){let s=e.slice(0,t),r=e.slice(e.indexOf("%}")+2);return s+r}return e}function gu(e){let t=e.indexOf("<head>")+6;return e.slice(0,t)+y+l.hot.renderer+y+e.slice(t)}async function yu(e){if(!await fsExtra.pathExists(e))return null;let r=(await fsExtra.readFile(e)).toString();Fs.test(r)||(r=gu(r),await fsExtra.writeFile(e,r),D.update(ae.message("gray","injected render tag in output layout")));let[n]=l.sync.themes,i=path.basename(e),o=`layout/${i}`,a=await Wo(`layout/${i}`,n);return Fs.test(a)&&(r=$c(r)),await Sn(r,{theme:n,key:o})?(D.update(ae.message("gray","uploaded and inject render tag")),!0):!1}var Wn=null,Un=null;async function Vn(e){if(e==="svg-sprite")return Un=(await import('svg-sprite')).default,M(Un)===!1;if(e==="svgo")return Wn=(await import('svgo')).default,M(Wn)===!1}async function _c(e){let t=await fsExtra.readFile(e);return [e,t.toString(),xe(t)]}function kc(e){return new Promise(function(t,s){e.compile((r,n)=>{if(r)return s(r);for(let i in n)for(let o in n[i])t(n[i][o].contents.toString());});})}function Rc(e,t,s){async function r(n){let i=v({},e);l.mode.watch&&W(),i.kind="SVG Sprite",n.snippet?(i.namespace="snippets",i.key=path.join("snippets",fr(i,n.rename)),i.output=path.join(l.dirs.output,i.key)):(i.key=path.join("assets",fr(i,n.rename)),i.output=path.join(l.dirs.output,i.key));let o=n.sprite===!0?L.sprite.config:n.sprite,a=new Un(o),u=await Je(_c,Ye(n.input)).catch(R.write("Error reading an SVG file",{file:i.base,source:i.relative}));if(u){i.size=0;for(let[d,h,w]of u)a.add(d,null,h),i.size=i.size+w;let c=await kc(a);D.process(`${x("SVG Sprite")} ${pt}${u.length} ${Ge("SVG",u.length)}`,U()),await fsExtra.writeFile(i.output,c).catch(R.write("Error writing SVG Sprite",{file:i.key,caller:e.relative}));let f=Be(c,i.size);f.isSmaller?D.transform(`${i.kind} ${f.before} \u2192 gzip ${f.gzip}`):D.minified(i.kind,f.before,f.after,f.saved),D.syncing(i.key),await t("put",i,c);}}return r}function Pc(e,t,s){let r=v({},e);async function n(i){l.mode.watch&&W(),i.snippet?(r.namespace="snippets",r.key=path.join("snippets",fr(r,i.rename)),r.output=path.join(l.dirs.output,r.key)):(r.key=path.join("assets",fr(r,i.rename)),r.output=path.join(l.dirs.output,r.key));let o=i.svgo===!0?L.svgo:i.svgo,a=await fsExtra.readFile(r.input);r.size=xe(a);let u;try{u=Wn.optimize(a.toString(),o);}catch(f){return D.err(f.toString()),null}l.mode.watch&&D.process(x("SVGO"),U());let{data:c}=u;if(!l.mode.build){let f=Be(c,r.size);f.isSmaller?D.transform(`${r.kind} ${f.before} \u2192 gzip ${f.gzip}`):D.minified(r.kind,f.before,f.after,f.saved);}await fsExtra.writeFile(r.output,c).catch(R.write("Error writing SVG",{file:r.key,caller:e.relative})),D.syncing(r.key),await t("put",r,c);}return n}async function Cu(e,t,s){l.mode.watch&&W();let r=Rc(e,t),n=Pc(e,t),i=e.config.length;for(let o=0;o<i;o++){let a=e.config[o];o>0&&D.changed(e),a.format==="sprite"&&await r(a),a.format==="file"&&await n(a);}}var Eu=!1,wu=!1,zn=new Set;function xs(e,t){Eu||(Eu=!0,zn.forEach(s=>s()),e&&process.exit(128+t));}function Cs(e){return zn.add(e),wu||(wu=!0,process.once("exit",xs),process.once("SIGINT",xs.bind(void 0,!0,2)),process.once("SIGTERM",xs.bind(void 0,!0,15)),process.on("message",t=>{t==="shutdown"&&xs(!0,-128);})),()=>zn.delete(e)}async function Gc(){if(D.update(ae.message("gray","validating snippet injection")),await du()){D.update(ae.message("gray","validating layouts"));for(let t in l.hot.alive){if(!await fsExtra.pathExists(t)){D.update(ae.message("gray","layout has not yet been bundled, building now..."));let n=b(l.config.paths.layout)?l.config.paths.layout:[l.config.paths.layout];for(let i of n){let o=path.join(l.dirs.input,i),a=await fsExtra.readFile(o);await fsExtra.writeFile(t,a);}D.update(ae.message("gray","layout was bundled from source, injecting hot snippet"));}await yu(t)||(D.update.clear(),D.err("Failed to inject hot reload render tag"));}D.update.clear();}else D.update.clear(),D.err("Failed to upload snippet");}async function bu(){D.out(ae.message("whiteBright",x(`${l.hot.method==="hot"?"HOT":"LIVE"} Reloading:`))),D.nwl(),D.update(ae.message("gray","configuring HOT Reload")),await Gc();function e(n){n.setHeader("Access-Control-Allow-Origin","*"),n.setHeader("Cache-Control","public, max-age=0");}let t=Ic(path.join(l.dirs.output,"assets"),{setHeaders:e}),s=Nc.createServer((n,i)=>t(n,i,jc(n,i))),r=`http://localhost:${l.hot.server}`;s.listen(l.hot.server),D.out(ae.message("pink",`server \u2192 ${x("assets")} \u2192 ${p.underline(r)}`));}function vu(){if(l.mode.hot===!1)return;let e=new ws$1.Server({port:l.hot.socket,path:"/ws"});return Cs(()=>e.removeAllListeners()),e.on("connection",t=>{e.on("script",s=>t.send(`script,${s}`)),e.on("stylesheet",s=>t.send(`stylesheet,${s}`)),e.on("section",s=>t.send(`section,${s}`)),e.on("svg",s=>t.send(`svg,${s}`)),e.on("assets",()=>t.send("assets")),e.on("reload",()=>t.send("reload")),e.on("replace",()=>t.send("replace"));}),{script:t=>e.emit("script",path.basename(t)),stylesheet:t=>e.emit("stylesheet",path.basename(t)),section:t=>e.emit("section",t),svg:t=>e.emit("svg",t),assets:()=>e.emit("assets"),reload:()=>e.emit("reload"),replace:()=>e.emit("replace")}}function Au(e){let t=vu(),s=os(l.sync),r=ls(l.paths,l.dirs.output);Wc.watch(Ye(l.watch.values()),{persistent:!0,ignoreInitial:!0,usePolling:!0,interval:75,binaryInterval:100,ignored:["**/*.map"]}).on("all",function(o,a){let u=r(a);if(!q(u)){if(u.type!==15&&D.changed(u),o==="change"||o==="add")i(u);else if(o==="unlink")return s.assets("delete",u)}});async function i(o){try{let a=null;if(o.type===8)return hs.apply(t,[o,s.assets,e]);if(o.type===14)return pr(o,e);if(o.type===9)return Cu(o,s.assets,e);if(o.type===7)a=await ys(o,e),l.mode.hot&&t.stylesheet(o.key);else if(o.type===4)a=await xt(o,e);else if(o.type===2)a=await xt(o,e),l.mode.hot&&(a=hu(a));else if(o.type===3)a=await xt(o,e);else if(o.type===6||o.type===5)a=await Ct(o,e);else {if(o.type===13)return a=await Ct(o,e),s.metafields({value:a,namespace:o.namespace,key:o.key});o.type===1&&o.kind==="JSON"?a=await Ct(o,e):o.type===1&&o.kind==="Liquid"?a=await xt(o,e):(o.type===12||o.type===15)&&(a=await fs(o,e));}M(a)||(D.syncing(o.key),await s.assets("put",o,a),l.mode.hot&&(o.type===4?t.section(o.name):o.type!==8&&o.type!==7&&await O.onIdle().then(()=>t.replace())));}catch(a){D.err(a);}}}function $u(e){let t=e.toString().trim().toLowerCase();if(t!=="s"){if(t==="w"){for(let s in re.process)if(re.process[s].size!==0){D.nwl(),D.nwl();for(let r of re.process[s].values())typeof r=="string"&&r.length>0;re.process[s].clear();}re.count=0;}}}`
85
- ${p("-----------------------------------------------------------------------------")}
86
- ${x("Syncify CLI Examples")} ${p("by Panoply")}
87
- ${p("-----------------------------------------------------------------------------")}
88
-
89
- ${x("Watching"+S)}
90
-
91
- ${p("Targeting 1 store and 1 theme")}:
92
- $ sync your-store${p("=")}theme-1 --watch
93
-
94
- ${p("Targeting 1 store and 2 themes with hot reloading")}:
95
- $ sync your-store${p("=")}theme-1,theme-2 --watch --hot
96
-
97
- ${p("Targeting 2 stores and 1 theme")}:
98
- $ sync --your-store${p("=")}theme-1 --another-store${p("=")}some-theme --watch
99
-
100
- ${p("Targeting 2 stores and 2 themes")}:
101
- $ sync --your-store${p("=")}theme-1,theme-2 --another-store${p("=")}some-theme,test-theme --watch
102
-
103
- ${p("Targeting 1 store with 2 themes and clean mode with hot live reloads")}:
104
- $ sync your-store${p("=")}theme-1,theme-2 --watch --clean --hot
105
-
106
- ${p("Targeting 1 store with 2 themes in production mode")}:
107
- $ sync your-store${p("=")}theme-1,theme-2 --prod --watch
108
-
109
- `;var Tu=`
110
- ${p("-----------------------------------------------------------------------------")}
111
- ${x("Syncify")} <!version!> ${p("by Panoply")}
112
- ${p("-----------------------------------------------------------------------------")}
66
+ `).map(r=>Rl(r,t,s)).join(`
67
+ `)}var q={};ar(q,{clear:()=>rt,closer:()=>Gt,context:()=>je,hline:()=>Un,indent:()=>gt,message:()=>Hn,multiline:()=>Jn,opener:()=>qt,sample:()=>vt,shopify:()=>xs,stack:()=>Zo,suffix:()=>J,tree:()=>Vn});var L={};ar(L,{ARL:()=>hs,ARR:()=>Ue,BAD:()=>nc,CHK:()=>sc,CHV:()=>Gn,COL:()=>_,DSH:()=>dt,LCB:()=>Wn,LPR:()=>oc,RCB:()=>zn,RPR:()=>uc,TLD:()=>ic,blue:()=>E,blueBright:()=>Pn,bold:()=>F,bottom:()=>Ln,clear:()=>zl,close:()=>Mn,cyan:()=>O,cyanBright:()=>Vl,dash:()=>jn,dim:()=>Xl,error:()=>ac,gray:()=>D,green:()=>Hl,greenBright:()=>Jl,hr:()=>qn,italic:()=>Ql,lavender:()=>ec,lightGray:()=>tt,line:()=>y,magenta:()=>gs,magentaBright:()=>Yl,neonCyan:()=>$r,neonGreen:()=>Ko,neonMagenta:()=>rc,neonRouge:()=>tc,newline:()=>mt,open:()=>Ar,orange:()=>Zl,pink:()=>Br,purge:()=>Ul,red:()=>$,redBright:()=>ue,reset:()=>vr,strike:()=>Kl,time:()=>Mt,top:()=>Nn,underline:()=>In,warning:()=>ys,white:()=>C,whiteBright:()=>et,yellow:()=>ds,yellowBright:()=>se});var ze=Ot(Yo());function ms(e,t,s){return child_process.execFileSync(e,t,{encoding:"utf8",shell:s,stdio:["ignore","pipe","ignore"]}).trim()}function Qo(e,t){let s=path.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('out.js', document.baseURI).href))));return ms(path.join(s,e),[],t).split(/\r?\n/)}var Dt=(e,t)=>({columns:Number.parseInt(e,10),rows:Number.parseInt(t,10)});function St(){let{env:e,stdout:t,stderr:s}=Ds__default.default;if(t&&t.columns&&t.rows)return Dt(t.columns,t.rows);if(s&&s.columns&&s.rows)return Dt(s.columns,s.rows);if(e.COLUMNS&&e.LINES)return Dt(e.COLUMNS,e.LINES);if(Ds__default.default.platform==="win32")try{let r=Qo("vendor/windows/term-size.exe",!1);if(r.length===2)return Dt(r[0],r[1])}catch{}else {if(Ds__default.default.platform==="darwin")try{let r=Qo("vendor/macos/term-size",!0);if(r.length===2)return Dt(r[0],r[1])}catch{}try{let r=ms("resize",["-u"]).match(/\d+/g);if(r.length===2)return Dt(r[0],r[1])}catch{}if(Ds__default.default.env.TERM)try{let r=ms("tput",["cols"]),n=ms("tput",["lines"]);if(r&&n)return Dt(r,n)}catch{}}return Dt(80,24)}var zl="\x1B[H\x1B[2J",Ul="\x1B[2J\x1B[3J\x1B[H\x1Bc",{cyan:O,cyanBright:Vl,red:$,redBright:ue,green:Hl,greenBright:Jl,yellow:ds,yellowBright:se,magenta:gs,magentaBright:Yl,blue:E,blueBright:Pn,white:C,whiteBright:et,gray:D,underline:In,bold:F,reset:vr,italic:Ql,strike:Kl,dim:Xl}=ze.default,tt=ze.default.hex("#2a2a2e"),Br=ze.default.hex("#ff75d1"),Zl=ze.default.hex("#FFAB40"),ec=ze.default.hex("#8080FF"),Ko=ze.default.hex("#56ef83"),$r=ze.default.hex("#69d5fd"),tc=ze.default.hex("#FF8095"),rc=ze.default.hex("#B319FF"),Ar=tt("\u250C\u2500 "),y={gray:tt("\u2502 "),red:$.dim("\u2502 "),yellow:ds.dim("\u2502 ")},mt=tt(`${x}\u2502${x}`),jn=tt("\u2502 \u251C\u2500 "),Nn=tt("\u251C\u2500 "),Ln=tt("\u2502 \u2514\u2500 "),Mn=tt("\u2514\u2500 "),qn=e=>tt(`\u2502${x}\u251C${"\u2500".repeat(St().columns-e)}${x}\u2502`),sc=Ko("\u2713 "),nc=ue("\u{10102}"),_=D(":"),Ue=D("\u2192"),Gn=D("\u2023"),hs=D("\u2942"),ic=D("~"),dt=D("\u2014"),oc=D("("),uc=D(")"),Wn=D("{"),zn=D("}"),ys=se(` ~ Type ${F("w")} and press ${F("enter")} to view`),ac=ue(` ~ Type ${F("v")} and press ${F("enter")} to view`),Mt=e=>e?vr.gray(` ~ ${e}`):S;var Zo=S;function rt(){let e=process.stdout.rows-2,t=e>0?A(e):S;B(t),Xo__default.default.cursorTo(process.stdout,0,0),Xo__default.default.clearScreenDown(process.stdout);}function Un(e=15){B(qn(e));}function J(e,t,s){return (u.mode.build?jn:t==="invalid"||t==="failed"?y.red:t==="warning"?y.yellow:y.gray)+L[e](t)+Re(10-t.length)+Ue+ye+L[e](s)}function qt(e){return x+Ar+D(`${e} ~ ${br()}`)}function Vn(e,t){return e==="top"?Nn+t:Ln+t}function Gt(e){return y.gray+x+Mn+D(`${e} ~ ${br()}`)}function Hn(e,t){return y.gray+L[e](t)}function xs(e){if(v(e))return ke(e.map(xs));let t=e;return t=t.replace(Do,D("$1")+C("$2")+D("$3")+C("$4")+A(2)),t=t.replace(mo,se.bold("$1")),t=t.replace(go,O("$1")+et("$2")+O("$3")),t=t.replace(ho,In("$1")),t=t.replace(yo,gs("$1")+O("$2")+gs("$3")),gt($(pt(t,St().columns-15)),{line:y.red})}function vt(e,t={}){let s=f("line",t)?t.line:y.gray;if(ot("span.start",t)){let r=f("end",t.span)?t.span.end:t.span.start+1;return s+x+ke([`${s}${E(`${t.span.start-1}`)}${_+x}${s}${E(`${t.span.start}`)}${_} ${e+x}${s}${E(`${r}`)}${_+x}`])}return s+x+s+e}function gt(e,t={}){let s=v(e)?e:e.split(x).filter(Boolean),r=f("line",t)?t.line:y.gray,n=f("nwl",t)?`${r+x}`:S;for(;s.length!==0;){let i=s.shift();i.trim().length>0?i.trim().startsWith(r)?n+=(f("text",t)?t.text(i):i)+x:n+=r+(f("text",t)?t.text(i.trimStart()):i.trimStart())+x:n+=r+x;}return n}function je(e){let t=0,s=y.red+x;for(let r in e.entries)t<r.length&&e.entries[r]&&(t=r.length);for(let r in e.entries)e.entries[r]&&(s+=ke([y.red,$(r),_+ye,Re(t-r.length),D(`${e.entries[r]}`)+x]));return e.stack&&(Zo=e.stack,s+=ke([y.red,$("stack"),_+ye,Re(t-5),D(`Type ${F("s")} and press ${F("enter")} to view stack trace`),x+y.gray])),s.trimEnd()}function Jn(e,t){let s=y.gray,r=C;e==="error"?(s=y.red,r=$):e==="warning"&&(s=y.yellow,r=se);let n=[],i=t.trim(),o=pt(i,St().columns-15).split(x);for(;o.length!==0;){let a=o.shift();a.trim().length>0&&n.push(s+r(a));}return s+x+n.join(x)}var Wt={};function Yn(e){let t=[],s=[y.red],r=e.search(/(?:\n {4}at .*)/),n=process.stdout.columns-5,i=[];if(/\berror\b:?/i.test(e)&&r>0){i=e.slice(0,r).split(x);let o=Sn(e.slice(r),{pretty:!0,basePath:u.cwd}),a=pt(o,n).split(x);for(s.push(x);a.length!==0;){let l=a.shift();l.trim().length>0&&s.push(vr(y.red+l));}}for(i.length===0&&(i=e.split(x));i.length!==0;){let o=i.shift();o.trim().length>0&&t.push(vr(y.gray)+o);}Q(`${t.join(x)}${s.length>1?s.join(x):S}`);}function lc(e,t,s=!0){let r=ot("error.asset",t.data)?t.data.error.asset:ot("errors.asset",t.data)?t.data.errors.asset:null;if(t.status===422){let n=ke([y.red,x,xs(r),je({stack:!1,entries:{details:"File did not sync because Shopify rejected the request",status:t.status,message:t.statusText,source:`${e}`}})]);return s?Q(n):n}else if(t.status in yn){let n=ke([y.red,x,Jn("error",yn[t.status])+je({stack:!1,entries:{status:t.status,message:t.statusText,source:`${e}`}})]);return s?Q(n):n}else {let n=ke([y.red,x,$("Unknown error has occured")+je({stack:!1,entries:{status:t.status,message:t.statusText,source:`${e}`}})]);return s?Q(n):n}}var cc=(e,t)=>s=>{Q(gt(s.message,{nwl:!0,line:y.red,text:$.bold})+je({stack:s.stack,entries:{...t,code:s.code,name:s.name,details:e}}));};function pc(e,t){Q(gt(t.message,{nwl:!0,line:y.red,text:$})+je({stack:t.sassStack,entries:{input:e.relative,message:t.sassMessage}}));}function fc(e){Q(gt(e.text,{nwl:!0,line:y.red,text:$})+vt(e.location.lineText,{line:y.red,span:{start:e.location.line,end:e.location.line+1}})+je({stack:!1,entries:{file:e.location.file,line:e.location.line,column:e.location.column,plugin:e.pluginName}}));}function Dc(e){}var V="\x1B[",Tr="\x1B]",zt="\x07",Fs=";",eu=process.env.TERM_PROGRAM==="Apple_Terminal",M={};M.cursorTo=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof t!="number"?V+(e+1)+"G":V+(t+1)+";"+(e+1)+"H"};M.cursorMove=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let s="";return e<0?s+=V+-e+"D":e>0&&(s+=V+e+"C"),t<0?s+=V+-t+"A":t>0&&(s+=V+t+"B"),s};M.cursorUp=(e=1)=>V+e+"A";M.cursorDown=(e=1)=>V+e+"B";M.cursorForward=(e=1)=>V+e+"C";M.cursorBackward=(e=1)=>V+e+"D";M.cursorLeft=V+"G";M.cursorSavePosition=eu?"\x1B7":V+"s";M.cursorRestorePosition=eu?"\x1B8":V+"u";M.cursorGetPosition=V+"6n";M.cursorNextLine=V+"E";M.cursorPrevLine=V+"F";M.cursorHide=V+"?25l";M.cursorShow=V+"?25h";M.eraseLines=e=>{let t="";for(let s=0;s<e;s++)t+=M.eraseLine+(s<e-1?M.cursorUp():"");return e&&(t+=M.cursorLeft),t};M.eraseEndLine=V+"K";M.eraseStartLine=V+"1K";M.eraseLine=V+"2K";M.eraseDown=V+"J";M.eraseUp=V+"1J";M.eraseScreen=V+"2J";M.scrollUp=V+"S";M.scrollDown=V+"T";M.clearScreen="\x1Bc";M.clearTerminal=process.platform==="win32"?`${M.eraseScreen}${V}0f`:`${M.eraseScreen}${V}3J${V}H`;M.beep=zt;M.link=(e,t)=>[Tr,"8",Fs,Fs,t,zt,e,Tr,"8",Fs,Fs,zt].join("");M.image=(e,t={})=>{let s=`${Tr}1337;File=inline=1`;return t.width&&(s+=`;width=${t.width}`),t.height&&(s+=`;height=${t.height}`),t.preserveAspectRatio===!1&&(s+=";preserveAspectRatio=0"),s+":"+e.toString("base64")+zt};M.iTerm={setCwd:(e=process.cwd())=>`${Tr}50;CurrentDir=${e}${zt}`,annotation:(e,t={})=>{let s=`${Tr}1337;`,r=typeof t.x<"u",n=typeof t.y<"u";if((r||n)&&!(r&&n&&typeof t.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),s+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",t.length>0?s+=(r?[e,t.length,t.x,t.y]:[t.length,e]).join("|"):s+=e,s+zt}};var Qn=M;var pu=Ot(nu(),1),fu=Ot(cu(),1);var gc=(0, pu.default)(()=>{(0, fu.default)(()=>{Ds__default.default.stderr.write("\x1B[?25h");},{alwaysLast:!0});}),Du=gc;var Bs=!1,Jt={};Jt.show=(e=Ds__default.default.stderr)=>{e.isTTY&&(Bs=!1,e.write("\x1B[?25h"));};Jt.hide=(e=Ds__default.default.stderr)=>{e.isTTY&&(Du(),Bs=!0,e.write("\x1B[?25l"));};Jt.toggle=(e,t)=>{e!==void 0&&(Bs=e),Bs?Jt.show(t):Jt.hide(t);};var ei=Jt;function ti(e){return Number.isInteger(e)?e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||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):!1}var hc=/^[\uD800-\uDBFF][\uDC00-\uDFFF]$/,gu=["\x1B","\x9B"],$s=e=>`${gu[0]}[${e}m`,du=(e,t,s)=>{let r=[];e=[...e];for(let n of e){let i=n;n.includes(";")&&(n=n.split(";")[0][0]+"0");let o=Sr.codes.get(Number.parseInt(n,10));if(o){let a=e.indexOf(o.toString());a===-1?r.push($s(t?o:i)):e.splice(a,1);}else if(t){r.push($s(0));break}else r.push($s(i));}if(t&&(r=r.filter((n,i)=>r.indexOf(n)===i),s!==void 0)){let n=$s(Sr.codes.get(Number.parseInt(s,10)));r=r.reduce((i,o)=>o===n?[o,...i]:[...i,o],[]);}return r.join("")};function ri(e,t,s){let r=[...e],n=[],i=typeof s=="number"?s:r.length,o=!1,a,l=0,d="";for(let[p,c]of r.entries()){let h=!1;if(gu.includes(c)){let g=/\d[^m]*/.exec(e.slice(p,p+18));a=g&&g.length>0?g[0]:void 0,l<i&&(o=!0,a!==void 0&&n.push(a));}else o&&c==="m"&&(o=!1,h=!0);if(!o&&!h&&l++,!hc.test(c)&&ti(c.codePointAt())&&(l++,typeof s!="number"&&i++),l>t&&l<=i)d+=c;else if(l===t&&!o&&a!==void 0)d=du(n);else if(l>=i){d+=du(n,!0,a);break}}return d}var yc=24,As=e=>{let{columns:t}=e;return t||80},xc=(e,t)=>{let s=e.rows||yc,r=t.split(`
68
+ `),n=r.length-s;return n<=0?t:ri(t,Et(r.slice(0,n).join(`
69
+ `)).length+1)};function yu(e,{showCursor:t=!1}={}){let s=0,r=As(e),n="",i=(...o)=>{t||ei.hide();let a=o.join(" ")+`
70
+ `;a=xc(e,a);let l=As(e);a===n&&r===l||(n=a,r=l,a=pt(a,l,{trim:!1,hard:!0,wordWrap:!1}),e.write(Qn.eraseLines(s)+a),s=a.split(`
71
+ `).length);};return i.clear=()=>{e.write(Qn.eraseLines(s)),n="",r=As(e),s=0;},i.done=()=>{n="",r=As(e),s=0,t||ei.show();},i}var Fc=yu(Ds__default.default.stdout),At=Fc;yu(Ds__default.default.stderr);var Tt={};function Ae(e){return f(e,Tt)||(Tt[e]=[]),(t,s)=>{H(s)?Tt[e].push(y.yellow+se(t)):Tt[e].push(y.yellow+se(t+_+ye+F(s)));}}function k({option:e,name:t,provided:s,expects:r}){Q(A(2),$(`${F(`Invalid ${O(e)} type value provided`)}`)+A(2),$(`The ${O(t)} option has an incorrect type value`)+A(2),$(`provided${_} ${se(De(s).toLowerCase())}`)+x,$(`expected${_} ${E(r.replace(/([|,])/g,D("$1")))}`)+A(2),$(`in${_} ${D.underline(u.file.base)}`)+A(2),C.bold("How to fix?")+x,`
72
+ ${D("You need to change the option value to use the")} ${E("expected")} ${D("type.")}
73
+ ${D(`Use the ${O("defineConfig")} named export for type checking`)}
74
+ `),process.exit(0);}function Yt({message:e,expected:t,fix:s}){let r=Ds.argv.slice(2).join(" ");t=C("syncify "+r+" ")+E(t.replace(/([|,])/g,D("$1"))),Q(A(2),$(`${F("Invalid or incomplete command passed")}`)+A(2),$(v(e)?e.join(`
75
+ `):e)+A(2),$(`provided${_} ${C("$")} ${C("syncify "+r)}`)+x,$(`expected${_} ${C("$")} ${t}`)+A(2),C.bold("How to fix?")+x,`
76
+ ${D(v(s)?s.join(`
77
+ `):s)}
78
+ `),process.exit(0);}function xu({type:e,message:t,provided:s,expected:r,fix:n}){wr.test(s)&&(s=s.replace(wr,D("$1"))),wr.test(r)&&(r=r.replace(wr,D("$1"))),v(t)&&(t=t.join(`
79
+ `)),Q(A(2),$(F(`Invalid ${O(e)} target provided`))+A(2),$(t)+A(2),$(`provided${_} ${se(r)}`)+x,$(`expected${_} ${E(s)}`)+A(2),C.bold("How to fix?")+x,`
80
+ ${D(v(n)?n.join(`
81
+ `):n)}
82
+ `),process.exit(0);}function Ne(e){P(e)?Q(A(2),$(`${F(`Missing ${O(e)} dependency`)}`)+A(2),$(`You need to install ${O(e)} to use it as a processor`)+A(2),C.bold("How to fix?")+x,`
83
+ $ ${E.bold("pnpm add "+e+" -D")}
84
+
85
+ ${D("If you are using a different package manager (i.e: Yarn or NPM) then")}
86
+ ${D("please consider adopting pnpm. Pnpm is dope and does dope shit.")}
87
+ `):Q(A(2),$(`${F(`Missing ${O(`${e.length}`)} dependencies`)}`)+A(2),$("You are attempting to use processors which are not yet installed!")+A(2),et(D("-")+ye+e.join(x+D(" -")+ye))+A(2),C.bold("How to fix?")+x,`
88
+ $ ${Pn("pnpm add "+e.join(ye)+" -D")}
89
+
90
+ ${D("If you are using a different package manager (i.e: Yarn or NPM) then")}
91
+ ${D("please consider adopting pnpm. Pnpm is dope and does dope shit.")}
92
+ `),process.exit(0);}function Fu(e,t,s,r){e.indexOf(".")>-1&&(e=e.split(".").filter(Boolean).join(D(" \u2192 "))),Q(A(2),$(`${F(`Missing ${Wn} ${O(e)} ${zn} configuration option`)}`)+A(2),$(`The ${O(t)} option needs to be defined`)+A(2),$(`expects${_} ${E(s.replace(/([|,])/g,D("$1")))}`)+A(2),$(`at${_} ${D.underline(u.file.base)}`)+A(2),C.bold("Why?")+x+x+D(v(r)?` ${r.join(`
93
+ `)}`:` ${r}`)+x+x),process.exit(0);}function ge(e,t,s,r){Q(A(2),ue.bold("ERROR (!)"),A(2),$(`${F(`Invalid ${O(e)} configuration`)}`)+A(2),$(`The ${O(t)} option has an invalid or missing value`)+A(2),$(`provided${_} ${se(s)}`)+x,$(`expected${_} ${E(r.replace(/([|,])/g,D("$1")))}`)+A(2),C.bold("How to fix?")+x,`
94
+ ${D("You need to update the option and use one of the expected values.")}
95
+ ${D(`Use the ${O("defineConfig")} named export for type checking`)}
96
+ `),process.exit(0);}function wu(e){Q(A(2),ue.bold("ERROR (!)"),A(2),$(`${F(`Missing ${O("syncify.config.js")} configuration`)}`)+A(2),$("Unable to resolve a configuration file within the workspace")+A(2),$(`at${_} ${D.underline(e)}`)+A(2),C.bold("How to fix?")+x,`
97
+ ${D("You need to add one the following files to your project")}
98
+
99
+ ${D("-")} ${C("syncify.config.ts")}
100
+ ${D("-")} ${C("syncify.config.js")}
101
+ ${D("-")} ${C("syncify.config.mjs")}
102
+ ${D("-")} ${C("syncify.config.cjs")}
103
+ ${D("-")} ${C("syncify.config.json")}
104
+
105
+ ${D("You can also provide configuration in your")} ${C("package.json")}
106
+ ${D("file using on a")} ${se('"syncify": {}')} ${D("property.")}
107
+ `),process.exit(0);}function ae(e,t){Q(A(2),ue.bold("(!) ERROR"),A(2),$.bold(e)+A(2),C.bold("How to fix?")+x,D(v(t)?t.join(x).trimStart():t),A(2)),process.exit(0);}function Rt(e,t){e.indexOf(".")>-1&&(e=D.bold("{ ")+e.split(".").filter(Boolean).join(D(" \u2192 "))+D(" \u2192 ")+ue.bold(t)+D.bold(" }"));let s=u.file.base==="package.json"?`${E("syncify")} config in the ${E("package.json")} file.`:`${E(u.file.base)} file.`;Q(A(2),ue.bold("ERROR (!)"),A(2),ue(`Unknown ${e} option provided.`)+A(2),C.bold("How to fix?")+x,`
108
+ ${D(`The ${E(t)} option is invalid or unsupported.`)}
109
+ ${D(`You need to remove it from the ${s}`)}
110
+ `),process.exit(0);}function Eu(e){let t=[];if(e.mode.metafields)return S;t.push(`${Ar}${D("Syncify")} ${D("~")} ${D(br())}`,`${y.gray}`),Ec(t),t.push(`${y.gray}${et.bold(`v${e.version}`)}`,`${y.gray}`);let s=e.sync.stores.length,r=_e(e.sync.themes).length,n=_e(e.spawn.commands).length,{mode:i,spawn:o}=e,a=O.bold(String(s))+(s>1?" stores":" store"),l=O.bold(String(r))+(r>1?" themes":" theme"),d=O.bold(`${e.env.dev?"development":"production"}`);i.build?t.push(`${y.gray}Running ${O.bold("build")} in ${d}`):i.watch?t.push(`${y.gray}Running ${O.bold("watch")} in ${d}`):i.upload?t.push(`${y.gray}Running ${O.bold("upload")} mode`):i.download?t.push(`${y.gray}Running ${O.bold("download")} mode`):i.vsc?t.push(`${y.gray}Generate ${O.bold("vscode")} schema`):i.clean?t.push(`${y.gray}Running ${O.bold("clean")} mode`):i.export&&t.push(`${y.gray}Running ${O.bold("export")} mode`),t.push(`${y.gray}${s>0&&r>0?`Syncing ${l} to ${a}`:S}`),Z(e.filters)||t.push(`${y.gray}${et.bold("Filters")}`,`${y.gray}`+Cc(e.filters)),e.logger.warnings&&bc(e,t),he(i.build,i.watch)&&n>0?t.push(`${y.gray}Spawned ${O.bold(`${n}`)} child ${n>1?"processes":"process"}`,`${y.gray}`):t.push(y.gray),it(i.upload,i.download,i.build,i.clean,i.vsc)&&(n>0&&t.push(`${y.gray}${F("Child Processes:")}`,`${y.gray}${Sc(ut(o.streams))}`,`${y.gray}`),r>0&&t.push(`${y.gray}${F("Theme Editors:")}`,`${y.gray}${Cu(e.sync.themes,"editor")}`,`${y.gray}`)),he(i.upload,i.download,i.watch)&&r>0&&t.push(`${y.gray}${F(i.upload||i.download?"Theme Targets:":"Theme Previews:")}`,`${y.gray}${Cu(e.sync.themes,"preview")}`),e.mode.hot&&t.push(`${y.gray}`),B(t.join(x));}function Cc(e){return Vr(e).flat().reduce((t,s)=>(t+=x+y.gray+dt+ye+et(s),t),S)}function Ec(e){let t=St().columns;t>=100||e.push(`${y.gray}${$.bold("TERMINAL WIDTH WARNING")}`,`${y.gray}`,`${y.gray}${$(`Your terminal width is below ${F("100")} columns (currently ${F(`${t}`)})`)}`,`${y.gray}${$("This is not recommended for usage with Syncify (size matters).")}`,`${y.gray}${$("Expand your terminal wider for an optimal logging experience.")}`,`${y.gray}`);}function bc(e,t){let s=!1;for(let r in Tt){let n=Tt[r];n.length>0&&(s===!1&&(s=!0,t.push(`${y.gray}`,`${y.yellow}${se(`${F("Warnings")} in ${F(e.file.base)}`)}`)),t.push(y.yellow,y.yellow+ds.bold(`${n.length} ${r} ${Xe("warning",n.length)}`),y.yellow,n.join(x)));}}function Sc(e){let t=e.reduce((s,[r])=>r.length>s?r.length:s,0);return e.reduce((s,[r,n])=>(s+=x+y.gray+Re(t-r.length)+$r(as(r))+`${_} `+D("PID")+" \u2192 "+D("#")+Br(`${n.pid}`),s),S)}function Cu(e,t){let s=e.reduce((r,{target:n,store:i})=>{let o=i.indexOf(".");return o>r.store&&(r.store=o),n.length>r.theme&&(r.theme=n.length),r},{store:0,theme:0});return e.reduce((r,{target:n,store:i,id:o})=>{let a=i.slice(0,i.indexOf(".")),l=t==="editor"?`https://${i}/admin/themes/${o}/editor`:`https://${i}?preview_theme_id=${o}`;return r+=x+y.gray+Br(a)+Re(s.store-a.length)+C(" \u2192 ")+Br.bold(n)+Re(s.theme-n.length)+C(" \u2192 ")+D.underline(l),r},S)}var si,Ts=!1,ni=function(t,s="pink"){Ts=!0;let r=0,n=fn.length;si=setInterval(()=>{Ts&&At(`${y.gray} ${L[s](`${fn[r=++r%n]}`)}${t?` ${t}`:S}`);},50);};ni.stop=e=>{Ts&&(Ts=!1,e?(At(y.gray+e),At.done()):At.clear(),clearInterval(si),si=void 0);};function bu(e,t={}){let s=0,r=z({showPercentage:!0,barColor:"neonGreen",percentColor:"whiteBright",barSize:40,clearOnComplete:!1},t);function n(a){let l=Math.max(0,r.barSize-a.length),d=" ".repeat(l);return L.line.gray+a+d}function i(a,l=!1){return (l?"\u25B1":"\u25B0").repeat(a)}function o(){r.clearOnComplete&&console.clear();}return {stop:o,increment:(a=1)=>{let l=s+a;s=Math.min(l,e),s===e&&o();},decrement:(a=1)=>{let l=s-a;s=Math.max(l,0);},render(a){let l=Math.round(s/e*r.barSize),d=i(l),p=i(r.barSize-l,!0),c=L[r.barColor](d)+L.lightGray(p),h=Math.round(s/e*100),g=c;return r.showPercentage&&(g+=` ${String(h)}%`),n(g)}}}var ii=new Set,ui=null,oi=!1,Te="Syncify",Kt=S,Su=S;function Bc(e,t,s){let r=Kt!==e;U(),r&&(B(Gt(Te)),0),Te==="Syncify"&&rt(),Te=e,r&&(B(qt(Te)),Qt(),B(y.gray+F(`${t} ${as(e)}`)),Qt(),Kt=e),Qt(),B(Vn("top",$r(typeof s=="string"?s:s.relative)));}function Qt(e="gray"){Z(e)?B(x):B(y[e]);}function $c(e){v(e)?Q($(e.map(t=>y.red+Nt(t)).join(x))):Q(y.red+Nt(e));}function Ac(e){v(e)?B(e.map(t=>y.gray+Nt(t)).join(x)):B(y.gray+Nt(e));}function Tc(e){B(J("cyan","external",e));}function Rc(e){pe.current!==e&&(pe.current=e),f(e,pe.process)||(pe.current=e,pe.process[e]=new Set),ui=bo((t,s)=>{if(s.charCodeAt(0)===9474)Bu[t].write(s);else {pe.count+=1;let r=s.split(`
111
+ `);for(;r.length!==0;)pe.process[e].add(`${se(r.shift().trimStart())}`);}});}function _c(){ui(),ui=null;}function kc(e,t=!1){B(Gt(Te)),t&&rt(),B(qt(e)),Te=e,Qt();}function Oc(e){let t=Kt!==e.relative;U(),t&&B(Gt(Te)),Te!=="Syncify"&&t&&rt(),Te=e.namespace,t&&(rt(),B(qt(e.kind)),Kt=e.relative),f(e.relative,pe)||(pe[e.relative]=new Set),Su!==e.relative&&(Su=e.relative),u.mode.watch&&(Qt(),B(J("neonCyan","changed",e.relative)));}function Pc(e){if(u.mode.watch){if(ii.add([e.target,e.store,X()]),oi)return;oi=!0,W.onIdle().then(()=>{for(let[t,s,r]of ii)B(J("neonGreen","uploaded",`${F(t)} \u2192 ${s}`+Mt(r)));ii.clear(),oi=!1;});}else B(J("neonGreen","uploaded",`${F(e.target)} \u2192 ${e.store}`+Mt(X())));}function Ic(e){pe.count>0&&J("yellowBright","warning",`${pe.count} ${Xe("warning",pe.count)}`),u.mode.hot?(B(J("neonRouge","reloaded",`${F("HOT RELOAD")}${Mt(Lt())}`)),B(J("magentaBright","syncing",e)),W.pending>2&&B(J("orange","queued",`${e} ~ ${F(xn(W.pending))} in queue`))):(B(J("magentaBright","syncing",e)),W.pending>0&&B(J("orange","queued",`${e} ~ ${F(xn(W.pending))} in queue`)));}function Bu(e,...t){let s=t[0],r=S;t.length===2&&(r=` ${Gn} ${t[0]}`,s=t[1]),B(J("whiteBright","process",F(e)+r+Mt(s)));}function jc(e){B(J("whiteBright","exports",e));}function Nc(e){u.mode.build||B(J("lavender","importer",e));}function Lc(e){B(J("whiteBright","transform",e));}function Mc(e,t){B(J("orange","retrying",`${e} \u2192 ${t.target} ${D(`~ ${t.store}`)}`));}function qc(e,t){B(J("blueBright","deleted",`${e} \u2192 ${t.target} ${D(`~ ${t.store}`)}`));}function Gc(e,t,s,r){let n=e?`${F(e)} ${Ue} ${t} ${hs} ${s} ${D(`~ saved ${r}`)}`:`${t} ${hs} ${s} ${D(`~ saved ${r}`)}`;B(J("whiteBright","minified",n));}function Wc(e,t){B(J("whiteBright","reloaded",e+t));}function zc(e,t){B(J("gray","skipped",`${typeof e=="string"?e:e.key} ~ ${t}`));}function Uc(e){B(J("gray","ignored",e));}function Vc(e){B(J("red","invalid",e)),vu__default.default.notify({title:"Syncify Error",sound:"Pop",open:e,subtitle:e,message:"Invalid error"}).notify();}function Hc(e){B(J("red","failed",e)),vu__default.default.notify({title:"Syncify Error",sound:"Pop",open:e,subtitle:e,message:"Request failed"}).notify();}function Jc(e){throw new Error(e)}function Yc(e){return (...t)=>{u.spawn.invoked||(u.spawn.invoked=!0),Te!=="Spawn"&&(B(Gt(Te)),Te!=="Syncify"&&rt(),B(qt("Spawn")),Te="Spawn"),Kt!==e&&(B(Hn("pink",e)),Kt=e),Yn(Nt(t.shift()));}}var Xt={};ar(Xt,{esbuild:()=>$u,postcss:()=>Kc,sass:()=>Qc,warnings:()=>Le});var Le={},Qc=e=>(t,s)=>{let r=S;f(e.input,Le)?Le[e.input].has("sass")||Le[e.input].set("sass",new Set):Le[e.input]=new Map([["sass",new Set]]);let n=Le[e.input].get("sass");if(r+=gt(t,{nwl:!0,line:y.yellow,text:se.bold}),f("span",s)){let i=f("start",s.span)&&f("end",s.span)?{start:s.span.start.line,end:s.span.end.line}:null,o=f("context",s.span)?s.span.context:f("text",s.span)?s.span.text:null;o!==null&&(i!==null?r+=vt(o,{line:y.yellow,span:i}):r+=vt(o));}r+=je({stack:s.stack,entries:{file:e.relative,deprecated:s.deprecation?"Yes":"No"}}),n.has(r)?B(J("yellowBright","warning",`${n.size} ${Xe("warning",n.size)+ys}`)):(n.add(r),B(J("yellowBright","warning",`${n.size} ${Xe("warning",n.size)+ys}`)));};function $u(e){}function Kc(e,t){let s=S;f(e.input,Le)?Le[e.input].has("postcss")||Le[e.input].set("postcss",new Set):Le[e.input]=new Map([["postcss",new Set]]);let r=Le[e.input].get("postcss");s+=vt(t.node.toString(),{line:y.yellow,span:Hr(t.endLine)?{start:t.line,end:t.endLine}:{start:t.line,end:t.endLine}}),s+=je({stack:!1,entries:{column:t.column,file:e.relative,plugin:t.plugin}}),r.has(s)||(r.add(s),Ji(s));}function Au(){m.nwl(S),m.out(D("SIGINT")),process.exit();}function Tu(e,t){m.nwl(),m.err(`Unhandled Promise Rejection at: ${t}`),m.nwl("red"),m.out(e?D(e):"Unkown Reason");}function Ru(e){m.nwl(),m.err(`Uncaught Exception: ${e.message}`),m.nwl("red"),m.err(`${e.stack}`);}var ai=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t;}},_u=e=>globalThis.DOMException===void 0?new ai(e):new DOMException(e),ku=e=>{let t=e.reason===void 0?_u("This operation was aborted."):e.reason;return t instanceof Error?t:_u(t)};async function li(e,t,{concurrency:s=Number.POSITIVE_INFINITY,stopOnError:r=!0,signal:n}={}){return new Promise((i,o)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(s)||s===Number.POSITIVE_INFINITY)&&s>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${s}\` (${typeof s})`);let a=[],l=[],d=new Map,p=!1,c=!1,h=!1,g=0,T=0,R=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),j=ne=>{p=!0,c=!0,o(ne);};n&&(n.aborted&&j(ku(n)),n.addEventListener("abort",()=>{j(ku(n));}));let le=async()=>{if(c)return;let ne=await R.next(),Fe=T;if(T++,ne.done){if(h=!0,g===0&&!c){if(!r&&l.length>0){j(new AggregateError(l));return}if(c=!0,d.size===0){i(a);return}let He=[];for(let[ie,Ks]of a.entries())d.get(ie)!==Rs&&He.push(Ks);i(He);}return}g++,(async()=>{try{let He=await ne.value;if(c)return;let ie=await t(He,Fe);ie===Rs&&d.set(Fe,ie),a[Fe]=ie,g--,await le();}catch(He){if(r)j(He);else {l.push(He),g--;try{await le();}catch(ie){j(ie);}}}})();};(async()=>{for(let ne=0;ne<s;ne++){try{await le();}catch(Fe){j(Fe);break}if(h||p)break}})();})}var Rs=Symbol("skip");var Xc=Object.assign||((e,t)=>(t&&Object.keys(t).forEach(s=>e[s]=t[s]),e)),ci=(e,t,s)=>{let r=typeof s;if(s&&r==="object")if(Array.isArray(s))for(let n of s)t=ci(e,t,n);else for(let n of Object.keys(s)){let i=s[n];typeof i=="function"?t[n]=i(t[n],_s):i===void 0?e&&!isNaN(n)?t.splice(n,1):delete t[n]:i===null||typeof i!="object"||Array.isArray(i)?t[n]=i:typeof t[n]=="object"?t[n]=i===t[n]?i:_s(t[n],i):t[n]=ci(!1,{},i);}else r==="function"&&(t=s(t,_s));return t},_s=(e,...t)=>{let s=Array.isArray(e);return ci(s,s?e.slice():Xc({},e),t)},fe=_s;async function Ou(e,t){return Qe({...u.sync.stores[t.sidx].client,method:"get",url:t.url,params:{"asset[key]":e}}).then(({data:s})=>s.asset).catch(()=>!1)}async function pi(e,t){let s=fe(u.sync.stores[t.theme.sidx].client,{method:"put",url:t.theme.url,data:{asset:{key:t.key,value:e}}});return Qe(s).then(()=>!0).catch(r=>(m.failed(t.key),I.request(t.key,r.response),!1))}async function fi(e,t){return Qe.get(e,t).then(({data:s})=>s).catch(s=>{if(s.response&&(s.response.status===429||s.response.status===500))m.retrying(file.key,theme),W.add(()=>Os(theme,file,t));else {if(u.mode.upload)throw s.response;m.failed(file.key),I.request(file.relative,s.response);}m.failed(e),I.request(e,s.response);})}var ks;async function Os(e,t,s){if(W.isPaused)return;let{mode:r}=u;return W.concurrency>2?(ks>=20&&W.concurrency--,ks>=35&&W.concurrency--):W.concurrency<3&&ks<30&&W.concurrency++,r.upload||U(),await Qe(s).then(({headers:i,data:o})=>{if(s.method==="get")return o;s.method==="delete"?m.deleted(t.relative,e):r.watch?m.upload(e):r.upload&&Cr.emit("upload","uploaded",e,{key:t.key,namespace:t.namespace,fileSize:Er(s.data.asset.value)}),ks=parseInt(i["x-shopify-shop-api-call-limit"].slice(0,2),10);}).catch(i=>(i.response&&(i.response.status===429||i.response.status===500)?(r.upload||m.retrying(t.key,e),W.add(()=>Os(e,t,s))):r.upload?Cr.emit("upload","failed",e,{key:t.key,namespace:t.namespace,fileSize:Er(s.data.asset.value),get file(){return t},get error(){return i.response}}):(m.failed(t.key),I.request(t.relative,i.response)),Rs))}var mi=class{constructor(t=process.stdin){this.onKeypress=(s,r)=>{if(r.ctrl&&r.name==="c")return process.exit(0)},this.isBlocked=()=>this.blocked,this.block=()=>this.toggle(!0),this.unblock=()=>this.toggle(!1),this.toggle=(s=!this.blocked)=>{this.blocked=s,s?(this.stream.isTTY&&this.stream.setRawMode(!0),this.interface=Xo__default.default.createInterface({input:this.stream,escapeCodeTimeout:50}),Xo__default.default.emitKeypressEvents(this.stream,this.interface),this.stream.on("keypress",this.onKeypress)):(this.stream.isTTY&&this.stream.setRawMode(!1),this.interface&&this.interface.close(),this.stream.off("keypress",this.onKeypress));},this.stream=t,this.blocked=!1;}},Iu=mi;new Iu;var ju=globalThis.process?.env||{},Nu=globalThis.process?.argv||[];!("NO_COLOR"in ju)&&ju.TERM!=="dumb"&&!Nu.includes("--no-color")&&!Nu.includes("--no-colors");var qu=Ds__default.default.platform==="linux",Gu=Ds__default.default.platform==="win32";var di=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];Gu||di.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");qu&&di.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");var Wu=di;var gi=class{constructor(){this.callbacks=new Set,this.exited=!1,this.hooked=!1,this.exit=t=>{if(!this.exited){this.exited=!0;for(let s of this.callbacks)s();t&&Ds__default.default.kill(Ds__default.default.pid,t);}},this.hook=()=>{if(!this.hooked){this.hooked=!0,Ds__default.default.once("exit",()=>this.exit());for(let t of Wu)Ds__default.default.once(t,()=>this.exit(t));}},this.register=t=>(this.hook(),this.callbacks.add(t),()=>{this.callbacks.delete(t);});}},zu=new gi;var Zc=zu.register,Uu=Zc;var hi=class{constructor(t=process.stdout){this.has=()=>this.visible,this.hide=()=>this.toggle(!1),this.show=()=>this.toggle(!0),this.toggle=(s=!this.visible)=>{if(!this.stream.isTTY)return;this.visible=s;let r=s?"\x1B[?25h":"\x1B[?25l";this.stream.write(r);},this.stream=t,this.visible=!0,Uu(this.show);}},Vu=hi;new Vu;async function Hu(e,t){if(is(arguments.length,1))return s=>Hu(e,s);if(it(f("namespace",t),f("key",t))){m.error("invalid fields");return}return Qe.get("metafields.json",e.client).then(({data:s})=>s.metafields.find(r=>t.namespace===r.namespace&&t.key===r.key)).catch(s=>{console.log(s);})}async function yi(e,t){return is(arguments.length,1)?s=>yi(e,s):(t.type="json",t.namespace="email",t.value_type="json_string",t.key="eng",Qe.post("metafields.json",{metafield:t},e.client).then(({data:s})=>(console.log("created",s),s.metafield)).catch(s=>{if(console.log(s),!e.queue)return I(t.namespace,s.response);if(ns(s.response.status)){W.add(()=>yi(e,t));return}else return I(e.store,s.response)}))}async function xi(e,t,s){return is(arguments.length,1)?(r,n)=>xi(e,r,n):Qe.put(`metafields/${t}.json`,{metafield:s},e.client).then(r=>(console.log("created"),r.data.metafield)).catch(r=>{if(!e.queue)return I(s.namespace,r.response);if(ns(r.response.status))W.add(()=>xi(e,t,s));else return I(e.store,r.response)})}async function Is(e,t){if(is(arguments.length,1))return r=>Is(e,r);let s=await Hu(e,t);return s?xi(e,s.id,z(t,{id:s.id,type:"json"})).catch(r=>{if(!e.queue)return I(t.namespace,r.response);if(ns(r.response.status))W.add(()=>Is(e,t));else return I(e.store,r.response)}):yi(e,t)}function js({stores:e,themes:t}){return {assets:async(s,r,n)=>{let i=H(n)?{method:s,params:{"asset[key]":r.key}}:{method:s,data:{asset:{key:r.key,value:n}}};await W.add(()=>li(t,async o=>{u.mode.upload&&U(),await Os(o,r,fe({url:o.url},e[o.sidx].client,i));}));},pages:s=>W.add(function(){return rn(async function(r){},e)}),metafields:s=>W.add(function(){return rn(async function(r){await Is(r,s);},e)})}}function ht(e){return v(e)?e.filter(t=>/\*/.test(t)):/\*/.test(e)?e:null}function Ve(e){if(v(e))return e.map(Ve);if(e.indexOf("/")===-1)return e;let t=path.dirname(e),s=t.lastIndexOf("/")+1;return t.slice(s)}function Fi(e){if(v(e))return e.map(Fi);let t=e.lastIndexOf("/");if(t===-1)return e;let s=e.indexOf("*");return s===-1?e.slice(0,t):e.slice(0,s)}function Zt(e){let t=new RegExp(`^\\.?\\/?${e}\\/`);return function s(r){if(v(r))return r.map(s);let n=r.charCodeAt(0)===33;return n&&(r=r.slice(1)),t.test(r)?n?"!"+r:r:(r.charCodeAt(0)===46&&r.charCodeAt(1)===46&&r.charCodeAt(2)===47&&ae(`Invalid path defined at: ${_} ${se(`"${r}"`)}`,"Paths must be relative to source"),(n?"!":"")+path.join(e,r))}}var Yu=e=>t=>{if(t.indexOf("*")!==-1&&ae(`Base directory path cannot contain glob${_} ${se(`"${t}"`)}`,"Ensure that path you are resolving is correctly formed"),t.charCodeAt(0)===46){if(t.length===1)return e+"/";t.charCodeAt(1)===47?t=t.slice(1):ae(`Directory path is invalid at${_} ${se(`"${t}"`)}`,"Ensure that path you are resolving is correctly formed");}if(t.charCodeAt(0)===47){if(t.length===1)return e+"/";t=t.slice(1);}if(/^[a-zA-Z0-9_-]+/.test(t))return t=path.join(e,t),Hi(t).charCodeAt(0)===47?t:t+"/";ae(`Directory path is invalid at${_} ${se(`"${t}"`)}`,"Ensure that path you are resolving is correctly formed");};function Ku(e){let t=u.svg.filter(s=>s.input.has(e.input)?!0:s.match(e.input)?(s.input.add(e.input),!0):!1);return H(t)||jt(e,"data",{get(){return t}}),e}function _r(e){let t=u.style.find(s=>s.watch(e.input));return H(t)||(jt(e,"data",{get(){return t}}),t.snippet?(e.namespace="snippets",e.key=path.join("snippets",t.rename)):e.key=path.join("assets",t.rename),e.output?e.data.rename!==path.basename(e.output)&&(t.snippet?e.output=path.join(u.dirs.output,e.key):e.output=path.join(Fi(e.output),e.data.rename)):e.output=path.join(u.dirs.output,e.key)),e}function kr(e){let t=u.script.filter(s=>s.watch.has(e.input));return t.length===0||jt(e,"data",{get(){return t}}),e}function wi(e){if(u.section.prefixDir){if(e.base.endsWith("-group.json")||cr(u.section.global)&&u.section.global.test(e.input))return e;let t=Ve(e.input)+u.section.separator+e.base;e.name=t,e.key=path.join(e.namespace,t),e.output=path.join(path.dirname(e.output),t);}return e}function Xu(e){if(u.snippet.prefixDir){if(cr(u.snippet.global)&&u.snippet.global.test(e.input))return e;let t=Ve(e.input)+u.snippet.separator+e.base;e.name=t,e.key=path.join(e.namespace,t),e.output=path.join(path.dirname(e.output),t);}return e}function Or({name:e,dir:t,ext:s,namespace:r},n){let i=n;return /\[dir\]/.test(i)&&(i=i.replace(/\[dir\]/g,t)),/\[file\]/.test(i)&&(i=i.replace(/\[file\]/g,e)),/\[ext\]/.test(i)&&(i=i.replace(/\[ext\]/g,s)),r==="snippets"&&n.endsWith(".liquid")===!1?i+".liquid":!n.endsWith(".[ext]")||!n.endsWith(s)?/\.[a-z]+$/.test(n)?i:i+s:i}function ea(e,t,s){let r=e;return (n,i,o)=>{let a;return i===13||i===14?(a=path.join(Ve(r.dir),r.base),s=null):(a=path.join(n,r.base),s=path.join(s,a)),z({},r,{uuid:We(),type:i,input:t,output:s,key:a,namespace:n,kind:o,relative:path.relative(u.cwd,t),size:NaN,data:void 0})}}function Ns(e,t){return s=>{let r=path.parse(s),n=ea(r,s,t);if(r.ext===".liquid"){if(e.sections(s))return wi(n("sections",4,"Liquid"));if(e.snippets(s))return Xu(n("snippets",3,"Liquid"));if(e.layout(s))return n("layout",2,"Liquid");if(e.templates(s))return n("templates",1,"Liquid");if(e.customers(s))return n("templates/customers",1,"Liquid");if(e.transforms.has(s))switch(e.transforms.get(s)){case 7:return _r(n("snippets",7,"CSS"))}}else {if(r.ext===".md"||r.ext===".html")return n("pages",14,r.ext===".html"?"HTML":"Markdown");if(r.ext===".json"){if(e.metafields(s))return n("metafields",13,"JSON");if(e.sections(s))return wi(n("sections",4,"JSON"));if(e.templates(s))return n("templates",1,"JSON");if(e.config(s))return n("config",5,"JSON");if(e.locales(s))return n("locales",6,"JSON");if(e.customers(s))return n("templates/customers",1,"JSON")}else {if(r.ext===".svg")return Ku(n("assets",9,"SVG"));if(r.ext===".css")return _r(n("assets",7,"CSS"));if(r.ext===".scss")return _r(n("assets",7,"SCSS"));if(r.ext===".sass")return _r(n("assets",7,"SASS"));if(r.ext===".js"||r.ext===".mjs")return kr(n("assets",8,"JavaScript"));if(r.ext===".ts")return kr(n("assets",8,"TypeScript"));if(r.ext===".jsx")return kr(n("assets",8,"JSX"));if(r.ext===".tsx")return kr(n("assets",8,"TSK"));if(e.assets(s)){if(u.spawn.invoked)return n("assets",15);if(r.ext===".jpg"||r.ext===".png"||r.ext===".gif"||r.ext===".pjpg")return n("assets",12,"Image");if(r.ext===".mov"||r.ext===".mp4"||r.ext===".webm"||r.ext===".ogg")return n("assets",12,"Video");if(r.ext===".pdf")return n("assets",12,"PDF");if(r.ext===".eot"||r.ext===".ttf"||r.ext===".woff"||r.ext===".woff2")return n("assets",12,"Font")}}}}}var ta=e=>t=>{let s=path.parse(t),r=ea(s,t,e);switch(path.basename(s.dir)){case"sections":return r("sections",4);case"snippets":return r("snippets",3);case"layout":return r("layout",2);case"templates":return r("templates",1);case"customers":return r("templates/customers",1);case"config":return r("config",5);case"locales":return r("locales",6);case"assets":return r("assets",12)}};var Ls=new RegExp(`{%-?\\s*render\\s+['"]${uo}['"][,\\slablsockvetr:0-9'"]+?-?%}\\s+`);async function sa(){let e=`snippets/${Fr}`,[t]=u.sync.themes,s=await fsExtra.readFile(u.hot.snippet),r=await pi(s.toString(),{theme:t,key:e});return m.update(q.message("gray",`${e} uploaded snippet injection`)),r}function er(e){return Ls.test(e)}function na(e){if(!er(e))return ia(e)}function Pr(e){let t=e.search(Ls);if(t>-1){let s=e.slice(0,t),r=e.slice(e.indexOf("%}")+2);return s+r}return e}function ia(e){let t=e.indexOf("<head>")+6;return e.slice(0,t)+x+u.hot.renderer+x+e.slice(t)}async function oa(e){if(!await fsExtra.pathExists(e))return null;let r=(await fsExtra.readFile(e)).toString();Ls.test(r)||(r=ia(r),await fsExtra.writeFile(e,r),m.update(q.message("gray","injected render tag in output layout")));let[n]=u.sync.themes,i=path.basename(e),o=`layout/${i}`,a=await Ou(`layout/${i}`,n);return Ls.test(a)&&(r=Pr(r)),await pi(r,{theme:n,key:o})?(m.update(q.message("gray","uploaded and inject render tag")),!0):!1}async function ua(e){m.newGroup("Upload"),m.spinner("Preparing"),U("upload");let t={files:[],sync:{}},s=ta(u.dirs.output),r=Wa__default.default.sync(`${u.dirs.output}/**`).sort(),n=js(u.sync),i=Ee(e),o=new Map,a=0,d=0,p=r.length;for(let{store:c,target:h}of u.sync.themes)h.length>d&&(d=h.length),f(c,t.sync)||(t.sync[c]=[]),t.sync[c].push({theme:h,uploaded:0,failed:0,progress:m.progress(p)});Cr.on("upload",function(c,{target:h,store:g},T){m.spinner.stop();let R=c==="failed",j=[q.message("whiteBright",F(T.namespace)),mt,q.message(c==="failed"?"redBright":"neonGreen",T.key),mt,q.suffix("white","size ",` ${T.fileSize}`),x,q.suffix("white","duration ",` ${X()}`),x,q.suffix("white","elapsed ",` ${Lt("upload")}`),mt];for(let le in t.sync)for(let ne of t.sync[le]){le===g&&h===ne.theme&&(ne[c]+=1,ne.progress.increment(1));let Fe=`${F(ne.theme.toUpperCase())+Re(d-h.length)} ${Ue} ${le}`;j.push(q.message("neonCyan",Fe),mt,q.suffix("whiteBright","uploaded ",` ${F(`${ne.uploaded}`)} ${C("of")} ${F(`${p}`)}`),x,q.suffix(ne.failed>0?"redBright":"white","failed ",` ${F(`${ne.failed}`)}`),mt,ne.progress.render(!1),mt),R&&(o.has([le,h])?o.get([le,h]).push([T.file,T.error]):o.set([le,h],[[T.file,T.error]]));}m.update(ke(j));});for(let c of r){let h=s(c),g;try{if(g=(await fsExtra.readFile(h.input)).toString(),h.namespace==="layout"&&er(g)&&(g=Pr(g)),!i)await n.assets("put",h,g);else {let R=e.apply({...h},g);H(R)||R===!1?await n.assets("put",h,g):P(R)?await n.assets("put",h,R):we(R)?await n.assets("put",h,R.toString()):await n.assets("put",h,g);}a++;}catch(T){console.log(T);}}}async function aa(e){U();let t=Ee(e);for(let s of u.sync.themes){let r=u.sync.stores[s.sidx],{assets:n}=await fi(s.url,r.client);for(let{key:i}of n)try{let o=fe(r.client,{params:{"asset[key]":i}}),{asset:a}=await fi(s.url,o),l=path.join(u.dirs.import,r.domain,s.target,i),d=f("attachment",a)?Buffer.from(a.attachment,"base64"):Buffer.from(a.value||null,"utf8");if(m.write(`${L.neonCyan(i)}`),t){let p=e.apply({asset:a,output:l},d);H(p)||p===!1?await fsExtra.writeFile(l,d):P(p)||we(p)?await fsExtra.writeFile(l,p):await fsExtra.writeFile(l,d);}else await fsExtra.writeFile(l,d);}catch{m.failed(i);}}}var dp=e=>async t=>(e.type!==15&&await fsExtra.writeFile(e.output,t).catch(I.write("Error writing asset to output",{file:e.relative,source:e.relative})),t);async function qs(e,t){let s=dp(e),r=await fsExtra.readFile(e.input).catch(I.write("Error reading asset file",{file:e.relative,source:e.relative}));if(r){if(!Ee(t))return s(r);let n=t.apply({...e},r);return H(n)||n===!1?s(r):ce(n)?s(n):we(n)?s(n.toString()):s(r)}}var yp=/{%-?\s*#[\s\S]+?%}/g,xp=/{%-?\s*comment\s*-?%}[\s\S]+?{%-?\s*endcomment\s*-?%}/g,Fp=/{%-?\s*liquid[\s\S]+?%}/g,wp=/[^,:'"a-zA-Z0-9=] +[^'"a-zA-Z0-9=}{]/g;function Gs(e){return u.terser.liquid.removeComments?e.replace(xp,S).replace(yp,S):e}function Cp(e){return e.replace(Fp,t=>`
112
+ `+t.replace(/#.*?$/gm,S)+`
113
+ `)}function Ep(e,t){if(!u.terser.liquid.minifySchema)return Gs(t);let s=t.search(/{%-?\s*schema/);if(s>-1){let r=t.indexOf("%}",s+2)+2,n=t.slice(r),i=r+n.search(/{%-?\s*endschema/);if(i>-1){let o=JSON.parse(t.slice(r,i)),a=JSON.stringify(o,null,0),l=t.slice(0,r)+a+t.slice(i);return Gs(l)}m.invalid(e.relative);}return Gs(t)}function bp(e){return u.terser.liquid.stripDashes,e}async function Sp(e,t){try{return await htmlMinifierTerser.minify(t,u.terser.html)}catch(s){return m.invalid(e.relative),console.error(s),null}}var vp=e=>async t=>{if(e.type===2&&u.mode.hot&&(er(t)||(t=na(t))),!u.mode.terse)return await fsExtra.writeFile(e.output,t),m.transform(`${e.namespace} \u2192 ${Ke(e.size)}`),t;let s;if(e.base.endsWith(".js.liquid"))s=t.replace(wp,S).replace(/(?<=[:,]) +(?=['"{[])/g,S).replace(/{{%/g,"{ {%").replace(/%}}/g,"%} }").replace(/(?<=[%}]})\s+(?=[\]}])/g," ").replace(/>\s+(?=[{[])/,">").replace(/(?<=[}\]])\s<\//g,"</");else if(e.base.endsWith(".json.liquid"))s=JSON.stringify(JSON.parse(t),null,0);else {let i=e.type===4?Ep(e,t):Gs(t),o=await Sp(e,i);s=Cp(o);}if(m.process("HTML Terser",Lt()),N(s))return await fsExtra.writeFile(e.output,t),t;let r=bp(s).replace(/^\s+/gm,S);await fsExtra.writeFile(e.output,r);let n=$e(t,e.size);return n.isSmaller?m.transform(`${e.namespace} ${n.before} \u2192 gzip ${n.gzip}`):m.minified("Liquid",n.before,n.after,n.saved),r};async function _t(e,t){u.mode.watch&&U();let r=(await fsExtra.readFile(e.input)).toString();u.mode.build&&e.namespace==="layout"&&er(r)&&(r=Pr(r)),e.size=Se(r);let n=vp(e);if(!ce("Function",t))return n(r);let i=t.apply({...e},r);return ce("Undefined",i)||i===!1?n(r):ce("String",i)?n(i):Buffer.isBuffer(i)?n(i.toString()):n(r)}function bi(e){try{return JSON.parse(e)}catch(t){return console.log(t),null}}function Ap(e,t=0){try{return JSON.stringify(e,null,t)}catch(s){return console.log(s),null}}async function tr(e,t,s=0){let r=Ap(t,s);if(N(r))return u.mode.watch&&X(),t;if(s===0){let n=$e(r,e.size);m.minified("JSON",n.before,n.after,n.saved);}else m.transform(`${e.namespace} \u2192 ${Ke(e.size)}`);return e.type===13||fsExtra.writeFile(e.output,r).catch(I.write("Error writing JSON",{file:e.relative})),r}async function yt(e,t){u.mode.watch&&U();let s=await fsExtra.readFile(e.input).catch(I.write("Error reading JSON file",{file:e.relative}));if(we(s)){let r=s.toString();if(e.size=Se(r),r.trim().length===0)return m.skipped(e,"empty file"),null;let n=bi(r);if(Z(n))return m.skipped(e,"empty file"),null;let i=u.processor.json.indent,{mode:o,terser:a}=u;if(o.terse&&(e.type===12?a.json.assets&&(i=0):e.type===6?a.json.locales&&(i=0):e.type===1?a.json.templates&&(i=0):e.type===13?a.json.metafields&&(i=0):e.type===5&&a.json.config&&(i=0)),!Ee(t))return tr(e,n,i);let l=t.apply({...e},n);return H(l)?tr(e,n,i):v(l)||G(l)?tr(e,l,i):P(l)?tr(e,bi(l),i):we(l)?tr(e,bi(l.toString()),i):tr(e,n,i)}}async function Ws(e,t){let s=await fsExtra.readFile(e.input);if(Z(s.toString()))return u.mode.watch&&m.skipped(e,"empty file"),null;let{data:r,content:n}=kp__default.default(s);f("title",r)||(r.title=""),f("html",r)&&(u.page.export.html=r.html),f("linkify",r)&&(u.page.export.linkify=r.linkify),f("breaks",r)&&(u.page.export.breaks=r.breaks);let i=Op__default.default(u.page.export).render(n);return fsExtra.writeFile(path.join(be.pages.uri,e.base),i).catch(I.write("Error writing Page reference",{file:e.relative})),u.mode.build?i:{title:r.title,body_html:i}}var jr=null;function pa(){return jr=Fn("esbuild"),N(jr)?(jr=null,!1):!0}async function fa(e){K.esbuild.loaded&&e.watch.clear();let t=await jr.build(e.esbuild);u.mode.terse&&u.mode.build&&(e.size=Se(t.outputFiles[0].text)),u.mode.watch?Da(e,t.metafile.inputs):(e.watch.has(e.input)||e.watch.add(e.input),u.watch.has(e.input)||u.watch.add(e.input));}async function Da(e,t){let s=[],{cwd:r,watch:n,mode:i}=u;for(let o in t){if(o.indexOf("/node_modules/")>-1)continue;let a=path.join(r,o);e.watch.has(a)||e.watch.add(a),n.has(a)||n.add(a),i.watch&&s.push(a);}i.watch&&K.esbuild.loaded&&await wn().then(()=>{for(let o of e.watch)o.indexOf("/node_modules/")>-1||e.watchCustom!==null&&e.watchCustom(o)||f(o.slice(r.length+1),t)||(e.watch.delete(o),n.unwatch(o));});}function Pp(e){return "<script>"+e+"</script>"}function Ip(e){return ce("Function",e)?function(t,s){let r=e.apply({...t},s);return r===!1?(m.external("cancelled"),null):ce("String",r)?(m.external("augment"),r):we(r)?(m.external("augment"),r.toString()):s}:!1}async function zs(e,t,s){if(!e.data)return;u.mode.watch&&U();let r=Ip(s),{errors:n,wss:i,mode:o,cwd:a}=u,l=e.data.length,d=[];for(let p of e.data){let{key:c,input:h,output:g,snippet:T,esbuild:{format:R}}=p;try{let{metafile:j,outputFiles:le,warnings:ne}=await jr.build(p.esbuild);l>1&&(m.nwl(),m.importer(path.relative(a,h))),o.watch&&await Da(p,j.inputs),ne.length>0&&void 0;for(let{text:Fe,path:He}of le)if(He.endsWith(".map")){let ie=path.join(be.script.uri,e.base);fsExtra.writeFile(ie,Fe).catch(I.write("Error writing JavaScript Source Map to cache",{file:path.relative(a,ie),source:e.relative}));}else {if(o.terse){let{before:Ks,after:Za,saved:el}=$e(Fe,p.size);m.transform(`${F(R.toUpperCase())} bundle`),m.minified(null,Ks,Za,el);}else m.transform(`${F(R.toUpperCase())} bundle \u2192 ${F(Er(Fe))}`);let ie;if(T){if(ie=Pp(Fe),r&&(ie=r(e,ie),ie===null))continue;await fsExtra.writeFile(g,ie).catch(I.write("Error writing inline <script> snippet",{file:e.relative})),m.transform(`exported as ${F("snippet")}`);}else {if(ie=Fe,r&&(ie=r(e,ie),ie===null))continue;await fsExtra.writeFile(g,ie).catch(I.write("Error writing JavaScript asset",{file:e.relative}));}o.hot?(m.syncing(c),i.script(c)):o.build||(m.syncing(c),d.push(t("put",p,ie)));}}catch(j){f("errors",j)&&(m.invalid(e.relative),n.add(h),j.errors.forEach(I.esbuild));}}l>1&&m.nwl(),await Promise.all(d);}var Us=null,vi=null;async function Bi(e){if(e==="postcss")return Us=(await import('postcss')).default,N(Us)===!1;if(e==="sass")return vi=Zs("sass"),N(vi)===!1}function Lp(e,t){let s=Ee(t)?{...e}:!1;return async function(r){if(N(r))return null;let n;if(s!==!1){let o=t.apply({...e},Buffer.from(r));H(o)||o===!1?n=r:(P(o)||we(o))&&(n=o);}else n=r;fsExtra.writeFile(e.output,n).catch(I.write("Error writing stylesheet to output",{input:e.relative,output:path.relative(u.cwd,e.output)}));let i=$e(r,e.size);return i.isSmaller?m.transform(`${F("CSS")} ${i.before} \u2192 gzip ${i.gzip}`):m.minified("CSS",i.before,i.after,i.saved),u.mode.hot&&u.wss.stylesheet(e.key),n}}async function Mp(e){let{data:t}=e,s=t.sass===!0?K.sass.config:t.sass;if(e.ext===".scss"||e.ext===".sass"){u.mode.watch&&U();try{let{css:r,sourceMap:n}=vi.compile(t.input,{loadPaths:s.include,sourceMapIncludeSources:!1,sourceMap:s.sourcemap,style:s.style,logger:{debug:i=>console.log("DEBUG",i),warn:Xt.sass(e)}});if(s.sourcemap){let i=path.join(be.style.uri,e.base+".map");fsExtra.writeFile(i,JSON.stringify(n)).catch(I.write("Error writing SASS Source Map file to the cache directory",{file:path.relative(u.cwd,i),source:e.relative}));}return m.process("SASS Dart",X()),e.size=Se(r),{css:r,map:n}}catch(r){return m.invalid(e.relative),I.sass(e,r),null}}try{let r=await fsExtra.readFile(e.input);return e.size=Se(r),{css:r.toString(),map:null}}catch(r){return m.invalid(e.relative),m.throws(r),null}}async function qp(e,t,s){let{data:r}=e;try{u.mode.watch&&U();let n=await Us(K.postcss.config).process(t,{from:r.rename,to:r.rename,map:s?{prev:s,inline:!1}:null});u.mode.watch&&m.process("PostCSS",X());let i=n.warnings();if(i.length>0)for(let o of i)Xt.postcss(e,o);return n.toString()}catch(n){return m.invalid(e.relative),console.log(n),null}}function ma(e){return `<style>${x+Re(2)+e}</style>`}async function Vs(e,t){u.mode.watch&&U();let s=Lp(e,t);try{let r=await Mp(e);if(r===null)return null;if(N(Us)||!e.data.postcss&&!e.data.snippet)return s(r.css);if(e.data.postcss){let n=await qp(e,r.css,r.map);if(n===null)return null;if(e.data.snippet)return s(ma(n))}return e.data.snippet?s(ma(r.css)):s(r.css)}catch(r){return console.log(r),null}}var $i=null,Ai=null;async function Ti(e){if(e==="svg-sprite")return Ai=(await import('svg-sprite')).default,N(Ai)===!1;if(e==="svgo")return $i=(await import('svgo')).default,N($i)===!1}async function zp(e){let t=await fsExtra.readFile(e);return [e,t.toString(),Se(t)]}function Up(e){return new Promise(function(t,s){e.compile((r,n)=>{if(r)return s(r);for(let i in n)for(let o in n[i])t(n[i][o].contents.toString());});})}function Vp(e,t,s){async function r(n){let i=z({},e);u.mode.watch&&U(),i.kind="SVG Sprite",n.snippet?(i.namespace="snippets",i.key=path.join("snippets",Or(i,n.rename)),i.output=path.join(u.dirs.output,i.key)):(i.key=path.join("assets",Or(i,n.rename)),i.output=path.join(u.dirs.output,i.key));let o=n.sprite===!0?K.sprite.config:n.sprite,a=new Ai(o),l=await qe(zp,ut(n.input)).catch(I.write("Error reading an SVG file",{file:i.base,source:i.relative}));if(l){let d=l.filter(([g,T])=>xa(T)?(m.skipped(path.relative(u.cwd,g),"Liquid Detected"),!1):!0);i.size=0;for(let[g,T,R]of d)a.add(g,null,T),i.size=i.size+R;let p=await Up(a),c=d.length;m.process("SVG Sprite",`${c} ${Xe("SVG",c)}`,X()),await fsExtra.writeFile(i.output,p).catch(I.write("Error writing SVG Sprite",{file:i.key,caller:e.relative}));let h=$e(p,i.size);h.isSmaller?m.transform(`${i.kind} ${h.before} \u2192 gzip ${h.gzip}`):m.minified(i.kind,h.before,h.after,h.saved),t&&(m.syncing(i.key),await t("put",i,p));}}return r}function xa(e){return /^(?:{{[\s\S]+?}}|{%[\s\S]+?%})|[^"'](?:{{[\s\S]+?}}|{%[\s\S]+?%})[^'"]/m.test(e)}function Hp(e){if(/<path[^>]*[a-zA-Z"'\s](>)(?!\s*<\/path>)/g.test(e)){let s=`${L.redBright(`<${L.white("path")}>`)}`,r=`${L.greenBright(`<${L.white("path")} />`)}`;return m.transform(`${s} ${L.ARR} ${r} ${L.TLD} ${L.gray("patched solidus")}`),e.replace(/(<path[^>]*[a-zA-Z"'\s])(>)(?!\s*<\/path>)/g,"$1 /$2")}return e}function Jp(e,t,s){let r=z({},e);async function n(i){u.mode.watch&&U(),i.snippet?(r.namespace="snippets",r.key=path.join("snippets",Or(r,i.rename)),r.output=path.join(u.dirs.output,r.key)):(r.key=path.join("assets",Or(r,i.rename)),r.output=path.join(u.dirs.output,r.key));let o=i.svgo===!0?K.svgo:i.svgo,l=(await fsExtra.readFile(r.input)).toString();if(xa(l))return m.skipped(r,"Liquid Detected"),null;let d=Hp(l);r.size=Se(d);let p;try{p=$i.optimize(d,o);}catch(g){return m.err(g.toString()),null}m.process("SVGO",X());let{data:c}=p,h=$e(c,r.size);h.isSmaller?m.transform(`${r.kind} ${h.before} \u2192 gzip ${h.gzip}`):m.minified(r.kind,h.before,h.after,h.saved),await fsExtra.writeFile(r.output,c).catch(I.write("Error writing SVG",{file:r.key,caller:e.relative})),t&&(m.syncing(r.key),await t("put",r,c));}return n}async function Hs(e,t,s){u.mode.watch&&U();let r=Vp(e,t),n=Jp(e,t),i=e.data.length;for(let o=0;o<i;o++){let a=e.data[o];o>0&&u.mode.watch&&m.changed(e),a.format==="sprite"&&await r(a),a.format==="file"&&await n(a);}}async function Fa(e){U();let{paths:t,dirs:s,watch:r,filters:n,mode:i}=u,o=Z(n)===!1,a=Ns(t,s.output),l=za__default.default(ut(r.values())),d=await Wa__default.default("**",{onlyFiles:!0,absolute:!0,cwd:s.input}),p={},c=d.filter(l).reduce((g,T)=>{let R=a(T);if(H(R))return g;switch(R.type){case 7:g.styles.files.push(R);break;case 8:g.scripts.files.push(R);break;case 4:g.sections.files.push(R);break;case 2:g.layouts.files.push(R);break;case 3:g.snippets.files.push(R);break;case 6:g.locales.files.push(R);break;case 5:g.configs.files.push(R);break;case 1:g.templates.files.push(R);break;case 14:g.pages.files.push(R);break;case 12:g.assets.files.push(R);break;case 13:g.metafields.files.push(R);break;case 9:{for(let{uuid:j,format:le,input:ne}of R.data)if(!f(j,p))if(p[j]=!0,le==="sprite")g.svgs.files.push(R);else for(let Fe of ne)g.svgs.files.push(a(Fe));break}}return g},{styles:{time:S,files:[],report:null},scripts:{time:S,files:[],report:null},svgs:{time:S,files:[],report:null},sections:{time:S,files:[],report:null},layouts:{time:S,files:[],report:null},templates:{time:S,files:[],report:null},snippets:{time:S,files:[],report:null},locales:{time:S,files:[],report:null},configs:{time:S,files:[],report:null},pages:{time:S,files:[],report:null},metafields:{time:S,files:[],report:null},assets:{time:S,files:[],report:null}}),h=(g,T,R)=>async j=>{U();try{m.build(g,T,j);let le=await(j.ext===".json"?yt(j,e):R(j,e));return m.out(q.tree("bottom",L.neonGreen(j.key))),le===null||isNaN(j.size)?{name:j.base,input:j.relative,time:X(),output:j.key,error:"Skipped File"}:{name:j.base,input:j.relative,output:j.key,error:null,time:"",size:$e(le,j.size)}}catch(le){return m.out(q.tree("bottom",L.redBright(j.key))),{name:j.base,input:j.relative,output:j.key,time:X(),error:le.message}}};for(let g in c){U();let T=c[g].files,R=T.length;if(o||(g==="styles"&&i.script?(c[g].report=await qe(h(g,R,Vs),T),c[g].time=X()):g==="scripts"&&i.script&&(c[g].report=await qe(h(g,R,zs),T),c[g].time=X())),g==="layouts"||g==="snippets"||g==="sections"||g==="templates"){if(o&&!(f(g,n)&&n[g].includes(g)))continue;c[g].report=await qe(h(g,R,_t),T),c[g].time=X();}else if(g==="locales"||g==="configs"||g==="metafields"){if(o&&!(f(g,n)&&n[g].includes(g)))continue;c[g].report=await qe(h(g,R,yt),T),c[g].time=X();}else if(g==="pages"){if(o&&!(f(g,n)&&n[g].includes(g)))continue;c[g].report=await qe(h(g,R,Ws),T),c[g].time=X();}else if(g==="assets"){if(o&&!(f(g,n)&&n[g].includes(g)))continue;c[g].report=await qe(h(g,R,qs),T),c[g].time=X();}else if(g==="svgs"&&i.svg){if(o&&!(f(g,n)&&n[g].includes(g)))continue;c[g].report=await qe(h(g,R,Hs),T),c[g].time=X();}}m.nwl(),m.update(`${y.gray}Build Completed ${D(`~ ${X()}`)}`),m.nwl(),process.exit(0);}function wa(e){let t=js(u.sync),s=Ns(u.paths,u.dirs.output);u.watch.on("all",async function(n,i){let o=s(i);if(!H(o)){if(o.type!==15&&m.changed(o),n==="change"||n==="add")r(o);else if(n==="unlink")return t.assets("delete",o)}});async function r(n){try{let i=null;if(n.type===8)return zs(n,t.assets,e);if(n.type===14)return Ws(n,e);if(n.type===9)return Hs(n,t.assets,e);if(n.type===7?i=await Vs(n,e):n.type===4&&n.kind==="Liquid"&&(i=await _t(n,e)),n.type===4&&n.kind==="JSON")i=await yt(n,e);else if(n.type===2)i=await _t(n,e);else if(n.type===3)i=await _t(n,e);else if(n.type===6||n.type===5)i=await yt(n,e);else {if(n.type===13)return i=await yt(n,e),t.metafields({value:i,namespace:n.namespace,key:n.key});n.type===1&&n.kind==="JSON"?i=await yt(n,e):n.type===1&&n.kind==="Liquid"?i=await _t(n,e):(n.type===12||n.type===15)&&(i=await qs(n,e));}N(i)||(m.syncing(n.key),await t.assets("put",n,i),u.mode.hot&&(n.type===4&&n.kind==="Liquid"?u.wss.section(n.name):n.type!==8&&n.type!==7&&await W.onIdle().then(()=>u.wss.replace())));}catch(i){console.error(i),m.err(i);}}}var Ca=!1,Ea=!1,Ri=new Set;function Js(e,t){Ca||(Ca=!0,Ri.forEach(s=>s()),e&&process.exit(128+t));}function Ys(e){return Ri.add(e),Ea||(Ea=!0,process.once("exit",Js),process.once("SIGINT",Js.bind(void 0,!0,2)),process.once("SIGTERM",Js.bind(void 0,!0,15)),process.on("message",t=>{t==="shutdown"&&Js(!0,-128);})),()=>Ri.delete(e)}var kt={enable:!0,output:[]};async function nf(){if(m.update(q.message("gray","validating snippet injection")),await sa()){m.update(q.message("gray","validating layouts"));for(let t in u.hot.alive){if(!await fsExtra.pathExists(t)){m.update(q.message("gray","layout has not yet been bundled, building now..."));let n=v(u.config.paths.layout)?u.config.paths.layout:[u.config.paths.layout];for(let i of n){let o=path.join(u.dirs.input,i),a=await fsExtra.readFile(o);await fsExtra.writeFile(t,a);}m.update(q.message("gray","layout was bundled from source, injecting hot snippet"));}await oa(t)||(m.update.clear(),m.err("Failed to inject hot reload render tag"));}m.update.clear();}else m.update.clear(),m.err("Failed to upload snippet");}async function va(){if(!kt.enable)return kt.output.push(y.red,y.red+ue("Change the socket port address or kill the session occupying it."),y.red+ue("This error typically occurs when multiple Syncify instances are active.")),m.err(ue(`${F("ERROR")} on ${F(`${u.hot.method==="hot"?"HOT":"LIVE"} Reload:`)}`)),m.out(kt.output.join(x)),null;m.out(q.message("whiteBright",F(`${u.hot.method==="hot"?"HOT":"LIVE"} Reloading:`))),m.nwl(),m.update(q.message("gray","configuring HOT Reload")),await nf();function e(o){o.setHeader("Access-Control-Allow-Origin","*"),o.setHeader("Cache-Control","public, max-age=0");}let t=Xp__default.default(path.join(u.dirs.output,"assets"),{setHeaders:e}),s=ef__default.default.createServer((o,a)=>t(o,a,Zp__default.default(o,a))),r=`http://localhost:${u.hot.server}`,n=o=>{if(o.code==="EADDRINUSE")return kt.output.push(y.red+ue(`${F("EADDRINUSE")} ${Ue} ${r}`),y.red,y.red+ue.bold(`Server Port ${u.hot.server} address already in use`),y.red,y.red+ue("Change the server port address or kill the session occupying it."),y.red+ue("This error typically occurs when multiple Syncify instances are active.")),m.update.clear(),m.out(kt.output.join(x)),u.wss.http.close(),null},i=()=>{m.update.done(),s.removeListener("error",n),s.removeListener("connect",i);};s.on("error",n),s.on("connect",i),s.listen(u.hot.server),m.update(q.message("pink",`server \u2192 ${F("assets")} \u2192 ${D.underline(r)}`));}function Ba(){if(u.mode.hot===!1)return;let e=new ws.Server({port:u.hot.socket,path:"/ws"});Ys(()=>e.close());let t=n=>{n.code==="EADDRINUSE"&&(e.close(),kt.enable=!1,kt.output.push(y.red+ue(`${F("EADDRINUSE")} ${Ue} ws://localhost:${u.hot.server}`),y.red,y.red+ue.bold(`Socket Port ${u.hot.server} address already in use`)));},s=()=>{e.removeAllListeners("script"),e.removeAllListeners("stylesheet"),e.removeAllListeners("section"),e.removeAllListeners("svg"),e.removeAllListeners("assets"),e.removeAllListeners("reload"),e.removeAllListeners("replace");},r=n=>{e.removeListener("error",t),e.on("script",i=>n.send(`script,${i}`)),e.on("stylesheet",i=>n.send(`stylesheet,${i}`)),e.on("section",i=>n.send(`section,${i}`)),e.on("svg",i=>n.send(`svg,${i}`)),e.on("assets",()=>n.send("assets")),e.on("reload",()=>n.send("reload")),e.on("replace",()=>n.send("replace"));};return e.on("close",s),e.on("error",t),e.on("connection",r),{get http(){return e},script:n=>e.emit("script",path.basename(n)),stylesheet:n=>e.emit("stylesheet",path.basename(n)),section:n=>e.emit("section",n),svg:n=>e.emit("svg",n),assets:()=>e.emit("assets"),reload:()=>e.emit("reload"),replace:()=>e.emit("replace")}}function _i(e){let t=e.toString().trim().toLowerCase();if(t==="v"){let s=_e(Wt);for(let r=0,n=s.length;r<n;r++){let i=s[r];if(Wt[i].size!==0){r>0&&m.hline(10),m.write(L.bold.whiteBright(i));for(let o of Wt[i].values())typeof o=="string"&&o.length>0&&Q(o);Wt[i].clear();}}u.mode.upload&&(B(q.closer("Upload"),x),process.exit(0));}else if(t==="w"){for(let s in pe.process)if(pe.process[s].size!==0){m.nwl(),m.write(L.bold.yellow(s)),m.nwl();for(let r of pe.process[s].values())typeof r=="string"&&r.length>0&&m.write(q.multiline("warning",r));pe.process[s].clear();}pe.count=0;}}`
114
+ ${D("-----------------------------------------------------------------------------")}
115
+ ${F("Syncify CLI Examples")} ${D("by Panoply")}
116
+ ${D("-----------------------------------------------------------------------------")}
117
+
118
+ ${F("Watching"+_)}
119
+
120
+ ${D("Targeting 1 store and 1 theme")}:
121
+ $ sync your-store${D("=")}theme-1 --watch
122
+
123
+ ${D("Targeting 1 store and 2 themes with hot reloading")}:
124
+ $ sync your-store${D("=")}theme-1,theme-2 --watch --hot
125
+
126
+ ${D("Targeting 2 stores and 1 theme")}:
127
+ $ sync --your-store${D("=")}theme-1 --another-store${D("=")}some-theme --watch
128
+
129
+ ${D("Targeting 2 stores and 2 themes")}:
130
+ $ sync --your-store${D("=")}theme-1,theme-2 --another-store${D("=")}some-theme,test-theme --watch
131
+
132
+ ${D("Targeting 1 store with 2 themes and clean mode with hot live reloads")}:
133
+ $ sync your-store${D("=")}theme-1,theme-2 --watch --clean --hot
134
+
135
+ ${D("Targeting 1 store with 2 themes in production mode")}:
136
+ $ sync your-store${D("=")}theme-1,theme-2 --prod --watch
137
+
138
+ `;var $a=`
139
+ ${D("-----------------------------------------------------------------------------")}
140
+ ${F("Syncify")} <!version!> ${D("by Panoply")}
141
+ ${D("-----------------------------------------------------------------------------")}
113
142
 
114
143
  Welcome to the Syncify CLI. The command line utility assumes that
115
- you have defined stores, themes and setup credentials within a ${p(".env")} file.
144
+ you have defined stores, themes and setup credentials within a ${D(".env")} file.
116
145
 
117
- ${x("Aliases"+S)}
146
+ ${F("Aliases"+_)}
118
147
 
119
148
  $ sync
120
149
 
121
- ${x("Commands"+S)}
150
+ ${F("Commands"+_)}
122
151
 
123
- $ syncify ${p.italic("Interactive prompt")}
124
- $ syncify {store} [theme] ${p.italic("Prints list of connected stores")}
152
+ $ syncify ${D.italic("Interactive prompt")}
153
+ $ syncify {store} [theme] ${D.italic("Prints list of connected stores")}
125
154
 
126
- ${x("Themes"+S)}
155
+ ${F("Themes"+_)}
127
156
 
128
- --<store> [theme] ${p.italic("A store reference command (run examples)")}
129
- -t, --theme [theme] ${p.italic("A comma seprated list of themes")}
157
+ --<store> [theme] ${D.italic("A store reference command (run examples)")}
158
+ -t, --theme [theme] ${D.italic("A comma seprated list of themes")}
130
159
 
131
- ${x("Paths"+S)}
160
+ ${F("Paths"+_)}
132
161
 
133
- -c, --config <path> ${p.italic("Set configs path")}
134
- -i, --input <path> ${p.italic("Set input path")}
135
- -o, --output <path> ${p.italic("Set output path")}
162
+ -c, --config <path> ${D.italic("Set configs path")}
163
+ -i, --input <path> ${D.italic("Set input path")}
164
+ -o, --output <path> ${D.italic("Set output path")}
136
165
 
137
- ${x("Utility"+S)}
166
+ ${F("Utility"+_)}
138
167
 
139
- -f, --filter <path> ${p.italic("Glob path, use with pull or push triggers")}
168
+ -f, --filter <path> ${D.italic("Glob path, use with pull or push triggers")}
140
169
 
141
- ${x("Environment"+S)}
170
+ ${F("Environment"+_)}
142
171
 
143
- --dev ${p.italic("Build in development mode (default)")}
144
- --prod ${p.italic("Build in production mode")}
145
- --hot ${p.italic("Run watch with hot-reloads")}
172
+ --dev ${D.italic("Build in development mode (default)")}
173
+ --prod ${D.italic("Build in production mode")}
174
+ --hot ${D.italic("Run watch with hot-reloads")}
146
175
 
147
- ${x("Modes"+S)}
176
+ ${F("Modes"+_)}
148
177
 
149
- -w, --watch ${p.italic("Run watch mode")}
150
- -b, --build ${p.italic("Run build mode from input")}
151
- -u, --upload ${p.italic("Run upload mode theme to stores")}
152
- -d, --download ${p.italic("Run download mode from theme and stores")}
153
- -m, --metafields ${p.italic("Run metafields resource mode")}
154
- -p, --pages ${p.italic("Run pages resource mode")}
155
- -r, --redirects ${p.italic("Run redirects resource mode")}
178
+ -w, --watch ${D.italic("Run watch mode")}
179
+ -b, --build ${D.italic("Run build mode from input")}
180
+ -u, --upload ${D.italic("Run upload mode theme to stores")}
181
+ -d, --download ${D.italic("Run download mode from theme and stores")}
182
+ -m, --metafields ${D.italic("Run metafields resource mode")}
183
+ -p, --pages ${D.italic("Run pages resource mode")}
184
+ -r, --redirects ${D.italic("Run redirects resource mode")}
156
185
 
157
- ${x("Resource"+S)}
186
+ ${F("Resource"+_)}
158
187
 
159
- --pull ${p.italic("Pull a resource from a shop or theme")}
160
- --push ${p.italic("Push a resource to a shop or theme")}
161
- --silent ${p.italic("Silent logs, only warnings or errors are printed")}
188
+ --pull ${D.italic("Pull a resource from a shop or theme")}
189
+ --push ${D.italic("Push a resource to a shop or theme")}
190
+ --silent ${D.italic("Silent logs, only warnings or errors are printed")}
162
191
 
163
- ${x("Trigger"+S)}
192
+ ${F("Trigger"+_)}
164
193
 
165
- --spawn [list] ${p.italic("Invoke a defined spawn child process/s")}
166
- --delete [list] ${p.italic("Delete a remote and local file")}
167
- --minify [list] ${p.italic("invoke minify mode, accepts resource/s")}
194
+ --spawn [list] ${D.italic("Invoke a defined spawn child process/s")}
195
+ --delete [list] ${D.italic("Delete a remote and local file")}
196
+ --minify [list] ${D.italic("invoke minify mode, accepts resource/s")}
168
197
 
169
- ${x("Other"+S)}
198
+ ${F("Other"+_)}
170
199
 
171
- --strap ${p.italic("Import a strap into the project")}
172
- --vsc ${p.italic("Generate vscode specific settings")}
173
- --help ${p.italic("Show the screen")}
200
+ --strap ${D.italic("Import a strap into the project")}
201
+ --vsc ${D.italic("Generate vscode specific settings")}
202
+ --help ${D.italic("Show the screen")}
174
203
 
175
- ${x("Help"+S)}
204
+ ${F("Help"+_)}
176
205
 
177
- -h, --help ${p.italic("Print this screen")}
178
- -h, --help {examples} ${p.italic("Print a list of command examples")}
206
+ -h, --help ${D.italic("Print this screen")}
207
+ -h, --help {examples} ${D.italic("Print a list of command examples")}
179
208
 
180
- ${p("-----------------------------------------------------------------------------")}
209
+ ${D("-----------------------------------------------------------------------------")}
181
210
 
182
- `;var Uc=Object.assign||((e,t)=>(t&&Object.keys(t).forEach(s=>e[s]=t[s]),e)),Hn=(e,t,s)=>{let r=typeof s;if(s&&r==="object")if(Array.isArray(s))for(let n of s)t=Hn(e,t,n);else for(let n of Object.keys(s)){let i=s[n];typeof i=="function"?t[n]=i(t[n],Es):i===void 0?e&&!isNaN(n)?t.splice(n,1):delete t[n]:i===null||typeof i!="object"||Array.isArray(i)?t[n]=i:typeof t[n]=="object"?t[n]=i===t[n]?i:Es(t[n],i):t[n]=Hn(!1,{},i);}else r==="function"&&(t=s(t,Es));return t},Es=(e,...t)=>{let s=Array.isArray(e);return Hn(s,s?e.slice():Uc({},e),t)},je=Es;function Xc(e,t){return e.replace(Rr,`.bundled_${Xe()}.${t==="esm"?"mjs":"cjs"}`)}function Zc(e){if(typeof jest>"u")return "cjs";let t=path.extname(e);return t===".js"?l.pkg.type==="module"?"esm":"cjs":t===".ts"||t===".mjs"?"esm":"cjs"}function ef(e){return we(e||{}).map(t=>new RegExp(`^${t.replace(/\*/,".*")}$`))}function _u(e,t){return t?t.some(s=>s instanceof RegExp?s.test(e):e===s||e.startsWith(s+"/")):!1}function tf({external:e,notExternal:t}={}){return {name:"bundle-require:external",setup({onResolve:s}){s({filter:/.*/},async r=>{if(!(r.path.charCodeAt(0)===46||path.isAbsolute(r.path))){if(_u(r.path,e))return {external:!0};if(!_u(r.path,t))return {external:!0}}});}}}function rf(){return {name:"bundle-require:inject-file-scope",setup(e){e.initialOptions.define={...e.initialOptions.define,__dirname:Ls,__filename:Gs,"import.meta.url":Ws},e.onLoad({filter:Rr},async t=>{let s=await fsExtra.readFile(t.path,"utf-8");return {contents:[`const ${Gs} = ${JSON.stringify(t.path)};`,`const ${Ls} = ${JSON.stringify(path.dirname(t.path))};`,`const ${Ws} = ${JSON.stringify(url.pathToFileURL(t.path).href)};`].join("")+s,loader:Oi(path.extname(t.path))}});}}}async function mr(e){if(!Rr.test(e.filepath))throw new Error(`${e.filepath} is not a valid JS file`);let t=e.preserveTemporaryFile??!!process.env.BUNDLE_REQUIRE_PRESERVE,s=e.cwd||process.cwd(),r=e.format??Zc(e.filepath),n=loadTsconfig.loadTsConfig(s,e.tsconfig),i=ef(n?.data.compilerOptions?.paths||{});async function o(c){if(!c.outputFiles)throw new Error("[bundle-require] no output files");let{text:f}=c.outputFiles[0],h=(e.getOutputFile||Xc)(e.filepath,r);await fsExtra.writeFile(h,f,"utf8");let w,B=e.require||Pi;try{w=await B(r==="esm"?url.pathToFileURL(h).href:h,{format:r});}finally{t||await fsExtra.unlink(h);}return {mod:w,dependencies:c.metafile?we(c.metafile.inputs):[]}}let a=await esbuild.build({...e.esbuildOptions,entryPoints:[e.filepath],absWorkingDir:s,outfile:"out.js",format:r,write:!1,platform:"node",sourcemap:"inline",bundle:!0,metafile:!0,plugins:[...e.esbuildOptions?.plugins||[],tf({external:e.external,notExternal:i}),rf()]});return await o(a)}async function Iu(e){let t=null;for(let s of ["syncify.config.js","syncify.config.mjs","syncify.config.cjs","syncify.config.ts","syncify.config.json"]){if(t=path.join(e,s),await fsExtra.pathExists(t))break;t=null;}if(t===null)return null;try{if(t.endsWith(".json")){l.file=t;let s=await fsExtra.readFile(t);return Ri(s.toString())}else {l.file=t;let s=await mr({filepath:t});return s.mod.syncify||s.mod.default||s.mod}}catch(s){console.log(s);let r=path.join(e,"syncify.config.json");return await fsExtra.pathExists(r)?fsExtra.readJson(r):null}}async function ju(e){let t;if(t=path.join(e,"tsconfig.json"),!await fsExtra.pathExists(t)&&(t=path.join(e,"jsconfig.json"),!await fsExtra.pathExists(t)))return null;try{let r=await fsExtra.readFile(t),n=er(r.toString());return JSON.parse(n)}catch(r){throw new Error(r)}}async function Nu(e){let t=path.join(e,"package.json");if(!await fsExtra.pathExists(t))throw new Error('Missing "package.json" file');try{return await fsExtra.readJson(t)}catch(r){throw new Error(r)}}async function Mu(e,t={purge:!1}){if(l.dirs.cache=`${e}/`,!await fsExtra.pathExists(e))try{await fsExtra.mkdir(e);}catch(r){throw new Error(r)}for(let r of Si)if(r==="sections")pe[r]=[];else {pe[r]={};let n=path.join(e,r,"/");if(await fsExtra.pathExists(n))t.purge&&await fsExtra.emptyDir(n);else {try{await fsExtra.mkdir(n);}catch(o){throw new Error(o)}v(pe[r],{uri:n,data:{}});}v(pe[r],{uri:n,data:{}});}fsExtra.writeJson(path.join(e,"store.map"),pe,{spaces:0},r=>{if(r)throw r});}async function Yn(e){if(await fsExtra.pathExists(e)){if(l.mode.clean)try{await fsExtra.emptyDir(e);}catch(s){console.error(s);}}else try{await fsExtra.mkdir(e);}catch(s){throw new Error(s)}for(let s of vi){let r=path.join(e,s);if(!await fsExtra.pathExists(r))try{await fsExtra.mkdir(r);}catch(i){throw new Error(i)}}}function qu(e,t){let s=tu(e.cwd);for(let[r,n]of Bi){let i;if(e[r]===n)if(t[r]===n){l.dirs[r]=s(e[r]);continue}else i=t[r];else i=e[r];if(b(i)){let o=Er(i.map(s));l.dirs[r]=o.length===1?o[0]:o;}else P(i)?l.dirs[r]=s(i):I("config",r,t[r],"string");}l.watch.add(l.file);}async function Lu({dirs:e,sync:t,mode:s}){if(!s.download)return;if(!await fsExtra.pathExists(e.import))try{await fsExtra.mkdir(e.import);}catch(n){throw new Error(n)}for(let n in t.themes){let{store:i,target:o}=t.themes[n],a=path.join(e.import,i);if(await fsExtra.pathExists(a)){if(s.clean)try{await fsExtra.emptyDir(a);}catch(c){console.error(c);}}else try{await fsExtra.mkdir(a);}catch(c){throw new Error(c)}await Yn(path.join(a,o));}}var Gu=e=>{if(!m("sections",e.views))return;let{sections:t}=e.views;j(e.views.sections)||Ie("sections",e.views.sections);for(let s in l.section){if(m(s,t)||Ie("sections",s),s==="prefixDir")if(ge(t[s])){l.section[s]=t[s];continue}else I("sections",s,t[s],"boolean");if(s==="separator")if(P(t[s]))if(/[@:_-]/.test(t[s])){l.section[s]=t[s];continue}else ne("sections",s,t[s],"@ | _ | : | -");else I("sections",s,t[s],"string");if(s==="global"){let r=P(t[s])?[t[s]]:t[s];if(b(r)){l.section[s]=new RegExp(`${r.join("|")}`);continue}else I("sections",s,t[s],"string | string[]");}}};function Wu(e){if(!m("json",e.processors))return;let{json:t}=e.processors;j(t)||Ie("json",t);for(let s in t){if(s==="indent")if(wr(t[s])){L.json[s]=t[s];continue}else I("json",s,t[s],"number");if(s==="useTab")if(ge(t[s])){L.json[s]=t[s];continue}else I("json",s,t[s],"boolean");if(s==="exclude"){let r=P(t[s])?[t[s]]:t[s];if(b(r)){L.json[s]=Vu(r);continue}else I("exclude",s,r[s],"string | string[]");}}}function yr(e,t){return !!(m("devDependencies",e)&&m(t,e.devDependencies)&&m(t,e.devDependencies)||m("dependencies",e)&&m(t,e.dependencies)||m("peerDependencies",e)&&m(t,e.peerDependencies)||m("optionalDependencies",e)&&m(t,e.peerDependencies))}async function lf(e){for(let t of ["js","cjs","mjs"]){let s=`${e}.${t}`;if(await fsExtra.pathExists(`${s}.${t}`))return s}return null}async function ws(e){try{let t=await lf(e);if(t!==null){let s=await mr({filepath:t});return {path:t,config:s.mod.syncify||s.mod.default||s.mod}}return null}catch{return null}}function Qn(e,t){let s=t,r=Ee(e),n=path.extname(e),i=path.basename(e,n);return q(t)?{dir:r,ext:n,file:i,name:i}:(/(\[dir\])/.test(s)&&(s=s.replace("[dir]",r)),/(\[file\])/.test(s)&&(s=s.replace("[file]",i)),/(\[ext\])/.test(s)&&(s=s.replace(".[ext]",n)),{ext:n,file:i,dir:r,name:t.replace(t,s)})}function Xn(e,t,s){let r=e+"_api_token";if(m(r,t)||(r=r.toUpperCase()),m(r,t))return {baseURL:`https://${e}.myshopify.com/admin`,headers:{"X-Shopify-Access-Token":t[r]}};let n=e+"_api_key",i=e+"_api_secret";if(m(n,t)||(n=n.toUpperCase()),m(i,t)||(i=i.toUpperCase()),m(n,t)&&m(i,t))return {baseURL:`https://${e}.myshopify.com/admin`,auth:{username:t[n],password:t[i]}};s===1?ee(`Invalid or missing ${T(e+".myshopify.com")} credentials`,[`Your shop credentials in the ${T.bold(".env")} file could`,"not be read correctly or are missing."]):s===2&&ee(`Missing credentials for: ${T(e+".myshopify.com")}`,`
183
- You need to provide shop credentials within a ${T.bold(".env")} file.
184
- Please check you project setup and ensure you have correctly provided authorization.`);}function Ve(e,t){let{cwd:s}=l,r=fe(t)?[]:!1,n=$e("Path Resolver"),i=Rt(l.dirs.input);if(b(e)){let o=[];for(let a of e){let u=i(a),c=Mn.sync(u,{cwd:s,absolute:!0});if(r){let f=t(u);P(f)?r.push(f):b(f)&&r.push(...f);}c.length===0?n("No files can be resolved in",a):o.push(...c);}return r?{paths:o,match:Vu(r)}:o}if(P(e)){let o=i(e),a=Mn.sync(o,{cwd:s});if(a.length===0&&n("No files can be resolved in",e),r){let u=t(o);P(u)?r.push(u):b(u)&&r.push(...u);}return r?{paths:a,match:Vu(r)}:a}I("uri","uri/path",e,"string | string[]");}function Mt(e,t){if(P(e)){let{paths:s,match:r}=Ve(e,n=>(t.addWatch&&l.watch.add(n),nt(n)));if(s)return t.flatten?s.map(n=>({input:n,rename:path.basename(n),snippet:!1})):[{input:s,snippet:!1,rename:"[name].[ext]",match:r}]}else if(b(e)){if(e.every(P)){let{paths:s,match:r}=Ve(e,n=>(t.addWatch&&l.watch.add(n),nt(n)));if(s)return t.flatten?s.map(n=>({input:n,rename:path.basename(n),snippet:!1})):[{input:s,snippet:!1,rename:"[name].[ext]",match:r}]}else if(e.every(j))return e.map(s=>{m("input",s)||ne("tranform","input",s,"{ input: string | string[] }");let{paths:r,match:n}=Ve(e,i=>(t.addWatch&&l.watch.add(i),nt(i)));return s.match=n,s.input=r,m("snippet",s)||(s.snippet=!1),m("rename",s)||(s.rename=s.snippet?"[name].liquid":"[name].[ext]"),s})}else if(j(e)){let s=[];if(m("input",e)){let{paths:r,match:n}=Ve(e.input,i=>(t.addWatch&&l.watch.add(i),nt(i)));if(m("snippet",e)||(e.snippet=!1),m("rename",e)||(e.rename=e.snippet?"[name].liquid":"[name].[ext]"),t.flatten)for(let i of r)s.push(v(e,{input:i}));else e.input=r,e.match=n,s.push(e);}else for(let r in e){let n={snippet:r.startsWith("snippets/")},i=r.startsWith("assets/"),o=e[r],a=i||n.snippet;if(P(o)){a&&(n.rename=i?r.slice(7):r.slice(9));let{paths:u,match:c}=Ve(o,f=>(t.addWatch&&l.watch.add(f),nt(f)));if(u)if(t.flatten)for(let f of u)s.push(v({},n,{input:f}));else s.push(v({},n,{input:u,match:c}));}else if(j(o)){m("input",o)||ne("tranform",r,o,"{ input: string | string[] }");let{paths:u,match:c}=Ve(o.input,f=>(t.addWatch&&l.watch.add(f),nt(f)));if(u){let f=a?v({},o,n,{rename:i?r.slice(7):r.slice(9)}):v({},n,o);if(t.flatten)for(let d of u)s.push(v(f,{input:d}));else s.push(v(f,{input:u,match:c}));}}else if(b(o))if(o.every(P)){let{paths:u,match:c}=Ve(o,f=>(t.addWatch&&l.watch.add(f),nt(f)));if(u)if(t.flatten)for(let f of u)s.push(v({},n,o,{input:f}));else s.push(v({},n,o,{input:u,match:c}));}else I("transform",r,o,"string[]");}return s}}function Zn(e,t){return De(m("devDependencies",e)&&m(t,e.devDependencies),m("dependencies",e)&&m(t,e.dependencies),m("peerDependencies",e)&&m(t,e.peerDependencies),m("optionalDependencies",e)&&m(t,e.peerDependencies))}function zu(e,t){let s=t,r=Ee(e),n=path.extname(e),i=path.basename(e,n);return q(t)?{dir:r,ext:n,file:i,name:i}:(/(\[dir\])/.test(s)&&(s=s.replace("[dir]",r)),/(\[file\])/.test(s)&&(s=s.replace("[file]",i)),/(\[ext\])/.test(s)&&(s=s.replace(".[ext]",n)),{ext:n,file:i,dir:r,name:t.replace(t,s)})}async function Hu(e,t){if(!m("script",e.transforms))return;let{esbuild:s}=L,{script:r}=e.transforms,n=$e("script transform option");if(s.installed=yr(t,"esbuild"),s.installed){await qn()||ee("failed to import ESBuild","Ensure you have installed esbuild");let c=await ws("esbuild.config");c!==null&&(s.file=c.path,s.config=je(s.config,c.config));}else Te("esbuild");m("entryPoints",s.config)&&(n("processor config is not allowed and was omitted","entryPoints"),delete s.config.entryPoints);let i=await ju(l.cwd),o=Mt(r,{addWatch:!1,flatten:!0}),a=As(["input","watch","rename","snippet"]);Ce(s,"tsconfig",{get(){return i}}),s.config.plugins.length>0?s.config.plugins.unshift(ds(),Dr()):s.config.plugins.push(ds(),Dr()),s.config.absWorkingDir=l.cwd;for(let u of o){l.watch.has(u.input)&&n("input already in use",path.relative(l.cwd,u.input));let c={uuid:Xe(),input:u.input,snippet:u.snippet,rename:null,watch:null,esbuild:null},f=v({entryPoints:[u.input]},s.config),d=a(u),{name:h}=zu(u.input,u.rename);if(!h.endsWith(".js")&&!h.endsWith(".mjs")?c.rename=h+".js":h.endsWith(".cjs")?ne("rename","file extension",h,".js | .mjs"):c.rename=h,u.snippet?(h.endsWith(".liquid")||(c.rename=h+".liquid"),l.watch.add(`!${path.join(l.cwd,e.output,"snippets",c.rename)}`),l.paths.transforms.set(c.input,8)):(h.endsWith(".liquid")&&n("Using .liquid extension rename for asset",h),l.watch.add(`!${path.join(l.cwd,e.output,"assets",c.rename)}`)),me(d))Ce(c,"esbuild",{get(){return f}});else {for(let B in d)B==="entryPoints"?n('Option is not allowed, use Syncify "input" instead',B):B==="outdir"?n("Option is not allowed, Syncify will handle output",B):B==="watch"?n("Option is not allowed, declare watch using Syncify",B):B==="absWorkingDir"||B==="watch"||B==="incremental"||B==="write"||B==="logLevel"?n("Option is not allowed and will be ignored",B):B==="plugins"?f[B].push(...d[B]):f[B]=d[B];Ce(c,"esbuild",{get(){return f}});}m("watch",u)||(u.watch=[]),b(u.watch)||I("script","watch",u.watch,"string[]");let w=v({},j(u.esbuild)?u.esbuild:s.config,{entryPoints:[u.input],write:!1,sourcemap:!1,absWorkingDir:l.cwd,plugins:[],outdir:u.snippet?path.join(l.dirs.output,"snippets"):path.join(l.dirs.output,"assets"),loader:{".liquid":"file"}});s.tsconfig!==null&&Re("compilerOptions.paths",s.tsconfig)?w.plugins.push(ds(u),Dr(u)):w.plugins.push(Dr(u));try{await It.build(w);}catch(B){throw new Error(B)}u.watch.forEach(B=>{l.watch.has(B)||l.watch.add(B);}),c.watch=Vu(u.watch),await qn(c),l.script.push(c);}s.loaded=!0;}async function Yu(e,t){if(!m("style",e.transforms))return;let{postcss:s,sass:r}=L,n=$e("style transform option");if(r.installed=yr(t,"sass"),r.installed&&(await Gn("sass")||ee("Unable to dynamically import SASS","Ensure you have installed sass")),s.installed=yr(t,"postcss"),s.installed){await Gn("postcss")||ee("Unable to dynamically import PostCSS","Ensure you have installed postcss");let u=await ws("postcss.config");u!==null&&(s.file=u.path,s.config=u.config);}let i=Mt(e.transforms.style,{addWatch:!1,flatten:!0}),o=Rt(e.input);for(let a of i){let u={uuid:Xe(),input:a.input,watch:null,postcss:!1,sass:!1};if(m("postcss",a)){let d=j(a.postcss);(ge(a.postcss)||d)&&!M(a.postcss)?a.postcss!==!1&&(s.installed||Te("postcss"),u.postcss=d?je(s.config,a.postcss):!0):I("style","postcss",u.postcss,"boolean | {}");}if(m("sass",a)&&a.sass!==!1||r.installed===!0){let d=j(a.sass);if((ge(a.sass)||d)&&!M(a.sass))if(r.installed||Te("sass"),!d)Ce(u,"sass",{get(){return a.sass}});else {u.sass=v(r.config,a.sass);for(let h in a.sass)h==="sourcemap"||h==="warnings"?ge(a.sass[h])?u.sass[h]=a.sass[h]:I("sass",h,a.sass[h],"boolean"):h==="style"?(P(a.sass[h])||I("sass",h,a.sass[h],"string"),a.sass[h]==="expanded"||a.sass[h]==="compressed"?u.sass[h]=a.sass[h]:ne("sass",h,a.sass[h],"expanded | compressed")):h==="includePaths"&&(b(a.sass[h])?u.sass[h]=Er(a.sass[h]).map(w=>path.join(l.cwd,w)):I("sass",h,a.sass[h],"string[]"));}else I("style","sass",a.sass,"boolean | {}");!a.snippet&&!/\.s[ac]ss/.test(path.extname(u.input))&&n("Input is not a sass file",u.input);}let c=Qn(a.rename);m("rename",a)&&!M(a)&&(P(a.rename)||I("styles","rename",a.rename,"string"),c=Qn(u.input,a.rename),/[a-zA-Z0-9_.-]+/.test(c.name)||I("sass","rename",c,"Invalid rename augment"),c.name.endsWith(".css")?u.rename=c.name:c.name.endsWith(".scss")?c.name=c.name.replace(".scss",".css"):c.name.endsWith(".sass")?c.name=c.name.replace(".sass",".css"):c.name.endsWith(".liquid")||(c.name=c.name+".css"));let f=[];if(l.mode.watch&&m("watch",a)){b(a.watch)||I("styles","watch",a.watch,"string[]");for(let d of a.watch){let h=await Mn(path.join(l.cwd,o(d)));h.length===0&&d[0]!=="!"&&n("Cannot resolve watch glob/path uri",d);for(let w of h)fsExtra.existsSync(w)?f.push(w):n("No file exists in path",w);}f.push(u.input),f.forEach(d=>l.watch.add(d)),u.watch=Vu(f);}else u.watch=Vu([u.input]),l.watch.add(u.input);typeof u.sass=="object"&&(u.sass.include.unshift(l.cwd,path.join(l.cwd,c.dir)),Re("sass.include",a)&&(u.sass.include=a.sass.include.map(d=>path.join(l.cwd,d)))),m("snippet",a)&&(ge(a.snippet)||I("styles","snippet",a.snippet,"boolean"),u.snippet=a.snippet),u.snippet?(m("rename",u)||(u.rename=c.name),(!c.name.endsWith(".liquid")||!u.rename.endsWith(".liquid"))&&(u.rename=c.name+".liquid"),l.paths.transforms.set(u.input,7),l.watch.add(`!${path.join(l.cwd,e.output,"snippets",u.rename)}`)):(u.rename=c.name,l.watch.add(`!${path.join(l.cwd,e.output,"assets",c.name)}`)),l.style.push(u);}}async function Qu(e,t){if(!m("svg",e.transforms))return;let{sprite:s,svgo:r}=L,n=$e("svg transform");r.installed=Zn(t,"svgo"),r.installed&&(await Vn("svgo")||ee("Unable to dynamically import SVGO","Ensure you have installed svgo")),s.installed=Zn(t,"svg-sprite"),s.installed&&(await Vn("svg-sprite")||ee("Unable to dynamically import SVG Sprite","Ensure you have installed svg-sprite")),!s.installed&&!r.installed&&Te(["svgo","svg-sprite"]);let i=Mt(e.transforms.svg,{addWatch:!0,flatten:!1});for(let o of i){let a=o.input.filter(c=>path.extname(c)!==".svg"?(n("Excluded file which is not an SVG type",path.relative(l.cwd,c)),!1):!0);if(a.length===0){n("No SVG file paths were resolved");continue}let u={uuid:Xe(),input:new Set(a),match:o.match,format:null,rename:o.rename,snippet:o.snippet};m("svgo",o)&&m("sprite",o)&&ne("transform","svg","svgo AND sprite","svgo OR sprite"),m("format",o)?o.format==="file"||o.format==="sprite"?(u.format=o.format,o.format==="file"?(u.svgo=!0,r.installed||Te("svgo")):(u.sprite=!0,s.installed||Te("svg-sprite"))):ne("transform > svg","format",o.format,'"sprite" | "file"'):m("svgo",o)?(r.installed||Te("svgo"),u.format="file",u.svgo=j(o.svgo)?je(r.config,o.svgo):!0):m("sprite",o)?(s.installed||Te("svg-sprite"),u.format="sprite",u.sprite=j(o.sprite)?je(s.config,o.sprite):!0):r.installed&&s.installed?Ro("transform > svg","format","sprite | file",[`SVG transforms require you to define ${T("format")} when both SVGO and SVG Sprite`,"processors are installed. Syncify needs to knows how is should handle the input and","which processor to use for the transform."].join(y)):r.installed&&!s.installed?(u.format="file",u.svgo=!0):s.installed&&!r.installed?(u.format="sprite",u.sprite=!0):Ie("transform > svg","Cannot resolve processor, try defining a format."),l.svg.push(u);}}var Ku=e=>{if(!(l.mode.minify===!1&&e.minify===!1)&&(l.mode.minify===!1&&e.minify===!0&&(l.mode.minify=!0),ge(e.minify)&&e.minify===!0&&(L.esbuild.installed||ee("esbuild is not installed",qs)),j(e.minify)))for(let t in e.minify){if(e.minify[t]===!1||M(e.minify[t])){l.mode.minify===!0&&(l.minify[t]=!0);continue}if(t==="script"&&(L.esbuild.installed||ee("esbuild is not installed",qs)),ge(e.minify[t]))l.minify[t]=!0;else if(j(V[t])&&me(V[t])===!1)for(let s in e.minify[t]){let r=t==="views"?"liquid":t;m(s,V[r])||Ie(`minify > ${t}`,s),!M(e.minify[t][s])&&typeof V[r][s]!=typeof e.minify[t][s]&&I(`minify > ${t}`,s,typeof e.minify[t][s],typeof V[r][s]),s==="exclude"&&!me(e.minify[t][s])?V[t][s]=Ve(e.minify[t][s]):s==="collapseWhitespace"?V.html.collapseWhitespace=e.minify[t][s]:V[t][s]=e.minify[t][s];}else ne("minify",t,typeof V[t],"boolean | {}");}};async function Xu(e,t){D.clear();let s=await Nu(e.cwd);Ce(l,"pkg",{get(){return s}}),l.config=await Tf(s,e),l.mode=Af(e),l.cli=e.cli,l.version=s.version,l.cwd=e.cwd,l.silent=e.silent,l.prod=e.prod,l.dev=e.dev&&!e.prod,l.logger=te.logger,process.env.SYNCIFY_ENV=l.dev?"dev":"prod",process.env.SYNCIFY_WATCH=String(l.mode.watch);let r=await Promise.all([qu(e,te),$f(l.cwd),Yn(l.dirs.output),Lu(l),_f(e,te),kf(te),Bf(te),Ku(te),Gu(te),Wu(te),Hu(te,s),Yu(te,s),Qu(te,s),vf(te,l),bf(te,l),Sf(te)]).catch(n=>{console.log(n);});return D.start(l),r}async function Sf(e){if(l.mode.watch!==!0||l.mode.hot===!1&&e.hot===!1)return;l.mode.hot===!1&&e.hot===!0&&(l.mode.hot=!0);let t=$e("HOT Reloads");if(l.sync.stores.length>1){t("HOT Reload can only be used on 1 store");return}else if(l.sync.themes.length>1){t("HOT Reload can only be used on 1 theme");return}St(j(e.hot),ge(e.hot),M(e.hot))&&I("hot","hot",e.hot,"boolean | {}");let{hot:s}=l;if(j(e.hot)&&me(e.hot)===!1)for(let r in e.hot)m(r,l.hot)?r==="label"?e.hot[r]==="visible"||e.hot[r]==="hidden"?s[r]=e.hot[r]:ne("hot",r,e.hot[r],"visible | hidden"):r==="method"?e.hot[r]==="hot"||e.hot[r]==="refresh"?s[r]=e.hot[r]:ne("hot",r,e.hot[r],"hot | refresh"):r==="scroll"?e.hot[r]==="preserved"||e.hot[r]==="top"?s[r]=e.hot[r]:ne("hot",r,e.hot[r],"preserved | top"):typeof s[r]==typeof e.hot[r]?s[r]=e.hot[r]:I("hot",r,e.hot[r],typeof s[r]):Ie(`hot > ${r}`,e.hot[r]);s.snippet=path.join(l.cwd,"node_modules","@syncify/cli",tr),s.output=path.join(l.dirs.output,"snippets",tr);for(let r of s.layouts)s.alive[path.join(l.dirs.output,"layout",r)]=!1;}function Bf(e){for(let t in e.processors)L[t].config=b(e.processors[t])?e.processors[t]:v(L[t].config,e.processors[t]);}function bf(e,t){if(!!m("plugins",e)&&!!b(e.plugins))for(let s of e.plugins)m("onInit",s)&&s.onInit.call({...t},e),m("onChange",s)&&Bt.onChange.push([s.name,s.onChange]),m("onTransform",s)&&Bt.onTransform.push([s.name,s.onTransform]),t.mode.watch&&(m("onWatch",s)&&Bt.onWatch.push([s.name,s.onWatch]),m("onReload",s)&&Bt.onReload.push([s.name,s.onReload])),t.mode.build&&m("onBuild",s)&&Bt.onBuild.push([s.name,s.onBuild]);}function vf(e,t){if(!m("spawn",e)||M(e.spawn))return;j(e.spawn)||I("config","spawn",e.spawn,"{ build: {}, watch: {} }");let s=null;if(t.mode.build&&m("build",e.spawn)&&(s="build"),t.mode.watch&&m("watch",e.spawn)&&(s="watch"),!(M(s)||M(e.spawn[s])||(j(e.spawn[s])||I("spawn",s,e.spawn.build,"string | string[]"),we(e.spawn[s]).length===0))){for(let n in e.spawn[s]){let i=e.spawn[s][n];if(P(i)){t.spawn.commands[n]={cmd:E,args:[],pid:NaN};let o=i.trimStart().indexOf(de)>-1?i.trimStart().split(de):[i];t.spawn.commands[n].cmd=o.shift(),t.spawn.commands[n].args=o,xn(n,t.spawn.commands[n],D.spawn(n));}else if(b(i)){let o=i.shift();t.spawn.commands[n]={cmd:o,args:i,pid:NaN},xn(n,t.spawn.commands[n],D.spawn(n));}else I("spawn",s,e.spawn[s],"string | string[]");}Cs(()=>{O.pause(),O.clear(),D.nwl(E),kt.forEach((n,i)=>{Q(`- ${p(`pid: #${n.pid} (${i}) process exited`)}`),n.kill();}),D.nwl(E),kt.clear(),process.exit(0);});}}function Af(e){let t=De(e.pages,e.metafields,e.redirects),s=De(e.style,e.script,e.image,e.svg),r=De(t,e.upload,e.download)?!1:e.watch;return {watch:r,hot:r&&e.hot,vsc:e.vsc,export:e.export,redirects:e.redirects,metafields:e.metafields,pages:e.pages,prompt:e.prompt,pull:e.pull,push:e.push,script:s?e.script:!1,style:s?e.style:!1,image:s?e.image:!1,svg:s?e.svg:!1,minify:De(e.minify,e.prod),clean:De(t,s,e.upload)?!1:e.clean,build:De(s,e.upload,e.watch,e.download)?!1:e.build,upload:De(s,r)?!1:e.upload,download:De(t,s,e.upload,e.watch,e.build)?!1:e.download}}async function $f(e){let t=path.join(e,"node_modules/.syncify"),s=path.join(t,"store.map");if(!await fsExtra.pathExists(s))return Mu(t);l.dirs.cache=`${t}/`;let n=await fsExtra.readJson(s);v(pe,n);}async function Tf(e,t){let s=await Iu(t.cwd);if(s!==null)return je(te,s);if(m("syncify",e))return je(te,e.syncify);Po(t.cwd);}function _f(e,t){if(e._.length===0)return;let s=e._[0].split(","),r=xf.config({path:path.join(l.cwd,".env")}),i=(b(t.stores)?t.stores:[t.stores]).filter(({domain:a})=>vs(a,s)),o=i.length>1;for(let a of i){let u=`${a.domain}.myshopify.com`.toLowerCase(),c=r.error?Xn(a.domain,process.env,2):Xn(a.domain,r.parsed,1),f=l.sync.stores.push({store:a.domain,domain:u,client:c,queue:o})-1;if(l.mode.metafields||l.mode.pages)return;let d=m("theme",e)?e.theme.split(","):m(a.domain,e)?e[a.domain].split(","):we(a.themes);for(let h of d)m(h,a.themes)||ne("theme","target",h,"string"),l.sync.themes.push({target:h,sidx:f,store:u,id:a.themes[h],url:`/themes/${a.themes[h]}/assets.json`});}l.sync.stores.length===0&&l.mode.build===!0&&ee("Unknown, missing or invalid store/theme targets","Check your store config");}async function kf(e){let t=Rt(l.dirs.input),s=$e("path resolution");for(let r of bi){let n;r==="customers"?n=m(r,e.paths)?b(e.paths[r])?e.paths[r].map(t):[t(e.paths[r])]:[t("templates/customers")]:m(r,e.paths)?(n=b(e.paths[r])?e.paths[r].map(t):[t(e.paths[r])],r==="assets"&&n.push(path.join(l.dirs.output,"assets/*"))):r==="redirects"?n=[path.join(l.cwd,e.paths[r])]:n=[t(r)];for(let i of n)(await Mn(i)).length===0&&s("No files could be resolved in",path.relative(l.cwd,i)),l.watch.add(i);l.paths[r]=Vu(n);}}var _x={get dev(){return process.env.SYNCIFY_ENV==="dev"},get prod(){return process.env.SYNCIFY_ENV==="prod"},get watch(){return process.env.SYNCIFY_WATCH==="true"},get options(){return l.config}};async function Lt(e,t,s){if(process.stdin.on("data",$u),m("_",e)&&(e._=e._.slice(1)),e.help)return console.info(Tu);await Xu(e),process.on("SIGINT",qo),process.on("uncaughtException",Go),process.on("unhandledRejection",Lo),l.mode.hot&&await bu();try{if(l.mode.build)return Du(s);if(l.mode.watch)return Au(s);if(l.mode.upload)return uu(s);if(l.mode.download)return au(s)}catch(r){D.throws(r);}}var Ix=e=>e;function Rf(e,t){if(P(e)){if(/watch|build|download|upload/.test(e))return s=>Lt({cli:!1,[e]:!0},t,s)}else if(j(e)){if(!q(t))throw new Error("You cannot provide options when running instance");return {watch:s=>Lt({cli:!1,watch:!0},t,s),build:s=>Lt({cli:!1,build:!0},t,s),download:s=>Lt({cli:!1,download:!0},t,s),upload:s=>Lt({cli:!1,upload:!0},t,s)}}}var jx=Rf;
211
+ `;function ki(e,t,s){let r=of__default.default(t.cmd,t.args,{stdio:"pipe"});r.stdio[0].on("data",s),r.stdio[1].on("data",s),r.stdio[2].on("data",s),t.pid=r.pid,u.spawn.streams.set(e,r);}function mf(e,t){return e.replace(us,`.bundled_${We()}.${t==="esm"?"mjs":"cjs"}`)}function df(e){if(typeof jest>"u")return "cjs";let t=path.extname(e);return t===".js"?u.pkg.type==="module"?"esm":"cjs":t===".ts"||t===".mjs"?"esm":"cjs"}function gf(e){return _e(e||{}).map(t=>new RegExp(`^${t.replace(/\*/,".*")}$`))}function Aa(e,t){return t?t.some(s=>s instanceof RegExp?s.test(e):e===s||e.startsWith(s+"/")):!1}function hf({external:e,notExternal:t}={}){return {name:"bundle-require:external",setup({onResolve:s}){s({filter:/.*/},async r=>{if(!(r.path.charCodeAt(0)===46||path.isAbsolute(r.path))){if(Aa(r.path,e))return {external:!0};if(!Aa(r.path,t))return {external:!0}}});}}}function yf(){return {name:"bundle-require:inject-file-scope",setup(e){e.initialOptions.define={...e.initialOptions.define,__dirname:dn,__filename:gn,"import.meta.url":hn},e.onLoad({filter:us},async t=>{let s=await fsExtra.readFile(t.path,"utf-8");return {contents:[`const ${gn} = ${JSON.stringify(t.path)};`,`const ${dn} = ${JSON.stringify(path.dirname(t.path))};`,`const ${hn} = ${JSON.stringify(url.pathToFileURL(t.path).href)};`].join("")+s,loader:Co(path.extname(t.path))}});}}}async function Nr(e){if(!us.test(e.filepath))throw new Error(`${e.filepath} is not a valid JS file`);let t=e.preserveTemporaryFile??!!process.env.BUNDLE_REQUIRE_PRESERVE,s=e.cwd||process.cwd(),r=e.format??df(e.filepath),n=loadTsconfig.loadTsConfig(s,e.tsconfig),i=gf(n?.data.compilerOptions?.paths||{});async function o(d){if(!d.outputFiles)throw new Error("[bundle-require] no output files");let{text:p}=d.outputFiles[0],h=(e.getOutputFile||mf)(e.filepath,r);await fsExtra.writeFile(h,p,"utf8");let g,T=e.require||wo;try{g=await T(r==="esm"?url.pathToFileURL(h).href:h,{format:r});}finally{t||await fsExtra.unlink(h);}return {mod:g,dependencies:d.metafile?_e(d.metafile.inputs):[]}}let a=await esbuild.build({...e.esbuildOptions,entryPoints:[e.filepath],absWorkingDir:s,outfile:"out.js",format:r,write:!1,platform:"node",sourcemap:"inline",bundle:!0,metafile:!0,plugins:[...e.esbuildOptions?.plugins||[],hf({external:e.external,notExternal:i}),yf()]});return await o(a)}async function Pa(e){let t=null;for(let s of ["syncify.config.js","syncify.config.mjs","syncify.config.cjs","syncify.config.ts","syncify.config.json"]){if(t=path.join(e,s),await fsExtra.pathExists(t))break;t=null;}if(t===null)return null;try{if(t.endsWith(".json")){u.file.path=t,u.file.relative=path.relative(e,t),u.file.base=path.basename(t);let s=await fsExtra.readFile(t);return xo(s.toString())}else {u.file.path=t,u.file.relative=path.relative(e,t),u.file.base=path.basename(t);let s=await Nr({filepath:t});return s.mod.syncify||s.mod.default||s.mod}}catch(s){console.log(s);let r=path.join(e,"syncify.config.json");return await fsExtra.pathExists(r)?fsExtra.readJson(r):null}}async function Ia(e){let t=path.join(e,"package.json");if(!await fsExtra.pathExists(t))throw new Error('Missing "package.json" file');try{u.pkg=await fsExtra.readJson(t);}catch(r){throw new Error(r)}}async function ja(e,t={purge:!1}){if(u.dirs.cache=`${e}/`,!await fsExtra.pathExists(e))try{await fsExtra.mkdir(e);}catch(r){throw new Error(r)}for(let r of ao)if(r==="sections")be[r]=[];else {be[r]={};let n=path.join(e,r,"/");if(await fsExtra.pathExists(n))t.purge&&await fsExtra.emptyDir(n);else {try{await fsExtra.mkdir(n);}catch(o){throw new Error(o)}z(be[r],{uri:n,data:{}});}z(be[r],{uri:n,data:{}});}fsExtra.writeJson(path.join(e,"store.map"),be,{spaces:0},r=>{if(r)throw r});}async function ji(e){if(await fsExtra.pathExists(e)){if(u.mode.clean)try{await fsExtra.emptyDir(e);}catch(s){console.error(s);}}else try{await fsExtra.mkdir(e);}catch(s){throw new Error(s)}for(let s of po){let r=path.join(e,s);if(!await fsExtra.pathExists(r))try{await fsExtra.mkdir(r);}catch(i){throw new Error(i)}}}function Na(e){let{config:t,cwd:s,mode:r,dirs:n}=u,i=Yu(s);for(let[o,a]of lo){let l;if(o==="import"){r.download?f("output",e)?u.dirs[o]=i(e.output):u.dirs[o]=i(t.import):u.dirs[o]=i(t.import);continue}else if(o==="export"){r.download?f("output",e)?u.dirs[o]=i(e.output):u.dirs[o]=i(t.export):u.dirs[o]=i(t.export);continue}else if(f(o,e)&&e[o]===a)if(t[o]===a){u.dirs[o]=i(e[o]);continue}else l=t[o];else P(e[o])?l=e[o]:l=t[o];if(v(l)){let d=zr(l.map(i));n[o]=d.length===1?d[0]:d;}else P(l)?n[o]=i(l):(console.log(l,o,a),k({option:"config",name:o,provided:l,expects:"string"}));}u.watch.add(u.file.path);}async function La(){let{dirs:e,sync:t,mode:s}=u;if(!s.download)return;if(!await fsExtra.pathExists(e.import))try{await fsExtra.mkdir(e.import);}catch(n){throw new Error(n)}for(let n in t.themes){let{store:i,target:o}=t.themes[n],a=path.join(e.import,i);if(await fsExtra.pathExists(a)){if(s.clean)try{await fsExtra.emptyDir(a);}catch(d){console.error(d);}}else try{await fsExtra.mkdir(a);}catch(d){throw new Error(d)}await ji(path.join(a,o));}}function Ma(e){if(!f("sections",e.views))return;let{sections:t}=e.views;if(!N(e.views.sections)&&!(G(t)&&Z(t))){G(t)||k({option:"views",name:"sections",expects:"{}",provided:typeof t});for(let s in u.section){if(s==="prefixDir")if(de(t[s])){u.section[s]=t[s];continue}else k({option:"views.sections",name:s,provided:t[s],expects:"boolean"});if(s==="separator")if(P(t[s]))if(/[@:_-]/.test(t[s])){u.section[s]=t[s];continue}else ge("view.sections",s,t[s],"@ | _ | : | -");else k({option:"views.sections",name:s,provided:t[s],expects:"string"});if(s==="global"){let r=P(t[s])?[t[s]]:t[s];if(v(r)){if(r.length>0){u.section[s]=new RegExp(`${r.join("|")}`);continue}}else k({option:"views.sections",name:s,provided:t[s],expects:"string | string[]"});}}}}function qa(e){if(!f("snippets",e.views))return;let{snippets:t}=e.views;if(!N(t)&&!(G(t)&&Z(t))){G(t)||k({option:"views",name:"snippets",expects:"{}",provided:typeof t});for(let s in u.snippet){if(s==="prefixDir")if(de(t[s])){u.snippet[s]=t[s];continue}else k({option:"views.snippets",name:s,provided:t[s],expects:"boolean"});if(s==="separator")if(P(t[s]))if(/[.@:_-]/.test(t[s])){u.section[s]=t[s];continue}else ge("sections",s,t[s],"@ | _ | : | - | .");else k({option:"views.snippets",name:s,provided:t[s],expects:"string"});if(s==="global"){let r=P(t[s])?[t[s]]:t[s];if(v(r)){if(r.length>0){u.snippet[s]=new RegExp(`${r.join("|")}`);continue}}else k({option:"views.snippets",name:s,provided:t[s],expects:"string | string[]"});}}}}function Ga(e){if(!f("json",e.processors))return;let{json:t}=e.processors;if(!N(t)&&!(G(t)&&Z(t))){G(t)||k({option:"processors",name:"json",expects:"{}",provided:typeof t});for(let s in t){if(s==="indent")if(Hr(t[s])){K.json[s]=t[s];continue}else k({option:"json",name:s,provided:t[s],expects:"number"});if(s==="useTab")if(de(t[s])){K.json[s]=t[s];continue}else k({option:"json",name:s,provided:t[s],expects:"boolean"});if(s==="exclude"){let r=P(t[s])?[t[s]]:t[s];if(v(r)){K.json[s]=za__default.default(r);continue}else k({option:"json",name:s,provided:r[s],expects:"string | string[]"});}}}}function Mr(e,t){return !!(f("devDependencies",e)&&f(t,e.devDependencies)&&f(t,e.devDependencies)||f("dependencies",e)&&f(t,e.dependencies)||f("peerDependencies",e)&&f(t,e.peerDependencies)||f("optionalDependencies",e)&&f(t,e.peerDependencies))}async function Sf(e){for(let t of ["js","cjs","mjs"]){let s=`${e}.${t}`;if(await fsExtra.pathExists(`${s}.${t}`))return s}return null}async function Qs(e){try{let t=await Sf(e);if(t!==null){let s=await Nr({filepath:t});return {path:t,config:s.mod.syncify||s.mod.default||s.mod}}return null}catch{return null}}function Ni(e,t){let s=t,r=Ve(e),n=path.extname(e),i=path.basename(e,n);return H(t)?{dir:r,ext:n,file:i,name:i}:(/(\[dir\])/.test(s)&&(s=s.replace("[dir]",r)),/(\[file\])/.test(s)&&(s=s.replace("[file]",i)),/(\.?\[ext\])/.test(s)&&(s=s.replace(/\.?\[ext\]/,n)),{ext:n,file:i,dir:r,name:t.replace(t,s)})}function Li(e,t,s){let r=e+"_api_token";if(f(r,t)||(r=r.toUpperCase()),f(r,t))return {baseURL:`https://${e}.myshopify.com/admin`,headers:{"X-Shopify-Access-Token":t[r]}};let n=e+"_api_key",i=e+"_api_secret";if(f(n,t)||(n=n.toUpperCase()),f(i,t)||(i=i.toUpperCase()),f(n,t)&&f(i,t))return {baseURL:`https://${e}.myshopify.com/admin`,auth:{username:t[n],password:t[i]}};s===1?ae(`Invalid or missing ${O(e+".myshopify.com")} credentials`,[`Your shop credentials in the ${O.bold(".env")} file could`,"not be read correctly or are missing."]):s===2&&ae(`Missing credentials for: ${O(e+".myshopify.com")}`,`
212
+ You need to provide shop credentials within a ${O.bold(".env")} file.
213
+ Please check you project setup and ensure you have correctly provided authorization.`);}function Me(e,t){let{cwd:s}=u,r=Ee(t)?[]:!1,n=Ae("Path Resolver"),i=Zt(u.dirs.input);if(v(e)){let o=[];for(let a of e){let l=i(a),d=Wa__default.default.sync(l,{cwd:s,absolute:!0});if(r){let p=t(l);P(p)?r.push(p):v(p)&&r.push(...p);}d.length===0?n("No files can be resolved in",a):o.push(...d);}return r?{paths:o,match:za__default.default(r)}:o}if(P(e)){let o=i(e),a=Wa__default.default.sync(o,{cwd:s});if(a.length===0&&n("No files can be resolved in",e),r){let l=t(o);P(l)?r.push(l):v(l)&&r.push(...l);}return r?{paths:a,match:za__default.default(r)}:a}k({option:"uri",name:"uri/path",provided:e,expects:"string | string[]"});}function ir(e,t){if(f("assertSnippet",t)||(t.assertSnippet=!0),P(e)){let{paths:s,match:r}=Me(e,n=>(t.addWatch&&u.watch.add(n),ht(n)));if(s){if(t.flatten)return s.map(n=>t.assertSnippet?{input:n,rename:path.basename(n),snippet:!1}:{input:n,rename:path.basename(n)});{let n={input:s,rename:"[name].[ext]",match:r};return t.assertSnippet&&(n.snippet=!1),n}}}else if(v(e)){if(e.every(P)){let{paths:s,match:r}=Me(e,n=>(t.addWatch&&u.watch.add(n),ht(n)));if(t.flatten)return s.map(n=>t.assertSnippet?{input:n,rename:path.basename(n),snippet:!1}:{input:n,rename:path.basename(n)});{let n={input:s,rename:"[name].[ext]",match:r};return t.assertSnippet&&(n.snippet=!1),n}}else if(e.every(G))return e.map(s=>{f("input",s)||ge("tranform","input",s,"{ input: string | string[] }");let{paths:r,match:n}=Me(e,i=>(t.addWatch&&u.watch.add(i),ht(i)));return s.match=n,s.input=r,t.assertSnippet&&!f("snippet",s)&&(s.snippet=!1),f("rename",s)||(s.rename=s.snippet?"[name].liquid":"[name].[ext]"),s})}else if(G(e)){let s=[];if(f("input",e)){let{paths:r,match:n}=Me(e.input,i=>(t.addWatch&&u.watch.add(i),ht(i)));if(t.assertSnippet&&!f("snippet",e)&&(e.snippet=!1),f("rename",e)||(e.rename=e.snippet?"[name].liquid":"[name].[ext]"),t.flatten)for(let i of r)s.push(z(e,{input:i}));else e.input=r,e.match=n,s.push(e);}else for(let r in e){let n={snippet:r.startsWith("snippets/")},i=r.startsWith("assets/"),o=e[r],a=i||n.snippet;if(P(o)){a&&(n.rename=i?r.slice(7):r.slice(9));let{paths:l,match:d}=Me(o,p=>(t.addWatch&&u.watch.add(p),ht(p)));if(l)if(t.flatten)for(let p of l)s.push(z({},n,{input:p}));else s.push(z({},n,{input:l,match:d}));}else if(G(o)){f("input",o)||ge("tranform",r,o,"{ input: string | string[] }");let{paths:l,match:d}=Me(o.input,p=>(t.addWatch&&u.watch.add(p),ht(p)));if(l){let p=a?z({},o,n,{rename:i?r.slice(7):r.slice(9)}):z({},n,o);if(t.flatten)for(let c of l)s.push(z(p,{input:c}));else s.push(z(p,{input:l,match:d}));}}else if(v(o))if(o.every(P)){let{paths:l,match:d}=Me(o,p=>(t.addWatch&&u.watch.add(p),ht(p)));if(Fo(r)&&(n.rename=path.basename(r)),l)if(t.flatten)for(let p of l)s.push(z({},n,{input:p}));else s.push(z({},n,{input:l,match:d}));}else k({option:"transform",name:r,provided:o,expects:"string[]"});}return s}}function Mi(e){let{pkg:t}=u;return he(f("devDependencies",t)&&f(e,t.devDependencies),f("dependencies",t)&&f(e,t.dependencies),f("peerDependencies",t)&&f(e,t.peerDependencies),f("optionalDependencies",t)&&f(e,t.peerDependencies))}function Ua(e,t){let s=t,r=Ve(e),n=path.extname(e),i=path.basename(e,n);return H(t)?{dir:r,ext:n,file:i,name:i}:(/(\[dir\])/.test(s)&&(s=s.replace("[dir]",r)),/(\[file\])/.test(s)&&(s=s.replace("[file]",i)),/(\.?\[ext\])/.test(s)&&(s=s.replace(/\.?\[ext\]/,n)),{ext:n,file:i,dir:r,name:t.replace(t,s)})}async function Ha(e){if(!f("script",e.transforms)||e.transforms.script===!1)return;let t=Ae("script transform option"),{esbuild:s}=K,{script:r}=e.transforms;if(s.installed=Mr(u.pkg,"esbuild"),s.installed){pa()||ae("failed to import ESBuild","Ensure you have installed esbuild");let a=await Qs("esbuild.config");a!==null&&(s.file=a.path,s.config=fe(s.config,a.config));}else Ne("esbuild");f("entryPoints",s.config)&&(t("processor option is not allowed and was omitted","entryPoints"),delete s.config.entryPoints);let n=ir(r,{addWatch:!1,flatten:!0}),i=sn(["input","watch","rename","snippet"]);f("absWorkingDir",s.config)||(s.config.absWorkingDir=u.cwd);for(let o of n){let{snippet:a}=o,l=a?"snippets":"assets",{name:d}=Ua(o.input,o.rename),p;!d.endsWith(".js")&&!d.endsWith(".mjs")?p=d+".js":d.endsWith(".cjs")?ge("rename","file extension",d,".js | .mjs"):p=d,a&&!/\.liquid$/.test(p)&&(p=p+".liquid");let c={uuid:We(),snippet:a,input:o.input,output:path.join(u.dirs.output,l,p),key:path.join(l,p),namespace:o.snippet?"snippets":"assets",size:NaN,watch:null,watchCustom:null,esbuild:null};if(u.mode.watch&&u.watch.unwatch(c.output),f("esbuild",o))if(de(o.esbuild)||N(o.esbuild))Z(i)?c.esbuild=fe(s.config):c.esbuild=fe(s.config,i);else if(typeof o.esbuild=="object"){for(let h in ["entryPoints","outdir","watch","absWorkingDir","watch","write","logLevel","incremental"])h==="entryPoints"&&f(h,o.esbuild)?t('Option is not allowed, use Syncify "input" instead',h):h==="outdir"&&f(h,o.esbuild)?t("Option is not allowed, Syncify will handle output",h):h==="watch"&&f(h,o.esbuild)?t("Option is not allowed, declare watch using Syncify",h):f(h,o.esbuild)&&t("Option is not allowed and will be ignored",h);f("plugins",o.esbuild)&&f("plugins",s.config)&&o.esbuild.plugins.unshift(...s.config.plugins),Z(i)?c.esbuild=fe(s.config,o.esbuild):c.esbuild=fe(s.config,o.esbuild,i);}else k({option:"script",name:"esbuild",provided:typeof o.esbuild,expects:"boolean | null | {}"});else Z(i)?c.esbuild=s.config:c.esbuild=fe(s.config,i);if(c.esbuild.entryPoints=[c.input],u.mode.watch)if(!f("watch",o))c.watch=new Set;else {v(o.watch)||k({option:"script",name:"watch",provided:o.watch,expects:"string[]"});let h=Me(o.watch);c.watchCustom=za__default.default(h),c.watch=new Set(h);}else c.watch=new Set;try{await fa(c);}catch(h){throw new Error(h)}u.mode.terse&&(c.esbuild=fe(c.esbuild,u.terser.script,{exclude:void 0})),u.script.push(c);}s.loaded=!0;}async function Ya(e){if(!f("style",e.transforms))return;let{postcss:t,sass:s}=K,r=Ae("style transform option");if(s.installed=Mr(u.pkg,"sass"),s.installed&&(await Bi("sass")||ae("Unable to dynamically import SASS","Ensure you have installed sass")),t.installed=Mr(u.pkg,"postcss"),t.installed){await Bi("postcss")||ae("Unable to dynamically import PostCSS","Ensure you have installed postcss");let a=await Qs("postcss.config");a!==null&&(t.file=a.path,t.config=a.config);}let n=ir(e.transforms.style,{addWatch:!1,flatten:!0}),i=Zt(e.input);for(let o of n){let a={uuid:We(),input:o.input,watch:null,postcss:!1,sass:!1};if(f("postcss",o)){let p=G(o.postcss);(de(o.postcss)||p)&&!N(o.postcss)?o.postcss!==!1&&(t.installed||Ne("postcss"),a.postcss=p?fe(t.config,o.postcss):!0):k({option:"style",name:"postcss",provided:a.postcss,expects:"boolean | {}"});}if(f("sass",o)&&o.sass!==!1||s.installed===!0){let p=G(o.sass);if((de(o.sass)||p)&&!N(o.sass))if(s.installed||Ne("sass"),!p)jt(a,"sass",{get(){return o.sass}});else {a.sass=z(s.config,o.sass);for(let c in o.sass)c==="sourcemap"||c==="warnings"?de(o.sass[c])?a.sass[c]=o.sass[c]:k({option:"sass",name:c,provided:o.sass[c],expects:"boolean"}):c==="style"?(P(o.sass[c])||k({option:"sass",name:c,provided:o.sass[c],expects:"string"}),o.sass[c]==="expanded"||o.sass[c]==="compressed"?a.sass[c]=o.sass[c]:ge("sass",c,o.sass[c],"expanded | compressed")):c==="includePaths"&&(v(o.sass[c])?a.sass[c]=zr(o.sass[c]).map(h=>path.join(u.cwd,h)):k({option:"sass",name:c,provided:o.sass[c],expects:"string[]"}));}else k({option:"style",name:"sass",provided:o.sass,expects:"boolean | {}"});!o.snippet&&!/\.s[ac]ss/.test(path.extname(a.input))&&r("Input is not a sass file",a.input);}let l=Ni(o.rename);f("rename",o)&&!N(o)&&(P(o.rename)||k({option:"styles",name:"rename",provided:o.rename,expects:"string"}),l=Ni(a.input,o.rename),/[a-zA-Z0-9_.-]+/.test(l.name)||k({option:"sass",name:"rename",provided:l,expects:"Characters: [a-zA-Z0-9_.-]"}),l.name.endsWith(".css")?a.rename=l.name:l.name.endsWith(".scss")?l.name=l.name.replace(".scss",".css"):l.name.endsWith(".sass")?l.name=l.name.replace(".sass",".css"):l.name.endsWith(".liquid")||(l.name=l.name+".css"));let d=[];if(u.mode.watch&&f("watch",o)){v(o.watch)||k({option:"styles",name:"watch",provided:o.watch,expects:"string[]"});for(let p of o.watch){let c=await Wa__default.default(path.join(u.cwd,i(p)));c.length===0&&p[0]!=="!"&&r("Cannot resolve watch glob/path uri",p);for(let h of c)fsExtra.existsSync(h)?d.push(h):r("No file exists in path",h);}d.push(a.input),d.forEach(p=>u.watch.add(p)),a.watch=za__default.default(d);}else a.watch=za__default.default([a.input]),u.watch.add(a.input);typeof a.sass=="object"&&(a.sass.include.unshift(u.cwd,path.join(u.cwd,l.dir)),ot("sass.include",o)&&(a.sass.include=o.sass.include.map(p=>path.join(u.cwd,p)))),f("snippet",o)&&(de(o.snippet)||k({option:"styles",name:"snippet",provided:o.snippet,expects:"boolean"}),a.snippet=o.snippet),a.snippet?(f("rename",a)||(a.rename=l.name),(!l.name.endsWith(".liquid")||!a.rename.endsWith(".liquid"))&&(a.rename=l.name+".liquid"),u.paths.transforms.set(a.input,7),u.mode.watch&&u.watch.unwatch(`${path.join(u.cwd,e.output,"snippets",a.rename)}`)):(a.rename=l.name,u.mode.watch&&u.watch.unwatch(`${path.join(u.cwd,e.output,"assets",l.name)}`)),u.style.push(a);}}async function Qa(e){if(!f("svg",e.transforms))return;let{sprite:t,svgo:s}=K,r=Ae("svg transform");s.installed=Mi("svgo"),s.installed&&(await Ti("svgo")||ae("Unable to dynamically import SVGO","Ensure you have installed svgo")),t.installed=Mi("svg-sprite"),t.installed&&(await Ti("svg-sprite")||ae("Unable to dynamically import SVG Sprite","Ensure you have installed svg-sprite")),!t.installed&&!s.installed&&Ne(["svgo","svg-sprite"]);let n=ir(e.transforms.svg,{addWatch:!0,flatten:!1});for(let i of n){let o=i.input.filter(l=>path.extname(l)!==".svg"?(r("Excluded file which is not an SVG type",path.relative(u.cwd,l)),!1):!0);if(o.length===0){r("No SVG file paths were resolved");continue}let a={uuid:We(),input:new Set(o),match:i.match,format:null,rename:i.rename,snippet:i.snippet};f("svgo",i)&&f("sprite",i)&&ge("transform","svg","svgo AND sprite","svgo OR sprite"),f("format",i)?i.format==="file"||i.format==="sprite"?(a.format=i.format,i.format==="file"?(a.svgo=!0,s.installed||Ne("svgo")):(a.sprite=!0,t.installed||Ne("svg-sprite"))):ge("transform > svg","format",i.format,'"sprite" | "file"'):f("svgo",i)?(s.installed||Ne("svgo"),a.format="file",a.svgo=G(i.svgo)?fe(s.config,i.svgo):!0):f("sprite",i)?(t.installed||Ne("svg-sprite"),a.format="sprite",a.sprite=G(i.sprite)?fe(t.config,i.sprite):!0):s.installed&&t.installed?Fu("transform.svg","format","sprite | file",[`SVG transforms require you to define ${O("format")} when both SVGO and SVG Sprite`,"processors are installed. Syncify needs to knows how is should handle the input and","which processor to use for the transform."]):s.installed&&!t.installed?(a.format="file",a.svgo=!0):t.installed&&!s.installed?(a.format="sprite",a.sprite=!0):Rt("transform > svg","Cannot resolve processor, try defining a format."),u.svg.push(a);}}function Ka(e){if(de(e.terser)){if(u.mode.terse===!1&&e.terser===!1)return;u.mode.terse===!1&&e.terser===!0&&(u.mode.terse=!0);}let t=Ae("terser configuration");if(typeof e.terser=="object")for(let s in e.terser){if(e.terser[s]===!1||N(e.terser[s])){u.mode.terse===!0&&(u.terse[s]=!0);continue}if(s==="script"&&K.esbuild.installed===!1&&(G(e.terser[s])&&Z(e.terser[s])===!1||de(e.terser[s])&&e.terser[s]===!0)&&ae("esbuild is not installed",fo),de(e.terser[s]))u.terser[s]=e.terser[s];else if(G(Oe[s])){if(Z(Oe[s]))continue;for(let r in e.terser[s]){let n=s==="views"?"liquid":s;f(r,Oe[n])||Rt(`terser.${s}`,r),r==="mangleProps"?!N(e.terser[s][r])&&!cr(Oe[n][r])&&k({option:`terser.${s}`,name:r,provided:`${typeof e.terser[s][r]} (${e.terser[s][r]})`,expects:"Regex | string | undefined"}):!N(e.terser[s][r])&&typeof Oe[n][r]!=typeof e.terser[s][r]&&k({option:`terser.${s}`,name:r,provided:typeof e.terser[s][r],expects:typeof Oe[n][r]}),r==="exclude"&&!Z(e.terser[s][r])?Oe[s][r]=Me(e.terser[s][r]):r==="collapseWhitespace"?Oe.html.collapseWhitespace=e.terser[s][r]:Oe[s][r]=e.terser[s][r];}}else t("unkown option provided",s);}}async function Xa(e,t){m.clear(),await Ia(e.cwd),await Jf(e),u.version="0.2.0-beta",u.mode=Mf(e),u.cwd=e.cwd,u.env.cli=e.cli,u.env.prod=e.prod,u.env.dev=e.dev&&!e.prod,u.logger.silent=e.silent,process.env.SYNCIFY_ENV=u.env.dev?"dev":"prod",process.env.SYNCIFY_WATCH=String(u.mode.watch);let{config:s,cwd:r}=u,n=await Promise.all([qf(e.watch,r),Na(e),Hf(r),ji(u.dirs.output),La(),Yf(e,s),Qf(s),Vf(e),Wf(s),Ma(s),qa(s),Ga(s),Ha(s),Ya(s),Qa(s),Ka(s),Uf(s),zf(s),Gf(s)]).catch(i=>{console.log(i);});return m.start(u),n}function Mf(e){let t=he(e.pages,e.metafields,e.redirects),s=he(e.style,e.script,e.image,e.svg),r=he(t,e.upload,e.download)?!1:e.watch,n=z(u.mode,{watch:r,hot:r&&e.hot,vsc:e.vsc,interactive:e.interactive,export:e.export,import:e.import,redirects:e.redirects,metafields:e.metafields,pages:e.pages,pull:e.pull,force:e.force,script:s?e.script:!1,style:s?e.style:!1,image:s?e.image:!1,svg:s?e.svg:!1,terse:he(e.terse,e.prod),clean:he(t,s,e.upload)?!1:e.clean,build:he(e.export,e.watch,e.download)?!1:e.build,upload:he(s,r)?!1:e.upload,download:he(t,s,e.upload,e.watch,e.build)?!1:e.download});return it(...Vr(n))&&Yt({message:["Execution is unclear, you have not provided Syncify a operation mode to run."],expected:"--<cmd>",fix:["Syncify requires that you provide an operation. In most cases, this","error occurs when you have forgotten to pass the mode, for example:","",`${C("$")} ${C(`syncify ${u.argv} ${E("--watch")}`)}`,`${C("$")} ${C(`syncify ${u.argv} ${E("--build")}`)}`,`${C("$")} ${C(`syncify ${u.argv} ${E("--upload")}`)}`,"",`Run ${E("syncify --help")} for more information, or pass an execution`,`operation mode as per the ${E("expected")} value and ensure to replace ${E("--<cmd>")}`,"with one the examples provided or a supported mode."]}),n.build&&it(n.script,n.style,n.svg,n.pages,n.metafields,n.image)&&(n.script=!0,n.style=!0,n.svg=!0,n.image=!0),n}function qf(e,t){e?(u.watch=new chokidar.FSWatcher({persistent:!0,ignoreInitial:!0,usePolling:!0,interval:75,binaryInterval:100,ignored:["**/*.map"],ignorePermissionErrors:!0}),Object.defineProperties(u.watch,{has:{value(s,r=t){return u.watch._watched.get(r).items.has(s)}},paths:{get(){return ut(u.watch.values())}},watching:{get(){return u.watch._watched}}})):u.watch=new Set;}async function Gf(e){if(u.mode.watch!==!0||u.mode.hot===!1&&e.hot===!1)return;u.mode.hot===!1&&e.hot===!0&&(u.mode.hot=!0);let t=Ae("HOT Reloads");if(u.env.sync>1){t("HOT Reloads can only be used on 1 store");return}else if(u.sync.themes.length>1){t("HOT Reloads can only be used on 1 theme");return}it(G(e.hot),de(e.hot),N(e.hot))&&k({option:"config",name:"hot",provided:e.hot,expects:"boolean | {}"});let{hot:s}=u;if(G(e.hot)&&Z(e.hot)===!1)for(let r in e.hot)f(r,u.hot)||Rt(`hot.${r}`,e.hot[r]),r==="label"?e.hot[r]==="visible"||e.hot[r]==="hidden"?s[r]=e.hot[r]:ge("hot",r,e.hot[r],"visible | hidden"):r==="method"?e.hot[r]==="hot"||e.hot[r]==="refresh"?s[r]=e.hot[r]:ge("hot",r,e.hot[r],"hot | refresh"):r==="scroll"?e.hot[r]==="preserved"||e.hot[r]==="top"?s[r]=e.hot[r]:ge("hot",r,e.hot[r],"preserved | top"):typeof s[r]==typeof e.hot[r]?s[r]=e.hot[r]:k({option:"hot",name:r,provided:e.hot[r],expects:typeof s[r]});s.snippet=path.join(u.cwd,"node_modules","@syncify/cli",Fr),s.output=path.join(u.dirs.output,"snippets",Fr);for(let r of s.layouts)s.alive[path.join(u.dirs.output,"layout",r)]=!1;u.wss=Ba();}function Wf(e){for(let t in e.processors)K[t].config=v(e.processors[t])?e.processors[t]:z(K[t].config,e.processors[t]);}function zf(e){if(f("plugins",e)&&v(e.plugins))for(let t of e.plugins)f("onInit",t)&&t.onInit.call({...u},e),f("onChange",t)&&wt.onChange.push([t.name,t.onChange]),f("onTransform",t)&&wt.onTransform.push([t.name,t.onTransform]),u.mode.watch&&(f("onWatch",t)&&wt.onWatch.push([t.name,t.onWatch]),f("onReload",t)&&wt.onReload.push([t.name,t.onReload])),u.mode.build&&f("onBuild",t)&&wt.onBuild.push([t.name,t.onBuild]);}function Uf(e){let{mode:t,spawn:s}=u;if(!f("spawn",e)||N(e.spawn))return;G(e.spawn)||k({option:"config",name:"spawn",provided:e.spawn,expects:"{ build: {}, watch: {} }"});let r=null;if(t.build&&f("build",e.spawn)&&(r="build"),t.watch&&f("watch",e.spawn)&&(r="watch"),!(N(t)||N(e.spawn[r])||(G(e.spawn[r])||k({option:"spawn",name:r,provided:e.spawn[r],expects:"{ build: {}, watch: {} }"}),_e(e.spawn[r]).length===0))){for(let i in e.spawn[r]){let o=e.spawn[r][i];if(P(o)){u.spawn.commands[i]={cmd:S,args:[],pid:NaN};let a=o.trimStart().indexOf(ye)>-1?o.trimStart().split(ye):[o];u.spawn.commands[i].cmd=a.shift(),u.spawn.commands[i].args=a,ki(i,u.spawn.commands[i],m.spawn(i));}else if(v(o)){let a=o.shift();u.spawn.commands[i]={cmd:a,args:o,pid:NaN},ki(i,u.spawn.commands[i],m.spawn(i));}else k({option:"spawn",name:r,provided:e.spawn[r],expects:"string | string[]"});}Ys(()=>{W.pause(),W.clear(),m.nwl(S),s.streams.forEach((i,o)=>{Q(`- ${D(`pid: #${i.pid} (${o}) process exited`)}`),i.kill();}),m.nwl(S),s.streams.clear(),process.exit(0);});}}function Vf(e){if(!f("filter",e))return;let t=new RegExp(`^(${["assets","config","locales","metafields","layout","pages","customers","templates","snippets","sections"].join("|")})`),s=e.filter.replace(/\s+/g," ").trim();if(s.indexOf(",")>-1){let n=s.split(",").filter(Boolean).map(i=>i.trim());for(let i of n)i[0]==="!"?t.test(i.slice(1))||r("dir",i):i[0]==="*"||i[0]==="/"||i[0]==="."?r("pattern",s):(t.test(i)||r("dir",i),i.indexOf("/")>-1||(v(u.filters[i])||(u.filters[i]=[]),u.filters[i].push(i)));}else s[0]==="*"||s[0]==="/"||s[0]==="."?r("pattern",s):s.indexOf("/")>-1||(v(u.filters[s])||(u.filters[s]=[]),u.filters[s].push(s));function r(n,i){let o=[];n==="pattern"?(o.push(`Invalid ${E("--filter")} pattern provided. You cannot pass starting point`),i[0]==="*"?o.push(`glob (${E("*")}) stars as filters, Syncify does not support this.`):i[0]==="/"?o.push(`path (${E("/")}) roots as filters, Syncify does not support this.`):i[0]==="."&&o.push(`dot paths (${E(".")}) as filters, Syncify does not support this.`),o.push(`Use a starting point directory name based on the ${E("paths")} key property`,`in your ${E(u.file.base)} file.`)):o.push(`Invalid directory provided. The ${E("--filter")} pattern expects the starting point`,"directory path be one of the following:","",`${C("-")} ${E("assets")}`,`${C("-")} ${E("config")}`,`${C("-")} ${E("locales")}`,`${C("-")} ${E("metafields")}`,`${C("-")} ${E("layout")}`,`${C("-")} ${E("pages")}`,`${C("-")} ${E("customers")}`,`${C("-")} ${E("templates")}`,`${C("-")} ${E("snippets")}`,`${C("-")} ${E("sections`")}`,""),Yt({message:o,expected:"--filter <dir>",fix:[`The ${E("--filter")} (or ${E("-f")}) flag command argument expects you`,"provide a theme output directory as the starting point. Filtering begins with","a Shopify output directory name, for example:","",`${C("$")} ${C(`syncify --filter ${E("sections/file.liquid")}`)}`,`${C("$")} ${C(`syncify --filter ${E("snippets/*")}`)}`,`${C("$")} ${C(`syncify --filter ${E("templates/*.json")}`)}`,`${C("$")} ${C(`syncify --filter ${E("!assets/some-file.ext")}`)}`,"",`Syncify will automatically resolve files from within your defined ${F("input")} directory`,"based on the starting point directory name. You can pass glob star matches following the",`directory namespace or starting point ignores (${E("!")}) as long the directory can match.`]});}}async function Hf(e){let t=path.join(e,"node_modules/.syncify"),s=path.join(t,"store.map");if(!await fsExtra.pathExists(s))return ja(t);u.dirs.cache=`${t}/`;let n=await fsExtra.readJson(s);z(be,n);}async function Jf(e){let t=await Pa(e.cwd);t!==null?u.config=t:f("syncify",u.pkg)?u.config=u.pkg.syncify:wu(e.cwd);}function Yf(e,t){let s=he(u.mode.metafields,u.mode.pages,u.mode.redirects),r=he(u.mode.watch,u.mode.upload,u.mode.download);if(e._.length===0){s&&Yt({message:["You have not provided store to target, which is required","when running in a resource mode that syncs to a remote source"],expected:"syncify <store>",fix:["Provide the store target name as the first command argument","followed by themes target/s and other flags."]});return}let n=e._[0].split(","),i=If__default.default.config({path:path.join(u.cwd,".env")}),o=v(t.stores)?t.stores:[t.stores],a=o.filter(({domain:d})=>tn(d,n)),l=a.length>1;for(let d of a){let p=`${d.domain}.myshopify.com`.toLowerCase(),c=i.error?Li(d.domain,process.env,2):Li(d.domain,i.parsed,1),h=u.sync.stores.push({store:d.domain,domain:p,client:c,queue:l})-1;if(u.mode.metafields||u.mode.pages)return;let g=f("theme",e)?e.theme.split(","):f(d.domain,e)?e[d.domain].split(","):_e(d.themes);for(let T of g)f(T,d.themes)||xu({type:"theme",expected:_e(d.themes).join(","),provided:T,message:[`Unknown theme target (${E(T)}) provided to ${E(d.domain)} store`,`Your ${E(u.file.base)} file contains no such theme using this name.`],fix:[`Provide an ${E("expected")} theme target or update/add an existing target.`,`You have ${E(`${g.length}`)} theme targets defined for ${E(d.domain)}:`,"",`${dt} ${g.join(`
214
+ ${dt} `)}`,""]}),u.sync.themes.push({target:T,sidx:h,store:p,id:d.themes[T],url:`/themes/${d.themes[T]}/assets.json`});}if(s&&u.sync.stores.length===0)return Yt({expected:"syncify <store>",message:["You have not provided store to target, which is required","when running in a resource mode that syncs to a remote source"],fix:["Provide the store target name as the first command argument followed by themes","target/s and other flags. Based on your current configuration:","",`${dt} ${C("$")} syncify ${o.join(`
215
+ ${dt} ${C("$")} syncify `)}`,""]});if(u.sync.themes.length===0&&r)return Yt({expected:"-t <theme>",message:["You have not provided a theme to target, which is required","when running this resource mode."],fix:[`Provide a theme name to target following a ${E("-t")} or ${E("--theme")} flag.`,"Theme targets should be passed as the 2nd argument, the 1st argument should be store name/s."]});u.sync.stores.length===0&&ae("Unknown, missing or invalid store/theme targets","Check your store config"),u.sync.stores.length===1&&u.sync.themes.length===1?u.env.sync=1:(u.sync.stores.length>1||u.sync.themes.length>1)&&(u.env.sync=2);}async function Qf(e){let t=Zt(u.dirs.input),s=Ae("path resolution");for(let r of co){let n;r==="customers"?n=f(r,e.paths)?v(e.paths[r])?e.paths[r].map(t):[t(e.paths[r])]:[t("templates/customers")]:f(r,e.paths)?(n=v(e.paths[r])?e.paths[r].map(t):[t(e.paths[r])],r==="assets"&&n.push(path.join(u.dirs.output,"assets/*"))):r==="redirects"&&f(r,e.paths)?n=[path.join(u.cwd,e.paths[r])]:n=[t(r)];for(let i of n)(await Wa__default.default(i)).length===0&&s("No files could be resolved in",path.relative(u.cwd,i)),u.watch.add(i);u.paths[r]=za__default.default(n);}}var kw={get dev(){return process.env.SYNCIFY_ENV==="dev"},get prod(){return process.env.SYNCIFY_ENV==="prod"},get watch(){return process.env.SYNCIFY_WATCH==="true"},get options(){return u.config}};async function ur(e,t,s){if(process.stdin.on("data",_i),f("_",e)&&(e._=e._.slice(1)),e.help)return console.info($a);await Xa(e),process.on("SIGINT",Au),process.stdin.on("data",_i),process.on("uncaughtException",Ru),process.on("unhandledRejection",Tu),u.mode.hot&&await va();try{if(u.mode.build)return Fa(s);if(u.mode.watch)return wa(s);if(u.mode.upload)return ua(s);if(u.mode.download)return aa(s);if(u.mode.export)return console.log("TODO")}catch(r){console.log(r),m.throws(r);}}var Nw=e=>e;function Kf(e,t){if(P(e)){if(/watch|build|download|upload/.test(e))return s=>ur({cli:!1,[e]:!0},t,s)}else if(G(e)){if(!H(t))throw new Error("You cannot provide options when running instance");return {watch:s=>ur({cli:!1,watch:!0},t,s),build:s=>ur({cli:!1,build:!0},t,s),download:s=>ur({cli:!1,download:!0},t,s),upload:s=>ur({cli:!1,upload:!0},t,s)}}}var Lw=Kf;
185
216
 
186
- exports.a = D;
187
- exports.b = Ix;
188
- exports.c = jx;
189
- exports.d = _x;
190
- exports.e = Lt;
217
+ exports.a = m;
218
+ exports.b = Nw;
219
+ exports.c = Lw;
220
+ exports.d = kw;
221
+ exports.e = ur;