@syncify/cli 0.2.3-beta → 0.3.0-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 +192 -177
- package/dist/cli.js +1 -2
- package/hot.js.liquid +1 -1
- package/package.json +28 -26
- package/pnpm-lock.yaml +957 -513
- package/readme.md +437 -269
- package/types/api.d.ts +2 -2
- package/types/bundle/cache.d.ts +101 -0
- package/types/{internal → bundle}/hot.d.ts +33 -2
- package/types/{internal → bundle}/index.d.ts +113 -23
- package/types/{internal → bundle}/requests.d.ts +95 -9
- package/types/{internal → bundle}/shared.d.ts +1 -1
- package/types/cli.d.ts +6 -0
- package/types/config/index.d.ts +42 -22
- package/types/config/terser.d.ts +74 -22
- package/types/config/views.d.ts +0 -43
- package/types/index.d.ts +15 -15
- package/types/modules/html-minifier-terser.d.ts +7 -0
- package/types/stores.d.ts +11 -0
- package/types/transforms/image.d.ts +1 -1
- package/types/transforms/json.d.ts +10 -1
- package/types/{internal/markdown.d.ts → transforms/pages.d.ts} +150 -0
- package/types/transforms/script.d.ts +3 -3
- package/types/transforms/style.d.ts +2 -2
- package/types/transforms/svg.d.ts +2 -2
- package/types/internal/cache.d.ts +0 -97
- /package/types/{internal → bundle}/commands.d.ts +0 -0
- /package/types/{internal → bundle}/errors.d.ts +0 -0
- /package/types/{internal → bundle}/file.d.ts +0 -0
- /package/types/{internal → bundle}/filters.d.ts +0 -0
- /package/types/{internal → bundle}/plugin.d.ts +0 -0
- /package/types/{internal → bundle}/processors.d.ts +0 -0
- /package/types/{internal → bundle}/reports.d.ts +0 -0
package/dist/cjs.js
CHANGED
@@ -1,221 +1,236 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
var
|
4
|
-
var
|
3
|
+
var util = require('util');
|
4
|
+
var es = require('process');
|
5
|
+
var child_process = require('child_process');
|
6
|
+
var pathe = require('pathe');
|
7
|
+
var url = require('url');
|
8
|
+
var Kl = require('axios');
|
5
9
|
var events = require('events');
|
6
10
|
var module$1 = require('module');
|
7
|
-
var
|
11
|
+
var sc = require('zlib');
|
8
12
|
var stream = require('stream');
|
9
13
|
var console$1 = require('console');
|
10
14
|
var perf_hooks = require('perf_hooks');
|
11
|
-
var
|
12
|
-
var
|
13
|
-
var
|
14
|
-
var
|
15
|
-
var url = require('url');
|
16
|
-
var vu = require('node-notifier');
|
17
|
-
var Wa = require('fast-glob');
|
15
|
+
var ic = require('os');
|
16
|
+
var mu = require('readline');
|
17
|
+
var ks = require('node-notifier');
|
18
|
+
var cl = require('fast-glob');
|
18
19
|
var fsExtra = require('fs-extra');
|
19
|
-
require('
|
20
|
-
var
|
20
|
+
var path = require('path');
|
21
|
+
var Ys = require('prompts');
|
22
|
+
var utils = require('markdown-it/lib/common/utils');
|
23
|
+
var pl = require('anymatch');
|
21
24
|
var htmlMinifierTerser = require('html-minifier-terser');
|
22
|
-
var
|
23
|
-
require('turndown');
|
24
|
-
require('
|
25
|
-
var
|
26
|
-
var ws = require('ws');
|
27
|
-
var
|
28
|
-
var
|
29
|
-
var
|
25
|
+
var Zf = require('gray-matter');
|
26
|
+
var tm = require('turndown');
|
27
|
+
var rm = require('markdown-it');
|
28
|
+
var sm = require('@liquify/highlight');
|
29
|
+
var ws$1 = require('ws');
|
30
|
+
var pm = require('serve-static');
|
31
|
+
var fm = require('finalhandler');
|
32
|
+
var mm = require('http');
|
30
33
|
var chokidar = require('chokidar');
|
31
|
-
var Pf = require('dotenv');
|
32
|
-
var nf = require('cross-spawn');
|
33
34
|
var loadTsconfig = require('load-tsconfig');
|
34
35
|
var esbuild = require('esbuild');
|
36
|
+
var Om = require('dotenv');
|
37
|
+
var Mm = require('cross-spawn');
|
38
|
+
var qm = require('tree-kill');
|
35
39
|
|
36
40
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
37
41
|
|
38
|
-
var
|
39
|
-
var
|
40
|
-
var
|
41
|
-
var
|
42
|
-
var
|
43
|
-
var
|
44
|
-
var
|
45
|
-
var
|
46
|
-
var
|
47
|
-
var
|
48
|
-
var
|
49
|
-
var
|
50
|
-
var
|
51
|
-
var
|
52
|
-
var
|
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 Yi=Je((JD,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 Ji(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],h=arguments.length,p,c;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),h){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(h-1);c<h;c++)p[c-1]=arguments[c];l.fn.apply(l.context,p);}else {var g=l.length,m;for(c=0;c<g;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),h){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(m=1,p=new Array(h-1);m<h;m++)p[m-1]=arguments[m];l[c].fn.apply(l[c].context,p);}}return !0};xe.prototype.on=function(t,s,r){return Ji(this,t,s,r,!1)};xe.prototype.once=function(t,s,r){return Ji(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=[],h=o.length;a<h;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(($d,vn)=>{var ct={};typeof vn>"u"?window.eastasianwidth=ct:vn.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((Ad,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 Tn=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=m=>!!o.find(T=>m.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,h=l==="true"||parseInt(l)>0,p="NO_COLOR"in i||a&&!h||t(/^-{1,2}(no-color|color=false|color=never)$/),c=a&&h||t(/^-{1,2}(color|color=true|color=always)$/),g=r&&"isTTY"in r&&/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM);return !p&&(c||g||n==="win32"||"CI"in i)})()?(e,t)=>({open:`\x1B[${e}m`,close:`\x1B[${t}m`}):()=>Wo,Rn=(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:Rn(...Tn(r));Ze[s]={get(){let i=Vo(this,n);return Ol(this,s,{value:i}),i}};}_n=Pl(()=>{},Ze),zo(e,_n);},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,_n),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
|
-
|
56
|
-
`,Re=e=>ye.repeat(e),A=e=>x.repeat(e);Ur(x);var Oe=Ur($);var z=Object.assign,jt=Object.defineProperty,_e=Object.keys,Vr=Object.values,ut=Array.from;Buffer.from;var S=Array.isArray,we=Buffer.isBuffer,H=ce("Undefined"),G=ce("Object"),me=ce("Boolean"),cr=ce("RegExp"),Hr=ce("Number"),P=ce("String"),Ee=ce("Function");ce("Async");var d={};ar(d,{build:()=>vc,changed:()=>kc,clear:()=>rt,deleted:()=>Mc,err:()=>Bc,exported:()=>Ic,external:()=>Ac,failed:()=>Vc,hline:()=>zn,hook:()=>Tc,ignored:()=>zc,importer:()=>jc,invalid:()=>Uc,minified:()=>qc,newGroup:()=>_c,nwl:()=>Qt,out:()=>v,process:()=>Bu,progress:()=>bu,reloaded:()=>Gc,retrying:()=>Lc,skipped:()=>Wc,spawn:()=>Jc,spinner:()=>si,start:()=>Eu,syncing:()=>Pc,throws:()=>Hc,transform:()=>Nc,unhook:()=>Rc,update:()=>At,upload:()=>Oc,write:()=>$c});var be={},pe={current:null,count:0,process:{}},Pe={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=Pe;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,views:!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 no=Ot(Yi(),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;}},Qi=e=>globalThis.DOMException===void 0?new on(e):new DOMException(e),Ki=e=>{let t=e.reason===void 0?Qi("This operation was aborted."):e.reason;return t instanceof Error?t:Qi(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(Ki(l)),l.addEventListener("abort",()=>{a(Ki(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`,h=s instanceof Error?s:new fr(l);typeof e.cancel=="function"&&e.cancel(),a(h);},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,mr,hr,lt,ts,gr,Qr,Ie,dr,ve,Kr,Be,yr,at,Xr,Xi,Zi,ro,eo,to,Zr,ln,cn,rs,so,es,ss=class extends Error{},xr=class extends no.default{constructor(t){var s,r,n,i;if(super(),oe.add(this),mr.set(this,void 0),hr.set(this,void 0),lt.set(this,0),ts.set(this,void 0),gr.set(this,void 0),Qr.set(this,0),Ie.set(this,void 0),dr.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,mr,t.carryoverConcurrencyCount,"f"),re(this,hr,t.intervalCap===Number.POSITIVE_INFINITY||t.interval===0,"f"),re(this,ts,t.intervalCap,"f"),re(this,gr,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",so).call(this,s.signal)]));let h=await l;r(h),this.emit("completed",h);}catch(l){if(l instanceof fr&&!s.throwOnTimeout){r();return}n(l),this.emit("error",l);}finally{w(this,oe,"m",ro).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")}};mr=new WeakMap,hr=new WeakMap,lt=new WeakMap,ts=new WeakMap,gr=new WeakMap,Qr=new WeakMap,Ie=new WeakMap,dr=new WeakMap,ve=new WeakMap,Kr=new WeakMap,Be=new WeakMap,yr=new WeakMap,at=new WeakMap,Xr=new WeakMap,oe=new WeakSet,Xi=function(){return w(this,hr,"f")||w(this,lt,"f")<w(this,ts,"f")},Zi=function(){return w(this,Be,"f")<w(this,yr,"f")},ro=function(){var t;re(this,Be,(t=w(this,Be,"f"),t--,t),"f"),w(this,oe,"m",Zr).call(this),this.emit("next");},eo=function(){w(this,oe,"m",cn).call(this),w(this,oe,"m",ln).call(this),re(this,dr,void 0,"f");},to=function(){let t=Date.now();if(w(this,Ie,"f")===void 0){let s=w(this,Qr,"f")-t;if(s<0)re(this,lt,w(this,mr,"f")?w(this,Be,"f"):0,"f");else return w(this,dr,"f")===void 0&&re(this,dr,setTimeout(()=>{w(this,oe,"m",eo).call(this);},s),"f"),!0}return !1},Zr=function(){if(w(this,ve,"f").size===0)return w(this,Ie,"f")&&clearInterval(w(this,Ie,"f")),re(this,Ie,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",to);if(w(this,oe,"a",Xi)&&w(this,oe,"a",Zi)){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,hr,"f")||w(this,Ie,"f")!==void 0||(re(this,Ie,setInterval(()=>{w(this,oe,"m",cn).call(this);},w(this,gr,"f")),"f"),re(this,Qr,Date.now()+w(this,gr,"f"),"f"));},cn=function(){w(this,lt,"f")===0&&w(this,Be,"f")===0&&w(this,Ie,"f")&&(clearInterval(w(this,Ie,"f")),re(this,Ie,void 0,"f")),re(this,lt,w(this,mr,"f")?w(this,Be,"f"):0,"f"),w(this,oe,"m",rs).call(this);},rs=function(){for(;w(this,oe,"m",Zr).call(this););},so=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"),io=Symbol("multiComment"),Dl=()=>"",dl=(e,t,s)=>e.slice(t,s).replace(/\S/g," "),ml=(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?dl:Dl,n=!1,i=!1,o=0,a="",l="",h=-1;for(let p=0;p<e.length;p++){let c=e[p],g=e[p+1];if(!i&&c==='"'&&(ml(e,p)||(n=!n)),!n)if(!i&&c+g==="//")a+=e.slice(o,p),o=p,i=pn,p++;else if(i===pn&&c+g===`\r
|
57
|
-
|
58
|
-
`)i=!1,a+=r(e,o,p),o=p;else if(!i&&c+g==="/*"){a+=e.slice(o,p),o=p,i=io,p++;continue}else if(i===io&&c+g==="*/"){p++,i=!1,a+=r(e,o,p+1),o=p+1;continue}else s&&!i&&(h!==-1?c==="}"||c==="]"?(a+=e.slice(o,p),l+=r(a,0,1)+a.slice(1),a="",o=p,h=-1):c!==" "&&c!==" "&&c!=="\r"&&c!==`
|
59
|
-
|
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
|
-
`)
|
62
|
-
`)
|
63
|
-
|
64
|
-
|
42
|
+
var es__default = /*#__PURE__*/_interopDefault(es);
|
43
|
+
var Kl__default = /*#__PURE__*/_interopDefault(Kl);
|
44
|
+
var sc__default = /*#__PURE__*/_interopDefault(sc);
|
45
|
+
var ic__default = /*#__PURE__*/_interopDefault(ic);
|
46
|
+
var mu__default = /*#__PURE__*/_interopDefault(mu);
|
47
|
+
var ks__default = /*#__PURE__*/_interopDefault(ks);
|
48
|
+
var cl__default = /*#__PURE__*/_interopDefault(cl);
|
49
|
+
var Ys__default = /*#__PURE__*/_interopDefault(Ys);
|
50
|
+
var pl__default = /*#__PURE__*/_interopDefault(pl);
|
51
|
+
var Zf__default = /*#__PURE__*/_interopDefault(Zf);
|
52
|
+
var tm__default = /*#__PURE__*/_interopDefault(tm);
|
53
|
+
var rm__default = /*#__PURE__*/_interopDefault(rm);
|
54
|
+
var sm__default = /*#__PURE__*/_interopDefault(sm);
|
55
|
+
var pm__default = /*#__PURE__*/_interopDefault(pm);
|
56
|
+
var fm__default = /*#__PURE__*/_interopDefault(fm);
|
57
|
+
var mm__default = /*#__PURE__*/_interopDefault(mm);
|
58
|
+
var Om__default = /*#__PURE__*/_interopDefault(Om);
|
59
|
+
var Mm__default = /*#__PURE__*/_interopDefault(Mm);
|
60
|
+
var qm__default = /*#__PURE__*/_interopDefault(qm);
|
61
|
+
|
62
|
+
var kl=Object.create;var tn=Object.defineProperty;var Pl=Object.getOwnPropertyDescriptor;var Ol=Object.getOwnPropertyNames;var jl=Object.getPrototypeOf,Nl=Object.prototype.hasOwnProperty;var rn=(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 Ze=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),gr=(e,t)=>{for(var s in t)tn(e,s,{get:t[s],enumerable:!0});},Il=(e,t,s,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Ol(t))!Nl.call(e,n)&&n!==s&&tn(e,n,{get:()=>t[n],enumerable:!(r=Pl(t,n))||r.enumerable});return e};var zt=(e,t,s)=>(s=e!=null?kl(jl(e)):{},Il(t||!e||!e.__esModule?tn(s,"default",{value:e,enumerable:!0}):s,e));var Fo=Ze((vD,hn)=>{var Yl=Object.prototype.hasOwnProperty,Ee="~";function Cr(){}Object.create&&(Cr.prototype=Object.create(null),new Cr().__proto__||(Ee=!1));function Ql(e,t,s){this.fn=e,this.context=t,this.once=s||!1;}function wo(e,t,s,r,n){if(typeof s!="function")throw new TypeError("The listener must be a function");var i=new Ql(s,r||e,n),o=Ee?Ee+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 ns(e,t){--e._eventsCount===0?e._events=new Cr:delete e._events[t];}function xe(){this._events=new Cr,this._eventsCount=0;}xe.prototype.eventNames=function(){var t=[],s,r;if(this._eventsCount===0)return t;for(r in s=this._events)Yl.call(s,r)&&t.push(Ee?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(s)):t};xe.prototype.listeners=function(t){var s=Ee?Ee+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=Ee?Ee+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=Ee?Ee+t:t;if(!this._events[a])return !1;var c=this._events[a],h=arguments.length,p,l;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,s),!0;case 3:return c.fn.call(c.context,s,r),!0;case 4:return c.fn.call(c.context,s,r,n),!0;case 5:return c.fn.call(c.context,s,r,n,i),!0;case 6:return c.fn.call(c.context,s,r,n,i,o),!0}for(l=1,p=new Array(h-1);l<h;l++)p[l-1]=arguments[l];c.fn.apply(c.context,p);}else {var m=c.length,D;for(l=0;l<m;l++)switch(c[l].once&&this.removeListener(t,c[l].fn,void 0,!0),h){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,s);break;case 3:c[l].fn.call(c[l].context,s,r);break;case 4:c[l].fn.call(c[l].context,s,r,n);break;default:if(!p)for(D=1,p=new Array(h-1);D<h;D++)p[D-1]=arguments[D];c[l].fn.apply(c[l].context,p);}}return !0};xe.prototype.on=function(t,s,r){return wo(this,t,s,r,!1)};xe.prototype.once=function(t,s,r){return wo(this,t,s,r,!0)};xe.prototype.removeListener=function(t,s,r,n){var i=Ee?Ee+t:t;if(!this._events[i])return this;if(!s)return ns(this,i),this;var o=this._events[i];if(o.fn)o.fn===s&&(!n||o.once)&&(!r||o.context===r)&&ns(this,i);else {for(var a=0,c=[],h=o.length;a<h;a++)(o[a].fn!==s||n&&!o[a].once||r&&o[a].context!==r)&&c.push(o[a]);c.length?this._events[i]=c.length===1?c[0]:c:ns(this,i);}return this};xe.prototype.removeAllListeners=function(t){var s;return t?(s=Ee?Ee+t:t,this._events[s]&&ns(this,s)):(this._events=new Cr,this._eventsCount=0),this};xe.prototype.off=xe.prototype.removeListener;xe.prototype.addListener=xe.prototype.on;xe.prefixed=Ee;xe.EventEmitter=xe;typeof hn<"u"&&(hn.exports=xe);});var Uo=Ze((ah,Pn)=>{var Dt={};typeof Pn>"u"?window.eastasianwidth=Dt:Pn.exports=Dt;Dt.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"};Dt.characterLength=function(e){var t=this.eastAsianWidth(e);return t=="F"||t=="W"||t=="A"?2:1};function zo(e){return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}Dt.length=function(e){for(var t=zo(e),s=0,r=0;r<t.length;r++)s=s+this.characterLength(t[r]);return s};Dt.slice=function(e,t,s){textLen=Dt.length(e),t=t||0,s=s||1,t<0&&(t=textLen+t),s<0&&(s=textLen+s);for(var r="",n=0,i=zo(e),o=0;o<i.length;o++){var a=i[o],c=Dt.length(a);if(n>=t-(c==2?1:0))if(n+c<=s)r+=a;else break;n+=c;}return r};});var Ho=Ze((lh,Vo)=>{Vo.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 lu=Ze(ys=>{Object.defineProperty(ys,"__esModule",{value:!0});var In=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]},gt=(e,t,s)=>t>e?t:e>s?s:e,gc=(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)},iu={open:"",close:""},T=(e=>{let t=D=>!!o.find(C=>D.test(C)),s=e||(typeof process<"u"?process:{}),{stdout:r,platform:n}=s,i=s.env||{},o=s.argv||[],a="FORCE_COLOR"in i,c=i.FORCE_COLOR,h=c==="true"||parseInt(c)>0,p="NO_COLOR"in i||a&&!h||t(/^-{1,2}(no-color|color=false|color=never)$/),l=a&&h||t(/^-{1,2}(color|color=true|color=always)$/),m=r&&"isTTY"in r&&/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM);return !p&&(l||m||n==="win32"||"CI"in i)})()?(e,t)=>({open:`\x1B[${e}m`,close:`\x1B[${t}m`}):()=>iu,Ln=(e,t,s)=>T(`38;2;${e};${t};${s}`,39),su=(e,t,s)=>T(`48;2;${e};${t};${s}`,49),yc={visible:iu,reset:T(0,0),inverse:T(7,27),hidden:T(8,28),bold:T(1,22),dim:T(2,22),faint:T(2,22),italic:T(3,23),underline:T(4,24),doubleUnderline:T(21,24),strikethrough:T(9,29),strike:T(9,29),frame:T(51,54),encircle:T(52,54),overline:T(53,55),black:T(30,39),red:T(31,39),green:T(32,39),yellow:T(33,39),blue:T(34,39),magenta:T(35,39),cyan:T(36,39),white:T(37,39),grey:T(90,39),gray:T(90,39),blackBright:T(90,39),redBright:T(91,39),greenBright:T(92,39),yellowBright:T(93,39),blueBright:T(94,39),magentaBright:T(95,39),cyanBright:T(96,39),whiteBright:T(97,39),bgBlack:T(40,49),bgRed:T(41,49),bgGreen:T(42,49),bgYellow:T(43,49),bgBlue:T(44,49),bgMagenta:T(45,49),bgCyan:T(46,49),bgWhite:T(47,49),bgBlackBright:T(100,49),bgRedBright:T(101,49),bgGreenBright:T(102,49),bgYellowBright:T(103,49),bgBlueBright:T(104,49),bgMagentaBright:T(105,49),bgCyanBright:T(106,49),bgWhiteBright:T(107,49)},{defineProperty:xc,defineProperties:wc,setPrototypeOf:ou}=Object,Fc=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,Cc=/(\r*\n)/g,uu=function(){let e=t=>t;return e.strip=t=>t.replace(Fc,""),e.extend=t=>{for(let s in t){let r=t[s],n=r.open!=null?r:Ln(...In(r));it[s]={get(){let i=au(this,n);return xc(this,s,{value:i}),i}};}Mn=wc(()=>{},it),ou(e,Mn);},e.extend(yc),e},au=({props:e},{open:t,close:s})=>{let r=(o,...a)=>Ec(o,a,r.props),n=t,i=s;return e!==void 0&&(n=e.openStack+t,i=s+e.closeStack),ou(r,Mn),r.props={open:t,close:s,openStack:n,closeStack:i,parent:e},r.open=n,r.close=i,r},Ec=(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=gc(i,s.close,s.open),s=s.parent;return ~i.indexOf(`
|
63
|
+
`)&&(i=i.replace(Cc,n+"$1"+r)),r+i+n},nu={ansi:e=>(t=>T(`38;5;${t}`,39))(gt(e,0,255)),bgAnsi:e=>(t=>T(`48;5;${t}`,49))(gt(e,0,255)),hex:e=>Ln(...In(e)),bgHex:e=>su(...In(e)),rgb:(e,t,s)=>Ln(gt(e,0,255),gt(t,0,255),gt(s,0,255)),bgRgb:(e,t,s)=>su(gt(e,0,255),gt(t,0,255),gt(s,0,255))},it={},Mn;for(let e in nu)it[e]={get(){return (...t)=>au(this,nu[e](...t))}};it.ansi256=it.fg=it.ansi,it.bgAnsi256=it.bg=it.bgAnsi;var bc=new uu;ys.Ansis=uu,ys.default=bc;});var pu=Ze((wh,qn)=>{var cu=lu();qn.exports=cu.default;qn.exports.Ansis=cu.Ansis;});var gu=Ze((Nh,ni)=>{var hu=(e,t)=>{for(let s of Reflect.ownKeys(t))Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(t,s));return e};ni.exports=hu;ni.exports.default=hu;});var xu=Ze((Ih,bs)=>{var Jc=gu(),Es=new WeakMap,yu=(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(Es.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 Jc(i,e),Es.set(i,r),i};bs.exports=yu;bs.exports.default=yu;bs.exports.callCount=e=>{if(!Es.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Es.get(e)};});var wu=Ze((Lh,Ss)=>{Ss.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Ss.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Ss.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");});var Su=Ze((Mh,Zt)=>{var ne=global.process,Nt=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"};Nt(ne)?(Fu=rn("assert"),Kt=wu(),Cu=/^win/i.test(ne.platform),Nr=rn("events"),typeof Nr!="function"&&(Nr=Nr.EventEmitter),ne.__signal_exit_emitter__?he=ne.__signal_exit_emitter__:(he=ne.__signal_exit_emitter__=new Nr,he.count=0,he.emitted={}),he.infinite||(he.setMaxListeners(1/0),he.infinite=!0),Zt.exports=function(e,t){if(!Nt(global.process))return function(){};Fu.equal(typeof e,"function","a callback must be provided for exit handler"),Xt===!1&&ii();var s="exit";t&&t.alwaysLast&&(s="afterexit");var r=function(){he.removeListener(s,e),he.listeners("exit").length===0&&he.listeners("afterexit").length===0&&$s();};return he.on(s,e),r},$s=function(){!Xt||!Nt(global.process)||(Xt=!1,Kt.forEach(function(t){try{ne.removeListener(t,vs[t]);}catch{}}),ne.emit=Bs,ne.reallyExit=oi,he.count-=1);},Zt.exports.unload=$s,It=function(t,s,r){he.emitted[t]||(he.emitted[t]=!0,he.emit(t,s,r));},vs={},Kt.forEach(function(e){vs[e]=function(){if(Nt(global.process)){var s=ne.listeners(e);s.length===he.count&&($s(),It("exit",null,e),It("afterexit",null,e),Cu&&e==="SIGHUP"&&(e="SIGINT"),ne.kill(ne.pid,e));}};}),Zt.exports.signals=function(){return Kt},Xt=!1,ii=function(){Xt||!Nt(global.process)||(Xt=!0,he.count+=1,Kt=Kt.filter(function(t){try{return ne.on(t,vs[t]),!0}catch{return !1}}),ne.emit=bu,ne.reallyExit=Eu);},Zt.exports.load=ii,oi=ne.reallyExit,Eu=function(t){Nt(global.process)&&(ne.exitCode=t||0,It("exit",ne.exitCode,null),It("afterexit",ne.exitCode,null),oi.call(ne,ne.exitCode));},Bs=ne.emit,bu=function(t,s){if(t==="exit"&&Nt(global.process)){s!==void 0&&(ne.exitCode=s);var r=Bs.apply(this,arguments);return It("exit",ne.exitCode,null),It("afterexit",ne.exitCode,null),r}else return Bs.apply(this,arguments)}):Zt.exports=function(){return function(){}};var Fu,Kt,Cu,Nr,he,$s,It,vs,Xt,ii,oi,Eu,Bs,bu;});function ae(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:Ue}=Array;function Ut(e){return Ue(e)?e.length>0:ae(e)==="Object"?Object.keys(e).length>0:!!e}function Me(...e){let t=0;for(;t<e.length;){let s=e[t];if(ae(s)==="Function"){if(Ut(s()))return !1}else if(Ut(s))return !1;t++;}return !0}function sn(e){return Ue(e)?e.length===0:ae(e)==="Object"?Object.keys(e).length===0:!e}function Yi(...e){let t=0;for(;t<e.length;){let s=e[t];if(ae(s)==="Function"){if(sn(s()))return !1}else if(sn(s))return !1;t++;}return !0}function ge(...e){let t=0;for(;t<e.length;){let s=e[t];if(ae(s)==="Function"){if(Ut(s()))return !0}else if(Ut(s))return !0;t++;}return !1}function Vr(e,t="."){return typeof e=="string"?e.split(t):e}function Ll(e,t){let s=t,r=0,n=Vr(e);for(;r<n.length;){if(s==null||s[n[r]]===null)return;s=s[n[r]],r++;}return s}function nn(e,t){if(arguments.length===1)return s=>nn(e,s);if(t!=null)return Ll(e,t)}function yr(e,t){if(!Ue(t))throw new Error(`Cannot read property 'indexOf' of ${t}`);let s=ae(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;)Hr(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 Ml(e,t){if(e.size!==t.size)return !1;let s=Qi(e.values()),r=Qi(t.values());return s.filter(i=>yr(i,r)===-1).length===0}function Ki(e){let t=e.__proto__.toString();return ["Error","TypeError"].includes(t)?[t,e.message]:[]}function Xi(e){return e.toDateString?[!0,e.getTime()]:[!1]}function Zi(e){return e.constructor!==RegExp?[!1]:[!0,e.toString()]}function Hr(e,t){if(arguments.length===1)return h=>Hr(e,h);let s=ae(e);if(s!==ae(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 h=Array.from(e),p=Array.from(t);if(h.toString()!==p.toString())return !1;let l=!0;return h.forEach((m,D)=>{l&&m!==p[D]&&!Hr(m,p[D])&&(l=!1);}),l}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=Xi(e),o=Xi(t);if(i[0])return o[0]?i[1]===o[1]:!1;if(o[0])return !1;let a=Ki(e),c=Ki(t);if(a[0])return c[0]?a[0]===c[0]&&a[1]===c[1]:!1;if(s==="Set")return Ml(e,t);if(s==="Object"){let h=Object.keys(e);if(h.length!==Object.keys(t).length)return !1;let p=!0;return h.forEach(l=>{if(p){let m=e[l],D=t[l];m!==D&&!Hr(m,D)&&(p=!1);}}),p}return !1}var ql="RAMBDAX_DELAY";function on(e){return new Promise(t=>{setTimeout(()=>{t(ql);},e);})}function un(e,t){if(arguments.length===1)return s=>un(e,s);if(typeof t=="string")return t.includes(e);if(!t)throw new TypeError(`Cannot read property 'indexOf' of ${t}`);return Ue(t)?yr(e,t)>-1:!1}async function eo(e,t){if(Ue(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 et(e,t){return arguments.length===1?async s=>eo(e,s):new Promise((s,r)=>{eo(e,t).then(s).catch(r);})}function me(e,t){return arguments.length===1?s=>me(e,s):ae(t)===e}async function to(e,t){let s=t.map((r,n)=>e(r,n));return Promise.all(s)}function ro(e,t){return arguments.length===1?async s=>to(e,s):new Promise((s,r)=>{to(e,t).then(s).catch(r);})}function an(e,t){if(arguments.length===1)return n=>an(e,n);if(t==null)return;let s=Vr(e,","),r={};for(let n in t)s.includes(n)||(r[n]=t[n]);return r}var Jr=class{constructor(){this.set=new Set,this.items={};}checkUniqueness(t){let s=ae(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?yr(t,this.items[s])===-1?(this.items[s].push(t),!0):!1:(this.items[s]=[t],!0)}};function Yr(e){let t=new Jr,s=[];return e.forEach(r=>{t.checkUniqueness(r)&&s.push(r);}),s}function d(e,t){return arguments.length===1?s=>d(e,s):t?t.hasOwnProperty(e):!1}function Ve(e,t){return arguments.length===1?s=>Ve(e,s):nn(e,t)!==void 0}function J(e){let t=ae(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 j(e){return e==null}function Qr(e,t){return arguments.length===1?s=>Qr(e,s):t.join(e)}function so(e){return typeof e=="string"?e[e.length-1]||"":e[e.length-1]}var {error:te,log:B,warn:no}=console,A="",ye=" ",w=`
|
64
|
+
`,He=e=>ye.repeat(e),P=e=>w.repeat(e);Qr(w);var Te=Qr(A),Je=Object.create,U=Object.assign,Vt=Object.defineProperty,Re=Object.keys,Kr=Object.values,at=Array.from;Buffer.from;var S=Array.isArray,_e=Buffer.isBuffer,X=me("Undefined"),I=me("Object"),oe=me("Boolean"),Bt=me("RegExp"),Xr=me("Number"),L=me("String"),Se=me("Function");me("Async");var f={};gr(f,{build:()=>lp,changed:()=>gp,clear:()=>ot,configChanges:()=>Op,console:()=>ap,deleted:()=>Bp,err:()=>cp,exported:()=>Ep,external:()=>fp,failed:()=>Pp,hline:()=>Xn,hook:()=>mp,hot:()=>yp,ignored:()=>_p,importer:()=>bp,invalid:()=>kp,minified:()=>Ap,newGroup:()=>Dp,nwl:()=>Ae,out:()=>B,process:()=>qu,progress:()=>Lu,prompt:()=>Fp,reloaded:()=>Tp,resource:()=>xp,retrying:()=>vp,skipped:()=>Rp,spawn:()=>Np,spinner:()=>pi,start:()=>Iu,syncing:()=>Cp,throws:()=>jp,transform:()=>Sp,unhook:()=>dp,update:()=>Lt,updated:()=>hp,upload:()=>wp,warn:()=>$p,write:()=>pp});var Gl=Object.assign||((e,t)=>(t&&Object.keys(t).forEach(s=>e[s]=t[s]),e)),ln=(e,t,s)=>{let r=typeof s;if(s&&r==="object")if(Array.isArray(s))for(let n of s)t=ln(e,t,n);else for(let n of Object.keys(s)){let i=s[n];typeof i=="function"?t[n]=i(t[n],Zr):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:Zr(t[n],i):t[n]=ln(!1,{},i);}else r==="function"&&(t=s(t,Zr));return t},Zr=(e,...t)=>{let s=Array.isArray(e);return ln(s,s?e.slice():Gl({},e),t)},de=Zr;var io=()=>({json:{assets:!0,config:!0,locales:!0,metafields:!0,metaobject:!0,groups:!0,templates:!0,exclude:[]},script:{minifySyntax:!0,minifyIdentifiers:!0,minifyWhitespace:!0,mangleProps:void 0,legalComments:"none",mangleQuoted:!1,keepNames:!1,exclude:[]},liquid:{minifyJavascript:!1,minifyStylesheet:!1,minifyStyle:!0,minifySchema:!0,removeComments:!0,collapseInner:!1,collapseWhitespace:!0,stripDashes:!0,exclude:[]},style:{exclude:[],format:!1,inline:!1,purgeUnusedCSS:!1,obfuscateAlphabet:"abcefghijklmnopqrstuvwxyz0123456789",obfuscateClassNames:!1,obfuscateWhitelist:[]},markup:{caseSensitive:!1,collapseBooleanAttributes:!1,collapseInlineTagWhitespace:!1,conservativeCollapse:!1,keepClosingSlash:!1,noNewlinesBeforeTagClose:!1,preventAttributesEscaping:!1,removeEmptyAttributes:!1,removeEmptyElements:!1,removeOptionalTags:!1,removeRedundantAttributes:!1,removeScriptTypeAttributes:!0,removeStyleLinkTypeAttributes:!0,useShortDoctype:!1,collapseWhitespace:!0,continueOnParseError:!0,removeComments:!0,minifyCSS:!0,minifyJS:!0,trimCustomFragments:!1,ignoreCustomFragments:[/(?<=\bstyle\b=["']\s?)[\s\S]*?(?="[\s\n>]?)/,/<style[\s\S]*?<\/style>/,/<script[\s\S]*?<\/script>/,/{%[\s\S]*?%}/]}});var oo=()=>({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",metaobject:"templates/customers/*.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:"",safeSync:!0,importLanguage:"html",suffixDir:!1,global:[]}},transforms:{svg:null,style:null,script:null},terser:{json:!1,markup:!1,liquid:!1,script:!1}});var uo=()=>({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"]}}});var ao=()=>({onBuild:[],onChange:[],onReload:[],onTransform:[],onWatch:[]});function ts(e,t,s){return child_process.execFileSync(e,t,{encoding:"utf8",shell:s,stdio:["ignore","pipe","ignore"]}).trim()}function lo(e,t){let s=pathe.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 ts(pathe.join(s,e),[],t).split(/\r?\n/)}function lt(e,t){return {cols:Number.parseInt(e,10),rows:Number.parseInt(t,10)}}function rs(){let{env:e,stdout:t,stderr:s}=es__default.default;if(t&&t.columns&&t.rows)return lt(t.columns,t.rows);if(s&&s.columns&&s.rows)return lt(s.columns,s.rows);if(e.COLUMNS&&e.LINES)return lt(e.COLUMNS,e.LINES);if(es__default.default.platform==="win32")try{let r=lo("vendor/windows/term-size.exe",!1);if(r.length===2)return lt(r[0],r[1])}catch{}else {if(es__default.default.platform==="darwin")try{let r=lo("vendor/macos/term-size",!0);if(r.length===2)return lt(r[0],r[1])}catch{}try{let r=ts("resize",["-u"]).match(/\d+/g);if(r.length===2)return lt(r[0],r[1])}catch{}if(es__default.default.env.TERM)try{let r=ts("tput",["cols"]),n=ts("tput",["lines"]);if(r&&n)return lt(r,n)}catch{}}return lt(80,24)}var cn=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];var co=["caches","sourcemaps","sourcemaps/style","sourcemaps/script"],po=[["input","source"],["output","theme"],["export","export"],["import","import"],["config","."]],At=["assets","config","layout","customers","locales","sections","snippets","templates","metaobject","metafields","pages","redirects"],wr=["templates","templates/customers","templates/metaobject","assets","config","layout","locales","sections","snippets"];var pn=["b","kb","mb","gb","tb"],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."],fn="__injected_dirname__",mn="__injected_filename__",dn="__injected_import_meta_url__",Fr=/([|,])/g,ss=/\.(mjs|cjs|ts|js|tsx|jsx)$/,mo=/(\()(line\s[0-9]+)(\))(:)/g,Do=/('[\w\s.-]*?'|"[\w\s.-]*?")/g,ho=/({{2}-?)([a-zA-Z0-9_\-.'"[\]]+)(-?}{2})/g,go=/((?:www|http:|https:)+[^\s]+[\w])/g,yo=/(?<=Filename\s)([\w._-]+)(?=\salready)/,xo=/(\/)(.*?)(\/)/g,Dn={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 De={current:null,count:0,process:{}};function Jl(){let e=Je(null);for(let t of At)e[t]=Je(null),e[t].input=null,e[t].match=null;return e.transforms=new Map,e}var u=new class Ce{static defaults=oo();static plugins=ao();static terser=io();static processor=uo();static package=Je(null);static cache=Je(null);static watch=new Set;process;restart=!1;cli=Je(null);wss=null;filters=Je(null);commands=Je(null);version=null;cwd=null;argv=es.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",strategy:"hydrate",scroll:"preserved",layouts:["theme.liquid"],label:"visible",snippet:null,output:null,alive:{},renderer:"{% render 'hot.js'"+["","server: 3000","socket: 8089",'strategy: "hydrate"','scroll: "preserved"','label: "visible"',"history: false",'method: "hot"'].join(", ")+" %}"};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,views:!1,script:!1,image:!1,style:!1,svg:!1,redirects:!1,export:!1};file={base:null,path:null,relative:null};files=new Map;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,baseDir:new Set};snippet={prefixDir:!1,separator:"-",global:null,baseDir:new Set};paths=Jl();page={safeSync:!0,author:"",global:null,suffixDir:!1,importLanguage:"html",export:{quotes:"\u201C\u201D\u2018\u2019",html:!0,linkify:!1,typographer:!1,xhtmlOut:!1,breaks:!0,langPrefix:"language-"},import:{codeBlockStyle:"fenced",emDelimiter:"_",fence:"```",headingStyle:"atx",hr:"---",linkReferenceStyle:"full",linkStyle:"inlined",strongDelimiter:"**",bulletListMarker:"-"}};script=[];style=[];svg=[];image;terse={json:!1,liquid:!1,markup:!1,style:!1,script:!1};get watch(){return Ce.watch}set watch(t){Ce.watch=t;}get cache(){return Ce.cache}set cache(t){Ce.cache=t;}get terser(){return Ce.terser}set terser(t){Ce.terser=de(Ce.terser,t);}get processor(){return Ce.processor}set config(t){Ce.defaults=de(Ce.defaults,t);}get config(){return Ce.defaults}set pkg(t){Ce.package=t;}get pkg(){return Ce.package}get plugins(){return Ce.plugins}get terminal(){return rs()}};var gn=zt(Fo(),1);var Er=class extends Error{constructor(t){super(t),this.name="TimeoutError";}},yn=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t;}},Co=e=>globalThis.DOMException===void 0?new yn(e):new DOMException(e),Eo=e=>{let t=e.reason===void 0?Co("This operation was aborted."):e.reason;return t instanceof Error?t:Co(t)};function xn(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:c}=r;c.aborted&&a(Eo(c)),c.addEventListener("abort",()=>{a(Eo(c));});}n=r.customTimers.setTimeout.call(void 0,()=>{if(typeof s=="function"){try{o(s());}catch(p){a(p);}return}let c=typeof s=="string"?s:`Promise timed out after ${t} milliseconds`,h=s instanceof Error?s:new Er(c);typeof e.cancel=="function"&&e.cancel(),a(h);},t),(async()=>{try{o(await e);}catch(c){a(c);}finally{r.customTimers.clearTimeout.call(void 0,n);}})();});return i.clear=()=>{clearTimeout(n),n=void 0;},i}function wn(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 Tt=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)},tt,Fn=class{constructor(){tt.set(this,[]);}enqueue(t,s){s={priority:0,...s};let r={priority:s.priority,run:t};if(this.size&&Tt(this,tt,"f")[this.size-1].priority>=s.priority){Tt(this,tt,"f").push(r);return}let n=wn(Tt(this,tt,"f"),r,(i,o)=>o.priority-i.priority);Tt(this,tt,"f").splice(n,0,r);}dequeue(){let t=Tt(this,tt,"f").shift();return t?.run}filter(t){return Tt(this,tt,"f").filter(s=>s.priority===t.priority).map(s=>s.run)}get size(){return Tt(this,tt,"f").length}};tt=new WeakMap;var bo=Fn;var ue=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},$=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)},pe,Sr,$r,pt,ps,vr,os,qe,br,ke,us,Pe,Br,ct,as,So,$o,Ao,vo,Bo,ls,Cn,En,fs,To,cs,ms=class extends Error{},bn=class extends gn.default{constructor(t){var s,r,n,i;if(super(),pe.add(this),Sr.set(this,void 0),$r.set(this,void 0),pt.set(this,0),ps.set(this,void 0),vr.set(this,void 0),os.set(this,0),qe.set(this,void 0),br.set(this,void 0),ke.set(this,void 0),us.set(this,void 0),Pe.set(this,0),Br.set(this,void 0),ct.set(this,void 0),as.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:bo,...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})`);ue(this,Sr,t.carryoverConcurrencyCount,"f"),ue(this,$r,t.intervalCap===Number.POSITIVE_INFINITY||t.interval===0,"f"),ue(this,ps,t.intervalCap,"f"),ue(this,vr,t.interval,"f"),ue(this,ke,new t.queueClass,"f"),ue(this,us,t.queueClass,"f"),this.concurrency=t.concurrency,this.timeout=t.timeout,ue(this,as,t.throwOnTimeout===!0,"f"),ue(this,ct,t.autoStart===!1,"f");}get concurrency(){return $(this,Br,"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})`);ue(this,Br,t,"f"),$(this,pe,"m",fs).call(this);}async add(t,s={}){return s={timeout:this.timeout,throwOnTimeout:$(this,as,"f"),...s},new Promise((r,n)=>{$(this,ke,"f").enqueue(async()=>{var i,o,a;ue(this,Pe,(o=$(this,Pe,"f"),o++,o),"f"),ue(this,pt,(a=$(this,pt,"f"),a++,a),"f");try{if(!((i=s.signal)===null||i===void 0)&&i.aborted)throw new ms("The task was aborted.");let c=t({signal:s.signal});s.timeout&&(c=xn(Promise.resolve(c),s.timeout)),s.signal&&(c=Promise.race([c,$(this,pe,"m",To).call(this,s.signal)]));let h=await c;r(h),this.emit("completed",h);}catch(c){if(c instanceof Er&&!s.throwOnTimeout){r();return}n(c),this.emit("error",c);}finally{$(this,pe,"m",Ao).call(this);}},s),this.emit("add"),$(this,pe,"m",ls).call(this);})}async addAll(t,s){return Promise.all(t.map(async r=>this.add(r,s)))}start(){return $(this,ct,"f")?(ue(this,ct,!1,"f"),$(this,pe,"m",fs).call(this),this):this}pause(){ue(this,ct,!0,"f");}clear(){ue(this,ke,new($(this,us,"f")),"f");}async onEmpty(){$(this,ke,"f").size!==0&&await $(this,pe,"m",cs).call(this,"empty");}async onSizeLessThan(t){$(this,ke,"f").size<t||await $(this,pe,"m",cs).call(this,"next",()=>$(this,ke,"f").size<t);}async onIdle(){$(this,Pe,"f")===0&&$(this,ke,"f").size===0||await $(this,pe,"m",cs).call(this,"idle");}get size(){return $(this,ke,"f").size}sizeBy(t){return $(this,ke,"f").filter(t).length}get pending(){return $(this,Pe,"f")}get isPaused(){return $(this,ct,"f")}};Sr=new WeakMap,$r=new WeakMap,pt=new WeakMap,ps=new WeakMap,vr=new WeakMap,os=new WeakMap,qe=new WeakMap,br=new WeakMap,ke=new WeakMap,us=new WeakMap,Pe=new WeakMap,Br=new WeakMap,ct=new WeakMap,as=new WeakMap,pe=new WeakSet,So=function(){return $(this,$r,"f")||$(this,pt,"f")<$(this,ps,"f")},$o=function(){return $(this,Pe,"f")<$(this,Br,"f")},Ao=function(){var t;ue(this,Pe,(t=$(this,Pe,"f"),t--,t),"f"),$(this,pe,"m",ls).call(this),this.emit("next");},vo=function(){$(this,pe,"m",En).call(this),$(this,pe,"m",Cn).call(this),ue(this,br,void 0,"f");},Bo=function(){let t=Date.now();if($(this,qe,"f")===void 0){let s=$(this,os,"f")-t;if(s<0)ue(this,pt,$(this,Sr,"f")?$(this,Pe,"f"):0,"f");else return $(this,br,"f")===void 0&&ue(this,br,setTimeout(()=>{$(this,pe,"m",vo).call(this);},s),"f"),!0}return !1},ls=function(){if($(this,ke,"f").size===0)return $(this,qe,"f")&&clearInterval($(this,qe,"f")),ue(this,qe,void 0,"f"),this.emit("empty"),$(this,Pe,"f")===0&&this.emit("idle"),!1;if(!$(this,ct,"f")){let t=!$(this,pe,"a",Bo);if($(this,pe,"a",So)&&$(this,pe,"a",$o)){let s=$(this,ke,"f").dequeue();return s?(this.emit("active"),s(),t&&$(this,pe,"m",Cn).call(this),!0):!1}}return !1},Cn=function(){$(this,$r,"f")||$(this,qe,"f")!==void 0||(ue(this,qe,setInterval(()=>{$(this,pe,"m",En).call(this);},$(this,vr,"f")),"f"),ue(this,os,Date.now()+$(this,vr,"f"),"f"));},En=function(){$(this,pt,"f")===0&&$(this,Pe,"f")===0&&$(this,qe,"f")&&(clearInterval($(this,qe,"f")),ue(this,qe,void 0,"f")),ue(this,pt,$(this,Sr,"f")?$(this,Pe,"f"):0,"f"),$(this,pe,"m",fs).call(this);},fs=function(){for(;$(this,pe,"m",ls).call(this););},To=async function(t){return new Promise((s,r)=>{t.addEventListener("abort",()=>{r(new ms("The task was aborted."));},{once:!0});})},cs=async function(t,s){return new Promise(r=>{let n=()=>{s&&!s()||(this.off(t,n),r());};this.on(t,n);})};var Ro=bn;var $e=Kl__default.default.create({responseType:"json",headers:{}}),G=new Ro({concurrency:5,interval:250,intervalCap:2});function ft(e){return e===429||e===500?!0:(G.isPaused||G.pause(),!1)}var Sn=Symbol("singleComment"),_o=Symbol("multiComment"),Xl=()=>"",Zl=(e,t,s)=>e.slice(t,s).replace(/\S/g," "),ec=(e,t)=>{let s=t-1,r=0;for(;e[s]==="\\";)s-=1,r+=1;return !!(r%2)};function ds(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?Zl:Xl,n=!1,i=!1,o=0,a="",c="",h=-1;for(let p=0;p<e.length;p++){let l=e[p],m=e[p+1];if(!i&&l==='"'&&(ec(e,p)||(n=!n)),!n)if(!i&&l+m==="//")a+=e.slice(o,p),o=p,i=Sn,p++;else if(i===Sn&&l+m===`\r
|
65
|
+
`){p++,i=!1,a+=r(e,o,p),o=p;continue}else if(i===Sn&&l===`
|
66
|
+
`)i=!1,a+=r(e,o,p),o=p;else if(!i&&l+m==="/*"){a+=e.slice(o,p),o=p,i=_o,p++;continue}else if(i===_o&&l+m==="*/"){p++,i=!1,a+=r(e,o,p+1),o=p+1;continue}else s&&!i&&(h!==-1?l==="}"||l==="]"?(a+=e.slice(o,p),c+=r(a,0,1)+a.slice(1),a="",o=p,h=-1):l!==" "&&l!==" "&&l!=="\r"&&l!==`
|
67
|
+
`&&(a+=e.slice(o,p),o=p,h=-1):l===","&&(c+=a+e.slice(o,p),a="",o=p,h=p));}return c+a+(i?r(e.slice(o)):e.slice(o))}var Ie=new events.EventEmitter;function ko(e){try{return JSON.parse(ds(e).trim())}catch(t){throw new Error(t)}}function Po(e){return /\[(?:file|dir|ext)\]/.test(e)}function Oo(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-$/,"").replace(/^-/,"")}function st(e,t,s=!1){return t>1?`${e}s`:e}function mt(e){return _e(e)?e.toString():I(e)||S(e)?JSON.stringify(e):String(e)}async function jo(e,{format:t}){return t==="esm"?s=>import(s):vn(e)}function No(e){return e===".mjs"||e===".cjs"?"js":e.slice(1)}function Rt(e){return e.charAt(0).toUpperCase()+e.slice(1)}function nt(e){return rt(ve(e))}function ve(e){return L(e)?Buffer.from(e).toString().length:e.toString().length}function rt(e){if(e===0)return "0b";let t=parseInt(`${Math.floor(Math.log(e)/Math.log(1024))}`,10);return t===0?`${F(String(e))}${pn[t]}`:`${F((e/1024**t).toFixed(1))}${pn[t]}`}function Oe(e,t){let s=ve(e),r=rt(sc__default.default.gzipSync(e).length),n=rt(t),i=rt(s),o=rt(t-s);return {isSmaller:s>t||s===t,gzip:r,before:n,after:i,saved:o}}function Ar(){let e=new Date,t=e.getHours(),s=e.getMinutes(),r=e.getSeconds(),n=g(":");return (t<10?`0${t}`:t)+n+(s<10?`0${s}`:s)+n+(r<10?`0${r}`:r)}function $n(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 vn(e){return Se(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 Ye(){return Math.random().toString(36).slice(2)}function Bn(){return new Promise(e=>{typeof setImmediate=="function"?setImmediate(e):setTimeout(e);})}var An=new Map,Lo=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"];function Mo(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 Lo)An.set(n,console[n]),console[n]=r[n];return ()=>{for(let n of Lo)console[n]=An.get(n);An.clear();}}var Ds=[],hs={},dt=e=>Y(e||!0),W=e=>{e?hs[e]=perf_hooks.performance.now():Ds.push(perf_hooks.performance.now());};function Y(e=!1,t=!1){let s;typeof e=="boolean"?s=e?Ds[Ds.length-1]:Ds.pop():e&&(t?(s=hs[e],delete hs[e]):s=hs[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 q={};gr(q,{errors:()=>Yt,esbuild:()=>Vc,postcss:()=>Hc,request:()=>Wc,sass:()=>Uc,spawn:()=>ri,write:()=>zc});function Rn(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var oc=()=>ic__default.default.homedir().replace(/\\/g,"/"),qo=oc;var Go=/\s+at.*[(\s](.*)\)?/,Wo=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/;function _n(e,{pretty:t=!1,basePath:s,pathFilter:r}={}){let n=s&&new RegExp(`(file://)?${Rn(s.replace(/\\/g,"/"))}/?`,"g"),i=t?qo():"";if(typeof e=="string")return e.replace(/\\/g,"/").split(`
|
68
|
+
`).filter(o=>{let a=o.match(Go);if(a===null||!a[1])return !0;let c=a[1];return c.includes(".app/Contents/Resources/electron.asar")||c.includes(".app/Contents/Resources/default_app.asar")||c.includes("node_modules/electron/dist/resources/electron.asar")||c.includes("node_modules/electron/dist/resources/default_app.asar")?!1:r?!Wo.test(c)&&r(c):!Wo.test(c)}).filter(o=>o.trim()!=="").map(o=>(n&&(o=o.replace(n,"")),t&&(o=o.replace(Go,(a,c)=>a.replace(c,c.replace(i,"~")))),o)).join(`
|
69
|
+
`)}function kn({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 uc=kn();function _t(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(uc,"")}var Jo=zt(Uo(),1),Yo=zt(Ho(),1);function kt(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=_t(e),e.length===0))return 0;e=e.replace((0, Yo.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(Jo.default.eastAsianWidth(n)){case"F":case"W":r+=2;break;case"A":r+=s;break;default:r+=1;}}return r}var Qo=(e=0)=>t=>`\x1B[${t+e}m`,Ko=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Xo=(e=0)=>(t,s,r)=>`\x1B[${38+e};2;${t};${s};${r}m`,re={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(re.modifier);var ac=Object.keys(re.color),lc=Object.keys(re.bgColor);[...ac,...lc];function cc(){let e=new Map;for(let[t,s]of Object.entries(re)){for(let[r,n]of Object.entries(s))re[r]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},s[r]=re[r],e.set(n[0],n[1]);Object.defineProperty(re,t,{value:s,enumerable:!1});}return Object.defineProperty(re,"codes",{value:e,enumerable:!1}),re.color.close="\x1B[39m",re.bgColor.close="\x1B[49m",re.color.ansi=Qo(),re.color.ansi256=Ko(),re.color.ansi16m=Xo(),re.bgColor.ansi=Qo(10),re.bgColor.ansi256=Ko(10),re.bgColor.ansi16m=Xo(10),Object.defineProperties(re,{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=>re.rgbToAnsi256(...re.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)=>re.ansi256ToAnsi(re.rgbToAnsi256(t,s,r)),enumerable:!1},hexToAnsi:{value:t=>re.ansi256ToAnsi(re.hexToAnsi256(t)),enumerable:!1}}),re}var pc=cc(),Tr=pc;var gs=new Set(["\x1B","\x9B"]),fc=39,jn="\x07",tu="[",mc="]",ru="m",Nn=`${mc}8;;`,Zo=e=>`${gs.values().next().value}${tu}${e}${ru}`,eu=e=>`${gs.values().next().value}${Nn}${e}${jn}`,dc=e=>e.split(" ").map(t=>kt(t)),On=(e,t,s)=>{let r=[...t],n=!1,i=!1,o=kt(_t(e[e.length-1]));for(let[a,c]of r.entries()){let h=kt(c);if(o+h<=s?e[e.length-1]+=c:(e.push(c),o=0),gs.has(c)&&(n=!0,i=r.slice(a+1).join("").startsWith(Nn)),n){i?c===jn&&(n=!1,i=!1):c===ru&&(n=!1);continue}o+=h,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());},Dc=e=>{let t=e.split(" "),s=t.length;for(;s>0&&!(kt(t[s-1])>0);)s--;return s===t.length?e:t.slice(0,s).join(" ")+t.slice(s).join("")},hc=(e,t,s={})=>{if(s.trim!==!1&&e.trim()==="")return "";let r="",n,i,o=dc(e),a=[""];for(let[h,p]of e.split(" ").entries()){s.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let l=kt(a[a.length-1]);if(h!==0&&(l>=t&&(s.wordWrap===!1||s.trim===!1)&&(a.push(""),l=0),(l>0||s.trim===!1)&&(a[a.length-1]+=" ",l++)),s.hard&&o[h]>t){let m=t-l,D=1+Math.floor((o[h]-m-1)/t);Math.floor((o[h]-1)/t)<D&&a.push(""),On(a,p,t);continue}if(l+o[h]>t&&l>0&&o[h]>0){if(s.wordWrap===!1&&l<t){On(a,p,t);continue}a.push("");}if(l+o[h]>t&&s.wordWrap===!1){On(a,p,t);continue}a[a.length-1]+=p;}s.trim!==!1&&(a=a.map(h=>Dc(h)));let c=[...a.join(`
|
70
|
+
`)];for(let[h,p]of c.entries()){if(r+=p,gs.has(p)){let{groups:m}=new RegExp(`(?:\\${tu}(?<code>\\d+)m|\\${Nn}(?<uri>.*)${jn})`).exec(c.slice(h).join(""))||{groups:{}};if(m.code!==void 0){let D=Number.parseFloat(m.code);n=D===fc?void 0:D;}else m.uri!==void 0&&(i=m.uri.length===0?void 0:m.uri);}let l=Tr.codes.get(Number(n));c[h+1]===`
|
71
|
+
`?(i&&(r+=eu("")),n&&l&&(r+=Zo(l))):p===`
|
72
|
+
`&&(n&&l&&(r+=Zo(n)),i&&(r+=eu(i)));}return r};function ht(e,t,s){return String(e).normalize().replace(/\r\n/g,`
|
65
73
|
`).split(`
|
66
|
-
`).map(r=>
|
67
|
-
`)}var q={};ar(q,{clear:()=>rt,closer:()=>Gt,context:()=>Ne,hline:()=>zn,indent:()=>ht,message:()=>Vn,multiline:()=>Hn,opener:()=>qt,sample:()=>vt,shopify:()=>xs,stack:()=>Zo,suffix:()=>J,tree:()=>Un});var L={};ar(L,{ARL:()=>gs,ARR:()=>Ue,BAD:()=>nc,CHK:()=>sc,CHV:()=>qn,COL:()=>_,DSH:()=>mt,LCB:()=>Gn,LPR:()=>oc,RCB:()=>Wn,RPR:()=>uc,TLD:()=>ic,blue:()=>E,blueBright:()=>On,bold:()=>F,bottom:()=>Nn,clear:()=>zl,close:()=>Ln,cyan:()=>O,cyanBright:()=>Vl,dash:()=>In,dim:()=>Xl,error:()=>ac,gray:()=>D,green:()=>Hl,greenBright:()=>Jl,hr:()=>Mn,italic:()=>Ql,lavender:()=>ec,lightGray:()=>tt,line:()=>y,magenta:()=>hs,magentaBright:()=>Yl,neonCyan:()=>$r,neonGreen:()=>Ko,neonMagenta:()=>rc,neonRouge:()=>tc,newline:()=>dt,open:()=>Ar,orange:()=>Zl,pink:()=>Br,purge:()=>Ul,red:()=>B,redBright:()=>ue,reset:()=>vr,strike:()=>Kl,time:()=>Mt,top:()=>jn,underline:()=>Pn,warning:()=>ys,white:()=>C,whiteBright:()=>et,yellow:()=>ms,yellowBright:()=>se});var ze=Ot(Yo());function ds(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 ds(path.join(s,e),[],t).split(/\r?\n/)}function Dt(e,t){return {cols: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=ds("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=ds("tput",["cols"]),n=ds("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:B,redBright:ue,green:Hl,greenBright:Jl,yellow:ms,yellowBright:se,magenta:hs,magentaBright:Yl,blue:E,blueBright:On,white:C,whiteBright:et,gray:D,underline:Pn,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:B.dim("\u2502 "),yellow:ms.dim("\u2502 ")},dt=tt(`${x}\u2502${x}`),In=tt("\u2502 \u251C\u2500 "),jn=tt("\u251C\u2500 "),Nn=tt("\u2502 \u2514\u2500 "),Ln=tt("\u2514\u2500 "),Mn=e=>tt(`\u2502${x}\u251C${"\u2500".repeat(St().cols-e)}${x}\u2502`),sc=Ko("\u2713 "),nc=ue("\u{10102}"),_=D(":"),Ue=D("\u2192"),qn=D("\u2023"),gs=D("\u2942"),ic=D("~"),mt=D("\u2014"),oc=D("("),uc=D(")"),Gn=D("{"),Wn=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}`):$;var Zo=$;function rt(){let e=process.stdout.rows-2,t=e>0?A(e):$;v(t),Xo__default.default.cursorTo(process.stdout,0,0),Xo__default.default.clearScreenDown(process.stdout);}function zn(e=15){v(Mn(e));}function J(e,t,s){return (u.mode.build?In: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 Un(e,t){return e==="top"?jn+t:Nn+t}function Gt(e){return y.gray+x+Ln+D(`${e} ~ ${br()}`)}function Vn(e,t){return y.gray+L[e](t)}function xs(e){if(S(e))return Oe(e.map(xs));let t=e;return t=t.replace(fo,D("$1")+C("$2")+D("$3")+C("$4")+A(2)),t=t.replace(Do,se.bold("$1")),t=t.replace(mo,O("$1")+et("$2")+O("$3")),t=t.replace(ho,Pn("$1")),t=t.replace(go,hs("$1")+O("$2")+hs("$3")),ht(B(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+Oe([`${s}${E(`${t.span.start-1}`)}${_+x}${s}${E(`${t.span.start}`)}${_} ${e+x}${s}${E(`${r}`)}${_+x}`])}return s+x+s+e}function ht(e,t={}){let s=S(e)?e:e.split(x).filter(Boolean),r=f("line",t)?t.line:y.gray,n=f("nwl",t)?`${r+x}`:$;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 Ne(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+=Oe([y.red,B(r),_+ye,Re(t-r.length),D(`${e.entries[r]}`)+x]));return e.stack&&(Zo=e.stack,s+=Oe([y.red,B("stack"),_+ye,Re(t-5),D(`Type ${F("s")} and press ${F("enter")} to view stack trace`),x+y.gray])),s.trimEnd()}function Hn(e,t){let s=y.gray,r=C;e==="error"?(s=y.red,r=B):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 Jn(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=bn(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):$}`);}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=Oe([y.red,x,xs(r),Ne({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 gn){let n=Oe([y.red,x,Hn("error",gn[t.status])+Ne({stack:!1,entries:{status:t.status,message:t.statusText,source:`${e}`}})]);return s?Q(n):n}else {let n=Oe([y.red,x,B("Unknown error has occured")+Ne({stack:!1,entries:{status:t.status,message:t.statusText,source:`${e}`}})]);return s?Q(n):n}}var cc=(e,t)=>s=>{Q(ht(s.message,{nwl:!0,line:y.red,text:B.bold})+Ne({stack:s.stack,entries:{...t,code:s.code,name:s.name,details:e}}));};function pc(e,t){Q(ht(t.message,{nwl:!0,line:y.red,text:B})+Ne({stack:t.sassStack,entries:{input:e.relative,message:t.sassMessage}}));}function fc(e){Q(ht(e.text,{nwl:!0,line:y.red,text:B})+vt(e.location.lineText,{line:y.red,span:{start:e.location.line,end:e.location.line+1}})+Ne({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 Yn=M;var pu=Ot(nu(),1),fu=Ot(cu(),1);var hc=(0, pu.default)(()=>{(0, fu.default)(()=>{Ds__default.default.stderr.write("\x1B[?25h");},{alwaysLast:!0});}),Du=hc;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 Zn=Jt;function ei(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 gc=/^[\uD800-\uDBFF][\uDC00-\uDFFF]$/,hu=["\x1B","\x9B"],$s=e=>`${hu[0]}[${e}m`,mu=(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 ti(e,t,s){let r=[...e],n=[],i=typeof s=="number"?s:r.length,o=!1,a,l=0,h="";for(let[p,c]of r.entries()){let g=!1;if(hu.includes(c)){let m=/\d[^m]*/.exec(e.slice(p,p+18));a=m&&m.length>0?m[0]:void 0,l<i&&(o=!0,a!==void 0&&n.push(a));}else o&&c==="m"&&(o=!1,g=!0);if(!o&&!g&&l++,!gc.test(c)&&ei(c.codePointAt())&&(l++,typeof s!="number"&&i++),l>t&&l<=i)h+=c;else if(l===t&&!o&&a!==void 0)h=mu(n);else if(l>=i){h+=mu(n,!0,a);break}}return h}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:
|
69
|
-
`)).length+1)};function
|
70
|
-
`;a=
|
71
|
-
`).length);};return i.clear=()=>{e.write(
|
72
|
-
${
|
73
|
-
${
|
74
|
-
`),process.exit(0);}function
|
75
|
-
`):e)+
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
${
|
95
|
-
${
|
96
|
-
`),process.exit(0);}function
|
97
|
-
${
|
98
|
-
|
99
|
-
${
|
100
|
-
${D("-")} ${C("syncify.config.js")}
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
`);for(;r.length!==0;)pe.process[e].add(`${se(r.shift().trimStart())}`);}});}function Rc(){oi(),oi=null;}function _c(e,t=!1){v(Gt(Te)),t&&rt(),v(qt(e)),Te=e,Qt();}function kc(e){let t=Kt!==e.relative;U(),t&&v(Gt(Te)),Te!=="Syncify"&&t&&rt(),Te=e.namespace,t&&(rt(),v(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(),v(J("neonCyan","changed",e.relative)));}function Oc(e){if(u.mode.watch){if(ni.add([e.target,e.store,X()]),ii)return;ii=!0,W.onIdle().then(()=>{for(let[t,s,r]of ni)v(J("neonGreen","uploaded",`${F(t)} \u2192 ${s}`+Mt(r)));ni.clear(),ii=!1;});}else v(J("neonGreen","uploaded",`${F(e.target)} \u2192 ${e.store}`+Mt(X())));}function Pc(e){pe.count>0&&J("yellowBright","warning",`${pe.count} ${Xe("warning",pe.count)}`),u.mode.hot?(v(J("neonRouge","reloaded",`${F("HOT RELOAD")}${Mt(Lt())}`)),v(J("magentaBright","syncing",e)),W.pending>2&&v(J("orange","queued",`${e} ~ ${F(yn(W.pending))} in queue`))):(v(J("magentaBright","syncing",e)),W.pending>0&&v(J("orange","queued",`${e} ~ ${F(yn(W.pending))} in queue`)));}function Bu(e,...t){let s=t[0],r=$;t.length===2&&(r=` ${qn} ${t[0]}`,s=t[1]),v(J("whiteBright","process",F(e)+r+Mt(s)));}function Ic(e){v(J("whiteBright","exports",e));}function jc(e){u.mode.build||v(J("lavender","importer",e));}function Nc(e){v(J("whiteBright","transform",e));}function Lc(e,t){v(J("orange","retrying",`${e} \u2192 ${t.target} ${D(`~ ${t.store}`)}`));}function Mc(e,t){v(J("blueBright","deleted",`${e} \u2192 ${t.target} ${D(`~ ${t.store}`)}`));}function qc(e,t,s,r){let n=e?`${F(e)} ${Ue} ${t} ${gs} ${s} ${D(`~ saved ${r}`)}`:`${t} ${gs} ${s} ${D(`~ saved ${r}`)}`;v(J("whiteBright","minified",n));}function Gc(e,t){v(J("whiteBright","reloaded",e+t));}function Wc(e,t){v(J("gray","skipped",`${typeof e=="string"?e:e.key} ~ ${t}`));}function zc(e){v(J("gray","ignored",e));}function Uc(e){v(J("red","invalid",e)),vu__default.default.notify({title:"Syncify Error",sound:"Pop",open:e,subtitle:e,message:"Invalid error"}).notify();}function Vc(e){v(J("red","failed",e)),vu__default.default.notify({title:"Syncify Error",sound:"Pop",open:e,subtitle:e,message:"Request failed"}).notify();}function Hc(e){throw new Error(e)}function Jc(e){return (...t)=>{u.spawn.invoked||(u.spawn.invoked=!0),Te!=="Spawn"&&(v(Gt(Te)),Te!=="Syncify"&&rt(),v(qt("Spawn")),Te="Spawn"),Kt!==e&&(v(Vn("pink",e)),Kt=e),Jn(Nt(t.shift()));}}var Xt={};ar(Xt,{esbuild:()=>$u,postcss:()=>Qc,sass:()=>Yc,warnings:()=>Le});var Le={},Yc=e=>(t,s)=>{let r=$;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+=ht(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+=Ne({stack:s.stack,entries:{file:e.relative,deprecated:s.deprecation?"Yes":"No"}}),n.has(r)?v(J("yellowBright","warning",`${n.size} ${Xe("warning",n.size)+ys}`)):(n.add(r),v(J("yellowBright","warning",`${n.size} ${Xe("warning",n.size)+ys}`)));};function $u(e){}function Qc(e,t){let 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+=Ne({stack:!1,entries:{column:t.column,file:e.relative,plugin:t.plugin}}),r.has(s)||(r.add(s),Hi(s));}function Au(){d.nwl(""),d.out(D("SIGINT")),process.exit();}function Tu(e,t){d.nwl(),d.err(`Unhandled Promise Rejection at: ${t}`),d.nwl("red"),d.out(e?D(e):"Unkown Reason");}function Ru(e){d.nwl(),d.err(`Uncaught Exception: ${e.message}`),d.nwl("red"),d.err(`${e.stack}`);}var ui=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t;}},_u=e=>globalThis.DOMException===void 0?new ui(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 ai(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=[],h=new Map,p=!1,c=!1,g=!1,m=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(g=!0,m===0&&!c){if(!r&&l.length>0){j(new AggregateError(l));return}if(c=!0,h.size===0){i(a);return}let He=[];for(let[ie,Ks]of a.entries())h.get(ie)!==Rs&&He.push(Ks);i(He);}return}m++,(async()=>{try{let He=await ne.value;if(c)return;let ie=await t(He,Fe);ie===Rs&&h.set(Fe,ie),a[Fe]=ie,m--,await le();}catch(He){if(r)j(He);else {l.push(He),m--;try{await le();}catch(ie){j(ie);}}}})();};(async()=>{for(let ne=0;ne<s;ne++){try{await le();}catch(Fe){j(Fe);break}if(g||p)break}})();})}var Rs=Symbol("skip");var Kc=Object.assign||((e,t)=>(t&&Object.keys(t).forEach(s=>e[s]=t[s]),e)),li=(e,t,s)=>{let r=typeof s;if(s&&r==="object")if(Array.isArray(s))for(let n of s)t=li(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]=li(!1,{},i);}else r==="function"&&(t=s(t,_s));return t},_s=(e,...t)=>{let s=Array.isArray(e);return li(s,s?e.slice():Kc({},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 ci(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=>(d.failed(t.key),I.request(t.key,r.response),!1))}async function pi(e,t){return Qe.get(e,t).then(({data:s})=>s).catch(s=>{if(s.response&&(s.response.status===429||s.response.status===500))d.retrying(file.key,theme),W.add(()=>Os(theme,file,t));else {if(u.mode.upload)throw s.response;d.failed(file.key),I.request(file.relative,s.response);}d.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"?d.deleted(t.relative,e):r.watch?d.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||d.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}}):(d.failed(t.key),I.request(t.relative,i.response)),Rs))}var Di=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=Di;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 mi=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 mi;var Xc=zu.register,Uu=Xc;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))){d.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 gi(e,t){return is(arguments.length,1)?s=>gi(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(()=>gi(e,t));return}else return I(e.store,s.response)}))}async function yi(e,t,s){return is(arguments.length,1)?(r,n)=>yi(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(()=>yi(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?yi(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)}):gi(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(()=>ai(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 gt(e){return S(e)?e.filter(t=>/\*/.test(t)):/\*/.test(e)?e:null}function Ve(e){if(S(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 xi(e){if(S(e))return e.map(xi);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(S(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),Vi(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(xi(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 Fi(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 Fi(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 Fi(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+['"]${oo}['"][,\\slablsockvetr:0-9'"]+?-?%}\\s+`);async function sa(e=!1){let t=`snippets/${Fr}`,[s]=u.sync.themes,r=await fsExtra.readFile(u.hot.snippet),n=await ci(r.toString(),{theme:s,key:t});return d.update(q.message("gray",`${t} uploaded snippet injection`)),n}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),d.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 ci(r,{theme:n,key:o})?(d.update(q.message("gray","uploaded and inject render tag")),!0):!1}async function ua(e){d.newGroup("Upload"),d.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,h=0,p=r.length;for(let{store:c,target:g}of u.sync.themes)g.length>h&&(h=g.length),f(c,t.sync)||(t.sync[c]=[]),t.sync[c].push({theme:g,uploaded:0,failed:0,progress:d.progress(p)});Cr.on("upload",function(c,{target:g,store:m},T){d.spinner.stop();let R=c==="failed",j=[q.message("whiteBright",F(T.namespace)),dt,q.message(c==="failed"?"redBright":"neonGreen",T.key),dt,q.suffix("white","size ",` ${T.fileSize}`),x,q.suffix("white","duration ",` ${X()}`),x,q.suffix("white","elapsed ",` ${Lt("upload")}`),dt];for(let le in t.sync)for(let ne of t.sync[le]){le===m&&g===ne.theme&&(ne[c]+=1,ne.progress.increment(1));let Fe=`${F(ne.theme.toUpperCase())+Re(h-g.length)} ${Ue} ${le}`;j.push(q.message("neonCyan",Fe),dt,q.suffix("whiteBright","uploaded ",` ${F(`${ne.uploaded}`)} ${C("of")} ${F(`${p}`)}`),x,q.suffix(ne.failed>0?"redBright":"white","failed ",` ${F(`${ne.failed}`)}`),dt,ne.progress.render(!1),dt),R&&(o.has([le,g])?o.get([le,g]).push([T.file,T.error]):o.set([le,g],[[T.file,T.error]]));}d.update(Oe(j));});for(let c of r){let g=s(c),m;try{if(m=(await fsExtra.readFile(g.input)).toString(),g.namespace==="layout"&&er(m)&&(m=Pr(m)),!i)await n.assets("put",g,m);else {let R=e.apply({...g},m);H(R)||R===!1?await n.assets("put",g,m):P(R)?await n.assets("put",g,R):we(R)?await n.assets("put",g,R.toString()):await n.assets("put",g,m);}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 pi(s.url,r.client);for(let{key:i}of n)try{let o=fe(r.client,{params:{"asset[key]":i}}),{asset:a}=await pi(s.url,o),l=path.join(u.dirs.import,r.domain,s.target,i),h=f("attachment",a)?Buffer.from(a.attachment,"base64"):Buffer.from(a.value||null,"utf8");if(d.write(`${L.neonCyan(i)}`),t){let p=e.apply({asset:a,output:l},h);H(p)||p===!1?await fsExtra.writeFile(l,h):P(p)||we(p)?await fsExtra.writeFile(l,p):await fsExtra.writeFile(l,h);}else await fsExtra.writeFile(l,h);}catch{d.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 gp=/{%-?\s*#[\s\S]+?%}/g,yp=/{%-?\s*comment\s*-?%}[\s\S]+?{%-?\s*endcomment\s*-?%}/g,xp=/{%-?\s*liquid[\s\S]+?%}/g,Fp=/[^,:'"a-zA-Z0-9=] +[^'"a-zA-Z0-9=}{]/g;function Gs(e){return u.terser.liquid.removeComments?e.replace(yp,$).replace(gp,$):e}function wp(e){return e.replace(xp,t=>`
|
112
|
-
`+
|
113
|
-
`)}function Cp(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)}d.invalid(e.relative);}return Gs(t)}function Ep(e){return u.terser.liquid.stripDashes,e}async function bp(e,t){try{return await htmlMinifierTerser.minify(t,u.terser.html)}catch(s){return d.invalid(e.relative),console.error(s),null}}var Sp=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),d.transform(`${e.namespace} \u2192 ${Ke(e.size)}`),t;let s;if(e.base.endsWith(".js.liquid"))s=t.replace(Fp,$).replace(/(?<=[:,]) +(?=['"{[])/g,$).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?Cp(e,t):Gs(t),o=await bp(e,i);s=wp(o);}if(d.process("HTML Terser",Lt()),N(s))return await fsExtra.writeFile(e.output,t),t;let r=Ep(s).replace(/^\s+/gm,$);await fsExtra.writeFile(e.output,r);let n=$e(t,e.size);return n.isSmaller?d.transform(`${e.namespace} ${n.before} \u2192 gzip ${n.gzip}`):d.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=Sp(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 Ei(e){try{return JSON.parse(e)}catch(t){return console.log(t),null}}function $p(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=$p(t,s);if(N(r))return u.mode.watch&&X(),t;if(s===0){let n=$e(r,e.size);d.minified("JSON",n.before,n.after,n.saved);}else d.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 d.skipped(e,"empty file"),null;let n=Ei(r);if(Z(n))return d.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):S(l)||G(l)?tr(e,l,i):P(l)?tr(e,Ei(l),i):we(l)?tr(e,Ei(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&&d.skipped(e,"empty file"),null;let{data:r,content:n}=_p__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=kp__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=xn("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 Fn().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 Op(e){return "<script>"+e+"</script>"}function Pp(e){return ce("Function",e)?function(t,s){let r=e.apply({...t},s);return r===!1?(d.external("cancelled"),null):ce("String",r)?(d.external("augment"),r):we(r)?(d.external("augment"),r.toString()):s}:!1}async function zs(e,t,s){if(!e.data)return;u.mode.watch&&U();let r=Pp(s),{errors:n,wss:i,mode:o,cwd:a}=u,l=e.data.length,h=[];for(let p of e.data){let{key:c,input:g,output:m,snippet:T,esbuild:{format:R}}=p;try{let{metafile:j,outputFiles:le,warnings:ne}=await jr.build(p.esbuild);l>1&&(d.nwl(),d.importer(path.relative(a,g))),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+".map");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);d.transform(`${F(R.toUpperCase())} bundle`),d.minified(null,Ks,Za,el);}else d.transform(`${F(R.toUpperCase())} bundle \u2192 ${F(Er(Fe))}`);let ie;if(T){if(ie=Op(Fe),r&&(ie=r(e,ie),ie===null))continue;await fsExtra.writeFile(m,ie).catch(I.write("Error writing inline <script> snippet",{file:e.relative})),d.transform(`exported as ${F("snippet")}`);}else {if(ie=Fe,r&&(ie=r(e,ie),ie===null))continue;await fsExtra.writeFile(m,ie).catch(I.write("Error writing JavaScript asset",{file:e.relative}));}o.hot?(d.syncing(c),i.script(c)):o.build||(d.syncing(c),h.push(t("put",p,ie)));}}catch(j){f("errors",j)&&(d.invalid(e.relative),n.add(g),j.errors.forEach(I.esbuild));}}l>1&&d.nwl(),await Promise.all(h);}var Us=null,Si=null;async function vi(e){if(e==="postcss")return Us=(await import('postcss')).default,N(Us)===!1;if(e==="sass")return Si=Zs("sass"),N(Si)===!1}function Np(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?d.transform(`${F("CSS")} ${i.before} \u2192 gzip ${i.gzip}`):d.minified("CSS",i.before,i.after,i.saved),u.mode.hot&&u.wss.stylesheet(e.key),n}}async function Lp(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}=Si.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 d.process("SASS Dart",X()),e.size=Se(r),{css:r,map:n}}catch(r){return d.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 d.invalid(e.relative),d.throws(r),null}}async function Mp(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&&d.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 d.invalid(e.relative),console.log(n),null}}function da(e){return `<style>${x+Re(2)+e}</style>`}async function Vs(e,t){u.mode.watch&&U();let s=Np(e,t);try{let r=await Lp(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 Mp(e,r.css,r.map);if(n===null)return null;if(e.data.snippet)return s(da(n))}return e.data.snippet?s(da(r.css)):s(r.css)}catch(r){return console.log(r),null}}var Bi=null,$i=null;async function Ai(e){if(e==="svg-sprite")return $i=(await import('svg-sprite')).default,N($i)===!1;if(e==="svgo")return Bi=(await import('svgo')).default,N(Bi)===!1}async function Wp(e){let t=await fsExtra.readFile(e);return [e,t.toString(),Se(t)]}function zp(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 Up(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 $i(o),l=await qe(Wp,ut(n.input)).catch(I.write("Error reading an SVG file",{file:i.base,source:i.relative}));if(l){let h=l.filter(([m,T])=>xa(T)?(d.skipped(path.relative(u.cwd,m),"Liquid Detected"),!1):!0);i.size=0;for(let[m,T,R]of h)a.add(m,null,T),i.size=i.size+R;let p=await zp(a),c=h.length;d.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 g=$e(p,i.size);g.isSmaller?d.transform(`${i.kind} ${g.before} \u2192 gzip ${g.gzip}`):d.minified(i.kind,g.before,g.after,g.saved),t&&(d.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 Vp(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 d.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 Hp(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 d.skipped(r,"Liquid Detected"),null;let h=Vp(l);r.size=Se(h);let p;try{p=Bi.optimize(h,o);}catch(m){return d.err(m.toString()),null}d.process("SVGO",X());let{data:c}=p,g=$e(c,r.size);g.isSmaller?d.transform(`${r.kind} ${g.before} \u2192 gzip ${g.gzip}`):d.minified(r.kind,g.before,g.after,g.saved),await fsExtra.writeFile(r.output,c).catch(I.write("Error writing SVG",{file:r.key,caller:e.relative})),t&&(d.syncing(r.key),await t("put",r,c));}return n}async function Hs(e,t,s){u.mode.watch&&U();let r=Up(e,t),n=Hp(e,t),i=e.data.length;for(let o=0;o<i;o++){let a=e.data[o];o>0&&u.mode.watch&&d.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())),h=await Wa__default.default("**",{onlyFiles:!0,absolute:!0,cwd:s.input}),p={},c=h.filter(l).reduce((m,T)=>{let R=a(T);if(H(R))return m;switch(R.type){case 7:m.styles.files.push(R);break;case 8:m.scripts.files.push(R);break;case 4:m.sections.files.push(R);break;case 2:m.layouts.files.push(R);break;case 3:m.snippets.files.push(R);break;case 6:m.locales.files.push(R);break;case 5:m.configs.files.push(R);break;case 1:m.templates.files.push(R);break;case 14:m.pages.files.push(R);break;case 12:m.assets.files.push(R);break;case 13:m.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")m.svgs.files.push(R);else for(let Fe of ne)m.svgs.files.push(a(Fe));break}}return m},{styles:{time:$,files:[],report:null},scripts:{time:$,files:[],report:null},svgs:{time:$,files:[],report:null},sections:{time:$,files:[],report:null},layouts:{time:$,files:[],report:null},templates:{time:$,files:[],report:null},snippets:{time:$,files:[],report:null},locales:{time:$,files:[],report:null},configs:{time:$,files:[],report:null},pages:{time:$,files:[],report:null},metafields:{time:$,files:[],report:null},assets:{time:$,files:[],report:null}}),g=(m,T,R)=>async j=>{U();try{d.build(m,T,j);let le=await(j.ext===".json"?yt(j,e):R(j,e));return d.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 d.out(q.tree("bottom",L.redBright(j.key))),{name:j.base,input:j.relative,output:j.key,time:X(),error:le.message}}};for(let m in c){U();let T=c[m].files,R=T.length;if(m==="styles"&&i.style){if(o&&!(f(m,n)&&n[m].includes(m)))continue;c[m].report=await qe(g(m,R,Vs),T),c[m].time=X();}else if(m==="scripts"&&i.script){if(o&&!(f(m,n)&&n[m].includes(m)))continue;c[m].report=await qe(g(m,R,zs),T),c[m].time=X();}else if(m==="layouts"||m==="snippets"||m==="sections"||m==="templates"){if(i.views){if(o&&!(f(m,n)&&n[m].includes(m)))continue;c[m].report=await qe(g(m,R,_t),T),c[m].time=X();}}else if(m==="locales"||m==="configs"||m==="metafields"){if(i.views){if(o&&!(f(m,n)&&n[m].includes(m)))continue;c[m].report=await qe(g(m,R,yt),T),c[m].time=X();}}else if(m==="pages"&&i.views){if(o&&!(f(m,n)&&n[m].includes(m)))continue;c[m].report=await qe(g(m,R,Ws),T),c[m].time=X();}else if(m==="assets"&&i.views){if(o&&!(f(m,n)&&n[m].includes(m)))continue;c[m].report=await qe(g(m,R,qs),T),c[m].time=X();}else if(m==="svgs"&&i.svg){if(o&&!(f(m,n)&&n[m].includes(m)))continue;c[m].report=await qe(g(m,R,Hs),T),c[m].time=X();}}d.nwl(),d.update(`${y.gray}Build Completed ${D(`~ ${X()}`)}`),d.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&&d.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)||(d.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.onEmpty().then(()=>u.wss.replace())));}catch(i){console.error(i),d.err(i);}}}var Ca=!1,Ea=!1,Ti=new Set;function Js(e,t){if(!Ca){Ca=!0;for(let s of Ti)s();e&&process.exit(128+t);}}function Ys(e){return Ti.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);})),()=>Ti.delete(e)}var kt={enable:!0,output:[]};async function sf(){if(d.update(q.message("gray","validating snippet injection")),await sa()){d.update(q.message("gray","validating layouts"));for(let t in u.hot.alive){if(!await fsExtra.pathExists(t)){d.update(q.message("gray","layout has not yet been bundled, building now..."));let n=S(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);}d.update(q.message("gray","layout was bundled from source, injecting hot snippet"));}await oa(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 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.")),d.err(ue(`${F("ERROR")} on ${F(`${u.hot.method==="hot"?"HOT":"LIVE"} Reload:`)}`)),d.out(kt.output.join(x)),null;d.out(q.message("whiteBright",F(`${u.hot.method==="hot"?"HOT":"LIVE"} Reloading:`))),d.nwl(),d.update(q.message("gray","configuring HOT Reload")),await sf();function e(o){o.setHeader("Access-Control-Allow-Origin","*"),o.setHeader("Cache-Control","public, max-age=0");}let t=Kp__default.default(path.join(u.dirs.output,"assets"),{setHeaders:e}),s=Zp__default.default.createServer((o,a)=>t(o,a,Xp__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.")),d.update.clear(),d.out(kt.output.join(x)),u.wss.http.close(),null},i=()=>{d.update.done(),s.removeListener("error",n),s.removeListener("connect",i);};s.on("error",n),s.on("connect",i),s.listen(u.hot.server),d.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 Ri(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&&d.hline(10),d.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&&(v(q.closer("Upload"),x),process.exit(0));}else if(t==="w"){for(let s in pe.process)if(pe.process[s].size!==0){d.nwl(),d.write(L.bold.yellow(s)),d.nwl();for(let r of pe.process[s].values())typeof r=="string"&&r.length>0&&d.write(q.multiline("warning",r));pe.process[s].clear();}pe.count=0;}}`
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
$
|
122
|
-
|
123
|
-
${
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
$
|
128
|
-
|
129
|
-
|
130
|
-
$
|
131
|
-
|
132
|
-
|
133
|
-
$
|
134
|
-
|
135
|
-
|
136
|
-
$
|
137
|
-
|
138
|
-
|
139
|
-
${
|
140
|
-
${
|
141
|
-
|
74
|
+
`).map(r=>hc(r,t,s)).join(`
|
75
|
+
`)}var R={};gr(R,{clear:()=>ot,closer:()=>Ot,context:()=>Ge,hline:()=>Xn,indent:()=>Ct,message:()=>ei,multiline:()=>ti,opener:()=>Pt,sample:()=>jt,shopify:()=>Fs,stack:()=>du,suffix:()=>V,tree:()=>Zn});var y={};gr(y,{ARL:()=>xs,ARR:()=>be,BAD:()=>Lc,CHK:()=>Ic,CHV:()=>Jn,COL:()=>N,DSH:()=>Jt,LCB:()=>Qn,LPR:()=>Mc,RCB:()=>Kn,RPR:()=>qc,TLD:()=>Yn,blue:()=>v,blueBright:()=>Gn,bold:()=>F,bottom:()=>Un,clear:()=>Sc,close:()=>Vn,cyan:()=>M,cyanBright:()=>vc,dash:()=>Wn,dim:()=>kc,error:()=>Gc,gray:()=>g,green:()=>Bc,greenBright:()=>Ac,hr:()=>Or,hrs:()=>Hn,italic:()=>Rc,lavender:()=>Oc,lightGray:()=>Ke,line:()=>x,magenta:()=>Ht,magentaBright:()=>Tc,neonCyan:()=>Xe,neonGreen:()=>fu,neonMagenta:()=>Nc,neonRouge:()=>jc,newline:()=>wt,open:()=>Pr,orange:()=>Pc,pink:()=>kr,purge:()=>$c,red:()=>O,redBright:()=>se,reset:()=>_r,strike:()=>_c,time:()=>Ft,top:()=>zn,underline:()=>Rr,warning:()=>ws,white:()=>b,whiteBright:()=>xt,yellow:()=>yt,yellowBright:()=>le});var Qe=zt(pu());var Sc="\x1B[H\x1B[2J",$c="\x1B[2J\x1B[3J\x1B[H\x1Bc",{cyan:M,cyanBright:vc,red:O,redBright:se,green:Bc,greenBright:Ac,yellow:yt,yellowBright:le,magenta:Ht,magentaBright:Tc,blue:v,blueBright:Gn,white:b,whiteBright:xt,gray:g,underline:Rr,bold:F,reset:_r,italic:Rc,strike:_c,dim:kc}=Qe.default,Ke=Qe.default.hex("#2a2a2e"),kr=Qe.default.hex("#ff75d1"),Pc=Qe.default.hex("#FFAB40"),Oc=Qe.default.hex("#8080FF"),fu=Qe.default.hex("#56ef83"),Xe=Qe.default.hex("#69d5fd"),jc=Qe.default.hex("#FF8095"),Nc=Qe.default.hex("#B319FF"),Pr=Ke("\u250C\u2500 "),x={gray:Ke("\u2502 "),red:O.dim("\u2502 "),yellow:yt.dim("\u2502 ")},wt=Ke(`${w}\u2502${w}`),Wn=Ke("\u2502 \u251C\u2500 "),zn=Ke("\u251C\u2500 "),Un=Ke("\u2502 \u2514\u2500 "),Vn=Ke("\u2514\u2500 "),Hn=e=>Ke(`${"\u2500".repeat(e)}`),Or=e=>Ke(`\u2502${w}\u251C${"\u2500".repeat(rs().cols-e)}${w}\u2502`),Ic=fu("\u2713 "),Lc=se("\u{10102}"),N=g(":"),be=g("\u2192"),Jn=g("\u2023"),xs=g("\u2942"),Yn=g("~"),Jt=g("\u2014"),Mc=g("("),qc=g(")"),Qn=g("{"),Kn=g("}"),ws=le(` ~ Type ${F("w")} and press ${F("enter")} to view`),Gc=se(` ~ Type ${F("v")} and press ${F("enter")} to view`),Ft=e=>e?_r.gray(` ~ ${e}`):A;var du=A;function ot(){let e=process.stdout.rows-2,t=e>0?P(e):A;B(t),mu__default.default.cursorTo(process.stdout,0,0),mu__default.default.clearScreenDown(process.stdout);}function Xn(e=15){B(Or(e));}function V(e,t,s){let r=u.mode.build?Wn:t==="invalid"||t==="failed"?x.red:t==="warning"?x.yellow:x.gray,n=10-t.length;return n<0&&(n=0),r+y[e](t)+He(n)+be+ye+y[e](s)}function Pt(e){return w+Pr+g(`${e} ~ ${Ar()}`)}function Zn(e,t){return e==="top"?zn+t:Un+t}function Ot(e){return x.gray+w+Vn+g(`${e} ~ ${Ar()}`)}function ei(e,t){return x.gray+y[e](t)}function Fs(e){if(S(e))return Te(e.map(Fs));let t=e;return t=t.replace(mo,g("$1")+b("$2")+g("$3")+b("$4")+P(2)),t=t.replace(Do,yt.bold("$1")),t=t.replace(ho,M("$1")+xt("$2")+M("$3")),t=t.replace(go,Rr("$1")),t=t.replace(xo,Ht("$1")+M("$2")+Ht("$3")),t=t.replace(yo,Xe.bold("$1")),Ct(se(ht(t,u.terminal.wrap)),{line:x.red})}function jt(e,t={}){let s=d("line",t)?t.line:x.gray;if(Ve("span.start",t)){let r=d("end",t.span)?t.span.end:t.span.start+1;return s+w+Te([`${s}${v(`${t.span.start-1}`)}${N+w}${s}${v(`${t.span.start}`)}${N} ${e+w}${s}${v(`${r}`)}${N+w}`])}return s+w+s+e}function Ct(e,t={}){let s=S(e)?e:e.split(w).filter(Boolean),r=d("line",t)?t.line:x.gray,n=d("nwl",t)?`${r+w}`:A;for(;s.length!==0;){let i=s.shift();i.trim().length>0?i.trim().startsWith(r)?n+=(d("text",t)?t.text(i):i)+w:n+=r+(d("text",t)?t.text(i.trimStart()):i.trimStart())+w:n+=r+w;}return n}function Ge(e){let t=0,s=x.red+w;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+=Te([x.red,b(r),N+ye,He(t-r.length),g(`${e.entries[r]}`)+w]));return e.stack&&(du=e.stack,s+=Te([x.red,b("stack"),N+ye,He(t-5),g(`Type ${F("s")} and press ${F("enter")} to view stack trace`),w+x.gray])),s.trimEnd()}function ti(e,t){let s=x.gray,r=b;e==="error"?(s=x.red,r=O):e==="warning"&&(s=x.yellow,r=le);let n=[],i=t.trim(),o=ht(i,u.terminal.wrap).split(w);for(;o.length!==0;){let a=o.shift();a.trim().length>0&&n.push(s+r(a));}return s+w+n.join(w)+w}var Yt={};function ri(e){let t=[],s=[x.red],r=e.search(/(?:\n {4}at .*)/),n=[];if(/\berror\b:?/i.test(e)&&r>0){n=e.slice(0,r).split(w);let i=_n(e.slice(r),{pretty:!0,basePath:u.cwd}),o=ht(i,u.terminal.wrap).split(w);for(s.push(w);o.length!==0;){let a=o.shift();a.trim().length>0&&s.push(_r(x.red+a));}}for(n.length===0&&(n=e.split(w));n.length!==0;){let i=n.shift();i.trim().length>0&&t.push(_r(x.gray)+i);}te(`${t.join(w)}${s.length>1?s.join(w):A}`);}function Wc(e,t,s=!0){let r=Ve("error.asset",t.data)?t.data.error.asset:Ve("errors.asset",t.data)?t.data.errors.asset:null;if(t.status===422){let n=Te([x.red,w,Fs(r),Ge({stack:!1,entries:{status:t.status,message:t.statusText,source:Rr(`${e}`)}})]);return s?te(n):n}else if(t.status in Dn){let n=Te([x.red,w,ti("error",Dn[t.status])+Ge({stack:!1,entries:{status:t.status,message:t.statusText,source:`${e}`}})]);return s?te(n):n}else {let n=Te([x.red,w,O("Unknown error has occured")+Ge({stack:!1,entries:{status:t.status,message:t.statusText,source:`${e}`}})]);return s?te(n):n}}var zc=(e,t)=>s=>{te(Ct(s.message,{nwl:!0,line:x.red,text:O.bold})+Ge({stack:s.stack,entries:{...t,code:s.code,name:s.name,details:e}}));};function Uc(e,t){te(Ct(t.message,{nwl:!0,line:x.red,text:O})+Ge({stack:t.sassStack,entries:{input:e.relative,message:t.sassMessage}}));}function Vc(e){te(Ct(e.text,{nwl:!0,line:x.red,text:O})+jt(e.location.lineText,{line:x.red,span:{start:e.location.line,end:e.location.line+1}})+Ge({stack:!1,entries:{file:e.location.file,line:e.location.line,column:e.location.column,plugin:e.pluginName}}));}function Hc(e){}var Q="\x1B[",jr="\x1B]",Qt="\x07",Cs=";",Du=process.env.TERM_PROGRAM==="Apple_Terminal",z={};z.cursorTo=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof t!="number"?Q+(e+1)+"G":Q+(t+1)+";"+(e+1)+"H"};z.cursorMove=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let s="";return e<0?s+=Q+-e+"D":e>0&&(s+=Q+e+"C"),t<0?s+=Q+-t+"A":t>0&&(s+=Q+t+"B"),s};z.cursorUp=(e=1)=>Q+e+"A";z.cursorDown=(e=1)=>Q+e+"B";z.cursorForward=(e=1)=>Q+e+"C";z.cursorBackward=(e=1)=>Q+e+"D";z.cursorLeft=Q+"G";z.cursorSavePosition=Du?"\x1B7":Q+"s";z.cursorRestorePosition=Du?"\x1B8":Q+"u";z.cursorGetPosition=Q+"6n";z.cursorNextLine=Q+"E";z.cursorPrevLine=Q+"F";z.cursorHide=Q+"?25l";z.cursorShow=Q+"?25h";z.eraseLines=e=>{let t="";for(let s=0;s<e;s++)t+=z.eraseLine+(s<e-1?z.cursorUp():"");return e&&(t+=z.cursorLeft),t};z.eraseEndLine=Q+"K";z.eraseStartLine=Q+"1K";z.eraseLine=Q+"2K";z.eraseDown=Q+"J";z.eraseUp=Q+"1J";z.eraseScreen=Q+"2J";z.scrollUp=Q+"S";z.scrollDown=Q+"T";z.clearScreen="\x1Bc";z.clearTerminal=process.platform==="win32"?`${z.eraseScreen}${Q}0f`:`${z.eraseScreen}${Q}3J${Q}H`;z.beep=Qt;z.link=(e,t)=>[jr,"8",Cs,Cs,t,Qt,e,jr,"8",Cs,Cs,Qt].join("");z.image=(e,t={})=>{let s=`${jr}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")+Qt};z.iTerm={setCwd:(e=process.cwd())=>`${jr}50;CurrentDir=${e}${Qt}`,annotation:(e,t={})=>{let s=`${jr}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+Qt}};var si=z;var $u=zt(xu(),1),vu=zt(Su(),1);var Qc=(0, $u.default)(()=>{(0, vu.default)(()=>{es__default.default.stderr.write("\x1B[?25h");},{alwaysLast:!0});}),Bu=Qc;var As=!1,er={};er.show=(e=es__default.default.stderr)=>{e.isTTY&&(As=!1,e.write("\x1B[?25h"));};er.hide=(e=es__default.default.stderr)=>{e.isTTY&&(Bu(),As=!0,e.write("\x1B[?25l"));};er.toggle=(e,t)=>{e!==void 0&&(As=e),As?er.show(t):er.hide(t);};var ui=er;function ai(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 Kc=/^[\uD800-\uDBFF][\uDC00-\uDFFF]$/,Ru=["\x1B","\x9B"],Ts=e=>`${Ru[0]}[${e}m`,Tu=(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=Tr.codes.get(Number.parseInt(n,10));if(o){let a=e.indexOf(o.toString());a===-1?r.push(Ts(t?o:i)):e.splice(a,1);}else if(t){r.push(Ts(0));break}else r.push(Ts(i));}if(t&&(r=r.filter((n,i)=>r.indexOf(n)===i),s!==void 0)){let n=Ts(Tr.codes.get(Number.parseInt(s,10)));r=r.reduce((i,o)=>o===n?[o,...i]:[...i,o],[]);}return r.join("")};function li(e,t,s){let r=[...e],n=[],i=typeof s=="number"?s:r.length,o=!1,a,c=0,h="";for(let[p,l]of r.entries()){let m=!1;if(Ru.includes(l)){let D=/\d[^m]*/.exec(e.slice(p,p+18));a=D&&D.length>0?D[0]:void 0,c<i&&(o=!0,a!==void 0&&n.push(a));}else o&&l==="m"&&(o=!1,m=!0);if(!o&&!m&&c++,!Kc.test(l)&&ai(l.codePointAt())&&(c++,typeof s!="number"&&i++),c>t&&c<=i)h+=l;else if(c===t&&!o&&a!==void 0)h=Tu(n);else if(c>=i){h+=Tu(n,!0,a);break}}return h}var Xc=24,Rs=e=>{let{columns:t}=e;return t||80},Zc=(e,t)=>{let s=e.rows||Xc,r=t.split(`
|
76
|
+
`),n=r.length-s;return n<=0?t:li(t,_t(r.slice(0,n).join(`
|
77
|
+
`)).length+1)};function ku(e,{showCursor:t=!1}={}){let s=0,r=Rs(e),n="",i=(...o)=>{t||ui.hide();let a=o.join(" ")+`
|
78
|
+
`;a=Zc(e,a);let c=Rs(e);a===n&&r===c||(n=a,r=c,a=ht(a,c,{trim:!1,hard:!0,wordWrap:!1}),e.write(si.eraseLines(s)+a),s=a.split(`
|
79
|
+
`).length);};return i.clear=()=>{e.write(si.eraseLines(s)),n="",r=Rs(e),s=0;},i.done=()=>{n="",r=Rs(e),s=0,t||ui.show();},i}var ep=ku(es__default.default.stdout),Lt=ep;ku(es__default.default.stderr);var Mt={};function Be(e){return d(e,Mt)||(Mt[e]=[]),(t,s)=>{X(s)?Mt[e].push(x.yellow+le(t)):Mt[e].push(x.yellow+le(t+N+ye+F(s)));}}function k({option:e,name:t,provided:s,expects:r}){te(P(2),O(`${F(`Invalid ${M(e)} type value provided`)}`)+P(2),O(`The ${M(t)} option has an incorrect type value`)+P(2),O(`provided${N} ${le(ae(s).toLowerCase())}`)+w,O(`expected${N} ${v(r.replace(/([|,])/g,g("$1")))}`)+P(2),O(`in${N} ${g.underline(u.file.base)}`)+P(2),b.bold("How to fix?")+w,`
|
80
|
+
${g("You need to change the option value to use the")} ${v("expected")} ${g("type.")}
|
81
|
+
${g(`Use the ${M("defineConfig")} named export for type checking`)}
|
82
|
+
`),process.exit(0);}function Et({message:e,expected:t,fix:s}){let r=es.argv.slice(2).join(" ");t=b("syncify "+r+" ")+v(t.replace(/([|,])/g,g("$1"))),te(P(2),O(`${F("Invalid or incomplete command passed")}`)+P(2),O(S(e)?e.join(`
|
83
|
+
`):e)+P(2),O(`provided${N} ${b("$")} ${b("syncify "+r)}`)+w,O(`expected${N} ${b("$")} ${t}`)+P(2),b.bold("How to fix?")+w,g(S(s)?s.join(w):s)),process.exit(0);}function Pu({type:e,message:t,provided:s,expected:r,fix:n}){Fr.test(s)&&(s=s.replace(Fr,g("$1"))),Fr.test(r)&&(r=r.replace(Fr,g("$1"))),S(t)&&(t=t.join(`
|
84
|
+
`)),te(P(2),O(F(`Invalid ${M(e)} target provided`))+P(2),O(t)+P(2),O(`provided${N} ${le(r)}`)+w,O(`expected${N} ${v(s)}`)+P(2),b.bold("How to fix?")+w,g(S(n)?n.join(w):n)),process.exit(0);}function Le(e){L(e)?te(P(2),O(`${F(`Missing ${M(e)} dependency`)}`)+P(2),O(`You need to install ${M(e)} to use it as a processor`)+P(2),b.bold("How to fix?")+w+w,`$ ${v.bold("pnpm add "+e+" -D")}`+P(2),g("If you are using a different package manager (i.e: Yarn or NPM) then"),g("please consider adopting pnpm. Pnpm is dope and does dope shit.")):te(P(2),O(`${F(`Missing ${M(`${e.length}`)} dependencies`)}`)+P(2),O("You are attempting to use processors which are not yet installed!")+P(2),xt(g("-")+ye+e.join(w+g(" -")+ye))+P(2),b.bold("How to fix?")+w,`
|
85
|
+
$ ${Gn("pnpm add "+e.join(ye)+" -D")}
|
86
|
+
|
87
|
+
${g("If you are using a different package manager (i.e: Yarn or NPM) then")}
|
88
|
+
${g("please consider adopting pnpm. Pnpm is dope and does dope shit.")}
|
89
|
+
`),process.exit(0);}function Ou(e,t,s,r){e.indexOf(".")>-1&&(e=e.split(".").filter(Boolean).join(g(" \u2192 "))),te(P(2),O(`${F(`Missing ${Qn} ${M(e)} ${Kn} configuration option`)}`)+P(2),O(`The ${M(t)} option needs to be defined`)+P(2),O(`expects${N} ${v(s.replace(/([|,])/g,g("$1")))}`)+P(2),O(`at${N} ${g.underline(u.file.base)}`)+P(2),b.bold("Why?")+w+w+g(S(r)?` ${r.join(`
|
90
|
+
`)}`:` ${r}`)+w+w),process.exit(0);}function fe(e,t,s,r){te(P(2),se.bold("ERROR (!)"),P(2),O(`${F(`Invalid ${M(e)} configuration`)}`)+P(2),O(`The ${M(t)} option has an invalid or missing value`)+P(2),O(`provided${N} ${le(s)}`)+w,O(`expected${N} ${v(r.replace(/([|,])/g,g("$1")))}`)+P(2),b.bold("How to fix?")+w,`
|
91
|
+
${g("You need to update the option and use one of the expected values.")}
|
92
|
+
${g(`Use the ${M("defineConfig")} named export for type checking`)}
|
93
|
+
`),process.exit(0);}function ju(e){te(P(2),se.bold("ERROR (!)"),P(2),O(`${F(`Missing ${M("syncify.config.js")} configuration`)}`)+P(2),O("Unable to resolve a configuration file within the workspace")+P(2),O(`at${N} ${g.underline(e)}`)+P(2),b.bold("How to fix?")+w,`
|
94
|
+
${g("You need to add one the following files to your project")}
|
95
|
+
|
96
|
+
${g("-")} ${b("syncify.config.ts")}
|
97
|
+
${g("-")} ${b("syncify.config.js")}
|
98
|
+
${g("-")} ${b("syncify.config.mjs")}
|
99
|
+
${g("-")} ${b("syncify.config.cjs")}
|
100
|
+
${g("-")} ${b("syncify.config.json")}
|
101
|
+
|
102
|
+
${g("You can also provide configuration in your")} ${b("package.json")}
|
103
|
+
${g("file using on a")} ${le('"syncify": {}')} ${g("property.")}
|
104
|
+
`),process.exit(0);}function ce(e,t){te(P(2),se.bold("(!) ERROR"),P(2),O.bold(e)+P(2),b.bold("How to fix?")+w,g(S(t)?t.join(w).trimStart():t),P(2)),process.exit(0);}function bt(e,t){e.indexOf(".")>-1&&(e=g.bold("{ ")+e.split(".").filter(Boolean).join(g(" \u2192 "))+g(" \u2192 ")+se.bold(t)+g.bold(" }"));let s=u.file.base==="package.json"?`${v("syncify")} config in the ${v("package.json")} file.`:`${v(u.file.base)} file.`;te(P(2),se.bold("ERROR (!)"),P(2),se(`Unknown ${e} option provided.`)+P(2),b.bold("How to fix?")+w,`
|
105
|
+
${g(`The ${v(t)} option is invalid or unsupported.`)}
|
106
|
+
${g(`You need to remove it from the ${s}`)}
|
107
|
+
`),process.exit(0);}function Iu(e){let t=[];if(e.mode.metafields)return A;t.push(`${Pr}${g("Syncify")} ${g("~")} ${g(Ar())}`,`${x.gray}`),np(t,e.terminal.cols),t.push(`${x.gray}${xt.bold(`v${e.version}`)}`,`${x.gray}`);let s=e.sync.stores.length,r=Re(e.sync.themes).length,n=Re(e.spawn.commands).length,{mode:i,spawn:o,sync:a}=e,c=M.bold(String(s))+(s>1?" stores":" store"),h=M.bold(String(r))+(r>1?" themes":" theme"),p=M.bold(`${e.env.dev?"development":"production"}`);i.build?t.push(`${x.gray}Running ${M.bold("build")} in ${p}`):i.watch?t.push(`${x.gray}Running ${M.bold("watch")} in ${p}`):i.upload?t.push(`${x.gray}Running ${M.bold("upload")} mode`):i.download?t.push(`${x.gray}Running ${M.bold("download")} mode`):i.vsc?t.push(`${x.gray}Generate ${M.bold("vscode")} schema`):i.clean?t.push(`${x.gray}Running ${M.bold("clean")} mode`):i.export&&t.push(`${x.gray}Running ${M.bold("export")} mode`),t.push(`${x.gray}${s>0&&r>0?`Syncing ${h} to ${c}`:A}`),J(e.filters)||t.push(x.gray,`${x.gray}${xt.bold("--filters")}`,`${x.gray}`+sp(e.cwd,e.filters)),e.logger.warnings&&ip(e,t),ge(i.build,i.watch)&&n>0?t.push(`${x.gray}Spawned ${M.bold(`${n}`)} child ${n>1?"processes":"process"}`,`${x.gray}`):t.push(x.gray),Me(i.upload,i.download,i.build,i.clean,i.vsc)&&(n>0&&t.push(`${x.gray}${F("Child Processes:")}`,`${x.gray}${op(at(o.streams))}`,`${x.gray}`),r>0&&t.push(`${x.gray}${F("Theme Editors:")}`,`${x.gray}${Nu(a.themes,"editor")}`,`${x.gray}`)),ge(i.upload,i.download,i.watch)&&r>0&&t.push(`${x.gray}${F(i.upload||i.download?"Theme Targets:":"Theme Previews:")}`,`${x.gray}${Nu(a.themes,"preview")}`),e.mode.hot&&t.push(`${x.gray}`),B(t.join(w));}function sp(e,t){return Kr(t).flat().reduce((s,r,n,i)=>(s+=(n>0?w+x.gray:"")+ye+ye+b(pathe.relative(e,r)),s),A)}function np(e,t){t>=100||e.push(`${x.gray}${O.bold("TERMINAL WIDTH WARNING")}`,`${x.gray}`,`${x.gray}${O(`Your terminal width is below ${F("100")} columns (currently ${F(`${t}`)})`)}`,`${x.gray}${O("This is not recommended for usage with Syncify (size matters).")}`,`${x.gray}${O("Expand your terminal wider for an optimal logging experience.")}`,`${x.gray}`);}function ip(e,t){let s=!1;for(let r in Mt){let n=Mt[r];n.length>0&&(s===!1&&(s=!0,t.push(`${x.gray}`,`${x.yellow}${le(`${F("Warnings")} in ${F(e.file.base)}`)}`)),t.push(x.yellow,x.yellow+yt.bold(`${n.length} ${r} ${st("warning",n.length)}`),x.yellow,n.join(w)));}}function op(e){let t=e.reduce((s,[r])=>r.length>s?r.length:s,0);return e.reduce((s,[r,n])=>(s+=w+x.gray+He(t-r.length)+Xe(Rt(r))+`${N} `+g("PID")+" \u2192 "+g("#")+kr(`${n.pid}`),s),A)}function Nu(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(".")),c=t==="editor"?`https://${i}/admin/themes/${o}/editor`:`https://${i}?preview_theme_id=${o}`;return r+=w+x.gray+kr(a)+He(s.store-a.length)+b(" \u2192 ")+kr.bold(n)+He(s.theme-n.length)+b(" \u2192 ")+g.underline(c),r},A)}var ci,_s=!1,pi=function(t,s="pink"){_s=!0;let r=0,n=cn.length;ci=setInterval(()=>{_s&&Lt(`${x.gray} ${y[s](`${cn[r=++r%n]}`)}${t?` ${t}`:A}`);},50);};pi.stop=e=>{_s&&(_s=!1,e?(Lt(x.gray+e),Lt.done()):Lt.clear(),clearInterval(ci),ci=void 0);};function Lu(e,t={}){let s=U({showPercentage:!0,barColor:"neonGreen",percentColor:"whiteBright",barSize:40,clearOnComplete:!1},t),r=0;function n(p){return y.line.gray+p+" ".repeat(Math.max(0,s.barSize-p.length))}function i(p,l=!1){return (l?"\u25B1":"\u25B0").repeat(p)}function o(){s.clearOnComplete&&console.clear();}function a(p=1){let l=r+p;r=Math.min(l,e),r===e&&o();}function c(p=1){let l=r-p;r=Math.max(l,0);}function h(){let p=Math.round(r/e*s.barSize),l=i(p),m=i(s.barSize-p,!0),D=y[s.barColor](l)+y.lightGray(m);return s.showPercentage&&(D+=` ${String(Math.round(r/e*100))}%`),n(D)}return {stop:o,increment:a,decrement:c,render:h,get percent(){return r}}}function ap(...e){B(util.inspect(e,{colors:!0,showHidden:!0}));}var tr=new Set,fi=null,rr=!1,we="Syncify",sr=A,Mu=A;function lp(e,t,s){let r=sr!==e;W(),r&&B(Ot(we)),we==="Syncify"&&ot(),r&&(B(Pt(we)),Ae(),B(x.gray+F(`${t} ${Rt(e)}`)),Ae(),we=e,sr=e),Ae(),B(Zn("top",Xe(typeof s=="string"?s:s.relative)));}function Ae(e="gray"){J(e)?B(w):B(x[e]);}function cp(e){S(e)?te(O(e.map(t=>x.red+mt(t)).join(w))):te(x.red+mt(e));}function pp(e){S(e)?B(e.map(t=>x.gray+mt(t)).join(w)):B(x.gray+mt(e));}function fp(e){B(V("cyan","external",e));}function mp(e){De.current!==e&&(De.current=e),d(e,De.process)||(De.current=e,De.process[e]=new Set),fi=Mo((t,s)=>{if(s.charCodeAt(0)===9474)qu[t].write(s);else {De.count+=1;let r=s.split(`
|
108
|
+
`);for(;r.length!==0;)De.process[e].add(`${le(r.shift().trimStart())}`);}});}function dp(){fi(),fi=null;}function Dp(e,t=!1){B(Ot(we)),t&&ot(),B(Pt(e)),we=e,Ae();}function hp(e,t){B(V("greenBright","updated",`${e.relative} ${t?g(`~ ${t}`):A}`));}function gp(e){let t=sr!==e.namespace;W(),t&&B(Ot(we)),we!=="Syncify"&&t&&ot(),we=`${e.kind} ${Rt(e.namespace)}`,t&&(ot(),B(Pt(we)),sr=e.namespace),d(e.relative,De)||(De[e.relative]=new Set),Mu!==e.relative&&(Mu=e.relative),u.mode.watch&&(Ae(),B(V("neonCyan","changed",e.relative)));}function yp(){B(V("neonRouge","reloaded",`${F("HOT RELOAD")}${Ft(dt())}`));}function xp(e,t){if(u.mode.watch){if(tr.add([e,t.domain,Y()]),rr)return;rr=!0,G.onIdle().then(()=>{for(let[s,r,n]of tr)B(V("neonGreen","uploaded",`${F(s)} \u2192 ${r}`+Ft(n)));tr.clear(),rr=!1;});}else B(V("neonGreen","uploaded",`${F(e)} \u2192 ${t.domain}`+Ft(Y())));}function wp(e){if(u.mode.watch){if(tr.add([e.target,e.store,Y()]),rr)return;rr=!0,G.onIdle().then(()=>{for(let[t,s,r]of tr)B(V("neonGreen","uploaded",`${F(t)} \u2192 ${s}`+Ft(r)));tr.clear(),rr=!1;});}else B(V("neonGreen","uploaded",`${F(e.target)} \u2192 ${e.store}`+Ft(Y())));}function Fp(e,t){return B(V("orange","prompt",e)),B(Ot(we)+w),I(t)&&ks__default.default.notify(t).notify(),()=>{B(Pt(we)),Ae();}}function Cp(e,t=!1){De.count>0&&V("yellowBright","warning",`${De.count} ${st("warning",De.count)}`),t?(B(V("magentaBright","syncing",e)),G.pending>2&&B(V("orange","queued",`${e} ~ ${F($n(G.pending))} in queue`))):(B(V("magentaBright","syncing",e)),G.pending>0&&B(V("orange","queued",`${e} ~ ${F($n(G.pending))} in queue`)));}function qu(e,...t){let s=t[0],r=A;t.length===2&&(r=` ${Jn} ${t[0]}`,s=t[1]),B(V("whiteBright","process",F(e)+r+Ft(s)));}function Ep(e){B(V("whiteBright","exports",e));}function bp(e){u.mode.build||B(V("lavender","importer",e));}function Sp(e){B(V("whiteBright","transform",e));}function $p(e,t){B(V("yellowBright","warning",`${e}${t?g(` ~ ${t}`):""}`));}function vp(e,t){B(V("orange","retrying",`${e} \u2192 ${t.target} ${g(`~ ${t.store}`)}`));}function Bp(e,t){B(V("blueBright","deleted",`${e} \u2192 ${t.target} ${g(`~ ${t.store}`)}`));}function Ap(e,t,s,r){let n=e?`${F(e)} ${be} ${t} ${xs} ${s} ${g(`~ saved ${r}`)}`:`${t} ${xs} ${s} ${g(`~ saved ${r}`)}`;B(V("whiteBright","minified",n));}function Tp(e,t){B(V("whiteBright","reloaded",e+t));}function Rp(e,t){B(V("gray","skipped",`${typeof e=="string"?e:e.key} ~ ${t}`));}function _p(e){B(V("gray","ignored",e));}function kp(e,t){B(V("red","invalid",e)),ks__default.default.notify({title:"Syncify Error",sound:"Pop",open:e,subtitle:e,message:"Invalid error"}).notify(),t&&(Ae(),S(t)?te(O(t.map(r=>x.red+mt(r)).join(w))):te(x.red+mt(t)));}function Pp(e){B(V("red","failed",e)),ks__default.default.notify({title:"Syncify Error",sound:"Pop",open:e,subtitle:e,message:"Request failed"}).notify();}function Op(){Ae("yellow"),B(x.yellow+F.yellow(`WARNING ${Yn} RESTART IS REQUIRED`)),Ae("yellow"),B(x.yellow+F.yellow(`Changes to ${Xe(u.file.base)} require you restart watch mode.`)+w+x.yellow+F.yellow("Failure to restart watch mode will prevent changes from being reflected.")),Ae("yellow"),ks__default.default.notify({title:"WARNING",sound:"Pop",wait:!0,message:`Changes in ${u.file.base} will not reflect until you to restart watch mode.`}).notify();}function jp(e){throw new Error(e)}function Np(e){return (...t)=>{u.spawn.invoked||(u.spawn.invoked=!0),we!=="Spawn"&&(B(Ot(we)),we!=="Syncify"&&ot(),B(Pt("Spawn")),we="Spawn"),sr!==e&&(B(ei("pink",e)),sr=e),ri(mt(t.shift()));}}var nr={};gr(nr,{esbuild:()=>Gu,postcss:()=>Lp,sass:()=>Ip,warnings:()=>We});var We={},Ip=e=>(t,s)=>{let r=A;d(e.input,We)?We[e.input].has("sass")||We[e.input].set("sass",new Set):We[e.input]=new Map([["sass",new Set]]);let n=We[e.input].get("sass");if(r+=Ct(t,{nwl:!0,line:x.yellow,text:le.bold}),d("span",s)){let i=d("start",s.span)&&d("end",s.span)?{start:s.span.start.line,end:s.span.end.line}:null,o=d("context",s.span)?s.span.context:d("text",s.span)?s.span.text:null;o!==null&&(i!==null?r+=jt(o,{line:x.yellow,span:i}):r+=jt(o));}r+=Ge({stack:s.stack,entries:{file:e.relative,deprecated:s.deprecation?"Yes":"No"}}),n.has(r)?B(V("yellowBright","warning",`${n.size} ${st("warning",n.size)+ws}`)):(n.add(r),B(V("yellowBright","warning",`${n.size} ${st("warning",n.size)+ws}`)));};function Gu(e){}function Lp(e,t){let s=A;d(e.input,We)?We[e.input].has("postcss")||We[e.input].set("postcss",new Set):We[e.input]=new Map([["postcss",new Set]]);let r=We[e.input].get("postcss");s+=jt(t.node.toString(),{line:x.yellow,span:Xr(t.endLine)?{start:t.line,end:t.endLine}:{start:t.line,end:t.endLine}}),s+=Ge({stack:!1,entries:{column:t.column,file:e.relative,plugin:t.plugin}}),r.has(s)||(r.add(s),no(s));}function Wu(){f.nwl(""),f.out(g("SIGINT")),process.exit();}function zu(e,t){f.nwl(),f.err(`Unhandled Promise Rejection at: ${t}`),f.nwl("red"),f.out(e?g(e):"Unkown Reason");}var mi=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t;}},Uu=e=>globalThis.DOMException===void 0?new mi(e):new DOMException(e),Vu=e=>{let t=e.reason===void 0?Uu("This operation was aborted."):e.reason;return t instanceof Error?t:Uu(t)};async function Os(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=[],c=[],h=new Map,p=!1,l=!1,m=!1,D=0,C=0,E=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),_=K=>{p=!0,l=!0,o(K);};n&&(n.aborted&&_(Vu(n)),n.addEventListener("abort",()=>{_(Vu(n));}));let H=async()=>{if(l)return;let K=await E.next(),ee=C;if(C++,K.done){if(m=!0,D===0&&!l){if(!r&&c.length>0){_(new AggregateError(c));return}if(l=!0,h.size===0){i(a);return}let Ne=[];for(let[ie,en]of a.entries())h.get(ie)!==Ps&&Ne.push(en);i(Ne);}return}D++,(async()=>{try{let Ne=await K.value;if(l)return;let ie=await t(Ne,ee);ie===Ps&&h.set(ee,ie),a[ee]=ie,D--,await H();}catch(Ne){if(r)_(Ne);else {c.push(Ne),D--;try{await H();}catch(ie){_(ie);}}}})();};(async()=>{for(let K=0;K<s;K++){try{await H();}catch(ee){_(ee);break}if(m||p)break}})();})}var Ps=Symbol("skip");function St(e){return S(e)?e.filter(t=>/\*/.test(t)):/\*/.test(e)?e:null}function Fe(e){if(S(e))return e.map(Fe);if(e.indexOf("/")===-1)return e;let t=path.dirname(e),s=t.lastIndexOf("/")+1;return t.slice(s)}function di(e){if(S(e))return e.map(di);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 ir(e){let t=new RegExp(`^\\.?\\/?${e}\\/`);return function s(r){if(S(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&&ce(`Invalid path defined at: ${N} ${le(`"${r}"`)}`,"Paths must be relative to source"),(n?"!":"")+path.join(e,r))}}var Ju=e=>t=>{if(t.indexOf("*")!==-1&&ce(`Base directory path cannot contain glob${N} ${le(`"${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):ce(`Directory path is invalid at${N} ${le(`"${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),so(t).charCodeAt(0)===47?t:t+"/";ce(`Directory path is invalid at${N} ${le(`"${t}"`)}`,"Ensure that path you are resolving is correctly formed");};function Qu(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 X(t)||Vt(e,"data",{get(){return t}}),e}function Ir(e){let t=u.style.find(s=>s.watch(e.input));return X(t)||(Vt(e,"data",{get(){return t}}),t.snippet?(e.namespace="snippets",e.key=pathe.join("snippets",t.rename)):e.key=pathe.join("assets",t.rename),e.output?e.data.rename!==pathe.basename(e.output)&&(t.snippet?e.output=pathe.join(u.dirs.output,e.key):e.output=pathe.join(di(e.output),e.data.rename)):e.output=pathe.join(u.dirs.output,e.key)),e}function Lr(e){let t=u.script.filter(s=>s.watch.has(e.input));return t.length===0||Vt(e,"data",{get(){return t}}),e}function Di(e){if(u.section.prefixDir){if(e.base.endsWith("-group.json")||Bt(u.section.global)&&u.section.global.test(e.input))return e;let t=Fe(e.input);if(u.section.baseDir.has(t))return e;let s=Fe(e.input)+u.section.separator+e.base;e.name=s,e.key=pathe.join(e.namespace,s),e.output=pathe.join(pathe.dirname(e.output),s);}return e}function Ku(e){if(u.snippet.prefixDir){if(Bt(u.snippet.global)&&u.snippet.global.test(e.input))return e;let t=Fe(e.input);if(u.snippet.baseDir.has(t))return e;let s=t+u.snippet.separator+e.base;e.name=s,e.key=pathe.join(e.namespace,s),e.output=pathe.join(pathe.dirname(e.output),s);}return e}function Mr({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 Zu(e,t,s){let r=e;return (n,i,o)=>{let a;return i===14||i===15?(a=pathe.join(Fe(r.dir),r.base),s=null):(a=pathe.join(n,r.base),s=pathe.join(s,a)),o===-1&&(t=u.cache.maps[t]),U({},r,{uuid:Ye(),type:i,input:t,output:s,key:a,namespace:n,kind:o,relative:pathe.relative(u.cwd,t),size:NaN,data:void 0})}}function js(e,t){return s=>{let r=pathe.parse(s),n=Zu(r,s,t);if(r.ext===".liquid"){if(e.sections.match(s))return Di(n("sections",4,"Liquid"));if(e.snippets.match(s))return Ku(n("snippets",3,"Liquid"));if(e.layout.match(s))return n("layout",2,"Liquid");if(e.templates.match(s))return n("templates",1,"Liquid");if(e.customers.match(s))return n("templates/customers",1,"Liquid");if(e.metaobject.match(s))return n("templates/metaobject",1,"Liquid");if(e.transforms.has(s)&&e.transforms.get(s)===8)return Ir(n("snippets",8,"CSS"))}else if(e.assets.match(s)){if(u.spawn.invoked)return n("assets",16);if(r.ext===".jpg"||r.ext===".png"||r.ext===".gif"||r.ext===".pjpg")return n("assets",13,"Image");if(r.ext===".mov"||r.ext===".mp4"||r.ext===".webm"||r.ext===".ogg")return n("assets",13,"Video");if(r.ext===".pdf")return n("assets",13,"PDF");if(r.ext===".eot"||r.ext===".ttf"||r.ext===".woff"||r.ext===".woff2")return n("assets",13,"Font");if(r.ext===".js"||r.ext===".mjs")return n("assets",13,"JavaScript");if(r.ext===".json")return n("assets",13,"JSON");if(r.ext===".svg")return n("assets",13,"SVG");if(r.ext===".css")return n("assets",13,"CSS")}else {if(r.ext===".md"||r.ext===".html")return r.ext===".html"?n("pages",15,"HTML"):n("pages",15,"Markdown");if(r.ext===".json"){if(e.metafields.match(s))return n("metafields",14,"JSON");if(e.sections.match(s))return Di(n("sections",4,"JSON"));if(e.templates.match(s))return n("templates",1,"JSON");if(e.config.match(s))return n("config",6,"JSON");if(e.locales.match(s))return n("locales",7,"JSON");if(e.customers.match(s))return n("templates/customers",1,"JSON");if(e.metaobject.match(s))return n("templates/metaobject",1,"JSON")}else {if(r.ext===".svg")return Qu(n("assets",10,"SVG"));if(r.ext===".css")return Ir(n("assets",8,"CSS"));if(r.ext===".scss")return Ir(n("assets",8,"SCSS"));if(r.ext===".sass")return Ir(n("assets",8,"SASS"));if(r.ext===".js"||r.ext===".mjs")return Lr(n("assets",9,"JavaScript"));if(r.ext===".ts")return Lr(n("assets",9,"TypeScript"));if(r.ext===".jsx")return Lr(n("assets",9,"JSX"));if(r.ext===".tsx")return Lr(n("assets",9,"TSK"))}}}}function ea(e){return e.startsWith("sections/")?U({key:e,namspace:"sections"}):e.startsWith("snippets/")?U({key:e,namspace:"snippets"}):e.startsWith("layout/")?U({key:e,namspace:"layout"}):e.startsWith("customers/",10)?U({key:e,namspace:"templates/customers"}):e.startsWith("metaobject/",10)?U({key:e,namspace:"templates/metaobject"}):e.startsWith("templates/")?U({key:e,namspace:"templates"}):e.startsWith("config/")?U({key:e,namspace:"config"}):e.startsWith("locales/")?U({key:e,namspace:"locales"}):e.startsWith("assets/")?U({key:e,namspace:"assets"}):U({key:e,namspace:"assets"})}var ta=e=>t=>{let s=pathe.parse(t),r=Zu(s,t,e);switch(pathe.basename(s.dir)){case"sections":return r("sections",4,-1);case"snippets":return r("snippets",3,-1);case"layout":return r("layout",2);case"templates":return r("templates",1,-1);case"customers":return r("templates/customers",1,-1);case"metaobject":return r("templates/metaobject",1,-1);case"config":return r("config",6,-1);case"locales":return r("locales",7,-1);case"assets":return r("assets",13,-1)}};async function ra(e,t){return $e({...u.sync.stores[t.sidx].client,method:"get",url:t.url,params:{"asset[key]":e}}).then(({data:s})=>s.asset).catch(()=>!1)}async function gi(e,t){let s=de(u.sync.stores[t.theme.sidx].client,{method:"put",url:t.theme.url,data:{asset:{key:t.key,value:e}}});return $e(s).then(()=>!0).catch(r=>(f.failed(t.key),q.request(t.key,r.response),!1))}async function yi(e,t){let s=typeof e=="string"?e:e.url;return $e.get(s,t).then(({data:r})=>r).catch(r=>{if(r.response&&(r.response.status===429||r.response.status===500))t.params["asset[key]"]&&(f.retrying(t.params["asset[key]"],e),G.add(()=>yi(e,t)));else {if(u.mode.upload)throw r.response;t.params["asset[key]"]&&(f.failed(t.params["asset[key]"]),q.request(t.params["asset[key]"],r.response));}})}var Ns;async function xi(e,t,s){if(G.isPaused)return;let{mode:r}=u;return G.concurrency>2?(Ns>=20&&G.concurrency--,Ns>=35&&G.concurrency--):G.concurrency<3&&Ns<30&&G.concurrency++,!r.upload&&!r.download&&W(),await $e(s).then(({headers:i,data:o})=>{if(r.download===!1&&s.method==="get")return o;if(s.method==="delete")f.deleted(t.relative,e);else if(r.watch)t.type!==9&&t.type!==8&&f.hot(),f.upload(e);else if(r.upload){let a="";"asset"in s.data&&(a=nt(s.data.asset.value)),Ie.emit("upload","uploaded",e,{key:t.key,namespace:t.namespace,fileSize:a});}else r.download&&Ie.emit("download","downloads",e,{key:t.key,namespace:t.namespace,data:o});Ns=parseInt(i["x-shopify-shop-api-call-limit"].slice(0,2),10);}).catch(i=>{if(i.response&&(i.response.status===429||i.response.status===500))!r.upload&&!r.download&&f.retrying(t.key,e),G.add(()=>xi(e,t,s)),r.download&&Ie.emit("download","retry",e,{key:t.key,namespace:t.namespace,get file(){return t}});else if(r.upload){let o="";"asset"in s.data&&(o=nt(s.data.asset.value)),Ie.emit("upload","failed",e,{key:t.key,namespace:t.namespace,fileSize:o,get file(){return t},get error(){return i.response}});}else r.download?Ie.emit("download","failed",e,{key:t.key,namespace:t.namespace,get file(){return t},get error(){return i.response}}):(f.failed(t.key),i.isAxiosError&&q.request(t.relative,i.response));return Ps})}var wi=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=mu__default.default.createInterface({input:this.stream,escapeCodeTimeout:50}),mu__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;}},ia=wi;new ia;var oa=globalThis.process?.env||{},ua=globalThis.process?.argv||[],aa=!("NO_COLOR"in oa)&&oa.TERM!=="dumb"&&!ua.includes("--no-color")&&!ua.includes("--no-colors")&&(!globalThis.process?.stdout||globalThis.process?.stdout?.isTTY===!0);var ca=e=>new Proxy(e,{get(t,s){return s in la?ca(r=>e(la[s](r))):t[s]}}),Z=(e,t)=>ca(s=>aa?`\x1B[${e}m${s}\x1B[${t}m`:s),la={reset:Z(0,0),bold:Z(1,22),dim:Z(2,22),italic:Z(3,23),underline:Z(4,24),overline:Z(53,55),inverse:Z(7,27),hidden:Z(8,28),strikethrough:Z(9,29),black:Z(30,39),red:Z(31,39),green:Z(32,39),yellow:Z(33,39),blue:Z(34,39),magenta:Z(35,39),cyan:Z(36,39),white:Z(37,39),gray:Z(90,39),bgBlack:Z(40,49),bgRed:Z(41,49),bgGreen:Z(42,49),bgYellow:Z(43,49),bgBlue:Z(44,49),bgMagenta:Z(45,49),bgCyan:Z(46,49),bgWhite:Z(47,49),bgGray:Z(100,49)};var fa=es__default.default.platform==="linux",ma=es__default.default.platform==="win32";var Fi=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];ma||Fi.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");fa&&Fi.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED");var da=Fi;var Ci=class{constructor(){this.callbacks=new Set,this.exited=!1,this.exit=t=>{if(!this.exited){this.exited=!0;for(let s of this.callbacks)s();t&&es__default.default.kill(es__default.default.pid,t);}},this.hook=()=>{es__default.default.once("exit",()=>this.exit());for(let t of da)es__default.default.once(t,()=>this.exit(t));},this.register=t=>(this.callbacks.add(t),()=>{this.callbacks.delete(t);}),this.hook();}},Da=new Ci;var Up=Da.register,ha=Up;var Ei=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,ha(this.show);}},ga=Ei;new ga;async function ya(e,t){if(is(arguments.length,1))return s=>ya(e,s);if(Me(d("namespace",t),d("key",t))){f.error("invalid fields");return}return $e.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 bi(e,t){return is(arguments.length,1)?s=>bi(e,s):(t.type="json",t.namespace="email",t.value_type="json_string",t.key="eng",$e.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 q(t.namespace,s.response);if(ft(s.response.status)){G.add(()=>bi(e,t));return}else return q(e.store,s.response)}))}async function Si(e,t,s){return is(arguments.length,1)?(r,n)=>Si(e,r,n):$e.put(`metafields/${t}.json`,{metafield:s},e.client).then(r=>(console.log("created"),r.data.metafield)).catch(r=>{if(!e.queue)return q(s.namespace,r.response);if(ft(r.response.status))G.add(()=>Si(e,t,s));else return q(e.store,r.response)})}async function Ls(e,t){if(is(arguments.length,1))return r=>Ls(e,r);let s=await ya(e,t);return s?Si(e,s.id,U(t,{id:s.id,type:"json"})).catch(r=>{if(!e.queue)return q(t.namespace,r.response);if(ft(r.response.status))G.add(()=>Ls(e,t));else return q(e.store,r.response)}):bi(e,t)}function ur({stores:e,themes:t}){return {assets:async(s,r,n)=>{let i=X(n)?{method:s,params:{"asset[key]":r.key}}:{method:s,data:{asset:{key:r.key,value:n}}};await G.add(()=>Os(t,async o=>{(u.mode.upload||u.mode.download)&&W(),await xi(o,r,utils.assign({url:o.url},e[o.sidx].client,i));}));},pages:async(s,r,n)=>{await G.add(()=>Os(e,async i=>{u.mode.upload&&W(),console.log(n);}));},metafields:s=>G.add(function(){return ro(async function(r){await Ls(r,s);},e)})}}var Ms=/{%-?\s*render\s+['"]hot\.js['"]/;async function wa(){let e="snippets/hot.js.liquid",[t]=u.sync.themes,s=await fsExtra.readFile(u.hot.snippet),r=await gi(s.toString(),{theme:t,key:e});return f.update(R.message("gray",`${e} uploaded snippet injection`)),r}function ar(e){return Ms.test(e)}function Fa(e){if(!ar(e))return Ca(e)}function qr(e){let t=e.search(Ms);if(t>-1){let s=e.slice(0,t),r=e.slice(e.indexOf("%}")+2);return s+r}return e}function Ca(e){let t=e.indexOf("<head>")+6;return e.slice(0,t)+w+u.hot.renderer+w+e.slice(t)}async function Ea(e){if(!await fsExtra.pathExists(e))return null;let r=(await fsExtra.readFile(e)).toString();Ms.test(r)||(r=Ca(r),await fsExtra.writeFile(e,r),f.update(R.message("gray","injected render tag in output layout")));let[n]=u.sync.themes,i=pathe.basename(e),o=`layout/${i}`,a=await ra(`layout/${i}`,n);return Ms.test(a)&&(r=qr(r)),await gi(r,{theme:n,key:o})?(f.update(R.message("gray","uploaded and inject render tag")),!0):!1}function rf(e){e===0&&ce("Empty output directory",[`There are no files within ${v(pathe.relative(u.cwd,u.dirs.output)+"/**")}`,`You may need to run the ${v("syncify build")} command and try again.`]);let t={local:[],remote:{}},s={},r=0;for(let{store:n,target:i}of u.sync.themes)i.length>r&&(r=i.length),d(n,s)||(s[n]={}),d(n,t.remote)||(t.remote[n]=new Map),s[n][i]={theme:i,uploaded:0,failed:0,progress:f.progress(e),errors:[]};return {sync:s,errors:t,size:e}}function sf(e,t){let s=0;for(let r in e)t.remote[r].size>0?s=s+1:delete t.remote[r];return s}async function ba(e){u.cache.lastResource="upload",f.newGroup("Upload",!0),f.spinner("Preparing"),W("upload");let t=ur(u.sync),s=Se(e),r=ta(u.dirs.output),n=cl__default.default.sync(`${u.dirs.output}/templates/*`).sort(),{sync:i,errors:o,size:a}=rf(n.length);await on(250),Ie.on("upload",function(h,{target:p,store:l},m){f.spinner.stop();let D=h==="failed",C=[R.message("whiteBright",F(m.namespace)),wt,R.message(D?"redBright":"neonGreen",m.key),wt,R.suffix("white","size ",` ${m.fileSize}`),w,R.suffix("white","duration ",` ${Y()}`),w,R.suffix("white","elapsed ",` ${dt("upload")}`),wt];i[l][p][h]+=1,i[l][p].progress.increment(1);for(let E in i)for(let _ in i[E]){let H=i[E][_],K=` ${F(`${H.uploaded}`)} ${b("of")} ${F(`${a}`)}`,ee=` ${F(`${H.failed}`)}`;C.push(R.message("neonCyan",`${F(_.toUpperCase())} ${be} ${E}`),wt,R.suffix("whiteBright","uploaded ",K),w,R.suffix(H.failed>0?"redBright":"white","failed ",ee),wt,H.progress.render(),wt);}D&&(i[l][p].errors.push(m.file.key),o.remote[l].has(m.file.output)?o.remote[l].get(m.file.output).push({store:l,theme:p,file:m.file,attempts:0,response:m.error}):o.remote[l].set(m.file.output,[{store:l,theme:p,file:m.file,attempts:0,response:m.error}])),f.update(Te(C));}),await on(500);for(let h of n){let p=r(h),l;try{if(l=(await fsExtra.readFile(p.output)).toString(),p.namespace==="layout"&&ar(l)&&(l=qr(l)),!s)await t.assets("put",p,l);else {let D=e.apply({...p},l);X(D)||D===!1?await t.assets("put",p,l):L(D)?await t.assets("put",p,D):_e(D)?await t.assets("put",p,D.toString()):await t.assets("put",p,l);}}catch(m){o.local.push({file:p,attempts:0,response:m.message});}}f.update.clear();for(let h in i)for(let p in i[h]){let l=i[h][p];if(l.failed===0)continue;let m=F(`${p.toUpperCase()} THEME`),D=` ${F(`${l.failed}`)}`,C=` ${F(`${l.uploaded}`)} ${b("of")} ${F(`${a}`)}`;f.out(R.message("whiteBright",`${F(m)} ${be} ${h}`)),f.nwl(),f.out(R.suffix("whiteBright","uploaded ",C)),f.out(R.suffix("whiteBright","failed ",D)),f.nwl(),f.write([g("Syncify is now watching all rejected files. Changes will be resynced if successful."),g("In some cases, you may need to perform more detailed adjustments and then resync.")]);let E=1;for(let[_,H]of o.remote[h].entries()){let K=H.find(({theme:ee})=>ee===p);if(K){let ee=`${(E<10?"0":"")+E++}`;f.nwl(),f.write(se.bold(`ERROR ${ee}`)),q.request(_,K.response);}}f.out(Or(20));}sf(i,o)>0&&(f.write([b("Syncify is now watching file for changes."),b("The file failed to sync with 2 on. Below are the errors:")]),f.nwl(),f.write(Ht("Waiting for changes..."))),f.nwl(),f.update(`${x.gray}Upload Completed`),f.nwl(),process.exit(0);}async function uf(){let e={local:[],remote:{},retry:{}},t={},s=0;for(let r of u.sync.themes){let n=u.sync.stores[r.sidx],{assets:i}=await yi(r,n.client);r.target.length>s&&(s=r.target.length),d(r.store,t)||(t[r.store]={}),d(r.store,e.remote)||(e.remote[r.store]={}),d(r.target,e.remote[r.store])||(e.remote[r.store][r.target]=new Map),d(r.store,e.retry)||(e.retry[r.store]={}),d(r.target,e.retry[r.store])||(e.retry[r.store][r.target]=new Map),t[r.store][r.target]={get files(){return i},theme:r.target,data:[],downloads:0,failed:0,retry:0,previous:{key:"",size:""},progress:f.progress(i.length),errors:[]};}return {sync:t,errors:e}}async function Sa(e){u.cache.lastResource="download",W("download"),f.newGroup("Download",!0);Se(e);let s=ur(u.sync),{sync:r,errors:n}=await uf();Ie.on("download",function(i,{target:o,store:a},c){f.spinner.stop();let h=i!=="failed"&&i!=="retry",p=[R.message("whiteBright",y.bold(c.namespace)),y.newline];if(r[a][o][i]+=1,r[a][o].progress.increment(1),h){let l=d("attachment",c.data.asset)?Buffer.from(c.data.asset.attachment,"base64"):Buffer.from(c.data.asset.value||null,"utf8");n.retry[a][o].has(c.key)&&(n.retry[a][o].delete(c.key),r[a][o].retry=n.retry[a][o].size),p.push(R.suffix("white","duration ",` ${Y()}`),w,R.suffix("white","elapsed ",` ${dt("download")}`),y.newline);for(let m in r)for(let D in r[m]){let C=r[m][D],E=` ${y.bold(`${C.downloads}`)} ${y.white("of")} ${y.bold(`${C.files.length}`)}`,_=` ${y.bold(`${C.failed}`)}`,H=` ${y.bold(`${C.retry}`)} ${y.white("of")} ${y.bold(`${C.files.length}`)}`;o===D&&m===a?(C.previous.key=c.key,C.previous.size=nt(l.toString()),p.push(R.message("neonCyan",`${y.bold(D.toUpperCase())} ${y.ARR} ${m}`),y.newline,R.message(h?"neonGreen":"redBright",c.key),w,R.message("whiteBright",C.previous.size),y.newline,R.suffix("whiteBright","download ",E),w,R.suffix(C.retry>0?"orange":"white","retrying ",H),w,R.suffix(C.failed>0?"redBright":"white","failed ",_),y.newline,C.progress.render(),y.newline)):p.push(R.message("neonCyan",`${y.bold(D.toUpperCase())} ${y.ARR} ${m}`),y.newline,R.message(h?"neonGreen":"redBright",C.previous.key),w,R.message("whiteBright",C.previous.size),y.newline,R.suffix("whiteBright","download ",E),w,R.suffix(C.retry>0?"orange":"white","retrying ",H),w,R.suffix(C.failed>0?"redBright":"white","failed ",_),y.newline,C.progress.render(),y.newline);}fsExtra.writeFileSync(path.join(u.dirs.import,a,o,c.key),l),f.update(Te(p));}else if(i==="retry")if(r[a][o].previous.key=y.orange(c.key),r[a][o].previous.size="",r[a][o].retry=r[a][o].retry+1,n.retry[a][o].has(c.key)){let l=n.retry[a][o].get(c.key);n.retry[a][o].set(c.key,{file:c.file,attempts:l.attempts+1});}else n.retry[a][o].set(c.key,{file:c.file,attempts:0});else r[a][o].errors.push(c.key),r[a][o].previous.key=c.key,r[a][o].previous.size="",n.remote[a][o].has(c.key)?n.remote[a][o].get(c.key).push({store:a,theme:o,file:c.file,attempts:0,response:c.error}):n.remote[a][o].set(c.key,[{store:a,theme:o,file:c.file,attempts:0,response:c.error}]);});for(let i in r)for(let o in r[i])for(let a of r[i][o].files)await s.assets("get",ea(a.key));}function cf(e,t){let{wss:s,mode:r,watch:n,env:i}=u,{type:o,relative:a,kind:c,key:h,output:p}=e;return async l=>{if(o!==16&&(r.watch&&n.unwatch(p),await fsExtra.writeFile(p,l).catch(q.write("Error writing asset to output",{file:a,source:a}))),r.hot&&(f.syncing(h,!0),c==="JavaScript"?s.script(h):c==="CSS"&&s.stylesheet(h)),i.sync!==0)return t("put",e,l)}}async function qs(e,t,s){let r=cf(e,t),n=await fsExtra.readFile(e.input).catch(q.write("Error reading asset file",{file:e.relative,source:e.relative}));if(n){let i=n.toString();if(J(i))return u.mode.watch&&f.skipped(e,"empty file"),null;if(!Se(s))return r(i);let o=s.apply({...e},i);return X(o)||o===!1?r(i):me(o)?r(o):_e(o)?r(o.toString()):r(i)}return null}var Df=/{%-?\s*#[\s\S]+?%}/g,hf=/{%-?\s*comment\s*-?%}[\s\S]+?{%-?\s*endcomment\s*-?%}/g,gf=/{%-?\s*liquid[\s\S]+?%}/g,yf=/[^,:'"a-zA-Z0-9=] +[^'"a-zA-Z0-9=}{]/g;function Gs(e){return u.terser.liquid.removeComments?e.replace(hf,A).replace(Df,A):e}function xf(e){return e.replace(gf,t=>`
|
109
|
+
`+t.replace(/#.*?$/gm,A)+`
|
110
|
+
`)}function wf(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),c=t.slice(0,r)+a+t.slice(i);return Gs(c)}f.invalid(e.relative);}return Gs(t)}function Ff(e){return u.terser.liquid.stripDashes,e}async function Cf(e,t){try{return await htmlMinifierTerser.minify(t,u.terser.markup)}catch(s){return f.invalid(e.relative),console.error(s),null}}var Ef=e=>async t=>{if(e.type===2&&u.mode.hot&&ar(t)===!1&&(t=Fa(t)),!u.mode.terse)return await fsExtra.writeFile(e.output,t),f.transform(`${e.namespace} \u2192 ${rt(e.size)}`),t;let s;if(e.base.endsWith(".js.liquid"))s=t.replace(yf,A).replace(/(?<=[:,]) +(?=['"{[])/g,A).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?wf(e,t):Gs(t),o=await Cf(e,i);s=xf(o);}if(f.process("HTML Terser",dt()),j(s))return await fsExtra.writeFile(e.output,t),t;let r=Ff(s).replace(/^\s+/gm,A);await fsExtra.writeFile(e.output,r);let n=Oe(t,e.size);return n.isSmaller?f.transform(`${e.namespace} ${n.before} \u2192 gzip ${n.gzip}`):f.minified("Liquid",n.before,n.after,n.saved),r};async function bf(e){let s=(await fsExtra.readFile(e)).toString(),r=s.search(/{%-?\s*schema/);if(r<0)return;let n=s.indexOf("%}",r+2)+2,i=s.slice(n),o=n+i.search(/{%-?\s*endschema/);return o<0&&f.throws(e),JSON.parse(s.slice(n,o))}async function Sf(e,t){let s=t.search(/{%-?\s*schema/);if(s<0)return t;let r=t.indexOf("%}",s+2)+2,n=t.slice(r),i=r+n.search(/{%-?\s*endschema/);i<0&&f.throws(e.relative);let o=JSON.parse(t.slice(r,i));if(!d("use",o))return t;if(!S(o.use))throw new Error("Invalid type passed on schema");let a={},c=await cl__default.default(pathe.join(u.dirs.output,"sections")+"/**");for(let l of o.use)for(let m of c)if(pathe.basename(m,".liquid").endsWith(l)){let C=await bf(m);a[l]=C;}let h=[];for(let l=0;l<o.settings.length;l++)if(d("ref",o.settings[l])){let[m,D]=o.settings[l].ref.split(".").filter(Boolean),C=a[m].settings.find(E=>E.id===D);C&&(o.settings[l]=C,h.push(C));}for(let l=0;l<o.blocks.length;l++)for(let m=0;m<o.blocks[l].settings.length;m++){let D=o.blocks[l].settings[m];if(d("ref",D)){let[C,E,_]=D.ref.split(".").filter(Boolean),H=a[C].blocks.find(K=>K.type===E);if(H){let K=H.settings.find(ee=>ee.id===_);K&&(o.blocks[l].settings[m]=K,h.push(K));}}}return delete o.use,t.slice(0,r)+`
|
111
|
+
`+JSON.stringify(o,null,2)+`
|
112
|
+
`+t.slice(i)}async function qt(e,t){u.mode.watch&&W();let r=(await fsExtra.readFile(e.input)).toString();u.mode.build&&e.namespace==="layout"&&ar(r)&&(r=qr(r)),e.type===4&&(r=await Sf(e,r)),e.size=ve(r);let n=Ef(e);if(!me("Function",t))return n(r);let i=t.apply({...e},r);return me("Undefined",i)||i===!1?n(r):me("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 Bf(e,t=0){try{return JSON.stringify(e,null,t)}catch(s){return console.log(s),null}}async function lr(e,t,s=0){let r=Bf(t,s);if(j(r))return u.mode.watch&&Y(),t;if(s===0){let n=Oe(r,e.size);f.minified("JSON",n.before,n.after,n.saved);}else f.transform(`${e.namespace} \u2192 ${rt(e.size)}`);return e.type===14||fsExtra.writeFile(e.output,r).catch(q.write("Error writing JSON",{file:e.relative})),r}async function $t(e,t){u.mode.watch&&W();let s=await fsExtra.readFile(e.input).catch(q.write("Error reading JSON file",{file:e.relative}));if(_e(s)){let r=s.toString();if(e.size=ve(r),r.trim().length===0)return f.skipped(e,"empty file"),null;let n=Bi(r);if(J(n))return f.skipped(e,"empty file"),null;let i=u.processor.json.indent,{mode:o,terser:a}=u;if(o.terse&&(e.type===13?a.json.assets&&(i=0):e.type===7?a.json.locales&&(i=0):e.type===1?a.json.templates&&(i=0):e.type===14?a.json.metafields&&(i=0):e.type===5?a.json.metaobject&&(i=0):e.type===4?a.json.groups&&(i=0):e.type===6&&a.json.config&&(i=0)),!Se(t))return lr(e,n,i);let c=t.apply({...e},n);return X(c)?lr(e,n,i):S(c)||I(c)?lr(e,c,i):L(c)?lr(e,Bi(c),i):_e(c)?lr(e,Bi(c.toString()),i):lr(e,n,i)}}var Gr=null;function Aa(){return Gr=vn("esbuild"),j(Gr)?(Gr=null,!1):!0}async function Ta(e){u.processor.esbuild.loaded&&e.watch.clear();let t=await Gr.build(e.esbuild);u.mode.terse&&u.mode.build&&(e.size=ve(t.outputFiles[0].text)),u.mode.watch?Ra(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 Ra(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=pathe.join(r,o);e.watch.has(a)||e.watch.add(a),n.has(a)||n.add(a),i.watch&&s.push(a);}i.watch&&u.processor.esbuild.loaded&&await Bn().then(()=>{for(let o of e.watch)o.indexOf("/node_modules/")>-1||e.watchCustom!==null&&e.watchCustom(o)||d(o.slice(r.length+1),t)||(e.watch.delete(o),n.unwatch(o));});}function Af(e){return "<script>"+e+"</script>"}function Tf(e){return me("Function",e)?function(t,s){let r=e.apply({...t},s);return r===!1?(f.external("cancelled"),null):me("String",r)?(f.external("augment"),r):_e(r)?(f.external("augment"),r.toString()):s}:!1}async function Ws(e,t,s){if(!e.data)return;u.mode.watch&&W();let r=Tf(s),{errors:n,wss:i,mode:o,cwd:a}=u,c=e.data.length,h=[];for(let p of e.data){let{key:l,input:m,output:D,snippet:C,esbuild:{format:E}}=p;try{let{metafile:_,outputFiles:H,warnings:K}=await Gr.build(p.esbuild);c>1&&(f.nwl(),f.importer(pathe.relative(a,m))),o.watch&&await Ra(p,_.inputs),K.length>0&&void 0;for(let{text:ee,path:Ne}of H)if(Ne.endsWith(".map")){let ie=pathe.join(u.cache.sourcemaps.script,e.base+".map");fsExtra.writeFile(ie,ee).catch(q.write("Error writing JavaScript Source Map to cache",{file:pathe.relative(a,ie),source:e.relative}));}else {if(o.terse){let{before:en,after:Rl,saved:_l}=Oe(ee,p.size);f.transform(`${F(E.toUpperCase())} bundle`),f.minified(null,en,Rl,_l);}else f.transform(`${F(E.toUpperCase())} bundle \u2192 ${F(nt(ee))}`);let ie;if(C){if(ie=Af(ee),r&&(ie=r(e,ie),ie===null))continue;await fsExtra.writeFile(D,ie).catch(q.write("Error writing inline <script> snippet",{file:e.relative})),f.transform(`exported as ${F("snippet")}`);}else {if(ie=ee,r&&(ie=r(e,ie),ie===null))continue;await fsExtra.writeFile(D,ie).catch(q.write("Error writing JavaScript asset",{file:e.relative}));}o.hot?(f.syncing(l,!0),i.script(l),h.push(t("put",p,ie))):o.build||(f.syncing(l),h.push(t("put",p,ie)));}}catch(_){d("errors",_)&&(f.invalid(e.relative),n.add(m),_.errors.forEach(q.esbuild));}}c>1&&f.nwl(),await Promise.all(h);}var zs=null,Ti=null;async function Ri(e){if(e==="postcss")return zs=(await import('postcss')).default,j(zs)===!1;if(e==="sass")return Ti=rn("sass"),j(Ti)===!1}function kf(e,t){let s=Se(t)?{...e}:!1;return async function(r){if(j(r))return null;let n;if(s!==!1){let o=t.apply({...e},Buffer.from(r));X(o)||o===!1?n=r:(L(o)||_e(o))&&(n=o);}else n=r;fsExtra.writeFile(e.output,n).catch(q.write("Error writing stylesheet to output",{input:e.relative,output:pathe.relative(u.cwd,e.output)}));let i=Oe(r,e.size);return i.isSmaller?f.transform(`${F("CSS")} ${i.before} \u2192 gzip ${i.gzip}`):f.minified("CSS",i.before,i.after,i.saved),u.mode.hot&&u.wss.stylesheet(e.key),n}}async function Pf(e){let{data:t}=e,s=t.sass===!0?u.processor.sass.config:t.sass;if(e.ext===".scss"||e.ext===".sass"){u.mode.watch&&W();try{let{css:r,sourceMap:n}=Ti.compile(t.input,{loadPaths:s.include,sourceMapIncludeSources:!1,sourceMap:s.sourcemap,style:s.style,logger:{debug:i=>console.log("DEBUG",i),warn:nr.sass(e)}});if(s.sourcemap){let i=pathe.join(u.cache.sourcemaps.style,e.base+".map");fsExtra.writeFile(i,JSON.stringify(n)).catch(q.write("Error writing SASS Source Map file to the cache directory",{file:pathe.relative(u.cwd,i),source:e.relative}));}return f.process("SASS Dart",Y()),e.size=ve(r),{css:r,map:n}}catch(r){return f.invalid(e.relative),q.sass(e,r),null}}try{let r=await fsExtra.readFile(e.input);return e.size=ve(r),{css:r.toString(),map:null}}catch(r){return f.invalid(e.relative),f.throws(r),null}}async function Of(e,t,s){let{data:r}=e;try{u.mode.watch&&W();let n=await zs(u.processor.postcss.config).process(t,{from:r.rename,to:r.rename,map:s?{prev:s,inline:!1}:null});u.mode.watch&&f.process("PostCSS",Y());let i=n.warnings();if(i.length>0)for(let o of i)nr.postcss(e,o);return n.toString()}catch(n){return f.invalid(e.relative),console.log(n),null}}function _a(e){return `<style>${w+He(2)+e}</style>`}async function Us(e,t){u.mode.watch&&W();let s=kf(e,t);try{let r=await Pf(e);if(r===null)return null;if(j(zs)||!e.data.postcss&&!e.data.snippet)return s(r.css);if(e.data.postcss){let n=await Of(e,r.css,r.map);if(n===null)return null;if(e.data.snippet)return s(_a(n))}return e.data.snippet?s(_a(r.css)):s(r.css)}catch(r){return console.log(r),null}}var _i=null,ki=null;async function Pi(e){if(e==="svg-sprite")return ki=(await import('svg-sprite')).default,j(ki)===!1;if(e==="svgo")return _i=(await import('svgo')).default,j(_i)===!1}async function Nf(e){let t=await fsExtra.readFile(e);return [e,t.toString(),ve(t)]}function If(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 Lf(e,t,s){async function r(n){let i=U({},e);u.mode.watch&&W(),i.kind="SVG Sprite",n.snippet?(i.namespace="snippets",i.key=pathe.join("snippets",Mr(i,n.rename)),i.output=pathe.join(u.dirs.output,i.key)):(i.key=pathe.join("assets",Mr(i,n.rename)),i.output=pathe.join(u.dirs.output,i.key));let o=n.sprite===!0?u.processor.sprite.config:n.sprite,a=new ki(o),c=await et(Nf,at(n.input)).catch(q.write("Error reading an SVG file",{file:i.base,source:i.relative}));if(c){let h=c.filter(([D,C])=>Na(C)?(f.skipped(pathe.relative(u.cwd,D),"Liquid Detected"),!1):!0);i.size=0;for(let[D,C,E]of h)a.add(D,null,C),i.size=i.size+E;let p=await If(a),l=h.length;f.process("SVG Sprite",`${l} ${st("SVG",l)}`,Y()),await fsExtra.writeFile(i.output,p).catch(q.write("Error writing SVG Sprite",{file:i.key,caller:e.relative}));let m=Oe(p,i.size);m.isSmaller?f.transform(`${i.kind} ${m.before} \u2192 gzip ${m.gzip}`):f.minified(i.kind,m.before,m.after,m.saved),t&&(f.syncing(i.key),await t("put",i,p));}}return r}function Na(e){return /^(?:{{[\s\S]+?}}|{%[\s\S]+?%})|[^"'](?:{{[\s\S]+?}}|{%[\s\S]+?%})[^'"]/m.test(e)}function Mf(e){if(/<path[^>]*[a-zA-Z"'\s](>)(?!\s*<\/path>)/g.test(e)){let s=`${y.gray(`<${y.white("path")}>`)}`,r=`${y.neonGreen(`<${y.white("path")} />`)}`;return f.transform(`${s} ${y.ARR} ${r} ${y.TLD} ${y.gray("patched solidus")}`),e.replace(/(<path[^>]*[a-zA-Z"'\s])(>)(?!\s*<\/path>)/g,"$1 /$2")}return e}function qf(e,t,s){let r=U({},e);async function n(i){u.mode.watch&&W(),i.snippet?(r.namespace="snippets",r.key=pathe.join("snippets",Mr(r,i.rename)),r.output=pathe.join(u.dirs.output,r.key)):(r.key=pathe.join("assets",Mr(r,i.rename)),r.output=pathe.join(u.dirs.output,r.key));let o=i.svgo===!0?u.processor.svgo:i.svgo,c=(await fsExtra.readFile(r.input)).toString();if(Na(c))return f.skipped(r,"Liquid Detected"),null;let h=Mf(c);r.size=ve(h);let p;try{p=_i.optimize(h,o);}catch(D){return f.err(D.toString()),null}f.process("SVGO",Y());let{data:l}=p,m=Oe(l,r.size);m.isSmaller?f.transform(`${r.kind} ${m.before} \u2192 gzip ${m.gzip}`):f.minified(r.kind,m.before,m.after,m.saved),await fsExtra.writeFile(r.output,l).catch(q.write("Error writing SVG",{file:r.key,caller:e.relative})),t&&(f.syncing(r.key),await t("put",r,l));}return n}async function Vs(e,t,s){u.mode.watch&&W();let r=Lf(e,t),n=qf(e,t),i=e.data.length;for(let o=0;o<i;o++){let a=e.data[o];o>0&&u.mode.watch&&f.changed(e),a.format==="sprite"&&await r(a),a.format==="file"&&await n(a);}}async function cr(e,t){return d(e,u.cache.pages)?t.id in u.cache.pages[e]?(u.cache.pages[e][t.id]=t,await Gt(),2):(u.cache.pages[e][t.id]=t,await Gt(),1):(u.cache.pages[e]={[t.id]:t},await Gt(),1)}async function Gt(){u.cache.updated=Date.now();try{await fsExtra.writeJson(u.cache.uri,u.cache,{spaces:0});}catch(e){throw console.error(e)}}async function Ia(e){u.cache.lastResource="build",W();let{paths:t,dirs:s,watch:r,filters:n,mode:i}=u,o=J(n)===!1,a=js(t,s.output),c=pl__default.default(at(r.values())),h=await cl__default.default("**",{absolute:!0,cwd:s.input}),p={},l=h.filter(c).reduce((D,C)=>{let E=a(C);if(X(E))return D;switch(E.type){case 8:D.styles.files.push(E);break;case 9:D.scripts.files.push(E);break;case 4:D.sections.files.push(E);break;case 2:D.layouts.files.push(E);break;case 3:D.snippets.files.push(E);break;case 7:D.locales.files.push(E);break;case 6:D.configs.files.push(E);break;case 1:D.templates.files.push(E);break;case 15:D.pages.files.push(E);break;case 13:D.assets.files.push(E);break;case 14:D.metafields.files.push(E);break;case 10:{for(let{uuid:_,format:H,input:K}of E.data)if(!d(_,p))if(p[_]=!0,H==="sprite")D.svgs.files.push(E);else for(let ee of K)D.svgs.files.push(a(ee));break}}return D},{styles:{time:A,files:[],report:null},scripts:{time:A,files:[],report:null},svgs:{time:A,files:[],report:null},sections:{time:A,files:[],report:null},layouts:{time:A,files:[],report:null},metaobject:{time:A,files:[],report:null},templates:{time:A,files:[],report:null},snippets:{time:A,files:[],report:null},locales:{time:A,files:[],report:null},configs:{time:A,files:[],report:null},pages:{time:A,files:[],report:null},metafields:{time:A,files:[],report:null},assets:{time:A,files:[],report:null}}),m=(D,C,E)=>async _=>{W();try{f.build(D,C,_);let H=await(_.ext===".json"?$t(_,e):E(_,e));return u.cache.maps[_.output]=_.input,f.out(R.tree("bottom",y.neonGreen(_.key))),H===null||isNaN(_.size)?{name:_.base,input:_.relative,time:Y(),output:_.key,error:"Skipped File"}:{name:_.base,input:_.relative,output:_.key,error:null,time:"",size:Oe(H,_.size)}}catch(H){return f.out(R.tree("bottom",y.redBright(_.key))),{name:_.base,input:_.relative,output:_.key,time:Y(),error:H.message}}};for(let D in l){W();let C=l[D].files,E=C.length;if(D==="styles"&&i.style){if(o&&!(d(D,n)&&n[D].includes(D)))continue;l[D].report=await et(m(D,E,Us),C),l[D].time=Y();}else if(D==="scripts"&&i.script){if(o&&!(d(D,n)&&n[D].includes(D)))continue;l[D].report=await et(m(D,E,Ws),C),l[D].time=Y();}else if(D==="layouts"||D==="snippets"||D==="sections"||D==="templates"){if(i.views){if(o&&!(d(D,n)&&n[D].includes(D)))continue;l[D].report=await et(m(D,E,qt),C),l[D].time=Y();}}else if(D==="locales"||D==="configs"||D==="metafields"){if(i.views){if(o&&!(d(D,n)&&n[D].includes(D)))continue;l[D].report=await et(m(D,E,$t),C),l[D].time=Y();}}else if(!(D==="pages"&&i.views)){if(D==="assets"&&i.views){if(o&&!(d(D,n)&&n[D].includes(D)))continue;l[D].report=await et(m(D,E,qs),C),l[D].time=Y();}else if(D==="svgs"&&i.svg){if(o&&!(d(D,n)&&n[D].includes(D)))continue;l[D].report=await et(m(D,E,Vs),C),l[D].time=Y();}}}u.cache.lastBuild=Date.now(),await Gt(),f.nwl(),f.update(`${x.gray}Build Completed ${g(`~ ${Y()}`)}`),f.nwl(),process.exit(0);}function Uf(e){e.addRule("taskListItems",{filter:function(t){return t.type==="checkbox"&&t.parentNode.nodeName==="LI"},replacement:function(t,s){return (s.checked?"[x]":"[ ]")+" "}});}function Vf(e){let t=/highlight-(?:text|source)-([a-z0-9]+)/;e.addRule("highlightedCodeBlock",{filter:function(s){let r=s.firstChild;return s.nodeName==="DIV"&&t.test(s.className)&&r&&r.nodeName==="PRE"},replacement:function(s,r,n){let o=((r.className||"").match(t)||[null,""])[1];return `
|
113
|
+
|
114
|
+
`+n.fence+o+`
|
115
|
+
`+r.firstChild.textContent+`
|
116
|
+
`+n.fence+`
|
117
|
+
|
118
|
+
`}});}function Hf(e){e.addRule("strikethrough",{filter:["del","s","strike"],replacement:function(t){return "~"+t+"~"}});}function Jf(e){let{indexOf:t,every:s}=Array.prototype;function r(l){let m=l.parentNode;return m.nodeName==="THEAD"||m.firstChild===l&&(m.nodeName==="TABLE"||n(m))&&s.call(l.childNodes,function(D){return D.nodeName==="TH"})}function n(l){let m=l.previousSibling;return l.nodeName==="TBODY"&&(!m||m.nodeName==="THEAD"&&/^\s*$/i.test(m.textContent))}function i(l,m=null,D=null){D===null&&(D=t.call(m.parentNode.childNodes,m));let C=" ";D===0&&(C="| ");let E=l.trim().replace(/\n\r/g,"<br>").replace(/\n/g,"<br>");for(E=E.replace(/\|+/g,"\\|");E.length<3;)E+=" ";return m&&(E=h(E,m," ")),C+E+" |"}function o(l){if(!l.childNodes)return !1;for(let m=0;m<l.childNodes.length;m++){let D=l.childNodes[m];if(D.nodeName==="TABLE"||o(D))return !0}return !1}function a(l){return !!(!l||!l.rows||l.rows.length===1&&l.rows[0].childNodes.length<=1||o(l))}function c(l){let m=l.parentNode;for(;m.nodeName!=="TABLE";)if(m=m.parentNode,!m)return null;return m}function h(l,m,D){let C=Number(m.getAttribute("colspan"))||1;for(let E=1;E<C;E++)l+=" | "+D.repeat(3);return l}function p(l){let m=0;for(let D=0;D<l.rows.length;D++){let E=l.rows[D].childNodes.length;E>m&&(m=E);}return m}e.keep(function(l){return l.nodeName==="TABLE"}),e.addRule("tableCell",{filter:["th","td"],replacement:function(l,m){return a(c(m))?l:i(l,m)}}),e.addRule("tableRow",{filter:"tr",replacement:function(l,m){let D=c(m);if(a(D))return l;let C="",E={left:":--",right:"--:",center:":-:"};if(r(m)){let _=p(D);for(let H=0;H<_;H++){let K=_>=m.childNodes.length?null:m.childNodes[H],ee="---",Ne=K?(K.getAttribute("align")||"").toLowerCase():"";Ne&&(ee=E[Ne]||ee),K?C+=i(ee,m.childNodes[H]):C+=i(ee,null,H);}}return `
|
119
|
+
`+l+(C?`
|
120
|
+
`+C:"")}}),e.addRule("tableSection",{filter:["thead","tbody","tfoot"],replacement:function(l){return l}}),e.addRule("table",{filter:function(l){return l.nodeName==="TABLE"},replacement:function(l,m){if(a(m))return l;l=l.replace(/\n+/g,`
|
121
|
+
`);let D=l.trim().split(`
|
122
|
+
`);D.length>=2&&(D=D[1]);let C=D.indexOf("| ---")===0,E=p(m),_="";return E&&!C&&(_="|"+" |".repeat(E)+`
|
123
|
+
|`+" --- |".repeat(E)),`
|
124
|
+
|
125
|
+
`+_+l+`
|
126
|
+
|
127
|
+
`}});}function La(e){e.use([Vf,Hf,Jf,Uf]);}function Yf(e){return e==="boolean"||e==="color"||e==="date"||e==="date_time"||e==="dimension"||e==="json"||e==="money"||e==="multi_line_text_field"||e==="number_decimal"||e==="number_integer"||e==="rating"||e==="rich_text_field"||e==="single_line_text_field"||e==="url"||e==="volume"||e==="weight"}function Ma(e,t){for(let s of t)for(let r of ["key","type","value","namespace","description"]){if(r!=="description"&&!d(r,s))return f.invalid(e.relative,[`Missing ${y.blue.bold(r)} property key value in a ${y.yellowBright.bold("metafields")}`,"value of page frontmatter. Frontmatter metafields require you provide the following keys:","",`${y.gray("-")} ${y.white("key")}`,`${y.gray("-")} ${y.white("type")}`,`${y.gray("-")} ${y.white("value")}`,`${y.gray("-")} ${y.white("namespace")}`,"",`${y.gray("Update the metafield entry to include")} ${y.white(r)}`]),!1;if(r==="type"){let n=s[r];if(!Yf(n))return f.invalid(e.relative,[`Invalid type ${y.blue.bold(n)} provided in a page frontmatter ${y.yellowBright.bold("metafields")}`,`value. Frontmatter metafields ${y.bold("must")} be one of following types:`,"",`${y.gray("-")} ${y.white("boolean")}`,`${y.gray("-")} ${y.white("color")}`,`${y.gray("-")} ${y.white("date")}`,`${y.gray("-")} ${y.white("date_time")}`,`${y.gray("-")} ${y.white("dimension")}`,`${y.gray("-")} ${y.white("json")}`,`${y.gray("-")} ${y.white("money")}`,`${y.gray("-")} ${y.white("multi_line_text_field")}`,`${y.gray("-")} ${y.white("number_decimal")}`,`${y.gray("-")} ${y.white("number_integer")}`,`${y.gray("-")} ${y.white("rating")}`,`${y.gray("-")} ${y.white("rich_text_field")}`,`${y.gray("-")} ${y.white("single_line_text_field")}`,`${y.gray("-")} ${y.white("url")}`,`${y.gray("-")} ${y.white("volume")}`,`${y.gray("-")} ${y.white("weigh")}`,"",`${y.gray("Update the metafield entry to an accepted")} ${y.white("type")}`]),!1}}return !0}async function Oi(e){return $e.get("pages.json",e.client).then(({data:t})=>t.pages).catch(t=>{ft(t.response.status)?G.add(()=>Oi(e)):console.error(t);})}async function qa(e,t){if(Me(d("handle",t),d("title",t))){console.log("invalid fields");return}return $e.get("pages.json",e.client).then(({data:s})=>d("handle",t)&&d("title",t)?s.pages.find(r=>t.title===r.title&&t.handle===r.handle):d("handle",t)?s.pages.find(r=>t.handle===r.handle):d("title",t)?s.pages.find(r=>t.title===r.title):void 0).catch(s=>{console.log(s);})}async function Js(e,t){u.mode.upload||W();let s=await $e.post("/pages.json",{page:t},e.client).then(({data:r})=>(f.resource("page",e),r.page)).catch(r=>{ft(r.response.status)?G.add(()=>Js(e,t)):Ve("response.data",r.response)&&q.request(t.title,r.response);});if(s)return await cr(e.domain,s),s}async function ji(e,t,s){let{mode:r}=u;r.upload||W();let n=`pages/${s.id}.json`,i=await $e.put(n,{page:s},e.client).then(({data:o})=>(r.watch?f.resource("page",e):r.upload&&Ie.emit("upload","uploaded",s,{key:t.key,namespace:t.namespace,fileSize:nt(s.body_html)}),o.page)).catch(o=>{ft(o.response.status)?G.add(()=>ji(e,t,s)):console.log(o);});if(i)return i}function nm(e){let t=new tm__default.default(u.page.import);return t.use(La),t.turndown(e)}async function im(e){let t=f.prompt("No matching pages, select an option",{title:"No matching pages",message:"Open CLI and select an option"}),s=await Ys__default.default({type:"select",name:"action",message:"Page Resources",hint:" ",instructions:!1,choices:[{title:"Create Page",description:`Create a new page on ${e.domain}`,value:1},{title:"Select Page",description:`Select a page to overwrite on ${e.domain}`,value:2},{title:"Cancel",description:"Cancel, and skip this sync operation",value:4}]});return {resume:t,action:s.action}}async function om(e){let t=await Oi(e);if(!t)return;let s=t.map(n=>({title:n.title,description:`https://admin.shopify.com/store/${e.store.toLowerCase()}/pages/${n.id}`,value:n.id}));return s.push({title:Hn(20),disabled:!0,selected:!1},{title:"Create New Page",description:`Create a new page on ${e.domain}`,value:1},{title:"Cancel",description:"Cancel, and skip this sync operation",value:4}),(await Ys__default.default({type:"select",name:"action",message:"Choose Page",hint:" ",instructions:!1,choices:s})).action}async function um(e){let t=[{title:"View Source",description:"Prints the page source in the CLI",value:5},{title:"Update Local",description:"Update the local source with remote version",value:3},{title:"Overwrite Remote",description:"Overwrite the remote version with local source",value:6},{title:"Cancel",description:"Cancel, and skip this sync operation",value:4}],s=f.prompt("Remote version is newer than local version",{title:"Remote \u2192 Local",message:"Remote version has changed"}),r=await Ys__default.default({type:"select",name:"action",message:"Page Resources",hint:" ",instructions:!1,choices:t});if(r.action===5){Ae(""),f.out(sm__default.default(e.body_html)),Ae("");let n=await Ys__default.default({type:"select",name:"action",message:"Page Resources",hint:" ",instructions:!1,choices:t.slice(1)});return {resume:s,action:n.action}}else return {resume:s,action:r.action}}function am(e,t){let s={};if(d("title",t)?s.title=`${t.title}`:s.title=Rt(e.name.replace(/[._-]/g," ")),d("handle",t)){let r,n=t.handle;/^[./]{1,2}/.test(n)&&(r=n,n=n.replace(/^[./]{1,2}/,A),f.warn(`handle ${y.CHV} ${r} ${y.ARR} ${n}`,"fixed start")),/^pages\//.test(n)&&(r=n,n=n.replace(/^pages\//,A),f.warn(`handle ${y.CHV} ${r} ${y.ARR} ${n}`,"fixed sub-path")),/[_/]/.test(t.handle)&&(r=n,n=n.replace(/[_/]/g,"-"),f.warn(`handle ${y.CHV} ${r} ${y.ARR} ${n}`,"fixed invalid characters")),s.handle=n;}else d("title",t)?s.handle=Oo(t.title):s.handle=e.name.toLowerCase();if(d("author",t)&&u.page.author!==""){let r,n=t.author;/\//.test(t.author)&&(r=t.author,n=r.replace(/\//g," "),f.warn(`author ${y.CHV} ${r} ${y.ARR} ${n}`,"fixed invalid characters")),s.author=n;}else t.author=u.page.author;return d("published",t)?oe(t.published)?s.published=t.published:(f.warn(`published ${y.CHV} expected boolean, got ${typeof t.published}`,"defaulted to false"),s.published=!1):s.published=!0,d("template_suffix",t)&&(d("template",t)?(f.warn("duplicate template_suffix references","using template"),delete t.template_suffix):(t.template=t.template_suffix,delete t.template_suffix)),d("template",t)?s.template_suffix=t.template:u.page.suffixDir&&Bt(u.page.global)&&u.page.global.test(e.input)!==!1&&(s.template_suffix=Fe(e.input)),d("metafield",t)&&(f.warn("use metafields instead of metafield","sync will still process"),t.metafields=t.metafield,delete t.metafield),d("metafields",t)?I(t.metafields)&&(s.metafields=[t.metafields]):s.metafields=void 0,s}async function Ga(e,t){if(u.sync.stores.length>1)return f.skipped(e,"pages do not support multistore sync"),null;let s=await fsExtra.readFile(e.input);if(J(s.toString()))return u.mode.watch&&f.skipped(e,"empty file"),null;let r=Zf__default.default(s),{data:n,content:i}={...r},o=am(e,n);if(S(o.metafields)&&!Ma(e,o.metafields))return null;e.kind==="Markdown"?(W(),o.body_html=rm__default.default(u.page.export).render(i),f.transform(`${y.bold("Markdown")} ${y.ARR} ${y.bold("HTML")} ${y.TLD} ${Y()}`)):(f.process("HTML"),o.body_html=i);let a=u.sync.stores[0],c=await qa(a,{handle:o.handle});if(S(c))return f.invalid(e.relative,[`Multiple pages returned when matching on handle ${y.blue.bold(o.handle)}`,"Syncify is unsure of to handle this request and has cancelled the sync. Please","check the provided handle in your webshop."]),null;let h;if(I(c)&&(o.id=c.id,c.id in u.cache.pages?.[a.domain]?h=u.cache.pages[a.domain][c.id]:(await cr(a.domain,c),h=c)),X(c)&&u.page.safeSync){let l=await im(a);if(l.action===2){let m=await om(a);if(m===4)return l.resume();if(m===1)return l.resume(),f.syncing(`/pages/${o.handle} ${y.ARR} ${o.title} ${y.gray(`${y.TLD} ${e.relative}`)}`),Js(a,o);o.id=m,l.resume();}else return l.action===1?(l.resume(),f.syncing(`/pages/${o.handle} ${y.ARR} ${o.title} ${y.gray(`${y.TLD} ${e.relative}`)}`),Js(a,o)):l.resume()}if(u.page.safeSync&&I(c)){let l=new Date(c.updated_at).getTime(),m=new Date(h.updated_at).getTime();if(l>m&&c.body_html!==o.body_html){let D=await um(c);if(D.action===3){D.resume(),f.updated(e,"local source aligned with remote");let C=c.body_html;if(u.page.importLanguage==="markdown"){let E=nm(C);f.transform(`${e.name}.html ${be} ${e.base}`),C=Zf.stringify(`
|
128
|
+
`+E,r.data);}u.watch.unwatch(e.input),await fsExtra.writeFile(e.input,C),await cr(a.domain,c),u.watch.add(e.input);}else {if(D.action===4)return D.resume();D.action===6&&D.resume();}}}if(u.mode.build)return o.body_html;f.syncing(`/pages/${o.handle} ${y.ARR} ${o.title} ${y.gray(`${y.TLD} ${e.relative}`)}`);let p=await ji(a,e,o);p&&await cr(a.domain,p);}function Wa(e){u.cache.lastResource="watch";let{sync:t,watch:s,mode:r,paths:n,wss:i,dirs:o}=u,a=ur(t),c=js(n,o.output);r.hot&&u.wss.connected(),s.on("all",function(p,l){let m=c(l);if(!X(m)){if(m.base===u.file.base)return f.configChanges();if(m.type!==16&&f.changed(m),p==="change"||p==="add")h(m);else if(p==="unlink")return m.type===15?a.pages("delete",m):a.assets("delete",m)}});async function h(p){try{let l=null;if(p.type===9)return Ws(p,a.assets,e);if(p.type===15)return Ga(p,e);if(p.type===10)return Vs(p,a.assets,e);if(p.type===13||p.type===16)return qs(p,a.assets,e);if(p.type===8?l=await Us(p,e):p.type===4&&p.kind==="Liquid"&&(l=await qt(p,e)),p.type===4&&p.kind==="JSON")l=await $t(p,e);else if(p.type===2)l=await qt(p,e);else if(p.type===3)l=await qt(p,e);else if(p.type===7||p.type===6)l=await $t(p,e);else {if(p.type===14)return l=await $t(p,e),a.metafields({value:l,namespace:p.namespace,key:p.key});p.type===1&&p.kind==="JSON"?l=await $t(p,e):p.type===1&&p.kind==="Liquid"&&(l=await qt(p,e));}j(l)||(f.syncing(p.key),await a.assets("put",p,l),r.hot&&(p.type===4?i.section(p.name):p.type!==9&&p.type!==8&&await G.onIdle().then(()=>i.replace())));}catch(l){console.error(l),f.err(l);}}}var za=!1,Ua=!1,Ni=new Set;function Qs(e,t){if(!za){za=!0;for(let s of Ni)s();e&&process.exit(128+t);}}function Ks(e){return Ni.add(e),Ua||(Ua=!0,process.once("exit",Qs),process.once("SIGINT",Qs.bind(void 0,!0,2)),process.once("SIGTERM",Qs.bind(void 0,!0,15)),process.on("message",t=>{t==="shutdown"&&Qs(!0,-128);})),()=>Ni.delete(e)}var Wt={enable:!0,output:[]};async function ym(){if(f.update(R.message("gray","validating snippet injection")),await wa()){f.update(R.message("gray","validating layouts"));for(let t in u.hot.alive){if(!await fsExtra.pathExists(t)){f.update(R.message("gray","layout has not yet been bundled, building now..."));let n=cl__default.default.sync(u.config.paths.layout,{cwd:u.dirs.input,absolute:!0});for(let i of n)if(pathe.basename(i)===pathe.basename(t)){let o=await fsExtra.readFile(i);await fsExtra.writeFile(t,o);}f.update(R.message("gray","layout was bundled from source, injecting hot snippet"));}await Ea(t)||(f.update.clear(),f.err("Failed to inject hot reload render tag"));}f.update.clear();}else f.update.clear(),f.err("Failed to upload snippet");}async function Va(){if(!Wt.enable)return Wt.output.push(x.red,x.red+se("Change the socket port address or kill the session occupying it."),x.red+se("This error typically occurs when multiple Syncify instances are active.")),f.err(se(`${F("ERROR")} on ${F(`${u.hot.method==="hot"?"HOT":"LIVE"} Reload:`)}`)),f.out(Wt.output.join(w)),null;f.out(R.message("whiteBright",F(`${u.hot.method==="hot"?"HOT":"LIVE"} Reloading:`))),f.nwl(),f.update(R.message("gray","configuring HOT Reload")),await ym();function e(a){a.setHeader("Access-Control-Allow-Origin","*"),a.setHeader("Cache-Control","public, max-age=0");}let t=pm__default.default(pathe.join(u.dirs.output,"assets"),{setHeaders:e}),s=mm__default.default.createServer((a,c)=>t(a,c,fm__default.default(a,c))),r=`http://localhost:${u.hot.server}`,n=a=>{if(a.code==="EADDRINUSE")return Wt.output.push(x.red+se(`${F("EADDRINUSE")} ${be} ${r}`),x.red,x.red+se.bold(`Server Port ${u.hot.server} address already in use`),x.red,x.red+se("Change the server port address or kill the session occupying it."),x.red+se("This error typically occurs when multiple Syncify instances are active.")),f.update.clear(),f.out(Wt.output.join(w)),u.wss.http.close(),null},i=()=>{f.update.done(),u.wss.connected(),s.removeListener("error",n),s.removeListener("connect",i);};s.on("error",n),s.on("connect",i),s.listen(u.hot.server);let o=Xe("PORT")+N+g(`${u.hot.server}`);f.update(R.message("pink",`server ${be} ${F("localhost")} ${be} ${o}`));}function Ha(){if(u.mode.hot===!1)return;let e=new ws$1.Server({port:u.hot.socket,path:"/ws",skipUTF8Validation:!0});Ks(()=>{e.emit("disconnect"),e.close();});let t=n=>{n.code==="EADDRINUSE"&&(e.close(),Wt.enable=!1,Wt.output.push(x.red+se(`${F("EADDRINUSE")} ${be} ws://localhost:${u.hot.server}`),x.red,x.red+se.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.prependListener("script",i=>n.send(`script,${i}`)),e.prependListener("stylesheet",i=>n.send(`stylesheet,${i}`)),e.prependListener("section",i=>n.send(`section,${i}`)),e.prependListener("svg",i=>n.send(`svg,${i}`)),e.prependListener("assets",()=>n.send("assets")),e.prependListener("reload",()=>n.send("reload")),e.prependListener("replace",()=>n.send("replace")),e.prependListener("connected",()=>n.send("connected")),e.prependListener("disconnect",()=>n.send("disconnect"));};return e.on("close",s),e.on("error",t),e.on("connection",r),{get http(){return e},script:n=>e.emit("script",pathe.basename(n)),stylesheet:n=>e.emit("stylesheet",pathe.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"),connected:()=>e.emit("connected"),disconnect:()=>e.emit("disconnected")}}function Ja(e){let t=e.toString().trim().toLowerCase();if(t==="v"){let s=Re(Yt);for(let r=0,n=s.length;r<n;r++){let i=s[r];if(Yt[i].size!==0){r>0&&f.hline(10),f.write(y.bold.whiteBright(i));for(let o of Yt[i].values())typeof o=="string"&&o.length>0&&te(o);Yt[i].clear();}}u.mode.upload&&(B(R.closer("Upload"),w),process.exit(0));}else if(t==="w"){for(let s in De.process)if(De.process[s].size!==0){f.nwl(),f.write(y.bold.yellow(s)),f.nwl();for(let r of De.process[s].values())typeof r=="string"&&r.length>0&&f.write(R.multiline("warning",r));De.process[s].clear();}De.count=0;}}`
|
129
|
+
${g("-----------------------------------------------------------------------------")}
|
130
|
+
${F("Syncify CLI Examples")} ${g("by Panoply")}
|
131
|
+
${g("-----------------------------------------------------------------------------")}
|
132
|
+
|
133
|
+
${F("Watching"+N)}
|
134
|
+
|
135
|
+
${g("Targeting 1 store and 1 theme")}:
|
136
|
+
$ sync your-store${g("=")}theme-1 --watch
|
137
|
+
|
138
|
+
${g("Targeting 1 store and 2 themes with hot reloading")}:
|
139
|
+
$ sync your-store${g("=")}theme-1,theme-2 --watch --hot
|
140
|
+
|
141
|
+
${g("Targeting 2 stores and 1 theme")}:
|
142
|
+
$ sync --your-store${g("=")}theme-1 --another-store${g("=")}some-theme --watch
|
143
|
+
|
144
|
+
${g("Targeting 2 stores and 2 themes")}:
|
145
|
+
$ sync --your-store${g("=")}theme-1,theme-2 --another-store${g("=")}some-theme,test-theme --watch
|
146
|
+
|
147
|
+
${g("Targeting 1 store with 2 themes and clean mode with hot live reloads")}:
|
148
|
+
$ sync your-store${g("=")}theme-1,theme-2 --watch --clean --hot
|
149
|
+
|
150
|
+
${g("Targeting 1 store with 2 themes in production mode")}:
|
151
|
+
$ sync your-store${g("=")}theme-1,theme-2 --prod --watch
|
152
|
+
|
153
|
+
`;var Ya=`
|
154
|
+
${g("-----------------------------------------------------------------------------")}
|
155
|
+
${F("Syncify")} <!version!> ${g("by Panoply")}
|
156
|
+
${g("-----------------------------------------------------------------------------")}
|
142
157
|
|
143
158
|
Welcome to the Syncify CLI. The command line utility assumes that
|
144
|
-
you have defined stores, themes and setup credentials within a ${
|
159
|
+
you have defined stores, themes and setup credentials within a ${g(".env")} file.
|
145
160
|
|
146
|
-
${F("Aliases"+
|
161
|
+
${F("Aliases"+N)}
|
147
162
|
|
148
163
|
$ sync
|
149
164
|
|
150
|
-
${F("Commands"+
|
165
|
+
${F("Commands"+N)}
|
151
166
|
|
152
|
-
$ syncify ${
|
153
|
-
$ syncify {store} [theme] ${
|
167
|
+
$ syncify ${g.italic("Interactive prompt")}
|
168
|
+
$ syncify {store} [theme] ${g.italic("Prints list of connected stores")}
|
154
169
|
|
155
|
-
${F("Themes"+
|
170
|
+
${F("Themes"+N)}
|
156
171
|
|
157
|
-
--<store> [theme] ${
|
158
|
-
-t, --theme [theme] ${
|
172
|
+
--<store> [theme] ${g.italic("A store reference command (run examples)")}
|
173
|
+
-t, --theme [theme] ${g.italic("A comma seprated list of themes")}
|
159
174
|
|
160
|
-
${F("Paths"+
|
175
|
+
${F("Paths"+N)}
|
161
176
|
|
162
|
-
-c, --config <path> ${
|
163
|
-
-i, --input <path> ${
|
164
|
-
-o, --output <path> ${
|
177
|
+
-c, --config <path> ${g.italic("Set configs path")}
|
178
|
+
-i, --input <path> ${g.italic("Set input path")}
|
179
|
+
-o, --output <path> ${g.italic("Set output path")}
|
165
180
|
|
166
|
-
${F("Utility"+
|
181
|
+
${F("Utility"+N)}
|
167
182
|
|
168
|
-
-f, --filter <path> ${
|
183
|
+
-f, --filter <path> ${g.italic("Glob path, use with pull or push triggers")}
|
169
184
|
|
170
|
-
${F("Environment"+
|
185
|
+
${F("Environment"+N)}
|
171
186
|
|
172
|
-
--dev ${
|
173
|
-
--prod ${
|
174
|
-
--hot ${
|
187
|
+
--dev ${g.italic("Build in development mode (default)")}
|
188
|
+
--prod ${g.italic("Build in production mode")}
|
189
|
+
--hot ${g.italic("Run watch with hot-reloads")}
|
175
190
|
|
176
|
-
${F("Modes"+
|
191
|
+
${F("Modes"+N)}
|
177
192
|
|
178
|
-
-w, --watch ${
|
179
|
-
-b, --build ${
|
180
|
-
-u, --upload ${
|
181
|
-
-d, --download ${
|
182
|
-
-m, --metafields ${
|
183
|
-
-p, --pages ${
|
184
|
-
-r, --redirects ${
|
193
|
+
-w, --watch ${g.italic("Run watch mode")}
|
194
|
+
-b, --build ${g.italic("Run build mode from input")}
|
195
|
+
-u, --upload ${g.italic("Run upload mode theme to stores")}
|
196
|
+
-d, --download ${g.italic("Run download mode from theme and stores")}
|
197
|
+
-m, --metafields ${g.italic("Run metafields resource mode")}
|
198
|
+
-p, --pages ${g.italic("Run pages resource mode")}
|
199
|
+
-r, --redirects ${g.italic("Run redirects resource mode")}
|
185
200
|
|
186
|
-
${F("Resource"+
|
201
|
+
${F("Resource"+N)}
|
187
202
|
|
188
|
-
--pull ${
|
189
|
-
--push ${
|
190
|
-
--silent ${
|
203
|
+
--pull ${g.italic("Pull a resource from a shop or theme")}
|
204
|
+
--push ${g.italic("Push a resource to a shop or theme")}
|
205
|
+
--silent ${g.italic("Silent logs, only warnings or errors are printed")}
|
191
206
|
|
192
|
-
${F("Trigger"+
|
207
|
+
${F("Trigger"+N)}
|
193
208
|
|
194
|
-
--spawn [list] ${
|
195
|
-
--delete [list] ${
|
196
|
-
--minify [list] ${
|
209
|
+
--spawn [list] ${g.italic("Invoke a defined spawn child process/s")}
|
210
|
+
--delete [list] ${g.italic("Delete a remote and local file")}
|
211
|
+
--minify [list] ${g.italic("invoke minify mode, accepts resource/s")}
|
197
212
|
|
198
|
-
${F("Other"+
|
213
|
+
${F("Other"+N)}
|
199
214
|
|
200
|
-
--strap ${
|
201
|
-
--vsc ${
|
202
|
-
--help ${
|
215
|
+
--strap ${g.italic("Import a strap into the project")}
|
216
|
+
--vsc ${g.italic("Generate vscode specific settings")}
|
217
|
+
--help ${g.italic("Show the screen")}
|
203
218
|
|
204
|
-
${F("Help"+
|
219
|
+
${F("Help"+N)}
|
205
220
|
|
206
|
-
-h, --help ${
|
207
|
-
-h, --help {examples} ${
|
221
|
+
-h, --help ${g.italic("Print this screen")}
|
222
|
+
-h, --help {examples} ${g.italic("Print a list of command examples")}
|
208
223
|
|
209
|
-
${
|
224
|
+
${g("-----------------------------------------------------------------------------")}
|
210
225
|
|
211
|
-
`;function
|
212
|
-
You need to provide shop credentials within a ${
|
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(S(e)){let o=[];for(let a of e){let l=i(a),h=Wa__default.default.sync(l,{cwd:s,absolute:!0});if(r){let p=t(l);P(p)?r.push(p):S(p)&&r.push(...p);}h.length===0?n("No files can be resolved in",a):o.push(...h);}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):S(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),gt(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(S(e)){if(e.every(P)){let{paths:s,match:r}=Me(e,n=>(t.addWatch&&u.watch.add(n),gt(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)||he("tranform","input",s,"{ input: string | string[] }");let{paths:r,match:n}=Me(e,i=>(t.addWatch&&u.watch.add(i),gt(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),gt(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:h}=Me(o,p=>(t.addWatch&&u.watch.add(p),gt(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:h}));}else if(G(o)){f("input",o)||he("tranform",r,o,"{ input: string | string[] }");let{paths:l,match:h}=Me(o.input,p=>(t.addWatch&&u.watch.add(p),gt(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:h}));}}else if(S(o))if(o.every(P)){let{paths:l,match:h}=Me(o,p=>(t.addWatch&&u.watch.add(p),gt(p)));if(xo(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:h}));}else k({option:"transform",name:r,provided:o,expects:"string[]"});}return s}}function Li(e){let{pkg:t}=u;return ge(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 ke("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:h}=Ua(o.input,o.rename),p;!h.endsWith(".js")&&!h.endsWith(".mjs")?p=h+".js":h.endsWith(".cjs")?he("rename","file extension",h,".js | .mjs"):p=h,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(s.config.outfile=c.output,u.mode.watch&&u.watch.unwatch(c.output),f("esbuild",o))if(me(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 g in ["entryPoints","outdir","watch","absWorkingDir","watch","write","logLevel","incremental"])g==="entryPoints"&&f(g,o.esbuild)?t('Option is not allowed, use Syncify "input" instead',g):g==="outdir"&&f(g,o.esbuild)?t("Option is not allowed, Syncify will handle output",g):g==="watch"&&f(g,o.esbuild)?t("Option is not allowed, declare watch using Syncify",g):f(g,o.esbuild)&&t("Option is not allowed and will be ignored",g);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 {S(o.watch)||k({option:"script",name:"watch",provided:o.watch,expects:"string[]"});let g=Me(o.watch);c.watchCustom=za__default.default(g),c.watch=new Set(g);}else c.watch=new Set;try{await fa(c);}catch(g){throw new Error(g)}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 vi("sass")||ae("Unable to dynamically import SASS","Ensure you have installed sass")),t.installed=Mr(u.pkg,"postcss"),t.installed){await vi("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))if(t.installed||ke("postcss"),S(o.postcss))a.postcss=o.postcss;else {let p=G(o.postcss);(me(o.postcss)||p)&&!N(o.postcss)?o.postcss!==!1&&(t.installed||ke("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((me(o.sass)||p)&&!N(o.sass))if(s.installed||ke("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"?me(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]:he("sass",c,o.sass[c],"expanded | compressed")):c==="includePaths"&&(S(o.sass[c])?a.sass[c]=zr(o.sass[c]).map(g=>path.join(u.cwd,g)):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=ji(o.rename);f("rename",o)&&!N(o)&&(P(o.rename)||k({option:"styles",name:"rename",provided:o.rename,expects:"string"}),l=ji(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 h=[];if(u.mode.watch&&f("watch",o)){S(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 g of c)fsExtra.existsSync(g)?h.push(g):r("No file exists in path",g);}h.push(a.input),h.forEach(p=>u.watch.add(p)),a.watch=za__default.default(h);}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)&&(me(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=Li("svgo"),s.installed&&(await Ai("svgo")||ae("Unable to dynamically import SVGO","Ensure you have installed svgo")),t.installed=Li("svg-sprite"),t.installed&&(await Ai("svg-sprite")||ae("Unable to dynamically import SVG Sprite","Ensure you have installed svg-sprite")),!t.installed&&!s.installed&&ke(["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)&&he("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||ke("svgo")):(a.sprite=!0,t.installed||ke("svg-sprite"))):he("transform > svg","format",i.format,'"sprite" | "file"'):f("svgo",i)?(s.installed||ke("svgo"),a.format="file",a.svgo=G(i.svgo)?fe(s.config,i.svgo):!0):f("sprite",i)?(t.installed||ke("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(me(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||me(e.terser[s])&&e.terser[s]===!0)&&ae("esbuild is not installed",po),me(e.terser[s]))u.terser[s]=e.terser[s];else if(G(Pe[s])){if(Z(Pe[s]))continue;for(let r in e.terser[s]){let n=s==="views"?"liquid":s;f(r,Pe[n])||Rt(`terser.${s}`,r),r==="mangleProps"?!N(e.terser[s][r])&&!cr(Pe[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 Pe[n][r]!=typeof e.terser[s][r]&&k({option:`terser.${s}`,name:r,provided:typeof e.terser[s][r],expects:typeof Pe[n][r]}),r==="exclude"&&!Z(e.terser[s][r])?Pe[s][r]=Me(e.terser[s][r]):r==="collapseWhitespace"?Pe.html.collapseWhitespace=e.terser[s][r]:Pe[s][r]=e.terser[s][r];}}else t("unkown option provided",s);}}async function Xa(e,t){d.clear(),await Ia(e.cwd),await Hf(e),u.version="0.2.2-beta",u.mode=Lf(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([Mf(e.watch,r),Na(e),Vf(r),Ii(u.dirs.output),La(),Jf(e,s),Yf(s),Uf(e),Gf(s),Ma(s),qa(s),Ga(s),Ha(s),Ya(s),Qa(s),Ka(s),zf(s),Wf(s),qf(s)]).catch(i=>{console.log(i);});return d.start(u),n}function Lf(e){let t=ge(e.pages,e.metafields,e.redirects),s=ge(e.style,e.script,e.image,e.svg),r=ge(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,views:e.views,script:s?e.script:!1,style:s?e.style:!1,image:s?e.image:!1,svg:s?e.svg:!1,terse:ge(e.terse,e.prod),clean:ge(t,s,e.upload)?!1:e.clean,build:ge(e.export,e.watch,e.download)?!1:e.build,upload:ge(s,r)?!1:e.upload,download:ge(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.views=!0),n}function Mf(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 qf(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),me(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]:he("hot",r,e.hot[r],"visible | hidden"):r==="method"?e.hot[r]==="hot"||e.hot[r]==="refresh"?s[r]=e.hot[r]:he("hot",r,e.hot[r],"hot | refresh"):r==="scroll"?e.hot[r]==="preserved"||e.hot[r]==="top"?s[r]=e.hot[r]:he("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 Gf(e){for(let t in e.processors)K[t].config=S(e.processors[t])?e.processors[t]:z(K[t].config,e.processors[t]);}function Wf(e){if(f("plugins",e)&&S(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 zf(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:$,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,_i(i,u.spawn.commands[i],d.spawn(i));}else if(S(o)){let a=o.shift();u.spawn.commands[i]={cmd:a,args:o,pid:NaN},_i(i,u.spawn.commands[i],d.spawn(i));}else k({option:"spawn",name:r,provided:e.spawn[r],expects:"string | string[]"});}Ys(()=>{W.pause(),W.clear(),d.nwl($),s.streams.forEach((i,o)=>{Q(`- ${D(`pid: #${i.pid} (${o}) process exited`)}`),i.kill();}),d.nwl($),s.streams.clear(),process.exit(0);});}}function Uf(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||(S(u.filters[i])||(u.filters[i]=[]),u.filters[i].push(i)));}else s[0]==="*"||s[0]==="/"||s[0]==="."?r("pattern",s):s.indexOf("/")>-1||(S(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 Vf(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 Hf(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 Jf(e,t){let s=ge(u.mode.metafields,u.mode.pages,u.mode.redirects),r=ge(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=Pf__default.default.config({path:path.join(u.cwd,".env")}),o=S(t.stores)?t.stores:[t.stores],a=o.filter(({domain:h})=>tn(h,n)),l=a.length>1;for(let h of a){let p=`${h.domain}.myshopify.com`.toLowerCase(),c=i.error?Ni(h.domain,process.env,2):Ni(h.domain,i.parsed,1),g=u.sync.stores.push({store:h.domain,domain:p,client:c,queue:l})-1;if(u.mode.metafields||u.mode.pages)return;let m=f("theme",e)?e.theme.split(","):f(h.domain,e)?e[h.domain].split(","):_e(h.themes);for(let T of m)f(T,h.themes)||xu({type:"theme",expected:_e(h.themes).join(","),provided:T,message:[`Unknown theme target (${E(T)}) provided to ${E(h.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(`${m.length}`)} theme targets defined for ${E(h.domain)}:`,"",`${mt} ${m.join(`
|
214
|
-
${
|
215
|
-
${mt} ${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 Yf(e){let t=Zt(u.dirs.input),s=Ae("path resolution");for(let r of lo){let n;r==="customers"?n=f(r,e.paths)?S(e.paths[r])?e.paths[r].map(t):[t(e.paths[r])]:[t("templates/customers")]:f(r,e.paths)?(n=S(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){if(i.endsWith("metafields")||i.endsWith("pages")||i.endsWith("redirects"))continue;(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 Tw={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",Ri),f("_",e)&&(e._=e._.slice(1)),e.help)return console.info($a);await Xa(e),process.on("SIGINT",Au),process.stdin.on("data",Ri),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),d.throws(r);}}var Pw=e=>e;function Qf(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 Iw=Qf;
|
226
|
+
`;function $m(e,t){return e.replace(ss,`.bundled_${Ye()}.${t==="esm"?"mjs":"cjs"}`)}function vm(e){if(typeof jest>"u")return "cjs";let t=pathe.extname(e);return t===".js"?u.pkg.type==="module"?"esm":"cjs":t===".ts"||t===".mjs"?"esm":"cjs"}function Bm(e){return Re(e||{}).map(t=>new RegExp(`^${t.replace(/\*/,".*")}$`))}function Qa(e,t){return t?t.some(s=>s instanceof RegExp?s.test(e):e===s||e.startsWith(s+"/")):!1}function Am({external:e,notExternal:t}={}){return {name:"bundle-require:external",setup({onResolve:s}){s({filter:/.*/},async r=>{if(!(r.path.charCodeAt(0)===46||pathe.isAbsolute(r.path))){if(Qa(r.path,e))return {external:!0};if(!Qa(r.path,t))return {external:!0}}});}}}function Tm(){return {name:"bundle-require:inject-file-scope",setup(e){e.initialOptions.define={...e.initialOptions.define,__dirname:fn,__filename:mn,"import.meta.url":dn},e.onLoad({filter:ss},async t=>{let s=await fsExtra.readFile(t.path,"utf-8");return {contents:[`const ${mn} = ${JSON.stringify(t.path)};`,`const ${fn} = ${JSON.stringify(pathe.dirname(t.path))};`,`const ${dn} = ${JSON.stringify(url.pathToFileURL(t.path).href)};`].join("")+s,loader:No(pathe.extname(t.path))}});}}}async function Wr(e){if(!ss.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??vm(e.filepath),n=loadTsconfig.loadTsConfig(s,e.tsconfig),i=Bm(n?.data.compilerOptions?.paths||{});async function o(h){if(!h.outputFiles)throw new Error("[bundle-require] no output files");let{text:p}=h.outputFiles[0],m=(e.getOutputFile||$m)(e.filepath,r);await fsExtra.writeFile(m,p,"utf8");let D,C=e.require||jo;try{D=await C(r==="esm"?url.pathToFileURL(m).href:m,{format:r});}finally{t||await fsExtra.unlink(m);}return {mod:D,dependencies:h.metafile?Re(h.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||[],Am({external:e.external,notExternal:i}),Tm()]});return await o(a)}async function rl(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=pathe.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=pathe.relative(e,t),u.file.base=pathe.basename(t);let s=await fsExtra.readFile(t);return ko(s.toString())}else {u.file.path=t,u.file.relative=pathe.relative(e,t),u.file.base=pathe.basename(t);let s=await Wr({filepath:t});return s.mod.syncify||s.mod.default||s.mod}}catch(s){console.log(s);let r=pathe.join(e,"syncify.config.json");return await fsExtra.pathExists(r)?fsExtra.readJson(r):null}}async function sl(e){let t=pathe.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 qi(e,t={purge:!1}){if(await fsExtra.remove(e),u.cache={uri:pathe.join(e,"build.map"),version:u.version,maps:{},pages:{},metafields:{},sourcemaps:{script:null,style:null}},!await fsExtra.pathExists(e))try{await fsExtra.mkdir(e);}catch(r){throw new Error(r)}for(let r of co){let n=pathe.join(e,r,"/");if(r==="sourcemaps/script"?u.cache.sourcemaps.script=n:r==="sourcemaps/style"&&(u.cache.sourcemaps.style=n),await fsExtra.pathExists(n))t.purge&&await fsExtra.emptyDir(n);else try{await fsExtra.mkdir(n);}catch(o){throw new Error(o)}}await Gt();}async function Gi(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 wr){let r=pathe.join(e,s);if(!await fsExtra.pathExists(r))try{await fsExtra.mkdir(r);}catch(i){throw new Error(i)}}}function nl(e){let{config:t,cwd:s,mode:r,dirs:n}=u,i=Ju(s);for(let[o,a]of po){let c;if(o==="import"){r.download?d("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?d("output",e)?u.dirs[o]=i(e.output):u.dirs[o]=i(t.export):u.dirs[o]=i(t.export);continue}else if(d(o,e)&&e[o]===a)if(t[o]===a){u.dirs[o]=i(e[o]);continue}else c=t[o];else L(e[o])?c=e[o]:c=t[o];if(S(c)){let h=Yr(c.map(i));n[o]=h.length===1?h[0]:h;}else L(c)?n[o]=i(c):k({option:"config",name:o,provided:c,expects:"string"});}u.watch.add(u.file.path);}async function il(){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=pathe.join(e.import,i);if(await fsExtra.pathExists(a)){if(s.clean)try{await fsExtra.emptyDir(a);}catch(h){console.error(h);}}else try{await fsExtra.mkdir(a);}catch(h){throw new Error(h)}await Gi(pathe.join(a,o));}}function ol(e){if(!d("json",e.processors))return;let{json:t}=e.processors;if(!j(t)&&!(I(t)&&J(t))){I(t)||k({option:"processors",name:"json",expects:"{}",provided:typeof t});for(let s in t){if(s==="indent")if(Xr(t[s])){u.processor.json[s]=t[s];continue}else k({option:"json",name:s,provided:t[s],expects:"number"});if(s==="useTab")if(oe(t[s])){u.processor.json[s]=t[s];continue}else k({option:"json",name:s,provided:t[s],expects:"boolean"});if(s==="exclude"){let r=L(t[s])?[t[s]]:t[s];if(S(r)){u.processor.json[s]=pl__default.default(r);continue}else k({option:"json",name:s,provided:r[s],expects:"string | string[]"});}}}}function ul(e){let t=ge(e.pages,e.metafields,e.redirects),s=ge(e.style,e.script,e.image,e.svg),r=ge(t,e.upload,e.download)?!1:e.watch,n=U(u.mode,{watch:r,hot:Yi(e.watch,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,views:e.views,script:s?e.script:!1,style:s?e.style:!1,image:s?e.image:!1,svg:s?e.svg:!1,terse:ge(e.terse,e.prod),clean:ge(t,s,e.upload)?!1:e.clean,build:ge(e.export,e.watch,e.download)?!1:e.build,upload:ge(s,r)?!1:e.upload,download:ge(t,s,e.upload,e.watch,e.build)?!1:e.download});return Me(...Kr(n))&&Et({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:","",`${b("$")} ${b(`syncify ${u.argv} ${v("--watch")}`)}`,`${b("$")} ${b(`syncify ${u.argv} ${v("--build")}`)}`,`${b("$")} ${b(`syncify ${u.argv} ${v("--upload")}`)}`,"",`Run ${v("syncify --help")} for more information, or pass an execution`,`operation mode as per the ${v("expected")} value and ensure to replace ${v("--<cmd>")}`,"with one the examples provided or a supported mode."]}),n.build&&Me(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.views=!0),n}function al(e){if(!d("snippets",e.views))return;let{snippets:t}=e.views;if(!j(t)&&!(I(t)&&J(t))){I(t)||k({option:"views",name:"snippets",expects:"{}",provided:typeof t});for(let s in u.snippet){if(s==="prefixDir")if(oe(t[s])){u.snippet[s]=t[s];continue}else k({option:"views.snippets",name:s,provided:t[s],expects:"boolean"});if(s==="separator")if(L(t[s]))if(/[.@:_-]/.test(t[s])){u.section[s]=t[s];continue}else fe("snippets",s,t[s],"@ | _ | : | - | .");else k({option:"views.snippets",name:s,provided:t[s],expects:"string"});if(s==="global"){let r=L(t[s])?[t[s]]:t[s];if(S(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 ll(e){if(!d("sections",e.views))return;let{sections:t}=e.views;if(!j(e.views.sections)&&!(I(t)&&J(t))){I(t)||k({option:"views",name:"sections",expects:"{}",provided:typeof t});for(let s in u.section){if(s==="prefixDir")if(oe(t[s])){u.section[s]=t[s];continue}else k({option:"views.sections",name:s,provided:t[s],expects:"boolean"});if(s==="separator")if(L(t[s]))if(/[@:_-]/.test(t[s])){u.section[s]=t[s];continue}else fe("view.sections",s,t[s],"@ | _ | : | -");else k({option:"views.sections",name:s,provided:t[s],expects:"string"});if(s==="global"){let r=L(t[s])?[t[s]]:t[s];if(S(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 Wi(e,t,s){let r=e+"_api_token";if(d(r,t)||(r=r.toUpperCase()),d(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(d(n,t)||(n=n.toUpperCase()),d(i,t)||(i=i.toUpperCase()),d(n,t)&&d(i,t))return {baseURL:`https://${e}.myshopify.com/admin`,auth:{username:t[n],password:t[i]}};s===1?ce(`Invalid or missing ${M(e+".myshopify.com")} credentials`,[`Your shop credentials in the ${M.bold(".env")} file could`,"not be read correctly or are missing."]):s===2&&ce(`Missing credentials for: ${M(e+".myshopify.com")}`,`
|
227
|
+
You need to provide shop credentials within a ${M.bold(".env")} file.
|
228
|
+
Please check you project setup and ensure you have correctly provided authorization.`);}function ze(e,t){let{cwd:s}=u,r=Se(t)?[]:!1,n=Be("Path Resolver"),i=ir(u.dirs.input);if(S(e)){let o=[];for(let a of e){let c=i(a),h=cl__default.default.sync(c,{cwd:s,absolute:!0});if(r){let p=t(c);L(p)?r.push(p):S(p)&&r.push(...p);}h.length===0?n("No files can be resolved in",a):o.push(...h);}return r?{paths:o,match:pl__default.default(r)}:o}if(L(e)){let o=i(e),a=cl__default.default.sync(o,{cwd:s});if(a.length===0&&n("No files can be resolved in",e),r){let c=t(o);L(c)?r.push(c):S(c)&&r.push(...c);}return r?{paths:a,match:pl__default.default(r)}:a}k({option:"uri",name:"uri/path",provided:e,expects:"string | string[]"});}function dr(e,t){if(d("assertSnippet",t)||(t.assertSnippet=!0),L(e)){let{paths:s,match:r}=ze(e,n=>(t.addWatch&&u.watch.add(n),St(n)));if(s){if(t.flatten)return s.map(n=>t.assertSnippet?{input:n,rename:pathe.basename(n),snippet:!1}:{input:n,rename:pathe.basename(n)});{let n={input:s,rename:"[name].[ext]",match:r};return t.assertSnippet&&(n.snippet=!1),n}}}else if(S(e)){if(e.every(L)){let{paths:s,match:r}=ze(e,n=>(t.addWatch&&u.watch.add(n),St(n)));if(t.flatten)return s.map(n=>t.assertSnippet?{input:n,rename:pathe.basename(n),snippet:!1}:{input:n,rename:pathe.basename(n)});{let n={input:s,rename:"[name].[ext]",match:r};return t.assertSnippet&&(n.snippet=!1),n}}else if(e.every(I))return e.map(s=>{d("input",s)||fe("tranform","input",s,"{ input: string | string[] }");let{paths:r,match:n}=ze(e,i=>(t.addWatch&&u.watch.add(i),St(i)));return s.match=n,s.input=r,t.assertSnippet&&!d("snippet",s)&&(s.snippet=!1),d("rename",s)||(s.rename=s.snippet?"[name].liquid":"[name].[ext]"),s})}else if(I(e)){let s=[];if(d("input",e)){let{paths:r,match:n}=ze(e.input,i=>(t.addWatch&&u.watch.add(i),St(i)));if(t.assertSnippet&&!d("snippet",e)&&(e.snippet=!1),d("rename",e)||(e.rename=e.snippet?"[name].liquid":"[name].[ext]"),t.flatten)for(let i of r)s.push(U(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(L(o)){a&&(n.rename=i?r.slice(7):r.slice(9));let{paths:c,match:h}=ze(o,p=>(t.addWatch&&u.watch.add(p),St(p)));if(c)if(t.flatten)for(let p of c)s.push(U({},n,{input:p}));else s.push(U({},n,{input:c,match:h}));}else if(I(o)){d("input",o)||fe("tranform",r,o,"{ input: string | string[] }");let{paths:c,match:h}=ze(o.input,p=>(t.addWatch&&u.watch.add(p),St(p)));if(c){let p=a?U({},o,n,{rename:i?r.slice(7):r.slice(9)}):U({},n,o);if(t.flatten)for(let l of c)s.push(U({},p,{input:l}));else s.push(U(p,{input:c,match:h}));}}else if(S(o))if(o.every(L)){let{paths:c,match:h}=ze(o,p=>(t.addWatch&&u.watch.add(p),St(p)));if(Po(r)&&(n.rename=pathe.basename(r)),c)if(t.flatten)for(let p of c)s.push(U({},n,{input:p}));else s.push(U({},n,{input:c,match:h}));}else k({option:"transform",name:r,provided:o,expects:"string[]"});}return s}}function zi(e){let{pkg:t}=u;return ge(d("devDependencies",t)&&d(e,t.devDependencies),d("dependencies",t)&&d(e,t.dependencies),d("peerDependencies",t)&&d(e,t.peerDependencies),d("optionalDependencies",t)&&d(e,t.peerDependencies))}function fl(e,t){let s=t,r=Fe(e),n=pathe.extname(e),i=pathe.basename(e,n);return X(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 ml(e,t){let s=ge(u.mode.metafields,u.mode.pages,u.mode.redirects),r=ge(u.mode.watch,u.mode.upload,u.mode.download);if(e._.length===0){s&&Et({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=Om__default.default.config({path:pathe.join(u.cwd,".env")}),o=S(t.stores)?t.stores:[t.stores],a=o.filter(({domain:h})=>un(h,n)),c=a.length>1;for(let h of a){let p=`${h.domain}.myshopify.com`.toLowerCase(),l=i.error?Wi(h.domain,process.env,2):Wi(h.domain,i.parsed,1),m=u.sync.stores.push({store:h.domain,domain:p,client:l,queue:c})-1;if(u.mode.metafields||u.mode.pages)return;let D=d("theme",e)?e.theme.split(","):d(h.domain,e)?e[h.domain].split(","):Re(h.themes);for(let C of D)d(C,h.themes)||Pu({type:"theme",expected:Re(h.themes).join(","),provided:C,message:[`Unknown theme target (${v(C)}) provided to ${v(h.domain)} store`,`Your ${v(u.file.base)} file contains no such theme using this name.`],fix:[`Provide an ${v("expected")} theme target or update/add an existing target.`,`You have ${v(`${D.length}`)} theme targets defined for ${v(h.domain)}:`,"",`${Jt} ${D.join(`
|
229
|
+
${Jt} `)}`,""]}),u.sync.themes.push({target:C,sidx:m,store:p,id:h.themes[C],url:`/themes/${h.themes[C]}/assets.json`});}if(s&&u.sync.stores.length===0)return Et({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:","",`${Jt} ${b("$")} syncify ${o.join(`
|
230
|
+
${Jt} ${b("$")} syncify `)}`,""]});if(u.sync.themes.length===0&&r)return Et({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 ${v("-t")} or ${v("--theme")} flag.`,"Theme targets should be passed as the 2nd argument, the 1st argument should be store name/s."]});u.sync.stores.length===0&&ce("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 hl(e){let t=ir(u.dirs.input),s=Be("path resolution");for(let r of At){let n;if(r==="customers")n=d(r,e.paths)?S(e.paths[r])?e.paths[r].map(t):[t(e.paths[r])]:[t("templates/customers")];else if(r==="metaobject")n=d(r,e.paths)?S(e.paths[r])?e.paths[r].map(t):[t(e.paths[r])]:[t("templates/metaobject")];else if(d(r,e.paths))if(n=S(e.paths[r])?e.paths[r].map(t):[t(e.paths[r])],r==="snippets")for(let i of n)u.snippet.baseDir.add(Fe(pathe.dirname(i)));else if(r==="sections")for(let i of n)u.section.baseDir.add(Fe(pathe.dirname(i)));else r==="assets"&&n.push(pathe.join(u.dirs.output,"assets/*"));else r==="redirects"&&d(r,e.paths)?n=[pathe.join(u.cwd,e.paths[r])]:n=[t(r)];for(let i of n){if(r!=="metafields"&&r!=="redirects"){let o=await cl__default.default(i,{cwd:u.cwd});if(o.length===0)s("No files could be resolved in",pathe.relative(u.cwd,i));else {if(u.paths[r].input===null)u.paths[r].input=new Set(o);else for(let a of o)u.paths[r].input.add(a);u.watch.add(i);}}u.paths[r].match=pl__default.default(n);}}}function Ui(e,t,s){let r=Mm__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 gl(e){let{mode:t,spawn:s}=u;if(!d("spawn",e)||j(e.spawn))return;I(e.spawn)||k({option:"config",name:"spawn",provided:e.spawn,expects:"{ build: {}, watch: {} }"});let r=null;if(t.build&&d("build",e.spawn)&&(r="build"),t.watch&&d("watch",e.spawn)&&(r="watch"),!(j(t)||j(e.spawn[r])||(I(e.spawn[r])||k({option:"spawn",name:r,provided:e.spawn[r],expects:"{ build: {}, watch: {} }"}),Re(e.spawn[r]).length===0))){for(let i in e.spawn[r]){let o=e.spawn[r][i];if(L(o)){u.spawn.commands[i]={cmd:A,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,Ui(i,u.spawn.commands[i],f.spawn(i));}else if(S(o)){let a=o.shift();u.spawn.commands[i]=Je(null),u.spawn.commands[i].cmd=a,u.spawn.commands[i].args=o,u.spawn.commands[i].pid=NaN,Ui(i,u.spawn.commands[i],f.spawn(i));}else k({option:"spawn",name:r,provided:e.spawn[r],expects:"string | string[]"});}Ks(()=>{G.pause(),G.clear(),f.nwl(A),s.streams.forEach((i,o)=>{f.out(`- ${g(`pid: #${i.pid} (${o}) process exited`)}`),qm__default.default(i.pid);}),f.nwl(A),s.streams.clear(),process.exit(0);});}}function Ur(e,t){return !!(d("devDependencies",e)&&d(t,e.devDependencies)&&d(t,e.devDependencies)||d("dependencies",e)&&d(t,e.dependencies)||d("peerDependencies",e)&&d(t,e.peerDependencies)||d("optionalDependencies",e)&&d(t,e.peerDependencies))}async function Um(e){for(let t of ["js","cjs","mjs"]){let s=`${e}.${t}`;if(await fsExtra.pathExists(`${s}.${t}`))return s}return null}async function Zs(e){try{let t=await Um(e);if(t!==null){let s=await Wr({filepath:t});return {path:t,config:s.mod.syncify||s.mod.default||s.mod}}return null}catch{return null}}function Vi(e,t){let s=t,r=Fe(e),n=path.extname(e),i=path.basename(e,n);return X(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 xl(e){if(!d("script",e.transforms)||e.transforms.script===!1)return;let t=Be("script transform option"),{esbuild:s}=u.processor,{script:r}=e.transforms;if(s.installed=Ur(u.pkg,"esbuild"),s.installed){Aa()||ce("failed to import ESBuild","Ensure you have installed esbuild");let a=await Zs("esbuild.config");a!==null&&(s.file=a.path,s.config=de(s.config,a.config));}else Le("esbuild");d("entryPoints",s.config)&&(t("processor option is not allowed and was omitted","entryPoints"),delete s.config.entryPoints);let n=dr(r,{addWatch:!1,flatten:!0}),i=an(["input","watch","rename","snippet"]);d("absWorkingDir",s.config)||(s.config.absWorkingDir=u.cwd);for(let o of n){let{snippet:a}=o,c=a?"snippets":"assets",{name:h}=fl(o.input,o.rename),p;!h.endsWith(".js")&&!h.endsWith(".mjs")?p=h+".js":h.endsWith(".cjs")?fe("rename","file extension",h,".js | .mjs"):p=h,a&&!/\.liquid$/.test(p)&&(p=p+".liquid");let l={uuid:Ye(),snippet:a,input:o.input,output:pathe.join(u.dirs.output,c,p),key:pathe.join(c,p),namespace:o.snippet?"snippets":"assets",size:NaN,watch:null,watchCustom:null,esbuild:null};if(s.config.outfile=l.output,u.mode.watch&&u.watch.unwatch(l.output),d("esbuild",o))if(oe(o.esbuild)||j(o.esbuild))J(i)?l.esbuild=de(s.config):l.esbuild=de(s.config,i);else if(typeof o.esbuild=="object"){for(let m in ["entryPoints","outdir","watch","absWorkingDir","watch","write","logLevel","incremental"])m==="entryPoints"&&d(m,o.esbuild)?t('Option is not allowed, use Syncify "input" instead',m):m==="outdir"&&d(m,o.esbuild)?t("Option is not allowed, Syncify will handle output",m):m==="watch"&&d(m,o.esbuild)?t("Option is not allowed, declare watch using Syncify",m):d(m,o.esbuild)&&t("Option is not allowed and will be ignored",m);d("plugins",o.esbuild)&&d("plugins",s.config)&&o.esbuild.plugins.unshift(...s.config.plugins),J(i)?l.esbuild=de(s.config,o.esbuild):l.esbuild=de(s.config,o.esbuild,i);}else k({option:"script",name:"esbuild",provided:typeof o.esbuild,expects:"boolean | null | {}"});else J(i)?l.esbuild=s.config:l.esbuild=de(s.config,i);if(l.esbuild.entryPoints=[l.input],u.mode.watch)if(!d("watch",o))l.watch=new Set;else {S(o.watch)||k({option:"script",name:"watch",provided:o.watch,expects:"string[]"});let m=ze(o.watch);l.watchCustom=pl__default.default(m),l.watch=new Set(m);}else l.watch=new Set;try{await Ta(l);}catch(m){throw new Error(m)}u.mode.terse&&(l.esbuild=de(l.esbuild,u.terser.script,{exclude:void 0})),u.script.push(l);}s.loaded=!0;}async function Fl(e){if(!d("style",e.transforms))return;let{postcss:t,sass:s}=u.processor,r=Be("style transform option");if(s.installed=Ur(u.pkg,"sass"),s.installed&&(await Ri("sass")||ce("Unable to dynamically import SASS","Ensure you have installed sass")),t.installed=Ur(u.pkg,"postcss"),t.installed){await Ri("postcss")||ce("Unable to dynamically import PostCSS","Ensure you have installed postcss");let a=await Zs("postcss.config");a!==null&&(t.file=a.path,t.config=a.config);}let n=dr(e.transforms.style,{addWatch:!1,flatten:!0}),i=ir(e.input);for(let o of n){let a={uuid:Ye(),input:o.input,watch:null,postcss:!1,sass:!1};if(d("postcss",o))if(t.installed||Le("postcss"),S(o.postcss))a.postcss=o.postcss;else {let p=I(o.postcss);(oe(o.postcss)||p)&&!j(o.postcss)?o.postcss!==!1&&(t.installed||Le("postcss"),a.postcss=p?de(t.config,o.postcss):!0):k({option:"style",name:"postcss",provided:a.postcss,expects:"boolean | {}"});}if(d("sass",o)&&o.sass!==!1&&s.installed===!0){let p=I(o.sass);if((oe(o.sass)||p)&&!j(o.sass))if(s.installed||Le("sass"),!p)Vt(a,"sass",{get(){return o.sass}});else {a.sass=de(s.config,o.sass);for(let l in o.sass)l==="sourcemap"||l==="warnings"?oe(o.sass[l])?a.sass[l]=o.sass[l]:k({option:"sass",name:l,provided:o.sass[l],expects:"boolean"}):l==="style"?(L(o.sass[l])||k({option:"sass",name:l,provided:o.sass[l],expects:"string"}),o.sass[l]==="expanded"||o.sass[l]==="compressed"?a.sass[l]=o.sass[l]:fe("sass",l,o.sass[l],"expanded | compressed")):l==="includePaths"&&(S(o.sass[l])?a.sass[l]=Yr(o.sass[l]).map(m=>path.join(u.cwd,m)):k({option:"sass",name:l,provided:o.sass[l],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 c=Vi(o.rename);d("rename",o)&&!j(o)&&(L(o.rename)||k({option:"styles",name:"rename",provided:o.rename,expects:"string"}),c=Vi(a.input,o.rename),/[a-zA-Z0-9_.-]+/.test(c.name)||k({option:"sass",name:"rename",provided:c,expects:"Characters: [a-zA-Z0-9_.-]"}),c.name.endsWith(".css")?a.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 h=[];if(u.mode.watch&&d("watch",o)){S(o.watch)||k({option:"styles",name:"watch",provided:o.watch,expects:"string[]"});for(let p of o.watch){let l=await cl__default.default(path.join(u.cwd,i(p)));l.length===0&&p[0]!=="!"&&r("Cannot resolve watch glob/path uri",p);for(let m of l)fsExtra.existsSync(m)?h.push(m):r("No file exists in path",m);}h.push(a.input),h.forEach(p=>u.watch.add(p)),a.watch=pl__default.default(h);}else a.watch=pl__default.default([a.input]),u.watch.add(a.input);typeof a.sass=="object"&&(a.sass.include.unshift(u.cwd,path.join(u.cwd,c.dir)),Ve("sass.include",o)&&(a.sass.include=o.sass.include.map(p=>path.join(u.cwd,p)))),d("snippet",o)&&(oe(o.snippet)||k({option:"styles",name:"snippet",provided:o.snippet,expects:"boolean"}),a.snippet=o.snippet),a.snippet?(d("rename",a)||(a.rename=c.name),(!c.name.endsWith(".liquid")||!a.rename.endsWith(".liquid"))&&(a.rename=c.name+".liquid"),u.paths.transforms.set(a.input,8),u.mode.watch&&u.watch.unwatch(path.join(u.cwd,e.output,"snippets",a.rename))):(a.rename=c.name,u.mode.watch&&u.watch.unwatch(path.join(u.cwd,e.output,"assets",c.name))),u.style.push(a);}}async function Cl(e){if(!d("svg",e.transforms))return;let{sprite:t,svgo:s}=u.processor,r=Be("svg transform");s.installed=zi("svgo"),s.installed&&(await Pi("svgo")||ce("Unable to dynamically import SVGO","Ensure you have installed svgo")),t.installed=zi("svg-sprite"),t.installed&&(await Pi("svg-sprite")||ce("Unable to dynamically import SVG Sprite","Ensure you have installed svg-sprite")),!t.installed&&!s.installed&&Le(["svgo","svg-sprite"]);let n=dr(e.transforms.svg,{addWatch:!0,flatten:!1});for(let i of n){let o=i.input.filter(c=>pathe.extname(c)!==".svg"?(r("Excluded file which is not an SVG type",pathe.relative(u.cwd,c)),!1):!0);if(o.length===0){r("No SVG file paths were resolved");continue}let a={uuid:Ye(),input:new Set(o),match:i.match,format:null,rename:i.rename,snippet:i.snippet};d("svgo",i)&&d("sprite",i)&&fe("transform","svg","svgo AND sprite","svgo OR sprite"),d("format",i)?i.format==="file"||i.format==="sprite"?(a.format=i.format,i.format==="file"?(a.svgo=!0,s.installed||Le("svgo")):(a.sprite=!0,t.installed||Le("svg-sprite"))):fe("transform > svg","format",i.format,'"sprite" | "file"'):d("svgo",i)?(s.installed||Le("svgo"),a.format="file",a.svgo=I(i.svgo)?de(s.config,i.svgo):!0):d("sprite",i)?(t.installed||Le("svg-sprite"),a.format="sprite",a.sprite=I(i.sprite)?de(t.config,i.sprite):!0):s.installed&&t.installed?Ou("transform.svg","format","sprite | file",[`SVG transforms require you to define ${M("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):bt("transform > svg","Cannot resolve processor, try defining a format."),u.svg.push(a);}}async function El(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=Be("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}Me(I(e.hot),oe(e.hot),j(e.hot))&&k({option:"config",name:"hot",provided:e.hot,expects:"boolean | {}"});let{hot:s}=u;if(I(e.hot)&&J(e.hot)===!1)for(let r in e.hot)d(r,u.hot)||bt(`hot.${r}`,e.hot[r]),r==="label"?e.hot[r]==="visible"||e.hot[r]==="hidden"?s[r]=e.hot[r]:fe("hot",r,e.hot[r],"visible | hidden"):r==="strategy"?e.hot[r]==="hydrate"||e.hot[r]==="replace"?s[r]=e.hot[r]:fe("hot",r,e.hot[r],"hydrate | replace"):r==="method"?e.hot[r]==="hot"||e.hot[r]==="refresh"?s[r]=e.hot[r]:fe("hot",r,e.hot[r],"hot | refresh"):r==="scroll"?e.hot[r]==="preserved"||e.hot[r]==="top"?s[r]=e.hot[r]:fe("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=pathe.join(u.cwd,"node_modules","@syncify/cli","hot.js.liquid"),s.output=pathe.join(u.dirs.output,"snippets","hot.js.liquid");for(let r of s.layouts)s.alive[pathe.join(u.dirs.output,"layout",r)]=!1;s.renderer="{% render 'hot.js'"+["",`server: ${s.server}`,`socket: ${s.socket}`,`strategy: "${s.strategy}"`,`scroll: "${s.scroll}"`,`label: "${s.label}"`,`history: "${s.history}`,`method: "${s.method}"`].join(", ")+" %}",u.wss=Ha();}function Ji(e,t){let s=[],r={};u.mode.upload?(r.base="output",r.from="output",r.dirs=wr.map(n=>`${b("-")} ${v(n)}`),r.fix=[`The ${v("--filter")} (or ${v("-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:","",`${b("$")} ${b(`syncify --filter ${v("sections/file.liquid")}`)}`,`${b("$")} ${b(`syncify --filter ${v("snippets/*")}`)}`,`${b("$")} ${b(`syncify --filter ${v("templates/*.json")}`)}`,`${b("$")} ${b(`syncify --filter ${v("!assets/some-file.ext")}`)}`,"",`Syncify will automatically resolve files from within your defined ${F(r.base)} directory`,"based on the starting point directory name. You can pass glob star matches following the",`directory namespace or starting point ignores (${v("!")}) as long the directory can match.`]):(r.base="input",r.from="paths",r.dirs=At.map(n=>`${b("-")} ${v(n)}`),r.fix=[`The ${v("--filter")} (or ${v("-f")}) flag command argument expects you`,`provide a ${yt.bold("paths")} key name as the starting point. Filtering begins with`,"a Shopify output directory name, for example:","",`${b("$")} ${b(`syncify --filter ${v("sections/file.liquid")}`)}`,`${b("$")} ${b(`syncify --filter ${v("snippets/*")}`)}`,`${b("$")} ${b(`syncify --filter ${v("templates/*.json")}`)}`,`${b("$")} ${b(`syncify --filter ${v("!assets/some-file.ext")}`)}`,"",`Syncify will automatically resolve files from within your defined ${F(r.base)} directory`,`based on the starting point ${F("paths")} name. You can pass glob star matches following the`,`starting point or ignores (${v("!")}) as long the reference can match.`]),e==="pattern"?(s.push(`Invalid ${v("--filter")} pattern provided. You cannot pass starting point`),t[0]==="*"?s.push(`glob (${v("*")}) stars as filters, Syncify does not support this.`):t[0]==="/"?s.push(`path (${v("/")}) roots as filters, Syncify does not support this.`):t[0]==="."&&s.push(`dot paths (${v(".")}) as filters, Syncify does not support this.`),s.push(`Use a starting point reference name based on the ${v(r.from)} key property`,`in your ${v(u.file.base)} file.`)):s.push(`Invalid directory provided. The ${v("--filter")} pattern expects the starting point`,"directory path be one of the following:","",...r.dirs,""),Et({message:s,expected:"--filter <dir>",fix:r.fix});}function bl(e,t,s){if((t[0]==="*"||t[0]==="/"||t[0]===".")&&Ji("pattern",t),t[0]==="!"){s.test(t.slice(1))||Ji("dir",t);return}s.test(t)||Ji("dir",t);let r=t.slice(0,t.indexOf("/"));S(u.filters[r])||(u.filters[r]=[]),u.filters[r].push(pathe.join(e,t));}async function Sl(e){if(!d("filter",e))return;let t=u.mode.upload?u.dirs.output:u.dirs.input,s=e.filter.replace(/\s+/g," ").trim(),r=u.mode.upload?new RegExp(`^(${wr.join("|")})`):new RegExp(`^(${At.join("|")})`);if(s.indexOf(",")>-1){let n=s.split(",").filter(Boolean).map(i=>i.trim());for(let i of n)bl(t,i,r);}else bl(t,s,r);f.out(u.filters);}function $l(e){let{terser:t,mode:s}=u;if(oe(e.terser)){if(s.terse===!1&&e.terser===!1)return;s.terse===!1&&e.terser===!0&&(s.terse=!0);}let r=Be("terser configuration");if(typeof e.terser=="object")for(let n in e.terser){if(e.terser[n]===!1||j(e.terser[n])){u.mode.terse===!0&&(u.terse[n]=!0);continue}if(n==="script"&&u.processor.esbuild.installed===!1&&(I(e.terser[n])&&J(e.terser[n])===!1||oe(e.terser[n])&&e.terser[n]===!0)&&ce("esbuild is not installed",fo),oe(e.terser[n]))u.terser[n]=e.terser[n];else if(I(t[n])){if(J(t[n]))continue;for(let i in e.terser[n]){if(i==="exclude"){J(e.terser[n][i])||(t[n][i]=ze(e.terser[n][i]));continue}d(i,t[n])||bt(`terser.${n}`,i),i==="mangleProps"?!j(e.terser[n][i])&&!Bt(t[n][i])&&k({option:`terser.${n}`,name:i,provided:`${typeof e.terser[n][i]} (${e.terser[n][i]})`,expects:"Regex | string | undefined"}):!j(e.terser[n][i])&&typeof t[n][i]!=typeof e.terser[n][i]&&k({option:`terser.${n}`,name:i,provided:typeof e.terser[n][i],expects:typeof t[n][i]}),i==="collapseWhitespace"?t.markup.collapseWhitespace=e.terser[n][i]:t[n][i]=e.terser[n][i];}}else r("unkown option provided",n);}}function vl(e){if(!d("pages",e.views))return;let{pages:t}=e.views;if(!I(t)&&!j(t)&&k({option:"views",name:"pages",provided:typeof t,expects:"{}"}),J(t))return;let s=u.config.views.pages;for(let r in t)if(d(r,s)||bt("pages",r),r==="importLanguage")L(t[r])?t[r]==="markdown"||t[r]==="html"?u.page[r]=t[r]:fe("views.pages",r,t[r],"markdown | html"):k({option:"views.pages",name:r,provided:t[r],expects:"markdown | html"});else if(r==="author"){if(j(t[r]))continue;L(t[r])?u.page[r]=t[r]:k({option:"views.pages",name:r,provided:t[r],expects:"string"});}else if(r==="suffixDir"||r==="safeSync"){if(j(t[r]))continue;oe(t[r])?u.page[r]=t[r]:k({option:"views.pages",name:r,provided:t[r],expects:"object"});}else if(r==="global"){if(j(t[r]))continue;if(S(t[r])){if(t[r].length>0){u.page[r]=new RegExp(`${t[r].join("|")}`);continue}}else k({option:"views.pages",name:r,provided:t[r],expects:"string | string[]"});}}async function Tl(e,t){f.clear(),await sl(e.cwd),await od(e),u.version="0.3.0-beta",u.restart=!1,u.cli=e,u.mode=ul(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,u.terminal.wrap=Math.round(u.terminal.cols-u.terminal.cols/3),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([rd(e.watch||e.upload,r),nl(e),id(r),Gi(u.dirs.output),il(),ml(e,s),hl(s),Sl(e),sd(s),ll(s),al(s),vl(s),ol(s),xl(s),Fl(s),Cl(s),$l(s),gl(s),nd(s),El(s)]).catch(i=>{console.log(i);});return f.start(u),n}function rd(e,t){e&&(u.watch=new chokidar.FSWatcher({persistent:!0,ignoreInitial:!0,usePolling:!0,interval:75,binaryInterval:100,ignored:["**/*.map"],ignorePermissionErrors:!0}),u.watch=Object.defineProperties(u.watch,{has:{value(s,r=t){return u.watch._watched.get(r).items.has(s)}},paths:{get(){return at(u.watch.values())}},watching:{get(){return u.watch._watched}}}));}function sd(e){for(let t in e.processors)u.processor[t].config=S(e.processors[t])?e.processors[t]:U(u.processor[t].config,e.processors[t]);}function nd(e){if(d("plugins",e)&&S(e.plugins))for(let t of e.plugins)d("onInit",t)&&t.onInit.call({...u},e),d("onChange",t)&&u.plugins.onChange.push([t.name,t.onChange]),d("onTransform",t)&&u.plugins.onTransform.push([t.name,t.onTransform]),u.mode.watch&&(d("onWatch",t)&&u.plugins.onWatch.push([t.name,t.onWatch]),d("onReload",t)&&u.plugins.onReload.push([t.name,t.onReload])),u.mode.build&&d("onBuild",t)&&u.plugins.onBuild.push([t.name,t.onBuild]);}async function id(e){u.dirs.cache=pathe.join(e,"node_modules/.syncify");let t=pathe.join(u.dirs.cache,"build.map");if(!await fsExtra.pathExists(t))return qi(u.dirs.cache);if(u.cache=await fsExtra.readJSON(t),u.cache.version!==u.version&&u.version==="0.3.0-beta"&&await fsExtra.pathExists(u.dirs.cache))return await fsExtra.remove(u.dirs.cache),qi(u.dirs.cache)}async function od(e){let t=await rl(e.cwd);t!==null?u.config=t:d("syncify",u.pkg)?u.config=u.pkg.syncify:ju(e.cwd);}var eS={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 hr(e,t,s){if(process.stdin.on("data",Ja),d("_",e)&&(e._=e._.slice(1)),e.help)return console.info(Ya);await Tl(e),process.on("SIGINT",Wu),process.on("rejectionHandled",zu),u.mode.hot&&await Va();try{if(u.mode.build)return Ia(s);if(u.mode.watch)return Wa(s);if(u.mode.upload)return ba(s);if(u.mode.download)return Sa(s);if(u.mode.export)return console.log("TODO")}catch(r){console.log(r),f.throws(r);}}var iS=e=>e;function ud(e,t){if(L(e)){if(/watch|build|download|upload/.test(e))return s=>hr({cli:!1,[e]:!0},t,s)}else if(I(e)){if(!X(t))throw new Error("You cannot provide options when running instance");return {watch:s=>hr({cli:!1,watch:!0},t,s),build:s=>hr({cli:!1,build:!0},t,s),download:s=>hr({cli:!1,download:!0},t,s),upload:s=>hr({cli:!1,upload:!0},t,s)}}}var oS=ud;
|
216
231
|
|
217
|
-
exports.a =
|
218
|
-
exports.b =
|
219
|
-
exports.c =
|
220
|
-
exports.d =
|
221
|
-
exports.e =
|
232
|
+
exports.a = f;
|
233
|
+
exports.b = iS;
|
234
|
+
exports.c = oS;
|
235
|
+
exports.d = eS;
|
236
|
+
exports.e = hr;
|