UNPKG

@shopify/cli

Version:

A CLI tool to build for the Shopify platform

2 lines (1 loc) 2.09 kB
import{b as P,e as E,g as w}from"./chunk-CERXUPGC.js";import{c as s,g as a}from"./chunk-VPRTJUIN.js";var k=s((ve,W)=>{a();var z=P(),G=function(){return z.Date.now()};W.exports=G});var R=s((be,N)=>{a();var J=/\s/;function K(e){for(var r=e.length;r--&&J.test(e.charAt(r)););return r}N.exports=K});var C=s((Ee,S)=>{a();var Q=R(),V=/^\s+/;function Y(e){return e&&e.slice(0,Q(e)+1).replace(V,"")}S.exports=Y});var _=s((pe,M)=>{a();var Z=C(),A=E(),ee=w(),L=NaN,re=/^[-+]0x[0-9a-f]+$/i,ne=/^0b[01]+$/i,ie=/^0o[0-7]+$/i,te=parseInt;function ae(e){if(typeof e=="number")return e;if(ee(e))return L;if(A(e)){var r=typeof e.valueOf=="function"?e.valueOf():e;e=A(r)?r+"":r}if(typeof e!="string")return e===0?e:+e;e=Z(e);var i=ne.test(e);return i||ie.test(e)?te(e.slice(2),i?2:8):re.test(e)?L:+e}M.exports=ae});var F=s((qe,B)=>{a();var ue=E(),I=k(),j=_(),fe="Expected a function",de=Math.max,ce=Math.min;function oe(e,r,i){var u,f,x,o,t,c,m=0,p=!1,l=!1,T=!0;if(typeof e!="function")throw new TypeError(fe);r=j(r)||0,ue(i)&&(p=!!i.leading,l="maxWait"in i,x=l?de(j(i.maxWait)||0,r):x,T="trailing"in i?!!i.trailing:T);function b(n){var d=u,g=f;return u=f=void 0,m=n,o=e.apply(g,d),o}function U(n){return m=n,t=setTimeout(v,r),p?b(n):o}function X(n){var d=n-c,g=n-m,O=r-d;return l?ce(O,x-g):O}function y(n){var d=n-c,g=n-m;return c===void 0||d>=r||d<0||l&&g>=x}function v(){var n=I();if(y(n))return q(n);t=setTimeout(v,X(n))}function q(n){return t=void 0,T&&u?b(n):(u=f=void 0,o)}function D(){t!==void 0&&clearTimeout(t),m=0,u=c=f=t=void 0}function H(){return t===void 0?o:q(I())}function h(){var n=I(),d=y(n);if(u=arguments,f=this,c=n,d){if(t===void 0)return U(c);if(l)return clearTimeout(t),t=setTimeout(v,r),b(c)}return t===void 0&&(t=setTimeout(v,r)),o}return h.cancel=D,h.flush=H,h}B.exports=oe});var xe=s((We,$)=>{a();var se=F(),me=E(),le="Expected a function";function ge(e,r,i){var u=!0,f=!0;if(typeof e!="function")throw new TypeError(le);return me(i)&&(u="leading"in i?!!i.leading:u,f="trailing"in i?!!i.trailing:f),se(e,r,{leading:u,maxWait:r,trailing:f})}$.exports=ge});export{F as a,xe as b};